Minor refactor of stat menu
Justin Armstrong justinmeister@gmail.com
Tue, 29 Apr 2014 15:27:11 -0700
3 files changed,
18 insertions(+),
9 deletions(-)
M
data/components/person.py
→
data/components/person.py
@@ -377,7 +377,7 @@ def calculate_hit(self):
""" Calculate hit strength based on attack stats. """ - max_strength = 5 + (self.level * 5) + max_strength = self.level * 5 min_strength = max_strength // 2 return random.randint(min_strength, max_strength)@@ -421,6 +421,14 @@ elif self.keys[pg.K_LEFT]:
self.begin_moving('left') elif self.keys[pg.K_RIGHT]: self.begin_moving('right') + + def calculate_hit(self): + """ + Calculate hit strength based on attack stats. + """ + max_strength = 5 + (self.level * 5) + min_strength = max_strength // 2 + return random.randint(min_strength, max_strength)