mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-04-22 09:34:41 +01:00
Fix revive not working on Pokemon with 1 max HP
This commit is contained in:
parent
e4c79084f2
commit
1b47741ca5
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user