Closed quadraticmuffin closed 1 year ago
Thanks, that's a good catch! Fixed in 5c09ddeb96f150b64d2955279f6fdf9479cbaa58.
return self.entry["pp"] * 8 / 5
Some moves in later gens have 1 PP, which is not divisible by 5. You might want to add a floor function, or use integer division:
return self.entry["pp"] * 8 // 5
Currently the value of
Move.max_pp
is being populated fromdata/genx_moves.json
, but this file uses default PP values. This is a problem because Pokemon Showdown does not use the default PP; rather, it uses the highest possible PP. For example, the move Agility has 30 (max 48) PP;poke_env
thinks it has 30, but Pokemon Showdown uses 48.This leads to
Move.current_pp
sometimes returning a negative value, asMove.use()
does not check whether thecurrent_pp
is 0 before subtracting from it.