# Fight your way into the Inner Sanctum of the ogre chieftain, and defeat her.
archers=hero.findByType("archer")
soldiers = hero.findByType("soldier")
paladins = hero.findByType("paladin")
catapults=hero.findByType("catapult")
hero.command(soldiers.pop(0), "attack", catapults[0])
hero.command(soldiers.pop(1), "attack", catapults[1])
stage=1
def findLowestHealth(units):
lowHealth=999
lowUnit=None
for unit in units:
if unit.health>0 and unit.health<lowHealth:
lowUnit=unit
lowHealth=unit.health
#hero.say(lowUnit)
def allIn():
while stage==1:
for soldier in soldiers+archers:
enemy=soldier.findNearest(soldier.findEnemies())
#hero.say(enemy)
if enemy:
hero.command(soldier, "attack", enemy)
for paladin in paladins:
unit1=findLowestHealth(soldiers+archers)
if unit1:
hero.command(paladin, "cast", "heal",unit1)
hero.say('healers!')
#hero.command(paladin, "move", {"x":paladin.pos.x+1,"y":paladin.pos.y})
enemy1=hero.findNearestEnemy()
if enemy1:
hero.attack(enemy1)
if enemy1.type=="door":
stage+=1
allIn()
This code runs, but the paladins will not heal anything. Why is that?