Mercurial > touhou
comparison pytouhou/vm/eclrunner.py @ 389:eef492100f4c
Add "explosion", instruction 118.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Sun, 21 Oct 2012 23:02:41 +0200 |
parents | 69ec72b990a4 |
children | c9433188ffdb |
comparison
equal
deleted
inserted
replaced
388:ac2891afb0bb | 389:eef492100f4c |
---|---|
900 """Defines whether the enemy is “touchable”. | 900 """Defines whether the enemy is “touchable”. |
901 Bullets only collide with an enemy if it is “touchable”. | 901 Bullets only collide with an enemy if it is “touchable”. |
902 Likewise, ReimuA's homing attacks only target “touchable” enemies. | 902 Likewise, ReimuA's homing attacks only target “touchable” enemies. |
903 """ | 903 """ |
904 self._enemy.touchable = bool(value) | 904 self._enemy.touchable = bool(value) |
905 | |
906 | |
907 @instruction(118) | |
908 def drop_particles(self, anim, number, a, b, c, d): | |
909 #TODO: find the utility of the other values. | |
910 | |
911 if number == 0 or number > 640: #TODO: remove that hardcoded 640, and verify it. | |
912 number = 640 | |
913 | |
914 if anim == -1: | |
915 return | |
916 if 0 <= anim <= 2: | |
917 self._game.new_effect((self._enemy.x, self._enemy.y), anim + 3, number=number) | |
918 elif anim == 3: | |
919 self._game.new_particle((self._enemy.x, self._enemy.y), 6, 256, number=number) #TODO: make it go back a bit at the end. | |
920 elif 4 <= anim <= 15: | |
921 self._game.new_particle((self._enemy.x, self._enemy.y), anim + 5, 192, number=number) | |
922 elif anim == 16: | |
923 self._game.new_effect((self._enemy.x, self._enemy.y), 0, self._game.spellcard_effect_anm_wrapper, number=number) | |
924 elif anim == 17: | |
925 self._game.new_particle((self._enemy.x, self._enemy.y), anim - 10, 640, number=number, reverse=True, duration=60) | |
926 elif anim == 18: | |
927 self._game.new_particle((self._enemy.x, self._enemy.y), anim - 10, 640, number=number, reverse=True, duration=240) | |
928 elif anim == 19: | |
929 self._game.new_effect((self._enemy.x, self._enemy.y), anim - 10, number=number) | |
930 else: | |
931 raise Exception #TODO | |
905 | 932 |
906 | 933 |
907 @instruction(119) | 934 @instruction(119) |
908 def drop_some_bonus(self, number): | 935 def drop_some_bonus(self, number): |
909 if self._enemy.select_player().state.power < 128: | 936 if self._enemy.select_player().state.power < 128: |