diff --git a/js/level.js b/js/level.js index d90209a..5d890f8 100644 --- a/js/level.js +++ b/js/level.js @@ -14,8 +14,8 @@ const level = { start() { if (level.levelsCleared === 0) { // level.difficultyIncrease(9) - // b.giveGuns("flak") - // mech.setField("phase decoherence field") + // b.giveGuns("mine") + // mech.setField("negative mass field") // b.giveMod("irradiated needles"); // b.giveMod("reflective cavity"); diff --git a/js/mobs.js b/js/mobs.js index 778f838..5b8794b 100644 --- a/js/mobs.js +++ b/js/mobs.js @@ -373,7 +373,7 @@ const mobs = { ctx.setLineDash([125 * Math.random(), 125 * Math.random()]); // ctx.lineDashOffset = 6*(game.cycle % 215); if (this.distanceToPlayer() < this.laserRange && !mech.isStealth) { - mech.damage(0.0003 * game.dmgScale); + if (mech.collisionImmuneCycle < mech.cycle) mech.damage(0.0003 * game.dmgScale); if (mech.energy > 0.1) mech.energy -= 0.003 ctx.beginPath(); ctx.moveTo(this.position.x, this.position.y); @@ -461,7 +461,7 @@ const mobs = { if (!mech.isStealth) vertexCollision(this.position, look, [player]); // hitting player if (best.who === player) { - dmg = 0.0012 * game.dmgScale; + if (mech.collisionImmuneCycle < mech.cycle) dmg = 0.0012 * game.dmgScale; mech.damage(dmg); //draw damage ctx.fillStyle = "#f00"; diff --git a/js/player.js b/js/player.js index 8fe6786..2c35c6a 100644 --- a/js/player.js +++ b/js/player.js @@ -469,6 +469,7 @@ const mech = { if (b.isModDeathAvoid && !b.isModDeathAvoidOnCD) { //&& Math.random() < 0.5 b.isModDeathAvoidOnCD = true; mech.health += dmg //undo the damage + if (mech.health < 0.05) mech.health = 0.05 mech.collisionImmuneCycle = mech.cycle + 30 //disable this.collisionImmuneCycle bonus seconds game.wipe = function () { //set wipe to have trails @@ -1404,8 +1405,8 @@ const mech = { // for (let i = 0, len = mob.length; i < len; ++i) { // sub = Vector.sub(mob[i].position, mech.pos); // dist2 = Vector.magnitudeSquared(sub); - // if (dist2 < this.fieldDrawRadius * this.fieldDrawRadius) { - // const force = Vector.mult(Vector.perp(Vector.normalise(sub)), 0.002) + // if (dist2 < this.fieldDrawRadius * this.fieldDrawRadius && mob[i].speed > 6) { + // const force = Vector.mult(Vector.perp(Vector.normalise(sub)), 0.00004 * mob[i].speed * mob[i].mass) // mob[i].force.x = force.x // mob[i].force.y = force.y // } diff --git a/todo.txt b/todo.txt index eec3523..a307547 100644 --- a/todo.txt +++ b/todo.txt @@ -1,8 +1,25 @@ ************** TODO - n-gon ************** +mod - increase laser bot range, and reduce energy drain + +scale block throwing by mech.holdingMassScale + (and simplify the code in throw) + +mod - mines become a turret that fires nails + it could float to the mouse location on fire + +dash - mod when pressing left or right on the ground, teleport to the right until you find an obstruction + do repeated horizontal zone queries until they hit map or block + up to a max range of like 10 player widths + +weak anthropic principle - sets health to 3% if it's lower than 3% when triggered. + bug - mech.fieldShieldingScale doesn't reset when switching fields negative mass field needs a buff + repel blocks away + scale repulsion force with speed of projectile + choose clockwise or counter clock wise base on which force direction makes the smallest angle with the velocity no longer blocks, but the player takes 50% less damage from all sources while the field is active allow player to hold larger block, but give throwing blocks at high speed for no energy to a mob @@ -49,10 +66,6 @@ gun - buff vacuum bomb mod - make bodies destroyable they drop ammo and heals -mod - mines - fire something instead of needles on activation - foam?, flak?, vacuum bomb, super balls - make a different mod for each type of bullet mine can fire - mod - energy recharges faster when not moving lore - a robot (the player) gains self awareness @@ -91,7 +104,6 @@ mod - time dilation - Quantum Recovery put the array in the time field object cause the player to go back in time when the field was first activated (easier then going back to 3 seconds before) - css transition for pause menu field that pushes everything back, and can destroy smaller blocks