diff options
-rw-r--r-- | pokemontools/vba/battle.py | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/pokemontools/vba/battle.py b/pokemontools/vba/battle.py index c0c886e..5d05d8c 100644 --- a/pokemontools/vba/battle.py +++ b/pokemontools/vba/battle.py @@ -202,35 +202,31 @@ class Battle(EmulatorController): class BattleStrategy(Battle): """ - Throw a pokeball until everyone dies. + This class shows the relevant methods to make a battle handler. """ def handle_mandatory_switch(self): """ Something fainted, pick the next mon. """ - for pokemon in self.emulator.party: - if pokemon.hp > 0: - break - else: - # the game failed to do a blackout.. not sure what to do now. - raise BattleException("No partymons left. wtf?") - - return pokemon.id + raise NotImplementedError - def handle_turn(self): + def handle_trainer_switch_prompt(self): """ - Take actions inside of a battle based on the game state. + The trainer is switching pokemon. The game asks yes/no for whether or + not the player would like to switch. """ - self.throw_pokeball() + raise NotImplementedError -class SimpleBattleStrategy(BattleStrategy): - """ - Attack the enemy with the first move. - """ + def handle_wild_switch_prompt(self): + """ + The wild pokemon defeated the party pokemon. This is the yes/no box for + whether to switch pokemon or not. + """ + raise NotImplementedError def handle_turn(self): """ - Always attack the enemy with the first move. + Take actions inside of a battle based on the game state. """ - self.attack(self.battle.party[0].moves[0].name) + raise NotImplementedError |