From 03c88c9516e58fea956c3ae2ebd9511f6c0b3e90 Mon Sep 17 00:00:00 2001 From: Marek Sison Date: Fri, 3 May 2024 16:02:32 +0800 Subject: [PATCH] FEAT: Stockpile partially implemented --- src/data/move.ts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/data/move.ts b/src/data/move.ts index 1d0515465..ee14a0df8 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -2767,6 +2767,21 @@ export class FaintCountdownAttr extends AddBattlerTagAttr { } } +export class StockpileAttr extends AddBattlerTagAttr { + constructor() { + super(BattlerTagType.STOCKPILE, true, false, 0, 10) + } + + apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean { + if (!super.apply(user, target, move, args)) + return false; + + user.scene.queueMessage(getPokemonMessage(target, `\nstockpiled resources.`)); + + return true; + } +} + export class HitsTagAttr extends MoveAttr { public tagType: BattlerTagType; public doubleDamage: boolean; @@ -4517,7 +4532,6 @@ export function initMoves() { new SelfStatusMove(Moves.STOCKPILE, Type.NORMAL, -1, 20, -1, 0, 3) .attr(AddBattlerTagAttr, BattlerTagType.STOCKPILE, true, false, 0, 10) .attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], 1, true) - .target(MoveTarget.USER) .partial(), new AttackMove(Moves.SPIT_UP, Type.NORMAL, MoveCategory.SPECIAL, -1, 100, 10, -1, 0, 3) .unimplemented(),