while True: enemy= hero.findNearestEnemy() if hero.health < 50: hero.moveXY(34, 35) else: if enemy: hero.bash(enemy) hero.attack(enemy) hero.attack(enemy)
Hi I need some help on clash of clones level. I have been stuck on this for more than a year and have constantly been looking at help for this level. I finally decided to post this rather simple code. The problem with this is that for some reason, my hero starts saying “But it’s Dead” in the middle and dies.