Early return when simulated is true

This commit is contained in:
dobin 2025-06-06 14:58:26 +09:00
parent 377f596778
commit 92e45fba81

View File

@ -2129,7 +2129,11 @@ export class PostIntimidateStatStageChangeAbAttr extends AbAttr {
}
override apply(pokemon: Pokemon, passive: boolean, simulated:boolean, cancelled: BooleanHolder, args: any[]): void {
if (!simulated) {
if (simulated) {
cancelled.value = this.overwrites;
return
}
const newStatStageChangePhase = new StatStageChangePhase(pokemon.getBattlerIndex(), false, this.stats, this.stages)
if (globalScene.findPhase(m => m instanceof MovePhase)) {
globalScene.prependToPhase(newStatStageChangePhase, MovePhase)
@ -2138,7 +2142,7 @@ export class PostIntimidateStatStageChangeAbAttr extends AbAttr {
} else {
globalScene.pushPhase(newStatStageChangePhase);
}
}
cancelled.value = this.overwrites;
}
}