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

Clash of Clones Early Solution

Hello!! working python code. Looking for advice on restricting the code.
I lined up the areas. Sighted the enemy into proper sequencer. Then added the movement to push the bounded enemy line. Added again the cold blast ability to stall out the back line.
The sequence works about one out of five times
if you move your hero to 81, 66 you survive more often

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()
    if enemy != yak:
        if hero.isReady("dash"):
            hero.dash(enemy)
        hero.attack(enemy)
        if hero.isReady("cleave"):
            hero.moveXY(81, 63)
            hero.cleave(enemy)
        else:
            hero.attack(enemy)
        if hero.isReady("chain-lightning"):
            hero.cast("chain-lightning", enemy)
        else:
            hero.attack(enemy)
        if pet.isReady("cold-blast"):
            pet.moveXY(81, 63)
            pet.coldBlast()
        if hero.canElectrocute(enemy):
            hero.electrocute(enemy)
        if hero.isReady("drain-life"):
            hero.Cast("drain-life", target)
        else:
            hero.attack(enemy)

I changed a few lines and now the hero does not finish attacking

Hi @LearnerLegOfMage, sorry for not replying earlier. Do you still need help with this level?
Danny