changeset 209:005ea47e11e0

Create enemy with negative life as it should be.
author Emmanuel Gil Peyrot <linkmauve@linkmauve.fr>
date Tue, 08 Nov 2011 23:01:18 -0800
parents d07506a2e16e
children f5be441d2c42
files pytouhou/game/enemy.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/pytouhou/game/enemy.py
+++ b/pytouhou/game/enemy.py
@@ -36,7 +36,7 @@ class Enemy(object):
         self.frame = 0
 
         self.x, self.y = pos
-        self.life = life
+        self.life = 1 if life < 0 else life
         self.max_life = life
         self.touchable = True
         self.damageable = True