projects
/
zzz-pokedex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
631bc77
)
Added a function for the EXP formula.
author
Eevee
<git@veekun.com>
Fri, 27 Mar 2009 23:49:20 +0000
(19:49 -0400)
committer
Eevee
<git@veekun.com>
Fri, 27 Mar 2009 23:49:20 +0000
(19:49 -0400)
pokedex/formulae.py
patch
|
blob
|
history
diff --git
a/pokedex/formulae.py
b/pokedex/formulae.py
index
2059db7
..
805812d
100644
(file)
--- 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
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