diff --git a/js/bullet.js b/js/bullet.js index 0721575..b589d9f 100644 --- a/js/bullet.js +++ b/js/bullet.js @@ -2863,8 +2863,8 @@ const b = { have: false, fire() { if (mod.isCapacitor) { - if (mech.energy > 0.16) { - mech.energy -= 0.16 + if (mech.energy > 0.16 || mod.isRailEnergyGain) { + mech.energy += 0.16 * (mod.isRailEnergyGain ? 1 : -1) mech.fireCDcycle = mech.cycle + Math.floor(30 * b.fireCD); const me = bullet.length; bullet[me] = Bodies.rectangle(mech.pos.x + 50 * Math.cos(mech.angle), mech.pos.y + 50 * Math.sin(mech.angle), 60, 14, { @@ -3077,17 +3077,11 @@ const b = { const previousCharge = this.charge let smoothRate = 0.98 * (mech.crouch ? 0.99 : 1) * (0.98 + 0.02 * b.fireCD) //small b.fireCD = faster shots, b.fireCD=1 = normal shot, big b.fireCD = slower chot this.charge = this.charge * smoothRate + 1 * (1 - smoothRate) - - // let chargeRate = (mech.crouch) ? 0.98 : 0.984 - // chargeRate *= Math.pow(b.fireCD, 0.03) - // this.charge = this.charge * chargeRate + (1 - chargeRate) // this.charge converges to 1 if (mod.isRailEnergyGain) { - mech.energy += (this.charge - previousCharge) * 1.66 //energy drain is proportional to charge gained, but doesn't stop normal mech.fieldRegen + mech.energy += (this.charge - previousCharge) * 2 //energy drain is proportional to charge gained, but doesn't stop normal mech.fieldRegen } else { mech.energy -= (this.charge - previousCharge) * 0.33 //energy drain is proportional to charge gained, but doesn't stop normal mech.fieldRegen } - - //draw targeting let best; let range = 3000 diff --git a/js/level.js b/js/level.js index b236734..fea2ca9 100644 --- a/js/level.js +++ b/js/level.js @@ -17,8 +17,8 @@ const level = { // game.zoomScale = 1000; // game.setZoom(); // mech.setField("wormhole") - b.giveGuns("mine") - mod.giveMod("sentry") + // b.giveGuns("mine") + // mod.giveMod("sentry") level.intro(); //starting level diff --git a/js/mob.js b/js/mob.js index d163692..bf15769 100644 --- a/js/mob.js +++ b/js/mob.js @@ -1061,7 +1061,7 @@ const mobs = { powerUps.spawn(this.position.x, this.position.y, type); } } - if (true) { + if (mod.isRadioactive) { //look for dots and spread them let dmgTotal = 0 for (let i = 0, len = this.status.length; i < len; i++) { @@ -1077,7 +1077,15 @@ const mobs = { closestIndex = i } } - if (closestIndex) mobs.statusDoT(mob[closestIndex], dmgTotal / 180, 180) + if (closestIndex) { + mobs.statusDoT(mob[closestIndex], dmgTotal / 180, 180) + ctx.beginPath(); + ctx.moveTo(this.position.x, this.position.y); + ctx.lineTo(mob[closestIndex].position.x, mob[closestIndex].position.y); + ctx.lineWidth = this.radius; + ctx.strokeStyle = "rgba(0,80,80,1)"; + ctx.stroke(); + } //draw AOE // game.drawList.push({ //add dmg to draw queue // x: this.position.x, diff --git a/js/mods.js b/js/mods.js index a3e7088..6d18290 100644 --- a/js/mods.js +++ b/js/mods.js @@ -2402,9 +2402,9 @@ const mod = { maxCount: 1, count: 0, allowed() { - return mod.haveGunCheck("rail gun") && !mod.isCapacitor + return mod.haveGunCheck("rail gun") }, - requires: "rail gun, not capacitor bank", + requires: "rail gun", effect() { mod.isRailEnergyGain = true; }, @@ -2418,9 +2418,9 @@ const mod = { maxCount: 1, count: 0, allowed() { - return mod.haveGunCheck("rail gun") && !mod.isRailEnergyGain + return mod.haveGunCheck("rail gun") }, - requires: "rail gun, not half-wave rectifier", + requires: "rail gun", effect() { mod.isCapacitor = true; }, diff --git a/todo.txt b/todo.txt index 71a45f1..e5798f6 100644 --- a/todo.txt +++ b/todo.txt @@ -1,14 +1,6 @@ *********** NEXT PATCH *********** -mini black hole mobs travel through walls -mod: radioactive contamination - after a mob or shield dies, leftover radiation spreads to a nearby mob - -mod: half-wave rectifier - railgun overfills with energy when you charge instead of draining - removed rail gun mod - frame dragging -bug fixed - rail gun bugs out when your charge speed gets very low - -mod: sentry - mines are modified to automatically fire nails at nearby targets for 12 seconds ************** BUGS **************