[SOLVED] Stuck in "Library Tactician" (Mountain)

def summonSoldier():
    if hero.gold > hero.costOf("soldier"):
        hero.summon("soldier")

# Soldiers spread out in a circle and defend.
def commandSoldier(soldier, soldierIndex, numSoldiers):
    angle = Math.PI * 2 * soldierIndex / numSoldiers
    defendPos = {"x": 41, "y": 40}
    defendPos.x += 10 * Math.cos(angle)
    defendPos.y += 10 * Math.sin(angle)
    hero.command(soldier, "defend", defendPos);

# Find the strongest target (most health)
# This function returns something! When you call the function, you will get some value back.
def findStrongestTarget():
    if (soldier.health > 60):
        hero.command(soldier, "defend", defendPos)
    else:
        hero.command(soldier, "defend", {'x': 42, 'y': 40})
    strongest = None
    strongestHealth = 0
    enemyIndex = 0
    enemies = hero.findEnemies()
    while enemyIndex < len(enemies):
        enemy = enemies[enemyIndex]
        if enemy.health > strongestHealth:
            strongest = enemy
            strongestHealth = enemy.health
        enemyIndex += 1
        return strongest
# If the strongestTarget has more than 15 health, attack that target. Otherwise, attack the nearest target.
def commandArcher(archer):
    nearest = archer.findNearestEnemy()
    if archerTarget and archerTarget.health > 15:
        hero.command(archer, "attack", archerTarget)
    elif nearest:
        hero.command(archer, "attack", nearest)

archerTarget = None

while True:
    # If archerTarget is defeated or doesn't exist, find a new one.
    if not archerTarget or archerTarget.health <= 0:
        # Set archerTarget to be the target that is returned by findStrongestTarget()
        archerTarget = findStrongestTarget()
    friends = hero.findFriends()
    soldiers = hero.findByType("soldier")
    # Create a variable containing your archers.
    archers = hero.findByType("archer")
    for i, soldier in enumerate(soldiers):
        commandSoldier(soldier, i, len(soldiers));
    summonSoldier()
    # use commandArcher() to command your archers
    for i, archer in enumerate(archers):
        commandArcher(archer);