Exemple #1
0
 def setAction(self, entry):
     """ Set the Chosen Action """
     if self.canSwitchTo(entry.getPokemon()):
         self.action = SwitchAction(self.pokemon, entry.getPokemon())
         self.stopRunning()
     else:
         """ Tell Screen to display message that the pokemon cannot be used """
 def setAction(self, entry):
     """ Set the Chosen Action """
     if self.pokemon.isPokemon(entry.getPokemon()):
         self.runController(MessageBoxController(BattleMessage("{0} is already out.".format(self.pokemon.name)), self.screen))
     elif entry.getPokemon().fainted():
         self.runController(MessageBoxController(BattleMessage("{0} has no will to fight.".format(entry.getPokemon().name)), self.screen))
     else:
         self.action = SwitchAction(self.pokemon, entry.getPokemon())
         self.stopRunning()
 def setSwitchAction(self, entry):
     """ Set the Switch Action """
     if not self.pkmn.isPokemon(entry.getPokemon()):
         self.action = SwitchAction(self.pkmn, entry.getPokemon())
Exemple #4
0
 def setUp(self):
     """ Build the Switch Action for the test """
     self.action = SwitchAction(None, None)
Exemple #5
0
 def setUp(self):
     """ Build the Switch Action for the test """
     self.action = SwitchAction(self, None)
     self.calledSendOutPkmn = False