You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the value of Move.max_pp is being populated from data/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, as Move.use() does not check whether the current_pp is 0 before subtracting from it.
The text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: