[SOLVED] Help with CodeCombat Clash of Clones

I have been struggling a lot to solve this level and still am.
I am using the Promatticon III, Mahogany Glasses, Quartz Sense Stone, Basic Flag, Tarnished Bronze Armor, Long Sword, Sundinal WristWatch, Deflector and Leather Boots. this is my code

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.

hero.moveXY(80, 78)
while True:
enemy = hero.findNearestEnemy()
flag = hero.findFlag()
if enemy.type != “sand-Yak” and hero.isReady(“cleave”):
elif enemy.type != “sand-Yak”:
if flag:
if hero.health<500:
hero.moveXY(35, 70)
elif enemy.type != “Sand-Yak”:
hero.say(“Easy There”)
But when i do it, all the red teammates die and my hero attack the yak. I honestly cant do this level so please help.

Could you please format your code using the:


button so we can read it.


This level might require you to have better armor, depending on how you solve this. Do you have any gems?


Never mind, I think I have a solution. If I read your equipment correctly it should look something like this right?


For this level, you should attack the archers first and then go for your clone. The archers do the most damage. And can you post your code correctly like Grzmot asked you to?
P.S. Welcome to the forum!! :partying_face:
P.P.S You’ll need armor with special powers, like bash, cleave, throw (ranger).

You could do it that way, but I also managed to beat the level in 3 lines of code using only the equipment he said he had.

1 Like

Oh nice! I suppose you just told your hero to attack the enemy not the sand-yaks?

I didn’t actually need to attack anything…

1 Like

So you just let your soldiers and archers do the work? Nice!

Pretty much. They do that by themselves without command so you just need to be able to survive.

1 Like

Thats cool!
@Yeet Have you tried our suggestions?

WAIT SrrY I just accidently solved it on my own

1 Like

Ok! Congrats on solving the level!! :partying_face: :partying_face:

Nice! What solution did you use?

1 Like