brainstorming
powerUpBoss no longer gets invulnerability after death but powerUpBossBaby still has it tech: brainstorming - randomize your tech choice menu every 2s for 10s JUNK tech: brainstorm - randomize your tech choice menu every 0.5s for 10s
This commit is contained in:
@@ -20,7 +20,7 @@ const level = {
|
||||
// b.giveGuns("drones")
|
||||
// b.giveGuns("nail gun")
|
||||
// b.giveGuns("harpoon")
|
||||
// tech.giveTech("needle gun")
|
||||
// tech.giveTech("brainstorming")
|
||||
// tech.giveTech("nanowires")
|
||||
// tech.giveTech("relativistic momentum")
|
||||
// for (let i = 0; i < 2; i++) tech.giveTech("refractory metal")
|
||||
@@ -2344,8 +2344,8 @@ const level = {
|
||||
|
||||
// spawn.launcherBoss(3200, -500)
|
||||
// spawn.laserTargetingBoss(1700, -500)
|
||||
spawn.powerUpBoss(3200, -500)
|
||||
spawn.powerUpBossBaby(3200, -500)
|
||||
// spawn.powerUpBoss(3200, -500)
|
||||
// spawn.powerUpBossBaby(3200, -500)
|
||||
// spawn.snakeBoss(1700, -500)
|
||||
// spawn.streamBoss(3200, -500)
|
||||
// spawn.pulsarBoss(1700, -500)
|
||||
@@ -2367,7 +2367,7 @@ const level = {
|
||||
|
||||
// for (let i = 0; i < 10; ++i) spawn.bodyRect(1600 + 5, -500, 30, 40);
|
||||
// for (let i = 0; i < 5; i++) spawn.focuser(1900, -500)
|
||||
spawn.pulsar(1900, -500)
|
||||
// spawn.pulsar(1900, -500)
|
||||
// spawn.shield(mob[mob.length - 1], 1900, -500, 1);
|
||||
// mob[mob.length - 1].isShielded = true
|
||||
// spawn.nodeGroup(1200, 0, "grenadier")
|
||||
|
||||
@@ -734,7 +734,28 @@ const powerUps = {
|
||||
}
|
||||
}
|
||||
|
||||
if (tech.isBrainstorm && !tech.isBrainstormActive && !simulation.isChoosing) {
|
||||
tech.isBrainstormActive = true
|
||||
let count = 0
|
||||
requestAnimationFrame(cycle);
|
||||
|
||||
function cycle() {
|
||||
count++
|
||||
if (count < 600 && 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;">`
|
||||
@@ -747,8 +768,26 @@ const powerUps = {
|
||||
text += `</span> <span class='research-select'>${tech.isResearchReality?"<span class='alt'>alternate reality</span>": "research"}</span></div></div>`
|
||||
}
|
||||
|
||||
// if (tech.isBrainstorm && tech.isBrainstormActive < 4) {
|
||||
// setTimeout(() => {
|
||||
// if (simulation.isChoosing) {
|
||||
// tech.isBrainstormActive++
|
||||
// powerUps.tech.effect();
|
||||
// //turn off the normal 500ms delay
|
||||
// document.getElementById("choose-grid").style.pointerEvents = "auto";
|
||||
// document.body.style.cursor = "auto";
|
||||
// document.getElementById("choose-grid").style.transitionDuration = "0s";
|
||||
// } else {
|
||||
// tech.isBrainstormActive = 0;
|
||||
// }
|
||||
// }, 1000);
|
||||
// } else {
|
||||
// tech.isBrainstormActive = 0;
|
||||
// }
|
||||
|
||||
document.getElementById("choose-grid").innerHTML = text
|
||||
powerUps.showDraft();
|
||||
|
||||
} else if (tech.isBanish) {
|
||||
for (let i = 0, len = tech.tech.length; i < len; i++) {
|
||||
if (tech.tech[i].name === "decoherence") powerUps.ejectTech(i)
|
||||
|
||||
44
js/spawn.js
44
js/spawn.js
@@ -1269,7 +1269,7 @@ const spawn = {
|
||||
me.isBoss = true;
|
||||
me.frictionAir = 0.01
|
||||
me.seeAtDistance2 = 1000000;
|
||||
me.accelMag = 0.0005 * simulation.accelScale;
|
||||
me.accelMag = 0.0002 + 0.0004 * simulation.accelScale;
|
||||
Matter.Body.setDensity(me, 0.00035); //normal is 0.001
|
||||
me.collisionFilter.mask = cat.bullet | cat.player //| cat.body
|
||||
me.memory = Infinity;
|
||||
@@ -1284,11 +1284,11 @@ const spawn = {
|
||||
me.foundPlayer();
|
||||
}
|
||||
|
||||
me.damageReduction = 0.25 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||
me.isInvulnerable = true
|
||||
me.startingDamageReduction = me.damageReduction
|
||||
me.damageReduction = 0
|
||||
me.invulnerabilityCountDown = 60 + simulation.difficulty * 2
|
||||
me.damageReduction = 0.2 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||
// me.isInvulnerable = true
|
||||
// me.startingDamageReduction = me.damageReduction
|
||||
// me.damageReduction = 0
|
||||
// me.invulnerabilityCountDown = 60 + simulation.difficulty * 2
|
||||
|
||||
me.onHit = function() { //run this function on hitting player
|
||||
if (powerUps.ejectTech()) {
|
||||
@@ -1310,22 +1310,22 @@ const spawn = {
|
||||
for (let i = 0; i < powerUp.length; i++) powerUp[i].collisionFilter.mask = cat.map | cat.powerUp
|
||||
};
|
||||
me.do = function() {
|
||||
if (this.isInvulnerable) {
|
||||
if (this.invulnerabilityCountDown > 0) {
|
||||
this.invulnerabilityCountDown--
|
||||
ctx.beginPath();
|
||||
let vertices = this.vertices;
|
||||
ctx.moveTo(vertices[0].x, vertices[0].y);
|
||||
for (let j = 1; j < vertices.length; j++) ctx.lineTo(vertices[j].x, vertices[j].y);
|
||||
ctx.lineTo(vertices[0].x, vertices[0].y);
|
||||
ctx.lineWidth = 20;
|
||||
ctx.strokeStyle = "rgba(255,255,255,0.7)";
|
||||
ctx.stroke();
|
||||
} else {
|
||||
this.isInvulnerable = false
|
||||
this.damageReduction = this.startingDamageReduction
|
||||
}
|
||||
}
|
||||
// if (this.isInvulnerable) {
|
||||
// if (this.invulnerabilityCountDown > 0) {
|
||||
// this.invulnerabilityCountDown--
|
||||
// ctx.beginPath();
|
||||
// let vertices = this.vertices;
|
||||
// ctx.moveTo(vertices[0].x, vertices[0].y);
|
||||
// for (let j = 1; j < vertices.length; j++) ctx.lineTo(vertices[j].x, vertices[j].y);
|
||||
// ctx.lineTo(vertices[0].x, vertices[0].y);
|
||||
// ctx.lineWidth = 20;
|
||||
// ctx.strokeStyle = "rgba(255,255,255,0.7)";
|
||||
// ctx.stroke();
|
||||
// } else {
|
||||
// this.isInvulnerable = false
|
||||
// this.damageReduction = this.startingDamageReduction
|
||||
// }
|
||||
// }
|
||||
this.stroke = `hsl(0,0%,${80 + 25 * Math.sin(simulation.cycle * 0.01)}%)`
|
||||
//steal all power ups
|
||||
for (let i = 0; i < Math.min(powerUp.length, this.vertices.length); i++) {
|
||||
|
||||
81
js/tech.js
81
js/tech.js
@@ -2093,7 +2093,7 @@ const tech = {
|
||||
requires: "not mass-energy",
|
||||
effect() {
|
||||
tech.isPiezo = true;
|
||||
if (simulation.isTextLogOpen) m.energy += 20.48;
|
||||
// if (simulation.isTextLogOpen) m.energy += 20.48;
|
||||
},
|
||||
remove() {
|
||||
tech.isPiezo = false;
|
||||
@@ -2485,8 +2485,8 @@ const tech = {
|
||||
description: "increase <strong class='color-d'>damage</strong> by <strong>5%</strong><br>for every <strong>10</strong> <strong class='color-h'>health</strong> below <strong>100</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
allowed() {
|
||||
return m.health < 0.6 || build.isExperimentSelection
|
||||
},
|
||||
@@ -2521,8 +2521,8 @@ const tech = {
|
||||
description: "<strong class='color-h'>heal</strong> for <strong>3%</strong> of <strong class='color-d'>damage</strong> done<br>take <strong>10%</strong> more <strong class='color-harm'>harm</strong>",
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
isHealTech: true,
|
||||
allowed() {
|
||||
return !tech.isEnergyHealth
|
||||
@@ -2789,12 +2789,12 @@ const tech = {
|
||||
description: `<strong class='color-r'>researched</strong> or <strong>canceled</strong> <strong class='color-m'>tech</strong> won't <strong>reoccur</strong> <br>spawn ${powerUps.orb.research(9)}`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
allowed() {
|
||||
return (powerUps.research.count > 2 || build.isExperimentSelection) && !tech.isSuperDeterminism
|
||||
return !tech.isSuperDeterminism
|
||||
},
|
||||
requires: "not determinism, at least 3 research",
|
||||
requires: "not superdeterminism",
|
||||
effect() {
|
||||
tech.isBanish = true
|
||||
for (let i = 0; i < 9; i++) powerUps.spawn(m.pos.x + 40 * (Math.random() - 0.5), m.pos.y + 40 * (Math.random() - 0.5), "research", false);
|
||||
@@ -2815,9 +2815,9 @@ const tech = {
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
allowed() {
|
||||
return (powerUps.research.count > 2 || build.isExperimentSelection) && !tech.isSuperDeterminism
|
||||
return (powerUps.research.count > 3 || build.isExperimentSelection) && !tech.isSuperDeterminism
|
||||
},
|
||||
requires: "at least 3 research and not superdeterminism",
|
||||
requires: "at least 4 research and not superdeterminism",
|
||||
effect() {
|
||||
tech.renormalization = true;
|
||||
},
|
||||
@@ -2873,9 +2873,9 @@ const tech = {
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
allowed() {
|
||||
return powerUps.research.count > 3 || build.isExperimentSelection
|
||||
return powerUps.research.count > 5 || build.isExperimentSelection
|
||||
},
|
||||
requires: "at least 4 research",
|
||||
requires: "at least 6 research",
|
||||
effect() {
|
||||
tech.isRerollDamage = true;
|
||||
},
|
||||
@@ -2901,6 +2901,27 @@ const tech = {
|
||||
tech.isJunkResearch = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "brainstorming",
|
||||
description: "the <strong class='color-m'>tech</strong> choice menu <strong>randomizes</strong><br>every <strong>2</strong> seconds for <strong>10</strong> seconds",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
allowed() {
|
||||
return true
|
||||
},
|
||||
requires: "",
|
||||
effect() {
|
||||
tech.isBrainstorm = true
|
||||
tech.isBrainstormActive = false
|
||||
tech.brainStormDelay = 120
|
||||
},
|
||||
remove() {
|
||||
tech.isBrainstorm = false
|
||||
tech.isBrainstormActive = false
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "Born rule",
|
||||
description: "<strong>remove</strong> all current <strong class='color-m'>tech</strong><br>spawn new <strong class='color-m'>tech</strong> to replace them",
|
||||
@@ -3352,9 +3373,9 @@ const tech = {
|
||||
isNonRefundable: true,
|
||||
isBadRandomOption: true,
|
||||
allowed() {
|
||||
return (tech.totalCount > 3) && !tech.isSuperDeterminism
|
||||
return (tech.totalCount > 3) && tech.duplicationChance() > 0 && !tech.isSuperDeterminism
|
||||
},
|
||||
requires: "NOT EXPERIMENT MODE, at least 4 tech, not superdeterminism",
|
||||
requires: "NOT EXPERIMENT MODE, some duplication, at least 4 tech, not superdeterminism",
|
||||
effect: () => {
|
||||
const removeTotal = tech.removeTech()
|
||||
for (let i = 0; i < removeTotal + 1; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "tech");
|
||||
@@ -3628,7 +3649,7 @@ const tech = {
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
allowed() {
|
||||
return (tech.isNeedles || tech.isNeedleShot) && !tech.isNeedleIce
|
||||
return ((tech.haveGunCheck("nail gun") && tech.isNeedles) || (tech.isNeedleShot && tech.haveGunCheck("shotgun"))) && !tech.isNeedleIce
|
||||
},
|
||||
requires: "needle gun, needle-shot, not needle ice",
|
||||
effect() {
|
||||
@@ -7178,6 +7199,29 @@ const tech = {
|
||||
// },
|
||||
// remove() {}
|
||||
// },
|
||||
{
|
||||
name: "brainstorm",
|
||||
description: "the <strong class='color-m'>tech</strong> choice menu <strong>randomizes</strong><br>every <strong>0.5</strong> seconds for <strong>10</strong> seconds",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 0,
|
||||
frequencyDefault: 0,
|
||||
isExperimentHide: true,
|
||||
isJunk: true,
|
||||
allowed() {
|
||||
return true
|
||||
},
|
||||
requires: "",
|
||||
effect() {
|
||||
tech.isBrainstorm = true
|
||||
tech.isBrainstormActive = false
|
||||
tech.brainStormDelay = 30
|
||||
},
|
||||
remove() {
|
||||
tech.isBrainstorm = false
|
||||
tech.isBrainstormActive = false
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "catabolysis",
|
||||
description: `set your <strong>maximum</strong> <strong class='color-h'>health</strong> to <strong>1</strong><br><strong>double</strong> your current <strong class='color-ammo'>ammo</strong> <strong>10</strong> times`,
|
||||
@@ -9116,5 +9160,8 @@ const tech = {
|
||||
isWormholeMapIgnore: null,
|
||||
isLessDamageReduction: null,
|
||||
nailSize: null,
|
||||
needleTunnel: null
|
||||
needleTunnel: null,
|
||||
isBrainstorm: null,
|
||||
isBrainstormActive: null,
|
||||
brainStormDelay: null
|
||||
}
|
||||
Reference in New Issue
Block a user