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

HELP Clash of clones!

Cant solve this level, need help :frowning:

while True:
enemy = hero.findNearestEnemy()
if hero.distanceTo(enemy) < 10:
hero.attack(enemy)
else:
hero.say(“Come!”)
if enemy.health > 300:
hero.shield()
else:
hero.attack(enemy)

Hi Ry4n_17,

In order to help, we need to see your code in proper format. For example, Python, if you happen to be using it, will throw an error if you do not have your indentation correct. As you may notice, what you wrote (actually, copied and pasted) shows no indentation.

You can learn how to post correctly here:

Hi. I would also like to add that there’s only so much we can help you with this level. There’s no right answer, although there are a few tactics which work really well.
First of all, do what bobby says then, make sure your code doesn’t have any errors.
A large part of this level is your equipment, the one advantage you have over the clone is that you can use abilities. So find as many items you can which have abilities (I can think of five I could have on at the same time).
If that still doesn’t work, try killing the archers first, because they do the most damage.
I hope this helps
-Danny
P.S please could you only post posts looking for help in one location, otherwise it clutters up the forum unnecessarily and uses more peoples time.

what is your equipment?

There are a TON of threads on this board regarding this level. Spend some time reading about what others did and it will help you develop your own strategy.

https://discourse.codecombat.com/search?q=clash%20of%20clones

Just think of items which you might say…
if hero.isReady("example-ability") or if hero.canCast("example-spell")
You have definitely used some of those already.
-Danny

ok thx
(20 kinds of equipment)

but i mean like what kind of armor

It doesn’t matter what your amour is really, because your clone’s is the same as yours.
Although, saying that, I would still use your best armour.
-Danny