From ecb41e1a19c87b350130916d8a798226edcdc2f4 Mon Sep 17 00:00:00 2001 From: landgreen Date: Fri, 1 Jan 2021 17:25:12 -0800 Subject: [PATCH] bug fix on final boss kill --- index.html | 3 ++- js/bullet.js | 2 ++ js/level.js | 50 +++++++++++++++++++++++++++++++++++++------------- js/lore.js | 34 ++++++++++++++++++++++++++++++++++ js/spawn.js | 10 +++++++++- todo.txt | 26 +++++++++++++------------- 6 files changed, 97 insertions(+), 28 deletions(-) create mode 100644 js/lore.js diff --git a/index.html b/index.html index 5bf8d13..5d80878 100644 --- a/index.html +++ b/index.html @@ -561,7 +561,8 @@ - + + diff --git a/js/bullet.js b/js/bullet.js index 27efdf1..8c8e5af 100644 --- a/js/bullet.js +++ b/js/bullet.js @@ -3221,6 +3221,8 @@ const b = { bullet[bullet.length - 1].force.y += push.y * (i - (tech.missileCount - 1) / 2); } } + + // if (tech.missileCount) { // if (mech.crouch) { // for (let i = 0; i < 3; i++) { diff --git a/js/level.js b/js/level.js index 56a65b8..08f9196 100644 --- a/js/level.js +++ b/js/level.js @@ -17,7 +17,7 @@ const level = { // simulation.zoomScale = 1000; // simulation.setZoom(); // mech.setField("plasma torch") - // b.giveGuns("foam") + // b.giveGuns("missiles") // tech.isMineSentry = true // tech.giveTech("foam fractionation") // tech.giveTech("missile-bot") @@ -99,15 +99,21 @@ const level = { //****************************************************************************************************************** //****************************************************************************************************************** escape() { - const hazard = level.hazard(-1775, 150, 3575, 650, 0.01, "hsla(160, 100%, 35%,0.75)") - // level.bossKilled = false; // if a boss needs to be killed + const hazardSlime = level.hazard(-1775, 150, 3575, 650, 0.01, "hsla(160, 100%, 35%,0.75)") + // const hazardLaser1 = level.hazard(-475, -800, 1, 800, 0.4, "#50f", true) //laser + // const hazardLaser2 = level.hazard(475, -800, 1, 800, 0.4, "#50f", true) //laser + level.custom = () => { // level.playerExitCheck(); - hazard.query(); + hazardSlime.query(); + // hazardLaser1.query(); + // hazardLaser2.query(); // hazard.level(true) }; level.customTopLayer = () => { - hazard.draw(); + hazardSlime.drawTides(); + // hazardLaser1.draw(); + // hazardLaser2.draw(); }; level.setPosToSpawn(0, -50); //normal spawn @@ -116,14 +122,16 @@ const level = { level.exit.y = 200; level.defaultZoom = 1000 simulation.zoomTransition(level.defaultZoom) - document.body.style.backgroundColor = "#aaa"; - // level.fill.push({ //foreground - // x: 2500, - // y: -1100, - // width: 450, - // height: 250, - // color: "rgba(0,0,0,0.1)" - // }); + // document.body.style.backgroundColor = "#aaa"; + document.body.style.backgroundColor = "#ddd"; + + level.fill.push({ //foreground + x: -1950, + y: -950, + width: 3900, + height: 1900, + color: "rgba(0,0,0,0.1)" + }); // level.fillBG.push({ //background // x: 1300, // y: -1800, @@ -137,7 +145,16 @@ const level = { spawn.mapRect(-2000, -1000, 4000, 200); //ceiling spawn.mapRect(-2000, -1000, 225, 2000); //left spawn.mapRect(1800, -1000, 200, 2000); //right + spawn.mapRect(-500, -5, 25, 50); //edge shelf + spawn.mapRect(475, -5, 25, 50); //edge shelf + // spawn.mapRect(-500, -820, 50, 25); //edge shelf ceiling + // spawn.mapRect(450, -820, 50, 25); //edge shelf ceiling // spawn.bodyRect(1540, -1110, 300, 25, 0.9); + + setTimeout(() => { simulation.makeTextLog(`test`) }, 3000); + + + }, testing() { const button = level.button(200, -700) @@ -4495,6 +4512,13 @@ const level = { ctx.fillRect(this.min.x, this.min.y, this.width, this.height) } }, + drawTides() { + if (this.isOn) { + ctx.fillStyle = color + const offset = 10 * Math.sin(simulation.cycle * 0.015) + ctx.fillRect(this.min.x, this.min.y + offset, this.width, this.height - offset) + } + }, level(isFill) { if (!mech.isBodiesAsleep) { const growSpeed = 1 diff --git a/js/lore.js b/js/lore.js new file mode 100644 index 0000000..cb57bb1 --- /dev/null +++ b/js/lore.js @@ -0,0 +1,34 @@ +const lore = { + + dialogue: [ + ``, + ``, + ], + ending() { + + } +} +/* ending outline + if no cheats + after final boss is cleared, player enters a level with no mobs + level maybe has some environmental damage, so player has an option to die at any time + player can see text output between two colors of text strings (scientists) + audio.ambient(current time and date)
"text" + player reads a conversation between the two colors of text + first time win on east or normal they talk about: + how many runs the player has done + they guess why + player is asked to stand on an in game button to enable the vocoder + they reveal the player is running simulations, and it isn't real + they ask the player to communicate + jump twice if you understand + they ask the player to enter console commands + give ammo or tech or something + They tell the play a console command to permanently enable custom and testing mode (in local storage) + players can use this command in the future to enable custom and testing without beating the game even if local storage is wiped + they then tell the player the command to increase the difficulty and the command to restart the game. + If you win on hard or why: + they give the player and option to exit the simulation and entre the real world + simulation.exit() + This wipes all local storage, and closes the browser tab +*/ \ No newline at end of file diff --git a/js/spawn.js b/js/spawn.js index 428cd7b..b74dca5 100644 --- a/js/spawn.js +++ b/js/spawn.js @@ -105,7 +105,15 @@ const spawn = { //set game to the next highest difficulty level if not on why if (simulation.difficultyMode < 6) { - simulation.difficultyMode++ + if (simulation.difficultyMode === 0) { + simulation.difficultyMode = 1 + } else if (simulation.difficultyMode === 1) { + simulation.difficultyMode = 2 + } else if (simulation.difficultyMode === 2) { + simulation.difficultyMode = 4 + } else { + simulation.difficultyMode = 6 + } document.getElementById("difficulty-select").value = simulation.difficultyMode localSettings.difficultyMode = simulation.difficultyMode localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage diff --git a/todo.txt b/todo.txt index 379c4b8..1f40ffc 100644 --- a/todo.txt +++ b/todo.txt @@ -1,8 +1,6 @@ ******************************************************** NEXT PATCH ******************************************************** -beating the final boss automatically increases the difficulty mode for this run and future runs -some foam balancing, mostly buffs -standing wave harmonics gets 15% harm reduction again + ******************************************************** BUGS ******************************************************** @@ -23,6 +21,17 @@ CPT check for crouch after rewind ******************************************************** TODO ******************************************************** +bot that follows the players history + could have the same shape as the mech circle head + 1st bot is at 5s, 2nd is at 4.5s, ... + bots don't get too close to player + run smoothing on position update, don't update if close to player, based on ordering + effect: (one of these can be the upgrade effect) + give player energy overfill + AOE damage to mobs + push away mobs + wen close to player: damage bonus damage reduction + tech: dodge chance for cloaking, harmonic fields, also pilot wave 20% chance up to 3 stacks, not additive 0.8^count @@ -33,7 +42,7 @@ rename health > integrity, unity heal > also integrity, unity level > world? - reroll > resample, reset, retry, remeasure + reroll > research in game console set highlighting rules @@ -141,15 +150,6 @@ bullet mechanic - a bullet that swims through the air in custom make a top bar that is fixed use media rules to make the layout look nice -bot that follows the players history - 1st bot is at 5s, 2nd is at 4.5s, ... - bots don't get too close to player - run smoothing on position update, don't update if close to player, based on ordering - effect: - give player energy overfill - damage mobs on contact - damage bonus damage reduction push away mobs - 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