entanglement
entanglement - your death leaves a power up for next run renamed entanglement also stores your gun and field improved graphics for incompatible tech
This commit is contained in:
@@ -1358,7 +1358,7 @@ document.getElementById("difficulty-select").addEventListener("input", () => {
|
||||
lore.setTechGoal()
|
||||
localSettings.difficultyMode = simulation.difficultyMode
|
||||
localSettings.levelsClearedLastGame = 0 //after changing difficulty, reset run history
|
||||
localSettings.axiom = undefined //after changing difficulty, reset stored tech
|
||||
localSettings.entanglement = undefined //after changing difficulty, reset stored tech
|
||||
if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
|
||||
});
|
||||
|
||||
|
||||
21
js/level.js
21
js/level.js
@@ -25,13 +25,14 @@ const level = {
|
||||
// m.immuneCycle = Infinity //you can't take damage
|
||||
// tech.tech[297].frequency = 100
|
||||
// m.couplingChange(5)
|
||||
// m.setField("standing wave") //molecular assembler standing wave time dilation perfect diamagnetism metamaterial cloaking wormhole negative mass pilot wave
|
||||
// m.setField("time dilation") //molecular assembler standing wave time dilation perfect diamagnetism metamaterial cloaking wormhole negative mass pilot wave
|
||||
// simulation.molecularMode = 2
|
||||
// m.damage(0.1);
|
||||
// b.giveGuns("nail gun") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
|
||||
// b.giveGuns("missiles") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
|
||||
// b.giveGuns("wave") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
|
||||
// b.guns[0].ammo = 10000
|
||||
|
||||
// tech.giveTech("ice crystal nucleation")
|
||||
// tech.giveTech("arsenal")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("compound lens")
|
||||
// tech.giveTech("dye laser")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("CPT symmetry")
|
||||
@@ -51,7 +52,6 @@ const level = {
|
||||
// for (let i = 0; i < 40; ++i) tech.giveTech()
|
||||
// for (let i = 0; i < 13; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "research");
|
||||
if (simulation.isTraining) { level.walk(); } else { level.intro(); } //normal starting level ************************************************
|
||||
// powerUps.spawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "technology", false, ["lens", "nail-bot"]);
|
||||
// for (let i = 0; i < 2; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "tech");
|
||||
// for (let i = 0; i < 30; i++) powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "tech", false);
|
||||
|
||||
@@ -71,6 +71,10 @@ const level = {
|
||||
|
||||
// lore.unlockTesting();
|
||||
// tech.giveTech("tinker"); //show junk tech in experiment mode
|
||||
// simulation.isCheating = false
|
||||
// m.storeTech()
|
||||
// powerUps.spawn(m.pos.x, m.pos.y, "entanglement", false);
|
||||
|
||||
} else {
|
||||
spawn.setSpawnList(); //picks a couple mobs types for a themed random mob spawns
|
||||
// spawn.pickList = ["focuser", "focuser"]
|
||||
@@ -156,12 +160,9 @@ const level = {
|
||||
for (let i = 0; i < 2; i++) powerUps.spawn(level.exit.x + 10 * (Math.random() - 0.5), level.exit.y - 100 + 10 * (Math.random() - 0.5), "tech", false) //exit
|
||||
}
|
||||
if (m.plasmaBall) m.plasmaBall.reset()
|
||||
if (localSettings.axiom && localSettings.axiom.levelName === level.levels[level.onLevel]) {
|
||||
console.log('hi')
|
||||
const flip = localSettings.axiom.isHorizontalFlipped === simulation.isHorizontalFlipped ? 1 : -1
|
||||
powerUps.spawn(flip * localSettings.axiom.position.x, localSettings.axiom.position.y, "technology", false, localSettings.axiom.techNames);
|
||||
localSettings.axiom = undefined
|
||||
if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
|
||||
if (localSettings.entanglement && localSettings.entanglement.levelName === level.levels[level.onLevel]) {
|
||||
const flip = localSettings.entanglement.isHorizontalFlipped === simulation.isHorizontalFlipped ? 1 : -1
|
||||
powerUps.spawn(flip * localSettings.entanglement.position.x, localSettings.entanglement.position.y, "entanglement", false);
|
||||
}
|
||||
},
|
||||
trainingText(say) {
|
||||
|
||||
21
js/player.js
21
js/player.js
@@ -474,25 +474,24 @@ const m = {
|
||||
}
|
||||
},
|
||||
storeTech() { //store a copy of your tech, it will show up at your location next run
|
||||
if (tech.totalCount > 0 && localSettings.isAllowed) {
|
||||
const have = []
|
||||
if (localSettings.isAllowed && !simulation.isCheating) {
|
||||
const gunList = [] //store gun names
|
||||
for (i = 0, len = b.inventory.length; i < len; i++) gunList.push(b.inventory[i])
|
||||
const techList = [] //store tech names
|
||||
for (let i = 0; i < tech.tech.length; i++) {
|
||||
if (tech.tech[i].count > 0 && !tech.tech[i].isNonRefundable) have.push(tech.tech[i].name)
|
||||
if (tech.tech[i].count > 0 && !tech.tech[i].isNonRefundable) techList.push(i)
|
||||
}
|
||||
if (have.length) {
|
||||
localSettings.axiom = {
|
||||
techNames: have,
|
||||
if (techList.length) {
|
||||
localSettings.entanglement = {
|
||||
fieldIndex: m.fieldMode,
|
||||
gunIndexes: gunList,
|
||||
techIndexes: techList,
|
||||
position: { x: m.pos.x, y: m.pos.y },
|
||||
levelName: level.levels[level.onLevel],
|
||||
isHorizontalFlipped: simulation.isHorizontalFlipped
|
||||
}
|
||||
if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
|
||||
// for (let i = 0; i < 6; i++) simulation.drawList.push({ x: m.pos.x, y: m.pos.y, radius: 40, color: `hsla(250,100%,62%,0.05)`, time: i * 120 }); //draw graphics to show that tech is stored
|
||||
// simulation.makeTextLog(`<span class='color-var'>tech</span> <strong>${localSettings.axiom.techName}</strong> is stored at (${m.pos.x.toFixed(0)}, ${m.pos.y.toFixed(0)}) on ${level.levels[level.onLevel]}`, 360);
|
||||
}
|
||||
// else {
|
||||
// simulation.makeTextLog(`no valid <span class='color-var'>tech</span> for <strong>axiom</strong>`, 360);
|
||||
// }
|
||||
}
|
||||
},
|
||||
health: 0,
|
||||
|
||||
@@ -1091,29 +1091,28 @@ const powerUps = {
|
||||
}
|
||||
},
|
||||
},
|
||||
technology: {
|
||||
name: "technology",
|
||||
entanglement: {
|
||||
name: "entanglement",
|
||||
color: "#fff", //"hsl(248,100%,65%)",
|
||||
size() {
|
||||
return 35;
|
||||
},
|
||||
mode: "", //name of tech given
|
||||
size() { return 40 },
|
||||
effect() {
|
||||
if (m.alive) {
|
||||
if (m.alive && localSettings.entanglement) {
|
||||
let text = ""
|
||||
text += `<div class='cancel' onclick='powerUps.endDraft("tech")'>✕</div>`
|
||||
text += `<h3 style = 'color:#fff; text-align:left; margin: 0px;'>technology</h3>`
|
||||
for (let i = 0; i < this.mode.length; i++) {
|
||||
let choose = null
|
||||
for (let j = 0; j < tech.tech.length; j++) { //convert name into index
|
||||
if (this.mode[i] === tech.tech[j].name) {
|
||||
choose = j
|
||||
break
|
||||
}
|
||||
}
|
||||
text += `<h3 style = 'color:#fff; text-align:left; margin: 0px;'>entanglement</h3>`
|
||||
if (localSettings.entanglement.fieldIndex) {
|
||||
const field = localSettings.entanglement.fieldIndex //add field
|
||||
text += `<div class="choose-grid-module" onclick="powerUps.choose('field',${field})"><div class="grid-title"><div class="circle-grid field"></div> ${m.fieldUpgrades[field].name}</div> ${m.fieldUpgrades[field].description}</div>`
|
||||
}
|
||||
for (let i = 0; i < localSettings.entanglement.gunIndexes.length; i++) { //add guns
|
||||
const gun = localSettings.entanglement.gunIndexes[i]
|
||||
text += `<div class="choose-grid-module" onclick="powerUps.choose('gun',${gun})"><div class="grid-title"><div class="circle-grid gun"></div> ${b.guns[gun].name}</div> ${b.guns[gun].description}</div>`
|
||||
}
|
||||
for (let i = 0; i < localSettings.entanglement.techIndexes.length; i++) { //add tech
|
||||
let choose = localSettings.entanglement.techIndexes[i]
|
||||
const isCount = tech.tech[choose].count > 0 ? `(${tech.tech[choose].count+1}x)` : "";
|
||||
if (choose === null || tech.tech[choose].count + 1 > tech.tech[choose].maxCount || !tech.tech[choose].allowed()) {
|
||||
text += `<div class="choose-grid-module"><div class="grid-title"><div class="circle-grid tech"></div> ${tech.tech[choose].name}</div><span style = "color: red;">incompatible</span></div>`
|
||||
text += `<div class="choose-grid-module" style = "background-color: #efeff5; border: 0px; opacity:0.5; font-size: 60%; line-height: 130%; margin: 1px; padding-top: 6px; padding-bottom: 6px;"><div class="grid-title">${tech.tech[choose].name} <span style = "color: #aaa;font-weight: normal;font-size:80%;">- incompatible</span></div></div>`
|
||||
} else {
|
||||
if (tech.tech[choose].isFieldTech) {
|
||||
text += `<div class="choose-grid-module" onclick="powerUps.choose('tech',${choose})"><div class="grid-title">
|
||||
@@ -1140,6 +1139,9 @@ const powerUps = {
|
||||
}
|
||||
document.getElementById("choose-grid").innerHTML = text
|
||||
powerUps.showDraft();
|
||||
|
||||
localSettings.entanglement = undefined
|
||||
if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
@@ -760,6 +760,10 @@ const simulation = {
|
||||
b.setFireMethod()
|
||||
b.setFireCD();
|
||||
// simulation.updateTechHUD();
|
||||
for (let i = 0; i < b.guns.length; i++) b.guns[i].isRecentlyShown = false //reset recently shown back to zero
|
||||
for (let i = 0; i < m.fieldUpgrades.length; i++) m.fieldUpgrades[i].isRecentlyShown = false //reset recently shown back to zero
|
||||
for (let i = 0; i < tech.tech.length; i++) tech.tech[i].isRecentlyShown = false //reset recently shown back to zero
|
||||
|
||||
powerUps.tech.choiceLog = [];
|
||||
powerUps.gun.choiceLog = [];
|
||||
powerUps.field.choiceLog = [];
|
||||
|
||||
40
js/tech.js
40
js/tech.js
@@ -3808,47 +3808,7 @@ const tech = {
|
||||
},
|
||||
remove() {}
|
||||
},
|
||||
// {
|
||||
// name: "axiom",
|
||||
// descriptionFunction() {
|
||||
// if (localSettings.axiom) {
|
||||
// return `your <strong class='color-m'>tech</strong> are saved at (${localSettings.axiom.position.x.toFixed(0)}, ${localSettings.axiom.position.y.toFixed(0)}) on ${localSettings.axiom.levelName}`
|
||||
// } else {
|
||||
// return "save a <strong>copy</strong> of your current <strong class='color-m'>tech</strong><br>choose 1 when you <strong>return</strong> to this location"
|
||||
// }
|
||||
// },
|
||||
// maxCount: 1,
|
||||
// count: 0,
|
||||
// frequency: 1,
|
||||
// frequencyDefault: 1,
|
||||
// isNonRefundable: true,
|
||||
// allowed() {
|
||||
// return !build.isExperimentSelection && tech.totalCount > 0 && localSettings.isAllowed && !localSettings.axiom // && level.onLevel > 0// && !simulation.isCheating
|
||||
// },
|
||||
// requires: "1+ tech, local storage, not cheating, not already stored",
|
||||
// effect() {
|
||||
// const have = []
|
||||
// for (let i = 0; i < tech.tech.length; i++) {
|
||||
// if (tech.tech[i].count > 0 && !tech.tech[i].isNonRefundable) have.push(tech.tech[i].name)
|
||||
// }
|
||||
// if (have.length) {
|
||||
// localSettings.axiom = {
|
||||
// techNames: have,
|
||||
// position: { x: m.pos.x, y: m.pos.y },
|
||||
// levelName: level.levels[level.onLevel],
|
||||
// isHorizontalFlipped: simulation.isHorizontalFlipped
|
||||
// }
|
||||
// if (localSettings.isAllowed) localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
|
||||
// simulation.makeTextLog(`<span class='color-var'>tech</span> <strong>${localSettings.axiom.techName}</strong> is stored at (${m.pos.x.toFixed(0)}, ${m.pos.y.toFixed(0)}) on ${level.levels[level.onLevel]}`, 360);
|
||||
// for (let i = 0; i < 6; i++) simulation.drawList.push({ x: m.pos.x, y: m.pos.y, radius: 40, color: `hsla(250,100%,62%,0.05)`, time: i * 120 }); //draw graphics to show that tech is stored
|
||||
// } else {
|
||||
// simulation.makeTextLog(`no valid <span class='color-var'>tech</span> for <strong>axiom</strong>`, 360);
|
||||
// }
|
||||
// },
|
||||
// remove() {
|
||||
|
||||
// }
|
||||
// },
|
||||
{
|
||||
name: "Occam's razor",
|
||||
descriptionFunction() {
|
||||
|
||||
16
todo.txt
16
todo.txt
@@ -1,13 +1,10 @@
|
||||
******************************************************** NEXT PATCH **************************************************
|
||||
|
||||
when you die store a copy of all your tech
|
||||
they will show up at your location in the future as a power up
|
||||
this is probably buggy
|
||||
entanglement - your death leaves a power up for next run
|
||||
renamed entanglement
|
||||
also stores your gun and field
|
||||
improved graphics for incompatible tech
|
||||
|
||||
CPT triggers at above 100 energy instead of above 68 energy
|
||||
causality bots makes a few less bots
|
||||
|
||||
several tech with dynamic effects show the value of the effect in their description
|
||||
|
||||
|
||||
*********************************************************** TODO *****************************************************
|
||||
@@ -16,7 +13,10 @@ tech increase max energy and energy to 5000, but you can no longer regen energy
|
||||
|
||||
it would be nice if there was incentive to go slow when choosing tech so n-gon is more relaxing
|
||||
add some css based visual effects for opening up a tech,gun,field
|
||||
|
||||
|
||||
make freeze and __ not cause death at health health, but just 600% extra damage for that bullet
|
||||
|
||||
new mob attibute - phosphorescence - mobs fire lasers for a few seconds after being hit with lasers
|
||||
|
||||
make a new coupling effect for perfect diamagnetism or standing wave
|
||||
|
||||
|
||||
Reference in New Issue
Block a user