mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-06-30 13:33:01 +02:00
Early return when simulated is true
This commit is contained in:
parent
377f596778
commit
92e45fba81
@ -2129,7 +2129,11 @@ export class PostIntimidateStatStageChangeAbAttr extends AbAttr {
|
|||||||
}
|
}
|
||||||
|
|
||||||
override apply(pokemon: Pokemon, passive: boolean, simulated:boolean, cancelled: BooleanHolder, args: any[]): void {
|
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)
|
const newStatStageChangePhase = new StatStageChangePhase(pokemon.getBattlerIndex(), false, this.stats, this.stages)
|
||||||
if (globalScene.findPhase(m => m instanceof MovePhase)) {
|
if (globalScene.findPhase(m => m instanceof MovePhase)) {
|
||||||
globalScene.prependToPhase(newStatStageChangePhase, MovePhase)
|
globalScene.prependToPhase(newStatStageChangePhase, MovePhase)
|
||||||
@ -2138,7 +2142,7 @@ export class PostIntimidateStatStageChangeAbAttr extends AbAttr {
|
|||||||
} else {
|
} else {
|
||||||
globalScene.pushPhase(newStatStageChangePhase);
|
globalScene.pushPhase(newStatStageChangePhase);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
cancelled.value = this.overwrites;
|
cancelled.value = this.overwrites;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user