comparison pytouhou/games/eosd.py @ 349:96e30d6268dd

Quick and dirty fixes
author Thibaut Girka <thib@sitedethib.com>
date Thu, 05 Jul 2012 07:33:47 +0200
parents 685b782a4da4
children b3049fb5c448
comparison
equal deleted inserted replaced
348:685b782a4da4 349:96e30d6268dd
144 for item in self.boss_items: 144 for item in self.boss_items:
145 item.sprite.allow_dest_offset = True #XXX 145 item.sprite.allow_dest_offset = True #XXX
146 146
147 147
148 def set_boss_life(self): 148 def set_boss_life(self):
149 self.boss_items[1].maximum = self.game.boss._enemy.life 149 self.boss_items[1].maximum = self.game.boss._enemy.life or 1
150 self.boss_items[2].maximum = self.game.boss._enemy.life 150 self.boss_items[2].maximum = self.game.boss._enemy.life or 1
151 151
152 152
153 def set_spell_life(self): 153 def set_spell_life(self):
154 self.boss_items[2].set_value(self.game.boss._enemy.low_life_trigger if self.game.boss else 0) 154 self.boss_items[2].set_value(self.game.boss._enemy.low_life_trigger if self.game.boss else 0)
155 155
167 self.labels['graze'].set_text('%d' % player_state.graze) 167 self.labels['graze'].set_text('%d' % player_state.graze)
168 self.labels['points'].set_text('%d' % player_state.points) 168 self.labels['points'].set_text('%d' % player_state.points)
169 self.labels['player'].set_value(player_state.lives) 169 self.labels['player'].set_value(player_state.lives)
170 self.labels['bombs'].set_value(player_state.bombs) 170 self.labels['bombs'].set_value(player_state.bombs)
171 171
172 if self.game.boss: 172 if self.game.boss and self.game.boss._enemy.remaining_lives != -1:
173 boss = self.game.boss._enemy 173 boss = self.game.boss._enemy
174 174
175 life_gauge = self.boss_items[1] 175 life_gauge = self.boss_items[1]
176 life_gauge.set_value(boss.life) 176 life_gauge.set_value(boss.life)
177 177