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
This commit is contained in:
landgreen
2020-12-31 09:49:07 -08:00
parent 491b979d4c
commit 2c30382093
7 changed files with 49 additions and 39 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -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 <strong>sticks</strong> to mobs<br><strong class='color-s'>slows</strong> mobs and does <strong class='color-d'>damage</strong> 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)

View File

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

View File

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

View File

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

View File

@@ -1985,7 +1985,7 @@ const tech = {
}
},
{
name: "Lorentzian topology",
name: "anti-shear topology",
description: "some <strong>bullets</strong> last <strong>30% longer</strong><br><em style = 'font-size: 83%'>drones, spores, missiles, foam, wave, ice IX, neutron</em>",
isGunTech: true,
maxCount: 3,
@@ -2832,7 +2832,7 @@ const tech = {
},
{
name: "necrophoresis",
description: "<strong>foam</strong> bullets grow and split into 3 <strong>copies</strong><br> when the mob they are stuck to <strong>dies</strong>",
description: "<strong>foam</strong> bubbles grow and split into 3 <strong>copies</strong><br> when the mob they are stuck to <strong>dies</strong>",
isGunTech: true,
maxCount: 1,
count: 0,
@@ -2849,7 +2849,7 @@ const tech = {
},
{
name: "colloidal foam",
description: "increase <strong>foam</strong> <strong class='color-d'>damage</strong> by <strong>366%</strong><br><strong>foam</strong> dissipates <strong>40%</strong> faster",
description: "<strong>foam</strong> bubbles dissipate <strong>40%</strong> faster<br>increase <strong>foam</strong> <strong class='color-d'>damage</strong> per second by <strong>300%</strong>",
isGunTech: true,
maxCount: 1,
count: 0,
@@ -2864,6 +2864,23 @@ const tech = {
tech.isFastFoam = false;
}
},
{
name: "foam fractionation",
description: "<strong>foam</strong> gun bubbles are <strong>100%</strong> larger<br>when you have below <strong>200</strong> <strong class='color-g'>ammo</strong>",
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 <strong>foam</strong> <strong class='color-d'>damage</strong> by <strong>200%</strong><br><strong>foam</strong> dissipates <strong>50%</strong> faster",
@@ -3064,7 +3081,7 @@ const tech = {
},
{
name: "slow light propagation",
description: "",
description: "<strong>laser</strong> beam is <strong>spread</strong> into your recent <strong>past</strong><br>increase total beam <strong class='color-d'>damage</strong> by <strong>300%</strong>",
isGunTech: true,
maxCount: 9,
count: 0,
@@ -3073,14 +3090,14 @@ const tech = {
},
requires: "laser, not specular reflection<br>not diffraction grating",
effect() {
this.description = `add 5 more <strong>laser</strong> beams into into your past`
// this.description = `add 5 more <strong>laser</strong> 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 = "<strong>laser</strong> beam is <strong>spread</strong> into your recent <strong>past</strong><br>increase total beam <strong class='color-d'>damage</strong> by <strong>300%</strong>"
// this.description = "<strong>laser</strong> beam is <strong>spread</strong> into your recent <strong>past</strong><br>increase total beam <strong class='color-d'>damage</strong> by <strong>300%</strong>"
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
}

View File

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