Play Home Contribute Github Join Us! Discourse Staff Members Github Contribution Guides Team

Clash of clone help

hello I would like some help with solving Clash of Clones no matter what I do I die.
here is my equipment
Screenshot 2020-05-07 at 16.25.11
and my code

    enemies = hero.findEnemies()
    strongest = None
    greatestHealth = 0
    enemyIndex = 0
    for enemy in enemies:
        if > greatestHealth:
            if enemy.type != "sand-yak":
                strongest = enemy
                greatestHealth =
    return strongest

def findWeakestEnemy():
    enemies = hero.findEnemies()
    weakest = None
    leastHealth = 99999
    enemyIndex = 0
    for enemy in enemies:
        if enemy.type != "sand-yak":
            if < leastHealth:
                weakest = enemy
                leastHealth =
        return weakest

while True:
    #weakestShaman = findWeakestEnemy()
    hero.maxSpeed == 10
    strongestShaman = findWeakestEnemy()
    if strongestShaman:
        if hero.isReady("cleave"):
        if hero.isReady("bash"):
        if < hero.maxHealth / 2:
            if hero.isReady("shield"):
            #strongXY = (strongestShaman.pos.x, strongestShaman.pos.y)
            #hero.moveXY(29, 99)
        if < hero.maxHealth / 4:
            hero.moveXY(51, 44)
    if strongestShaman.type == "ogre":

I don’t know what is wrong and what to do to fix it my character kills for a while then dies.

Hi, please don’t ask for help on the same level in two locations. It won’t get you help any faster and it just clutters the forum.
Let’s stick to: [Solved] Clash of clones python