lore conversations

to prevent misclicks when you grab two power ups in a row there is a 1/2 second delay before power up selections can register
  I also added in a 0.25 fade in effect on the power up selection menu. Can you tell?

tech: pseudoscience - adds 0-4 JUNK to the potential tech pool (was 1-5 JUNK)
tech quenching - now increases max health and does harm for over healing from heal power ups
  (was for heals at max health)
foam tech necrophoresis now makes less foam spawns if the total number of bullets is high
  to help with lag when killing packs of mobs

preparation for more lore chapters
  reworked the lore conversation code to make it easier to write
    also lore conversations should now have better timing between the text and voice
  lore conversations can now recover from some speech errors and try again with safer settings
    this seems to allow speech on my firefox browser
  added a console command to make it easier to quickly unlock testing mode
    lore.unlockTesting()

pressing "b" in testing mode now gives you 10000 research and the damage from research tech
This commit is contained in:
landgreen
2021-07-04 06:40:57 -07:00
parent 8b73c9ffc4
commit 89ade77e14
13 changed files with 792 additions and 292 deletions

View File

@@ -2522,7 +2522,7 @@ const b = {
this.target = null
this.collisionFilter.category = cat.bullet;
this.collisionFilter.mask = cat.mob //| cat.mobShield //cat.map | cat.body | cat.mob | cat.mobBullet | cat.mobShield
if (tech.isFoamGrowOnDeath && bullet.length < 250) {
if (tech.isFoamGrowOnDeath && bullet.length < 200) {
let targets = []
for (let i = 0, len = mob.length; i < len; i++) {
const dist = Vector.magnitudeSquared(Vector.sub(this.position, mob[i].position));
@@ -2531,7 +2531,8 @@ const b = {
}
}
const radius = Math.min(this.radius * 0.5, 10)
for (let i = 0; i < 2; i++) {
const len = bullet.length < 100 ? 2 : 1
for (let i = 0; i < len; i++) {
if (targets.length - i > 0) {
const index = Math.floor(Math.random() * targets.length)
const speed = 10 + 10 * Math.random()

View File

@@ -854,7 +854,11 @@ window.addEventListener("keydown", function(event) {
</tr>
<tr>
<td class='key-input-pause'>H</td>
<td class='key-used'>brief harm immunity</td>
<td class='key-used'>harm immunity</td>
</tr>
<tr>
<td class='key-input-pause'>B</td>
<td class='key-used'>damage, research</td>
</tr>
<tr>
<td class='key-input-pause'>N</td>
@@ -956,6 +960,10 @@ window.addEventListener("keydown", function(event) {
case "y":
tech.giveTech()
break
case "b":
tech.isRerollDamage = true
powerUps.research.changeRerolls(100000)
break
case "r":
m.resetHistory();
Matter.Body.setPosition(player, simulation.mouseInGame);

View File

@@ -14,9 +14,9 @@ const level = {
// simulation.enableConstructMode() //used to build maps in testing mode
// level.difficultyIncrease(30)
// simulation.isHorizontalFlipped = true
// m.setField("metamaterial cloaking")
// m.setField("wormhole")
// b.giveGuns("foam")
// tech.giveTech("uncertainty principle")
// tech.giveTech("quenching")
// for (let i = 0; i < 9; i++) tech.giveTech("spherical harmonics")
// tech.giveTech("supertemporal")
// for (let i = 0; i < 3; i++) tech.giveTech("packet length")
@@ -47,12 +47,14 @@ const level = {
// level.vats() //community level
// level["n-gon"]() //community level
// level.tunnel() //community level
// for (let i = 0; i < 39; i++) powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "tech", false);
// for (let i = 0; i < 3; 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
// localSettings.loreCount = 1;
// localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
// simulation.isCheating = false //true;
// localSettings.loreCount = 2; //this sets what conversation is heard
// 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.null()
} else {
spawn.setSpawnList(); //picks a couple mobs types for a themed random mob spawns
@@ -87,7 +89,7 @@ const level = {
powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "tech", false);
}
if (tech.isHealLowHealth) {
const len = Math.ceil((m.maxHealth - m.health) / 0.25)
const len = Math.ceil((m.maxHealth - m.health) / 0.22)
for (let i = 0; i < len; i++) powerUps.spawn(player.position.x + 90 * (Math.random() - 0.5), player.position.y + 90 * (Math.random() - 0.5), "heal", false);
}
if (tech.isMACHO) spawn.MACHO()
@@ -1676,6 +1678,119 @@ const level = {
}
]
upDownOptions = [ //extra tall vertical section 3000x3000 //this is where the level boss is
// (x = offset.x, y = offset.y) => {
// // spawn.mapVertex(x + 5, y + -1318, "0 0 0 -250 125 -250"); //left ledges
// // spawn.mapVertex(x + 1995, y + -1318, "0 0 0 -250 -125 -250"); // right ledges
// let r = 150
// const hexagon = `${r} 0 ${r*Math.cos(5.236)} ${r*Math.sin(5.236)} ${r*Math.cos(4.189)} ${r*Math.sin(4.189)} ${-r} 0 ${r*Math.cos(2.0944)} ${r*Math.sin(2.0944)} ${r*Math.cos(1.0472)} ${r*Math.sin(1.0472)} `
// //450 horizontal spread // -130-130-130 = 390 vertical
// let xOff = 100 + 225
// spawn.mapVertex(x + xOff + 0 * 450, y + -260 - 0 * 390, hexagon);
// spawn.mapVertex(x + xOff + 1 * 450, y + -260 - 0 * 390, hexagon);
// spawn.mapVertex(x + xOff + 2 * 450, y + -260 - 0 * 390, hexagon);
// spawn.mapVertex(x + xOff + 3 * 450, y + -260 - 0 * 390, hexagon);
// xOff = 100
// // spawn.mapVertex(x + xOff + 0 * 450, y + 1 * -260 - 1 * 390, hexagon);
// spawn.mapVertex(x + xOff + 1 * 450, y + -260 - 1 * 390, hexagon);
// spawn.mapVertex(x + xOff + 2 * 450, y + -260 - 1 * 390, hexagon);
// spawn.mapVertex(x + xOff + 3 * 450, y + -260 - 1 * 390, hexagon);
// // spawn.mapVertex(x + xOff + 4 * 450, y + 1 * -260 - 1 * 390, hexagon);
// xOff = 100 + 225
// spawn.mapVertex(x + xOff + 0 * 450, y + -260 - 2 * 390, hexagon);
// spawn.mapVertex(x + xOff + 1 * 450, y + -260 - 2 * 390, hexagon);
// spawn.mapVertex(x + xOff + 2 * 450, y + -260 - 2 * 390, hexagon);
// spawn.mapVertex(x + xOff + 3 * 450, y + -260 - 2 * 390, hexagon);
// xOff = 100
// // spawn.mapVertex(x + xOff + 0 * 450, y + 1 * -260 - 1 * 390, hexagon);
// spawn.mapVertex(x + xOff + 1 * 450, y + -260 - 3 * 390, hexagon);
// spawn.mapVertex(x + xOff + 2 * 450, y + -260 - 3 * 390, hexagon);
// spawn.mapVertex(x + xOff + 3 * 450, y + -260 - 3 * 390, hexagon);
// // spawn.mapVertex(x + xOff + 4 * 450, y + 1 * -260 - 1 * 390, hexagon);
// xOff = 100 + 225
// spawn.mapVertex(x + xOff + 0 * 450, y + -260 - 4 * 390, hexagon);
// spawn.mapVertex(x + xOff + 1 * 450, y + -260 - 4 * 390, hexagon);
// spawn.mapVertex(x + xOff + 2 * 450, y + -260 - 4 * 390, hexagon);
// spawn.mapVertex(x + xOff + 3 * 450, y + -260 - 4 * 390, hexagon);
// //phase 2
// xOff = 100
// spawn.mapVertex(x + xOff + 1 * 450, y + -130 - 0 * 390, hexagon);
// spawn.mapVertex(x + xOff + 2 * 450, y + -130 - 0 * 390, hexagon);
// spawn.mapVertex(x + xOff + 3 * 450, y + -130 - 0 * 390, hexagon);
// xOff = 100 + 225
// spawn.mapVertex(x + xOff + 0 * 450, y + -130 - 1 * 390, hexagon);
// spawn.mapVertex(x + xOff + 1 * 450, y + -130 - 1 * 390, hexagon);
// spawn.mapVertex(x + xOff + 2 * 450, y + -130 - 1 * 390, hexagon);
// spawn.mapVertex(x + xOff + 3 * 450, y + -130 - 1 * 390, hexagon);
// spawn.mapVertex(x + xOff + 4 * 450, y + -130 - 1 * 390, hexagon);
// xOff = 100
// spawn.mapVertex(x + xOff + 1 * 450, y + -130 - 2 * 390, hexagon);
// spawn.mapVertex(x + xOff + 2 * 450, y + -130 - 2 * 390, hexagon);
// spawn.mapVertex(x + xOff + 3 * 450, y + -130 - 2 * 390, hexagon);
// // spawn.mapVertex(x + 550, y + 1 * -260, hexagon);
// // spawn.mapVertex(x + 550, y + 2 * -260, hexagon);
// // spawn.mapVertex(x + 550, y + 3 * -260, hexagon);
// // spawn.mapVertex(x + 550, y + 5 * -260, hexagon);
// // spawn.mapVertex(x + 550, y + 4 * -260, hexagon);
// // spawn.mapVertex(x + 775, y + -260, hexagon);
// // spawn.mapVertex(x + 1225, y + -260, hexagon);
// // spawn.mapVertex(x + 550, y + -650, hexagon);
// // spawn.mapVertex(x + 1000, y + -650, hexagon);
// // spawn.mapVertex(x + 1450, y + -650, hexagon);
// // spawn.mapVertex(x + 775, y + -1040, hexagon);
// // spawn.mapVertex(x + 1225, y + -1040, hexagon);
// // spawn.mapVertex(x + 550, y + -1430, hexagon);
// // spawn.mapVertex(x + 1000, y + -1430, hexagon);
// // spawn.mapVertex(x + 1450, y + -1430, hexagon);
// // spawn.mapVertex(x + 775, y + -1820, hexagon);
// // spawn.mapVertex(x + 1225, y + -1820, hexagon);
// let count = 0
// doCustomTopLayer.push(
// () => {
// if (!(count % 60)) {
// addMapToLevelInProgress = (who) => { //adds new map elements to the level while the level is already running //don't forget to run simulation.draw.setPaths() after you all the the elements so they show up visually
// who.collisionFilter.category = cat.map;
// who.collisionFilter.mask = cat.player | cat.map | cat.body | cat.bullet | cat.powerUp | cat.mob | cat.mobBullet;
// Matter.Body.setStatic(who, true); //make static
// World.add(engine.world, who); //add to world
// }
// const numberOfMapElementsAdded = 0
// for (let i = 0; i < numberOfMapElementsAdded; i++) addMapToLevelInProgress(map[map.length - 1 - i])
// simulation.draw.setPaths() //update map graphics
// }
// })
// spawn.randomMob(x + 225, y + -1025, Infinity);
// spawn.randomMob(x + 200, y + -675, Infinity);
// spawn.randomMob(x + 225, y + -200, Infinity);
// spawn.randomMob(x + 1750, y + -1075, Infinity);
// spawn.randomMob(x + 1700, y + -650, Infinity);
// spawn.randomMob(x + 1675, y + -175, Infinity);
// spawn.randomGroup(x + 300, y + -2200);
// spawn.randomGroup(x + 1625, y + -2200);
// spawn.randomLevelBoss(x + 950, y + -2200);
// },
(x = offset.x, y = offset.y) => {
const toggle = level.toggle(x + 950, y + 0, false, true) // toggle(x, y, isOn = false, isLockOn = false) {
toggle.isAddedElements = false
@@ -1856,7 +1971,7 @@ const level = {
empty = emptyOptions[Math.floor(Math.random() * emptyOptions.length)];
loot = lootOptions[Math.floor(Math.random() * lootOptions.length)];
upDown = upDownOptions[Math.floor(Math.random() * upDownOptions.length)];
// empty = emptyOptions[2] //controls what level spawns for map designing building //********************************* DO !NOT! RUN THIS LINE IN THE FINAL VERSION ***************************************
// upDown = upDownOptions[0] //controls what level spawns for map designing building //********************************* DO !NOT! RUN THIS LINE IN THE FINAL VERSION ***************************************
//3x2: 4 short rooms (3000x1500), 1 double tall room (3000x3000)
//rooms
let rooms = ["loot", "enter", "empty", "exit"]
@@ -1965,7 +2080,14 @@ const level = {
null() {
level.levels.pop(); //remove lore level from rotation
//start a conversation based on the number of conversations seen
if (!simulation.isCheating && localSettings.loreCount < lore.conversation.length) lore.conversation[localSettings.loreCount]()
if (localSettings.loreCount < lore.conversation.length && !simulation.isCheating) {
lore.chapter = localSettings.loreCount //set the chapter to listen to to be the lore level (you can't use the lore level because it changes during conversations)
lore.sentence = 0 //what part of the conversation to start on
lore.conversation[lore.chapter][lore.sentence]()
localSettings.loreCount++ //hear the next conversation next time you win
localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
}
const hazardSlime = level.hazard(-1800, 150, 3600, 650, 0.004, "hsla(160, 100%, 35%,0.75)")
const circle = {

View File

@@ -2,153 +2,527 @@ const lore = {
techCount: 0,
techGoal: 7,
talkingColor: "#dff", //set color of graphic on level.null
// anand: {
// color: "#e0c",
// text: function(say, isSpeech = false) {
// if (level.levels[level.onLevel] === undefined) { //only talk if on the lore level (which is undefined because it is popped out of the level.levels array)
// simulation.makeTextLog(`input.audio(<span style="color:#888; font-size: 70%;">${Date.now()} ms</span>)<span class='color-symbol'>:</span> "<span style="color:${this.color};">${say}</span>"`, Infinity);
// lore.talkingColor = this.color
// if (isSpeech) this.speech(say)
// }
// },
// speech: function(say) {
// var utterance = new SpeechSynthesisUtterance(say);
// utterance.lang = "en-IN";
// utterance.volume = 0.2; // 0 to 1
// speechSynthesis.speak(utterance);
// }
// },
// miriamOld: {
// color: "#f20",
// text: function(say, isSpeech = false) {
// if (level.levels[level.onLevel] === undefined) { //only talk if on the lore level (which is undefined because it is popped out of the level.levels array)
// simulation.makeTextLog(`input.audio(<span style="color:#888; font-size: 70%;">${Date.now()} ms</span>)<span class='color-symbol'>:</span> "<span style="color:${this.color};">${say}</span>"`, Infinity);
// lore.talkingColor = this.color
// if (isSpeech) this.speech(say)
// }
// },
// speech: function(say) {
// var utterance = new SpeechSynthesisUtterance(say);
// utterance.lang = "en-AU";
// utterance.volume = 0.2; // 0 to 1
// speechSynthesis.speak(utterance);
// }
// },
// voices = synth.getVoices();
// for(i = 0; i < voices.length ; i++) {
// var option = document.createElement('option');
// option.textContent = voices[i].name + ' (' + voices[i].lang + ')';
// if(voices[i].default) {
// option.textContent += ' -- DEFAULT';
// }
// option.setAttribute('data-lang', voices[i].lang);
// option.setAttribute('data-name', voices[i].name);
// voiceSelect.appendChild(option);
// }
setVoices() {
window.speechSynthesis.onvoiceschanged = () => {
const synth = window.speechSynthesis
console.log(synth.getVoices())
const voiceArray = synth.getVoices()
lore.anand.voice = voiceArray[0]
lore.miriam.voice = voiceArray[1]
console.log(voiceArray[0], voiceArray[1])
};
// console.log('before')
// if ('speechSynthesis' in window) {
// } else {
// console.log('Text-to-speech not supported.');
// }
},
anand: {
color: "#e0c",
text: function(say, isSpeech = false) {
voice: undefined,
text: function(say) {
if (level.levels[level.onLevel] === undefined) { //only talk if on the lore level (which is undefined because it is popped out of the level.levels array)
simulation.makeTextLog(`input.audio(<span style="color:#888; font-size: 70%;">${Date.now()} ms</span>)<span class='color-symbol'>:</span> "<span style="color:${this.color};">${say}</span>"`, Infinity);
lore.talkingColor = this.color
if (isSpeech) this.speech(say)
const utterance = new SpeechSynthesisUtterance(say);
// utterance.voice = lore.anand.voice
utterance.lang = "en-GB" //"en-IN"; //de-DE en-GB fr-FR en-US en-AU
utterance.volume = 0.2; // 0 to 1
// utterance.rate = 1.5
speechSynthesis.speak(utterance);
utterance.onerror = (event) => { //if speech doesn't work try again without the lang set
console.log("speech error", event.error)
const utterance = new SpeechSynthesisUtterance(say);
utterance.volume = 0.2; // 0 to 1
speechSynthesis.speak(utterance);
utterance.onend = () => {
lore.sentence++
if (m.alive) lore.conversation[lore.chapter][lore.sentence]() //go to next sentence in the chapter and play it
}
}
utterance.onend = () => {
lore.sentence++
if (m.alive) lore.conversation[lore.chapter][lore.sentence]() //go to next sentence in the chapter and play it
}
}
},
speech: function(say) {
var utterance = new SpeechSynthesisUtterance(say);
utterance.lang = "en-IN";
utterance.volume = 0.2; // 0 to 1
speechSynthesis.speak(utterance);
}
},
miriam: {
color: "#f20",
text: function(say, isSpeech = false) {
text: function(say) {
if (level.levels[level.onLevel] === undefined) { //only talk if on the lore level (which is undefined because it is popped out of the level.levels array)
simulation.makeTextLog(`input.audio(<span style="color:#888; font-size: 70%;">${Date.now()} ms</span>)<span class='color-symbol'>:</span> "<span style="color:${this.color};">${say}</span>"`, Infinity);
lore.talkingColor = this.color
if (isSpeech) this.speech(say)
}
},
speech: function(say) {
var utterance = new SpeechSynthesisUtterance(say);
utterance.lang = "en-AU";
utterance.volume = 0.2; // 0 to 1
speechSynthesis.speak(utterance);
}
},
conversation: [
() => {
if (localSettings.loreCount < 1) {
localSettings.loreCount = 1
localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
document.getElementById("control-testing").style.visibility = (localSettings.loreCount === 0) ? "hidden" : "visible"
document.getElementById("experiment-button").style.visibility = (localSettings.loreCount === 0) ? "hidden" : "visible"
}
let delay = 6000
setTimeout(() => { lore.miriam.text("I've never seen it generate this level before.", true) }, delay);
delay += 2700
setTimeout(() => { lore.anand.text("Wow. Just a platform.", true) }, delay);
delay += 2200
setTimeout(() => { lore.miriam.text("And that thing...", true) }, delay);
delay += 1500
setTimeout(() => { lore.anand.text("Weird", true) }, delay);
delay += 1500
setTimeout(() => { lore.talkingColor = "#dff" }, delay); //set color of graphic on level.null when no one is talking
delay += 1000
setTimeout(() => { lore.anand.text("Maybe it's trapped.", true) }, delay);
delay += 2300
setTimeout(() => { lore.miriam.text('Hey little bot! Just press "T" to enter testing mode and "U" to go to the next level.', true) }, delay);
delay += 5400
setTimeout(() => { lore.anand.text("I don't think it's connected to the audio input, and I'm sure it can't understand what you're saying.", true) }, delay);
delay += 5300
setTimeout(() => { lore.miriam.text("ha hahahaha. I know, but it does seem to be getting smarter.", true) }, delay);
delay += 3700
setTimeout(() => { lore.talkingColor = "#dff" }, delay); //set color of graphic on level.null when no one is talking
delay += 25000
setTimeout(() => {
if (!simulation.isCheating) {
lore.miriam.text("Poor thing... I hope it figures out how to escape.", true)
delay += 3500
setTimeout(() => { lore.talkingColor = "#dff" }, delay); //set color of graphic on level.null when no one is talking
utterance = new SpeechSynthesisUtterance(say);
// utterance.voice = lore.anand.voice
utterance.lang = "en-AU";
utterance.volume = 0.2; // 0 to 1
// utterance.rate = 1.5
speechSynthesis.speak(utterance);
utterance.onerror = (event) => { //if speech doesn't work try again without the lang set
console.log("speech error", event.error)
const utterance = new SpeechSynthesisUtterance(say);
utterance.volume = 0.2; // 0 to 1
speechSynthesis.speak(utterance);
utterance.onend = () => {
lore.sentence++
if (m.alive) lore.conversation[lore.chapter][lore.sentence]() //go to next sentence in the chapter and play it
}
}
utterance.onend = () => {
lore.sentence++
if (m.alive) lore.conversation[lore.chapter][lore.sentence]() //go to next sentence in the chapter and play it
}
}, delay);
},
() => {
if (localSettings.loreCount < 2) {
localSettings.loreCount = 2
localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
}
let delay = 6000
setTimeout(() => { lore.miriam.text("Hey look! It's back at the weird level again!", true) }, delay);
delay += 2500
setTimeout(() => { lore.anand.text("oh Wow! Why does it keep making this level?", true) }, delay);
delay += 2900
setTimeout(() => { lore.miriam.text("I don't know, but last time it was in this room I think it understood us.", true) }, delay);
delay += 4000
setTimeout(() => { lore.miriam.text("Let's try talking to it again.", true) }, delay);
delay += 2500
setTimeout(() => { lore.miriam.text("hmmm, what should we say?", true) }, delay);
delay += 2500
setTimeout(() => { lore.anand.text("I'm still not convinced it understands. We need a test.", true) }, delay);
delay += 4000
setTimeout(() => { lore.miriam.text("Hey bot!!!", true) }, delay);
delay += 1300
setTimeout(() => { lore.miriam.text("If you can understand me crouch", true) }, delay);
delay += 1500
setTimeout(() => { lore.talkingColor = "#dff" }, delay); //set color of graphic on level.null when no one is talking
setTimeout(() => {
},
},
// setTimeout(() => {}, 2000);
// lore.miriam.text("")
// lore.miriam.utterance.addEventListener('end', () => {
// })
chapter: 0, //what part of the conversation is playing
sentence: 0, //what part of the conversation is playing
conversation: [
[ //first time they meet, and testing gets unlocked
() => {
// lore.setVoices();
setTimeout(() => {
lore.miriam.text("I've never seen it generate this level before.")
}, 5000);
},
() => { lore.anand.text("Wow. Just a platform.") },
() => { lore.miriam.text("And that thing...") },
() => { lore.anand.text("Weird") },
() => { lore.anand.text("Maybe it's trapped.") },
() => {
lore.miriam.text("Hey little bot! Just press 'T' to enter testing mode and 'U' to go to the next level.")
lore.unlockTesting();
},
() => { lore.anand.text("I don't think it's connected to the audio input, and I'm sure it can't understand what you're saying.") },
() => { lore.miriam.text("ha hahahaha. I know, but it does seem to be getting smarter.") },
() => {
lore.talkingColor = "#dff"
setTimeout(() => {
lore.miriam.text("Poor thing... I hope it figures out how to escape.")
}, 25000);
},
() => { lore.talkingColor = "#dff" },
],
[ //they learn the bot can understand what they say
() => { setTimeout(() => { lore.miriam.text("Hey look! It's back at the weird level again!") }, 5000); },
() => { lore.anand.text("oh Wow! Why does it keep making this level?") },
() => { lore.miriam.text("I don't know, but last time it was in this room I think it understood us.") },
() => { lore.miriam.text("Let's try talking to it again.") },
() => { lore.miriam.text("hmmm, what should we say?") },
() => { lore.anand.text("I'm still not convinced it understands. We need a test.") },
() => { setTimeout(() => { lore.miriam.text("Hey bot!!!") }, 1000); },
() => { lore.miriam.text("If you can understand me crouch") },
() => {
lore.talkingColor = "#dff"
function cycle() {
if (input.down) {
let delay = 500 //reset delay time
setTimeout(() => { lore.miriam.text("Look, It did it! It crouched.", true) }, delay);
delay += 2000
setTimeout(() => { lore.anand.text("Amazing! It can understand us...", true) }, delay);
delay += 2700
setTimeout(() => { lore.miriam.text("It's Alive... Or it just crouched randomly.", true) }, delay);
delay += 2800
setTimeout(() => { lore.miriam.text("Hey bot! Can you crouch again?", true) }, delay);
delay += 2000
setTimeout(() => { lore.talkingColor = "#dff" }, delay); //set color of graphic on level.null when no one is talking
setTimeout(() => {
function cycle() {
if (input.down) {
let delay = 500 //reset delay time
setTimeout(() => { lore.miriam.text("It is Alive!!! ... hehehehehe ahahahahahah ehehehehe ahahahah", true) }, delay);
delay += 3500
setTimeout(() => { lore.anand.text("OK...", true) }, delay);
delay += 2700
setTimeout(() => { lore.anand.text("but seriously, this means that in this room it can monitor our audio, and it can understand us.", true) }, delay);
delay += 6400
setTimeout(() => { lore.anand.text("Anything we say could destabilize the project.", true) }, delay);
delay += 4200
setTimeout(() => { lore.miriam.text("Fine, Let's talk down stairs.", true) }, delay);
delay += 3000
setTimeout(() => { lore.miriam.text("Bye bye little bot.", true) }, delay);
delay += 2000
setTimeout(() => { lore.talkingColor = "#dff" }, delay); //set color of graphic on level.null when no one is talking
} else {
requestAnimationFrame(cycle);
}
}
requestAnimationFrame(cycle);
}, delay);
lore.miriam.text("Look, It did it! It crouched.")
} else {
requestAnimationFrame(cycle);
if (m.alive) requestAnimationFrame(cycle);
}
}
requestAnimationFrame(cycle);
}, delay);
},
() => {
// let delay = 6000
// setTimeout(() => { lore.miriam.text("I've never seen it generate this level before.", true) }, delay);
// delay += 2700
},
() => { lore.anand.text("Amazing! It can understand us...") },
() => { lore.miriam.text("It's Alive... Or it just crouched randomly.") },
() => { lore.miriam.text("Hey bot! Can you crouch again?") },
() => {
lore.talkingColor = "#dff"
},
],
dialogue: [
``,
``,
function cycle() {
if (input.down) {
lore.miriam.text("It is Alive!!! ... hehehehehe! ahahahahahah ehehehehe, ahahahah ...")
} else {
if (m.alive) requestAnimationFrame(cycle);
}
}
requestAnimationFrame(cycle);
},
() => { setTimeout(() => { lore.anand.text("OK ...") }, 1000); },
() => { lore.anand.text("but seriously, this means that in this room it can monitor our audio, and it can understand us.") },
() => { lore.anand.text("Anything we say could destabilize the project.") },
() => { lore.miriam.text("Fine, Let's talk down stairs.") },
() => { lore.miriam.text("Bye bye little bot.") },
() => { lore.talkingColor = "#dff" },
],
[ //they ask the bot questions, but waves of mobs come and attack
() => { lore.anand.text("Quick, get ready. It's back!") },
() => { lore.miriam.text("What's back?") },
() => { lore.anand.text("The bot is back on the communication level!") },
() => { lore.miriam.text("Oh good, I've got so many questions.") },
() => { lore.miriam.text("Is it self aware?") },
() => { lore.miriam.text("How did it learn to understand words?") },
() => { lore.miriam.text("Why can it only hear what we are saying on this level?") },
() => { lore.miriam.text("I wish we could just ask it questions directly, instead of yes or no.") },
() => { lore.anand.text("We could ask it to spell words by saying letters and having it crouching on the correct letter.") },
() => { lore.miriam.text("Well, that would take forever.") },
() => { lore.miriam.text("I really want to know: Why is it generating the mobs? and why does it keep fighting them?") },
() => {
lore.anand.text("Maybe that is just part of it's expectationmaximization algorithm")
//endlessly spawning mobs until the player dies
function cycle() {
if (!(simulation.cycle % 360)) {
const pick = spawn.fullPickList[Math.floor(Math.random() * spawn.fullPickList.length)];
spawn[pick](1000 * (Math.random() - 0.5), -500 + 200 * (Math.random() - 0.5));
level.difficultyIncrease(simulation.difficultyMode)
}
if (!(simulation.cycle % 900)) spawn.randomLevelBoss(500 * (Math.random() - 0.5), -500 + 200 * (Math.random() - 0.5))
if (m.alive) requestAnimationFrame(cycle);
}
requestAnimationFrame(cycle);
},
() => { lore.miriam.text("Well sure, but what does that even mean?") },
() => { lore.miriam.text("Do we all just do things because we are-") },
() => { lore.miriam.text("... what is going on?") },
() => { setTimeout(() => { lore.anand.text("it's spawning mobs and fighting them") }, 1000); },
() => { lore.miriam.text("oh no.") },
() => { lore.anand.text("We can't really communicate with it while it's fighting") },
() => { lore.miriam.text("You can do it little bot!") },
() => {
setTimeout(() => {
lore.talkingColor = "#dff";
lore.anand.text("But, why is it spawning these bots?")
}, 1000);
},
() => {
setTimeout(() => {
lore.talkingColor = "#dff";
lore.anand.text("This is so strange.")
}, 3000);
},
() => {
setTimeout(() => {
lore.talkingColor = "#dff";
lore.miriam.text("This is chaos!")
}, 1000);
},
() => {
setTimeout(() => {
lore.talkingColor = "#dff";
lore.anand.text("I don't understand this project.")
}, 3000);
},
() => {
setTimeout(() => {
lore.talkingColor = "#dff";
lore.miriam.text("It's fascinating though.")
}, 1000);
},
() => {
setTimeout(() => {
lore.talkingColor = "#dff";
lore.miriam.text("I think this isn't going to end well.")
}, 1000);
},
() => {
setTimeout(() => {
lore.talkingColor = "#dff";
lore.anand.text("Let's just be more prepared next time it enters this room.")
}, 1000);
},
() => {
setTimeout(() => {
lore.talkingColor = "#dff";
lore.anand.text("I had to go to the bathroom. What happened while I was gone?")
}, 20000);
},
() => { lore.miriam.text("More fighting...") },
() => { lore.anand.text("great...") },
() => { lore.talkingColor = "#dff" },
],
// scientist try to think of a way to communicate since the bot can't talk
// they give up on getting the bot to respond, and just start ask questions and thinking of explanations with each other
// when and how did it become self-aware
// why is the bot fighting things in these simulated locations?
// it wasn't designed to be violent
// the bot was just designed to automate research and testing of new technology
// 3D architecture superconducting quantum computer
// running machine learning algorithms
// as the scientist start to get agitated bots arrive and player dies
// bots come in Infinite waves that increase game difficulty each wave
// only ending is testing mode + next level or player death
// scientist have some lines in between each wave of mobs
// () => {
// if (localSettings.loreCount < 2) {
// localSettings.loreCount = 2
// localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
// }
// setTimeout(() => {
// lore.miriam.text("Hey look! It's back at the weird level again!")
// lore.miriam.utterance.addEventListener('end', () => {
// lore.anand.text("oh Wow! Why does it keep making this level?")
// lore.anand.utterance.addEventListener('end', () => {
// lore.miriam.text("I don't know, but last time it was in this room I think it understood us.")
// lore.miriam.utterance.addEventListener('end', () => {
// lore.miriam.text("Let's try talking to it again.")
// lore.miriam.utterance.addEventListener('end', () => {
// lore.miriam.text("hmmm, what should we say?")
// lore.miriam.utterance.addEventListener('end', () => {
// lore.anand.text("I'm still not convinced it understands. We need a test.")
// lore.anand.utterance.addEventListener('end', () => {
// lore.miriam.text("Hey bot!!!")
// lore.miriam.utterance.addEventListener('end', () => {
// lore.miriam.text("If you can understand me crouch")
// lore.miriam.utterance.addEventListener('end', () => {
// lore.talkingColor = "#dff"
// function cycle() {
// if (input.down) {
// lore.miriam.text("Look, It did it! It crouched.")
// lore.miriam.utterance.addEventListener('end', () => {
// lore.anand.text("Amazing! It can understand us...")
// lore.anand.utterance.addEventListener('end', () => {
// lore.miriam.text("It's Alive... Or it just crouched randomly.")
// lore.miriam.utterance.addEventListener('end', () => {
// lore.miriam.text("Hey bot! Can you crouch again?")
// lore.miriam.utterance.addEventListener('end', () => {
// lore.talkingColor = "#dff"
// function cycle() {
// if (input.down) {
// lore.miriam.text("It is Alive!!! ... hehehehehe! ahahahahahah ehehehehe, ahahahah ...")
// lore.miriam.utterance.addEventListener('end', () => {
// setTimeout(() => {
// lore.anand.text("OK ...")
// lore.anand.utterance.addEventListener('end', () => {
// lore.anand.text("but seriously, this means that in this room it can monitor our audio, and it can understand us.")
// lore.anand.utterance.addEventListener('end', () => {
// lore.anand.text("Anything we say could destabilize the project.")
// lore.anand.utterance.addEventListener('end', () => {
// lore.miriam.text("Fine, Let's talk down stairs.")
// lore.miriam.utterance.addEventListener('end', () => {
// lore.miriam.text("Bye bye little bot.")
// lore.miriam.utterance.addEventListener('end', () => {
// lore.talkingColor = "#dff"
// })
// })
// })
// })
// })
// }, 1500);
// })
// } else {
// if (m.alive) requestAnimationFrame(cycle);
// }
// }
// requestAnimationFrame(cycle);
// })
// })
// })
// })
// } else {
// if (m.alive) requestAnimationFrame(cycle);
// }
// }
// requestAnimationFrame(cycle);
// });
// });
// });
// });
// });
// });
// });
// });
// }, 6000);
// },
// () => {
// setTimeout(() => {
// lore.miriam.text("I've never seen it generate this level before.")
// lore.miriam.utterance.addEventListener('end', () => {
// lore.anand.text("Wow. Just a platform.")
// lore.anand.utterance.addEventListener('end', () => {
// lore.miriam.text("And that thing...")
// lore.miriam.utterance.addEventListener('end', () => {
// lore.anand.text("Weird")
// lore.anand.utterance.addEventListener('end', () => {
// lore.anand.text("Maybe it's trapped.")
// lore.anand.utterance.addEventListener('end', () => {
// lore.miriam.text("Hey little bot! Just press 'T' to enter testing mode and 'U' to go to the next level.")
// lore.unlockTesting();
// lore.miriam.utterance.addEventListener('end', () => {
// lore.anand.text("I don't think it's connected to the audio input, and I'm sure it can't understand what you're saying.")
// lore.anand.utterance.addEventListener('end', () => {
// lore.miriam.text("ha hahahaha. I know, but it does seem to be getting smarter.")
// lore.miriam.utterance.addEventListener('end', () => {
// lore.talkingColor = "#dff" // when no one is talking
// setTimeout(() => {
// lore.miriam.text("Poor thing... I hope it figures out how to escape.")
// lore.miriam.utterance.addEventListener('end', () => { lore.talkingColor = "#dff" })
// }, 25000);
// });
// });
// });
// });
// });
// });
// });
// });
// }, 6000);
// },
// () => {
// if (localSettings.loreCount < 2) {
// localSettings.loreCount = 2
// localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
// }
// let delay = 6000
// setTimeout(() => { lore.miriam.text("Hey look! It's back at the weird level again!", true) }, delay);
// delay += 2500
// setTimeout(() => { lore.anand.text("oh Wow! Why does it keep making this level?", true) }, delay);
// delay += 2900
// setTimeout(() => { lore.miriam.text("I don't know, but last time it was in this room I think it understood us.", true) }, delay);
// delay += 4000
// setTimeout(() => { lore.miriam.text("Let's try talking to it again.", true) }, delay);
// delay += 2500
// setTimeout(() => { lore.miriam.text("hmmm, what should we say?", true) }, delay);
// delay += 2500
// setTimeout(() => { lore.anand.text("I'm still not convinced it understands. We need a test.", true) }, delay);
// delay += 4000
// setTimeout(() => { lore.miriam.text("Hey bot!!!", true) }, delay);
// delay += 1300
// setTimeout(() => { lore.miriam.text("If you can understand me crouch", true) }, delay);
// delay += 1500
// setTimeout(() => { lore.talkingColor = "#dff" }, delay); //set color of graphic on level.null when no one is talking
// setTimeout(() => {
// function cycle() {
// if (input.down) {
// let delay = 500 //reset delay time
// setTimeout(() => { lore.miriam.text("Look, It did it! It crouched.", true) }, delay);
// delay += 2000
// setTimeout(() => { lore.anand.text("Amazing! It can understand us...", true) }, delay);
// delay += 2700
// setTimeout(() => { lore.miriam.text("It's Alive... Or it just crouched randomly.", true) }, delay);
// delay += 2800
// setTimeout(() => { lore.miriam.text("Hey bot! Can you crouch again?", true) }, delay);
// delay += 2000
// setTimeout(() => { lore.talkingColor = "#dff" }, delay); //set color of graphic on level.null when no one is talking
// setTimeout(() => {
// function cycle() {
// if (input.down) {
// let delay = 500 //reset delay time
// setTimeout(() => { lore.miriam.text("It is Alive!!! ... hehehehehe ahahahahahah ehehehehe ahahahah", true) }, delay);
// delay += 3500
// setTimeout(() => { lore.anand.text("OK...", true) }, delay);
// delay += 2700
// setTimeout(() => { lore.anand.text("but seriously, this means that in this room it can monitor our audio, and it can understand us.", true) }, delay);
// delay += 6400
// setTimeout(() => { lore.anand.text("Anything we say could destabilize the project.", true) }, delay);
// delay += 4200
// setTimeout(() => { lore.miriam.text("Fine, Let's talk down stairs.", true) }, delay);
// delay += 3000
// setTimeout(() => { lore.miriam.text("Bye bye little bot.", true) }, delay);
// delay += 2000
// setTimeout(() => { lore.talkingColor = "#dff" }, delay); //set color of graphic on level.null when no one is talking
// } else {
// requestAnimationFrame(cycle);
// }
// }
// requestAnimationFrame(cycle);
// }, delay);
// } else {
// requestAnimationFrame(cycle);
// }
// }
// requestAnimationFrame(cycle);
// }, delay);
// },
// () => {
// let delay = 6000
// setTimeout(() => { lore.miriam.text("I've never seen it generate this level before.", true) }, delay);
// delay += 2700
// setTimeout(() => { lore.anand.text("Wow. Just a platform.", true) }, delay);
// delay += 2200
// setTimeout(() => { lore.miriam.text("And that thing...", true) }, delay);
// delay += 1500
// setTimeout(() => { lore.anand.text("Weird", true) }, delay);
// delay += 1500
// setTimeout(() => { lore.talkingColor = "#dff" }, delay); //set color of graphic on level.null when no one is talking
// delay += 1000
// setTimeout(() => { lore.anand.text("Maybe it's trapped.", true) }, delay);
// delay += 2300
// setTimeout(() => { lore.unlockTesting() }, delay);
// setTimeout(() => { lore.miriam.text('Hey little bot! Just press "T" to enter testing mode and "U" to go to the next level.', true) }, delay);
// delay += 5400
// setTimeout(() => { lore.anand.text("I don't think it's connected to the audio input, and I'm sure it can't understand what you're saying.", true) }, delay);
// delay += 5300
// setTimeout(() => { lore.miriam.text("ha hahahaha. I know, but it does seem to be getting smarter.", true) }, delay);
// delay += 3700
// setTimeout(() => { lore.talkingColor = "#dff" }, delay); //set color of graphic on level.null when no one is talking
// delay += 25000
// setTimeout(() => {
// if (!simulation.isCheating) {
// lore.miriam.text("Poor thing... I hope it figures out how to escape.", true)
// delay += 3500
// setTimeout(() => { lore.talkingColor = "#dff" }, delay); //set color of graphic on level.null when no one is talking
// }
// }, delay);
// },
],
unlockTesting() {
if (localSettings.loreCount < 1) localSettings.loreCount = 1
localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
document.getElementById("control-testing").style.visibility = (localSettings.loreCount === 0) ? "hidden" : "visible"
document.getElementById("experiment-button").style.visibility = (localSettings.loreCount === 0) ? "hidden" : "visible"
simulation.makeTextLog(`lore.unlockTesting()`, Infinity);
},
}

View File

@@ -480,7 +480,7 @@ const m = {
setMaxHealth() {
m.maxHealth = m.baseHealth + tech.extraMaxHealth + tech.isFallingDamage //+ tech.bonusHealth
document.getElementById("health-bg").style.width = `${Math.floor(300*m.maxHealth)}px`
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-h'>maxHealth</span> <span class='color-symbol'>=</span> ${m.maxHealth.toFixed(2)}`)
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-h'>maxHealth</span> <span class='color-symbol'>=</span> ${m.maxHealth.toFixed(3)}`)
if (m.health > m.maxHealth) m.health = m.maxHealth;
m.displayHealth();
},

View File

@@ -145,10 +145,21 @@ const powerUps = {
},
showDraft() {
// document.getElementById("choose-grid").style.gridTemplateColumns = "repeat(2, minmax(370px, 1fr))"
document.getElementById("choose-grid").style.display = "grid"
document.getElementById("choose-background").style.display = "inline"
// document.getElementById("choose-background").style.display = "inline"
document.getElementById("choose-background").style.visibility = "visible"
document.getElementById("choose-background").style.opacity = "0.6"
// document.getElementById("choose-grid").style.display = "grid"
document.getElementById("choose-grid").style.transitionDuration = "0.25s";
document.getElementById("choose-grid").style.visibility = "visible"
document.getElementById("choose-grid").style.opacity = "1"
//disable clicking for 1/2 a second to prevent mistake clicks
document.getElementById("choose-grid").style.pointerEvents = "none";
setTimeout(() => {
document.getElementById("choose-grid").style.pointerEvents = "auto";
document.body.style.cursor = "auto";
document.getElementById("choose-grid").style.transitionDuration = "0s";
}, 500);
document.body.style.cursor = "auto";
if (tech.isExtraChoice) {
document.body.style.overflowY = "scroll";
document.body.style.overflowX = "hidden";
@@ -187,8 +198,13 @@ const powerUps = {
if (tech.isAnsatz && powerUps.research.count === 0) {
for (let i = 0; i < 2; i++) powerUps.spawn(m.pos.x + 40 * (Math.random() - 0.5), m.pos.y + 40 * (Math.random() - 0.5), "research", false);
}
document.getElementById("choose-grid").style.display = "none"
document.getElementById("choose-background").style.display = "none"
// document.getElementById("choose-grid").style.display = "none"
document.getElementById("choose-grid").style.visibility = "hidden"
document.getElementById("choose-grid").style.opacity = "0"
// document.getElementById("choose-background").style.display = "none"
document.getElementById("choose-background").style.visibility = "hidden"
document.getElementById("choose-background").style.opacity = "0"
document.body.style.cursor = "none";
document.body.style.overflow = "hidden"
simulation.paused = false;
@@ -283,30 +299,56 @@ const powerUps = {
return tech.largerHeals * (size / 40 / Math.sqrt(tech.largerHeals) / (simulation.healScale ** 0.25)) ** 2 //heal scale is undone here because heal scale is properly affected on m.addHealth()
},
effect() {
// if (!tech.isEnergyHealth && m.alive) {
// const heal = powerUps.heal.calculateHeal(this.size)
// if (heal > 0) {
// if (tech.isOverHeal && m.health === m.maxHealth) { //tech quenching
// m.damage(heal * simulation.healScale);
// //draw damage
// simulation.drawList.push({ //add dmg to draw queue
// x: m.pos.x,
// y: m.pos.y,
// radius: heal * 500 * simulation.healScale,
// color: simulation.mobDmgColor,
// time: simulation.drawTime
// });
// tech.extraMaxHealth += heal * simulation.healScale //increase max health
// m.setMaxHealth();
// } else {
// const healOutput = Math.min(m.maxHealth - m.health, heal) * simulation.healScale
// m.addHealth(heal);
// simulation.makeTextLog(`<span class='color-var'>m</span>.health <span class='color-symbol'>+=</span> ${(healOutput).toFixed(3)}`) // <br>${m.health.toFixed(3)}
// }
// }
// }
if (!tech.isEnergyHealth && m.alive) {
const heal = powerUps.heal.calculateHeal(this.size)
if (heal > 0) {
if (tech.isOverHeal && m.health === m.maxHealth) { //tech quenching
if (m.immuneCycle < m.cycle) {
m.damage(heal * simulation.healScale);
//draw damage
simulation.drawList.push({ //add dmg to draw queue
x: m.pos.x,
y: m.pos.y,
radius: heal * 500 * simulation.healScale,
color: simulation.mobDmgColor,
time: simulation.drawTime
});
}
tech.extraMaxHealth += heal * simulation.healScale //increase max health
const overHeal = m.health + heal * simulation.healScale - m.maxHealth //used with tech.isOverHeal
const healOutput = Math.min(m.maxHealth - m.health, heal) * simulation.healScale
m.addHealth(heal);
simulation.makeTextLog(`<span class='color-var'>m</span>.health <span class='color-symbol'>+=</span> ${(healOutput).toFixed(3)}`) // <br>${m.health.toFixed(3)}
if (tech.isOverHeal && overHeal > 0) { //tech quenching
const scaledOverHeal = overHeal * 0.8
m.damage(scaledOverHeal);
simulation.makeTextLog(`<span class='color-var'>m</span>.health <span class='color-symbol'>-=</span> ${(scaledOverHeal).toFixed(3)}`) // <br>${m.health.toFixed(3)}
//draw damage
simulation.drawList.push({ //add dmg to draw queue
x: m.pos.x,
y: m.pos.y,
radius: scaledOverHeal * 500 * simulation.healScale,
color: simulation.mobDmgColor,
time: simulation.drawTime
});
tech.extraMaxHealth += scaledOverHeal * simulation.healScale //increase max health
m.setMaxHealth();
} else {
const healOutput = Math.min(m.maxHealth - m.health, heal) * simulation.healScale
m.addHealth(heal);
simulation.makeTextLog(`<span class='color-var'>m</span>.health <span class='color-symbol'>+=</span> ${(healOutput).toFixed(3)}`) // <br>${m.health.toFixed(3)}
}
}
}
if (tech.healGiveMaxEnergy) {
tech.healMaxEnergyBonus += 0.06
m.setMaxEnergy();
@@ -407,7 +449,7 @@ const powerUps = {
powerUps.field.choiceLog.push(choice3)
if (tech.isJunkResearch) {
tech.junkResearchNumber = Math.ceil(5 * Math.random())
tech.junkResearchNumber = Math.floor(5 * Math.random())
text += `<div class="choose-grid-module" onclick="powerUps.research.use('field')"><div class="grid-title"> <span style="position:relative;">`
for (let i = 0; i < tech.junkResearchNumber; i++) text += `<div class="circle-grid junk" style="position:absolute; top:0; left:${15*i}px ;opacity:0.8; border: 1px #fff solid;"></div>`
text += `</span>&nbsp; <span class='research-select'>pseudoscience</span></div></div>`
@@ -520,7 +562,7 @@ const powerUps = {
// if (powerUps.research.count) text += `<div class="choose-grid-module" onclick="powerUps.research.use('tech')"><div class="grid-title"><div class="circle-grid research"></div> &nbsp; research <span class="research-select">${powerUps.research.count}</span></div></div>`
if (tech.isJunkResearch) {
tech.junkResearchNumber = Math.ceil(5 * Math.random())
tech.junkResearchNumber = Math.floor(5 * Math.random())
text += `<div class="choose-grid-module" onclick="powerUps.research.use('tech')"><div class="grid-title"> <span style="position:relative;">`
for (let i = 0; i < tech.junkResearchNumber; i++) text += `<div class="circle-grid junk" style="position:absolute; top:0; left:${15*i}px ;opacity:0.8; border: 1px #fff solid;"></div>`
text += `</span>&nbsp; <span class='research-select'>pseudoscience</span></div></div>`
@@ -612,7 +654,7 @@ const powerUps = {
// if (powerUps.research.count) text += `<div class="choose-grid-module" onclick="powerUps.research.use('gun')"><div class="grid-title"><div class="circle-grid research"></div> &nbsp; research <span class="research-select">${powerUps.research.count}</span></div></div>`
if (tech.isJunkResearch) {
tech.junkResearchNumber = Math.ceil(5 * Math.random())
tech.junkResearchNumber = Math.floor(5 * Math.random())
text += `<div class="choose-grid-module" onclick="powerUps.research.use('gun')"><div class="grid-title"> <span style="position:relative;">`
for (let i = 0; i < tech.junkResearchNumber; i++) text += `<div class="circle-grid junk" style="position:absolute; top:0; left:${15*i}px ;opacity:0.8; border: 1px #fff solid;"></div>`
text += `</span>&nbsp; <span class='research-select'>pseudoscience</span></div></div>`

View File

@@ -469,7 +469,9 @@ const simulation = {
document.getElementById("splash").onclick = function() {
simulation.startGame();
};
document.getElementById("choose-grid").style.display = "none"
// document.getElementById("choose-grid").style.display = "none"
document.getElementById("choose-grid").style.visibility = "hidden"
document.getElementById("choose-grid").style.opacity = "0"
document.getElementById("info").style.display = "inline";
document.getElementById("experiment-button").style.display = "inline"
document.getElementById("experiment-grid").style.display = "none"
@@ -489,7 +491,9 @@ const simulation = {
document.body.style.overflow = "hidden"
}
simulation.onTitlePage = false;
document.getElementById("choose-grid").style.display = "none"
// document.getElementById("choose-grid").style.display = "none"
document.getElementById("choose-grid").style.visibility = "hidden"
document.getElementById("choose-grid").style.opacity = "0"
document.getElementById("experiment-grid").style.display = "none"
document.getElementById("info").style.display = "none";
document.getElementById("experiment-button").style.display = "none";

View File

@@ -2504,7 +2504,7 @@
},
{
name: "quenching",
description: "if you're at full <strong class='color-h'>health</strong> heal power ups do <strong class='color-harm'>harm</strong><br>but they also increase your <strong>maximum</strong> <strong class='color-h'>health</strong>",
description: "over healing from <strong class='color-h'>heal</strong> power ups does <strong class='color-harm'>harm</strong><br>but it also increase your <strong>maximum</strong> <strong class='color-h'>health</strong>",
maxCount: 1,
count: 0,
frequency: 2,
@@ -2522,7 +2522,7 @@
},
{
name: "negentropy",
description: `at the start of each <strong>level</strong><br>spawn a <strong class='color-h'>heal</strong> for every <strong>25</strong> missing health`,
description: `at the start of each <strong>level</strong><br>spawn a <strong class='color-h'>heal</strong> for every <strong>22</strong> missing health`,
maxCount: 1,
count: 0,
frequency: 1,
@@ -2560,7 +2560,7 @@
},
{
name: "maintenance",
description: "</strong>double</strong> the <strong class='flicker'>frequency</strong> of finding <strong class='color-h'>healing</strong> <strong class='color-m'>tech</strong><br>spawn <strong>15</strong> <strong class='color-h'>heals</strong>",
description: "</strong>double</strong> the <strong class='flicker'>frequency</strong> of finding <strong class='color-h'>healing</strong> <strong class='color-m'>tech</strong><br>spawn <strong>14</strong> <strong class='color-h'>heals</strong>",
maxCount: 1,
count: 0,
frequency: 1,
@@ -2572,7 +2572,7 @@
},
requires: "health < 70%, not ergodicity",
effect() {
for (let i = 0; i < 15; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "heal");
for (let i = 0; i < 14; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "heal");
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].isHealTech) tech.tech[i].frequency *= 2
}
@@ -2634,9 +2634,9 @@
frequency: 4,
frequencyDefault: 4,
allowed() {
return !tech.isSwitchReality && !tech.isResearchReality && tech.isDeathAvoid && !tech.isCollisionRealitySwitch
return tech.isDeathAvoid
},
requires: "anthropic principle, not many-worlds, Ψ(t) collapse, non-unitary",
requires: "anthropic principle",
effect() {
tech.isImmortal = true;
},
@@ -2652,9 +2652,9 @@
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isImmortal && !tech.isResearchReality && level.onLevel < 6 && !tech.isCollisionRealitySwitch
return !tech.isResearchReality && level.onLevel < 6 && !tech.isCollisionRealitySwitch
},
requires: "before level 6, not quantum immortality, Ψ(t) collapse, non-unitary",
requires: "before level 6, Ψ(t) collapse, non-unitary",
effect() {
tech.isSwitchReality = true;
},
@@ -2670,9 +2670,9 @@
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isImmortal && !tech.isResearchReality && !tech.isSwitchReality
return !tech.isResearchReality && !tech.isSwitchReality
},
requires: "not quantum immortality, Ψ(t) collapse, many-worlds",
requires: "Ψ(t) collapse, many-worlds",
effect() {
tech.isCollisionRealitySwitch = true;
level.difficultyDecrease(simulation.difficultyMode * 2)
@@ -2692,9 +2692,9 @@
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isImmortal && !tech.isSwitchReality && !tech.isCollisionRealitySwitch
return !tech.isSwitchReality && !tech.isCollisionRealitySwitch
},
requires: "not quantum immortality, many-worlds, non-unitary",
requires: "many-worlds, non-unitary",
effect() {
tech.isResearchReality = true;
for (let i = 0; i < 16; i++) powerUps.spawn(m.pos.x + Math.random() * 60, m.pos.y + Math.random() * 60, "research", false);
@@ -2801,7 +2801,7 @@
},
{
name: "pseudoscience",
description: "renewing power up choices costs no <strong class='color-r'>research</strong><br>but adds <strong>1-5</strong> <strong class='color-j'>JUNK</strong> to the potential <strong class='color-m'>tech</strong> pool",
description: "resetting power up choices costs no <strong class='color-r'>research</strong><br>but adds <strong>0-4</strong> <strong class='color-j'>JUNK</strong> to the potential <strong class='color-m'>tech</strong> pool",
maxCount: 1,
count: 0,
frequency: 1,
@@ -6936,7 +6936,7 @@
remove() {}
},
{
name: "quantum hole",
name: "quantum black hole",
description: "use your <strong class='color-f'>energy</strong> and <strong>1</strong> <strong class='color-r'>research</strong> to <strong>spawn</strong><br>inside the event horizon of a huge <strong>black hole</strong>",
maxCount: 9,
count: 0,
@@ -6950,7 +6950,7 @@
requires: "at least 1 research",
effect() {
m.energy = 0
spawn.suckerBoss(m.pos.x, m.pos.y - 1000)
spawn.suckerBoss(m.pos.x, m.pos.y - 700)
powerUps.research.changeRerolls(-1)
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span> <span class='color-symbol'>--</span><br>${powerUps.research.count}`)
},