comparison pytouhou/vm/eclrunner.py @ 276:754ff6452d7e

Fix spellcard number 0. Spellcard number 0 was evaluated as False in truth checks. Now, the spellcard is a tuple, with (number, name) and will always evaluate as True.
author Thibaut Girka <thib@sitedethib.com>
date Sun, 05 Feb 2012 23:45:41 +0100
parents 4b0570bf5847
children 3539520fff93
comparison
equal deleted inserted replaced
275:4b0570bf5847 276:754ff6452d7e
779 else: 779 else:
780 laser.cancel() 780 laser.cancel()
781 781
782 782
783 @instruction(93) 783 @instruction(93)
784 def set_spellcard(self, unknown, number, name): 784 def set_spellcard(self, face, number, name):
785 #TODO: display it on the game. 785 #TODO: display it on the game.
786 #TODO: make the enemies more resistants (and find how). 786 #TODO: make the enemies more resistants (and find how).
787 self._game.change_bullets_into_star_items() 787 self._game.change_bullets_into_star_items()
788 self._game.spellcard = number 788 self._game.spellcard = (number, name)
789 self._game.enable_effect() 789 self._game.enable_effect()
790 790
791 791
792 @instruction(94) 792 @instruction(94)
793 def end_spellcard(self): 793 def end_spellcard(self):