I need help with Restless Dead.
while True:
enemy = hero.findNearestEnemy()
soldiers = hero.findFriends()
soldierIndex = 0
soldier = soldiers[soldierIndex]
item = hero.findNearestItem()
if enemy:
if hero.isReady("throw"):
hero.throw(enemy)
else:
hero.attack(enemy)
elif item:
hero.moveXY(item.pos.x, item.pos.y)
elif hero.gold > 0:
hero.moveXY(19, 40)
elif hero.gold > hero.costOf("soldier"):
hero.moveXY(19, 40)
hero.summon("soldier")
elif soldier:
soldierIndex += 1
hero.command(soldier, "attack", enemy)
This is my code, it defeats the yeti and collects the coins. And it attacks the skeletons, but for some reason, it doesn’t summon the soldiers.
Somebody please help me!!