comparison pytouhou/vm/eclrunner.py @ 250:cd4800154c9b

Change ECL special function 0 in order to match the game more closely (again)
author Thibaut Girka <thib@sitedethib.com>
date Sun, 22 Jan 2012 11:39:29 +0100
parents 2ef8f4e181e3
children 4b549894ef6b
comparison
equal deleted inserted replaced
249:2ef8f4e181e3 250:cd4800154c9b
896 bullet.delta = (0., 0.) 896 bullet.delta = (0., 0.)
897 bullet.set_anim(sprite_idx_offset=15) #TODO: check 897 bullet.set_anim(sprite_idx_offset=15) #TODO: check
898 else: 898 else:
899 self._game.new_effect((self._enemy.x, self._enemy.y), 17) 899 self._game.new_effect((self._enemy.x, self._enemy.y), 17)
900 for bullet in self._game.bullets: 900 for bullet in self._game.bullets:
901 bullet.speed = 0.0 #TODO 901 bullet.flags = 16 #TODO
902 bullet.flags = 32 #TODO 902 angle = pi + self._game.prng.rand_double() * 2. * pi
903 bullet.attributes[4:5] = [0.006, 0.] #TODO 903 bullet.attributes[4:6] = [0.01, angle] #TODO
904 bullet.attributes[0] = -1 #TODO
904 bullet.update = bullet.update_full #TODO 905 bullet.update = bullet.update_full #TODO
905 bullet.angle = pi + self._game.prng.rand_double() * 2. * pi 906 bullet.set_anim(sprite_idx_offset=15) #TODO: check
906 bullet.delta = (cos(bullet.angle) * bullet.speed, sin(bullet.angle) * bullet.speed)
907 elif function == 1: # Cirno 907 elif function == 1: # Cirno
908 offset = (self._game.prng.rand_uint16() % arg - arg / 2, 908 offset = (self._game.prng.rand_uint16() % arg - arg / 2,
909 self._game.prng.rand_uint16() % arg - arg / 2) 909 self._game.prng.rand_uint16() % arg - arg / 2)
910 self._enemy.fire(offset=offset) 910 self._enemy.fire(offset=offset)
911 elif function == 13: 911 elif function == 13: