A little snippet/hint:
Javascript:
while (true) {
if (opponent.health <= 0) break;
hero.shield();
if (hero.isReady("bash")) hero.bash(opponent);
}
Python:
while True:
if opponent.health <= 0:
break
hero.shield()
if hero.isReady("bash"):
hero.bash(opponent)
Opponent or enemy? Normally it’s enemy…
You can find the strongest enemy or find enemy hero’s type.
Judging by the last set of equipment you posted, try flashing the hero clone’s troops. The clones will naturally target its nearest enemy so attacking the hero clone will not only distract them, but allow your troops to finish off the army, and then help you out massively as you take out the ogres. If you have Illia, then slamming them will most certainly succeed the level.
Code-wise, put this block:
in an if statement cheking for any enemies that aren’t sand-yaks.
Hope this helps,
I just have a function somewhere in my code that finds my clone and assigns it to “opponent”. 
I personally don’t see the point of
elif hero.isReady("flash") and enemy.type == "scout":
hero.flash()
elif hero.isReady("flash"):
hero.flash()
Just put
elif hero.isReady("flash"):
hero.flash()
it has the same result.
You should wear less attack things, but more defence. Then, your clone cannot attack so fast. you should try the ones with special power because your “clone” cannot use them.
Thanks so much Chaboi! Using flags worked for killing the archers. And thank you everyone else! It didn’t work until I read your suggestions about the sand-yaks. I PASSED!! I’m so happy right now
P.S. I used this armor:

And beat it with only 403 health.
I beat it with only ~50 so, hey, your solution was better than mine, lol. (also, I had dragonplate armor… so, I had a TON of health at the start.)
Also, can you mark the solution so that the topic can be closed?
Nope, I can’t. I didn’t create this topic so it’s not mind to check off.
Lol I beat the level with ~3500 health and warrior. Or was that ranger? Or wizard?