From fca1d2371adce1f3432fa7584759524acc633535 Mon Sep 17 00:00:00 2001 From: landgreen Date: Sat, 25 Dec 2021 06:30:57 -0800 Subject: [PATCH] ice-nine revolutionBoss is immune to damage at 1/4,1/2,3/4 health until it's laser spins around one revolution thermocouple produces 1-9 -> 4-13 ice nine bullet thermocouple is on by default until next patch decoherence rewrite with flags instead of a banish array, to fix bugs --- .DS_Store | Bin 6148 -> 6148 bytes js/level.js | 97 ++++++++++++++++++++++----------------- js/powerup.js | 60 +++++++++---------------- js/simulation.js | 2 +- js/spawn.js | 115 ++++++++++++++++++++++------------------------- js/tech.js | 9 ++-- style.css | 10 +++++ todo.txt | 25 ++++++----- 8 files changed, 161 insertions(+), 157 deletions(-) diff --git a/.DS_Store b/.DS_Store index 3ea33117343fcba12b14d2c01114efba5156eaaf..f2d08920929beadf79bca3f868f7d321203016be 100644 GIT binary patch delta 22 dcmZoMXffEJ#mrR7Ia!C↔ with ${input.key.left.replace('Key', '').replace('Digit', '')} and ${input.key.right.replace('Key', '').replace('Digit', '')}`) + level.trainingText(`move with ${input.key.left.replace('Key', '').replace('Digit', '')} and ${input.key.right.replace('Key', '').replace('Digit', '')}`) level.custom = () => { if (instruction === 0 && input.right) { instruction++ - level.trainingText(`move with ${input.key.left.replace('Key', '').replace('Digit', '')} and ${input.key.right.replace('Key', '').replace('Digit', '')} + level.trainingText(`move with ${input.key.left.replace('Key', '').replace('Digit', '')} and ${input.key.right.replace('Key', '').replace('Digit', '')}
exit through the blue door`) } //exit room @@ -188,10 +195,17 @@ const level = { spawn.mapRect(1600, -1200, 500, 850); //exit roof spawn.mapRect(1600, -400, 50, 225); //exit room left upper wall }, - trainingCrouch() { //learn to crouch + crouch() { //learn to crouch m.addHealth(Infinity) - level.setPosToSpawn(60, -50); //normal spawn - spawn.mapRect(10, -10, 100, 20); //small platform for player + level.setPosToSpawn(75, -100); //normal spawn + spawn.mapRect(25, -60, 100, 20); //small platform for player + spawn.mapRect(0, -50, 150, 25); //stairs + spawn.mapRect(-25, -40, 200, 25); + spawn.mapRect(-50, -30, 250, 25); + spawn.mapRect(-75, -20, 300, 25); + spawn.mapRect(-100, -10, 350, 25); + spawn.mapRect(-150, -50, 175, 75); + level.exit.x = 1775; level.exit.y = -35; spawn.mapRect(level.exit.x, level.exit.y + 25, 100, 100); //exit bump @@ -201,15 +215,15 @@ const level = { document.body.style.backgroundColor = level.trainingBackgroundColor let instruction = 0 - level.trainingText(`press ${input.key.down.replace('Key', '').replace('Digit', '')} to crouch`) + level.trainingText(`press ${input.key.down.replace('Key', '').replace('Digit', '')} to crouch`) level.custom = () => { if (instruction === 0 && input.down) { instruction++ - level.trainingText(`press ${input.key.down.replace('Key', '').replace('Digit', '')} to crouch`) + level.trainingText(`press ${input.key.down.replace('Key', '').replace('Digit', '')} to crouch`) } //exit room ctx.fillStyle = "#f2f2f2" - ctx.fillRect(1650, -400, 400, 400) + ctx.fillRect(1625, -350, 375, 350) level.exit.draw(); level.enter.draw(); level.playerExitCheck(); @@ -217,14 +231,15 @@ const level = { level.customTopLayer = () => { //exit room glow ctx.fillStyle = "rgba(0,255,255,0.05)" - ctx.fillRect(1650, -400, 400, 400) + ctx.fillRect(1625, -350, 375, 350) //dark ctx.fillStyle = "rgba(0,0,0,0.2)" - ctx.fillRect(625, -100, 1025, 175) + ctx.fillRect(500, -100, 1125, 175); }; // spawn.mapRect(1025, -675, 300, 623); //crouch wall - spawn.mapRect(625, -650, 1025, 550); + // spawn.mapRect(625, -650, 1025, 550); + spawn.mapRect(500, -650, 1125, 550); spawn.mapRect(-200, -650, 875, 300); spawn.mapRect(-2750, -2800, 2600, 4600); //left wall @@ -234,6 +249,7 @@ const level = { spawn.mapRect(1575, 0, 500, 100); spawn.mapRect(-250, -2800, 3500, 2200); //roof + spawn.mapRect(725, 12, 50, 25); spawn.mapRect(725, 25, 75, 25); spawn.mapRect(750, 38, 75, 25); @@ -241,9 +257,8 @@ const level = { spawn.mapRect(1500, 38, 50, 25); spawn.mapRect(1550, 12, 50, 25); spawn.mapRect(1600, -1200, 500, 850); //exit roof - spawn.mapRect(1600, -400, 50, 225); //exit room left upper wall }, - trainingJump() { //learn to jump + jump() { //learn to jump m.addHealth(Infinity) level.setPosToSpawn(60, -50); //normal spawn spawn.mapRect(10, -10, 100, 20); //small platform for player @@ -256,12 +271,12 @@ const level = { document.body.style.backgroundColor = level.trainingBackgroundColor let instruction = 0 - level.trainingText(`hold down ${input.key.up.replace('Key', '').replace('Digit', '')} longer to jump higher`) + level.trainingText(`hold down ${input.key.up.replace('Key', '').replace('Digit', '')} longer to jump higher`) level.custom = () => { if (instruction === 0 && m.pos.x > 300) { instruction++ - level.trainingText(`hold down ${input.key.up.replace('Key', '').replace('Digit', '')} longer to jump higher`) + level.trainingText(`hold down ${input.key.up.replace('Key', '').replace('Digit', '')} longer to jump higher`) } m.health = 1 //can't die //exit room @@ -308,7 +323,7 @@ const level = { spawn.mapRect(975, -2800, 200, 2025); spawn.mapRect(1000, -775, 150, 25); }, - trainingHold() { //put block on button to open door + hold() { //put block on button to open door m.addHealth(Infinity) level.setPosToSpawn(60, -50); //normal spawn spawn.mapRect(10, -10, 100, 20); //small platform for player @@ -325,18 +340,18 @@ const level = { const door = level.door(1612.5, -175, 25, 190, 185, 3) let instruction = 0 - level.trainingText(`activate your field with ${input.key.field.replace('Key', '').replace('Digit', '')} or right mouse`) + level.trainingText(`activate your field with ${input.key.field.replace('Key', '').replace('Digit', '')} or right mouse`) level.custom = () => { if (instruction === 0 && input.field) { instruction++ - level.trainingText(`activate your field with ${input.key.field.replace('Key', '').replace('Digit', '')} or right mouse
release your field on a block to pick it up`) + level.trainingText(`activate your field with ${input.key.field.replace('Key', '').replace('Digit', '')} or right mouse
release your field on a block to pick it up`) } else if (instruction === 1 && m.isHolding) { instruction++ - level.trainingText(`activate your field with ${input.key.field.replace('Key', '').replace('Digit', '')} or right mouse
release your field on a block to pick it up

drop the block on the red button to open the door`) + level.trainingText(`activate your field with ${input.key.field.replace('Key', '').replace('Digit', '')} or right mouse
release your field on a block to pick it up

drop the block on the red button to open the door`) } else if (instruction === 2 && !buttonDoor.isUp && Vector.magnitudeSquared(Vector.sub(body[0].position, buttonDoor.min)) < 10000) { instruction++ - level.trainingText(`activate your field with ${input.key.field.replace('Key', '').replace('Digit', '')} or right mouse
release your field on a block to pick it up
drop the block on the red button to open the door
`) + level.trainingText(`activate your field with ${input.key.field.replace('Key', '').replace('Digit', '')} or right mouse
release your field on a block to pick it up
drop the block on the red button to open the door
`) } //exit room ctx.fillStyle = "#f2f2f2" @@ -376,7 +391,7 @@ const level = { spawn.mapRect(1600, -1200, 500, 850); //exit roof spawn.mapRect(1600, -400, 50, 225); //exit room left upper wall }, - trainingThrow() { //throw a block on button to open door + throw () { //throw a block on button to open door m.addHealth(Infinity) level.setPosToSpawn(60, -50); //normal spawn spawn.mapRect(10, -10, 100, 20); //small platform for player @@ -392,9 +407,9 @@ const level = { const buttonDoor = level.button(1635, -400) const door = level.door(1612.5, -175, 25, 190, 185, 3) + // activate your field with ${input.key.field.replace('Key', '').replace('Digit', '')} or right mouse let instruction = 0 - level.trainingText(`activate your field with ${input.key.field.replace('Key', '').replace('Digit', '')} or right mouse -
pick up the block with your field`) + level.trainingText(`pick up the block with your field`) level.custom = () => { if (instruction === 0 && m.isHolding) { @@ -453,7 +468,7 @@ const level = { spawn.mapRect(1625, -400, 400, 50); spawn.mapRect(1600, -400, 50, 225); //exit room left upper wall }, - trainingThrowAt() { //throw a block at mob to open door + throwAt() { //throw a block at mob to open door m.addHealth(Infinity) level.setPosToSpawn(60, -50); //normal spawn spawn.mapRect(10, -10, 100, 20); //small platform for player @@ -518,7 +533,7 @@ const level = { spawn.starter(425, -350, 35) spawn.starter(800, -350, 44) }, - trainingFire() { //throw a block at mob to open door + fire() { //throw a block at mob to open door level.setPosToSpawn(60, -50); //normal spawn spawn.mapRect(10, -10, 100, 20); //small platform for player level.exit.x = 1775; @@ -610,7 +625,7 @@ const level = { spawn.starter(900, -300, 35) spawn.starter(1400, -400, 44) }, - trainingDeflect() { //learn to jump + deflect() { //learn to jump m.addHealth(Infinity) level.setPosToSpawn(60, -50); //normal spawn spawn.mapRect(10, -10, 100, 20); //small platform for player @@ -677,7 +692,7 @@ const level = { who.timeLeft = 300 } }, - trainingHeal() { //learn to heal + heal() { //learn to heal m.addHealth(Infinity) m.health = 0; m.addHealth(0.25) @@ -743,7 +758,7 @@ const level = { spawn.mapRect(1600, -1200, 500, 850); //exit roof spawn.mapRect(1600, -400, 50, 225); //exit room left upper wall }, - trainingNailGun() { //throw a block on button to open door + nailGun() { //throw a block on button to open door level.difficultyIncrease(1) //difficulty on training mode resets to zero with each new level level.setPosToSpawn(60, -50); //normal spawn spawn.mapRect(10, -10, 100, 20); //small platform for player @@ -835,7 +850,7 @@ const level = { spawn.mapRect(1600, -400, 50, 225); //exit room left upper wall spawn.mapRect(1600, -600, 425, 250); }, - trainingShotGun() { //throw a block on button to open door + shotGun() { //throw a block on button to open door level.difficultyIncrease(1) //difficulty on training mode resets to zero with each new level level.setPosToSpawn(60, -50); //normal spawn spawn.mapRect(10, -10, 100, 20); //small platform for player @@ -917,7 +932,7 @@ const level = { spawn.mapRect(1600, -400, 50, 225); //exit room left upper wall spawn.mapRect(1600, -600, 425, 250); }, - trainingSuperBall() { //throw a block on button to open door + superBall() { //throw a block on button to open door level.difficultyIncrease(1) //difficulty on training mode resets to zero with each new level level.setPosToSpawn(60, -50); //normal spawn spawn.mapRect(10, -10, 100, 20); //small platform for player @@ -1001,7 +1016,7 @@ const level = { spawn.mapRect(1550, 12, 50, 25); spawn.mapRect(1600, -400, 50, 225); //exit room left upper wall }, - trainingMatterWave() { //throw a block on button to open door + matterWave() { //throw a block on button to open door level.difficultyIncrease(1) //difficulty on training mode resets to zero with each new level level.setPosToSpawn(60, -50); //normal spawn spawn.mapRect(10, -10, 100, 20); //small platform for player @@ -1088,7 +1103,7 @@ const level = { spawn.mapRect(1550, 12, 50, 25); spawn.mapRect(1600, -400, 50, 225); //exit room left upper wall }, - trainingMissile() { //throw a block on button to open door + missile() { //throw a block on button to open door level.difficultyIncrease(1) //difficulty on training mode resets to zero with each new level level.setPosToSpawn(60, -50); //normal spawn spawn.mapRect(10, -10, 100, 20); //small platform for player @@ -1196,13 +1211,13 @@ const level = { let instruction = 0 - level.trainingText(`press ${input.key.down.replace('Key', '').replace('Digit', '')} to crouch`) + level.trainingText(`press ${input.key.down.replace('Key', '').replace('Digit', '')} to crouch`) level.custom = () => { if (instruction === 0 && input.down) { instruction++ - level.trainingText(`press ${input.key.down.replace('Key', '').replace('Digit', '')} to crouch`) + level.trainingText(`press ${input.key.down.replace('Key', '').replace('Digit', '')} to crouch`) } //exit room ctx.fillStyle = "#f2f2f2" @@ -3455,7 +3470,7 @@ const level = { spawn.mapRect(4850, -275, 50, 175); //??? - level.difficultyIncrease(1) //30 is near max on hard //60 is near max on why + level.difficultyIncrease(20) //30 is near max on hard //60 is near max on why m.addHealth(Infinity) // spawn.starter(1900, -500, 200) //big boy @@ -3478,7 +3493,7 @@ const level = { // spawn.blinkBoss(3200, -500) // spawn.mantisBoss(1700, -500) // spawn.tetherBoss(1700, -500) //go to actual level? - // spawn.revolutionBoss(1900, -500) + spawn.revolutionBoss(1900, -500) // spawn.bomberBoss(1400, -500) // spawn.cellBossCulture(1600, -500) // spawn.shieldingBoss(1700, -500) diff --git a/js/powerup.js b/js/powerup.js index b7c7f44..22ac76d 100644 --- a/js/powerup.js +++ b/js/powerup.js @@ -302,12 +302,11 @@ const powerUps = { } if (tech.isBanish && type === 'tech') { // banish researched tech by adding them to the list of banished tech const banishLength = tech.isDeterminism ? 1 : 3 + tech.isExtraChoice * 2 - if (powerUps.tech.choiceLog.length > banishLength || powerUps.tech.choiceLog.length === banishLength) { //I'm not sure this check is needed - for (let i = 0; i < banishLength; i++) { - powerUps.tech.banishLog.push(powerUps.tech.choiceLog[powerUps.tech.choiceLog.length - 1 - i]) - } + for (let i = 0; i < banishLength; i++) { + const index = powerUps.tech.choiceLog.length - i - 1 + if (powerUps.tech.choiceLog[index] !== undefined) tech.tech[powerUps.tech.choiceLog[index]].isBanished = true } - simulation.makeTextLog(`powerUps.tech.length: ${Math.max(0,powerUps.tech.lastTotalChoices - powerUps.tech.banishLog.length)}`) + simulation.makeTextLog(`powerUps.tech.length: ${Math.max(0,powerUps.tech.lastTotalChoices - banishLength)}`) } } if (tech.isAnsatz && powerUps.research.count === 0) { @@ -393,17 +392,14 @@ const powerUps = { powerUps.research.changeRerolls(-1) } powerUps.research.currentRerollCount++ - // simulation.makeTextLog(`m.research-- - //
${powerUps.research.count}`) if (tech.isBanish && type === 'tech') { // banish researched tech const banishLength = tech.isDeterminism ? 1 : 3 + tech.isExtraChoice * 2 - if (powerUps.tech.choiceLog.length > banishLength || powerUps.tech.choiceLog.length === banishLength) { //I'm not sure this check is needed - for (let i = 0; i < banishLength; i++) { - powerUps.tech.banishLog.push(powerUps.tech.choiceLog[powerUps.tech.choiceLog.length - 1 - i]) - } + for (let i = 0; i < banishLength; i++) { + const index = powerUps.tech.choiceLog.length - i - 1 + // console.log(index, powerUps.tech.choiceLog[index], tech.tech[powerUps.tech.choiceLog[index]].name) + if (powerUps.tech.choiceLog[index] !== undefined) tech.tech[powerUps.tech.choiceLog[index]].isBanished = true } - // simulation.makeTextLog(`${Math.max(0,powerUps.tech.lastTotalChoices - powerUps.tech.banishLog.length)} estimated tech choices remaining`) - simulation.makeTextLog(`powerUps.tech.length: ${Math.max(0,powerUps.tech.lastTotalChoices - powerUps.tech.banishLog.length)}`) + simulation.makeTextLog(`powerUps.tech.length: ${Math.max(0,powerUps.tech.lastTotalChoices - banishLength)}`) } if (tech.isResearchReality) { m.switchWorlds() @@ -627,36 +623,26 @@ const powerUps = { }, choiceLog: [], //records all previous choice options lastTotalChoices: 0, //tracks how many tech were available for random selection last time a tech was picked up - banishLog: [], //records all tech permanently removed from the selection pool + // banishLog: [], //records all tech permanently removed from the selection pool effect() { if (m.alive) { function pick(skip1 = -1, skip2 = -1, skip3 = -1, skip4 = -1) { let options = []; for (let i = 0; i < tech.tech.length; i++) { - if (tech.tech[i].count < tech.tech[i].maxCount && i !== skip1 && i !== skip2 && i !== skip3 && i !== skip4 && tech.tech[i].allowed()) { + if (tech.tech[i].count < tech.tech[i].maxCount && i !== skip1 && i !== skip2 && i !== skip3 && i !== skip4 && tech.tech[i].allowed() && !tech.tech[i].isBanished) { for (let j = 0, len = tech.tech[i].frequency; j < len; j++) options.push(i); } } powerUps.tech.lastTotalChoices = options.length //this is recorded so that banish can know how many tech were available - if (tech.isBanish) { //remove banished tech from last selection - for (let i = 0; i < powerUps.tech.banishLog.length; i++) { - for (let j = 0; j < options.length; j++) { - if (powerUps.tech.banishLog[i] === options[j]) { - options.splice(j, 1) - break - } - } - } - } else { //remove repeats from last selection - const totalChoices = tech.isDeterminism ? 1 : 3 + tech.isExtraChoice * 2 - if (powerUps.tech.choiceLog.length > totalChoices || powerUps.tech.choiceLog.length === totalChoices) { //make sure this isn't the first time getting a power up and there are previous choices to remove - for (let i = 0; i < totalChoices; i++) { //repeat for each choice from the last selection - if (options.length > totalChoices) { - for (let j = 0, len = options.length; j < len; j++) { - if (powerUps.tech.choiceLog[powerUps.tech.choiceLog.length - 1 - i] === options[j]) { - options.splice(j, 1) //remove previous choice from option pool - break; - } + + const totalChoices = tech.isDeterminism ? 1 : 3 + tech.isExtraChoice * 2 + if (powerUps.tech.choiceLog.length > totalChoices || powerUps.tech.choiceLog.length === totalChoices) { //make sure this isn't the first time getting a power up and there are previous choices to remove + for (let i = 0; i < totalChoices; i++) { //repeat for each choice from the last selection + if (options.length > totalChoices) { + for (let j = 0, len = options.length; j < len; j++) { + if (powerUps.tech.choiceLog[powerUps.tech.choiceLog.length - 1 - i] === options[j]) { + options.splice(j, 1) //remove previous choice from option pool + break; } } } @@ -788,13 +774,11 @@ const powerUps = { document.getElementById("choose-grid").innerHTML = text powerUps.showDraft(); - } else if (tech.isBanish) { + } else if (tech.isBanish) { //if no tech options available eject banish tech for (let i = 0, len = tech.tech.length; i < len; i++) { if (tech.tech[i].name === "decoherence") powerUps.ejectTech(i) } - // simulation.makeTextLog(`No tech left
erased tech have been recovered`) - simulation.makeTextLog(`powerUps.tech.length: ${Math.max(0,powerUps.tech.lastTotalChoices - powerUps.tech.banishLog.length)}`) - // powerUps.spawn(m.pos.x, m.pos.y, "tech"); + // simulation.makeTextLog(`powerUps.tech.length: ${Math.max(0,powerUps.tech.lastTotalChoices - powerUps.tech.banishLog.length)}`) powerUps.endDraft("tech"); } } diff --git a/js/simulation.js b/js/simulation.js index dbfc8ae..8799432 100644 --- a/js/simulation.js +++ b/js/simulation.js @@ -885,7 +885,7 @@ const simulation = { } if (tech.relayIce && tech.isFlipFlopOn) { for (let j = 0; j < tech.relayIce; j++) { - for (let i = 0, len = Math.ceil(9 * Math.random()); i < len; i++) b.iceIX(2) + for (let i = 0, len = 3 + Math.ceil(9 * Math.random()); i < len; i++) b.iceIX(2) } } diff --git a/js/spawn.js b/js/spawn.js index c125a21..53642cb 100644 --- a/js/spawn.js +++ b/js/spawn.js @@ -3377,7 +3377,7 @@ const spawn = { // spawn.shield(me, x, y, 1); Matter.Body.setDensity(me, 0.005); //extra dense //normal is 0.001 //makes effective life much larger - me.damageReduction = 0.11 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1) + me.damageReduction = 0.1 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1) me.isBoss = true; me.onDamage = function() {}; me.onDeath = function() { @@ -3387,80 +3387,71 @@ const spawn = { //invulnerability every 1/4 fraction of life lost //required setup for invulnerable - // me.isInvulnerable = false - // me.isNextInvulnerability = 0.75 - // me.invulnerabilityCountDown = 0 - // me.invulnerable = function() { - // if (this.health < this.isNextInvulnerability) { - // this.isNextInvulnerability = Math.floor(this.health * 4) / 4 //0.75,0.5,0.25 - // this.isInvulnerable = true - // this.startingDamageReduction = this.damageReduction - // this.damageReduction = 0 - // this.invulnerabilityCountDown = 240 - // } - // if (this.isInvulnerable) { - // if (this.invulnerabilityCountDown > 0) { - // this.invulnerabilityCountDown-- - // //graphics //draw a super shield? - // 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.fillStyle = `rgba(${Math.floor(255 * Math.random())},${Math.floor(255 * Math.random())},${Math.floor(255 * Math.random())},0.5)` - // // ctx.fill(); - // ctx.strokeStyle = "rgba(255,255,255,0.7)"; - // ctx.stroke(); - // } else { - // this.isInvulnerable = false - // this.damageReduction = this.startingDamageReduction - // } - // } - // } - - //invulnerable every other revolution me.isInvulnerable = false + me.isNextInvulnerability = 0.75 + me.invulnerabilityCountDown = 0 me.invulnerable = function() { - //draw trigger angle - // ctx.beginPath(); - // ctx.moveTo(this.position.x, this.position.y); - // const a = this.angle + Math.PI / 2 - // const unit = { x: Math.cos(a), y: Math.sin(a) } - // const edge = Vector.add(this.position, Vector.mult(unit, this.radius)) - // ctx.lineTo(edge.x, edge.y); - // ctx.lineWidth = 5; - // ctx.strokeStyle = "#000"; - // ctx.stroke(); - if (this.laserAngle % (4 * Math.PI) > 2 * Math.PI) { - if (!this.isInvulnerable) { - this.isInvulnerable = true - if (this.damageReduction) this.startingDamageReduction = this.damageReduction - this.damageReduction = 0 - } - } else if (this.isInvulnerable) { - this.isInvulnerable = false - this.damageReduction = this.startingDamageReduction + if (this.health < this.isNextInvulnerability) { + this.isNextInvulnerability = Math.floor(this.health * 4) / 4 //0.75,0.5,0.25 + this.isInvulnerable = true + this.startingDamageReduction = this.damageReduction + this.damageReduction = 0 + this.invulnerabilityCountDown = 106 } if (this.isInvulnerable) { - 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(); + if (this.invulnerabilityCountDown > 0) { + this.invulnerabilityCountDown-- + //graphics //draw a super shield? + 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.fillStyle = `rgba(${Math.floor(255 * Math.random())},${Math.floor(255 * Math.random())},${Math.floor(255 * Math.random())},0.5)` + // ctx.fill(); + ctx.strokeStyle = "rgba(255,255,255,0.7)"; + ctx.stroke(); + } else { + this.isInvulnerable = false + this.damageReduction = this.startingDamageReduction + } } } + //invulnerable every other revolution + // me.isInvulnerable = false + // me.invulnerable = function() { + // //draw trigger angle + // if (this.laserAngle % (4 * Math.PI) > 2 * Math.PI) { + // if (!this.isInvulnerable) { + // this.isInvulnerable = true + // if (this.damageReduction) this.startingDamageReduction = this.damageReduction + // this.damageReduction = 0 + // } + // } else if (this.isInvulnerable) { + // this.isInvulnerable = false + // this.damageReduction = this.startingDamageReduction + // } + // if (this.isInvulnerable) { + // 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(); + // } + // } + me.do = function() { this.invulnerable(); this.checkStatus(); this.seePlayerByHistory(60); this.attraction(); //traveling laser - if (!m.isBodiesAsleep) this.laserAngle += 0.03 + if (!m.isBodiesAsleep) this.laserAngle += this.isInvulnerable ? 0.06 : 0.015 for (let i = 0, len = this.vertices.length; i < len; i++) { // this.laserSword(this.vertices[1], this.angle + laserAngle); const bend = bendFactor * Math.cos(this.laserAngle + 2 * Math.PI * i / len) diff --git a/js/tech.js b/js/tech.js index 49e6d15..6ee72ab 100644 --- a/js/tech.js +++ b/js/tech.js @@ -1809,7 +1809,7 @@ const tech = { }, { name: "thermocouple", - description: "if relay switch is in the ON state
condense 1-9 ice IX crystals every second", + description: "if relay switch is in the ON state
condense 4-13 ice IX crystals every second", maxCount: 9, count: 0, frequency: 4, @@ -2813,8 +2813,11 @@ const tech = { remove() { if (tech.isBanish) { tech.isBanish = false - powerUps.tech.banishLog = [] //reset banish log - powerUps.research.changeRerolls(-10) + //reset banish list + for (let i = 0; i < tech.tech.length; i++) { + if (tech.tech[i].isBanished) tech.tech[i].isBanished = false + } + // powerUps.research.changeRerolls(-10) } } }, diff --git a/style.css b/style.css index ec3bdec..2a9eb57 100644 --- a/style.css +++ b/style.css @@ -81,6 +81,16 @@ td { padding-left: 10px; } +.key-input-train { + padding: 0px 5px; + border: 2px solid #444; + color: #444; + border-radius: 4px; + background-color: #d0d0d0; + text-align: center; + font-weight: 400; +} + .key-input { padding: 3px 8px; border: 2px solid #333; diff --git a/todo.txt b/todo.txt index a816489..cfcc631 100644 --- a/todo.txt +++ b/todo.txt @@ -1,21 +1,18 @@ ******************************************************** NEXT PATCH ************************************************** -new community level "run" (by iSuggestedThatAlready / iNoobBoi)!!!!!! - try it out by enabling community levels in the settings +revolutionBoss is immune to damage at 1/4,1/2,3/4 health until it's laser spins around one revolution -more training levels: "trainingNailGun", "trainingShotGun", "trainingSuperBall", "trainingMatterWave", "trainingMissile" +thermocouple produces 1-9 -> 4-13 ice nine bullet +thermocouple is on by default until next patch + +decoherence rewrite with flags instead of a banish array, to fix bugs -no power ups check box in experiment mode now disables all types of power ups, not just tech - simulation.isNoPowerUps -powerUps can no longer move through doors - this might lead to problems that I haven't thought about, but let's see -adiabatic healing now updates active heal power ups as well as future ones -fixed bug with undefined tech not showing up ******************************************************** TODO ******************************************************** -decoherence rewrite with flags instead of a banish array, to fix bugs + +merge various multi bullet tech under one name training save training level progress as local variable @@ -32,6 +29,7 @@ training done pick up a block an drop onto a button to open door done fire block at button to open door done fire block at mob to open door + easier deflecting level, with 1-2 attacking mobs done use field to deflect bullets done pick up heal power ups with field to open door done use a gun to kill a mob and use it's block body to activate a button to open a door @@ -61,8 +59,11 @@ training cloaking - sneak past mobs to collect some heals pilot wave - toss blocks at mobs worm hole - teleport past lasers - puzzle rooms: - close a door to trigger a button + puzzle/platforming rooms: + stack blocks to get to high ground + also make a harder version of stacking blocks + portal rooms + jump at the top of a elevator to jump high combat rooms: kill so many mobs that the mob bodies pile up and you can get over a wall by jumping on them boss gauntlet, spawn with nothing but a few power ups and fight 10 bosses