flip-flop
tech: flip-flip - does nothing, except toggle on collisions tech: NOR gate - when flip-flip is ON take 0 harm from collisions tech: NAND gate - when flip-flip is ON do 55.5% damage tech: transistor - when flip-flop is ON regen 22 energy/s, when OFF drain 3.1 energy /s tech: shift registers - set flip-flop to ON with a new level
This commit is contained in:
15
js/bullet.js
15
js/bullet.js
@@ -2446,7 +2446,7 @@ const b = {
|
||||
// lookFrequency: 56 + Math.floor(17 * Math.random()) - isUpgraded * 20,
|
||||
lastLookCycle: simulation.cycle + 60 * Math.random(),
|
||||
acceleration: 0.005 * (1 + 0.5 * Math.random()),
|
||||
range: 70 * (1 + 0.3 * Math.random()),
|
||||
range: 60 * (1 + 0.3 * Math.random()) + 3 * b.totalBots(),
|
||||
endCycle: Infinity,
|
||||
classType: "bullet",
|
||||
collisionFilter: {
|
||||
@@ -2497,7 +2497,7 @@ const b = {
|
||||
lookFrequency: 70,
|
||||
cd: 0,
|
||||
delay: 90,
|
||||
range: 80,
|
||||
range: 70 + 3 * b.totalBots(),
|
||||
endCycle: Infinity,
|
||||
classType: "bullet",
|
||||
collisionFilter: {
|
||||
@@ -2552,7 +2552,7 @@ const b = {
|
||||
cd: 0,
|
||||
delay: 100,
|
||||
acceleration: 0.005 * (1 + 0.5 * Math.random()),
|
||||
range: 70 * (1 + 0.3 * Math.random()),
|
||||
range: 60 * (1 + 0.3 * Math.random()) + 3 * b.totalBots(),
|
||||
endCycle: Infinity,
|
||||
classType: "bullet",
|
||||
collisionFilter: {
|
||||
@@ -2602,7 +2602,7 @@ const b = {
|
||||
frictionAir: 0.008 * (1 + 0.3 * Math.random()),
|
||||
restitution: 0.5 * (1 + 0.5 * Math.random()),
|
||||
acceleration: 0.0015 * (1 + 0.3 * Math.random()),
|
||||
playerRange: 150 + Math.floor(30 * Math.random()),
|
||||
playerRange: 140 + Math.floor(30 * Math.random()) + 2 * b.totalBots(),
|
||||
offPlayer: {
|
||||
x: 0,
|
||||
y: 0,
|
||||
@@ -2613,7 +2613,7 @@ const b = {
|
||||
range: (700 + 400 * tech.isLaserBotUpgrade) * (1 + 0.1 * Math.random()),
|
||||
drainThreshold: tech.isEnergyHealth ? 0.6 : 0.4,
|
||||
drain: 0.56 - 0.42 * tech.isLaserBotUpgrade,
|
||||
laserDamage: 0.55 + 0.39 * tech.isLaserBotUpgrade,
|
||||
laserDamage: 0.6 + 0.43 * tech.isLaserBotUpgrade,
|
||||
endCycle: Infinity,
|
||||
classType: "bullet",
|
||||
collisionFilter: {
|
||||
@@ -2653,9 +2653,10 @@ const b = {
|
||||
}
|
||||
//randomize position relative to player
|
||||
if (Math.random() < 0.15) {
|
||||
const range = 110 + 4 * b.totalBots()
|
||||
this.offPlayer = {
|
||||
x: 120 * (Math.random() - 0.5),
|
||||
y: 120 * (Math.random() - 0.5) - 20,
|
||||
x: range * (Math.random() - 0.5),
|
||||
y: range * (Math.random() - 0.5) - 20,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
19
js/engine.js
19
js/engine.js
@@ -108,20 +108,21 @@ function collisionChecks(event) {
|
||||
m.damage(dmg);
|
||||
return
|
||||
}
|
||||
|
||||
if (tech.isFlipFlopHarm) {
|
||||
if (!tech.isFlipFlopHarmImmune) {
|
||||
tech.isFlipFlopHarmImmune = true
|
||||
if (document.getElementById("tech-flip-flop")) document.getElementById("tech-flip-flop").innerHTML = ` = <strong>on</strong>`
|
||||
m.damage(dmg * 1.25); //damage triggers immune to next hit with extra 10% damage
|
||||
if (tech.isFlipFlop) {
|
||||
if (tech.isFlipFlopOn) {
|
||||
tech.isFlipFlopOn = false
|
||||
if (document.getElementById("tech-flip-flop")) document.getElementById("tech-flip-flop").innerHTML = ` = <strong>OFF</strong>`
|
||||
m.eyeFillColor = 'transparent'
|
||||
if (!tech.isFlipFlopHarm) m.damage(dmg);
|
||||
} else {
|
||||
tech.isFlipFlopHarmImmune = false //immune to damage this hit, lose immunity for next hit
|
||||
if (document.getElementById("tech-flip-flop")) document.getElementById("tech-flip-flop").innerHTML = ` = <strong>off</strong>`
|
||||
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>`
|
||||
m.eyeFillColor = m.fieldMeterColor //'#0cf'
|
||||
m.damage(dmg);
|
||||
}
|
||||
} else {
|
||||
m.damage(dmg); //normal damage
|
||||
}
|
||||
|
||||
if (tech.isPiezo) m.energy += 20.48;
|
||||
if (tech.isBayesian) powerUps.ejectTech()
|
||||
if (mob[k].onHit) mob[k].onHit(k);
|
||||
|
||||
28
js/level.js
28
js/level.js
@@ -31,7 +31,7 @@ const level = {
|
||||
// tech.giveTech("missile-bot")
|
||||
// for (let i = 0; i < 5; i++)
|
||||
// tech.giveTech("nail-bot")
|
||||
// for (let i = 0; i < 2; i++) tech.giveTech("foam-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()
|
||||
@@ -56,10 +56,10 @@ const level = {
|
||||
// level.basement(); //fan level
|
||||
// level.stronghold() //fan level
|
||||
|
||||
// for (let i = 0; i < 150; i++) tech.addLoreTechToPool();
|
||||
for (let i = 0; i < 150; i++) tech.addLoreTechToPool();
|
||||
// powerUps.directSpawn(simulation.mouseInGame.x, simulation.mouseInGame.y, "tech");
|
||||
// tech.giveTech("undefined")
|
||||
// lore.techCount = 10
|
||||
// lore.techCount = 7
|
||||
// localSettings.loreCount = 1;
|
||||
// simulation.isCheating = false //true;
|
||||
// localSettings.loreCount = 1;
|
||||
@@ -95,31 +95,25 @@ const level = {
|
||||
simulation.makeTextLog(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`);
|
||||
m.switchWorlds()
|
||||
simulation.trails()
|
||||
for (let i = 0; i < 2; i++) powerUps.spawn(m.pos.x + Math.random() * 10, m.pos.y + Math.random() * 10, "tech", false);
|
||||
for (let i = 0; i < 2; i++) powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "tech", false);
|
||||
}
|
||||
if (tech.isHealLowHealth) {
|
||||
const len = Math.floor((m.maxHealth - m.health) / 0.5)
|
||||
for (let i = 0; i < len; i++) {
|
||||
powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "heal", false);
|
||||
// powerUps.heal.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), 50);
|
||||
}
|
||||
for (let i = 0; i < len; i++) powerUps.spawn(player.position.x + 60 * (Math.random() - 0.5), player.position.y + 60 * (Math.random() - 0.5), "heal", false);
|
||||
}
|
||||
if (tech.isPerpetualReroll) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "research", false);
|
||||
if (tech.isPerpetualReroll) powerUps.spawn(player.position.x + 60 * (Math.random() - 0.5), player.position.y + 60 * (Math.random() - 0.5), "research", false);
|
||||
if (tech.isPerpetualAmmo) {
|
||||
powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "ammo", false);
|
||||
powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "ammo", false);
|
||||
for (let i = 0; i < 2; i++) powerUps.spawn(player.position.x + 60 * (Math.random() - 0.5), player.position.y + 60 * (Math.random() - 0.5), "ammo", false);
|
||||
}
|
||||
if (tech.isPerpetualHeal) {
|
||||
powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "heal", false);
|
||||
powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "heal", false);
|
||||
for (let i = 0; i < 2; i++) powerUps.spawn(player.position.x + 60 * (Math.random() - 0.5), player.position.y + 60 * (Math.random() - 0.5), "heal", false);
|
||||
}
|
||||
if (tech.isPerpetualStun) {
|
||||
for (let i = 0; i < mob.length; i++) mobs.statusStun(mob[i], 780)
|
||||
}
|
||||
if (tech.isFlipFlopHarm && tech.isFlipFlopLevelReset && !tech.isFlipFlopHarmImmune) {
|
||||
tech.isFlipFlopHarmImmune = true
|
||||
// if (document.getElementById("tech-flip-flop")) document.getElementById("tech-flip-flop").innerHTML = ` = <strong>on</strong>`
|
||||
simulation.makeTextLog(`tech.isFlipFlopHarmImmune <span class='color-symbol'>=</span> true`);
|
||||
if (tech.isFlipFlopHarm && tech.isFlipFlopLevelReset && !tech.isFlipFlopOn) {
|
||||
tech.isFlipFlopOn = true
|
||||
simulation.makeTextLog(`tech.isFlipFlopOn <span class='color-symbol'>=</span> true`);
|
||||
}
|
||||
},
|
||||
custom() {},
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
const lore = {
|
||||
techCount: 0,
|
||||
techGoal: 7,
|
||||
talkingColor: "#dff", //set color of graphic on level.null
|
||||
anand: {
|
||||
color: "#e0c",
|
||||
|
||||
17
js/player.js
17
js/player.js
@@ -46,6 +46,7 @@ const m = {
|
||||
lastHarmCycle: 0,
|
||||
width: 50,
|
||||
radius: 30,
|
||||
eyeFillColor: null,
|
||||
fillColor: null, //set by setFillColors
|
||||
fillColorDark: null, //set by setFillColors
|
||||
color: {
|
||||
@@ -498,7 +499,7 @@ const m = {
|
||||
if (tech.isHarmReduceAfterKill) dmg *= (m.lastKillCycle + 300 > m.cycle) ? 0.25 : 1.25
|
||||
if (tech.healthDrain) dmg *= 1 + 2.667 * tech.healthDrain //tech.healthDrain = 0.03 at one stack //cause more damage
|
||||
if (tech.squirrelFx !== 1) dmg *= 1 + (tech.squirrelFx - 1) / 5 //cause more damage
|
||||
if (tech.isBlockHarm && m.isHolding) dmg *= 0.2
|
||||
if (tech.isBlockHarm && m.isHolding) dmg *= 0.15
|
||||
if (tech.isSpeedHarm) dmg *= 1 - Math.min(player.speed * 0.0185, 0.55)
|
||||
if (tech.isSlowFPS) dmg *= 0.8
|
||||
// if (tech.isPiezo) dmg *= 0.85
|
||||
@@ -822,10 +823,12 @@ const m = {
|
||||
ctx.strokeStyle = "#333";
|
||||
ctx.lineWidth = 2;
|
||||
ctx.stroke();
|
||||
// draw eye; used in flip-flop
|
||||
// ctx.beginPath();
|
||||
// ctx.arc(15, 0, 3, 0, 2 * Math.PI);
|
||||
// ctx.fillStyle = '#0cf';
|
||||
// ctx.fillStyle = m.eyeFillColor;
|
||||
// ctx.fill()
|
||||
|
||||
ctx.restore();
|
||||
m.yOff = m.yOff * 0.85 + m.yOffGoal * 0.15; //smoothly move leg height towards height goal
|
||||
},
|
||||
@@ -879,6 +882,7 @@ const m = {
|
||||
if (m.energy < m.maxEnergy) m.energy = m.maxEnergy;
|
||||
m.fieldRegen = tech.energyRegen; //0.001
|
||||
m.fieldMeterColor = "#0cf"
|
||||
m.eyeFillColor = m.fieldMeterColor
|
||||
m.fieldShieldingScale = 1;
|
||||
m.fieldBlockCD = 10;
|
||||
m.fieldHarmReduction = 1;
|
||||
@@ -1559,6 +1563,7 @@ const m = {
|
||||
m.fieldFire = true;
|
||||
m.holdingMassScale = 0.03; //can hold heavier blocks with lower cost to jumping
|
||||
m.fieldMeterColor = "#000"
|
||||
m.eyeFillColor = m.fieldMeterColor
|
||||
m.fieldHarmReduction = 0.5;
|
||||
m.fieldDrawRadius = 0;
|
||||
|
||||
@@ -1676,6 +1681,7 @@ const m = {
|
||||
description: "use <strong class='color-f'>energy</strong> to emit short range <strong class='color-plasma'>plasma</strong><br><strong class='color-d'>damages</strong> and <strong>pushes</strong> mobs away",
|
||||
effect() {
|
||||
m.fieldMeterColor = "#f0f"
|
||||
m.eyeFillColor = m.fieldMeterColor
|
||||
m.hold = function() {
|
||||
b.isExtruderOn = false
|
||||
if (m.isHolding) {
|
||||
@@ -1819,7 +1825,8 @@ const m = {
|
||||
description: "<strong class='color-cloaked'>cloak</strong> after not using your gun or field<br>while <strong class='color-cloaked'>cloaked</strong> mobs can't see you<br>increase <strong class='color-d'>damage</strong> by <strong>133%</strong>",
|
||||
effect: () => {
|
||||
m.fieldFire = true;
|
||||
m.fieldMeterColor = "#fff";
|
||||
m.fieldMeterColor = "#000";
|
||||
m.eyeFillColor = m.fieldMeterColor
|
||||
m.fieldPhase = 0;
|
||||
m.isCloak = false
|
||||
m.fieldDamage = 2.33 // 1 + 111/100
|
||||
@@ -1944,11 +1951,11 @@ const m = {
|
||||
const yOff = m.pos.y - 50
|
||||
ctx.fillStyle = "rgba(0, 0, 0, 0.3)";
|
||||
ctx.fillRect(xOff, yOff, 60 * m.maxEnergy, 10);
|
||||
ctx.fillStyle = m.fieldMeterColor;
|
||||
ctx.fillStyle = "#fff";
|
||||
ctx.fillRect(xOff, yOff, 60 * m.energy, 10);
|
||||
ctx.beginPath()
|
||||
ctx.rect(xOff, yOff, 60 * m.maxEnergy, 10);
|
||||
ctx.strokeStyle = "rgb(0, 0, 0)";
|
||||
ctx.strokeStyle = m.fieldMeterColor;
|
||||
ctx.lineWidth = 1;
|
||||
ctx.stroke();
|
||||
}
|
||||
|
||||
@@ -776,7 +776,14 @@ const simulation = {
|
||||
|
||||
//energy overfill
|
||||
if (m.energy > m.maxEnergy) m.energy = m.maxEnergy + (m.energy - m.maxEnergy) * tech.overfillDrain //every second energy above max energy loses 25%
|
||||
|
||||
if (tech.isFlipFlopEnergy) {
|
||||
if (tech.isFlipFlopOn) {
|
||||
m.energy += 0.22;
|
||||
} else {
|
||||
m.energy -= 0.031;
|
||||
if (m.energy < 0) m.energy = 0
|
||||
}
|
||||
}
|
||||
if (m.pos.y > simulation.fallHeight) { // if 4000px deep
|
||||
Matter.Body.setVelocity(player, {
|
||||
x: 0,
|
||||
|
||||
69
js/spawn.js
69
js/spawn.js
@@ -101,39 +101,62 @@ const spawn = {
|
||||
// spawn.shield(me, x, y, 1);
|
||||
me.onDeath = function() {
|
||||
//add lore level as next level if player took lore tech earlier in the game
|
||||
if (lore.techCount > 9 && !simulation.isCheating) {
|
||||
if (lore.techCount > (lore.techGoal - 1) && !simulation.isCheating) {
|
||||
level.levels.push("null")
|
||||
level.exit.x = 5500;
|
||||
level.exit.y = -330;
|
||||
simulation.makeTextLog(`<span class="lore-text">undefined</span> <span class='color-symbol'>=</span> ${lore.techCount}/10<br>level.levels.push("null")`);
|
||||
simulation.makeTextLog(`<span class="lore-text">undefined</span> <span class='color-symbol'>=</span> ${lore.techCount}/${lore.techGoal}<br>level.levels.push("null")`);
|
||||
//remove block map element so exit is clear
|
||||
Matter.World.remove(engine.world, map[map.length - 1]);
|
||||
map.splice(map.length - 1, 1);
|
||||
simulation.draw.setPaths(); //redraw map draw path
|
||||
} else {
|
||||
//reset game
|
||||
setTimeout(() => {
|
||||
simulation.makeTextLog(`simulation.complete()`);
|
||||
let delay = 2000
|
||||
for (let i = 0; i < 1; i += 0.01 + 0.2 * Math.random() * Math.random()) {
|
||||
setTimeout(function() {
|
||||
simulation.makeTextLog(`simulation.analysis <span class='color-symbol'>=</span> ${(i).toFixed(3)}`);
|
||||
}, delay);
|
||||
delay += 1000
|
||||
let count = 0
|
||||
|
||||
function loop() {
|
||||
if (!simulation.paused) {
|
||||
count++
|
||||
if (count < 600) {
|
||||
if (!(count % 60)) simulation.makeTextLog(`simulation.analysis <span class='color-symbol'>=</span> ${(count/60- Math.random()).toFixed(3)}`);
|
||||
} else if (count === 600) {
|
||||
simulation.makeTextLog(`simulation.analysis <span class='color-symbol'>=</span> 1`);
|
||||
} else if (count === 720) {
|
||||
simulation.makeTextLog(`<span class="lore-text">undefined</span> <span class='color-symbol'>=</span> ${lore.techCount}/${lore.techGoal}`)
|
||||
} else if (count === 900) {
|
||||
simulation.makeTextLog(`World.clear(engine.world)`);
|
||||
} else if (count === 1140) {
|
||||
m.death()
|
||||
return
|
||||
}
|
||||
}
|
||||
setTimeout(function() {
|
||||
simulation.makeTextLog(`simulation.analysis <span class='color-symbol'>=</span> 1`);
|
||||
setTimeout(() => {
|
||||
simulation.makeTextLog(`<span class="lore-text">undefined</span> <span class='color-symbol'>=</span> ${lore.techCount}/10`);
|
||||
setTimeout(() => {
|
||||
if (!simulation.paused && !simulation.testing) {
|
||||
simulation.makeTextLog(`World.clear(engine.world)`);
|
||||
setTimeout(() => { m.death() }, 4000);
|
||||
}
|
||||
}, 3000);
|
||||
}, 2000);
|
||||
}, delay);
|
||||
}, 5000);
|
||||
if (!simulation.testing) requestAnimationFrame(loop);
|
||||
}
|
||||
requestAnimationFrame(loop);
|
||||
|
||||
// setTimeout(() => {
|
||||
// if (simulation.paused || simulation.testing) isEnding = false
|
||||
// simulation.makeTextLog(`simulation.complete()`);
|
||||
// let delay = 2000
|
||||
// for (let i = 0; i < 1; i += 0.01 + 0.2 * Math.random() * Math.random()) {
|
||||
// setTimeout(function() {
|
||||
// if (!simulation.paused && !simulation.testing) simulation.makeTextLog(`simulation.analysis <span class='color-symbol'>=</span> ${(i).toFixed(3)}`);
|
||||
// }, delay);
|
||||
// delay += 1000
|
||||
// }
|
||||
// setTimeout(function() {
|
||||
// if (isEnding) simulation.makeTextLog(`simulation.analysis <span class='color-symbol'>=</span> 1`);
|
||||
// setTimeout(() => {
|
||||
// if (isEnding) simulation.makeTextLog(`<span class="lore-text">undefined</span> <span class='color-symbol'>=</span> ${lore.techCount}/10`);
|
||||
// setTimeout(() => {
|
||||
// if (isEnding) {
|
||||
// if (isEnding) simulation.makeTextLog(`World.clear(engine.world)`);
|
||||
// setTimeout(() => { if (isEnding) m.death() }, 4000);
|
||||
// }
|
||||
// }, 3000);
|
||||
// }, 2000);
|
||||
// }, delay);
|
||||
// }, 5000);
|
||||
}
|
||||
//ramp up damage
|
||||
for (let i = 0; i < 3; i++) level.difficultyIncrease(simulation.difficultyMode)
|
||||
|
||||
164
js/tech.js
164
js/tech.js
@@ -95,7 +95,7 @@
|
||||
haveGunCheck(name) {
|
||||
if (
|
||||
!build.isExperimentSelection &&
|
||||
b.inventory > 2 &&
|
||||
b.inventory.length > 2 &&
|
||||
name !== b.guns[b.activeGun].name &&
|
||||
Math.random() > 2 - b.inventory.length * 0.5
|
||||
) {
|
||||
@@ -108,7 +108,7 @@
|
||||
},
|
||||
damageFromTech() {
|
||||
let dmg = m.fieldDamage
|
||||
if (tech.isFlipFlopDamage && !tech.isFlipFlopHarmImmune) dmg *= 1.5
|
||||
if (tech.isFlipFlopDamage && tech.isFlipFlopOn) dmg *= 1.555
|
||||
if (tech.isAnthropicDamage && tech.isDeathAvoidedThisLevel) dmg *= 2.37
|
||||
if (tech.isDamageAfterKill) dmg *= (m.lastKillCycle + 300 > m.cycle) ? 1.5 : 0.5
|
||||
if (tech.isTechDamage) dmg *= 2
|
||||
@@ -602,9 +602,9 @@
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
return tech.haveGunCheck("missiles") || tech.isIncendiary || (tech.haveGunCheck("grenades") && !tech.isNeutronBomb) || tech.haveGunCheck("vacuum bomb") || tech.isPulseLaser || tech.isMissileField
|
||||
return !tech.isRewindGrenade && (tech.haveGunCheck("missiles") || tech.isIncendiary || (tech.haveGunCheck("grenades") && !tech.isNeutronBomb) || tech.haveGunCheck("vacuum bomb") || tech.isPulseLaser || tech.isMissileField)
|
||||
},
|
||||
requires: "an explosive damage source",
|
||||
requires: "an explosive damage source, not causality bombs",
|
||||
effect: () => {
|
||||
tech.isExplosionHarm = true;
|
||||
},
|
||||
@@ -1123,7 +1123,7 @@
|
||||
},
|
||||
{
|
||||
name: "inelastic collision",
|
||||
description: "while you are <strong>holding</strong> a <strong>block</strong><br>reduce <strong class='color-harm'>harm</strong> by <strong>80%</strong>",
|
||||
description: "while you are <strong>holding</strong> a <strong>block</strong><br>reduce <strong class='color-harm'>harm</strong> by <strong>85%</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
@@ -1188,15 +1188,21 @@
|
||||
},
|
||||
{
|
||||
name: "flip-flop",
|
||||
description: "take <strong>25%</strong> more <strong class='color-harm'>harm</strong> from a <strong>collision</strong><br>but, on your next <strong>collision</strong> take <strong>0</strong> <strong class='color-harm'>harm</strong>",
|
||||
description: `collisions set <strong>flip-flop</strong> to <strong class="color-flop">OFF</strong> when <strong class="color-flop">ON</strong>
|
||||
<br>collisions set <strong>flip-flop</strong> to <strong class="color-flop">ON</strong> when <strong class="color-flop">OFF</strong>`,
|
||||
// description: `<strong>collisions</strong> toggle flip-flop <strong>ON</strong> and <strong>OFF</strong>
|
||||
// <br><strong>ON</strong>: 0 collision <strong class='color-harm'>harm</strong>, <strong>OFF</strong>: <strong>25%</strong> extra <strong class='color-harm'>harm</strong>`,
|
||||
// on your next <strong>collision</strong> take <strong>0</strong> <strong class='color-harm'>harm</strong>
|
||||
nameInfo: "<span id = 'tech-flip-flop'></span>",
|
||||
addNameInfo() {
|
||||
setTimeout(function() {
|
||||
if (document.getElementById("tech-flip-flop")) {
|
||||
if (tech.isFlipFlopHarmImmune) {
|
||||
document.getElementById("tech-flip-flop").innerHTML = ` = <strong>on</strong>`
|
||||
if (tech.isFlipFlopOn) {
|
||||
document.getElementById("tech-flip-flop").innerHTML = ` = <strong>ON</strong>`
|
||||
m.eyeFillColor = m.fieldMeterColor //'#5af'
|
||||
} else {
|
||||
document.getElementById("tech-flip-flop").innerHTML = ` = <strong>off</strong>`
|
||||
document.getElementById("tech-flip-flop").innerHTML = ` = <strong>OFF</strong>`
|
||||
m.eyeFillColor = "transparent"
|
||||
}
|
||||
}
|
||||
}, 100);
|
||||
@@ -1208,44 +1214,112 @@
|
||||
},
|
||||
requires: "",
|
||||
effect() {
|
||||
tech.isFlipFlopHarm = true //do you have this tech
|
||||
tech.isFlipFlopHarmImmune = false //are you immune to next collision?
|
||||
tech.isFlipFlop = true //do you have this tech?
|
||||
tech.isFlipFlopOn = true //what is the state of flip-Flop?
|
||||
m.draw = () => {
|
||||
ctx.fillStyle = m.fillColor;
|
||||
m.walk_cycle += m.flipLegs * m.Vx;
|
||||
|
||||
//draw body
|
||||
ctx.save();
|
||||
ctx.globalAlpha = (m.immuneCycle < m.cycle) ? 1 : 0.5
|
||||
ctx.translate(m.pos.x, m.pos.y);
|
||||
|
||||
m.calcLeg(Math.PI, -3);
|
||||
m.drawLeg("#4a4a4a");
|
||||
m.calcLeg(0, 0);
|
||||
m.drawLeg("#333");
|
||||
|
||||
ctx.rotate(m.angle);
|
||||
ctx.beginPath();
|
||||
ctx.arc(0, 0, 30, 0, 2 * Math.PI);
|
||||
let grd = ctx.createLinearGradient(-30, 0, 30, 0);
|
||||
grd.addColorStop(0, m.fillColorDark);
|
||||
grd.addColorStop(1, m.fillColor);
|
||||
ctx.fillStyle = grd;
|
||||
ctx.fill();
|
||||
ctx.arc(15, 0, 4, 0, 2 * Math.PI);
|
||||
ctx.strokeStyle = "#333";
|
||||
ctx.lineWidth = 2;
|
||||
ctx.stroke();
|
||||
//draw eye
|
||||
ctx.beginPath();
|
||||
ctx.arc(15, 0, 3, 0, 2 * Math.PI);
|
||||
ctx.fillStyle = m.eyeFillColor;
|
||||
ctx.fill()
|
||||
ctx.restore();
|
||||
|
||||
m.yOff = m.yOff * 0.85 + m.yOffGoal * 0.15; //smoothly move leg height towards height goal
|
||||
}
|
||||
},
|
||||
remove() {
|
||||
tech.isFlipFlopHarm = false
|
||||
tech.isFlipFlopHarmImmune = false
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "NAND gate",
|
||||
description: "set <strong>flip-flip</strong> to the <strong>on</strong> state at start of a <strong>level</strong><br><em>take 0 harm on your next collision</em>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
return tech.isFlipFlopHarm
|
||||
},
|
||||
requires: "flip-flop",
|
||||
effect() {
|
||||
tech.isFlipFlopLevelReset = true;
|
||||
},
|
||||
remove() {
|
||||
tech.isFlipFlopLevelReset = true;
|
||||
tech.isFlipFlop = false
|
||||
tech.isFlipFlopOn = false
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "NOR gate",
|
||||
description: "do <strong>50%</strong> more <strong class='color-d'>damage</strong><br>while <strong>flip-flip</strong> is in the <strong>off</strong> state",
|
||||
description: "if <strong>flip-flop</strong> is in the <strong class='color-flop'>ON</strong> state<br>take <strong>0</strong> <strong class='color-harm'>harm</strong> from collisions with mobs",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
return tech.isFlipFlopHarm
|
||||
return tech.isFlipFlop
|
||||
},
|
||||
requires: "flip-flop",
|
||||
effect() {
|
||||
tech.isFlipFlopHarm = true //do you have this tech
|
||||
},
|
||||
remove() {
|
||||
tech.isFlipFlopHarm = false
|
||||
}
|
||||
|
||||
},
|
||||
{
|
||||
name: "NAND gate",
|
||||
description: "if <strong>flip-flop</strong> is in the <strong class='color-flop'>ON</strong> state<br>do <strong>55.5%</strong> more <strong class='color-d'>damage</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
return tech.isFlipFlop
|
||||
},
|
||||
requires: "flip-flop",
|
||||
effect() {
|
||||
tech.isFlipFlopDamage = true;
|
||||
},
|
||||
remove() {
|
||||
tech.isFlipFlopDamage = true;
|
||||
tech.isFlipFlopDamage = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "transistor",
|
||||
description: "if <strong>flip-flop</strong> is <strong class='color-flop'>ON</strong> regen <strong>22</strong> <strong class='color-f'>energy</strong> per second<br>if <strong>flip-flop</strong> is <strong class='color-flop'>OFF</strong> drain <strong>3.1</strong> <strong class='color-f'>energy</strong> per second",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
return tech.isFlipFlop
|
||||
},
|
||||
requires: "flip-flop",
|
||||
effect() {
|
||||
tech.isFlipFlopEnergy = true;
|
||||
},
|
||||
remove() {
|
||||
tech.isFlipFlopEnergy = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "shift registers",
|
||||
description: "set <strong>flip-flop</strong> to the <strong class='color-flop'>ON</strong> state<br>at the start of a <strong>level</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
return tech.isFlipFlopEnergy || tech.isFlipFlopDamage || tech.isFlipFlopHarm
|
||||
},
|
||||
requires: "2 flip-flop techs",
|
||||
effect() {
|
||||
tech.isFlipFlopLevelReset = true;
|
||||
},
|
||||
remove() {
|
||||
tech.isFlipFlopLevelReset = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -1369,7 +1443,7 @@
|
||||
maxCount: 3,
|
||||
count: 0,
|
||||
allowed() {
|
||||
return tech.isRewindAvoidDeath || tech.isRewindEnergy
|
||||
return tech.isRewindAvoidDeath
|
||||
},
|
||||
requires: "CPT",
|
||||
effect() {
|
||||
@@ -1385,9 +1459,9 @@
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
return tech.isRewindAvoidDeath
|
||||
return !tech.isExplosionHarm && tech.isRewindAvoidDeath
|
||||
},
|
||||
requires: "CPT",
|
||||
requires: "CPT, not acetone peroxide",
|
||||
effect() {
|
||||
tech.isRewindGrenade = true;
|
||||
},
|
||||
@@ -2108,7 +2182,7 @@
|
||||
},
|
||||
{
|
||||
name: "replication",
|
||||
description: "<strong>7%</strong> chance to <strong class='color-dup'>duplicate</strong> spawned <strong>power ups</strong><br>add <strong>11</strong> junk <strong class='color-m'>tech</strong> to the potential pool",
|
||||
description: "<strong>7%</strong> chance to <strong class='color-dup'>duplicate</strong> spawned <strong>power ups</strong><br>add <strong>12</strong> junk <strong class='color-m'>tech</strong> to the potential pool",
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
allowed() {
|
||||
@@ -2118,7 +2192,7 @@
|
||||
effect() {
|
||||
tech.duplicateChance += 0.075
|
||||
simulation.draw.powerUp = simulation.draw.powerUpBonus //change power up draw
|
||||
tech.addJunkTechToPool(11)
|
||||
tech.addJunkTechToPool(12)
|
||||
tech.maxDuplicationEvent()
|
||||
},
|
||||
remove() {
|
||||
@@ -2325,7 +2399,7 @@
|
||||
},
|
||||
{
|
||||
name: "dark patterns",
|
||||
description: "reduce combat <strong>difficulty</strong> by <strong>1 level</strong><br>add <strong>16</strong> junk <strong class='color-m'>tech</strong> to the potential pool",
|
||||
description: "reduce combat <strong>difficulty</strong> by <strong>1 level</strong><br>add <strong>18</strong> junk <strong class='color-m'>tech</strong> to the potential pool",
|
||||
maxCount: 1,
|
||||
isNonRefundable: true,
|
||||
isExperimentHide: true,
|
||||
@@ -2337,7 +2411,7 @@
|
||||
effect() {
|
||||
level.difficultyDecrease(simulation.difficultyMode)
|
||||
simulation.makeTextLog(`simulation.difficultyMode<span class='color-symbol'>--</span>`)
|
||||
tech.addJunkTechToPool(16)
|
||||
tech.addJunkTechToPool(18)
|
||||
// for (let i = 0; i < tech.junk.length; i++) tech.tech.push(tech.junk[i])
|
||||
},
|
||||
remove() {}
|
||||
@@ -4430,7 +4504,7 @@
|
||||
if (!simulation.isCheating) {
|
||||
tech.tech.push({
|
||||
name: `undefined`,
|
||||
description: `${lore.techCount+1}/10<br><em>add copies of <strong>this</strong> to the potential <strong class='color-m'>tech</strong> pool</em>`,
|
||||
description: `${lore.techCount+1}/${lore.techGoal}<br><em>add copies of <strong class="lore-text">this</strong> to the potential <strong class='color-m'>tech</strong> pool</em>`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
isLore: true,
|
||||
@@ -4443,11 +4517,11 @@
|
||||
effect() {
|
||||
setTimeout(() => { //a short delay, I can't remember why
|
||||
lore.techCount++
|
||||
if (lore.techCount > 9) {
|
||||
if (lore.techCount > lore.techGoal - 1) {
|
||||
tech.removeLoreTechFromPool();
|
||||
} else {
|
||||
for (let i = 0; i < tech.tech.length; i++) { //set name for all unchosen copies of this tech
|
||||
if (tech.tech[i].isLore && tech.tech[i].count === 0) tech.tech[i].description = `${lore.techCount+1}/10<br><em>add copies of <strong>this</strong> to the potential <strong class='color-m'>tech</strong> pool</em>`
|
||||
if (tech.tech[i].isLore && tech.tech[i].count === 0) tech.tech[i].description = `${lore.techCount+1}/${lore.techGoal}<br><em>add copies of <strong class="lore-text">this</strong> to the potential <strong class='color-m'>tech</strong> pool</em>`
|
||||
}
|
||||
for (let i = 0, len = 10; i < len; i++) tech.addLoreTechToPool()
|
||||
}
|
||||
@@ -5457,8 +5531,10 @@
|
||||
isSwitchReality: null,
|
||||
isResearchReality: null,
|
||||
isAnthropicDamage: null,
|
||||
isFlipFlop: null,
|
||||
isFlipFlopHarm: null,
|
||||
isFlipFlopHarmImmune: null,
|
||||
isFlipFlopOn: null,
|
||||
isFlipFlopLevelReset: null,
|
||||
isFlipFlopDamage: null
|
||||
isFlipFlopDamage: null,
|
||||
isFlipFlopEnergy: null
|
||||
}
|
||||
@@ -616,6 +616,12 @@ summary {
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.color-flop {
|
||||
text-decoration: underline;
|
||||
font-weight: 100;
|
||||
letter-spacing: -1px;
|
||||
}
|
||||
|
||||
.faded {
|
||||
opacity: 0.7;
|
||||
font-size: 90%;
|
||||
|
||||
105
todo.txt
105
todo.txt
@@ -1,14 +1,19 @@
|
||||
******************************************************** NEXT PATCH ********************************************************
|
||||
|
||||
possible bug fixes for the crouch lock bug
|
||||
|
||||
tech: NAND gate - at the start of a level set flip-flop to "on"
|
||||
tech: NOR gate - do 50% more damage when the flip-flop is in the "off" state
|
||||
tech: flip-flip - does nothing, except toggle on collisions
|
||||
tech: NOR gate - when flip-flip is ON take 0 harm from collisions
|
||||
tech: NAND gate - when flip-flip is ON do 55.5% damage
|
||||
tech: transistor - when flip-flop is ON regen 22 energy/s, when OFF drain 3.1 energy /s
|
||||
tech: shift registers - set flip-flop to ON with a new level
|
||||
|
||||
******************************************************** BUGS ********************************************************
|
||||
|
||||
mouse event e.which is deprecated
|
||||
|
||||
fix door.isOpen actually meaning isClosed?
|
||||
|
||||
(once for me, and a few times for discord) player gets stuck in crouch animation
|
||||
occured after rerolling a power up (which triggered a switchWorlds)
|
||||
occurred after rerolling a power up (which triggered a switchWorlds)
|
||||
can't jump, move slow
|
||||
m.crouch = false
|
||||
only fixed itself when you click fire (drones, so no recoil)
|
||||
@@ -42,12 +47,30 @@ use the floor of portal sensor on the player? to unstuck player
|
||||
|
||||
(repeatable almost every time) bug - mines spawn extra mines when fired at thin map wall while jumping
|
||||
|
||||
|
||||
******************************************************** TODO ********************************************************
|
||||
|
||||
flip-flop: 13% dup chance while ON
|
||||
|
||||
tech- foam is attracted to mobs
|
||||
use a gravitational attraction model?
|
||||
could foam be attracted to other foam bullets too?
|
||||
or foam is only attracted to foam bullets that are stuck to mobs
|
||||
is this too computationally intense?
|
||||
name - static cling
|
||||
could also do bremsstrahlung radiation like damage on attachment
|
||||
|
||||
mobile requirements:
|
||||
detect mobile, flip to landscape
|
||||
detect no keyboard, no mouse
|
||||
auto aim?
|
||||
limit items to ones that don't require aiming?
|
||||
tap screen regions to move (WASD)
|
||||
reduce font size
|
||||
|
||||
tech: removes itself after a few levels
|
||||
gives extra duplication for 2 levels, then removes all duplication
|
||||
|
||||
|
||||
use ship tech to make a mob mode
|
||||
differences from ship to mob
|
||||
graphics
|
||||
@@ -77,13 +100,6 @@ map: laboratory
|
||||
portal + rotor + falling blocks = perpetual motion room
|
||||
a button that spawns a heal.
|
||||
|
||||
|
||||
mechanic: immune to next collision
|
||||
track number of possible collisions, if number is > 0 immune and --
|
||||
graphical indication? (recolor health bar while immune)
|
||||
tech: after taking damage go immune to next collision
|
||||
tech: at the start of each level go immune to 1 collision
|
||||
|
||||
copy time-like foam to other guns?
|
||||
wave gun
|
||||
shotgun
|
||||
@@ -118,23 +134,10 @@ rename ?
|
||||
health -> integrity, unity
|
||||
heal -> also integrity, unity
|
||||
|
||||
mechanic: use gun swap as an active ability
|
||||
this effect is spammable, so it needs a cost or a cooldown
|
||||
tech:
|
||||
trigger damage immunity for 3 seconds, but drain ammo
|
||||
push away nearby mobs, but drain energy
|
||||
produce ammo, but take 1 damage
|
||||
|
||||
bot: ice blast, long CD AOE freeze
|
||||
|
||||
RPG default or tech: grenades detonate on your cursor / where your cursor was when they were fired
|
||||
|
||||
tech: dodge chance for cloaking, harmonic fields, also pilot wave
|
||||
20% chance up to 3 stacks, not additive
|
||||
0.8^count
|
||||
set to 100% harm reduction randomly
|
||||
if (Math.random() < 0.2) damage *= 0;
|
||||
|
||||
in game console
|
||||
set highlighting rules
|
||||
m, tech, level are all highlighted
|
||||
@@ -144,10 +147,6 @@ tech: time dilation - when you exit time dilation rewind to the state you entere
|
||||
position, velocity, and health
|
||||
no energy cost
|
||||
|
||||
mob ability bombs/bullets that suck in player
|
||||
|
||||
tech that requires integrated armament
|
||||
|
||||
mechanic - Your energy regen is only active when field and gun have not been used for 5 seconds.
|
||||
|
||||
be able to open up custom mode in the normal game
|
||||
@@ -179,13 +178,6 @@ tech pilot wave: antigravity - blocks have no gravity for a few seconds after ex
|
||||
maybe they bounce too?
|
||||
maybe they explode?
|
||||
|
||||
bullet mechanic - a bullet that swims through the air
|
||||
rotate the velocity vector towards the normalized facing vector
|
||||
use the cross product > 0 to determine which direction to rotate the velocity
|
||||
|
||||
in custom make a top bar that is fixed
|
||||
use media rules to make the layout look nice
|
||||
|
||||
mob vision: look at player history
|
||||
build a new type of attraction for mobs
|
||||
if mobs can't see player, they check to see if they can see where the player was in the history
|
||||
@@ -217,26 +209,10 @@ new power up - increase damage and fire speed, for 15 seconds
|
||||
how to indicate effect duration
|
||||
or just give the effect after picking up a reroll
|
||||
|
||||
tech "Solar Power": Energy regeneration is doubled while standing still
|
||||
run in the 1 second check
|
||||
|
||||
mechanic - remove a random tech as a condition for picking up a really good mod
|
||||
|
||||
mechanic - do something for 2 seconds after firing
|
||||
if (m.fireCDcycle + 120)
|
||||
|
||||
tech- do 50% more damage in close, but 50% less at a distance
|
||||
code it like techisFarAwayDmg
|
||||
have these tech disable each other
|
||||
|
||||
tech- foam is attracted to mobs
|
||||
use a gravitational attraction model?
|
||||
could foam be attracted to other foam bullets too?
|
||||
or foam is only attracted to foam bullets that are stuck to mobs
|
||||
is this too computationally intense?
|
||||
name - static cling
|
||||
could also do bremsstrahlung radiation like damage on attachment
|
||||
|
||||
repeat map in vertical and horizontal space
|
||||
or at least vertical space
|
||||
camera looks strange when you teleport player with a high velocity
|
||||
@@ -262,12 +238,6 @@ look for tech that could update description text with count and tech is informat
|
||||
can only use variables that change in effect() and remove()
|
||||
this.description = `<strong>8%</strong> chance to <strong>duplicate</strong> spawned <strong>power ups</strong><br><em>chance to duplicate = ${techduplicateChance}</em>`
|
||||
|
||||
mouse event e.which is deprecated
|
||||
|
||||
add some more computer / AI stuff to the level lore text
|
||||
|
||||
mechanic - shrink m.baseHealth in a tech or field
|
||||
|
||||
standing wave harmonics tech- push things away
|
||||
push scales with mass up to about 4
|
||||
has a 25% effect on shielded mobs?
|
||||
@@ -279,8 +249,6 @@ map element - player rotates a rotor that makes a platform go up or down
|
||||
|
||||
use mac automator to speed up your n-gon -> git sync
|
||||
|
||||
fix door.isOpen actually meaning isClosed
|
||||
|
||||
level Boss: fractal Sierpiński triangle
|
||||
https://en.wikipedia.org/wiki/Sierpi%C5%84ski_triangle
|
||||
spawns a 1/2 size version of the boss, this version can also spawn a smaller version, but it is capped at some size level
|
||||
@@ -301,20 +269,6 @@ give mobs more animal-like behaviors like rain world
|
||||
mob: wall mounted guns / lasers
|
||||
not part of randomized mob pool, customized to each level
|
||||
|
||||
atmosphere levels
|
||||
change the pace, give the user a rest between combat
|
||||
low or no combat, but more graphics
|
||||
explore lore
|
||||
find power ups in "wrecked" m representing previous simulations
|
||||
how you could leave something in one simulation that effects a different simulation
|
||||
Maybe some strange quantum physics principle.
|
||||
add text for player thoughts?
|
||||
simple puzzles
|
||||
cool looking stuff
|
||||
in the final level you see your self at the starting level, with the wires
|
||||
you shoot your self to wake up?
|
||||
nonaggressive mobs
|
||||
|
||||
level boss: fires a line intersection in a random direction every few seconds.
|
||||
the last two intersections have a destructive laser between them.
|
||||
|
||||
@@ -409,6 +363,7 @@ chapter 3: why is the bot attacking things?
|
||||
bots come in Infinite waves that increase game difficulty each wave
|
||||
only ending is testing mode + next level or player death
|
||||
scientist have some lines in between each wave of mobs
|
||||
after chapter 3 spawn nonaggressive mobs in future runs
|
||||
|
||||
chapter 4: no need to fight?
|
||||
for some reason the AI started researching an escape, and began fighting its self.
|
||||
|
||||
Reference in New Issue
Block a user