I’m so close to the glacier. I just need to beat summits gate. here is my code:
While True:
go = 0
enemy = hero.findNearestEnemy()
flag = hero.findFlag("green")
friends = hero.findFriends()
flagBlack = hero.findFlag("black")
flagV = hero.findFlag("violet")
if flag:
hero.pickUpFlag(flag)
if flagBlack:
hero.pickUpFlag(flagBlack)
go = 1
if flagV:
hero.cast("invisibility", hero)
hero.pickUpFlag(flagV)
if enemy:
if hero.canCast("chain-lightning", enemy):
hero.cast("chain-lightning", enemy)
else:
if hero.isReady("bash"):
hero.bash(enemy)
else:
hero.attack(enemy)
for friend in friends:
if friend and friend.type == "paladin" and friend.team == hero.team:
if friend.canCast("heal"):
hero.command(friend, "cast","heal",hero)
else:
if friend.findNearestEnemy():
hero.command(friend, "attack",friend.findNearestEnemy() )
if friend and friend.findNearestEnemy() and friend.type != "paladin" and friend.team== hero.team:
hero.command(friend, "attack", friend.findNearestEnemy())
while hero.gold >= hero.costOf("soldier"):
hero.summon("soldier")
friends = hero.findFriends()
for friend in friends:
if friend.type != "paladin" and go == 1:
hero.command(friend, "move", hero.pos)
Can you help? I just need to beat the warlocks. Also, the variable “go” is to tell my army when to start the raid at the warlocks.