changeset 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
files pytouhou/games/eosd.py
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/pytouhou/games/eosd.py
+++ b/pytouhou/games/eosd.py
@@ -146,8 +146,8 @@ class EoSDInterface(object):
 
 
     def set_boss_life(self):
-        self.boss_items[1].maximum = self.game.boss._enemy.life
-        self.boss_items[2].maximum = self.game.boss._enemy.life
+        self.boss_items[1].maximum = self.game.boss._enemy.life or 1
+        self.boss_items[2].maximum = self.game.boss._enemy.life or 1
 
 
     def set_spell_life(self):
@@ -169,7 +169,7 @@ class EoSDInterface(object):
         self.labels['player'].set_value(player_state.lives)
         self.labels['bombs'].set_value(player_state.bombs)
 
-        if self.game.boss:
+        if self.game.boss and self.game.boss._enemy.remaining_lives != -1:
             boss = self.game.boss._enemy
 
             life_gauge = self.boss_items[1]