Medical Attention Help

Stuck on this level. Been here for a while. My humans always die. Here’s my code.

loop:
    currentHealth = self.health
    healingThreshold = self.maxHealth / 2
    enemy = self.findNearestEnemy()
    if currentHealth < 100:
        self.moveXY(65, 45)
        self.say("heal me")
       else:
        if enemy:
            if self.isReady("cleave"):
                if self.distanceTo(enemy) < 6:
                    self.cleave(enemy)
                else:
                    self.attack(enemy)
            else:
                self.attack(enemy)
1 Like

The only suggestion I’d make is move back to the center when there are no enemies.
That way you are more likely to be the target of the next squad that attacks.
Giving your guys a little more cover when they are getting healed.
(that looks like the only real difference between your code and mine)

1 Like

Was a problem of mine too. Dont know what i done else when i cleared it, bit of luck i think. Try not to stay near the healing spot, so pull the enemys away from your nearly dead fellowship

here is a tip I got from Sotonin if you are not fighting go get healed so you do not have to bail out on your troops

Another tip is of there are not enemies in and you are getting healed check if your health is maxed out

This should be be workable. I used Tharin with 423 health and the long sword (the sword that enables ‘cleave’) and by stationing it at x=35, y=28, I managed to pass the round. Meanwhile, don’t use the ring that enables ‘electrocute’. It does not help much.

change the self to hero.

i completed it by doing that.

Hey dude! Thanks for trying to help contribute to our forum. This topic has been dead for 3 years, and the user that you are trying to reply to is not active anymore, next time see if the topic is not dead and then post it. Have a fun time in the forum!