Implement stat resetting moves
Haze should probably have a custom message so it doesn't list the targets name
This commit is contained in:
parent
453c5644aa
commit
6b46cd533a
|
@ -1506,6 +1506,20 @@ export class InvertStatsAttr extends MoveEffectAttr {
|
|||
}
|
||||
}
|
||||
|
||||
export class ResetStatsAttr extends MoveEffectAttr {
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): boolean {
|
||||
if (!super.apply(user, target, move, args))
|
||||
return false;
|
||||
|
||||
for (let s = 0; s < target.summonData.battleStats.length; s++)
|
||||
target.summonData.battleStats[s] = 0;
|
||||
|
||||
target.scene.queueMessage(getPokemonMessage(target, `'s stat changes\nwere eliminated!`));
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
export class HpSplitAttr extends MoveEffectAttr {
|
||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise<boolean> {
|
||||
return new Promise(resolve => {
|
||||
|
@ -3818,7 +3832,7 @@ export function initMoves() {
|
|||
.target(MoveTarget.USER_SIDE),
|
||||
new StatusMove(Moves.HAZE, Type.ICE, -1, 30, -1, 0, 1)
|
||||
.target(MoveTarget.BOTH_SIDES)
|
||||
.unimplemented(),
|
||||
.attr(ResetStatsAttr),
|
||||
new StatusMove(Moves.REFLECT, Type.PSYCHIC, -1, 20, -1, 0, 1)
|
||||
.attr(AddArenaTagAttr, ArenaTagType.REFLECT, 5, true)
|
||||
.target(MoveTarget.USER_SIDE),
|
||||
|
@ -4868,7 +4882,7 @@ export function initMoves() {
|
|||
new AttackMove(Moves.CHIP_AWAY, Type.NORMAL, MoveCategory.PHYSICAL, 70, 100, 20, -1, 0, 5)
|
||||
.attr(IgnoreOpponentStatChangesAttr),
|
||||
new AttackMove(Moves.CLEAR_SMOG, Type.POISON, MoveCategory.SPECIAL, 50, -1, 15, -1, 0, 5)
|
||||
.partial(),
|
||||
.attr(ResetStatsAttr),
|
||||
new AttackMove(Moves.STORED_POWER, Type.PSYCHIC, MoveCategory.SPECIAL, 20, 100, 10, -1, 0, 5)
|
||||
.attr(StatChangeCountPowerAttr),
|
||||
new StatusMove(Moves.QUICK_GUARD, Type.FIGHTING, -1, 15, -1, 3, 5)
|
||||
|
@ -5487,7 +5501,7 @@ export function initMoves() {
|
|||
new AttackMove(Moves.SAPPY_SEED, Type.GRASS, MoveCategory.PHYSICAL, 100, 90, 10, 100, 0, 7)
|
||||
.attr(AddBattlerTagAttr, BattlerTagType.SEEDED),
|
||||
new AttackMove(Moves.FREEZY_FROST, Type.ICE, MoveCategory.SPECIAL, 100, 90, 10, -1, 0, 7)
|
||||
.partial(),
|
||||
.attr(ResetStatsAttr),
|
||||
new AttackMove(Moves.SPARKLY_SWIRL, Type.FAIRY, MoveCategory.SPECIAL, 120, 85, 5, -1, 0, 7)
|
||||
.partial(),
|
||||
new AttackMove(Moves.VEEVEE_VOLLEY, Type.NORMAL, MoveCategory.PHYSICAL, -1, -1, 20, -1, 0, 7)
|
||||
|
|
Loading…
Reference in New Issue