summaryrefslogtreecommitdiff
path: root/pokemontools/vba/autoplayer.py
diff options
context:
space:
mode:
authorEevee (Lexy Munroe) <eevee.git@veekun.com>2016-08-24 15:43:15 -0700
committerEevee (Lexy Munroe) <eevee.git@veekun.com>2016-08-24 15:43:15 -0700
commita64657988a50522885618998e7f14168c299a19b (patch)
tree9240aab0fba75befe75d6059d62bea8a3e0fbd4e /pokemontools/vba/autoplayer.py
parent0e1798937a4bf723813574281d0dc12c471c9199 (diff)
Fix most Python 3 compat issues with futurize --stage1
Diffstat (limited to 'pokemontools/vba/autoplayer.py')
-rw-r--r--pokemontools/vba/autoplayer.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/pokemontools/vba/autoplayer.py b/pokemontools/vba/autoplayer.py
index af14d47..2d2e8af 100644
--- a/pokemontools/vba/autoplayer.py
+++ b/pokemontools/vba/autoplayer.py
@@ -2,12 +2,14 @@
"""
Programmatic speedrun of Pokémon Crystal
"""
+from __future__ import print_function
+from __future__ import absolute_import
import os
import pokemontools.configuration as configuration
# bring in the emulator and basic tools
-import vba as _vba
+from . import vba as _vba
def skippable(func):
"""
@@ -394,13 +396,13 @@ class SpeedRunner(Runner):
self.cry.text_wait()
hp = self.cry.get_enemy_hp()
- print "enemy hp is: " + str(hp)
+ print("enemy hp is: " + str(hp))
if hp == 0:
- print "enemy hp is zero, exiting"
+ print("enemy hp is zero, exiting")
break
else:
- print "enemy hp is: " + str(hp)
+ print("enemy hp is: " + str(hp))
attacks = attacks - 1
@@ -417,7 +419,7 @@ class SpeedRunner(Runner):
# happens.
self.cry.text_wait(max_wait=30, debug=True)
- print "okay, back in the overworld"
+ print("okay, back in the overworld")
cur_hp = ((self.cry.vba.memory[0xdd01] << 8) | self.cry.vba.memory[0xdd02])
move_pp = self.cry.vba.memory[0xdcf6] # move 1 pp