Mercurial > touhou
diff pytouhou/vm/eclrunner.py @ 169:c4b4f7c068f2
Fix Cirno’s last spellcard and implement something for Patchy in extra stage.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Tue, 18 Oct 2011 16:25:10 -0700 |
parents | b96d835c0807 |
children | 2f3665a77f11 |
line wrap: on
line diff
--- a/pytouhou/vm/eclrunner.py +++ b/pytouhou/vm/eclrunner.py @@ -857,10 +857,29 @@ class ECLRunner(object): bullet.angle = self._game.prng.rand_double() * pi #TODO bullet.delta = (cos(bullet.angle) * bullet.speed, sin(bullet.angle) * bullet.speed) elif function == 1: # Cirno + offset = self._enemy.bullet_launch_offset self._enemy.bullet_launch_offset = ( self._game.prng.rand_uint16() % arg - arg / 2, self._game.prng.rand_uint16() % arg - arg / 2) self._enemy.fire() + self._enemy.bullet_launch_offset = offset + elif function == 13: + if self._enemy.bullet_attributes is None: + return + + offset = self._enemy.bullet_launch_offset + pos = self._enemy.x, self._enemy.y + attributes = self._enemy.bullet_attributes + + self._enemy.x, self._enemy.y = (0, 0) + self._enemy.bullet_launch_offset = (192, 224) + type_, anim, sprite_idx_offset, bullets_per_shot, number_of_shots, speed, speed2, launch_angle, angle, flags = attributes + self._enemy.bullet_attributes = (69, anim, sprite_idx_offset, arg, number_of_shots, speed, speed2, launch_angle, angle, flags) + self._enemy.fire() + + self._enemy.bullet_attributes = attributes + self._enemy.x, self._enemy.y = pos + self._enemy.bullet_launch_offset = offset else: logger.warn("Unimplemented special function %d!", function)