diff --git a/index.html b/index.html
index 4c20cc3..df7764d 100644
--- a/index.html
+++ b/index.html
@@ -103,6 +103,9 @@
+
+
+
diff --git a/js/bullets.js b/js/bullets.js
index 5af08a4..0b1bfc1 100644
--- a/js/bullets.js
+++ b/js/bullets.js
@@ -71,6 +71,8 @@ const b = {
isModAlphaRadiation: null,
modEnergyRegen: null,
isModVacuumShield: null,
+ modRenormalization: null,
+ modGrenadeFragments: null,
modOnHealthChange() { //used with acid mod
if (b.isModAcidDmg && mech.health > 0.8) {
b.modAcidDmg = 0.7
@@ -1334,6 +1336,22 @@ const b = {
b.isModIceField = false;
}
},
+ {
+ name: "renormalization",
+ description: "phase decoherence field has 3x visibility
and 1/3 energy drain when firing",
+ maxCount: 1,
+ count: 0,
+ allowed() {
+ return mech.fieldUpgrades[mech.fieldMode].name === "phase decoherence field"
+ },
+ requires: "phase decoherence field",
+ effect() {
+ b.modRenormalization = 3;
+ },
+ remove() {
+ b.modRenormalization = 1;
+ }
+ },
{
name: "quantum dissipation",
description: "phase decoherence field uses energy to
damage unshielded mobs that you overlap",
diff --git a/js/game.js b/js/game.js
index 4741906..b773138 100644
--- a/js/game.js
+++ b/js/game.js
@@ -96,6 +96,7 @@ const game = {
fpsCap: null, //limits frames per second to 144/2=72, on most monitors the fps is capped at 60fps by the hardware
fpsCapDefault: 72, //use to change fpsCap back to normal after a hit from a mob
isEasyToAimMode: true, //removes power ups that don't work well with a track pad
+ isCommunityMaps: false,
cyclePaused: 0,
fallHeight: 3000, //below this y position the player dies
lastTimeStamp: 0, //tracks time stamps for measuring delta
@@ -597,9 +598,10 @@ const game = {
}
return array;
}
-
+ if (game.isCommunityMaps) level.levels.push("stronghold");
level.levels = shuffle(level.levels); //shuffles order of maps
level.levels.unshift("bosses"); //add bosses level to the end of the randomized levels list
+ console.log(level.levels)
}
game.reset();
game.firstRun = false;
diff --git a/js/index.js b/js/index.js
index d2b694e..a40ab83 100644
--- a/js/index.js
+++ b/js/index.js
@@ -380,6 +380,9 @@ if (localSettings) {
game.isEasyToAimMode = localSettings.isEasyToAimMode
document.getElementById("track-pad-mode").checked = localSettings.isEasyToAimMode
+ game.isCommunityMaps = localSettings.isCommunityMaps
+ document.getElementById("community-maps").checked = localSettings.isCommunityMaps
+
game.difficultyMode = localSettings.difficultyMode
document.getElementById("difficulty-select").value = localSettings.difficultyMode
@@ -393,6 +396,7 @@ if (localSettings) {
localSettings = {
isBodyDamage: true,
isEasyToAimMode: false,
+ isCommunityMaps: false,
difficultyMode: '1',
fpsCapDefault: 'max',
};
@@ -400,6 +404,8 @@ if (localSettings) {
document.getElementById("body-damage").checked = localSettings.isBodyDamage
document.getElementById("track-pad-mode").checked = localSettings.isEasyToAimMode
game.isEasyToAimMode = localSettings.isEasyToAimMode
+ document.getElementById("community-maps").checked = localSettings.isEasyToAimMode
+ game.isCommunityMaps = localSettings.isCommunityMaps
document.getElementById("difficulty-select").value = localSettings.difficultyMode
document.getElementById("fps-select").value = localSettings.fpsCapDefault
}
@@ -503,6 +509,12 @@ document.getElementById("track-pad-mode").addEventListener("input", () => {
localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
});
+document.getElementById("community-maps").addEventListener("input", () => {
+ game.isCommunityMaps = document.getElementById("community-maps").checked
+ localSettings.isCommunityMaps = game.isCommunityMaps
+ localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
+});
+
// difficulty-select-custom event listener is set in build.makeGrid
document.getElementById("difficulty-select").addEventListener("input", () => {
game.difficultyMode = Number(document.getElementById("difficulty-select").value)
diff --git a/js/player.js b/js/player.js
index 1312b90..ccef669 100644
--- a/js/player.js
+++ b/js/player.js
@@ -1751,17 +1751,16 @@ const mech = {
isEasyToAim: true,
effect: () => {
mech.fieldFire = true;
- mech.fieldMeterColor = "#fff"
- mech.fieldPhase = 0
+ mech.fieldMeterColor = "#fff";
+ mech.fieldPhase = 0;
mech.hold = function () {
function drawField(radius) {
- radius *= 0.7 + 0.7 * mech.energy
- const rotate = mech.cycle * 0.005
- const amplitude = 0.06
- mech.fieldPhase += 0.5 - 0.5 * Math.sqrt(Math.min(mech.energy, 1))
- const off1 = 1 + amplitude * Math.sin(mech.fieldPhase) //+ 0.07 * Math.sin(mech.cycle * 0.05)
- const off2 = 1 - amplitude * Math.sin(mech.fieldPhase) //+ 0.07 * Math.sin(mech.cycle * 0.05)
+ radius *= 0.6 + 0.7 * mech.energy * b.modRenormalization;
+ const rotate = mech.cycle * 0.005;
+ mech.fieldPhase += 0.5 - 0.5 * Math.sqrt(Math.min(mech.energy, 1));
+ const off1 = 1 + 0.06 * Math.sin(mech.fieldPhase);
+ const off2 = 1 - 0.06 * Math.sin(mech.fieldPhase);
ctx.beginPath();
ctx.ellipse(mech.pos.x, mech.pos.y, radius * off1, radius * off2, rotate, 0, 2 * Math.PI);
ctx.fillStyle = "#fff" //`rgba(0,0,0,${0.5+0.5*mech.energy})`;
@@ -1770,7 +1769,7 @@ const mech = {
ctx.globalCompositeOperation = "source-over";
ctx.clip();
- if (mech.fireCDcycle > mech.cycle) {
+ if (mech.fireCDcycle > mech.cycle && (keys[32] || game.mouseDownRight)) {
ctx.lineWidth = 5;
ctx.strokeStyle = `rgba(0, 204, 255,1)`
ctx.stroke()
@@ -1788,7 +1787,7 @@ const mech = {
mech.grabPowerUp();
mech.lookForPickUp();
- const DRAIN = (0.0005 + 0.0001 * player.speed) * (mech.fireCDcycle > mech.cycle ? 4 : 1) //game.mouseDown
+ const DRAIN = (0.0005 + 0.0001 * player.speed) * (mech.fireCDcycle > mech.cycle ? 10 / b.modRenormalization : 1) //game.mouseDown
if (mech.energy > DRAIN) {
mech.energy -= DRAIN;
if (mech.energy < 0.001) {
@@ -1842,7 +1841,7 @@ const mech = {
} else {
// this.fieldRange = 3000
if (this.fieldRange < 2000 && mech.holdingTarget === null) {
- this.fieldRange += 200
+ this.fieldRange += 20
drawField(this.fieldRange)
}
mech.holdingTarget = null; //clears holding target (this is so you only pick up right after the field button is released and a hold target exists)
diff --git a/todo.txt b/todo.txt
index 8a8333c..89b4984 100644
--- a/todo.txt
+++ b/todo.txt
@@ -1,12 +1,8 @@
-
-phase decoherence field - updated graphics, can fire gun while active
-mod - fragmentation grenade fires nails
-
************** TODO - n-gon **************
pulse and time dilation only ones left with no dedicated mod
-mod - renormalization: you can shoot bullets while in phase field
+mod - renormalization: phase decoherence field has more range and less energy cost
lore - a robot (the player) gains self awareness
each mod/gun/field is a new tech
@@ -35,15 +31,6 @@ work on burn status effect
graphics don't look right
how is it different from the chemical dot
-perfect diamagnetism should get larger as it blocks more, and then slowly fade back to the normal size
-
-gun - bullets that acts like drones but only last for 2 seconds and do more damage
-
-field - the basic field emitter, but no energy loss and no knock back on blocks
- this field should make blocking a viable strategy
- gain energy on blocking?
- call it diamagnetic field and remove the diamagnetism mod?
-
mod - nails do poison damage
mod - increase laser bot range, and reduce energy drain