mirror of
https://github.com/pret/pokemon-reverse-engineering-tools.git
synced 2026-09-25 19:00:04 -05:00
handle wild yes/no prompt during battle
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user