summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pokemontools/vba/battle.py12
-rw-r--r--pokemontools/vba/vba.py2
-rw-r--r--tests/test_vba_battle.py2
3 files changed, 8 insertions, 8 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
diff --git a/tests/test_vba_battle.py b/tests/test_vba_battle.py
index a0338e5..0faa26e 100644
--- a/tests/test_vba_battle.py
+++ b/tests/test_vba_battle.py
@@ -105,7 +105,7 @@ class BattleTests(unittest.TestCase):
self.battle.skip_until_input_required()
# yes/no menu is present, should be detected
- self.assertTrue(self.battle.is_switch_prompt())
+ self.assertTrue(self.battle.is_trainer_switch_prompt())
# and input should be required
self.assertTrue(self.is_input_required())