diff options
author | Bryan Bishop <kanzure@gmail.com> | 2013-11-13 23:07:26 -0600 |
---|---|---|
committer | Bryan Bishop <kanzure@gmail.com> | 2013-11-13 23:07:26 -0600 |
commit | 811630a5dd82c571836c03131b00ff2608ea5d25 (patch) | |
tree | 20f810a7be21931fddb929be0281c8941e81a821 | |
parent | 367485303a0b40a4aec1ead83adf7f90fce59834 (diff) |
a better in-battle check for text_wait
-rw-r--r-- | pokemontools/vba/battle.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pokemontools/vba/battle.py b/pokemontools/vba/battle.py index 1b582dd..7c788b9 100644 --- a/pokemontools/vba/battle.py +++ b/pokemontools/vba/battle.py @@ -262,7 +262,7 @@ class Battle(EmulatorController): """ # callback causes text_wait to exit when the callback returns True def is_in_battle_checker(): - return (self.emulator.vba.read_memory_at(0xd22d) == 0) + return (self.emulator.vba.read_memory_at(0xd22d) == 0) and (self.emulator.vba.read_memory_at(0xc734) != 0) while not self.is_input_required() and self.is_in_battle(): self.emulator.text_wait(callback=is_in_battle_checker) |