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") {
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

View File

@@ -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

View File

@@ -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() {

View File

@@ -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) {

View File

@@ -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(`<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>")`);
level.levels.push("null")
simulation.makeTextLog(`<span class="lore-text">undefined</span> <span class='color-symbol'>=</span> ${lore.techCount}/${lore.techGoal}`, 360);
setTimeout(function() {
simulation.makeTextLog(`level.levels.push("<span class='lore-text'>null</span>")`, 720);
unlockExit()
level.levels.push("null")
}, 4000);
//remove block map element so exit is clear
unlockExit()
} else { //reset game
let count = 0

View File

@@ -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;

View File

@@ -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