Remove potential desync from PokemonHealPhase (#4497)

This commit is contained in:
innerthunder 2024-09-28 13:40:42 -07:00 committed by GitHub
parent 771b0edcb0
commit a69da4bc06
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -46,8 +46,7 @@ export class PokemonHealPhase extends CommonAnimPhase {
const pokemon = this.getPokemon(); const pokemon = this.getPokemon();
if (!pokemon.isOnField() || (!this.revive && !pokemon.isActive())) { if (!pokemon.isOnField() || (!this.revive && !pokemon.isActive())) {
super.end(); return super.end();
return;
} }
const hasMessage = !!this.message; const hasMessage = !!this.message;
@ -58,7 +57,7 @@ export class PokemonHealPhase extends CommonAnimPhase {
if (healBlock && this.hpHealed > 0) { if (healBlock && this.hpHealed > 0) {
this.scene.queueMessage(healBlock.onActivation(pokemon)); this.scene.queueMessage(healBlock.onActivation(pokemon));
this.message = null; this.message = null;
super.end(); return super.end();
} else if (healOrDamage) { } else if (healOrDamage) {
const hpRestoreMultiplier = new Utils.IntegerHolder(1); const hpRestoreMultiplier = new Utils.IntegerHolder(1);
if (!this.revive) { if (!this.revive) {