this is my code. I think it’s right, but my hero always dies. My friend put in the same code, and he passed it, but I can’t
here is my code
loop:
enemies = self.findEnemies()
enemyIndex = 0
while enemyIndex < len(enemies):
enemy = enemies[enemyIndex]
if enemy.type != "sand-yak":
while enemy.health >0:
if self.isReady("cleave") and self.distanceTo(enemy) <10:
self.cleave(enemy)
else:
self.attack(enemy)
enemyIndex = enemyIndex +1
pass
self.moveXY(40, 32)
Could it be because I don’t have enough health? If that’s the case I don’t have enough gems to buy anything.
Please help
If I need crystals, how do I get like free gems so I can Buy better armor? I need better armor to pass this level. I need gems to buy new armor.
sincerely,
darksteel673