This code kills all of the clones, but the hero dies just before the last of ogres are killed.
while True:
Badniks = hero.findEnemies()
EggPawns = hero.findByType("archer", Badniks)
SonicAndCo = hero.findFriends()
RobotIndex = 0
while RobotIndex < len(EggPawns):
Badnik = EggPawns[RobotIndex]
if hero.distanceTo(Badnik) < 37:
while Badnik.health > 0:
if hero.isReady("bash"):
hero.bash(Badnik)
else:
hero.attack(Badnik)
RobotIndex += 1
RobotIndex = 0
while RobotIndex < len(Badniks):
Badnik = Badniks[RobotIndex]
if Badnik.type != "sand-yak" and hero.distanceTo(Badnik) < 37:
if not hero.health < 10:
while Badnik.health > 0:
if hero.isReady("bash"):
hero.bash(Badnik)
else:
hero.attack(Badnik)
elif len(SonicAndCo) > 6:
hero.shield()
else:
while Badnik.health > 0:
if hero.isReady("bash"):
hero.bash(Badnik)
else:
hero.attack(Badnik)
RobotIndex += 1
Yes, I’m a Sonic fan.
I only have 106 diamonds left.