How do you defeat clash of clones

Hello,

I really need help on the level clash of clones.Can you help me?

Here is my code:

loop:
enemies = self.findEnemies()
enemyIndex = 0
# Make an array of all enemies.
while enemyIndex < len(enemies):
currentTarget = enemies[enemyIndex]
enemyIndex += 1
distance = self.distanceTo(currentTarget)
# If it’s a sand-yak, move to next enemy in the array.
if currentTarget.type is “sand-yak”:
pass
# If it’s out of range, move to the next enemy in the array.
elif distance > 37:
pass
# Else, we target it.
elif currentTarget.health > 0:
# If it’s too close, move back.
if distance < 18:
self.moveXY(self.pos.x - 15, self.pos.y)
# Else, we attack it.
else:
self.attack(currentTarget)

I suppose you have a ranger hero? Then do not equip any bow, use only throw and attack the enemy hero

enemy.id=="Hero Placeholder 1" 
//or
enemy.type==this.type

Next time use 3 backquotes ``` (top-left keyboard) to format your code:

code