Skip to content

Commit

Permalink
Corrected HP for Pokemon
Browse files Browse the repository at this point in the history
If HP is zero, the Pokemon is dead/fainted. Dont set it to Max HP
  • Loading branch information
davidakachaos committed Apr 21, 2017
1 parent e75bcb5 commit bf087b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pokemongo_bot/inventory.py
Original file line number Diff line number Diff line change
Expand Up @@ -981,7 +981,7 @@ def __init__(self, data):
# Maximum health points
self.hp_max = data['stamina_max']
# Current health points
self.hp = data.get('stamina', self.hp_max)
self.hp = data.get('stamina', 0) #self.hp_max)
assert 0 <= self.hp <= self.hp_max

# Individial Values of the current specific pokemon (different for each)
Expand Down

0 comments on commit bf087b3

Please sign in to comment.