# Clash of Clones is annoyingly hard

**URL:** https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947
**Category:** Level Help
**Created:** [July 11, 2024, 5:51pm UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947 "2024-07-11T17:51:03Z")
**Posts on this page:** 17
**Page:** 1

<div class="post-metadata">

### Author: ![WeAreTheWarriors](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/wearethewarriors/32/37053_2.png) [@WeAreTheWarriors](https://discourse.codecombat.com/u/WeAreTheWarriors)
#### Post date: [July 11, 2024, 5:51pm UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947/1 "2024-07-11T17:51:03Z")

</div>

I’ve been trying to get this done for a long time, and I still cannot solve it. I’ve been attempting to attack the archers, but my character doesn’t do it; I’ve tried bashing and electrocuting, but it has yet to help beat the enemy; I’ve tried going after my own clone, but even that lands me dead via archers.  
My code:

```python
# You'll need good strategy to win this one!
# Your clone will have the same equipment you have!
# But, they're not very skilled at using special powers.
while True:
    enemy = hero.findNearestEnemy()
    target = enemy
    archer = enemy
    if enemy.type == "Robin":
        hero.bash(target)
    else:
        hero.attack(enemy)

```

I’ve tried `if enemy.type == "archers"` and that hasn’t worked either. Even when I move closer it ignores the archer’s existence.

---

<div class="post-metadata">

### Author: ![PeterPalov](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/peterpalov/32/45280_2.png) [@PeterPalov](https://discourse.codecombat.com/u/PeterPalov)
#### Post date: [July 11, 2024, 6:06pm UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947/2 "2024-07-11T18:06:07Z")

</div>

Hello! There are a few things I’d like to say about Clash of Clones.  
Remember that the clone has the copy of your armour. So I would recommend using special abilities that clone can’t use. For example, you could use some abilities from rings (if you have any), gloves (like chain-lightning, works very well in that level), even cleave (if you cleave the archers, it can help you very much). Don’t worry about your low damage if you are using cleave because the clone will also be weak (and he won’t be able to use the “cleave” ability). Also, it would be great if you share your equipment (maybe people here would suggest you something depending on the items you have).  
About your code, if you want to define the archers, you should write this: `if enemy.type == "archer"` since you can kill one archer, not the whole array.  
If you want to use this kind of strategy, you won’t bash the archers unless you stand near them (I will give you an alternative way later in this post) because the enemy is your nearest enemy and in the beginning of the level all the enemies that are near you are the soldiers, so you will start bashing archers only after killing every enemy soldier.  
An alternative way is a bit harder than the one you started with. Since you are trying to solve this level, I am pretty sure that you completed all the levels in the Desert, so you know how to write functions which choose best items (not needed in your case) and enemies. If your strategy does not work, I can try to explain you how to use it here.  
Ping me if you have any questions.  
P.S. I will change this topic’s category to “Level Help” because I guess that’s what this topic is meant for.

---

<div class="post-metadata">

### Author: ![WeAreTheWarriors](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/wearethewarriors/32/37053_2.png) [@WeAreTheWarriors](https://discourse.codecombat.com/u/WeAreTheWarriors)
#### Post date: [July 11, 2024, 6:44pm UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947/3 "2024-07-11T18:44:02Z")

</div>

![image](https://us1.discourse-cdn.com/flex016/uploads/codecombat/original/3X/8/2/82e342809b7618c8157031fe81a9f45588496498.jpeg)

---

<div class="post-metadata">

### Author: ![PeterPalov](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/peterpalov/32/45280_2.png) [@PeterPalov](https://discourse.codecombat.com/u/PeterPalov)
#### Post date: [July 11, 2024, 6:46pm UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947/4 "2024-07-11T18:46:24Z")

</div>

Thanks for sharing the equipment, I would recommend you moving where the enemy archers stand and cleaving there before the loop. Then you can start attacking and bashing the enemies and see what happens next.

---

<div class="post-metadata">

### Author: ![WeAreTheWarriors](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/wearethewarriors/32/37053_2.png) [@WeAreTheWarriors](https://discourse.codecombat.com/u/WeAreTheWarriors)
#### Post date: [July 11, 2024, 6:59pm UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947/5 "2024-07-11T18:59:47Z")

</div>

Hasn’t been working.

```python
enemy = hero.findNearestEnemy()
target = enemy
archer = enemy
hero.moveXY(50, 90)
hero.moveXY(75, 93)
hero.moveXY(82, 73)
hero.cleave(enemy)
while True:
    if enemy.type == "archer":
        hero.cleave(enemy)    
    if enemy:
        hero.bash(enemy)
    else:
        hero.cleave(enemy)

```

---

<div class="post-metadata">

### Author: ![PeterPalov](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/peterpalov/32/45280_2.png) [@PeterPalov](https://discourse.codecombat.com/u/PeterPalov)
#### Post date: [July 11, 2024, 7:06pm UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947/6 "2024-07-11T19:06:22Z")

</div>

Since bash and cleave functions have a cooldown, you should check if your hero is ready to do the command.  
For example:

```python
if hero.isReady("cleave"):
   hero.cleave(enemy)

```

---

<div class="post-metadata">

### Author: ![WeAreTheWarriors](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/wearethewarriors/32/37053_2.png) [@WeAreTheWarriors](https://discourse.codecombat.com/u/WeAreTheWarriors)
#### Post date: [July 11, 2024, 7:09pm UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947/7 "2024-07-11T19:09:44Z")

</div>

Still not working.

```python
enemy = hero.findNearestEnemy()
target = enemy
archer = enemy
hero.moveXY(50, 90)
hero.moveXY(75, 93)
hero.moveXY(82, 73)
if hero.isReady("cleave"):
    hero.cleave(enemy)
while True:
    if enemy:
        if hero.isReady("bash"):
            hero.bash(enemy)
    else:
        if hero.isReady("cleave"):
            hero.cleave(enemy)

```

---

<div class="post-metadata">

### Author: ![PeterPalov](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/peterpalov/32/45280_2.png) [@PeterPalov](https://discourse.codecombat.com/u/PeterPalov)
#### Post date: [July 11, 2024, 7:16pm UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947/8 "2024-07-11T19:16:34Z")

</div>

Try putting “else” against the isReady("bash) part. And also you need to attack the enemies if none of your special abilities are ready.  
Because right now you will cleave only if there is no enemy which is just not possible. But if you put that “else” part there. And attacking is essential.  
Also I forgot to tell you: you should define the enemy in the loo (and to cleave in the beginning you don’t need to cleave(enemy), you can just leave `hero.cleave()`

---

<div class="post-metadata">

### Author: ![WeAreTheWarriors](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/wearethewarriors/32/37053_2.png) [@WeAreTheWarriors](https://discourse.codecombat.com/u/WeAreTheWarriors)
#### Post date: [July 11, 2024, 9:49pm UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947/9 "2024-07-11T21:49:32Z")

</div>

Still not working. Did I do it wrong?

```python
enemy = hero.findNearestEnemy()
target = enemy
archer = enemy
hero.moveXY(50, 90)
hero.moveXY(75, 93)
hero.moveXY(82, 73)
if hero.isReady("cleave"):
    hero.cleave(enemy)
while True:
    enemy = hero.findNearestEnemy()
    if enemy:
        hero.attack(enemy)
    else:
        if hero.isReady("bash"):
            hero.bash()
        if hero.isReady("cleave"):
            hero.cleave()

```

---

<div class="post-metadata">

### Author: ![PeterPalov](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/peterpalov/32/45280_2.png) [@PeterPalov](https://discourse.codecombat.com/u/PeterPalov)
#### Post date: [July 12, 2024, 7:44am UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947/10 "2024-07-12T07:44:39Z")

</div>

Oh, just delete the else and it should work.

---

<div class="post-metadata">

### Author: ![WeAreTheWarriors](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/wearethewarriors/32/37053_2.png) [@WeAreTheWarriors](https://discourse.codecombat.com/u/WeAreTheWarriors)
#### Post date: [July 12, 2024, 3:20pm UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947/11 "2024-07-12T15:20:05Z")

</div>

No, deletion of the else doesn’t seem to help.  
The same old thing happens. I move around to the archers, then move back away without cleaving them, and then get shot down and killed. Then the clones run over the rest of my army.

---

<div class="post-metadata">

### Author: ![riticmaster908](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/riticmaster908/32/43503_2.png) [@riticmaster908](https://discourse.codecombat.com/u/riticmaster908)
#### Post date: [July 12, 2024, 9:16pm UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947/12 "2024-07-12T21:16:22Z")

</div>

you need a target for bash and cleave I think

---

<div class="post-metadata">

### Author: ![WeAreTheWarriors](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/wearethewarriors/32/37053_2.png) [@WeAreTheWarriors](https://discourse.codecombat.com/u/WeAreTheWarriors)
#### Post date: [July 12, 2024, 9:27pm UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947/13 "2024-07-12T21:27:22Z")

</div>

Tried that. It doesn’t go for the archers when I tell it too

---

<div class="post-metadata">

### Author: ![JustALuke](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/justaluke/32/43608_2.png) [@JustALuke](https://discourse.codecombat.com/u/JustALuke)
#### Post date: [July 13, 2024, 9:00pm UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947/14 "2024-07-13T21:00:10Z")

</div>

You need the findNearestEnemy() to be before you move over to the archers; as it’s probably trying to target a soldier in the front

---

<div class="post-metadata">

### Author: ![WeAreTheWarriors](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/wearethewarriors/32/37053_2.png) [@WeAreTheWarriors](https://discourse.codecombat.com/u/WeAreTheWarriors)
#### Post date: [September 22, 2024, 6:01pm UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947/15 "2024-09-22T18:01:18Z")

</div>

Yet again, it does not work.

```python
enemy = hero.findNearestEnemy()
target = enemy
archer = enemy
while True:
    enemy = hero.findNearestEnemy()
    hero.moveXY(50, 90)
    hero.moveXY(75, 93)
    hero.moveXY(82, 73)
if hero.isReady("cleave"):
    hero.cleave(enemy)
while True:
    enemy = hero.findNearestEnemy()
    if enemy:
        hero.attack(enemy)
    else:
        if hero.isReady("bash"):
            hero.bash()
        if hero.isReady("cleave"):
            hero.cleave()

```

---

<div class="post-metadata">

### Author: ![JustALuke](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/justaluke/32/43608_2.png) [@JustALuke](https://discourse.codecombat.com/u/JustALuke)
#### Post date: [September 22, 2024, 6:54pm UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947/16 "2024-09-22T18:54:40Z")

</div>

you need to put the findNearestEnemy() after you move to the archers  
the findNearestEnemy() is finding the soldiers at the start and then trying to cleave them even after you move to the archers.

---

<div class="post-metadata">

### Author: ![riticmaster908](https://sea2.discourse-cdn.com/flex016/user_avatar/discourse.codecombat.com/riticmaster908/32/43503_2.png) [@riticmaster908](https://discourse.codecombat.com/u/riticmaster908)
#### Post date: [September 22, 2024, 8:59pm UTC](https://discourse.codecombat.com/t/clash-of-clones-is-annoyingly-hard/37947/17 "2024-09-22T20:59:35Z")

</div>

Erm skill iss-  
Kk try using minimal gear (with abilities) use a cleave sword only…no armor. Cleave the opponents archers and let your archers deal with the opponent
