biohazard map

new level biohazard by INOOBBOI AND THESHWARMA
  enable community maps in settings

some coupling tech spawns power ups instead of directly giving coupling
fine-structure constant gives 60 coupling power ups, lose 0.5 coupling after mob collision
tech: decoupling: when ON: +5.00 coupling  OFF: spawn a WIMP
  (probably adds coupling drift bugs)

JUNK tech - boost - spawn a large number of boost power ups

several bug fixes
  mob - flutter is no longer treated as a boss
This commit is contained in:
landgreen
2022-09-04 10:47:57 -07:00
parent cc1bbeb53b
commit 9e613a281e
9 changed files with 1438 additions and 1730 deletions

View File

@@ -119,11 +119,25 @@ function collisionChecks(event) {
if (document.getElementById("tech-flip-flop")) document.getElementById("tech-flip-flop").innerHTML = ` = <strong>OFF</strong>` if (document.getElementById("tech-flip-flop")) document.getElementById("tech-flip-flop").innerHTML = ` = <strong>OFF</strong>`
m.eyeFillColor = 'transparent' m.eyeFillColor = 'transparent'
m.damage(dmg); m.damage(dmg);
if (tech.isFlipFlopCoupling) {
m.couplingChange(-5)
for (let i = 0; i < mob.length; i++) {
if (mob[i].isDecoupling) mob[i].alive = false //remove WIMP
}
spawn.WIMP()
mob[mob.length - 1].isDecoupling = true //so you can find it to remove
}
} else { } else {
tech.isFlipFlopOn = true //immune to damage this hit, lose immunity for next hit tech.isFlipFlopOn = true //immune to damage this hit, lose immunity for next hit
if (document.getElementById("tech-flip-flop")) document.getElementById("tech-flip-flop").innerHTML = ` = <strong>ON</strong>` if (document.getElementById("tech-flip-flop")) document.getElementById("tech-flip-flop").innerHTML = ` = <strong>ON</strong>`
m.eyeFillColor = m.fieldMeterColor //'#0cf' m.eyeFillColor = m.fieldMeterColor //'#0cf'
if (!tech.isFlipFlopHarm) m.damage(dmg); if (!tech.isFlipFlopHarm) m.damage(dmg);
if (tech.isFlipFlopCoupling) {
m.couplingChange(5)
for (let i = 0; i < mob.length; i++) {
if (mob[i].isDecoupling) mob[i].alive = false //remove WIMP
}
}
} }
if (tech.isFlipFlopHealth) { if (tech.isFlipFlopHealth) {
m.setMaxHealth(); m.setMaxHealth();
@@ -146,6 +160,7 @@ function collisionChecks(event) {
simulation.makeTextLog(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`); simulation.makeTextLog(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`);
} }
if (tech.isPiezo) m.energy += 20.48; if (tech.isPiezo) m.energy += 20.48;
if (tech.isCouplingNoHit) m.couplingChange(-0.5)
if (tech.isStimulatedEmission) powerUps.ejectTech() if (tech.isStimulatedEmission) powerUps.ejectTech()
if (mob[k].onHit) mob[k].onHit(); if (mob[k].onHit) mob[k].onHit();
if (m.immuneCycle < m.cycle + m.collisionImmuneCycles) m.immuneCycle = m.cycle + m.collisionImmuneCycles; //player is immune to damage for 30 cycles if (m.immuneCycle < m.cycle + m.collisionImmuneCycles) m.immuneCycle = m.cycle + m.collisionImmuneCycles; //player is immune to damage for 30 cycles

View File

@@ -257,7 +257,7 @@ const build = {
<br><strong class='color-defense'>defense</strong>: ${(1-m.harmReduction()).toPrecision(3)} &nbsp; &nbsp; difficulty: ${(1/simulation.dmgScale).toPrecision(3)} <br><strong class='color-defense'>defense</strong>: ${(1-m.harmReduction()).toPrecision(3)} &nbsp; &nbsp; difficulty: ${(1/simulation.dmgScale).toPrecision(3)}
${b.fireCDscale < 1 ? `<br><strong><em>fire rate</em></strong>: ${((1-b.fireCDscale)*100).toFixed(b.fireCDscale < 0.1 ? 2 : 0)}%`: ""} ${b.fireCDscale < 1 ? `<br><strong><em>fire rate</em></strong>: ${((1-b.fireCDscale)*100).toFixed(b.fireCDscale < 0.1 ? 2 : 0)}%`: ""}
${tech.duplicationChance() ? `<br><strong class='color-dup'>duplication</strong>: ${(tech.duplicationChance()*100).toFixed(0)}%`: ""} ${tech.duplicationChance() ? `<br><strong class='color-dup'>duplication</strong>: ${(tech.duplicationChance()*100).toFixed(0)}%`: ""}
${m.coupling ? `<br><strong class='color-coupling'>coupling</strong>: ${(m.coupling).toFixed(2)} &nbsp; <span style = 'font-size:90%;'>`+m.couplingDescription(true)+"</span>": ""} ${m.coupling ? `<br><strong class='color-coupling'>coupling</strong>: ${(m.coupling).toFixed(2)} &nbsp; <span style = 'font-size:90%;'>`+m.couplingDescription()+"</span>": ""}
${botText} ${botText}
<br> <br>
<br><strong class='color-h'>health</strong>: (${(m.health*100).toFixed(0)} / ${(m.maxHealth*100).toFixed(0)}) <br><strong class='color-h'>health</strong>: (${(m.health*100).toFixed(0)} / ${(m.maxHealth*100).toFixed(0)})

File diff suppressed because it is too large Load Diff

View File

@@ -317,6 +317,7 @@ const m = {
}, },
alive: false, alive: false,
switchWorlds() { switchWorlds() {
powerUps.boost.endCycle = 0
const totalGuns = b.inventory.length const totalGuns = b.inventory.length
//track ammo/ ammoPack count //track ammo/ ammoPack count
let ammoCount = 0 let ammoCount = 0
@@ -506,7 +507,7 @@ const m = {
}, },
baseHealth: 1, baseHealth: 1,
setMaxHealth() { setMaxHealth() {
m.maxHealth = m.baseHealth + tech.extraMaxHealth + tech.isFallingDamage + 4 * tech.isFlipFlop * tech.isFlipFlopOn * tech.isFlipFlopHealth + (m.fieldMode === 0 || m.fieldMode === 5) * 0.5 * m.coupling m.maxHealth = m.baseHealth + tech.extraMaxHealth + tech.isFallingDamage + 4 * tech.isFlipFlop * tech.isFlipFlopOn * tech.isFlipFlopHealth //+ (m.fieldMode === 0 || m.fieldMode === 5) * 0.5 * m.coupling
document.getElementById("health-bg").style.width = `${Math.floor(300 * m.maxHealth)}px` 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(2)}`)
if (m.health > m.maxHealth) m.health = m.maxHealth; if (m.health > m.maxHealth) m.health = m.maxHealth;
@@ -658,11 +659,11 @@ const m = {
}, },
collisionImmuneCycles: 30, collisionImmuneCycles: 30,
damage(dmg) { damage(dmg) {
if (tech.isCouplingNoHit) { // if (tech.isCouplingNoHit) {
for (let i = 0, len = tech.tech.length; i < len; i++) { // for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].name === "fine-structure constant") powerUps.ejectTech(i, true) // if (tech.tech[i].name === "fine-structure constant") powerUps.ejectTech(i, true)
} // }
} // }
if (tech.isRewindAvoidDeath && m.energy > 0.6 && dmg > 0.01) { if (tech.isRewindAvoidDeath && m.energy > 0.6 && dmg > 0.01) {
const steps = Math.floor(Math.min(299, 150 * m.energy)) const steps = Math.floor(Math.min(299, 150 * m.energy))
simulation.makeTextLog(`<span class='color-var'>m</span>.rewind(${steps})`) simulation.makeTextLog(`<span class='color-var'>m</span>.rewind(${steps})`)
@@ -1565,11 +1566,10 @@ const m = {
} }
}, },
hold() {}, hold() {},
couplingDescription(isScaled = false) { couplingDescription(couple = m.coupling) {
const couple = isScaled ? m.coupling : 1
switch (m.fieldMode) { switch (m.fieldMode) {
case 0: //field emitter case 0: //field emitter
return `gain the effects of <strong>all</strong> <strong class='color-f'>fields</strong>` return `gain the <strong class='color-coupling'>coupling</strong> effects of <strong>all</strong> <strong class='color-f'>fields</strong>`
case 1: //standing wave case 1: //standing wave
return `<span style = 'font-size:95%;'><strong>deflecting</strong> condenses +${couple.toFixed(1)} <strong class='color-s'>ice IX</strong></span>` return `<span style = 'font-size:95%;'><strong>deflecting</strong> condenses +${couple.toFixed(1)} <strong class='color-s'>ice IX</strong></span>`
case 2: //perfect diamagnetism case 2: //perfect diamagnetism
@@ -1591,12 +1591,16 @@ const m = {
return `<span style = 'font-size:89%;'>after eating <strong class='color-block'>blocks</strong> <strong>+${(20*couple).toFixed(0)}</strong> <strong class='color-f'>energy</strong></span>` return `<span style = 'font-size:89%;'>after eating <strong class='color-block'>blocks</strong> <strong>+${(20*couple).toFixed(0)}</strong> <strong class='color-f'>energy</strong></span>`
} }
}, },
couplingChange() { couplingChange(change = 0) {
if (change > 0) simulation.makeTextLog(`m.coupling <span class='color-symbol'>+=</span> ${change}`, 60);
m.coupling += change
if (m.coupling < 0) m.coupling = 0 //can't go negative
// m.setMaxEnergy(); // m.setMaxEnergy();
// m.setMaxHealth(); // m.setMaxHealth();
m.setFieldRegen() m.setFieldRegen()
mobs.setMobSpawnHealth(); mobs.setMobSpawnHealth();
powerUps.setDupChance(); powerUps.setDupChance();
if ((m.fieldMode === 0 || m.fieldMode === 9) && !build.isExperimentSelection && !simulation.isTextLogOpen) simulation.circleFlare(0.4); if ((m.fieldMode === 0 || m.fieldMode === 9) && !build.isExperimentSelection && !simulation.isTextLogOpen) simulation.circleFlare(0.4);
// m.collisionImmuneCycles = 30 + m.coupling * 120 //2 seconds // m.collisionImmuneCycles = 30 + m.coupling * 120 //2 seconds
// switch (m.fieldMode) { // switch (m.fieldMode) {
@@ -2681,7 +2685,6 @@ const m = {
}, },
{ {
name: "time dilation", name: "time dilation",
// description: "use <strong class='color-f'>energy</strong> to <strong style='letter-spacing: 1px;'>stop time</strong><br>while time is stopped you can <strong>move</strong> and <strong>fire</strong><br>and <strong>collisions</strong> do <strong>50%</strong> less <strong class='color-defense'>harm</strong>",
description: "use <strong class='color-f'>energy</strong> to <strong style='letter-spacing: 2px;'>stop time</strong><br><strong>+25%</strong> movement, jumping, and <strong><em>fire rate</em></strong><br>generate <strong>18</strong> <strong class='color-f'>energy</strong> per second", description: "use <strong class='color-f'>energy</strong> to <strong style='letter-spacing: 2px;'>stop time</strong><br><strong>+25%</strong> movement, jumping, and <strong><em>fire rate</em></strong><br>generate <strong>18</strong> <strong class='color-f'>energy</strong> per second",
set() { set() {
// m.fieldMeterColor = "#0fc" // m.fieldMeterColor = "#0fc"
@@ -2720,6 +2723,7 @@ const m = {
this.rewindCount = 0 this.rewindCount = 0
m.grabPowerUpRange2 = 300000 m.grabPowerUpRange2 = 300000
m.hold = function() { m.hold = function() {
console.log(m.fieldCDcycle)
m.grabPowerUp(); m.grabPowerUp();
// //grab power ups // //grab power ups
// for (let i = 0, len = powerUp.length; i < len; ++i) { // for (let i = 0, len = powerUp.length; i < len; ++i) {

View File

@@ -355,11 +355,7 @@ const powerUps = {
powerUps.spawn(m.pos.x + 40 * (Math.random() - 0.5), m.pos.y + 40 * (Math.random() - 0.5), spawnType, false); powerUps.spawn(m.pos.x + 40 * (Math.random() - 0.5), m.pos.y + 40 * (Math.random() - 0.5), spawnType, false);
} }
} }
if (tech.isCancelCouple) { if (tech.isCancelCouple) powerUps.coupling.spawnDelay(5)
simulation.makeTextLog(`m.coupling <span class='color-symbol'>+=</span> 0.5`);
m.coupling += 0.5
m.couplingChange()
}
// if (tech.isCancelTech && Math.random() < 0.3) { // if (tech.isCancelTech && Math.random() < 0.3) {
// powerUps.spawn(m.pos.x + 40 * (Math.random() - 0.5), m.pos.y + 40 * (Math.random() - 0.5), "tech", false); // powerUps.spawn(m.pos.x + 40 * (Math.random() - 0.5), m.pos.y + 40 * (Math.random() - 0.5), "tech", false);
// simulation.makeTextLog(`<strong>options exchange</strong>: returns 1 <strong class='color-m'>tech</strong>`) // simulation.makeTextLog(`<strong>options exchange</strong>: returns 1 <strong class='color-m'>tech</strong>`)
@@ -402,10 +398,22 @@ const powerUps = {
return 13; return 13;
}, },
effect() { effect() {
simulation.makeTextLog(`m.coupling <span class='color-symbol'>+=</span> 0.1`); m.couplingChange(0.1)
m.coupling += 0.1
m.couplingChange()
}, },
spawnDelay(num) {
let count = num
let respawnDrones = () => {
if (count > 0) {
requestAnimationFrame(respawnDrones);
if (!simulation.paused && !simulation.isChoosing) { //&& !(simulation.cycle % 2)
count--
const where = { x: m.pos.x + 50 * (Math.random() - 0.5), y: m.pos.y + 50 * (Math.random() - 0.5) }
powerUps.spawn(where.x, where.y, "coupling");
}
}
}
requestAnimationFrame(respawnDrones);
}
}, },
boost: { boost: {
name: "boost", name: "boost",
@@ -429,7 +437,7 @@ const powerUps = {
ctx.lineWidth = 4 ctx.lineWidth = 4
ctx.stroke(); ctx.stroke();
} }
} },
}, },
research: { research: {
count: 0, count: 0,
@@ -1069,151 +1077,20 @@ const powerUps = {
} }
} }
}, },
// effectOld() { },
// if (m.alive) { spawnDelay(type, num) {
// function pick(skip1 = null, skip2 = null, skip3 = null, skip4 = null) { let count = num
// let options = []; let cycle = () => {
// for (let i = 0; i < tech.tech.length; i++) { if (count > 0) {
// if (tech.tech[i].count < tech.tech[i].maxCount && i !== skip1 && i !== skip2 && i !== skip3 && i !== skip4 && tech.tech[i].allowed() && !tech.tech[i].isBanished) { requestAnimationFrame(cycle);
// for (let j = 0, len = tech.tech[i].frequency; j < len; j++) options.push(i); if (!simulation.paused && !simulation.isChoosing) { //&& !(simulation.cycle % 2)
// } count--
// } const where = { x: m.pos.x + 50 * (Math.random() - 0.5), y: m.pos.y + 50 * (Math.random() - 0.5) }
// powerUps.tech.lastTotalChoices = options.length //this is recorded so that banish can know how many tech were available powerUps.spawn(where.x, where.y, type);
}
// const totalChoices = tech.isDeterminism ? 1 : 3 + tech.extraChoices * 2 }
// if (powerUps.tech.choiceLog.length > totalChoices || powerUps.tech.choiceLog.length === totalChoices) { //make sure this isn't the first time getting a power up and there are previous choices to remove }
// for (let i = 0; i < totalChoices; i++) { //repeat for each choice from the last selection requestAnimationFrame(cycle);
// if (options.length > totalChoices) {
// for (let j = 0, len = options.length; j < len; j++) {
// if (powerUps.tech.choiceLog[powerUps.tech.length - 1 - i] === options[j]) {
// options.splice(j, 1) //remove previous choice from option pool
// break;
// }
// }
// }
// }
// }
// if (options.length > 0) {
// // const choose = options[Math.floor(Math.random() * options.length)]
// const choose = options[Math.floor(Math.seededRandom(0, options.length))]
// const isCount = tech.tech[choose].count > 0 ? `(${tech.tech[choose].count+1}x)` : "";
// if (tech.tech[choose].isFieldTech) {
// text += `<div class="choose-grid-module" onclick="powerUps.choose('tech',${choose})"><div class="grid-title">
// <span style="position:relative;">
// <div class="circle-grid tech" style="position:absolute; top:0; left:0;opacity:0.8;"></div>
// <div class="circle-grid field" style="position:absolute; top:0; left:10px;opacity:0.65;"></div>
// </span>
// &nbsp; &nbsp; &nbsp; &nbsp; ${tech.tech[choose].name} ${isCount}</div>${tech.tech[choose].descriptionFunction ? tech.tech[choose].descriptionFunction() :tech.tech[choose].description}</div></div>`
// } else if (tech.tech[choose].isGunTech) {
// text += `<div class="choose-grid-module" onclick="powerUps.choose('tech',${choose})"><div class="grid-title">
// <span style="position:relative;">
// <div class="circle-grid tech" style="position:absolute; top:0; left:0;opacity:0.8;"></div>
// <div class="circle-grid gun" style="position:absolute; top:0; left:10px; opacity:0.65;"></div>
// </span>
// &nbsp; &nbsp; &nbsp; &nbsp; ${tech.tech[choose].name} ${isCount}</div>${tech.tech[choose].descriptionFunction ? tech.tech[choose].descriptionFunction() :tech.tech[choose].description}</div></div>`
// } else if (tech.tech[choose].isLore) {
// text += `<div class="choose-grid-module" onclick="powerUps.choose('tech',${choose})"><div class="grid-title lore-text"><div class="circle-grid lore"></div> &nbsp; ${tech.tech[choose].name} ${isCount}</div>${tech.tech[choose].descriptionFunction ? tech.tech[choose].descriptionFunction() : tech.tech[choose].description}</div>`
// } else if (tech.tech[choose].isJunk) {
// text += `<div class="choose-grid-module" onclick="powerUps.choose('tech',${choose})"><div class="grid-title"><div class="circle-grid junk"></div> &nbsp; ${tech.tech[choose].name} ${isCount}</div>${tech.tech[choose].descriptionFunction ? tech.tech[choose].descriptionFunction() : tech.tech[choose].description}</div>`
// } else {
// text += `<div class="choose-grid-module" onclick="powerUps.choose('tech',${choose})"><div class="grid-title"><div class="circle-grid tech"></div> &nbsp; ${tech.tech[choose].name} ${isCount}</div>${tech.tech[choose].descriptionFunction ? tech.tech[choose].descriptionFunction() : tech.tech[choose].description}</div>`
// }
// // text += `<div class="choose-grid-module" onclick="powerUps.choose('tech',${choose})"><div class="grid-title"><div class="circle-grid tech"></div> &nbsp; ${tech.tech[choose].name}</div> ${tech.tech[choose].description}</div>`
// return choose
// } else if (tech.isBanish) { //if no tech options available eject banish tech
// for (let i = 0, len = tech.tech.length; i < len; i++) {
// if (tech.tech[i].name === "decoherence") powerUps.ejectTech(i)
// }
// }
// }
// let text = ""
// if (!tech.isSuperDeterminism) text += `<div class='cancel' onclick='powerUps.endDraft("tech",true)'>${tech.isCancelTech ? "?":"✕"}</div>`
// text += `<h3 style = 'color:#fff; text-align:left; margin: 0px;'>tech</h3>`
// let choice1 = pick()
// // console.log(choice1)
// let choice2 = null
// let choice3 = null
// if (choice1 !== null) {
// powerUps.tech.choiceLog.push(choice1)
// if (!tech.isDeterminism) {
// choice2 = pick(choice1)
// // if (choice2 > -1) text += `<div class="choose-grid-module" onclick="powerUps.choose('tech',${choice2})"><div class="grid-title"><div class="circle-grid tech"></div> &nbsp; ${tech.tech[choice2].name}</div> ${tech.tech[choice2].description}</div>`
// choice3 = pick(choice1, choice2)
// // if (choice3 > -1) text += `<div class="choose-grid-module" onclick="powerUps.choose('tech',${choice3})"><div class="grid-title"><div class="circle-grid tech"></div> &nbsp; ${tech.tech[choice3].name}</div> ${tech.tech[choice3].description}</div>`
// powerUps.tech.choiceLog.push(choice2)
// powerUps.tech.choiceLog.push(choice3)
// }
// if (tech.extraChoices) {
// let choice4 = pick(choice1, choice2, choice3)
// // if (choice4 > -1) text += `<div class="choose-grid-module" onclick="powerUps.choose('tech',${choice4})"><div class="grid-title"><div class="circle-grid tech"></div> &nbsp; ${tech.tech[choice4].name}</div> ${tech.tech[choice4].description}</div>`
// let choice5 = pick(choice1, choice2, choice3, choice4)
// // if (choice5 > -1) text += `<div class="choose-grid-module" onclick="powerUps.choose('tech',${choice5})"><div class="grid-title"><div class="circle-grid tech"></div> &nbsp; ${tech.tech[choice5].name}</div> ${tech.tech[choice5].description}</div>`
// powerUps.tech.choiceLog.push(choice4)
// powerUps.tech.choiceLog.push(choice5)
// }
// // 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.isExtraGunField) {
// if (Math.random() > 0.5 && b.inventory.length < b.guns.length) {
// //bonus gun in tech menu
// let choiceGun = powerUps.gun.pick(b.guns)
// powerUps.gun.choiceLog.push(choiceGun)
// text += `<div class="choose-grid-module" onclick="powerUps.choose('gun',${choiceGun})"><div class="grid-title"><div class="circle-grid gun"></div> &nbsp; ${b.guns[choiceGun].name}</div> ${b.guns[choiceGun].description}</div>`
// } else {
// //bonus field in tech menu
// let choiceField = powerUps.field.pick(m.fieldUpgrades)
// powerUps.field.choiceLog.push(choiceField)
// text += `<div class="choose-grid-module" onclick="powerUps.choose('field',${choiceField})"><div class="grid-title"><div class="circle-grid field"></div> &nbsp; ${m.fieldUpgrades[choiceField].name}</div> ${m.fieldUpgrades[choiceField].description}</div>`
// }
// }
// if (tech.tooManyTechChoices) {
// tech.tooManyTechChoices--
// for (let i = 0; i < powerUps.tech.lastTotalChoices; i++) pick()
// }
// if (tech.isBrainstorm && !tech.isBrainstormActive && !simulation.isChoosing) {
// tech.isBrainstormActive = true
// let count = 0
// requestAnimationFrame(cycle);
// function cycle() {
// count++
// if (count < tech.brainStormDelay * 5 && simulation.isChoosing) {
// if (!(count % tech.brainStormDelay)) {
// powerUps.tech.effect();
// document.getElementById("choose-grid").style.pointerEvents = "auto"; //turn off the normal 500ms delay
// document.body.style.cursor = "auto";
// document.getElementById("choose-grid").style.transitionDuration = "0s";
// }
// requestAnimationFrame(cycle);
// } else {
// tech.isBrainstormActive = false
// }
// }
// }
// //add in research button or pseudoscience button
// if (tech.isJunkResearch && powerUps.research.currentRerollCount < 3) {
// 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>`
// } else if (powerUps.research.count) {
// text += `<div class="choose-grid-module" onclick="powerUps.research.use('tech')"><div class="grid-title"> <span style="position:relative;">`
// for (let i = 0, len = Math.min(powerUps.research.count, 30); i < len; i++) text += `<div class="circle-grid research" style="position:absolute; top:0; left:${(18 - len*0.3)*i}px;opacity:0.8; border: 1px #fff solid;"></div>`
// // text += `</span>&nbsp; <span class='research-select'>research</span></div></div>`
// text += `</span>&nbsp; <span class='research-select'>${tech.isResearchReality?"<span class='alt'>alternate reality</span>": "research"}</span></div></div>`
// }
// document.getElementById("choose-grid").innerHTML = text
// powerUps.showDraft();
// }
// }
// }
}, },
onPickUp(who) { onPickUp(who) {
powerUps.research.currentRerollCount = 0 powerUps.research.currentRerollCount = 0
@@ -1231,25 +1108,30 @@ const powerUps = {
tech.isFlipFlopOn = false tech.isFlipFlopOn = false
if (document.getElementById("tech-switch")) document.getElementById("tech-switch").innerHTML = ` = <strong>OFF</strong>` if (document.getElementById("tech-switch")) document.getElementById("tech-switch").innerHTML = ` = <strong>OFF</strong>`
m.eyeFillColor = 'transparent' m.eyeFillColor = 'transparent'
if (tech.isFlipFlopCoupling) {
m.couplingChange(-5)
for (let i = 0; i < mob.length; i++) {
if (mob[i].isDecoupling) mob[i].alive = false //remove WIMP
}
spawn.WIMP()
mob[mob.length - 1].isDecoupling = true //so you can find it to remove
}
} else { } else {
tech.isFlipFlopOn = true //immune to damage this hit, lose immunity for next hit tech.isFlipFlopOn = true //immune to damage this hit, lose immunity for next hit
if (document.getElementById("tech-switch")) document.getElementById("tech-switch").innerHTML = ` = <strong>ON</strong>` if (document.getElementById("tech-switch")) document.getElementById("tech-switch").innerHTML = ` = <strong>ON</strong>`
m.eyeFillColor = m.fieldMeterColor //'#0cf' m.eyeFillColor = m.fieldMeterColor //'#0cf'
if (tech.isFlipFlopCoupling) {
m.couplingChange(5)
for (let i = 0; i < mob.length; i++) {
if (mob[i].isDecoupling) mob[i].alive = false //remove WIMP
}
}
} }
if (tech.isRelayEnergy) m.setMaxEnergy(); if (tech.isRelayEnergy) m.setMaxEnergy();
} }
}, },
// giveRandomAmmo() {
// const ammoTarget = Math.floor(Math.random() * (b.guns.length));
// const ammo = Math.ceil(b.guns[ammoTarget].ammoPack * 6);
// if (ammo !== Infinity) {
// b.guns[ammoTarget].ammo += ammo;
// simulation.updateGunHUD();
// simulation.makeTextLog(`${b.guns[ammoTarget].name}.<span class='color-g'>ammo</span> <span class='color-symbol'>+=</span> ${ammo}`);
// }
// },
spawnRandomPowerUp(x, y) { //mostly used after mob dies, doesn't always return a power up spawnRandomPowerUp(x, y) { //mostly used after mob dies, doesn't always return a power up
if ((Math.random() * Math.random() - 0.3 > Math.sqrt(m.health) && !tech.isEnergyHealth) || Math.random() < 0.04) { //spawn heal chance is higher at low health if (!tech.isEnergyHealth && (Math.random() * Math.random() - 0.3 > Math.sqrt(m.health)) || Math.random() < 0.04) { //spawn heal chance is higher at low health
powerUps.spawn(x, y, "heal"); powerUps.spawn(x, y, "heal");
return; return;
} }

View File

@@ -775,6 +775,7 @@ const simulation = {
powerUps.field.choiceLog = []; powerUps.field.choiceLog = [];
powerUps.totalPowerUps = 0; powerUps.totalPowerUps = 0;
powerUps.research.count = 0; powerUps.research.count = 0;
powerUps.boost.endCycle = 0
m.setFillColors(); m.setFillColors();
// m.maxHealth = 1 // m.maxHealth = 1
// m.maxEnergy = 1 // m.maxEnergy = 1

View File

@@ -340,7 +340,7 @@ const spawn = {
} }
setTimeout(() => { setTimeout(() => {
this.do = this.awake; this.do = this.awake;
}, 500 + 2000 * Math.random()); }, 1000 * Math.random());
} }
this.checkStatus(); this.checkStatus();
}; };
@@ -2710,7 +2710,6 @@ const spawn = {
flutter(x, y, radius = 20 + 6 * Math.random()) { flutter(x, y, radius = 20 + 6 * Math.random()) {
mobs.spawn(x, y, 7, radius, '#16576b'); mobs.spawn(x, y, 7, radius, '#16576b');
let me = mob[mob.length - 1]; let me = mob[mob.length - 1];
me.isBoss = true;
Matter.Body.setDensity(me, 0.002); //extra dense //normal is 0.001 //makes effective life much larger Matter.Body.setDensity(me, 0.002); //extra dense //normal is 0.001 //makes effective life much larger
// me.damageReduction = 0.04 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1) // me.damageReduction = 0.04 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)

View File

@@ -57,7 +57,7 @@ const tech = {
} }
if (tech.tech[index].count === 0) return 0 if (tech.tech[index].count === 0) return 0
const totalRemoved = tech.tech[index].count const totalRemoved = tech.tech[index].count
simulation.makeTextLog(`<span class='color-var'>tech</span>.removeTech("<span class='color-text'>${tech.tech[index].name}</span>")`) simulation.makeTextLog(`<span class='color-var'>tech</span>.removeTech("<span class='color-text'>${tech.tech[index].name}</span>")`, 360)
tech.tech[index].remove(); tech.tech[index].remove();
tech.tech[index].count = 0; tech.tech[index].count = 0;
tech.totalCount -= totalRemoved tech.totalCount -= totalRemoved
@@ -295,9 +295,7 @@ const tech = {
isNonRefundable: true, isNonRefundable: true,
// isExperimentHide: true, // isExperimentHide: true,
isBadRandomOption: true, isBadRandomOption: true,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
powerUps.spawn(m.pos.x, m.pos.y, "gun"); powerUps.spawn(m.pos.x, m.pos.y, "gun");
@@ -367,7 +365,7 @@ const tech = {
const index = Math.floor(Math.random() * gunTechPool.length) const index = Math.floor(Math.random() * gunTechPool.length)
tech.giveTech(gunTechPool[index]) // choose from the gun pool tech.giveTech(gunTechPool[index]) // choose from the gun pool
tech.tech[gunTechPool[index]].isFromAppliedScience = true //makes it not remove properly under paradigm shift tech.tech[gunTechPool[index]].isFromAppliedScience = true //makes it not remove properly under paradigm shift
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[gunTechPool[index]].name}</span>")`) simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[gunTechPool[index]].name}</span>")`, 360)
} }
} }
simulation.boldActiveGunHUD(); simulation.boldActiveGunHUD();
@@ -381,9 +379,7 @@ const tech = {
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
tech.isDamageForGuns = true; tech.isDamageForGuns = true;
@@ -399,9 +395,7 @@ const tech = {
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
tech.isFireRateForGuns = true; tech.isFireRateForGuns = true;
@@ -605,9 +599,7 @@ const tech = {
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
tech.crouchAmmoCount = true tech.crouchAmmoCount = true
@@ -870,9 +862,7 @@ const tech = {
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
tech.isBulletsLastLonger += 0.3 tech.isBulletsLastLonger += 0.3
@@ -989,9 +979,7 @@ const tech = {
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
tech.deathSkipTime++ tech.deathSkipTime++
@@ -1008,9 +996,9 @@ const tech = {
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed() {
return !tech.isEnergyHealth return !tech.isEnergyHealth && !tech.isRewindField
}, },
requires: "not mass-energy", requires: "not mass-energy, retrocausality",
effect() { effect() {
tech.isNoFireDefense = true tech.isNoFireDefense = true
}, },
@@ -1026,9 +1014,9 @@ const tech = {
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed() {
return true return !tech.isRewindField
}, },
requires: "", requires: "not retrocausality",
effect() { effect() {
tech.isNoFireDamage = true tech.isNoFireDamage = true
}, },
@@ -1856,14 +1844,30 @@ const tech = {
requires: "not relay switch", requires: "not relay switch",
effect() { effect() {
tech.isFlipFlop = true //do you have this tech? tech.isFlipFlop = true //do you have this tech?
tech.isFlipFlopOn = true //what is the state of flip-Flop? if (!tech.isFlipFlopOn) {
tech.isFlipFlopOn = true //what is the state of flip-Flop?
if (tech.isFlipFlopCoupling) {
m.couplingChange(5)
for (let i = 0; i < mob.length; i++) {
if (mob[i].isDecoupling) mob[i].alive = false //remove WIMP
}
}
}
if (!m.isShipMode) { if (!m.isShipMode) {
m.draw = m.drawFlipFlop m.draw = m.drawFlipFlop
} }
}, },
remove() { remove() {
tech.isFlipFlop = false tech.isFlipFlop = false
tech.isFlipFlopOn = false if (tech.isFlipFlopOn) {
tech.isFlipFlopOn = false //what is the state of flip-Flop?
if (tech.isFlipFlopCoupling) {
m.couplingChange(5)
for (let i = 0; i < mob.length; i++) {
if (mob[i].isDecoupling) mob[i].alive = false //remove WIMP
}
}
}
m.eyeFillColor = 'transparent' m.eyeFillColor = 'transparent'
} }
}, },
@@ -1921,6 +1925,47 @@ const tech = {
tech.isFlipFlopEnergy = false; tech.isFlipFlopEnergy = false;
} }
}, },
{
name: "decoupling",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Decoupling_(cosmology)' class="link">decoupling</a>`,
descriptionFunction() {
//<span style = 'font-size:80%;'>(${ m.couplingDescription(this.bonus)})</span>
return `if <strong class='color-flop'>ON</strong> <strong>+5</strong> <strong class='color-coupling'>coupling</strong><br>if <strong class='color-flop'>OFF</strong> a dangerous particle slowly <strong>chases</strong> you`
},
maxCount: 1,
count: 0,
frequency: 4,
frequencyDefault: 4,
bonus: 5, //coupling given
allowed() {
return tech.isFlipFlop || tech.isRelay
},
requires: "ON/OFF tech",
effect() {
tech.isFlipFlopCoupling = true;
if (tech.isFlipFlopOn) {
m.couplingChange(this.bonus)
} else {
for (let i = 0; i < mob.length; i++) {
if (mob[i].isDecoupling) mob[i].alive = false //remove WIMP
}
spawn.WIMP()
mob[mob.length - 1].isDecoupling = true //so you can find it to remove
}
},
remove() {
tech.isFlipFlopCoupling = false;
if (tech.isFlipFlop || tech.isRelay) {
if (tech.isFlipFlopOn) {
m.couplingChange(-this.bonus)
} else {
for (let i = 0; i < mob.length; i++) {
if (mob[i].isDecoupling) mob[i].alive = false //remove WIMP
}
}
}
}
},
{ {
name: "relay switch", name: "relay switch",
description: `toggle <strong class="color-flop">ON</strong> and <strong class="color-flop">OFF</strong> after picking up a <strong>power up</strong><br>unlock advanced <strong class='color-m'>tech</strong> that runs if <strong class="color-flop">ON</strong>`, description: `toggle <strong class="color-flop">ON</strong> and <strong class="color-flop">OFF</strong> after picking up a <strong>power up</strong><br>unlock advanced <strong class='color-m'>tech</strong> that runs if <strong class="color-flop">ON</strong>`,
@@ -1948,14 +1993,30 @@ const tech = {
requires: "not flip-flop", requires: "not flip-flop",
effect() { effect() {
tech.isRelay = true //do you have this tech? tech.isRelay = true //do you have this tech?
tech.isFlipFlopOn = true //what is the state of flip-Flop? if (!tech.isFlipFlopOn) {
tech.isFlipFlopOn = true //what is the state of flip-Flop?
if (tech.isFlipFlopCoupling) {
m.couplingChange(5)
for (let i = 0; i < mob.length; i++) {
if (mob[i].isDecoupling) mob[i].alive = false //remove WIMP
}
}
}
if (!m.isShipMode) { if (!m.isShipMode) {
m.draw = m.drawFlipFlop m.draw = m.drawFlipFlop
} }
}, },
remove() { remove() {
tech.isRelay = false tech.isRelay = false
tech.isFlipFlopOn = false if (tech.isFlipFlopOn) {
tech.isFlipFlopOn = false //what is the state of flip-Flop?
if (tech.isFlipFlopCoupling) {
m.couplingChange(-5)
for (let i = 0; i < mob.length; i++) {
if (mob[i].isDecoupling) mob[i].alive = false //remove WIMP
}
}
}
m.eyeFillColor = 'transparent' m.eyeFillColor = 'transparent'
} }
}, },
@@ -2081,9 +2142,7 @@ const tech = {
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
tech.isDroneOnDamage = true; tech.isDroneOnDamage = true;
@@ -2376,9 +2435,7 @@ const tech = {
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
tech.isLowEnergyDamage = true; tech.isLowEnergyDamage = true;
@@ -3304,9 +3361,7 @@ const tech = {
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
tech.isBoostPowerUps = true tech.isBoostPowerUps = true
@@ -3406,7 +3461,7 @@ const tech = {
{ {
name: "field coupling", name: "field coupling",
descriptionFunction() { descriptionFunction() {
return `<strong>+1</strong> <strong class='color-coupling'>coupling</strong> <em>(${m.fieldUpgrades[m.fieldMode].name})</em><br>${ m.couplingDescription()} ${m.fieldMode === 0 ? "" : "per <strong class='color-coupling'>coupling</strong>"}` return `spawn ${powerUps.orb.coupling(10)}<br>that each give <strong>+0.1</strong> <strong class='color-coupling'>coupling</strong><br>${ m.couplingDescription(1)} ${m.fieldMode === 0 ? "" : "per <strong class='color-coupling'>coupling</strong>"}`
}, },
maxCount: 9, maxCount: 9,
count: 0, count: 0,
@@ -3417,19 +3472,27 @@ const tech = {
}, },
requires: "", requires: "",
effect() { effect() {
simulation.makeTextLog(`m.coupling <span class='color-symbol'>+=</span> 1`); powerUps.spawnDelay("coupling", 10)
m.coupling += 1
m.couplingChange()
}, },
remove() { remove() {
m.coupling -= this.count if (this.count) {
m.couplingChange() m.couplingChange(-this.count)
}
} }
}, },
{ {
name: "quintessence", name: "quintessence",
descriptionFunction() { descriptionFunction() {
return `use all your ${powerUps.orb.research(1)} to get <strong>+${this.count ? this.researchUsed*this.couplingToResearch:powerUps.research.count*this.couplingToResearch}</strong> <strong class='color-coupling'>coupling</strong><br>${ m.couplingDescription()} ${m.fieldMode === 0 ? "" : "per <strong class='color-coupling'>coupling</strong>"}` let converted = powerUps.research.count * this.couplingToResearch
if (this.count) converted = this.researchUsed * this.couplingToResearch
let orbText
if (converted > 20) {
orbText = `${converted} ${powerUps.orb.coupling()}`
} else {
orbText = powerUps.orb.coupling(converted)
}
return `use all your ${powerUps.orb.research(1)} to spawn <strong>${orbText}<br></strong>that each give <strong>+0.1</strong> <strong class='color-coupling'>coupling</strong><br>${ m.couplingDescription(1)} ${m.fieldMode === 0 ? "" : "per <strong class='color-coupling'>coupling</strong>"}`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -3442,35 +3505,32 @@ const tech = {
researchUsed: 0, researchUsed: 0,
couplingToResearch: 0.25, couplingToResearch: 0.25,
effect() { effect() {
let count = 0
while (powerUps.research.count > 0) { while (powerUps.research.count > 0) {
powerUps.research.changeRerolls(-1) powerUps.research.changeRerolls(-1)
count += 10
this.researchUsed++ this.researchUsed++
simulation.makeTextLog(`m.coupling <span class='color-symbol'>+=</span> ${(this.couplingToResearch).toFixed(2)}`);
m.coupling += this.couplingToResearch
} }
m.couplingChange() powerUps.spawnDelay("coupling", count)
}, },
remove() { remove() {
if (this.count) { if (this.count) {
m.coupling -= this.researchUsed * this.couplingToResearch m.couplingChange(-this.researchUsed * this.couplingToResearch)
powerUps.research.changeRerolls(this.researchUsed) powerUps.research.changeRerolls(this.researchUsed)
this.researchUsed = 0 this.researchUsed = 0
} }
m.couplingChange()
} }
}, },
{ {
name: "virtual particles", name: "virtual particles",
descriptionFunction() { descriptionFunction() {
return `after mobs <strong>die</strong> they have a <strong>17%</strong> chance to<br>spawn ${powerUps.orb.coupling(1)} that give <strong>+0.1</strong> <strong class='color-coupling'>coupling</strong>` return `after mobs <strong>die</strong> they have a <strong>17%</strong> chance to<br>spawn ${powerUps.orb.coupling(1)} that each give <strong>+0.1</strong> <strong class='color-coupling'>coupling</strong><br>${ m.couplingDescription(1)} ${m.fieldMode === 0 ? "" : "per <strong class='color-coupling'>coupling</strong>"}`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
tech.isCouplingPowerUps = true //about 20-30 mobs per level so at 16% and 0.1 coupling that's about 25 * 0.16 * 0.1 = 0.4 coupling per level with out duplication tech.isCouplingPowerUps = true //about 20-30 mobs per level so at 16% and 0.1 coupling that's about 25 * 0.16 * 0.1 = 0.4 coupling per level with out duplication
@@ -3482,38 +3542,35 @@ const tech = {
{ {
name: "fine-structure constant", name: "fine-structure constant",
descriptionFunction() { descriptionFunction() {
return `+${this.value} <strong class='color-coupling'>coupling</strong>, <span style = 'font-size:85%;'><strong>eject</strong> this <strong class='color-m'>tech</strong> after losing <strong class='color-h'>health</strong></span><br>${ m.couplingDescription()} ${m.fieldMode === 0 ? "" : "per <strong class='color-coupling'>coupling</strong>"}` return `spawn ${this.value} ${powerUps.orb.coupling(1)} that each give <strong>+0.1</strong> <strong class='color-coupling'>coupling</strong>
<br><strong>-0.5</strong> <strong class='color-coupling'>coupling</strong> after mob <strong>collisions</strong>
<br>${m.couplingDescription(1)} ${m.fieldMode === 0 ? "" : "per <strong class='color-coupling'>coupling</strong>"}`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 100, frequencyDefault: 100,
allowed() { isNonRefundable: true,
return true allowed: () => true,
}, value: 60,
value: 6,
requires: "", requires: "",
effect() { effect() {
tech.isCouplingNoHit = true tech.isCouplingNoHit = true
simulation.makeTextLog(`m.coupling <span class='color-symbol'>+=</span> ${(this.value).toFixed(1)}`); powerUps.spawnDelay("coupling", this.value)
m.coupling += this.value
m.couplingChange()
this.maxCount = 0
}, },
remove() { remove() {
if (this.count) { // if (this.count) {
m.coupling -= this.value // m.couplingChange(-this.value)
m.couplingChange() // } else {
} else { // this.maxCount = 1 //reset only take this once per game
this.maxCount = 1 // }
}
tech.isCouplingNoHit = false tech.isCouplingNoHit = false
} }
}, },
{ {
name: "residual dipolar coupling", name: "residual dipolar coupling",
descriptionFunction() { descriptionFunction() {
return `clicking <strong style = 'font-size:150%;'>×</strong> to <strong>cancel</strong> yields <strong>+0.5</strong> <strong class='color-coupling'>coupling</strong><br>${ m.couplingDescription()} ${m.fieldMode === 0 ? "" : "per <strong class='color-coupling'>coupling</strong>"}` return `clicking <strong style = 'font-size:150%;'>×</strong> to <strong>cancel</strong> a <strong class='color-f'>field</strong>, <strong class='color-m'>tech</strong>, or <strong class='color-g'>gun</strong><br>spawns ${powerUps.orb.coupling(5)}that each give <strong>+0.1</strong> <strong class='color-coupling'>coupling</strong><br>${ m.couplingDescription(1)} ${m.fieldMode === 0 ? "" : "per <strong class='color-coupling'>coupling</strong>"}`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -3530,6 +3587,24 @@ const tech = {
tech.isCancelCouple = false tech.isCancelCouple = false
} }
}, },
{
name: "commodities exchange",
description: `clicking <strong style = 'font-size:150%;'>×</strong> to <strong>cancel</strong> a <strong class='color-f'>field</strong>, <strong class='color-m'>tech</strong>, or <strong class='color-g'>gun</strong><br>spawns <strong>5-10</strong> ${powerUps.orb.heal()}, ${powerUps.orb.ammo()}, or ${powerUps.orb.research(1)}`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isSuperDeterminism
},
requires: "not superdeterminism",
effect() {
tech.isCancelRerolls = true
},
remove() {
tech.isCancelRerolls = false
}
},
{ {
name: "options exchange", name: "options exchange",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Option_(finance)' class="link">options exchange</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Option_(finance)' class="link">options exchange</a>`,
@@ -3549,24 +3624,6 @@ const tech = {
tech.isCancelTech = false tech.isCancelTech = false
} }
}, },
{
name: "commodities exchange",
description: `clicking <strong style = 'font-size:150%;'>×</strong> to <strong>cancel</strong> a <strong class='color-f'>field</strong>, <strong class='color-m'>tech</strong>, or <strong class='color-g'>gun</strong><br>spawns <strong>5-10</strong> ${powerUps.orb.heal()}, ${powerUps.orb.ammo()}, or ${powerUps.orb.research(1)}`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isSuperDeterminism
},
requires: "not superdeterminism",
effect() {
tech.isCancelRerolls = true
},
remove() {
tech.isCancelRerolls = false
}
},
{ {
name: "futures exchange", name: "futures exchange",
description: "clicking <strong style = 'font-size:150%;'>×</strong> to <strong>cancel</strong> a <strong class='color-f'>field</strong>, <strong class='color-m'>tech</strong>, or <strong class='color-g'>gun</strong><br>gives <strong>+4.5%</strong> power up <strong class='color-dup'>duplication</strong> chance", description: "clicking <strong style = 'font-size:150%;'>×</strong> to <strong>cancel</strong> a <strong class='color-f'>field</strong>, <strong class='color-m'>tech</strong>, or <strong class='color-g'>gun</strong><br>gives <strong>+4.5%</strong> power up <strong class='color-dup'>duplication</strong> chance",
@@ -3797,7 +3854,7 @@ const tech = {
if (tech.tech[i].count > 0 && !tech.tech[i].isNonRefundable) have.push(i) if (tech.tech[i].count > 0 && !tech.tech[i].isNonRefundable) have.push(i)
} }
const choose = have[Math.floor(Math.random() * have.length)] const choose = have[Math.floor(Math.random() * have.length)]
simulation.makeTextLog(`<span class='color-var'>tech</span>.removeTech("<span class='color-text'>${tech.tech[choose].name}</span>")`) simulation.makeTextLog(`<span class='color-var'>tech</span>.removeTech("<span class='color-text'>${tech.tech[choose].name}</span>")`, 360)
for (let i = 0; i < tech.tech[choose].count; i++) { for (let i = 0; i < tech.tech[choose].count; i++) {
powerUps.spawn(m.pos.x, m.pos.y, "gun"); powerUps.spawn(m.pos.x, m.pos.y, "gun");
} }
@@ -6217,9 +6274,9 @@ const tech = {
frequency: 2, frequency: 2,
frequencyDefault: 2, frequencyDefault: 2,
allowed() { allowed() {
return tech.haveGunCheck("laser") || (tech.haveGunCheck("harpoon") && !tech.isRailGun) return tech.haveGunCheck("laser") || (tech.haveGunCheck("harpoon") && !tech.isRailGun) && !tech.isEnergyNoAmmo
}, },
requires: "harpoon, laser, not railgun", requires: "harpoon, laser, not railgun, non-renewables",
effect() { effect() {
tech.isBoostReplaceAmmo = true tech.isBoostReplaceAmmo = true
for (let i = powerUp.length - 1; i > -1; i--) { for (let i = powerUp.length - 1; i > -1; i--) {
@@ -6272,7 +6329,7 @@ const tech = {
//pick one option //pick one option
if (options.length) { if (options.length) {
const index = options[Math.floor(Math.random() * options.length)] const index = options[Math.floor(Math.random() * options.length)]
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[index].name}</span>") <em>//optical amplifier</em>`); simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[index].name}</span>") <em>//optical amplifier</em>`, 360);
tech.giveTech(index) tech.giveTech(index)
techGiven++ techGiven++
} }
@@ -7647,7 +7704,7 @@ const tech = {
}, },
{ {
name: "WIMPs", name: "WIMPs",
description: `at the end of each <strong>level</strong> spawn ${powerUps.orb.research(5)}<br> and a <strong class='color-defense'>harmful</strong> particle that slowly <strong>chases</strong> you`, description: `at the end of each <strong>level</strong> spawn ${powerUps.orb.research(5)}<br> and a dangerous particle that slowly <strong>chases</strong> you`,
isFieldTech: true, isFieldTech: true,
maxCount: 9, maxCount: 9,
count: 0, count: 0,
@@ -8041,6 +8098,41 @@ const tech = {
// }, // },
// remove() {} // remove() {}
// }, // },
{
name: "boost",
maxCount: 1,
count: 0,
frequency: 0,
isJunk: true,
allowed() {
return !build.isExperimentSelection
},
requires: "NOT EXPERIMENT MODE",
effect() {
powerUps.spawnDelay("boost", this.spawnCount)
},
remove() {},
id: 0,
text: "",
delay: 100,
spawnCount: 0,
descriptionFunction() {
let count = 9999 * Math.random()
const loop = () => {
if ((simulation.isChoosing) && m.alive && !build.isExperimentSelection) { //&& (!simulation.isChoosing || this.count === 0) //simulation.paused ||
count += 4.5
const waves = 2 * Math.sin(count * 0.0133) + Math.sin(count * 0.013) + 0.5 * Math.sin(count * 0.031) + 0.33 * Math.sin(count * 0.03)
this.spawnCount = Math.floor(100 * Math.abs(waves))
this.text = `spawn <strong style = "font-family: 'Courier New', monospace;">${this.spawnCount.toLocaleString(undefined, {minimumIntegerDigits:3})}</strong> ${powerUps.orb.boost(1)}<br>that give <strong>+${(powerUps.boost.damage*100).toFixed(0)}%</strong> <strong class='color-d'>damage</strong> for <strong>${(powerUps.boost.duration/60).toFixed(0)}</strong> seconds</span>`
if (document.getElementById(`boost-JUNK-id${this.id}`)) document.getElementById(`boost-JUNK-id${this.id}`).innerHTML = this.text
setTimeout(() => { loop() }, this.delay);
}
}
setTimeout(() => { loop() }, this.delay);
this.id++
return `<span id = "boost-JUNK-id${this.id}">${this.text}</span>`
},
},
{ {
name: "return", name: "return",
description: "return to the introduction level<br>reduce combat <strong>difficulty</strong> by <strong>2 levels</strong>", description: "return to the introduction level<br>reduce combat <strong>difficulty</strong> by <strong>2 levels</strong>",
@@ -8049,9 +8141,7 @@ const tech = {
frequency: 0, frequency: 0,
isJunk: true, isJunk: true,
isNonRefundable: true, isNonRefundable: true,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
level.difficultyDecrease(simulation.difficultyMode * 2) level.difficultyDecrease(simulation.difficultyMode * 2)
@@ -8068,9 +8158,7 @@ const tech = {
frequency: 0, frequency: 0,
isJunk: true, isJunk: true,
isNonRefundable: true, isNonRefundable: true,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
setInterval(() => { setInterval(() => {
@@ -8094,9 +8182,7 @@ const tech = {
frequency: 0, frequency: 0,
isJunk: true, isJunk: true,
isNonRefundable: true, isNonRefundable: true,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
setInterval(() => { setInterval(() => {
@@ -8136,9 +8222,7 @@ const tech = {
frequency: 0, frequency: 0,
isJunk: true, isJunk: true,
isNonRefundable: true, isNonRefundable: true,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "field"); for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x + 10 * Math.random(), m.pos.y + 10 * Math.random(), "field");
@@ -8215,9 +8299,7 @@ const tech = {
frequency: 0, frequency: 0,
isJunk: true, isJunk: true,
isNonRefundable: true, isNonRefundable: true,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
tech.giveRandomJUNK() tech.giveRandomJUNK()
@@ -8253,9 +8335,7 @@ const tech = {
frequencyDefault: 0, frequencyDefault: 0,
isJunk: true, isJunk: true,
isNonRefundable: true, isNonRefundable: true,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
powerUps.spawn(m.pos.x, m.pos.y, "tech"); powerUps.spawn(m.pos.x, m.pos.y, "tech");
@@ -8289,9 +8369,7 @@ const tech = {
frequencyDefault: 0, frequencyDefault: 0,
isJunk: true, isJunk: true,
isNonRefundable: true, isNonRefundable: true,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
for (let i = 0, len = mob.length; i < len; i++) { for (let i = 0, len = mob.length; i < len; i++) {
@@ -8317,9 +8395,7 @@ const tech = {
frequency: 0, frequency: 0,
frequencyDefault: 0, frequencyDefault: 0,
isJunk: true, isJunk: true,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
@@ -8336,9 +8412,7 @@ const tech = {
frequency: 0, frequency: 0,
frequencyDefault: 0, frequencyDefault: 0,
isJunk: true, isJunk: true,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
tech.isBrainstorm = true tech.isBrainstorm = true
@@ -9982,9 +10056,7 @@ const tech = {
count: 0, count: 0,
frequency: 0, frequency: 0,
isJunk: true, isJunk: true,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() {}, effect() {},
remove() {}, remove() {},
@@ -10046,9 +10118,7 @@ const tech = {
count: 0, count: 0,
frequency: 0, frequency: 0,
isJunk: true, isJunk: true,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() {}, effect() {},
remove() {}, remove() {},
@@ -10191,9 +10261,7 @@ const tech = {
frequency: 0, frequency: 0,
isJunk: true, isJunk: true,
isNonRefundable: true, isNonRefundable: true,
allowed() { allowed: () => true,
return true
},
requires: "", requires: "",
effect() { effect() {
localSettings.personalSeeds.push(Math.initialSeed) localSettings.personalSeeds.push(Math.initialSeed)
@@ -10672,5 +10740,6 @@ const tech = {
isCancelCouple: null, isCancelCouple: null,
isCouplingPowerUps: null, isCouplingPowerUps: null,
isBoostPowerUps: null, isBoostPowerUps: null,
isBoostReplaceAmmo: null isBoostReplaceAmmo: null,
isFlipFlopCoupling: null
} }

View File

@@ -1,21 +1,31 @@
******************************************************** NEXT PATCH ************************************************** ******************************************************** NEXT PATCH **************************************************
some shotgun ammo tech upgrades will continue to fire some original recipe shotgun bullets new level biohazard by INOOBBOI AND THESHWARMA
rivets, fleas, worms, iceIX enable community maps in settings
tech: band gap - boosts give more damage but it lasts for 1 less second
WIMPs are 10% faster some coupling tech spawns power ups instead of directly giving coupling
controlled explosion renamed shaped charge fine-structure constant gives 60 coupling power ups, lose 0.5 coupling after mob collision
tech: decoupling: when ON: +5.00 coupling OFF: spawn a WIMP
(probably adds coupling drift bugs)
bug fixes JUNK tech - boost - spawn a large number of boost power ups
construction mode works better with my buttons
to unlock run this and press T to enter testing mode
simulation.enableConstructMode() //used to build maps in testing mode
removed -experiment- tech because it's function was reproduced by "tech - tinker" several bug fixes
mob - flutter is no longer treated as a boss
*********************************************************** TODO ***************************************************** *********************************************************** TODO *****************************************************
look for other tech that would benefit from a 3rd line of description text
tech for lens - you can only fire through the lens
and some buff? damage or energy?
add link to russian physics notes
suggestion: if you have both laser-mines and lens, each laser-mine is given its own lens revolving around it
hopMom fight make platforming with hop bullets harder?
complete blowSuckBoss... or don't complete blowSuckBoss... or don't
tech: laser reflections increase damage tech: laser reflections increase damage