From afa6c061b645d628c7503c173b515fc429b443f5 Mon Sep 17 00:00:00 2001 From: Eevee Date: Fri, 27 Mar 2009 19:49:20 -0400 Subject: [PATCH] Added a function for the EXP formula. --- pokedex/formulae.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pokedex/formulae.py b/pokedex/formulae.py index 2059db7..805812d 100644 --- a/pokedex/formulae.py +++ b/pokedex/formulae.py @@ -19,3 +19,10 @@ def calculated_hp(base_hp, level, iv, effort): return 1 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