Level help: Clash of clones (python)

Im just going to try other stuff I’m really just trying to get gems and level up

1 Like

I still need help I have gotten to the point where I have some archers left and my hero is still alive but I need help with figuring out how to get my hero to ignore the sand yak’s this is my current code and equipment

while True:
    enemy = hero.findNearestEnemy()
    hero.shield()
    ready = hero.isReady("bash")
    if ready:
        enemy = hero.findNearestEnemy()
        hero.bash(enemy)
    targets = hero.findByType("archer")
    if targets:
        yes = hero.isReady("electrocute")
        if yes:
            hero.electrocute(enemy)

I’m using bad armor and a bad sword so my clone isn’t op

P.S. you need to press submit to be able to get to the sand yak part

yak = hero.findByType("Sand-Yak")
if (yak and hero.isReady("punch") and hero.isReady("bash")):
   hero.punch(yak)
   hero.bash(yak)

Use something like that for the yaks. I don’t really have enough time right now to make it better.

Or just ignore the yaks

Do a check to see if the enemy type isn’t a yak
Also focus on attacking your clone by doing "hero.findByType(hero.type) as your enemy

Idk if this works tho I did this lvl 6 years ago

how do I ignore them?

you can loop through the enemies array and remove an enemy if it has the type “yak”
then find hte nearest enemy from the updated array.

k lemme try that really quick