Mercurial > touhou
comparison pytouhou/vm/eclrunner.py @ 545:bcff39c920ab
Set boss mode directly from the enemy.
author | Emmanuel Gil Peyrot <linkmauve@linkmauve.fr> |
---|---|
date | Thu, 15 May 2014 20:14:54 +0200 |
parents | 3da7395f39e3 |
children | a0fa01cd9f70 |
comparison
equal
deleted
inserted
replaced
544:b895ed2de71f | 545:bcff39c920ab |
---|---|
101 self._game.msg_wait = True | 101 self._game.msg_wait = True |
102 | 102 |
103 | 103 |
104 @instruction(10) | 104 @instruction(10) |
105 def resume_ecl(self, sub, instr_type, unk1, unk2): | 105 def resume_ecl(self, sub, instr_type, unk1, unk2): |
106 boss = self._game.boss._enemy | 106 boss = self._game.boss |
107 self._game.msg_wait = False | 107 self._game.msg_wait = False |
108 if not boss.boss_callback: | 108 if not boss.boss_callback: |
109 raise Exception #TODO | 109 raise Exception #TODO |
110 boss.boss_callback.fire() | 110 boss.boss_callback.fire() |
111 | 111 |
799 def set_boss_mode(self, value): | 799 def set_boss_mode(self, value): |
800 #TODO: if there are multiple boss, spawned by a 95, | 800 #TODO: if there are multiple boss, spawned by a 95, |
801 # only the last one has her life displayed, | 801 # only the last one has her life displayed, |
802 # but standard enemies are blocked only until any of them is killed. | 802 # but standard enemies are blocked only until any of them is killed. |
803 if value == 0: | 803 if value == 0: |
804 self._enemy.boss = True | 804 self._enemy.set_boss(True) |
805 self._game.boss = self | |
806 self._game.interface.set_boss_life() | |
807 elif value == -1: | 805 elif value == -1: |
808 self._enemy.boss = False | 806 self._enemy.set_boss(False) |
809 self._game.boss = None | |
810 else: | 807 else: |
811 raise Exception #TODO | 808 raise Exception #TODO |
812 | 809 |
813 | 810 |
814 @instruction(103) | 811 @instruction(103) |