[SOLVED] Clash of Clones - Desert Clones

// 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) {
    var flag = hero.findFlag();
    var enemy = hero.findNearestEnemy();
    
    if (enemy && enemy.type != "sand-yak") {
        if (hero.isReady("bash")) {
            hero.bash(enemy);
        }
         hero.cast("chain-lightning", hero.findNearestEnemy());
         hero.attack(enemy);
    }
}
2 Likes

I’m not proficient in JavaScript, but shouldn’t you state what the issue is?

1 Like

My hero keeps dying.

3 Likes

Maybe get better equipment? What are you using currently?

2 Likes

3 Likes

I apologize for the delay. I’m trying to find my account so I can test it out, but I have no idea how I can find it.

2 Likes

Try if hero.isReady("chain-lightning") and put else after chain lightning because if its not ready it can use hero.attack()

4 Likes

Do you have the invisibility ring @Monsty?

Andrei

5 Likes

It doesn’t matter what equipment your using because the clones have the same equipments as you you can’t change it. :smile:

3 Likes

But better equipment for yourself means better equipment for your clone, and what follows is that your clone would last longer because it would be stronger.

2 Likes

Yeah, I know so I tried playing with the weakest boots and the first sword you get in the game

2 Likes

Try and defeat the archers and then the your hero clone. Your army will take care of the rest.

Elijah

1 Like

Also, and I’ve said this before in another Clash of Clones post, you don’t need to check if the enemy isn’t a sand yak; they are too far away. That is… if you keep the fight in the middle.

1 Like

Swap this for:

if (enemy) {
    if (hero.isReady("bash")) {
        hero.bash(enemy);
    }
    else {
        hero.attack(enemy)

Don’t bother trying to cast chain-lightning - you are using a warrior so you can’t cast it anyway.

Hope this helps

Elijah

1 Like

Sorry Falcon, but that is not correct. The chain-lightning is an aspect of the ring, not a skill/ability, so any character can cast it.

Also, the ‘!= sand-yak’ clause can be important…what if there are no enemy, for the split second between waves?

3 Likes

I wish I had known this before :rofl:

This never happened to me though

1 Like

Yes, it is quite unlikely, but, it can happen…besides, it doesn’t hurt to leave in the != clause…just in case :stuck_out_tongue_winking_eye:

3 Likes

Thank you @dedreous.

2 Likes

I wonder if @Monsty has solved it yet…

1 Like

And, I apologize too…it’s the gloves that grant the ability, not a ring. Sorry! Thanks Andrei for keeping me straight!

2 Likes