From 30e2a607bd8ef418683d4be332e505e8f7a8c04b Mon Sep 17 00:00:00 2001 From: landgreen Date: Sun, 31 Oct 2021 14:45:10 -0700 Subject: [PATCH] cheaper lore number of undefined tech needed to get lore is now lower at higher difficulty modes bug fixes --- .DS_Store | Bin 6148 -> 6148 bytes js/index.js | 4 ++++ js/level.js | 4 ++-- js/lore.js | 12 ++++++++++++ js/player.js | 2 +- js/spawn.js | 9 ++++++--- js/tech.js | 5 +++-- todo.txt | 18 +----------------- 8 files changed, 29 insertions(+), 25 deletions(-) diff --git a/.DS_Store b/.DS_Store index d519a288f4564e7b33fab1d51041f38f67bb2578..949d80df586c12a4655ebd64d45f779f8746a3af 100644 GIT binary patch delta 22 dcmZoMXffEJ#mw|aYqAcrFO%Ga&DG4EA^=kt2KxX2 delta 22 dcmZoMXffEJ#mw|`!ekw0Unbdt&DG4EA^=xZ2R#4) diff --git a/js/index.js b/js/index.js index 484bc54..c624667 100644 --- a/js/index.js +++ b/js/index.js @@ -126,6 +126,7 @@ window.addEventListener('load', () => { if (property === "difficulty") { simulation.difficultyMode = Number(set[property]) + lore.setTechGoal() document.getElementById("difficulty-select-experiment").value = Number(set[property]) } if (property === "level") document.getElementById("starting-level").value = Math.max(Number(set[property]) - 1, 0) @@ -486,6 +487,7 @@ const build = { document.getElementById("difficulty-select-experiment").value = document.getElementById("difficulty-select").value document.getElementById("difficulty-select-experiment").addEventListener("input", () => { simulation.difficultyMode = Number(document.getElementById("difficulty-select-experiment").value) + lore.setTechGoal() localSettings.difficultyMode = Number(document.getElementById("difficulty-select-experiment").value) document.getElementById("difficulty-select").value = document.getElementById("difficulty-select-experiment").value localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage @@ -1155,6 +1157,7 @@ if (localSettings) { simulation.isCommunityMaps = localSettings.isCommunityMaps document.getElementById("community-maps").checked = localSettings.isCommunityMaps simulation.difficultyMode = localSettings.difficultyMode + lore.setTechGoal() document.getElementById("difficulty-select").value = localSettings.difficultyMode if (localSettings.fpsCapDefault === 'max') { simulation.fpsCapDefault = 999999999; @@ -1208,6 +1211,7 @@ document.getElementById("community-maps").addEventListener("input", () => { // difficulty-select-experiment event listener is set in build.makeGrid document.getElementById("difficulty-select").addEventListener("input", () => { simulation.difficultyMode = Number(document.getElementById("difficulty-select").value) + lore.setTechGoal() localSettings.difficultyMode = simulation.difficultyMode localSettings.levelsClearedLastGame = 0 //after changing difficulty, reset run history localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage diff --git a/js/level.js b/js/level.js index 3e160e1..e1eefe7 100644 --- a/js/level.js +++ b/js/level.js @@ -54,8 +54,8 @@ const level = { // level.tunnel() //community level // powerUps.research.changeRerolls(3000) // for (let i = 0; i < 30; i++) powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "tech", false); - // for (let i = 0; i < 7; i++) tech.giveTech("undefined") - // lore.techCount = 6 + // for (let i = 0; i < 3; i++) tech.giveTech("undefined") + // lore.techCount = 3 // simulation.isCheating = false //true; // localSettings.loreCount = 3; //this sets what conversation is heard diff --git a/js/lore.js b/js/lore.js index 388f0e8..67ef38d 100644 --- a/js/lore.js +++ b/js/lore.js @@ -1,6 +1,18 @@ const lore = { techCount: 0, techGoal: 7, + setTechGoal() { + if (simulation.difficultyMode === 1) { + this.techGoal = 14 + } else if (simulation.difficultyMode === 2) { + this.techGoal = 7 + } else if (simulation.difficultyMode === 4) { + this.techGoal = 3 + } else if (simulation.difficultyMode === 6) { + this.techGoal = 1 + } + + }, talkingColor: "#dff", //set color of graphic on level.null isSpeech: false, testSpeechAPI() { diff --git a/js/player.js b/js/player.js index b4655a3..c53e79d 100644 --- a/js/player.js +++ b/js/player.js @@ -2431,7 +2431,7 @@ const m = { let isMobsAround = false const stunRange = m.fieldDrawRadius * 1.5 const drain = 0.15 - const stunTime = 180 + const stunTime = 240 if (m.energy > drain) { for (let i = 0, len = mob.length; i < len; ++i) { if (Vector.magnitude(Vector.sub(mob[i].position, m.pos)) < stunRange && Matter.Query.ray(map, mob[i].position, m.pos).length === 0 && !mob[i].isBadTarget) { diff --git a/js/spawn.js b/js/spawn.js index 50edca7..3372f2e 100644 --- a/js/spawn.js +++ b/js/spawn.js @@ -317,10 +317,13 @@ const spawn = { //add lore level as next level if player took lore tech earlier in the game if (lore.techCount > (lore.techGoal - 1) && !simulation.isCheating) { - simulation.makeTextLog(`undefined = ${lore.techCount}/${lore.techGoal}
level.levels.push("null")`); - level.levels.push("null") + simulation.makeTextLog(`undefined = ${lore.techCount}/${lore.techGoal}`, 360); + setTimeout(function() { + simulation.makeTextLog(`level.levels.push("null")`, 720); + unlockExit() + level.levels.push("null") + }, 4000); //remove block map element so exit is clear - unlockExit() } else { //reset game let count = 0 diff --git a/js/tech.js b/js/tech.js index 7c29da8..ec57d71 100644 --- a/js/tech.js +++ b/js/tech.js @@ -6270,8 +6270,8 @@ isFieldTech: true, maxCount: 1, count: 0, - frequency: 2, - frequencyDefault: 2, + frequency: 200, + frequencyDefault: 200, allowed() { return m.fieldUpgrades[m.fieldMode].name === "time dilation" && !m.isShipMode && !tech.isRewindAvoidDeath && !tech.isEnergyHealth && !tech.isTimeSkip && !tech.isFreezeMobs }, @@ -6279,6 +6279,7 @@ effect() { tech.isRewindField = true; m.fieldUpgrades[m.fieldMode].set() + m.wakeCheck(); }, remove() { tech.isRewindField = false; diff --git a/todo.txt b/todo.txt index 2e08075..9f0a443 100644 --- a/todo.txt +++ b/todo.txt @@ -1,27 +1,11 @@ ******************************************************** NEXT PATCH ************************************************** -time dilation tech: retrocausality - instead of pausing time your field rewinds time, including your health - this tech replaces replaces CPT gun - works well with tech: causality bots and grenades - -wormhole - activated on mouse up - draw an outline of the wormhole to show if can work at your mouse location - -adiabatic healing: adds 5% JUNK in addition to 100% better heals - -several tech pool frequencies have been adjusted to roughly this rule: - no requirements: 1x chance - requirements: 2x chance - (most gun and field tech) - strict requirements: 3x chance or higher +number of undefined tech needed to get lore is now lower at higher difficulty modes bug fixes ******************************************************** TODO ******************************************************** -make causality bots and bombs work with retrocausality - tech: after bullets hit a mob, the mob takes 1% more damage this.damageReduction *= 1.01