The only error is that my attack code gets null, even though
enemy = hero.findNearestEnemy was directly above it. Heres my code.
# Ask the healer for help when you're under one-half health. while True: currentHealth = hero.health healingThreshold = hero.maxHealth / 2 # If your current health is less than the threshold, # move to the healing point and say, "heal me". # Otherwise, attack. You'll need to fight hard! if currentHealth < healingThreshold: hero.moveXY(65, 46) hero.say("Heal, please!") elif currentHealth > healingThreshold: enemy = hero.findNearestEnemy() hero.attack(enemy)