code in Kithgard Brawl
code in Backwoods Brawl
code in Backwoods Treasure
code in Sarven Brawl
while True:
enemy = hero.findNearestEnemy()
if enemy:
if hero.distanceTo(enemy) <= 60:
hero.attack(enemy)
if hero.canCast("chain-lightning", enemy):
hero.cast("chain-lightning", enemy)
soldier = hero.findFriends()
if hero.gold >= 20:
hero.summon("soldier")
if soldier > len("soldier"):
hero.command(soldier, "attack", enemy)
soldierIndex+=1
if enemy.type == "sand-yak":
hero.moveXY(17, 115)
code in Sarven Treasure
code in Sarven Siege
code in Cloudrip Brawl
# Stay alive for one minute.
# If you win, the next time you play will be more difficult and more rewarding!
# If you lose, you must wait a day before submitting again.
while True:
coin = hero.findNearestItem()
hero.move(coin.pos)
if hero.gold >= hero.costOf("soldier"):
soldier = hero.summon("soldier")
enemy = hero.findNearest(hero.findEnemies())
if enemy:
soldiers = hero.findFriends()
soldierIndex = 0
while soldierIndex < len(soldiers):
soldier = soldiers[soldierIndex]
soldierIndex += 1
hero.command(soldier, "attack", enemy)
if hero.distanceTo(enemy) < 10:
hero.attack(enemy)
if hero.canCast("chain-lightning", enemy):
hero.cast("chain-lightning", enemy)
if hero.isReady("bash"):
hero.bash(enemy)