handle wild yes/no prompt during battle

This commit is contained in:
Bryan Bishop
2013-11-11 23:04:31 -06:00
parent 4087851f7c
commit fd5544f790

View File

@@ -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.