lore bug fixes

This commit is contained in:
landgreen
2022-09-18 20:50:39 -07:00
parent e4ebef0bc3
commit fbd56a2bca
6 changed files with 1938 additions and 1937 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -1289,6 +1289,12 @@ if (localSettings.isAllowed && !localSettings.isEmpty) {
} }
document.getElementById("banned").value = localSettings.banList document.getElementById("banned").value = localSettings.banList
if (!localSettings.isLoreDoesNotNeedReset) {
localSettings.isLoreDoesNotNeedReset = true
localSettings.loreCount = 0; //this sets what conversation is heard
if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
}
} else { } else {
console.log('setting default localSettings') console.log('setting default localSettings')
const isAllowed = localSettings.isAllowed //don't overwrite isAllowed value const isAllowed = localSettings.isAllowed //don't overwrite isAllowed value
@@ -1304,8 +1310,9 @@ if (localSettings.isAllowed && !localSettings.isEmpty) {
isTrainingNotAttempted: true, isTrainingNotAttempted: true,
levelsClearedLastGame: 0, levelsClearedLastGame: 0,
loreCount: 0, loreCount: 0,
isLoreDoesNotNeedReset: false,
isHuman: false, isHuman: false,
key: undefined key: undefined,
}; };
input.setDefault() input.setDefault()
if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage

View File

@@ -52,10 +52,11 @@ const level = {
//lore testing //lore testing
// for (let i = 0; i < 3; i++) tech.giveTech("undefined") // for (let i = 0; i < 3; i++) tech.giveTech("undefined")
// lore.techCount = 3 // lore.techCount = 2
// simulation.isCheating = false //true; // simulation.isCheating = false //true;
localSettings.loreCount = 6; //this sets what conversation is heard // level.levelsCleared = 10
if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage // localSettings.loreCount = 7; //this sets what conversation is heard
// if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
// level.onLevel = -1 //this sets level.levels[level.onLevel] = undefined which is required to run the conversation // level.onLevel = -1 //this sets level.levels[level.onLevel] = undefined which is required to run the conversation
// level.null() // level.null()
// localSettings.isHuman = true // localSettings.isHuman = true
@@ -3288,7 +3289,7 @@ const level = {
//power ups don't spawn in experiment mode, so they don't get removed at the start of experiment mode //power ups don't spawn in experiment mode, so they don't get removed at the start of experiment mode
function cycle() { function cycle() {
if (simulation.cycle > 10) { if (simulation.cycle > 10) {
if (localSettings.loreCount === 6) { if (localSettings.loreCount === 7) {
powerUps.spawn(2095 + 15 * (Math.random() - 0.5), -2170, "field", false); powerUps.spawn(2095 + 15 * (Math.random() - 0.5), -2170, "field", false);
} else { } else {
powerUps.spawnStartingPowerUps(2095 + 15 * (Math.random() - 0.5), -2070 - 125); powerUps.spawnStartingPowerUps(2095 + 15 * (Math.random() - 0.5), -2070 - 125);

View File

@@ -3,11 +3,11 @@ const lore = {
techGoal: 7, techGoal: 7,
setTechGoal() { setTechGoal() {
if (simulation.difficultyMode === 1) { if (simulation.difficultyMode === 1) {
this.techGoal = 14 this.techGoal = 8
} else if (simulation.difficultyMode === 2) { } else if (simulation.difficultyMode === 2) {
this.techGoal = 7 this.techGoal = 5
} else if (simulation.difficultyMode === 4) { } else if (simulation.difficultyMode === 4) {
this.techGoal = 3 this.techGoal = 2
} else if (simulation.difficultyMode === 6) { } else if (simulation.difficultyMode === 6) {
this.techGoal = 1 this.techGoal = 1
} }
@@ -641,6 +641,7 @@ const lore = {
lore.anand.text(`So why don't you try to get the final level of the simulation without killing any mobs?`) lore.anand.text(`So why don't you try to get the final level of the simulation without killing any mobs?`)
localSettings.loreCount++ localSettings.loreCount++
if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
console.log(localSettings.loreCount)
}, },
() => { lore.miriam.text(`Ok check back in and let us know how it goes.`) }, () => { lore.miriam.text(`Ok check back in and let us know how it goes.`) },
() => { lore.anand.text("bye") }, () => { lore.anand.text("bye") },
@@ -663,14 +664,14 @@ const lore = {
() => { () => {
if (mobs.mobDeaths < level.levelsCleared) { if (mobs.mobDeaths < level.levelsCleared) {
lore.miriam.text(`So I think it worked.`) lore.miriam.text(`So I think it worked.`)
} else { } else if (!simulation.isCheating) {
lore.miriam.text(`Looks like you got back here, but you you killed ${mobs.mobDeaths} mobs`) lore.miriam.text(`Looks like you got back here, but you you killed ${mobs.mobDeaths} mobs`)
} }
}, },
() => { () => {
if (mobs.mobDeaths < level.levelsCleared) { if (mobs.mobDeaths < level.levelsCleared) {
lore.anand.text(`Yeah, at the end it wasn't attacking you.`) lore.anand.text(`Yeah, at the end it wasn't attacking you.`)
} else { } else if (!simulation.isCheating) {
lore.miriam.text(`Try again to get ot the final boss without killing any mobs.`) lore.miriam.text(`Try again to get ot the final boss without killing any mobs.`)
} }
}, },

3838
js/tech.js

File diff suppressed because it is too large Load Diff

View File

@@ -1,14 +1,6 @@
******************************************************** NEXT PATCH ************************************************** ******************************************************** NEXT PATCH **************************************************
ghoster mobs are faster
teatherBoss spawns some seekerBullets on death
added 2 more lore chapters
7 total
bug fixes
updated requirements text
*********************************************************** TODO ***************************************************** *********************************************************** TODO *****************************************************