summaryrefslogtreecommitdiff
path: root/pokemontools/vba/battle.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2013-11-11 23:04:31 -0600
committerBryan Bishop <kanzure@gmail.com>2013-11-11 23:04:31 -0600
commitfd5544f79094ddddce59754de7bbe3738622e8fe (patch)
treee126a2c2b64daccfef728f729125f52fde6c94d2 /pokemontools/vba/battle.py
parent4087851f7c9c92791182ffa695073827c5433829 (diff)
handle wild yes/no prompt during battle
Diffstat (limited to 'pokemontools/vba/battle.py')
-rw-r--r--pokemontools/vba/battle.py10
1 files changed, 10 insertions, 0 deletions
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.