Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Clash of clones plz help [SOLVED]


#1

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)



#2

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


#3

image


#4

You can equip any sword, BTW.


#5

do I have to equipt a sword?


#6

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


#7

I did the beginner sword but I fail the level


#8

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


#9

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.


#10

And another thing the archer have a high DPS


#11

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


#12

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


#13

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


#14

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


#15

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


#16

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


#17

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


#18

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