comparison pytouhou/vm/eclrunner.py @ 310:81c5b0b51093

Implement hardcoded function 11.
author Thibaut Girka <thib@sitedethib.com>
date Wed, 14 Mar 2012 17:00:43 +0100
parents 14c9aca8e274
children 8d1768fa4cbb
comparison
equal deleted inserted replaced
309:14c9aca8e274 310:81c5b0b51093
1057 self._enemy.new_laser(85, 1, 1, angle, 0., 0., length, length, 30., 1057 self._enemy.new_laser(85, 1, 1, angle, 0., 0., length, length, 30.,
1058 100, 80, 15, #TODO: check 1058 100, 80, 15, #TODO: check
1059 0, 0, 0, offset=(ox, oy)) 1059 0, 0, 0, offset=(ox, oy))
1060 else: 1060 else:
1061 self._enemy.fire(offset=(ox, oy)) 1061 self._enemy.fire(offset=(ox, oy))
1062
1063 elif function == 8: # Remilia’s magic 1062 elif function == 8: # Remilia’s magic
1064 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]
1065 n = 0 1064 n = 0
1066 for bullet in self._game.bullets: 1065 for bullet in self._game.bullets:
1067 if bullet._bullet_type.anim_index < 5: 1066 if bullet._bullet_type.anim_index < 5:
1069 n += 1 1068 n += 1
1070 bullet_attributes[8] = bullet.angle 1069 bullet_attributes[8] = bullet.angle
1071 self._enemy.fire(launch_pos=(bullet.x, bullet.y), 1070 self._enemy.fire(launch_pos=(bullet.x, bullet.y),
1072 bullet_attributes=bullet_attributes) 1071 bullet_attributes=bullet_attributes)
1073 self._setval(-10004, n) 1072 self._setval(-10004, n)
1073 elif function == 11:
1074 self._game.new_effect((self._enemy.x, self._enemy.y), 17)
1075 self._game.prng.rand_double() #TODO: what is it for?
1076 for bullet in self._game.bullets: #TODO Bullet order is WRONG
1077 if bullet._bullet_type.anim_index < 5 and bullet.speed == 0.:
1078 bullet.flags = 16 #TODO: check
1079 angle = pi + self._game.prng.rand_double() * 2. * pi
1080 bullet.attributes[4:6] = [0.01, angle] #TODO: check
1081 bullet.attributes[0] = -1 #TODO: check
1082 bullet.set_anim(sprite_idx_offset=1) #TODO: check
1074 elif function == 13: 1083 elif function == 13:
1075 if self._enemy.bullet_attributes is None: 1084 if self._enemy.bullet_attributes is None:
1076 return 1085 return
1077 1086
1078 frame = self._getval(-10004) 1087 frame = self._getval(-10004)