summaryrefslogtreecommitdiff
path: root/pokemontools/vba/vba.py
diff options
context:
space:
mode:
authorBryan Bishop <kanzure@gmail.com>2013-11-13 22:44:04 -0600
committerBryan Bishop <kanzure@gmail.com>2013-11-13 22:44:04 -0600
commit367485303a0b40a4aec1ead83adf7f90fce59834 (patch)
treec30ad50fb77f7eacde39d9f363241b5319f0e29f /pokemontools/vba/vba.py
parentdddc61e026163808da93ae3ca7121ec64b2bba8f (diff)
improve text_wait for in-battle situations
Diffstat (limited to 'pokemontools/vba/vba.py')
-rw-r--r--pokemontools/vba/vba.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/pokemontools/vba/vba.py b/pokemontools/vba/vba.py
index d221fef..5106004 100644
--- a/pokemontools/vba/vba.py
+++ b/pokemontools/vba/vba.py
@@ -462,16 +462,17 @@ class crystal(object):
# date/time box (day choice)
# 0x47ab is the one from the intro, 0x49ab is the one from mom.
elif 0x47ab in stack or 0x49ab in stack: # was any([x in stack for x in range(0x46EE, 0x47AB)])
- print "probably at a date/time box ? exiting."
- break
+ # if not in battle
+ if self.vba.read_memory_at(0xd22d) == 0:
+ print "probably at a date/time box ? exiting."
+ break
# "How many minutes?" selection box
elif 0x4826 in stack:
print "probably at a \"How many minutes?\" box ? exiting."
break
- else:
- self.vba.step(count=step_size)
+ self.vba.step(count=step_size)
# if there is a callback, then call the callback and exit when the
# callback returns True. This is especially useful during the