# Clash of clone help

**URL:** <https://discourse.codecombat.com/t/clash-of-clone-help/21478>\
**Category:** Level Help\
**Created:** [May 8, 2020, 5:50pm UTC](https://discourse.codecombat.com/t/clash-of-clone-help/21478 "2020-05-08T17:50:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tv337](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/tv337/32/12147_2.png) [@tv337](https://discourse.codecombat.com/u/tv337)\
**Post date:** [May 8, 2020, 5:50pm UTC](https://discourse.codecombat.com/t/clash-of-clone-help/21478/1 "2020-05-08T17:50:46Z")

</div>

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](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/2X/a/af8f7bbc19beb720e3e9f95382ade30099eadee0.png)  
and my code

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

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

while True:
    #weakestShaman = findWeakestEnemy()
    hero.maxSpeed == 10
    strongestShaman = findWeakestEnemy()
    if strongestShaman:
        hero.attack(strongestShaman)
        if hero.isReady("cleave"):
            hero.cleave(strongestShaman)
        if hero.isReady("bash"):
            hero.bash(strongestShaman)
        if hero.health < hero.maxHealth / 2:
            if hero.isReady("shield"):
                hero.shield()
            #strongXY = (strongestShaman.pos.x, strongestShaman.pos.y)
            #hero.moveXY(29, 99)
        if hero.health < 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.

---

<div class="post-metadata">

**Author:** ![Deadpool198](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/deadpool198/32/16753_2.png) [@Deadpool198](https://discourse.codecombat.com/u/Deadpool198)\
**Post date:** [May 8, 2020, 6:56pm UTC](https://discourse.codecombat.com/t/clash-of-clone-help/21478/2 "2020-05-08T18:56:02Z")

</div>

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](https://discourse.codecombat.com/t/solved-clash-of-clones-python/15505/23)  
Thanks  
Danny

---

<div class="post-metadata">

**Author:** ![Deadpool198](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/deadpool198/32/16753_2.png) [@Deadpool198](https://discourse.codecombat.com/u/Deadpool198)\
**Post date:** [May 8, 2020, 6:56pm UTC](https://discourse.codecombat.com/t/clash-of-clone-help/21478/3 "2020-05-08T18:56:06Z")

</div>


