I am trying to get the bonus for level “Noble Sacrifice” and my soldiers keep attacking the yeti when it kills one of them
Collect 80 gold
while hero.gold <= 80:
item = hero.findNearestItem()
hero.move(item.pos)
# Build 4 soldiers to use as bait
while hero.gold >= hero.costOf("soldier"):
hero.summon("soldier")
# Send your soldiers into position
points = []
points[3] = { "x": 13, "y": 73 }
points[2] = { "x": 51, "y": 73 }
points[1] = { "x": 51, "y": 53 }
points[0] = { "x": 90, "y": 52 }
while True:
friends = hero.findFriends()
for j in range(len(friends)):
point = points[j]
friend = friends[j]
enemy = friend.findNearestEnemy()
hero.command(friend, "move", point)
# Use range to make an array to loop over.
# Match the friends to the points and command them to move