comparison pytouhou/game/enemy.py @ 270:7a9135b88853

Partially fix some of Flandre's spellcards.
author Thibaut Girka <thib@sitedethib.com>
date Tue, 24 Jan 2012 00:19:23 +0100
parents dd621ad72beb
children f037bca24f2d
comparison
equal deleted inserted replaced
269:729382f57ad0 270:7a9135b88853
34 self._die_score = die_score #TODO: use it 34 self._die_score = die_score #TODO: use it
35 self._was_visible = False 35 self._was_visible = False
36 36
37 self.frame = 0 37 self.frame = 0
38 38
39 self.x, self.y = pos 39 self.x, self.y, self.z = pos
40 self.life = 1 if life < 0 else life 40 self.life = 1 if life < 0 else life
41 self.max_life = life 41 self.max_life = life
42 self.touchable = True 42 self.touchable = True
43 self.collidable = True 43 self.collidable = True
44 self.damageable = True 44 self.damageable = True
120 120
121 if not launch_pos: 121 if not launch_pos:
122 ox, oy = offset or self.bullet_launch_offset 122 ox, oy = offset or self.bullet_launch_offset
123 launch_pos = self.x + ox, self.y + oy 123 launch_pos = self.x + ox, self.y + oy
124 124
125 if speed < 0.3: 125 if speed < 0.3 and speed != 0.0:
126 speed = 0.3 126 speed = 0.3
127 if speed2 < 0.3: 127 if speed2 < 0.3:
128 speed2 = 0.3 128 speed2 = 0.3
129 129
130 self.bullet_launch_timer = 0 130 self.bullet_launch_timer = 0