How do i use raise dead??
this is my code
def commandSoldier(soldier):
friends = hero.findFriends()
friend = hero.findNearest(friends)
for friend in friends:
if friend.type == "soldier":
enemy = hero.findNearestEnemy()
if enemy and enemy.health > 0 and enemy.type != "door":
hero.command(friend, "attack", enemy)
while True:
commandSoldier()
if hero.gold >= 20:
hero.summon("soldier")
enemy = hero.findNearestEnemy()
corpses = hero.findCorpses()
dead = hero.findNearest(corpses)
if enemy:
hero.attack(enemy)
hero.cast("summon-burl")
hero.cast("summon-undead")
if hero.isReady("chain-lightning") and enemy.type != "door":
hero.cast("chain-lightning", enemy)
elif hero.canCast("drain-life", enemy):
hero.cast("drain-life", enemy)
elif hero.canCast("raise-dead"):
hero.cast("raise-dead", dead)
elif hero.canCast("invisibility"):
hero.cast("invisibility", hero)
elif hero.health < 300:
hero.brew("heal")