cheaper lore

number of undefined tech needed to get lore is now lower at higher difficulty modes

bug fixes
This commit is contained in:
landgreen
2021-10-31 14:45:10 -07:00
parent 093e56dd12
commit 30e2a607bd
8 changed files with 29 additions and 25 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -126,6 +126,7 @@ window.addEventListener('load', () => {
if (property === "difficulty") { if (property === "difficulty") {
simulation.difficultyMode = Number(set[property]) simulation.difficultyMode = Number(set[property])
lore.setTechGoal()
document.getElementById("difficulty-select-experiment").value = Number(set[property]) document.getElementById("difficulty-select-experiment").value = Number(set[property])
} }
if (property === "level") document.getElementById("starting-level").value = Math.max(Number(set[property]) - 1, 0) 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").value = document.getElementById("difficulty-select").value
document.getElementById("difficulty-select-experiment").addEventListener("input", () => { document.getElementById("difficulty-select-experiment").addEventListener("input", () => {
simulation.difficultyMode = Number(document.getElementById("difficulty-select-experiment").value) simulation.difficultyMode = Number(document.getElementById("difficulty-select-experiment").value)
lore.setTechGoal()
localSettings.difficultyMode = Number(document.getElementById("difficulty-select-experiment").value) localSettings.difficultyMode = Number(document.getElementById("difficulty-select-experiment").value)
document.getElementById("difficulty-select").value = 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 localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
@@ -1155,6 +1157,7 @@ if (localSettings) {
simulation.isCommunityMaps = localSettings.isCommunityMaps simulation.isCommunityMaps = localSettings.isCommunityMaps
document.getElementById("community-maps").checked = localSettings.isCommunityMaps document.getElementById("community-maps").checked = localSettings.isCommunityMaps
simulation.difficultyMode = localSettings.difficultyMode simulation.difficultyMode = localSettings.difficultyMode
lore.setTechGoal()
document.getElementById("difficulty-select").value = localSettings.difficultyMode document.getElementById("difficulty-select").value = localSettings.difficultyMode
if (localSettings.fpsCapDefault === 'max') { if (localSettings.fpsCapDefault === 'max') {
simulation.fpsCapDefault = 999999999; simulation.fpsCapDefault = 999999999;
@@ -1208,6 +1211,7 @@ document.getElementById("community-maps").addEventListener("input", () => {
// difficulty-select-experiment event listener is set in build.makeGrid // difficulty-select-experiment event listener is set in build.makeGrid
document.getElementById("difficulty-select").addEventListener("input", () => { document.getElementById("difficulty-select").addEventListener("input", () => {
simulation.difficultyMode = Number(document.getElementById("difficulty-select").value) simulation.difficultyMode = Number(document.getElementById("difficulty-select").value)
lore.setTechGoal()
localSettings.difficultyMode = simulation.difficultyMode localSettings.difficultyMode = simulation.difficultyMode
localSettings.levelsClearedLastGame = 0 //after changing difficulty, reset run history localSettings.levelsClearedLastGame = 0 //after changing difficulty, reset run history
localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage

View File

@@ -54,8 +54,8 @@ const level = {
// level.tunnel() //community level // level.tunnel() //community level
// powerUps.research.changeRerolls(3000) // 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 < 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") // for (let i = 0; i < 3; i++) tech.giveTech("undefined")
// lore.techCount = 6 // lore.techCount = 3
// simulation.isCheating = false //true; // simulation.isCheating = false //true;
// localSettings.loreCount = 3; //this sets what conversation is heard // localSettings.loreCount = 3; //this sets what conversation is heard

View File

@@ -1,6 +1,18 @@
const lore = { const lore = {
techCount: 0, techCount: 0,
techGoal: 7, 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 talkingColor: "#dff", //set color of graphic on level.null
isSpeech: false, isSpeech: false,
testSpeechAPI() { testSpeechAPI() {

View File

@@ -2431,7 +2431,7 @@ const m = {
let isMobsAround = false let isMobsAround = false
const stunRange = m.fieldDrawRadius * 1.5 const stunRange = m.fieldDrawRadius * 1.5
const drain = 0.15 const drain = 0.15
const stunTime = 180 const stunTime = 240
if (m.energy > drain) { if (m.energy > drain) {
for (let i = 0, len = mob.length; i < len; ++i) { 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) { 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) {

View File

@@ -317,10 +317,13 @@ const spawn = {
//add lore level as next level if player took lore tech earlier in the game //add lore level as next level if player took lore tech earlier in the game
if (lore.techCount > (lore.techGoal - 1) && !simulation.isCheating) { if (lore.techCount > (lore.techGoal - 1) && !simulation.isCheating) {
simulation.makeTextLog(`<span class="lore-text">undefined</span> <span class='color-symbol'>=</span> ${lore.techCount}/${lore.techGoal}<br>level.levels.push("<span class='lore-text'>null</span>")`); simulation.makeTextLog(`<span class="lore-text">undefined</span> <span class='color-symbol'>=</span> ${lore.techCount}/${lore.techGoal}`, 360);
level.levels.push("null") setTimeout(function() {
//remove block map element so exit is clear simulation.makeTextLog(`level.levels.push("<span class='lore-text'>null</span>")`, 720);
unlockExit() unlockExit()
level.levels.push("null")
}, 4000);
//remove block map element so exit is clear
} else { //reset game } else { //reset game
let count = 0 let count = 0

View File

@@ -6270,8 +6270,8 @@
isFieldTech: true, isFieldTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 2, frequency: 200,
frequencyDefault: 2, frequencyDefault: 200,
allowed() { allowed() {
return m.fieldUpgrades[m.fieldMode].name === "time dilation" && !m.isShipMode && !tech.isRewindAvoidDeath && !tech.isEnergyHealth && !tech.isTimeSkip && !tech.isFreezeMobs return m.fieldUpgrades[m.fieldMode].name === "time dilation" && !m.isShipMode && !tech.isRewindAvoidDeath && !tech.isEnergyHealth && !tech.isTimeSkip && !tech.isFreezeMobs
}, },
@@ -6279,6 +6279,7 @@
effect() { effect() {
tech.isRewindField = true; tech.isRewindField = true;
m.fieldUpgrades[m.fieldMode].set() m.fieldUpgrades[m.fieldMode].set()
m.wakeCheck();
}, },
remove() { remove() {
tech.isRewindField = false; tech.isRewindField = false;

View File

@@ -1,27 +1,11 @@
******************************************************** NEXT PATCH ************************************************** ******************************************************** NEXT PATCH **************************************************
time dilation tech: retrocausality - instead of pausing time your field rewinds time, including your health number of undefined tech needed to get lore is now lower at higher difficulty modes
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
bug fixes bug fixes
******************************************************** TODO ******************************************************** ******************************************************** TODO ********************************************************
make causality bots and bombs work with retrocausality
tech: after bullets hit a mob, the mob takes 1% more damage tech: after bullets hit a mob, the mob takes 1% more damage
this.damageReduction *= 1.01 this.damageReduction *= 1.01