diff --git a/.DS_Store b/.DS_Store index cf1529a..1d04de9 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/js/bullet.js b/js/bullet.js index b120560..879bab5 100644 --- a/js/bullet.js +++ b/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, } } } diff --git a/js/engine.js b/js/engine.js index c0873ad..762e2df 100644 --- a/js/engine.js +++ b/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 = ` = on` - 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 = ` = OFF` + 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 = ` = off` + 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 = ` = ON` + 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); diff --git a/js/level.js b/js/level.js index 67aee5e..593e011 100644 --- a/js/level.js +++ b/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 = ${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 = ` = on` - simulation.makeTextLog(`tech.isFlipFlopHarmImmune = true`); + if (tech.isFlipFlopHarm && tech.isFlipFlopLevelReset && !tech.isFlipFlopOn) { + tech.isFlipFlopOn = true + simulation.makeTextLog(`tech.isFlipFlopOn = true`); } }, custom() {}, diff --git a/js/lore.js b/js/lore.js index c553a4e..ec2375f 100644 --- a/js/lore.js +++ b/js/lore.js @@ -1,5 +1,6 @@ const lore = { techCount: 0, + techGoal: 7, talkingColor: "#dff", //set color of graphic on level.null anand: { color: "#e0c", diff --git a/js/player.js b/js/player.js index 3f7233a..6bff2f6 100644 --- a/js/player.js +++ b/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 energy to emit short range plasma
damages and pushes 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: "cloak after not using your gun or field
while cloaked mobs can't see you
increase damage by 133%", 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(); } diff --git a/js/simulation.js b/js/simulation.js index c783191..4f1434c 100644 --- a/js/simulation.js +++ b/js/simulation.js @@ -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, diff --git a/js/spawn.js b/js/spawn.js index 31fd901..6fd415f 100644 --- a/js/spawn.js +++ b/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(`undefined = ${lore.techCount}/10
level.levels.push("null")`); + simulation.makeTextLog(`undefined = ${lore.techCount}/${lore.techGoal}
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 = ${(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 = ${(count/60- Math.random()).toFixed(3)}`); + } else if (count === 600) { + simulation.makeTextLog(`simulation.analysis = 1`); + } else if (count === 720) { + simulation.makeTextLog(`undefined = ${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 = 1`); - setTimeout(() => { - simulation.makeTextLog(`undefined = ${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 = ${(i).toFixed(3)}`); + // }, delay); + // delay += 1000 + // } + // setTimeout(function() { + // if (isEnding) simulation.makeTextLog(`simulation.analysis = 1`); + // setTimeout(() => { + // if (isEnding) simulation.makeTextLog(`undefined = ${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) diff --git a/js/tech.js b/js/tech.js index a9b5dbe..27dcca8 100644 --- a/js/tech.js +++ b/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 holding a block
reduce harm by 80%", + description: "while you are holding a block
reduce harm by 85%", maxCount: 1, count: 0, allowed() { @@ -1188,15 +1188,21 @@ }, { name: "flip-flop", - description: "take 25% more harm from a collision
but, on your next collision take 0 harm", + description: `collisions set flip-flop to OFF when ON +
collisions set flip-flop to ON when OFF`, + // description: `collisions toggle flip-flop ON and OFF + //
ON: 0 collision harm, OFF: 25% extra harm`, + // on your next collision take 0 harm nameInfo: "", addNameInfo() { setTimeout(function() { if (document.getElementById("tech-flip-flop")) { - if (tech.isFlipFlopHarmImmune) { - document.getElementById("tech-flip-flop").innerHTML = ` = on` + if (tech.isFlipFlopOn) { + document.getElementById("tech-flip-flop").innerHTML = ` = ON` + m.eyeFillColor = m.fieldMeterColor //'#5af' } else { - document.getElementById("tech-flip-flop").innerHTML = ` = off` + document.getElementById("tech-flip-flop").innerHTML = ` = OFF` + 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 flip-flip to the on state at start of a level
take 0 harm on your next collision", - 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 50% more damage
while flip-flip is in the off state", + description: "if flip-flop is in the ON state
take 0 harm 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 flip-flop is in the ON state
do 55.5% more damage", + 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 flip-flop is ON regen 22 energy per second
if flip-flop is OFF drain 3.1 energy 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 flip-flop to the ON state
at the start of a level", + 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: "7% chance to duplicate spawned power ups
add 11 junk tech to the potential pool", + description: "7% chance to duplicate spawned power ups
add 12 junk tech 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 difficulty by 1 level
add 16 junk tech to the potential pool", + description: "reduce combat difficulty by 1 level
add 18 junk tech to the potential pool", maxCount: 1, isNonRefundable: true, isExperimentHide: true, @@ -2337,7 +2411,7 @@ effect() { level.difficultyDecrease(simulation.difficultyMode) simulation.makeTextLog(`simulation.difficultyMode--`) - 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
add copies of this to the potential tech pool`, + description: `${lore.techCount+1}/${lore.techGoal}
add copies of this to the potential tech pool`, 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
add copies of this to the potential tech pool` + if (tech.tech[i].isLore && tech.tech[i].count === 0) tech.tech[i].description = `${lore.techCount+1}/${lore.techGoal}
add copies of this to the potential tech pool` } 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 } \ No newline at end of file diff --git a/style.css b/style.css index 9e2bbc8..8fd7362 100644 --- a/style.css +++ b/style.css @@ -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%; diff --git a/todo.txt b/todo.txt index 0606202..1db2f81 100644 --- a/todo.txt +++ b/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 = `8% chance to duplicate spawned power ups
chance to duplicate = ${techduplicateChance}` -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.