diff pytouhou/vm/eclrunner.py @ 358:488c094ed51d

Make bosses clean their mess when timeouting
author Thibaut Girka <thib@sitedethib.com>
date Sun, 08 Jul 2012 01:23:47 +0200
parents b150ed7188a2
children 130d258217f3
line wrap: on
line diff
--- a/pytouhou/vm/eclrunner.py
+++ b/pytouhou/vm/eclrunner.py
@@ -761,15 +761,7 @@ class ECLRunner(object):
 
     @instruction(96)
     def kill_enemies(self):
-        for enemy in self._game.enemies:
-            if enemy.boss:
-                pass # Bosses are immune to 96
-            elif enemy.touchable:
-                enemy.life = 0
-            elif enemy.death_callback > 0:
-                #TODO: check
-                enemy.process.switch_to_sub(enemy.death_callback)
-                enemy.death_callback = -1
+        self.game.kill_enemies()
 
 
     @instruction(97)