refactor edits

This commit is contained in:
DustinLin 2024-09-06 09:07:33 -07:00
parent 34f91bb3cc
commit ec8c40066e
1 changed files with 3 additions and 7 deletions

View File

@ -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<boolean> {
// apply stat change, conditionally apply switch-out