Medical-Attention


#1

It seems to always fail; my code is:

// Ask the healer for help when you're under half health.
// Buy the Polished Sense Stone for health documentation.
loop {
    currentHealth = this.health;
    healingThreshold = this.maxHealth / 2;
    // If your current health is less than the threshold,
    // move to the healing point and say, "heal me".
    // Otherwise, just attack enemies.
    if (currentHealth < healingThreshold)
    {
        this.moveXY(65, 46);
        this.say("heal me");
    }
    else
    {
        var x = this.findNearestEnemy();
        if (x !== null)
            this.attack(x);
    }
}

#2

Enemies are being kill from one hit; and i’m not be able to complete the mission due to my humans die before killing the last ogre.


#3

Hi Wolftein,

What level was?

edit:

I tested you code, and it works. So I do not know the cause of the problem.


#4

I have it on my list to adjust this level to make it easier. Until then, you might want to try tanking more of the damage by waiting until maxHealth / 3, or trying a few random seeds to see if your soldiers can survive better.


#5

I just kept slightly tweaking the amount of when i got healed (2.1, 2.2,1.9), and eventually it worked. I guess it would help if you bought additional health with gems (they don’t cost that much).


#6

when you kill the first wave of enemy, your hero would stay idle for sometime. because findNearestEnemy=null. You need to move you hero to a better place to fight the second wave of enemy. So your chance of success will increase.


#7

and health/3 is also needed, if you health is around 400.


#8

instead of this.moveXY(65, 46), try (63,47) to avoid hero and humans collision.


#9

Hello I would like help on this level also my code is not working here it is

// Ask the healer for help when you're under half health.
loop {
    this.warcry();
    
    var currentHealth = this.health;
    var healingThreshold = this.maxHealth / 2;
    if(currentHealth < healingThreshold){
        this.moveXY(65, 46);
        this.say("heal me");
    }
    else if (enemy){
    var enemy = this.findNearestEnemy();
    this.attack(enemy);
        
    }
    // If your current health is less than the threshold,
    // move to the healing point and say, "heal me".
    // Otherwise, attack. You'll need to fight hard!
    
}

All my code does is war cry and then nothing


#10

You need to assign enemy before you check enemy, ideally at the start of your loop. Also you only want to warcry if this.isReady("warcry").


#11

why? health 722
Sometimes succeed and sometimes fail!!!

  # Ask the healer for help when you're under half health.
    loop:
        currentHealth = self.health
        healingThreshold = self.maxHealth / 4
        # If your current health is less than the threshold,
        # move to the healing point and say, "heal me".
        # Otherwise, attack. You'll need to fight hard!
        enemy = self.findNearestEnemy()
        if currentHealth < healingThreshold:
            self.moveXY(65, 45) and self.say("heal me")
        else:
            if enemy:
                self.isReady("cleave") and self.cleave(enemy)
                self.attack(enemy)

#12

楼上是我的代码,我的最大健康值是722
楼上的代码有时候成功,有时候会失败,一直没搞懂,


#13
else:
      if enemy:
             if self.isReady("cleave"):
                   self.cleave(enemy)
             else:
                  self.attack(enemy)

#14

The reason it is only working some times is because it was designed that way and I dont think anyone has found a strat that works all the time


#15

thank you,Or a failure


#16

设计成这样?
Designed to be like this?


#17

kinda Im just guessing that because ive never seen anyone who finishes it 100% of the time


#18

ok.thank you,原来如此!!!!


#19

for the healer, I’ve found that saying “Heal me” 2 or 3 times helps to pop my hero back up to full health. Otherwise it only seems to heal a certain portion.

Also, I’ve found that a winning strat is to move your character to a mid-point between all 3 spawn spots when enemies are dead. And to make that spot be a point where your hero won’t have collisions with the ally NPC’s.

I think i’ll toss my current strat against the Submit button a number of times, and see what my win% is after about 10 mins.
edit fascinating. I have quite the skewed ratio! Some wins, and a bunch of losses. Peculliar!


#20

As I said I have not found anyone who has finished it 100% of the time