Fix being able to buy Sacred Ash without fainted party members

This commit is contained in:
Flashfyre committed 2024-04-16 12:04:52 -04:00
1 parent 4b77ba8c39
commit 257e222b83
3 files changed
+29 -14

No files matched your search

+3 -1
View File
@@ -1001,9 +1001,11 @@ export class PokemonHpRestoreModifier extends ConsumablePokemonModifier {
if (this.fainted || this.healStatus)
pokemon.resetStatus();
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;
return false;
}
}