Fix reviver seed causing infinite loop and clear status on revive
parent
e0065fca7c
commit
08364d9060
|
@ -683,7 +683,9 @@ export class PokemonInstantReviveModifier extends PokemonHeldItemModifier {
|
||||||
const pokemon = args[0] as Pokemon;
|
const pokemon = args[0] as Pokemon;
|
||||||
|
|
||||||
pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, pokemon.getBattlerIndex(),
|
pokemon.scene.unshiftPhase(new PokemonHealPhase(pokemon.scene, pokemon.getBattlerIndex(),
|
||||||
Math.max(Math.floor(pokemon.getMaxHp() / 2), 1),getPokemonMessage(pokemon, ` was revived\nby its ${this.type.name}!`), false, false, true));
|
Math.max(Math.floor(pokemon.getMaxHp() / 2), 1), getPokemonMessage(pokemon, ` was revived\nby its ${this.type.name}!`), false, false, true));
|
||||||
|
|
||||||
|
pokemon.resetStatus();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -760,9 +760,6 @@ export default abstract class Pokemon extends Phaser.GameObjects.Container {
|
||||||
}
|
}
|
||||||
|
|
||||||
heal(amount: integer): void {
|
heal(amount: integer): void {
|
||||||
if (this.isFainted())
|
|
||||||
return;
|
|
||||||
|
|
||||||
this.hp = Math.min(this.hp + amount, this.getMaxHp());
|
this.hp = Math.min(this.hp + amount, this.getMaxHp());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue