[SOLVED] Help on Clash of Clones

Help! I’ve got no idea how to even begin coding this level! Capture

Before we can help you have to put forth an effort. attack the enemies, use special abilities, do something so we know that you tried

Have fun
-Chase

you can use a sword with an ability instead of sword of the forgotten

1 Like

SHHHHHHHHHHHHHHH

before we help them they need to put forth EFFORT

I need help what armor should I use.

this is my code
while True:
enemy = hero.findNearestEnemy()
if enemy and enemy.type != (“sand-yak”) :
if hero.isReady(“bash”):
hero.bash(enemy)
elif hero.isReady(“cleave”):
hero.cleave(enemy)
else:
hero.attack(enemy)
pass

That is definitely not enough code… What if a sand yak is the nearest enemy? You’ll never attack anyone
Hints:

Hint 1

Use armor the gives you like 2000-3000 hp, focus on secondary attacks and use a trashy sword like simple sword

Hint 2

Attack enemy archers first as they do most damage

Hint 3

Flags are good, so you can retreat and regen(if u have wooden strand)

BIG HINT!

Use while loops instead, get invisilbility ring to attack when invisible

1 Like

Okay thanks I will try it.

also, post your armor

1 Like

I did it here is my armor.
fine boots
simple sword
simple wristwatch
leather belt
programmaticon 3
ring of speed
mahoganny glasses
quartz sense stone
wooden strand
basic flags
obsidian helmet
obsidian breastplate
steel striker

Can you send us your current code, but do it how it is described in this topic?

1 Like
while True:
    enemy = hero.findNearestEnemy()
    if enemy and enemy.type != ("sand-yak") :
        if hero.isReady("bash"):
            hero.bash(enemy)
        elif hero.isReady("cleave"):
            hero.cleave(enemy)
        else:
            hero.attack(enemy)
    pass

The enemy also sends ogres, so they can easily outnumber you. Remember, the archers do the most damage (1 archer = 30 dps, 10 = 300 dps). Speed ring is good, as you can easily run to where archers are, jumping is great too. The toughest opponent is your clone, and you want him to die as quick as possible. Don’t let him get to your archers and let soldiers distact him as you can attack your clone.

1 Like

Here’s a piece of code to get you started:

def killArchers():
    archers = hero.findByType("archer", hero.findEnemies())
    i = 0
    while i < len(archers):
        archer = archers[i]
        if archer and archer.team == "ogres" and archer.health > 0:
            hero.attack(archer)
        i += 1
    pass
1 Like

do you have invis ring?

1 Like

Does this code work?

1 Like

yes the latest code that I posted worked.

no i do not have it.

Well, could you delete it so others won’t use your code to cheat at this level?

1 Like

Thanks! And congratulations on completing the level! :smiley: :partying_face:

1 Like

Nice! congrats! (20 chars! :smile:)