FEAT: Stockpile partially implemented

pull/543/head
Marek Sison 2024-05-03 16:02:32 +08:00
parent 3aac0e7385
commit 03c88c9516
1 changed files with 15 additions and 1 deletions

View File

@ -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 { export class HitsTagAttr extends MoveAttr {
public tagType: BattlerTagType; public tagType: BattlerTagType;
public doubleDamage: boolean; public doubleDamage: boolean;
@ -4517,7 +4532,6 @@ export function initMoves() {
new SelfStatusMove(Moves.STOCKPILE, Type.NORMAL, -1, 20, -1, 0, 3) new SelfStatusMove(Moves.STOCKPILE, Type.NORMAL, -1, 20, -1, 0, 3)
.attr(AddBattlerTagAttr, BattlerTagType.STOCKPILE, true, false, 0, 10) .attr(AddBattlerTagAttr, BattlerTagType.STOCKPILE, true, false, 0, 10)
.attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], 1, true) .attr(StatChangeAttr, [ BattleStat.DEF, BattleStat.SPDEF ], 1, true)
.target(MoveTarget.USER)
.partial(), .partial(),
new AttackMove(Moves.SPIT_UP, Type.NORMAL, MoveCategory.SPECIAL, -1, 100, 10, -1, 0, 3) new AttackMove(Moves.SPIT_UP, Type.NORMAL, MoveCategory.SPECIAL, -1, 100, 10, -1, 0, 3)
.unimplemented(), .unimplemented(),