Today I logged on to codecombat and wanted to re look at medical attention that I had previously completed and when I run it my code fails if anyone knows why this is happening pls tell me
1-12-15
Today I logged on to codecombat and wanted to re look at medical attention that I had previously completed and when I run it my code fails if anyone knows why this is happening pls tell me
1-12-15
Medical Attention is a bit of a tricky level. Your alies are pretty stupid, and will happily walk in a straight line to the healer, ignoring any enemy they pass by. Sadly, said enemies wonāt ignore your allies, killing them when they are low on health (which they usually are when they retreat). There is not much you can do about this without a huge increase in complexety of your code, so simply try to submit a few times.
There are however some simple tricks to help you a bit, one including to move not directly on the marked spot but close to it, so you donāt block or get blocked by your allies. Simply search for āMedical Attentionā in the forum to get an impression
I did all these thing before hand
I usually need three to four times to pass that level, because my allies think that enlarged ogres are no real threat after all. Didnāt found a way to guarantee a success.
Didnāt try escorting the soldiers to the healer, thatās an idea I investigate into.
If youāre considering escorting soldiers to the healer, are you intending to add in manual control via flags, so you can pull your hero away if necessary? Or how do you sense ally health?
If you do use flags, then that could be another (more hands-on) solution to the puzzle - Have 1 flag which your hero walks to, 1 flag which makes the hero say āHeal Meā and 1 flag that gives the āattackā command.
hmmā¦
Didnāt thought of Flags either, thatās plan 2. No, I have the best galsses, I can simply find all friends and check their stats. As for winning the level with a better chance, I would argue for the flag-solution, as the other requires a lot of logic to decide which enemy to attack (the one that targets the weakest ally), where to position ect. Flags are way easier.
I am a bit confused about this. Why do you check your friends health?
Quick tip:
Every hit you took from an ogre, is one hit less for your allies.
To stay in combat as long as you can, you can buy better armor or modify your healingTreshold
.
Your allies are running toward the healer, the moment their health is below 100 HP. Why do you run away crying at (this.maxHealth / 2)
?
You can beat this level with only Painted Steel Breastplate, the shield that you get from Forest, and the sword that you get from Forest, and the fur hat. No other armour is required. (yes, I like being a minimalist, and seeing what the absolute LEAST items/effort a person can use to complete a level )
You would make a good level tester. hah for balancing them
Not always true, though. If there was no ally to be hit and you happen to be there to be hit, then thatās just sub optimal design.
Just sayināā¦
Are you sure that itās suboptimal design, Cawas?
If youāre a pissed off ogre, and thereās only 1 person to hit, because everyone else has run off, logic (pissed off ogre logic) would say, āI WANT TO HIT SOMETHING!!ā and the heroās face would be the closest thing to hitā¦ pissed off ogre logic would zero in on the heroās face being a very hittable face.
Unless the pissed off ogreās speed and internal calculations would give it the necessary boost to be able to outpace the frustration and pain of someone hitting it with a sword & escape the possibility of death by that person who is hitting the pissed off ogre with a swordā¦ and be able to go after & catch up to the wounded person running away & kill themā¦ pissed off ogre logic would make it want to punch the crap out of the closest person hitting it with a sword. Especially if the pissed off ogreās life would depend upon making the sword-ed person turn into a pile of mush.
TL;DR - Heroās face = smashable and close by. Wounded person = requires running and possible death to sword thatās hitting the ogre. Thusā¦ hero with smashable & close by face = gets smashed by ogre fist/weapons.
Sotonin: I think I cleared all the way up till Lurkers (havenāt finished that one) without buying anything beyond the Painted Steel Breastplate & any ārequiredā items (such as the upgraded hammer, glasses, etc). So itās 100% possible to do. It just takes a touch of finesse at times (and crossed fingers lol)
Iām still quite sure. Given the ogre will always be hitting something at all times, then your logic makes all the sense. But thatās never the case. Pissed Ogre can also be chasing or blocked. So there are better ways to deal with them other than being a semi-alive decoyā¦
I see where youāre coming from. I suppose Iām going off the pissed ogre logic that has been pervasive through most games, since ogre (save for ogre magi) are not the most intelligent of creatures, and a pissed ogre even less so (think Hulk)ā¦ and since it doesnāt look like enemies have collision among themselvesā¦ blocked would be āsquishy enemy blocking = smashableā, from what Iāve noticed.
Thus pissed ogre = smash.
Also, consider putting yourself in Pissed Ogreās shoes. if you are a pissed ogre that is chasing someone, and there was a dude (or dudeette) who is hitting you with a sword, how long will you keep chasing the far away squishy thing, before you turn to the sword-ed person hitting you, and smash their face?
Think like a pissed off ogre
WWPOD - What Would Pissed Ogre Do?
I meant blocked by a hammer.
It would be cool if we could see ogre getting more and more pissed as it fails to smash.
Ah!! Iāve noticed that blocked pissed off ogres, those ogres who are blocked by hammers/fences, still have the same focused & pissed off rage towards their targets, even though they cannot reach them to smash them. The level Sarven Savior shows this to be true! Put up some fences, and the ogres will STILL do whatever they can to get through & smash face.
That said, I think itād make for some VERY interesting levels if a pissed off ogre would get more pissed off if it fails to smash. I could see some 1 hit KOās in the future, if the ogre would become more empowered as it becomes more pissed offā¦
Or, perhaps, even taking the āPissed off ogre w/ increasing rageā a step further, and require that the hero builds some form of maze, in order to increase the time that an ogre has not, in fact, smashed, and lead it along a journey. At the end of this journey, thereās a creature or wall or something which the enraged ogre smashes through, and maybe you need to bomb or decoy the ogreā¦ so that you can then zip in and grab some treasure.
This reminds me the first kinds of tower defense, which could also be a nice level to have!
Maybe a level where you have archers on towers and there are two paths but only one path has archers the other has peasants and you need to lure the ogres to the archers
Powered up archers, who will get face smashed by pissed off ogre
There is already an archer-tower in the Level-Editor, just saying. And enraging an ogre should not be that hard to scriptā¦
If I find the time Iāll see what I can do.