really? i’ve finished it 100% of the time.
could you tell me how to do it because I have experimented and cannot find one that works 100% of the time
(start works about 25% percent of the time )
And You don’t need to post code maybe psudo code
Also, what gear are you using?
Yeah I’m using painted steel breast plate, steel helmet, painted steel shield and long sword (ik you are talking to sotonin but I just want to say that get that out of the way)btw I have 811 hp with tharin
I was talking to sotonin, though it is good to get comparisons with other people.
I have Obsidian BP, Long Sword, Defense Infantry, fur hat. I feel as if my damage output isn’t high enough to guarantee higher success rates, and I can’t always rapidly command aggro from the enemies (plus my NPC’s are rather … slow … ). I can tank, though. 801 HP with Anya
I just equipped my painted breastplate and helmet and longsword and still beat it 100% of the time.
Here’s a hint. Instead of ONLY going to heal when you hit the threshold, you should check all the enemies around and if there aren’t any enemies within 15 meters and you arent full health, go heal. (This results in him healing between every battle and prevents him from having to bail out on his men at the start of a battle.
It means you method should be fixed.
那么如何才能保证成功率?能提供一下你的代码我参考下嘛?
impossible for me to do this level
my loop this far
loop:
currentHealth = self.health
healingThreshold = self.maxHealth / 3
if self.health < healingThreshold:
self.moveXY(65, 46)
self.say("Heal Me")
else:
enemy = self.findNearestEnemy()
if enemy:
if self.isReady("cleave"):
self.cleave(enemy)
else:
self.attack(enemy)
It seems your indentation got mixed up. According to the code you posted your code runs once and then your done. This of course won’t work.
If everything below the loop is inside the loop:
Why are you failing? Do you die? Do your friends die? We need more information!
As mentioned in some other post it is advisable to not stand directly on the red X but close to it, so you don’t block retreating allies.
You might also take out shamans first because they can boost other units. And if everything else fails try to stand closer to the enemy than your friends, so you get the damage instead of them. You know better when to heal then them.
my allies die and I didn’t block them even a single time when they are going to heal themselves running code
and that’s a problem that my first code didnt worked to take out “shaman”
измени 3 на 4 healingThreshold = this.maxHealth / 4;
I was doing medical attention and its not my fault I die- its the other humans who die!
seems like a lot of rng in this, had to upgrade health but it eventually worked [merged]
u need quite a bit of health to prevent just one guy fighting so u need to be fighting as much as possible
I really can’t beat this level. I work in Python. This is my code:
Ask the healer for help when you’re under one-third health.
Ask the healer for help when you’re under half health.
loop:
currentHealth = self.health
healingThreshold = self.maxHealth / 1.5
# 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)
self.shield()
self.attack(enemy)
self.shield()
self.attack(enemy)
Hello, ILovePi, and welcome. Please format your code properly as seen by the FAQ.
Help us help you, what is your problem? Off the top of my head, I can say this:
and
is a conditional statement; it doesn’t combine two statements.
isReady
should only be used with an if-statement, e.g. if self.isReady("cleave"):
Help, I think I have the correct coding, which is this:
loop:
currentHealth = self.health
healingThreshold = self.maxHealth / 3
if self.health < healingThreshold:
self.moveXY(65, 46)
self.say(“Heal Me”)
else:
enemy = self.findNearestEnemy()
if enemy:
if self.isReady(“cleave”):
self.cleave(enemy)
else:
self.attack(enemy)
But I can’t pass it because my teammates are dying. Should I spend my money on speed?
Aha! It might be one of those levels where it wants me to buy armor, let’s see.
Didn’t help at all. It only made me the last one surviving, I think this level is impossible.