Clash of clones plz help [SOLVED]

Plz help
I can’t play without equipting a sword?
here’s 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.

while True:
    enemy = hero.findNearestEnemy()
    flag = hero.findFlag("green")
    if enemy:
        if self.isReady("bash"):
            hero.bash(enemy)
            hero.attack(enemy)
            hero.attack(enemy)
            hero.shield()
            hero.cast("chain-lightning", enemy)
            enemy3 = hero.findNearestEnemy()
            hero.attack(enemy3)
            hero.moveXY(50, 68)
            hero.moveXY(44, 61)
            hero.moveXY(50, 68)


What do you mean by “I can’t play without equipting a sword?”?

image

You can equip any sword, BTW.

do I have to equipt a sword?

Yes, but a tip: don’t equip an OP sword, like the runesword.

I did the beginner sword but I fail the level

Anything I should improve with my code?
I get attacked by the yaks

Choose a mediocre sword, and the yaks will only attack if attack them. They count as enemies, so do
if enemy and enemy.type != "sand-yak": to avoid the yaks. My advice is that your clone can’t do any “special” attacks, like bash or chain-lightning.

And another thing the archer have a high DPS


while True:
    enemy = hero.findNearestEnemy()
    if enemy and enemy.type != "sand-yak":
        hero.bash(enemy)
        hero.attack(enemy)
        hero.attack(enemy)
        hero.shield()
        enemy3 = hero.findNearestEnemy()
        hero.attack(enemy3)
        hero.shield()
        hero.moveXY(50, 68)
        hero.moveXY(44, 61)
        hero.moveXY(50, 68)
        hero.moveXY(35, 69)

help

Why are you using move code in a if enemy loop?

yeah ? and try to attack the archers first thats what I did and it worked

THanks soo much guys I finished the level!!! YAY!!!

Cool can you put [SOLVED] in your title si that everyone know its done

Congrats!!:rice_ball::rice_ball::rice_ball:

Ok no prob I will put [SOLVED]
why rice balls?

:man_shrugging::man_shrugging:I don’t know. Probably… ONIGIRI OVERLOAD

1 Like