Hi, right now I’m low on gems, and I’m grinding on Backwoods Brawl. For some reasons, after I summon my grifffin-riders, my hero stops, and I get an error message. Here is my code.
def attack(enemy):
if enemy:
if hero.canCast("poison-cloud", enemy):
hero.cast("poison-cloud", enemy)
if hero.canCast("summon-undead"):
hero.cast("summon-undead")
if hero.canCast("summon-burl"):
hero.cast("summon-burl")
if hero.canCast("drain-life", enemy):
hero.cast("drain-life", enemy)
if hero.canCast("earthskin", hero):
hero.cast("earthskin", hero)
hero.attack(enemy)
def raise_dead():
toSummon = hero.findCorpses()
if toSummon:
if hero.canCast("raise-dead"):
hero.cast("raise-dead")
def summon(enemy):
if hero.gold > hero.costOf("griffin-rider"):
friends = hero.summon("griffin-rider")
if enemy:
hero.command(friends, "attack", enemy)
while True:
enemy = hero.findNearestEnemy()
attack(enemy)
summon(enemy)
raise_dead()
Thank you! My code is working well, but I still can’t win. I think it might be my equipment. Also, what is the strongest summonable, such as griffin rider, paladin, and so on. Thank you again for your help!