So far I’ve had zero luck with this working. I’ve tried this
# Defeat the enemy hero in two minutes.
loop:
enemies = self.findEnemies()
nearestEnemy = self.findNearest(enemies)
item = self.findNearest(self.findItems())
# Your hero can collect coins and summon troops.
if item:
self.move(item.pos)
if self.gold > self.costOf("archer"):
self.summon("archer")
friends = self.findFriends()
enemyHero = friend.findNearest([e for e in friend.findEnemies() if e.id is "Hero Placeholder"])
for friend in friends:
self.command(friend, "attack", enemyHero)
I’m getting errors on the friend.Nearest and friend.findEnemies() not be a valid function. I’ve tried using “self” instead of “friend” and that says the target it null… Help