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