all repos — Legends-RPG @ 11e8324a55470a96a1cd80d3db6ef9c2d1579393

A fantasy mini-RPG built with Python and Pygame.

Fixed weird bug, I think.
Justin Armstrong justinmeister@gmail.com
Thu, 19 Jun 2014 23:04:24 -0700
commit

11e8324a55470a96a1cd80d3db6ef9c2d1579393

parent

b6baac4c55db32646ed9bacdd9e2c5ce653e119c

2 files changed, 7 insertions(+), 4 deletions(-)

jump to
M .gitignore.gitignore

@@ -1,5 +1,6 @@

*.py[cod] *.idea +*.swn *.swp *.swo
M data/states/battle.pydata/states/battle.py

@@ -232,11 +232,13 @@ self.notify(c.CLICK2)

if self.arrow.index == (len(self.arrow.pos_list) - 1): self.enter_select_action_state() elif self.info_box.item_text_list[self.arrow.index][:14] == 'Healing Potion': - self.player_actions.append(c.DRINK_HEALING_POTION) - self.action_selected = True + if 'Healing Potion' in self.game_data['player inventory']: + self.player_actions.append(c.DRINK_HEALING_POTION) + self.action_selected = True elif self.info_box.item_text_list[self.arrow.index][:5] == 'Ether': - self.player_actions.append(c.DRINK_ETHER_POTION) - self.action_selected = True + if 'Ether Potion' in self.game_data['player inventory']: + self.player_actions.append(c.DRINK_ETHER_POTION) + self.action_selected = True elif self.state == c.SELECT_MAGIC: self.notify(c.CLICK2) if self.arrow.index == (len(self.arrow.pos_list) - 1):