From ec8c40066e53f4babbf85ee0b1ff066218c154cf Mon Sep 17 00:00:00 2001 From: DustinLin Date: Fri, 6 Sep 2024 09:07:33 -0700 Subject: [PATCH] refactor edits --- src/data/move.ts | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/data/move.ts b/src/data/move.ts index 5301f377cfb..1294a135bc4 100644 --- a/src/data/move.ts +++ b/src/data/move.ts @@ -5126,14 +5126,10 @@ export class ForceSwitchOutAttr extends MoveEffectAttr { * Attr used by parting shot, it is a combo of ForceSwitchOut and StatChange with a special getCondition() */ export class PartingShotAttr extends ForceSwitchOutAttr { - private statChange: StatStageChangeAttr; - private canLowerStats: boolean; + private statChange = new StatStageChangeAttr([ Stat.ATK, Stat.SPATK ], -1, false, null, true, true, MoveEffectTrigger.PRE_APPLY); + private canLowerStats = true; - constructor(user?: boolean, batonPass?: boolean) { - super(user, batonPass); - this.statChange = new StatStageChangeAttr([ Stat.ATK, Stat.SPATK ], -1, false, null, true, true, MoveEffectTrigger.PRE_APPLY); - this.canLowerStats = true; - } + // using inherited constructor apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise { // apply stat change, conditionally apply switch-out