non-unitary

more wave beam balance
backward induction costs 2 research now, also it is fixed (it would sometimes give an extra tech or the wrong tech)
powerupBoss now gives research and ammo when it hits you, not 2 heals (it still ejects one of your tech also)

tech: non-unitary operator - taking damage randomizes your run, reduce difficulty by 2 levels
This commit is contained in:
landgreen
2021-05-06 05:50:50 -07:00
parent 93bdb5e8c3
commit 455f41540a
9 changed files with 175 additions and 96 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -3612,10 +3612,10 @@ const b = {
name: "wave beam", name: "wave beam",
description: "emit a <strong>wave packet</strong> of <strong>oscillating</strong> particles<br>that propagate through <strong>solids</strong>", description: "emit a <strong>wave packet</strong> of <strong>oscillating</strong> particles<br>that propagate through <strong>solids</strong>",
ammo: 0, ammo: 0,
ammoPack: 75, ammoPack: 80,
have: false, have: false,
wavePacketCycle: 0, wavePacketCycle: 0,
delay: 45, delay: 40,
do() { do() {
if (this.wavePacketCycle && !input.fire) { if (this.wavePacketCycle && !input.fire) {
this.wavePacketCycle = 0; this.wavePacketCycle = 0;
@@ -3634,7 +3634,7 @@ const b = {
inertia: Infinity, inertia: Infinity,
frictionAir: 0, frictionAir: 0,
slow: 0, slow: 0,
amplitude: (m.crouch ? 10 : 20) * Math.sin(this.wavePacketCycle * tech.wavePacketFrequency) * ((this.wavePacketCycle % 2) ? -1 : 1), amplitude: (m.crouch ? 5 : 10) * Math.sin(this.wavePacketCycle * tech.wavePacketFrequency) * ((this.wavePacketCycle % 2) ? -1 : 1),
minDmgSpeed: 0, minDmgSpeed: 0,
dmg: b.dmgScale * tech.waveBeamDamage * tech.wavePacketDamage, //also control damage when you divide by mob.mass dmg: b.dmgScale * tech.waveBeamDamage * tech.wavePacketDamage, //also control damage when you divide by mob.mass
classType: "bullet", classType: "bullet",

View File

@@ -123,6 +123,12 @@ function collisionChecks(event) {
} else { } else {
m.damage(dmg); //normal damage m.damage(dmg); //normal damage
} }
if (tech.isCollisionRealitySwitch) {
m.switchWorlds()
simulation.trails()
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.isBayesian) powerUps.ejectTech() if (tech.isBayesian) powerUps.ejectTech()
if (mob[k].onHit) mob[k].onHit(k); if (mob[k].onHit) mob[k].onHit(k);
@@ -158,9 +164,9 @@ function collisionChecks(event) {
time: simulation.drawTime time: simulation.drawTime
}); });
} }
return; // return;
// } // }
} } else {
//mob + bullet collisions //mob + bullet collisions
if (obj.classType === "bullet" && obj.speed > obj.minDmgSpeed) { if (obj.classType === "bullet" && obj.speed > obj.minDmgSpeed) {
obj.beforeDmg(mob[k]); //some bullets do actions when they hits things, like despawn //forces don't seem to work here obj.beforeDmg(mob[k]); //some bullets do actions when they hits things, like despawn //forces don't seem to work here
@@ -217,6 +223,7 @@ function collisionChecks(event) {
} }
} }
} }
}
//determine if player is on the ground //determine if player is on the ground
Events.on(engine, "collisionStart", function(event) { Events.on(engine, "collisionStart", function(event) {

View File

@@ -19,22 +19,10 @@ const level = {
// b.giveGuns("wave beam") // b.giveGuns("wave beam")
// tech.isExplodeRadio = true // tech.isExplodeRadio = true
// tech.giveTech("phase velocity") // tech.giveTech("phase velocity")
// for (let i = 0; i < 9; i++) tech.giveTech("packet length") // for (let i = 0; i < 3; i++) tech.giveTech("packet length")
// for (let i = 0; i < 3; i++) tech.giveTech("bound state") // for (let i = 0; i < 3; i++) tech.giveTech("bound state")
// for (let i = 0; i < 9; i++) tech.giveTech("propagation") // for (let i = 0; i < 3; i++) tech.giveTech("propagation")
// for (let i = 0; i < 9; i++) tech.giveTech("amplitude") // for (let i = 0; i < 1; i++) tech.giveTech("amplitude")
// tech.isExplodeRadio = true;
// tech.isMineSentry = true
// for (let i = 0; i < 60; i++) tech.giveTech("rivet diameter")
// tech.giveTech("missile-bot")
// for (let i = 0; i < 5; i++)
// tech.giveTech("nail-bot")
// for (let i = 0; i < 54; i++) tech.giveTech("foam-bot")
// for (let i = 0; i < 15; i++) tech.giveTech("plasma jet")
// tech.isBlockPowerUps = true;
// m.shipMode()
// tech.isBotSwap = true;
level.intro(); //starting level level.intro(); //starting level
// level.testing(); //not in rotation // level.testing(); //not in rotation

View File

@@ -335,7 +335,8 @@ const m = {
if ( if (
!tech.tech[i].isNonRefundable && !tech.tech[i].isNonRefundable &&
tech.tech[i].name !== "many-worlds" && tech.tech[i].name !== "many-worlds" &&
tech.tech[i].name !== "Ψ(t) collapse" tech.tech[i].name !== "Ψ(t) collapse" &&
tech.tech[i].name !== "non-unitary operator"
) { ) {
totalTech += tech.tech[i].count totalTech += tech.tech[i].count
tech.tech[i].remove(); tech.tech[i].remove();

View File

@@ -18,9 +18,9 @@ const powerUps = {
} else if (type === "tech") { } else if (type === "tech") {
setTimeout(() => { setTimeout(() => {
powerUps.lastTechIndex = index powerUps.lastTechIndex = index
}, 100); }, 10);
tech.giveTech(index)
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[index].name}</span>")`); simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[index].name}</span>")`);
tech.giveTech(index)
} }
powerUps.endDraft(type); powerUps.endDraft(type);
}, },
@@ -532,7 +532,7 @@ const powerUps = {
powerUps.spawn(x, y, "gun"); powerUps.spawn(x, y, "gun");
return; return;
} }
if (Math.random() < 0.0027 * (25 - tech.totalCount)) { //a new tech has a low chance for each not acquired tech up to 25 if (Math.random() < 0.0027 * (22 - tech.totalCount)) { //a new tech has a low chance for each not acquired tech up to 25
powerUps.spawn(x, y, "tech"); powerUps.spawn(x, y, "tech");
return; return;
} }

View File

@@ -701,8 +701,8 @@ const spawn = {
} }
me.onHit = function() { //run this function on hitting player me.onHit = function() { //run this function on hitting player
powerUps.ejectTech() powerUps.ejectTech()
powerUps.spawn(m.pos.x, m.pos.y, "heal"); powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "ammo");
powerUps.spawn(m.pos.x, m.pos.y, "heal"); powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "research");
}; };
me.onDeath = function() { me.onDeath = function() {
this.leaveBody = false; this.leaveBody = false;

View File

@@ -2488,7 +2488,7 @@
allowed() { allowed() {
return !tech.isSwitchReality && !tech.isResearchReality && tech.isDeathAvoid return !tech.isSwitchReality && !tech.isResearchReality && tech.isDeathAvoid
}, },
requires: "anthropic principle, not many-worlds, perturbation theory", requires: "anthropic principle, not many-worlds, Ψ(t) collapse",
effect() { effect() {
tech.isImmortal = true; tech.isImmortal = true;
// for (let i = 0; i < 4; i++) powerUps.spawn(m.pos.x + Math.random() * 10, m.pos.y + Math.random() * 10, "research", false); // for (let i = 0; i < 4; i++) powerUps.spawn(m.pos.x + Math.random() * 10, m.pos.y + Math.random() * 10, "research", false);
@@ -2507,7 +2507,7 @@
allowed() { allowed() {
return !tech.isImmortal && !tech.isResearchReality && level.onLevel < 6 return !tech.isImmortal && !tech.isResearchReality && level.onLevel < 6
}, },
requires: "before level 6, not quantum immortality, perturbation theory", requires: "before level 6, not quantum immortality, Ψ(t) collapse",
effect() { effect() {
tech.isSwitchReality = true; tech.isSwitchReality = true;
}, },
@@ -2515,9 +2515,31 @@
tech.isSwitchReality = false; tech.isSwitchReality = false;
} }
}, },
{
name: "non-unitary operator",
description: "after a <strong>collision</strong> enter an <strong>alternate reality</strong><br>reduce combat <strong>difficulty</strong> by <strong>2 levels</strong>",
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return !tech.isImmortal && !tech.isResearchReality
},
requires: "not quantum immortality, Ψ(t) collapse",
effect() {
tech.isCollisionRealitySwitch = true;
level.difficultyDecrease(simulation.difficultyMode * 2)
},
remove() {
tech.isCollisionRealitySwitch = false;
if (this.count > 0) {
level.difficultyIncrease(simulation.difficultyMode * 2)
}
}
},
{ {
name: "Ψ(t) collapse", name: "Ψ(t) collapse",
description: "enter an <strong>alternate reality</strong> after you <strong class='color-r'>research</strong><br>spawn <strong>11</strong> <strong class='color-r'>research</strong>", description: "enter an <strong>alternate reality</strong> after you <strong class='color-r'>research</strong><br>spawn <strong>12</strong> <strong class='color-r'>research</strong>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 1, frequency: 1,
@@ -2528,7 +2550,7 @@
requires: "not quantum immortality, many-worlds", requires: "not quantum immortality, many-worlds",
effect() { effect() {
tech.isResearchReality = true; tech.isResearchReality = true;
for (let i = 0; i < 11; i++) powerUps.spawn(m.pos.x + Math.random() * 10, m.pos.y + Math.random() * 10, "research", false); for (let i = 0; i < 12; i++) powerUps.spawn(m.pos.x + Math.random() * 10, m.pos.y + Math.random() * 10, "research", false);
}, },
remove() { remove() {
tech.isResearchReality = false; tech.isResearchReality = false;
@@ -2908,7 +2930,7 @@
allowed() { allowed() {
return !tech.isSuperDeterminism && tech.duplicationChance() > 0 && powerUps.research.count > 1 return !tech.isSuperDeterminism && tech.duplicationChance() > 0 && powerUps.research.count > 1
}, },
requires: "at least 1 tech and 1 research, a chance to duplicate power ups", requires: "at least 1 tech and 2 research, a chance to duplicate power ups",
effect: () => { effect: () => {
powerUps.research.changeRerolls(-2) powerUps.research.changeRerolls(-2)
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span> <span class='color-symbol'>-=</span> 2 simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span> <span class='color-symbol'>-=</span> 2
@@ -3007,25 +3029,37 @@
} }
}, },
// allowed() {
// return (b.totalBots() > 1 && powerUps.research.count > 0) || build.isExperimentSelection
// },
// requires: "at least 2 bots, 1 research",
// effect: () => {
// if (powerUps.research.count > 0) {
// powerUps.research.changeRerolls(-1)
// b.randomBot()
// }
{ {
name: "backward induction", name: "backward induction",
description: "<strong>choose</strong> all the <strong class='color-m'>tech</strong> <strong>options</strong> you didn't <strong>choose</strong><br>from your previous <strong class='color-m'>tech</strong> selection", description: "use <strong>2</strong> <strong class='color-r'>research</strong> to <strong>choose</strong> all the unchosen<br> <strong class='color-m'>tech</strong> from your previous <strong class='color-m'>tech</strong> selection",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 1, frequency: 1,
isNonRefundable: true, isNonRefundable: true,
isBadRandomOption: true, isBadRandomOption: true,
allowed() { allowed() {
return powerUps.tech.choiceLog.length > 10 && !tech.isDeterminism return powerUps.tech.choiceLog.length > 10 && !tech.isDeterminism && powerUps.research.count > 1
}, },
requires: "rejected an option in the last tech selection", requires: "rejected an option in the last tech selection, at least 2 research",
effect: () => { effect: () => {
powerUps.research.changeRerolls(-2)
let num = 3 let num = 3
if (tech.isExtraChoice) num = 5 if (tech.isExtraChoice) num = 5
if (tech.isDeterminism) num = 1 if (tech.isDeterminism) num = 1
for (let i = powerUps.tech.choiceLog.length - 1 - num; i > powerUps.tech.choiceLog.length - 1 - num * 2; i--) { for (let i = 0; i < num; i++) {
const index = powerUps.tech.choiceLog[i] const index = powerUps.tech.choiceLog[powerUps.tech.choiceLog.length - i - 1]
if (powerUps.tech.choiceLog[i] !== powerUps.lastTechIndex && tech.tech[index].count < tech.tech[index].maxCount && tech.tech[index].allowed()) { if (index !== powerUps.lastTechIndex && tech.tech[index].count < tech.tech[index].maxCount && tech.tech[index].allowed()) {
tech.giveTech(index) tech.giveTech(index)
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[index].name}</span>") <em>// backward induction</em>`); simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[index].name}</span>") <em>// backward induction</em>`);
} }
@@ -3068,9 +3102,12 @@
for (let i = 0; i < 6; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "tech"); for (let i = 0; i < 6; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "tech");
}, },
remove() { remove() {
if (tech.isDeterminism) {
tech.isDeterminism = false; tech.isDeterminism = false;
for (let i = 0; i < 6; i++) powerUps.removeRandomTech() for (let i = 0; i < 6; i++) powerUps.removeRandomTech()
} }
}
}, },
{ {
name: "superdeterminism", name: "superdeterminism",
@@ -3104,7 +3141,7 @@
allowed() { allowed() {
return level.onLevel < 8 && level.onLevel > 0 return level.onLevel < 8 && level.onLevel > 0
}, },
requires: "between levels 1 and 7", requires: "on levels 1 through 7",
effect() { effect() {
level.difficultyDecrease(simulation.difficultyMode) level.difficultyDecrease(simulation.difficultyMode)
// simulation.difficulty<span class='color-symbol'>-=</span> // simulation.difficulty<span class='color-symbol'>-=</span>
@@ -3632,7 +3669,7 @@
}, },
{ {
name: "packet length", name: "packet length",
description: "wave packet <strong>length</strong> and <strong>duration</strong><br>is increased by <strong>50%</strong>", // description: "holding fire allows the <strong>wave beam</strong> to emits a second <strong>packet</strong><br>at zero ammo cost", description: "wave packet <strong>length</strong> and <strong>duration</strong><br>is increased by <strong>40%</strong>", // description: "holding fire allows the <strong>wave beam</strong> to emits a second <strong>packet</strong><br>at zero ammo cost",
isGunTech: true, isGunTech: true,
maxCount: 3, maxCount: 3,
count: 0, count: 0,
@@ -3642,15 +3679,15 @@
}, },
requires: "wave beam", requires: "wave beam",
effect() { effect() {
const scale = 1.5 - 0.025 * this.count const scale = 1.4 - 0.025 * this.count
tech.waveLengthRange *= Math.sqrt(scale)
tech.wavePacketLength *= scale tech.wavePacketLength *= scale
tech.wavePacketFrequency /= scale tech.wavePacketFrequency /= scale
tech.waveLengthRange *= Math.sqrt(scale)
}, },
remove() { remove() {
tech.wavePacketFrequency = 0.088 //shorten wave packet tech.wavePacketFrequency = 0.088 //0.0968 //0.1012 //0.11 //0.088 //shorten wave packet
tech.wavePacketLength = tech.wavePacketFrequency * 408 //36.96 //how many wave packets are released // double this to emit 2 packets tech.wavePacketLength = 36 //32.7 //31.3 //28.8 //36 //how many wave packets are released // double this to emit 2 packets
tech.waveLengthRange = 140; tech.waveLengthRange = 130;
} }
}, },
{ {
@@ -3666,16 +3703,16 @@
requires: "wave beam", requires: "wave beam",
effect() { effect() {
tech.waveFrequency *= 0.5 tech.waveFrequency *= 0.5
tech.wavePacketDamage *= 1.33 tech.wavePacketDamage *= 1.5
}, },
remove() { remove() {
tech.waveFrequency = 0.35 tech.waveFrequency = 0.2
tech.wavePacketDamage = 1 tech.wavePacketDamage = 1
} }
}, },
{ {
name: "propagation", name: "propagation",
description: "wave packet propagation <strong>speed</strong> is <strong>25%</strong> slower<br>wave <strong class='color-d'>damage</strong> is increased by <strong>50%</strong>", description: "wave packet propagation <strong>speed</strong> is <strong>30%</strong> slower<br>wave <strong class='color-d'>damage</strong> is increased by <strong>50%</strong>",
isGunTech: true, isGunTech: true,
maxCount: 9, maxCount: 9,
count: 0, count: 0,
@@ -3685,12 +3722,12 @@
}, },
requires: "wave beam", requires: "wave beam",
effect() { effect() {
tech.waveBeamSpeed *= 0.75; tech.waveBeamSpeed *= 0.7;
tech.waveBeamDamage += 1.2 * 0.5 tech.waveBeamDamage += 1.3 * 0.5
}, },
remove() { remove() {
tech.waveBeamSpeed = 10; tech.waveBeamSpeed = 10;
tech.waveBeamDamage = 1.2 //this sets base wave beam damage tech.waveBeamDamage = 1.3 //this sets base wave beam damage
} }
}, },
{ {
@@ -5256,6 +5293,36 @@
// }, // },
// remove() {} // remove() {}
// }, // },
{
name: "spinor",
description: "the direction you aim is determined by your position",
maxCount: 1,
count: 0,
frequency: 0,
isExperimentHide: true,
isNonRefundable: true,
isJunk: true,
allowed() {
return !m.isShipMode
},
requires: "",
effect() {
m.look = function() {
//always on mouse look
m.angle = (((m.pos.x + m.pos.y) / 100 + Math.PI) % Math.PI * 2) - Math.PI
//smoothed mouse look translations
const scale = 0.8;
m.transSmoothX = canvas.width2 - m.pos.x - (simulation.mouse.x - canvas.width2) * scale;
m.transSmoothY = canvas.height2 - m.pos.y - (simulation.mouse.y - canvas.height2) * scale;
m.transX += (m.transSmoothX - m.transX) * 0.07;
m.transY += (m.transSmoothY - m.transY) * 0.07;
}
},
remove() {
m.look = m.lookDefault
}
},
{ {
name: "decomposers", name: "decomposers",
description: "after they die <strong>mobs</strong> leave behind <strong>spawns</strong>", description: "after they die <strong>mobs</strong> leave behind <strong>spawns</strong>",
@@ -5266,7 +5333,7 @@
isNonRefundable: true, isNonRefundable: true,
isJunk: true, isJunk: true,
allowed() { allowed() {
return build.isExperimentSelection return true
}, },
requires: "", requires: "",
effect() { effect() {
@@ -5286,7 +5353,7 @@
isNonRefundable: true, isNonRefundable: true,
isJunk: true, isJunk: true,
allowed() { allowed() {
return build.isExperimentSelection return true
}, },
requires: "", requires: "",
effect() { effect() {
@@ -6555,4 +6622,5 @@
waveBeamSpeed: null, waveBeamSpeed: null,
wavePacketAmplitude: null, wavePacketAmplitude: null,
waveLengthRange: null, waveLengthRange: null,
isCollisionRealitySwitch: null
} }

View File

@@ -1,9 +1,18 @@
******************************************************** NEXT PATCH ******************************************************** ******************************************************** NEXT PATCH ********************************************************
more wave beam balance more wave beam balance
backward induction costs 2 research now, also it is fixed (it would sometimes give an extra tech or the wrong tech)
powerupBoss now gives research and ammo when it hits you, not 2 heals (it still ejects one of your tech also)
tech: non-unitary operator - taking damage randomizes your run, reduce difficulty by 2 levels
******************************************************** BUGS ******************************************************** ******************************************************** BUGS ********************************************************
(once) CPT gun only rewound 0.25 seconds
after a randomize run (non-unityary)
had enough energy
increase the width on the grid by a few pixels so that very small screens or people with odd fonts don't goto a new line increase the width on the grid by a few pixels so that very small screens or people with odd fonts don't goto a new line
you have to press z once to get copy to work for simulation.enableConstructMode() sometimes you have to press z once to get copy to work for simulation.enableConstructMode() sometimes
@@ -41,6 +50,12 @@ wave tech: chirp - amplitude and damage increases towards the end of the wavePac
wave tech: wave bullets are removed after doing damage, but they do something wave tech: wave bullets are removed after doing damage, but they do something
more damage, explode, freeze, more damage, explode, freeze,
taking damage randomizes your run
power ups disappear after 3-5 seconds
only apply to drops from killing mobs
+duplication 20%
tech: mobs that die while frozen produce ice-IX bullets tech: mobs that die while frozen produce ice-IX bullets
tech: picking up heal power ups when at full health does harm equal to the heal values tech: picking up heal power ups when at full health does harm equal to the heal values