Play Home Contribute GitHub Join Us Discourse Staff Members GitHub Contribution Guides Team

Level: Molotov Medic - Can someone review changes to my fork?


It is forked as MolotovMedicCheckOutLevelEditor (Heh, since it’s my first time messing with the level editor) and then I changed the ai for Grul’thock so instead of attacking the one with the most health he attacked the nearest. This was important because if he is attacking the one with the most health, that will become the one nearest to the player because you are healing that soldier and make the original code hard to beat.

So… I changed his AI and then just watched the difference in HP between the default code and code that throws the health to the guy with the lowest HP on your team and then reduced Grul’thock’s HP by 250 so he will win if you don’t keep the guys alive as long as possible.

The match is still very close with the last guy standing normally winning but most ways I thought of to increase that gap involved making the fight longer.

Can someone let me know what they think of the changes I made? Do they fit within how the levels should work? Is the changed version worthy to become the master branch?(If not, then what do I need to do to fix it?)


I should mention that after playing it for a while yesterday I never hit on a solution to beat it. I mentioned this on chat and was notified that the level was bugged. I tested with a solution that went like this, so just let me know if I changed the point of the level:

Loop through friends and find the one with the least health.
Throw it to that guy.


I can’t find the level.


Hmm… I guess I need to “Publish” it. I wasn’t sure if that was safe. But here goes, let me know if I shouldn’t have. Here is the link:

My previous link was


Haha, this is perfect! It’s funny that only one soldier is left standing, but I guess that’s how you have to go. Let me think about how best to merge this into the main level.


The live version is beatable as is if you happen upon a algorithm that works. Part of the problem I had seemed to be that sometimes I’d be trying to heal someone where the LOS meant that potion would hit another solider along the way - at least I think that’s what’s happening, not totally sure. So basically just need to find some protection for that and iterate until you hit upon a version that works. My current solution succeeds with 3/4 alive, but kinda feels a bit like its just luckily exploiting the AI behavior.

The changed version does feel more balanced and better in that the obvious solution actually works. Also my dodgey solution to the live version fails at yours, which seems reasonable.


I’ve merged your changes into the main version of the level, so it’s now playable again. Thanks for taking the time to improve the level! (And for demonstrating some improvements we need to make to our level forking process.)


Thank you, I’m glad I could be helpful! I totally didn’t pick up on the LOS issue nerago mentioned… if that’s it then maybe having them all start from the same side and all run to points closer to the hero may be helpful… and end up with more guys staying alive. I’m out of time for now but maybe one of these days I can try that configuration if nobody beats me to it.


I am just starting out with this.

Is this solution the sort intended?

var friends = this.getFriends();
for ( i=1; i < friends.length; ++i ) {
var friend = friends[i];
if( < 15 ) {
this.say("Here, " + + “!”);


Hmm, that’s easier than I intended for the level. I wanted one to have to do a for-loop through the friends and find the one with the lowest health, not just the first one who isn’t at full health. But it’s so hard to tune the level to make that solution (and only that solution) work that I think further experimentation with this kind of goal should be left to a more well-thought-out level design.


Makes sense - I will try to do that tonight from home. Another thing I never figured out is how to get health to the soldier in the upper right hand corner. It looked like the ogre was intercepting a few as well…