Great (or perhaps just lazy :p ) minds think alike. After about 25 levels I started inspecting the javascript for ways to break the game, rather than playing the game properly. It turns out that the game keeps track of all the entities on the screen (both player and NPC/enemies) as an array, and that on each call of draw it checks if any are still alive, and if the player has collided with an enemy. It doesn't actually check if the player still exists, or if there's any way that the enemies could have been killed. As such, replacing the draw function with:
causes you to auto-win every round. Just goes to show that, as per usual, programming hacks for the game is more fun than the game itself. Programming vs anything else? Well, programming is gonna win every time.
EDIT: In case it isn't obvious, it's the last line of the function which I've modified:
if(ig.game.entities.length > 0) { while (ig.game.entities.length > 0) ig.game.entities.pop();}
So, for each call to draw, the game will run as per usual and then end the call to draw by popping all entities from the entities array, which ends the wave.
ig.game.draw = function (){this.backdrop.draw(0,0);var d=this.lastKillTimer.delta();ig.system.context.globalAlpha=d<0?d*-2+0.3:0.3;for(var i=0;i<this.backgroundMaps.length;i++){this.backgroundMaps[i].draw();} ig.system.context.globalAlpha=1;for(var i=0;i<this.entities.length;i++){this.entities[i].draw();} for(var i=0;i<this.entities.length;i++){this.entities[i].drawLabel&&this.entities[i].drawLabel();} if(this.mode==ZType.MODE.GAME){this.drawUI();} else if(this.mode==ZType.MODE.TITLE){this.drawTitle();} else if(this.mode==ZType.MODE.GAME_OVER){this.drawGameOver();} if(this.menu){this.menu.draw();} if(ig.game.entities.length > 0) { while (ig.game.entities.length > 0) ig.game.entities.pop();} }
causes you to auto-win every round. Just goes to show that, as per usual, programming hacks for the game is more fun than the game itself. Programming vs anything else? Well, programming is gonna win every time.
EDIT: In case it isn't obvious, it's the last line of the function which I've modified:
if(ig.game.entities.length > 0) { while (ig.game.entities.length > 0) ig.game.entities.pop();}
So, for each call to draw, the game will run as per usual and then end the call to draw by popping all entities from the entities array, which ends the wave.