Mercurial > touhou
comparison pytouhou/vm/eclrunner.py @ 249:2ef8f4e181e3
Change ECL special function 0 in order to match the game more closely.
author | Thibaut Girka <thib@sitedethib.com> |
---|---|
date | Sat, 21 Jan 2012 21:14:24 +0100 |
parents | 2b7f69ad9ccd |
children | cd4800154c9b |
comparison
equal
deleted
inserted
replaced
248:77b83064b57e | 249:2ef8f4e181e3 |
---|---|
888 | 888 |
889 @instruction(121) | 889 @instruction(121) |
890 def call_special_function(self, function, arg): | 890 def call_special_function(self, function, arg): |
891 if function == 0: # Cirno | 891 if function == 0: # Cirno |
892 if arg == 0: | 892 if arg == 0: |
893 self._game.new_effect((self._enemy.x, self._enemy.y), 17) | |
893 for bullet in self._game.bullets: | 894 for bullet in self._game.bullets: |
894 bullet.speed = bullet.angle = 0. | 895 bullet.speed = bullet.angle = 0. |
895 bullet.delta = (0., 0.) | 896 bullet.delta = (0., 0.) |
896 bullet.set_anim(sprite_idx_offset=15) #TODO: check | 897 bullet.set_anim(sprite_idx_offset=15) #TODO: check |
897 else: | 898 else: |
899 self._game.new_effect((self._enemy.x, self._enemy.y), 17) | |
898 for bullet in self._game.bullets: | 900 for bullet in self._game.bullets: |
899 bullet.speed = 2.0 #TODO | 901 bullet.speed = 0.0 #TODO |
900 bullet.angle = self._game.prng.rand_double() * pi #TODO | 902 bullet.flags = 32 #TODO |
903 bullet.attributes[4:5] = [0.006, 0.] #TODO | |
904 bullet.update = bullet.update_full #TODO | |
905 bullet.angle = pi + self._game.prng.rand_double() * 2. * pi | |
901 bullet.delta = (cos(bullet.angle) * bullet.speed, sin(bullet.angle) * bullet.speed) | 906 bullet.delta = (cos(bullet.angle) * bullet.speed, sin(bullet.angle) * bullet.speed) |
902 elif function == 1: # Cirno | 907 elif function == 1: # Cirno |
903 offset = (self._game.prng.rand_uint16() % arg - arg / 2, | 908 offset = (self._game.prng.rand_uint16() % arg - arg / 2, |
904 self._game.prng.rand_uint16() % arg - arg / 2) | 909 self._game.prng.rand_uint16() % arg - arg / 2) |
905 self._enemy.fire(offset=offset) | 910 self._enemy.fire(offset=offset) |