comparison pytouhou/vm/eclrunner.py @ 287:981d1893d564

Fix Patchouly's Royal Flare.
author Thibaut Girka <thib@sitedethib.com>
date Sun, 12 Feb 2012 18:09:56 +0100
parents 4838e9bab0f9
children f6b8483a990d
comparison
equal deleted inserted replaced
286:4838e9bab0f9 287:981d1893d564
1029 self.variables[1:4] = values[character] 1029 self.variables[1:4] = values[character]
1030 elif function == 13: 1030 elif function == 13:
1031 if self._enemy.bullet_attributes is None: 1031 if self._enemy.bullet_attributes is None:
1032 return 1032 return
1033 1033
1034 if self._enemy.frame % 6: 1034 frame = self._getval(-10004)
1035 self._setval(-10004, frame + 1)
1036
1037 if frame % 6 != 0:
1035 return 1038 return
1036 1039
1037 (type_, anim, sprite_idx_offset, bullets_per_shot, number_of_shots, 1040 (type_, anim, sprite_idx_offset, bullets_per_shot, number_of_shots,
1038 speed, speed2, launch_angle, angle, flags) = self._enemy.bullet_attributes 1041 speed, speed2, launch_angle, angle, flags) = self._enemy.bullet_attributes
1039 for i in range(arg): 1042 for i in range(arg):
1040 _angle = i*2*pi/arg 1043 _angle = i*2*pi/arg + self._getval(-10007)
1041 _angle2 = _angle + self._getval(-10007)
1042 _distance = self._getval(-10008) 1044 _distance = self._getval(-10008)
1043 launch_pos = (192 + cos(_angle2) * _distance, 1045 launch_pos = (192 + cos(_angle) * _distance,
1044 224 + sin(_angle2) * _distance) 1046 224 + sin(_angle) * _distance)
1045 bullet_attributes = (type_, anim, sprite_idx_offset, 1047 bullet_attributes = (type_, anim, sprite_idx_offset,
1046 bullets_per_shot, number_of_shots, 1048 bullets_per_shot, number_of_shots,
1047 speed, speed2, 1049 speed, speed2,
1048 self._getval(-10006) + _angle, angle, flags) 1050 self._getval(-10006) + _angle, angle, flags)
1049 self._enemy.fire(launch_pos=launch_pos, 1051 self._enemy.fire(launch_pos=launch_pos,