diff options
author | Bryan Bishop <kanzure@gmail.com> | 2013-11-11 21:54:06 -0600 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2013-11-11 21:54:06 -0600 |
commit | 9f72be1a0f4186ca49e3bf9c6148afbe6477e391 (patch) | |
tree | 2fd064d949d01cd5088612b8617192895a226097 /pokemontools/vba/battle.py | |
parent | 993eaa34517c271f3e076744f96aa479008fdf16 (diff) |
handle the yes/no prompt in the battle run loop
Diffstat (limited to 'pokemontools/vba/battle.py')
-rw-r--r-- | pokemontools/vba/battle.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/pokemontools/vba/battle.py b/pokemontools/vba/battle.py index a453478..8f4e5eb 100644 --- a/pokemontools/vba/battle.py +++ b/pokemontools/vba/battle.py @@ -143,6 +143,8 @@ class Battle(EmulatorController): if self.is_player_turn(): # battle hook provides input to handle this situation self.handle_turn() + elif self.is_switch_prompt(): + self.handle_switch_prompt() elif self.is_mandatory_switch(): # battle hook provides input to handle this situation too self.handle_mandatory_switch() @@ -160,6 +162,13 @@ class Battle(EmulatorController): """ raise NotImplementedError + def handle_switch_prompt(self): + """ + The trainer is switching pokemon. The game asks yes/no for whether or + not the player would like to switch. + """ + raise NotImplementedError + def handle_turn(self): """ Take actions inside of a battle based on the game state. |