Fix revive not working on Pokemon with 1 max HP

pull/2/head
Flashfyre 2023-10-26 22:01:25 -04:00
parent e4c79084f2
commit 1b47741ca5
1 changed files with 1 additions and 1 deletions

View File

@ -753,7 +753,7 @@ export class PokemonHpRestoreModifier extends ConsumablePokemonModifier {
restorePoints = Math.floor(restorePoints * (args[1] as number)); restorePoints = Math.floor(restorePoints * (args[1] as number));
else else
pokemon.resetStatus(); pokemon.resetStatus();
pokemon.hp = Math.min(pokemon.hp + Math.ceil(Math.max(Math.floor((this.restorePercent * 0.01) * pokemon.getMaxHp()), restorePoints)), pokemon.getMaxHp()); pokemon.hp = Math.min(pokemon.hp + Math.max(Math.ceil(Math.max(Math.floor((this.restorePercent * 0.01) * pokemon.getMaxHp()), restorePoints)), 1), pokemon.getMaxHp());
} }
return true; return true;