Mercurial > touhou
comparison 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 |
comparison
equal
deleted
inserted
replaced
168:b96d835c0807 | 169:c4b4f7c068f2 |
---|---|
855 for bullet in self._game.bullets: | 855 for bullet in self._game.bullets: |
856 bullet.speed = 2.0 #TODO | 856 bullet.speed = 2.0 #TODO |
857 bullet.angle = self._game.prng.rand_double() * pi #TODO | 857 bullet.angle = self._game.prng.rand_double() * pi #TODO |
858 bullet.delta = (cos(bullet.angle) * bullet.speed, sin(bullet.angle) * bullet.speed) | 858 bullet.delta = (cos(bullet.angle) * bullet.speed, sin(bullet.angle) * bullet.speed) |
859 elif function == 1: # Cirno | 859 elif function == 1: # Cirno |
860 offset = self._enemy.bullet_launch_offset | |
860 self._enemy.bullet_launch_offset = ( | 861 self._enemy.bullet_launch_offset = ( |
861 self._game.prng.rand_uint16() % arg - arg / 2, | 862 self._game.prng.rand_uint16() % arg - arg / 2, |
862 self._game.prng.rand_uint16() % arg - arg / 2) | 863 self._game.prng.rand_uint16() % arg - arg / 2) |
863 self._enemy.fire() | 864 self._enemy.fire() |
865 self._enemy.bullet_launch_offset = offset | |
866 elif function == 13: | |
867 if self._enemy.bullet_attributes is None: | |
868 return | |
869 | |
870 offset = self._enemy.bullet_launch_offset | |
871 pos = self._enemy.x, self._enemy.y | |
872 attributes = self._enemy.bullet_attributes | |
873 | |
874 self._enemy.x, self._enemy.y = (0, 0) | |
875 self._enemy.bullet_launch_offset = (192, 224) | |
876 type_, anim, sprite_idx_offset, bullets_per_shot, number_of_shots, speed, speed2, launch_angle, angle, flags = attributes | |
877 self._enemy.bullet_attributes = (69, anim, sprite_idx_offset, arg, number_of_shots, speed, speed2, launch_angle, angle, flags) | |
878 self._enemy.fire() | |
879 | |
880 self._enemy.bullet_attributes = attributes | |
881 self._enemy.x, self._enemy.y = pos | |
882 self._enemy.bullet_launch_offset = offset | |
864 else: | 883 else: |
865 logger.warn("Unimplemented special function %d!", function) | 884 logger.warn("Unimplemented special function %d!", function) |
866 | 885 |
867 | 886 |
868 @instruction(123) | 887 @instruction(123) |