Fix max elixir logic not working properly

pull/14/head
Flashfyre 2024-01-26 18:36:23 -05:00
parent c5eb86b0b1
commit 9a00090617
1 changed files with 2 additions and 2 deletions

View File

@ -900,7 +900,7 @@ export class PokemonPpRestoreModifier extends ConsumablePokemonMoveModifier {
apply(args: any[]): boolean {
const pokemon = args[0] as Pokemon;
const move = pokemon.getMoveset()[this.moveIndex];
move.ppUsed = this.restorePoints >= -1 ? Math.max(move.ppUsed - this.restorePoints, 0) : 0;
move.ppUsed = this.restorePoints > -1 ? Math.max(move.ppUsed - this.restorePoints, 0) : 0;
return true;
}
@ -918,7 +918,7 @@ export class PokemonAllMovePpRestoreModifier extends ConsumablePokemonModifier {
apply(args: any[]): boolean {
const pokemon = args[0] as Pokemon;
for (let move of pokemon.getMoveset())
move.ppUsed = this.restorePoints >= -1 ? Math.max(move.ppUsed - this.restorePoints, 0) : 0;
move.ppUsed = this.restorePoints > -1 ? Math.max(move.ppUsed - this.restorePoints, 0) : 0;
return true;
}