From fd5544f79094ddddce59754de7bbe3738622e8fe Mon Sep 17 00:00:00 2001 From: Bryan Bishop Date: Mon, 11 Nov 2013 23:04:31 -0600 Subject: handle wild yes/no prompt during battle --- pokemontools/vba/battle.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'pokemontools/vba/battle.py') diff --git a/pokemontools/vba/battle.py b/pokemontools/vba/battle.py index 6b52bce..c0c886e 100644 --- a/pokemontools/vba/battle.py +++ b/pokemontools/vba/battle.py @@ -160,6 +160,8 @@ class Battle(EmulatorController): self.handle_turn() elif self.is_trainer_switch_prompt(): self.handle_trainer_switch_prompt() + elif self.is_wild_switch_prompt(): + self.handle_wild_switch_prompt() elif self.is_mandatory_switch(): # battle hook provides input to handle this situation too self.handle_mandatory_switch() @@ -167,6 +169,7 @@ class Battle(EmulatorController): raise BattleException("unknown state, aborting") # "how did i lose? wah" + # TODO: this doesn't happen for wild battles self.skip_end_text() # TODO: return should indicate win/loss (blackout) @@ -184,6 +187,13 @@ class Battle(EmulatorController): """ raise NotImplementedError + 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): """ Take actions inside of a battle based on the game state. -- cgit v1.2.3