Make status damage skip endure (#597)

* Make status damage skip endure

* Add a comment to justify arguments to damage method
This commit is contained in:
ElMoustacho 2024-05-19 17:10:57 +02:00 committed by GitHub
parent 608a968db4
commit 932e6e39f9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -3045,7 +3045,8 @@ export class PostTurnStatusEffectPhase extends PokemonPhase {
break; break;
} }
if (damage) { if (damage) {
this.scene.damageNumberHandler.add(this.getPokemon(), pokemon.damage(damage)); // Set preventEndure flag to avoid pokemon surviving thanks to focus band, sturdy, endure ...
this.scene.damageNumberHandler.add(this.getPokemon(), pokemon.damage(damage, false, true));
pokemon.updateInfo(); pokemon.updateInfo();
} }
new CommonBattleAnim(CommonAnim.POISON + (pokemon.status.effect - 1), pokemon).play(this.scene, () => this.end()); new CommonBattleAnim(CommonAnim.POISON + (pokemon.status.effect - 1), pokemon).play(this.scene, () => this.end());