Fix max elixir logic not working properly
This commit is contained in:
1 parent
c5eb86b0b1
commit
9a00090617
1 file changed
+2
-2
@@ -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;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user