mirror of
https://github.com/pret/pokemon-reverse-engineering-tools.git
synced 2026-09-14 05:05:13 -05:00
a better in-battle check for text_wait
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user