From 8e606139fa57d91f01f10722b00d3c604dc8437d Mon Sep 17 00:00:00 2001 From: Madi Simpson Date: Sun, 5 May 2024 08:50:46 -0700 Subject: [PATCH] moves: (mostly) fix parting shot stack bug (#495) --- src/data/move.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index 17d1a461fce..e3d191149c8 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -1463,8 +1463,8 @@ export class StatChangeAttr extends MoveEffectAttr { private condition: MoveConditionFunc; private showMessage: boolean; - constructor(stats: BattleStat | BattleStat[], levels: integer, selfTarget?: boolean, condition?: MoveConditionFunc, showMessage: boolean = true, firstHitOnly: boolean = false) { - super(selfTarget, MoveEffectTrigger.HIT, firstHitOnly); + constructor(stats: BattleStat | BattleStat[], levels: integer, selfTarget?: boolean, condition?: MoveConditionFunc, showMessage: boolean = true, firstHitOnly: boolean = false, moveEffectTrigger: MoveEffectTrigger = MoveEffectTrigger.HIT) { + super(selfTarget, moveEffectTrigger, firstHitOnly); this.stats = typeof(stats) === 'number' ? [ stats as BattleStat ] : stats as BattleStat[]; @@ -5497,7 +5497,7 @@ export function initMoves() { .soundBased() .target(MoveTarget.ALL_NEAR_ENEMIES), new StatusMove(Moves.PARTING_SHOT, Type.DARK, 100, 20, 100, 0, 6) - .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], -1) + .attr(StatChangeAttr, [ BattleStat.ATK, BattleStat.SPATK ], -1, false, null, true, true, MoveEffectTrigger.PRE_APPLY) .attr(ForceSwitchOutAttr, true, false) .soundBased(), new StatusMove(Moves.TOPSY_TURVY, Type.DARK, -1, 20, -1, 0, 6)