diff options
author | Bryan Bishop <kanzure@gmail.com> | 2013-11-11 21:56:34 -0600 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2013-11-11 21:56:34 -0600 |
commit | d9bb01f2c0aef6d270bc4e2da93af94ea210e8db (patch) | |
tree | 9f577258684c029d2c9ca5b5d1a38d5038224546 /pokemontools | |
parent | 9f72be1a0f4186ca49e3bf9c6148afbe6477e391 (diff) |
rename the switch prompt detector
Diffstat (limited to 'pokemontools')
-rw-r--r-- | pokemontools/vba/battle.py | 12 | ||||
-rw-r--r-- | pokemontools/vba/vba.py | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/pokemontools/vba/battle.py b/pokemontools/vba/battle.py index 8f4e5eb..9fe4a84 100644 --- a/pokemontools/vba/battle.py +++ b/pokemontools/vba/battle.py @@ -38,7 +38,7 @@ class Battle(EmulatorController): """ Detects if the battle is waiting for player input. """ - return self.is_player_turn() or self.is_mandatory_switch() or self.is_switch_prompt() + return self.is_player_turn() or self.is_mandatory_switch() or self.is_trainer_switch_prompt() def is_fight_pack_run_menu(self): """ @@ -55,14 +55,14 @@ class Battle(EmulatorController): """ return self.is_fight_pack_run_menu() - def is_switch_prompt(self): + def is_trainer_switch_prompt(self): """ Detects if the battle is waiting for the player to choose whether or not to switch pokemon. This is the prompt that asks yes/no for whether to switch pokemon, like if the trainer is switching pokemon at the end of a turn set. """ - return self.emulator.is_battle_switch_prompt() + return self.emulator.is_trainer_switch_prompt() def is_mandatory_switch(self): """ @@ -143,8 +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_trainer_switch_prompt(): + self.handle_trainer_switch_prompt() elif self.is_mandatory_switch(): # battle hook provides input to handle this situation too self.handle_mandatory_switch() @@ -162,7 +162,7 @@ class Battle(EmulatorController): """ raise NotImplementedError - def handle_switch_prompt(self): + def handle_trainer_switch_prompt(self): """ The trainer is switching pokemon. The game asks yes/no for whether or not the player would like to switch. diff --git a/pokemontools/vba/vba.py b/pokemontools/vba/vba.py index 58ed1bd..67d3cf1 100644 --- a/pokemontools/vba/vba.py +++ b/pokemontools/vba/vba.py @@ -599,7 +599,7 @@ class crystal(object): def is_in_link_battle(self): return self.vba.read_memory_at(0xc2dc) != 0 - def is_battle_switch_prompt(self): + def is_trainer_switch_prompt(self): """ Checks if the game is currently displaying the yes/no prompt for whether or not to switch pokemon. This happens when the trainer is |