# To disable the fire-traps add the lowest trap.value to the highest value.
# Move to the white X and say the answer to Kitty the cougar.
# Defeat all the ogres if you dare.
# Once all ogres are defeated move to the red X.
# Look out for potions to boost your health.
whiteX = {'x':27, 'y':42}
redX = {'x':151, 'y': 118}
while True:
traps = hero.findByType("fire-trap")
lowestTrap = None
highestTrap = None
minTrapVal = 0
maxTrapVal = 999999
trapIndex = 0
while trapIndex < len(traps):
if traps[trapIndex].value < maxTrapVal:
lowestTrap = traps[trapIndex]
maxTrapVal = lowestTrap.value
if traps[trapIndex].value > minTrapVal:
highestTrap = traps[trapIndex]
minTrapVal = highestTrap.value
trapIndex += 1
hero.move(whiteX) # **This isn't working.** If I use hero.moveXY(27, 42) it works.
# What is the difference and why isn't whiteX working?
hero.say(lowestTrap.value + highestTrap.value)
break
In the first part where movement is to hero.move(whiteX), the character says the answer (number) without moving and then just wanders into the active fire-traps. However, if I use hero.moveXY(27, 42) everything works fine. I can’t figure out why or what the difference is. Since whiteX is clearly defined I would think that either should work. I have the correct boots and the hero.move(redX) is working fine but hero.move(whiteX) is not. What am I doing wrong?