refactor edits
This commit is contained in:
parent
34f91bb3cc
commit
ec8c40066e
|
@ -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()
|
* Attr used by parting shot, it is a combo of ForceSwitchOut and StatChange with a special getCondition()
|
||||||
*/
|
*/
|
||||||
export class PartingShotAttr extends ForceSwitchOutAttr {
|
export class PartingShotAttr extends ForceSwitchOutAttr {
|
||||||
private statChange: StatStageChangeAttr;
|
private statChange = new StatStageChangeAttr([ Stat.ATK, Stat.SPATK ], -1, false, null, true, true, MoveEffectTrigger.PRE_APPLY);
|
||||||
private canLowerStats: boolean;
|
private canLowerStats = true;
|
||||||
|
|
||||||
constructor(user?: boolean, batonPass?: boolean) {
|
// using inherited constructor
|
||||||
super(user, batonPass);
|
|
||||||
this.statChange = new StatStageChangeAttr([ Stat.ATK, Stat.SPATK ], -1, false, null, true, true, MoveEffectTrigger.PRE_APPLY);
|
|
||||||
this.canLowerStats = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise<boolean> {
|
apply(user: Pokemon, target: Pokemon, move: Move, args: any[]): Promise<boolean> {
|
||||||
// apply stat change, conditionally apply switch-out
|
// apply stat change, conditionally apply switch-out
|
||||||
|
|
Loading…
Reference in New Issue