[Adventurer] Agony of Defeat


#1

The level Agony of Defeat is ready for testing.

This level takes place in the Game Dev 2 campaign, and teaches about the "defeat" event.


#2

Is there a missing goal for winning? I can’t seem to actually beat the level even after killing a LOT of munchkins.

Of course I had to tweak the code, made a random number of gold coins spawn instead of just one, and added a chance of an archer also spawning so I didn’t have to keep clicking on munchkins!


#3

Completed without issue.

@dwhittaker it should work now. Try resetting the level and just do the minimum to add the code pieces they ask for. Also be careful that you are not spawning more munchkins when you are trying to complete the level or time is running out, as there is a survival goal, and I believe that this requires all munchkins to be defeated?


#4

I just tried the level again and it worked fine without changing any of what I had done before. Didn’t have to kill all the munchkins, just survive long enough.


#5

Completing it gave me an “advanced strings” achievement, although I don’t think the level has anything to do with strings… (but, hey, thanks anyways! :wink: )

On the other hand, I suggest to change the default 1-4s addition to spawnTime to at least 2-4s

spawnTime = game.time + game.randomInteger(2, 4)     # ...or even (3, 5)