comparison pytouhou/vm/eclrunner.py @ 312:8d1768fa4cbb

Fix Remilia's “Red Magic”.
author Thibaut Girka <thib@sitedethib.com>
date Wed, 14 Mar 2012 19:05:23 +0100
parents 81c5b0b51093
children 2ba2462afc70
comparison
equal deleted inserted replaced
311:550ec10cccbc 312:8d1768fa4cbb
1061 self._enemy.fire(offset=(ox, oy)) 1061 self._enemy.fire(offset=(ox, oy))
1062 elif function == 8: # Remilia’s magic 1062 elif function == 8: # Remilia’s magic
1063 bullet_attributes = [70, 1, 1, 1, 1, 0., 0., 0., 0.7, 0] 1063 bullet_attributes = [70, 1, 1, 1, 1, 0., 0., 0., 0.7, 0]
1064 n = 0 1064 n = 0
1065 for bullet in self._game.bullets: 1065 for bullet in self._game.bullets:
1066 if bullet._bullet_type.anim_index < 5: 1066 if bullet._bullet_type.type_id < 5:
1067 continue 1067 continue
1068 n += 1 1068 n += 1
1069 bullet_attributes[8] = bullet.angle 1069 bullet_attributes[8] = bullet.angle
1070 self._enemy.fire(launch_pos=(bullet.x, bullet.y), 1070 self._enemy.fire(launch_pos=(bullet.x, bullet.y),
1071 bullet_attributes=bullet_attributes) 1071 bullet_attributes=bullet_attributes)
1072 self._setval(-10004, n) 1072 self._setval(-10004, n)
1073 elif function == 11: 1073 elif function == 11:
1074 self._game.new_effect((self._enemy.x, self._enemy.y), 17) 1074 self._game.new_effect((self._enemy.x, self._enemy.y), 17)
1075 self._game.prng.rand_double() #TODO: what is it for? 1075 self._game.prng.rand_double() #TODO: what is it for?
1076 for bullet in self._game.bullets: #TODO Bullet order is WRONG 1076 for bullet in self._game.bullets: #TODO Bullet order is WRONG
1077 if bullet._bullet_type.anim_index < 5 and bullet.speed == 0.: 1077 if bullet._bullet_type.type_id < 5 and bullet.speed == 0.:
1078 bullet.flags = 16 #TODO: check 1078 bullet.flags = 16 #TODO: check
1079 angle = pi + self._game.prng.rand_double() * 2. * pi 1079 angle = pi + self._game.prng.rand_double() * 2. * pi
1080 bullet.attributes[4:6] = [0.01, angle] #TODO: check 1080 bullet.attributes[4:6] = [0.01, angle] #TODO: check
1081 bullet.attributes[0] = -1 #TODO: check 1081 bullet.attributes[0] = -1 #TODO: check
1082 bullet.set_anim(sprite_idx_offset=1) #TODO: check 1082 bullet.set_anim(sprite_idx_offset=1) #TODO: check