mirror of
https://github.com/veekun/pokedex.git
synced 2024-08-20 18:16:34 +00:00
Added a function for the EXP formula.
This commit is contained in:
parent
67af605e8d
commit
afa6c061b6
1 changed files with 7 additions and 0 deletions
|
@ -19,3 +19,10 @@ def calculated_hp(base_hp, level, iv, effort):
|
||||||
return 1
|
return 1
|
||||||
|
|
||||||
return (base_hp * 2 + iv + effort // 4) * level // 100 + 10 + level
|
return (base_hp * 2 + iv + effort // 4) * level // 100 + 10 + level
|
||||||
|
|
||||||
|
def earned_exp(base_exp, level):
|
||||||
|
"""Returns the amount of EXP earned when defeating a Pokémon at the given
|
||||||
|
level.
|
||||||
|
"""
|
||||||
|
|
||||||
|
return base_exp * level // 7
|
||||||
|
|
Loading…
Reference in a new issue