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
This commit is contained in:
landgreen
2021-12-25 06:30:57 -08:00
parent 40ad1ec4c4
commit fca1d2371a
8 changed files with 161 additions and 157 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -8,7 +8,7 @@ const level = {
onLevel: -1,
levelsCleared: 0,
playableLevels: ["labs", "rooftops", "skyscrapers", "warehouse", "highrise", "office", "aerie", "satellite", "sewers", "testChamber"], //intro, gauntlet, final are added in at the start and end of level order
trainingLevels: ["trainingWalk", "trainingCrouch", "trainingJump", "trainingHold", "trainingThrow", "trainingThrowAt", "trainingDeflect", "trainingHeal", "trainingFire", "trainingNailGun", "trainingShotGun", "trainingSuperBall", "trainingMatterWave", "trainingMissile"],
trainingLevels: ["walk", "crouch", "jump", "hold", "throw", "throwAt", "deflect", "heal", "fire", "nailGun", "dhotGun", "superBall", "matterWave", "missile"],
communityLevels: ["stronghold", "basement", "crossfire", "vats", "run", "n-gon", "house", "perplex", "coliseum", "tunnel"],
levels: [],
start() {
@@ -20,7 +20,9 @@ const level = {
// simulation.isHorizontalFlipped = true
// m.setField("pilot wave")
// b.giveGuns("harpoon")
// tech.giveTech("Bose Einstein condensate")
tech.giveTech("relay switch")
tech.giveTech("thermocouple")
// for (let i = 0; i < 2; i++) powerUps.directSpawn(0, 0, "tech");
// for (let i = 0; i < 9; i++) tech.giveTech("annelids")
// tech.giveTech("tinsellated flagella")
// for (let i = 0; i < 2; i++) tech.giveTech("refractory metal")
@@ -28,9 +30,9 @@ const level = {
// for (let i = 0; i < 1; i++) tech.giveTech("reticulum")
// for (let i = 0; i < 2; i++) tech.giveTech("laser-bot")
// tech.tech[297].frequency = 100
// level.run();
// level.crouch();
if (simulation.isTraining) { level.trainingWalk(); } else { level.intro(); }
if (simulation.isTraining) { level.walk(); } else { level.intro(); }
// level.testing(); //not in rotation, used for testing
// level.template(); //not in rotation, blank start new map development
// level.final() //final boss level
@@ -138,7 +140,12 @@ const level = {
// lore.trainer.text("Wow. Just a platform.")
},
trainingBackgroundColor: "#e1e1e1",
trainingWalk() { //learn to walk
walk() { //learn to walk
var img = new Image(); // Create new img element
img.src = 'myImage.png'; // Set source path
m.addHealth(Infinity)
document.getElementById("health").style.display = "none" //hide your health bar
document.getElementById("health-bg").style.display = "none"
@@ -155,12 +162,12 @@ const level = {
simulation.lastLogTime = 0; //clear previous messages
let instruction = 0
level.trainingText(`move <strong>↔</strong> with <strong>${input.key.left.replace('Key', '').replace('Digit', '')}</strong> and <strong>${input.key.right.replace('Key', '').replace('Digit', '')}</strong>`)
level.trainingText(`move <strong>↔</strong> with <strong class="key-input-train">${input.key.left.replace('Key', '').replace('Digit', '')}</strong> and <strong class="key-input-train">${input.key.right.replace('Key', '').replace('Digit', '')}</strong>`)
level.custom = () => {
if (instruction === 0 && input.right) {
instruction++
level.trainingText(`<s>move <strong>↔</strong> with <strong>${input.key.left.replace('Key', '').replace('Digit', '')}</strong> and <strong>${input.key.right.replace('Key', '').replace('Digit', '')}</strong></s>
level.trainingText(`<s>move <strong>↔</strong> with <strong class="key-input-train">${input.key.left.replace('Key', '').replace('Digit', '')}</strong> and <strong class="key-input-train">${input.key.right.replace('Key', '').replace('Digit', '')}</strong></s>
<br>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 <strong>${input.key.down.replace('Key', '').replace('Digit', '')}</strong> to crouch`)
level.trainingText(`press <strong class="key-input-train">${input.key.down.replace('Key', '').replace('Digit', '')}</strong> to crouch`)
level.custom = () => {
if (instruction === 0 && input.down) {
instruction++
level.trainingText(`<s>press <strong>${input.key.down.replace('Key', '').replace('Digit', '')}</strong> to crouch</s>`)
level.trainingText(`<s>press <strong class="key-input-train">${input.key.down.replace('Key', '').replace('Digit', '')}</strong> to crouch</s>`)
}
//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 <strong>${input.key.up.replace('Key', '').replace('Digit', '')}</strong> longer to jump higher`)
level.trainingText(`hold down <strong class="key-input-train">${input.key.up.replace('Key', '').replace('Digit', '')}</strong> longer to jump higher`)
level.custom = () => {
if (instruction === 0 && m.pos.x > 300) {
instruction++
level.trainingText(`<s>hold down <strong>${input.key.up.replace('Key', '').replace('Digit', '')}</strong> longer to jump higher</s>`)
level.trainingText(`<s>hold down <strong class="key-input-train">${input.key.up.replace('Key', '').replace('Digit', '')}</strong> longer to jump higher</s>`)
}
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 <strong class='color-f'>field</strong> with <strong>${input.key.field.replace('Key', '').replace('Digit', '')}</strong> or <strong>right mouse</strong>`)
level.trainingText(`activate your <strong class='color-f'>field</strong> with <strong class="key-input-train">${input.key.field.replace('Key', '').replace('Digit', '')}</strong> or <strong>right mouse</strong>`)
level.custom = () => {
if (instruction === 0 && input.field) {
instruction++
level.trainingText(`<s>activate your <strong class='color-f'>field</strong> with <strong>${input.key.field.replace('Key', '').replace('Digit', '')}</strong> or <strong>right mouse</strong></s><br>release your <strong class='color-f'>field</strong> on a <strong class='color-block'>block</strong> to pick it up`)
level.trainingText(`<s>activate your <strong class='color-f'>field</strong> with <strong class="key-input-train">${input.key.field.replace('Key', '').replace('Digit', '')}</strong> or <strong>right mouse</strong></s><br>release your <strong class='color-f'>field</strong> on a <strong class='color-block'>block</strong> to pick it up`)
} else if (instruction === 1 && m.isHolding) {
instruction++
level.trainingText(`<s>activate your <strong class='color-f'>field</strong> with <strong>${input.key.field.replace('Key', '').replace('Digit', '')}</strong> or <strong>right mouse</strong><br>release your <strong class='color-f'>field</strong> on a <strong class='color-block'>block</strong> to pick it up</s><br>drop the <strong class='color-block'>block</strong> on the red button to open the door`)
level.trainingText(`<s>activate your <strong class='color-f'>field</strong> with <strong class="key-input-train">${input.key.field.replace('Key', '').replace('Digit', '')}</strong> or <strong>right mouse</strong><br>release your <strong class='color-f'>field</strong> on a <strong class='color-block'>block</strong> to pick it up</s><br>drop the <strong class='color-block'>block</strong> 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(`<s>activate your <strong class='color-f'>field</strong> with <strong>${input.key.field.replace('Key', '').replace('Digit', '')}</strong> or <strong>right mouse</strong><br>release your <strong class='color-f'>field</strong> on a <strong class='color-block'>block</strong> to pick it up<br>drop the <strong class='color-block'>block</strong> on the red button to open the door</s>`)
level.trainingText(`<s>activate your <strong class='color-f'>field</strong> with <strong class="key-input-train">${input.key.field.replace('Key', '').replace('Digit', '')}</strong> or <strong>right mouse</strong><br>release your <strong class='color-f'>field</strong> on a <strong class='color-block'>block</strong> to pick it up<br>drop the <strong class='color-block'>block</strong> on the red button to open the door</s>`)
}
//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 <strong class='color-f'>field</strong> with <strong class="key-input-train">${input.key.field.replace('Key', '').replace('Digit', '')}</strong> or <strong>right mouse</strong>
let instruction = 0
level.trainingText(`activate your <strong class='color-f'>field</strong> with <strong>${input.key.field.replace('Key', '').replace('Digit', '')}</strong> or <strong>right mouse</strong>
<br>pick up the <strong class='color-block'>block</strong> with your <strong class='color-f'>field</strong>`)
level.trainingText(`pick up the <strong class='color-block'>block</strong> with your <strong class='color-f'>field</strong>`)
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 <strong>${input.key.down.replace('Key', '').replace('Digit', '')}</strong> to crouch`)
level.trainingText(`press <strong class="key-input-train">${input.key.down.replace('Key', '').replace('Digit', '')}</strong> to crouch`)
level.custom = () => {
if (instruction === 0 && input.down) {
instruction++
level.trainingText(`<s>press <strong>${input.key.down.replace('Key', '').replace('Digit', '')}</strong> to crouch</s>`)
level.trainingText(`<s>press <strong class="key-input-train">${input.key.down.replace('Key', '').replace('Digit', '')}</strong> to crouch</s>`)
}
//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)

View File

@@ -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(`<span class='color-var'>m</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span>
// <br>${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 <strong class='color-m'>tech</strong> 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 <strong class='color-m'>tech</strong> left<br>erased <strong class='color-m'>tech</strong> 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");
}
}

View File

@@ -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)
}
}

View File

@@ -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)

View File

@@ -1809,7 +1809,7 @@ const tech = {
},
{
name: "thermocouple",
description: "if <strong>relay switch</strong> is in the <strong class='color-flop'>ON</strong> state<br>condense <strong>1-9</strong> <strong class='color-s'>ice IX</strong> crystals every second",
description: "if <strong>relay switch</strong> is in the <strong class='color-flop'>ON</strong> state<br>condense <strong>4-13</strong> <strong class='color-s'>ice IX</strong> 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)
}
}
},

View File

@@ -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;

View File

@@ -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