From 2c30382093557218f3537bb453c0a2470cc86d92 Mon Sep 17 00:00:00 2001 From: landgreen Date: Thu, 31 Dec 2020 09:49:07 -0800 Subject: [PATCH] foam fractionation foam dissipates a bit faster, has less ammo, and does 60% more damage per second tech: foam fractionation - foam is 100% bigger when you are below 200 ammo difficulty now increases linearly, even after beating the final boss --- .DS_Store | Bin 6148 -> 6148 bytes js/bullet.js | 23 ++++++++++++----------- js/level.js | 4 ++-- js/player.js | 2 +- js/spawn.js | 2 +- js/tech.js | 32 +++++++++++++++++++++++++------- todo.txt | 25 ++++++++----------------- 7 files changed, 49 insertions(+), 39 deletions(-) diff --git a/.DS_Store b/.DS_Store index 51d2d37916d281a3aad6e2abaae3211bc42f4dd9..78b23e5a1c5926f02b6f77fa06e243d8dc49b4aa 100644 GIT binary patch delta 95 zcmZoMXffEJ$s8oWUChA1z{HTnP@J3Z;*yk;p9JJ{wESEhzWwweM}%AoPPu{%!{Frn R+ybCl1_ptE&DG4EA^;fi8#w>~ delta 95 zcmZoMXffEJ$sEM*d6j{Ifr%lDp*T0+#U&{xKMBa^sBZmY8EbXO5h0g?Q?4MxFgQ6s Rw*aV?fq{R+=4$3n5dhsl8NC1i diff --git a/js/bullet.js b/js/bullet.js index fd41476..4f999fd 100644 --- a/js/bullet.js +++ b/js/bullet.js @@ -1771,13 +1771,14 @@ const b = { const me = bullet.length; bullet[me] = Bodies.polygon(position.x, position.y, 20, radius, { // angle: 0, - density: 0.00005, // 0.001 is normal density + density: 0.000001, // 0.001 is normal density inertia: Infinity, frictionAir: 0.003, // friction: 0.2, // restitution: 0.2, - dmg: tech.isFastFoam ? 0.02 : 0.0055, //damage done in addition to the damage from momentum - scale: 1 - 0.005 / tech.isBulletsLastLonger * (tech.isFastFoam ? 1.6 : 1), + dmg: 0, //damage on impact + damage: tech.isFastFoam ? 0.048 : 0.012, //damage done over time + scale: 1 - 0.006 / tech.isBulletsLastLonger * (tech.isFastFoam ? 1.6 : 1), classType: "bullet", collisionFilter: { category: cat.bullet, @@ -1847,13 +1848,13 @@ const b = { // Matter.Body.setAngularVelocity(this.target, this.target.angularVelocity * 0.9) if (this.target.isShielded) { - this.target.damage(b.dmgScale * this.dmg, true); //shield damage bypass + this.target.damage(b.dmgScale * this.damage, true); //shield damage bypass //shrink if mob is shielded - const SCALE = 1 - 0.018 / tech.isBulletsLastLonger + const SCALE = 1 - 0.014 / tech.isBulletsLastLonger Matter.Body.scale(this, SCALE, SCALE); this.radius *= SCALE; } else { - this.target.damage(b.dmgScale * this.dmg); + this.target.damage(b.dmgScale * this.damage); } } else if (this.target !== null) { //look for a new target this.target = null @@ -3303,7 +3304,7 @@ const b = { classType: "bullet", collisionFilter: { category: cat.bullet, - mask: cat.map | cat.body | cat.mob | cat.mobBullet | cat.mobShield | cat.bullet + mask: cat.map | cat.body | cat.mob | cat.mobBullet | cat.mobShield }, beforeDmg() {}, onEnd() { @@ -3362,7 +3363,7 @@ const b = { // bullet[me].endCycle = simulation.cycle + 480 // bullet[me].do = bullet[me].laserSpin // bullet[me].isArmed = true - // // Matter.Body.setAngularVelocity(bullet[me], 3000 * bullet[me].torqueMagnitude); + // Matter.Body.setAngularVelocity(bullet[me], 3000 * bullet[me].torqueMagnitude); // } let speed = mech.crouch ? 50 : 20 Matter.Body.setVelocity(bullet[me], { @@ -3554,17 +3555,17 @@ const b = { name: "foam", description: "spray bubbly foam that sticks to mobs
slows mobs and does damage over time", ammo: 0, - ammoPack: 40, + ammoPack: 30, have: false, fire() { mech.fireCDcycle = mech.cycle + Math.floor((mech.crouch ? 20 : 6) * b.fireCD); // cool down - const radius = (mech.crouch ? 10 + 7 * Math.random() : 4 + 6 * Math.random()) + const radius = (mech.crouch ? 10 + 5 * Math.random() : 4 + 6 * Math.random()) + (tech.isAmmoFoamSize && this.ammo < 200) * 9 const dir = mech.angle + 0.2 * (Math.random() - 0.5) const position = { x: mech.pos.x + 30 * Math.cos(mech.angle), y: mech.pos.y + 30 * Math.sin(mech.angle) } - const SPEED = 21 - radius * 0.7; //(mech.crouch ? 32 : 20) - radius * 0.7; + const SPEED = 19 - radius * 0.5; const velocity = { x: SPEED * Math.cos(dir), y: SPEED * Math.sin(dir) diff --git a/js/level.js b/js/level.js index b17ee16..bc6bf78 100644 --- a/js/level.js +++ b/js/level.js @@ -17,9 +17,9 @@ const level = { // simulation.zoomScale = 1000; // simulation.setZoom(); // mech.setField("plasma torch") - // b.giveGuns("mine") + // b.giveGuns("foam") // tech.isMineSentry = true - // tech.giveTech("CPT reversal") + // tech.giveTech("foam fractionation") // tech.giveTech("missile-bot") // tech.giveTech("nail-bot") // for (let i = 0; i < 15; i++) tech.giveTech("plasma jet") diff --git a/js/player.js b/js/player.js index dbfd4cd..edd2051 100644 --- a/js/player.js +++ b/js/player.js @@ -1627,7 +1627,7 @@ const mech = { if (tech.isFreezeMobs) { const ICE_DRAIN = 0.0005 for (let i = 0, len = mob.length; i < len; i++) { - if (mob[i].distanceToPlayer() + mob[i].radius < this.fieldDrawRadius && !mob[i].shield && !mob[i].isShielded) { + if (((mob[i].distanceToPlayer() + mob[i].radius) < this.fieldDrawRadius) && !mob[i].shield && !mob[i].isShielded) { if (mech.energy > ICE_DRAIN * 2) { mech.energy -= ICE_DRAIN; this.fieldDrawRadius -= 2; diff --git a/js/spawn.js b/js/spawn.js index 46ff47f..9fd4ca6 100644 --- a/js/spawn.js +++ b/js/spawn.js @@ -102,7 +102,7 @@ const spawn = { level.exit.x = 5500; level.exit.y = -330; //ramp up damage - for (let i = 0; i < 4; i++) level.difficultyIncrease(simulation.difficultyMode) + for (let i = 0; i < 2; i++) level.difficultyIncrease(simulation.difficultyMode) //pull in particles diff --git a/js/tech.js b/js/tech.js index a075594..5a643ae 100644 --- a/js/tech.js +++ b/js/tech.js @@ -1985,7 +1985,7 @@ const tech = { } }, { - name: "Lorentzian topology", + name: "anti-shear topology", description: "some bullets last 30% longer
drones, spores, missiles, foam, wave, ice IX, neutron", isGunTech: true, maxCount: 3, @@ -2832,7 +2832,7 @@ const tech = { }, { name: "necrophoresis", - description: "foam bullets grow and split into 3 copies
when the mob they are stuck to dies", + description: "foam bubbles grow and split into 3 copies
when the mob they are stuck to dies", isGunTech: true, maxCount: 1, count: 0, @@ -2849,7 +2849,7 @@ const tech = { }, { name: "colloidal foam", - description: "increase foam damage by 366%
foam dissipates 40% faster", + description: "foam bubbles dissipate 40% faster
increase foam damage per second by 300%", isGunTech: true, maxCount: 1, count: 0, @@ -2864,6 +2864,23 @@ const tech = { tech.isFastFoam = false; } }, + { + name: "foam fractionation", + description: "foam gun bubbles are 100% larger
when you have below 200 ammo", + isGunTech: true, + maxCount: 1, + count: 0, + allowed() { + return tech.haveGunCheck("foam") || tech.foamBotCount > 2 + }, + requires: "foam", + effect() { + tech.isAmmoFoamSize = true + }, + remove() { + tech.isAmmoFoamSize = false; + } + }, // { // name: "foam size", // description: "increase foam damage by 200%
foam dissipates 50% faster", @@ -3064,7 +3081,7 @@ const tech = { }, { name: "slow light propagation", - description: "", + description: "laser beam is spread into your recent past
increase total beam damage by 300%", isGunTech: true, maxCount: 9, count: 0, @@ -3073,14 +3090,14 @@ const tech = { }, requires: "laser, not specular reflection
not diffraction grating", effect() { - this.description = `add 5 more laser beams into into your past` + // this.description = `add 5 more laser beams into into your past` tech.historyLaser++ for (i = 0, len = b.guns.length; i < len; i++) { //find which gun if (b.guns[i].name === "laser") b.guns[i].chooseFireMethod() } }, remove() { - this.description = "laser beam is spread into your recent past
increase total beam damage by 300%" + // this.description = "laser beam is spread into your recent past
increase total beam damage by 300%" tech.historyLaser = 0 for (i = 0, len = b.guns.length; i < len; i++) { //find which gun if (b.guns[i].name === "laser") b.guns[i].chooseFireMethod() @@ -3960,5 +3977,6 @@ const tech = { isEndLevelPowerUp: null, isRewindGun: null, missileSize: null, - isLaserMine: null + isLaserMine: null, + isAmmoFoamSize: null } \ No newline at end of file diff --git a/todo.txt b/todo.txt index 4cb60b3..118b162 100644 --- a/todo.txt +++ b/todo.txt @@ -1,9 +1,15 @@ ******************************************************** NEXT PATCH ******************************************************** -tech: laser-mines - a floating triangle spins around with lasers coming from it's points +foam dissipates a bit faster, has less ammo, and does 60% more damage per second +tech: foam fractionation - foam is 100% bigger when you are below 200 ammo + +difficulty now increases linearly, even after beating the final boss ******************************************************** BUGS ******************************************************** +(once) negative mass field freeze tech doesn't seem to slow down bullets + can't figure out why + CPT check for crouch after rewind (always) make it so that when you are immune to harm you can either jump on mobs or you pass through them @@ -11,18 +17,6 @@ CPT check for crouch after rewind (always) is there a way to check if the player is stuck inside the map or block trigger a short term non-collide if that occurs -(12+ reports) bug - crouch and worm hole? -> crouch locked in - ***try checking the date of the first bug, and then look at what patches came out right before that*** - doesn't occur on my computer? but it does occur on fast computers - you can spoof it with mech.crouch = true in console - players have extra gravity - might be from the short jump code - add in a check every 7 seconds to try and fix it - this fix was added and it is working for some cases - maybe move the fix to once a second? - bug fix - rewrite crouch to not translate the player height, but instead switch between 2 sensors - 2nd bug fix, no reports so far! might be fixed! - (intermittent, but almost every time) bug - capping the fps causes random slow downs, that can be fixed with pause (once) bug - mine spawned one new mine every second @@ -49,11 +43,8 @@ in game console add commands death, max health, max energy, rewind -mine tech: laser mines - mines hover in the air - unlock specular reflection and laser diodes - with tech:sentry the mines spin immediately, and spin 2x times longer? - mechanic: use gun swap as an active ability + this effect is spammable, so it needs a cost or a cooldown ideas? trigger damage immunity for 3 seconds, but drain ammo push away nearby mobs, but drain energy