decorrelation
mod: decorrelation - 2 seconds after you don't use your gun or field get 40% harm reduction mod: anticorrelation - 2 seconds after you don't use your gun or field get 50% damage requires decorrelation
This commit is contained in:
17
js/bullet.js
17
js/bullet.js
@@ -1065,7 +1065,7 @@ const b = {
|
||||
onEnd() {},
|
||||
do() {
|
||||
if (this.lastLookCycle < game.cycle && !mech.isCloak) {
|
||||
this.lastLookCycle = game.cycle + 80 - this.isUpgraded * 50
|
||||
this.lastLookCycle = game.cycle + 80 - this.isUpgraded * 55
|
||||
let target
|
||||
for (let i = 0, len = mob.length; i < len; i++) {
|
||||
const dist = Vector.magnitudeSquared(Vector.sub(this.position, mob[i].position));
|
||||
@@ -1130,7 +1130,7 @@ const b = {
|
||||
const radius = 6 + 7 * Math.random()
|
||||
const SPEED = 29 - radius * 0.5; //(mech.crouch ? 32 : 20) - radius * 0.7;
|
||||
const velocity = Vector.mult(Vector.normalise(Vector.sub(target, this.position)), SPEED)
|
||||
b.foam(this.position, velocity, radius + 9 * this.isUpgraded)
|
||||
b.foam(this.position, velocity, radius + 11 * this.isUpgraded)
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1230,7 +1230,7 @@ const b = {
|
||||
bestVertexDistance = dist
|
||||
}
|
||||
}
|
||||
const dmg = b.dmgScale * (0.06 + 0.075 * this.isUpgraded);
|
||||
const dmg = b.dmgScale * (0.06 + 0.08 * this.isUpgraded);
|
||||
this.lockedOn.damage(dmg);
|
||||
this.lockedOn.locatePlayer();
|
||||
|
||||
@@ -1280,7 +1280,7 @@ const b = {
|
||||
explode: 0,
|
||||
onDmg() {
|
||||
if (this.lockedOn) {
|
||||
const explosionRadius = Math.min(170 + 130 * this.isUpgraded, Vector.magnitude(Vector.sub(this.position, mech.pos)) - 30)
|
||||
const explosionRadius = Math.min(170 + 140 * this.isUpgraded, Vector.magnitude(Vector.sub(this.position, mech.pos)) - 30)
|
||||
if (explosionRadius > 60) {
|
||||
this.explode = explosionRadius
|
||||
//
|
||||
@@ -2575,8 +2575,13 @@ const b = {
|
||||
ammoPack: 14,
|
||||
have: false,
|
||||
fire() {
|
||||
b.drone(mech.crouch ? 45 : 1)
|
||||
mech.fireCDcycle = mech.cycle + Math.floor((mech.crouch ? 13 : 5) * b.fireCD); // cool down
|
||||
if (mech.crouch) {
|
||||
b.drone(45)
|
||||
mech.fireCDcycle = mech.cycle + Math.floor(17 * b.fireCD); // cool down
|
||||
} else {
|
||||
b.drone(1)
|
||||
mech.fireCDcycle = mech.cycle + Math.floor(10 * b.fireCD); // cool down
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
53
js/mods.js
53
js/mods.js
@@ -94,6 +94,7 @@ const mod = {
|
||||
if (mod.isDamageFromBulletCount) dmg *= 1 + bullet.length * 0.0038
|
||||
if (mod.isRerollDamage) dmg *= 1 + 0.05 * powerUps.reroll.rerolls
|
||||
if (mod.isOneGun && b.inventory.length < 2) dmg *= 1.25
|
||||
if (mod.isNoFireDamage && mech.cycle > mech.fireCDcycle + 120) dmg *= 1.5
|
||||
return dmg * mod.slowFire * mod.aimDamage
|
||||
},
|
||||
totalBots() {
|
||||
@@ -502,7 +503,7 @@ const mod = {
|
||||
},
|
||||
{
|
||||
name: "nail-bot upgrade",
|
||||
description: "<strong>100%</strong> increased nail-bot <strong> fire rate</strong><br><em>applies to all current and future nail-bots</em>",
|
||||
description: "<strong>125%</strong> increased <strong> fire rate</strong><br><em>applies to all current and future nail-bots</em>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
@@ -541,7 +542,7 @@ const mod = {
|
||||
},
|
||||
{
|
||||
name: "foam-bot upgrade",
|
||||
description: "<strong>100%</strong> increased foam-bot <strong>foam size</strong><br><em>applies to all current and future foam-bots</em>",
|
||||
description: "<strong>125%</strong> increased <strong>foam size</strong><br><em>applies to all current and future foam-bots</em>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
@@ -580,7 +581,7 @@ const mod = {
|
||||
},
|
||||
{
|
||||
name: "boom-bot upgrade",
|
||||
description: "<strong>100%</strong> increased boom-bot <strong class='color-e'>explosion</strong> size<br><em>applies to all current and future boom-bots</em>",
|
||||
description: "<strong>125%</strong> increased <strong class='color-e'>explosion</strong> <strong class='color-d'>damage</strong> and size<br><em>applies to all current and future boom-bots</em>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
@@ -619,7 +620,7 @@ const mod = {
|
||||
},
|
||||
{
|
||||
name: "laser-bot upgrade",
|
||||
description: "<strong>100%</strong> increased laser-bot <strong class='color-d'>damage</strong><br><em>applies to all current and future laser-bots</em>",
|
||||
description: "<strong>125%</strong> increased laser <strong class='color-d'>damage</strong><br><em>applies to all current and future laser-bots</em>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
@@ -765,6 +766,38 @@ const mod = {
|
||||
mod.collisionImmuneCycles = 25;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "decorrelation",
|
||||
description: "reduce <strong class='color-harm'>harm</strong> by <strong>40%</strong><br>after not using your <strong class='color-g'>gun</strong> or <strong class='color-f'>field</strong> for <strong>2</strong> seconds",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
return true
|
||||
},
|
||||
requires: "",
|
||||
effect() {
|
||||
mod.isNoFireDefense = true
|
||||
},
|
||||
remove() {
|
||||
mod.isNoFireDefense = false
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "anticorrelation",
|
||||
description: "increase <strong class='color-d'>damage</strong> by <strong>50%</strong><br>after not using your <strong class='color-g'>gun</strong> or <strong class='color-f'>field</strong> for <strong>2</strong> seconds",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
return mod.isNoFireDefense
|
||||
},
|
||||
requires: "full annealing",
|
||||
effect() {
|
||||
mod.isNoFireDamage = true
|
||||
},
|
||||
remove() {
|
||||
mod.isNoFireDamage = false
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "non-Newtonian armor",
|
||||
description: "for <strong>10 seconds</strong> after receiving <strong class='color-harm'>harm</strong><br>reduce <strong class='color-harm'>harm</strong> by <strong>50%</strong>",
|
||||
@@ -895,7 +928,7 @@ const mod = {
|
||||
},
|
||||
{
|
||||
name: "1st ionization energy",
|
||||
description: "each <strong class='color-h'>heal</strong> <strong>power up</strong> you collect<br>increases your <strong>maximum</strong> <strong class='color-f'>energy</strong> by <strong>4%<strong>",
|
||||
description: "each <strong class='color-h'>heal</strong> <strong>power up</strong> you collect<br>increases your <strong>maximum</strong> <strong class='color-f'>energy</strong> by <strong>4%</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
@@ -1298,7 +1331,7 @@ const mod = {
|
||||
},
|
||||
{
|
||||
name: "gun turret",
|
||||
description: "reduce <strong class='color-harm'>harm</strong> by <strong>40%</strong> when <strong>crouching</strong>",
|
||||
description: "reduce <strong class='color-harm'>harm</strong> by <strong>50%</strong> when <strong>crouching</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
@@ -2413,7 +2446,7 @@ const mod = {
|
||||
},
|
||||
{
|
||||
name: "plasma jet",
|
||||
description: "increase <strong>plasma torch's</strong> range by <strong>27%</strong>",
|
||||
description: "increase <strong class='color-plasma'>plasma</strong> <strong>torch's</strong> range by <strong>27%</strong>",
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
allowed() {
|
||||
@@ -2429,7 +2462,7 @@ const mod = {
|
||||
},
|
||||
{
|
||||
name: "plasma-bot",
|
||||
description: "a bot uses <strong class='color-f'>energy</strong> to emit short range <strong>plasma</strong><br>that <strong class='color-d'>damages</strong> and <strong>pushes</strong> mobs",
|
||||
description: "a bot uses <strong class='color-f'>energy</strong> to emit <strong class='color-plasma'>plasma</strong><br>that <strong class='color-d'>damages</strong> and <strong>pushes</strong> mobs",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
@@ -2884,5 +2917,7 @@ const mod = {
|
||||
bonusEnergy: null,
|
||||
healGiveMaxEnergy: null,
|
||||
healMaxEnergyBonus: null,
|
||||
aimDamage: null
|
||||
aimDamage: null,
|
||||
isNoFireDefense: null,
|
||||
isNoFireDamage: null
|
||||
}
|
||||
15
js/player.js
15
js/player.js
@@ -486,8 +486,9 @@ const mech = {
|
||||
if (mod.isHarmReduce && mech.fieldUpgrades[mech.fieldMode].name === "negative mass field" && mech.isFieldActive) dmg *= 0.6
|
||||
if (mod.isBotArmor) dmg *= 0.95 ** mod.totalBots()
|
||||
if (mod.isHarmArmor && mech.lastHarmCycle + 600 > mech.cycle) dmg *= 0.5;
|
||||
if (mod.isNoFireDefense && mech.cycle > mech.fireCDcycle + 120) dmg *= 0.6
|
||||
if (mod.energyRegen === 0) dmg *= 0.5 //0.22 + 0.78 * mech.energy //77% damage reduction at zero energy
|
||||
if (mod.isTurret && mech.crouch) dmg *= 0.6;
|
||||
if (mod.isTurret && mech.crouch) dmg *= 0.5;
|
||||
if (mod.isEntanglement && b.inventory[0] === b.activeGun) {
|
||||
for (let i = 0, len = b.inventory.length; i < len; i++) {
|
||||
dmg *= 0.85 // 1 - 0.15
|
||||
@@ -846,6 +847,7 @@ const mech = {
|
||||
}
|
||||
},
|
||||
holding() {
|
||||
if (mech.fireCDcycle < mech.cycle) mech.fireCDcycle = mech.cycle
|
||||
if (mech.holdingTarget) {
|
||||
mech.energy -= mech.fieldRegen;
|
||||
if (mech.energy < 0) mech.energy = 0;
|
||||
@@ -863,7 +865,7 @@ const mech = {
|
||||
if (mech.holdingTarget) {
|
||||
if (keys[32] || game.mouseDownRight) {
|
||||
if (mech.energy > 0.001) {
|
||||
mech.fireCDcycle = mech.cycle
|
||||
if (mech.fireCDcycle < mech.cycle) mech.fireCDcycle = mech.cycle
|
||||
mech.energy -= 0.001 / mod.throwChargeRate;
|
||||
mech.throwCharge += 0.5 * mod.throwChargeRate / mech.holdingTarget.mass
|
||||
//draw charge
|
||||
@@ -976,6 +978,7 @@ const mech = {
|
||||
ctx.stroke();
|
||||
},
|
||||
grabPowerUp() { //look for power ups to grab with field
|
||||
if (mech.fireCDcycle < mech.cycle) mech.fireCDcycle = mech.cycle
|
||||
for (let i = 0, len = powerUp.length; i < len; ++i) {
|
||||
const dxP = mech.pos.x - powerUp[i].position.x;
|
||||
const dyP = mech.pos.y - powerUp[i].position.y;
|
||||
@@ -1226,7 +1229,7 @@ const mech = {
|
||||
},
|
||||
fieldUpgrades: [{
|
||||
name: "field emitter",
|
||||
description: "use <strong class='color-f'>energy</strong> to <strong>push</strong> mobs away<br><strong>throw</strong> blocks to <strong class='color-d'>damage</strong> mobs<br><strong>pick up</strong> power ups",
|
||||
description: "use <strong class='color-f'>energy</strong> to <strong>block</strong> mobs<br><strong>throw</strong> blocks to <strong class='color-d'>damage</strong> mobs<br><strong>pick up</strong> power ups",
|
||||
effect: () => {
|
||||
game.replaceTextLog = true; //allow text over write
|
||||
mech.hold = function () {
|
||||
@@ -1254,7 +1257,7 @@ const mech = {
|
||||
name: "standing wave harmonics",
|
||||
description: "three oscillating <strong>shields</strong> are permanently active<br><strong>blocking</strong> has no <strong>cool down</strong><br>reduce <strong class='color-harm'>harm</strong> by <strong>20%</strong>",
|
||||
effect: () => {
|
||||
mech.fieldHarmReduction = 0.20;
|
||||
mech.fieldHarmReduction = 0.80;
|
||||
mech.fieldBlockCD = 0;
|
||||
mech.hold = function () {
|
||||
if (mech.isHolding) {
|
||||
@@ -1527,7 +1530,7 @@ const mech = {
|
||||
},
|
||||
{
|
||||
name: "plasma torch",
|
||||
description: "use <strong class='color-f'>energy</strong> to emit short range plasma<br>plasma <strong class='color-d'>damages</strong> mobs<br>plasma <strong>pushes</strong> mobs and blocks away",
|
||||
description: "use <strong class='color-f'>energy</strong> to emit short range <strong class='color-plasma'>plasma</strong><br><strong class='color-d'>damages</strong> mobs<br><strong>pushes</strong> mobs and blocks away",
|
||||
effect() {
|
||||
mech.fieldMeterColor = "#f0f"
|
||||
mech.hold = function () {
|
||||
@@ -1790,11 +1793,9 @@ const mech = {
|
||||
mech.drawHold(mech.holdingTarget);
|
||||
mech.holding();
|
||||
mech.throwBlock();
|
||||
if (mech.fireCDcycle < mech.cycle) mech.fireCDcycle = mech.cycle //to disable cloak
|
||||
} else if ((keys[32] || game.mouseDownRight && mech.fieldCDcycle < mech.cycle)) { //not hold and field button is pressed
|
||||
mech.grabPowerUp();
|
||||
mech.lookForPickUp();
|
||||
if (mech.fireCDcycle < mech.cycle) mech.fireCDcycle = mech.cycle //to disable cloak
|
||||
} else if (mech.holdingTarget && mech.fieldCDcycle < mech.cycle) { //holding target exists, and field button is not pressed
|
||||
mech.pickUp();
|
||||
} else {
|
||||
|
||||
@@ -233,7 +233,7 @@ const spawn = {
|
||||
me.isBoss = true;
|
||||
me.frictionAir = 0.025
|
||||
me.seeAtDistance2 = 9000000;
|
||||
me.accelMag = 0.0006 * game.accelScale;
|
||||
me.accelMag = 0.0005 * game.accelScale;
|
||||
Matter.Body.setDensity(me, 0.002); //normal is 0.001
|
||||
me.collisionFilter.mask = cat.bullet | cat.player
|
||||
me.memory = Infinity;
|
||||
|
||||
11
style.css
11
style.css
@@ -469,6 +469,17 @@ em {
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.color-plasma {
|
||||
/* opacity: 0.5; */
|
||||
color: #c0e;
|
||||
/* color: #000; */
|
||||
letter-spacing: 1px;
|
||||
background-color: rgba(132, 0, 255, 0.04);
|
||||
padding: 2px;
|
||||
border-radius: 4px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
|
||||
.color-harm {
|
||||
/* color: */
|
||||
/* text-shadow: #FC0 1px 0 10px; */
|
||||
|
||||
20
todo.txt
20
todo.txt
@@ -1,8 +1,8 @@
|
||||
mod: ionization energy - heal power ups give you 4% max energy
|
||||
requires mass-energy equivalence
|
||||
mod: decorrelation - 2 seconds after you don't use your gun or field get 40% harm reduction
|
||||
|
||||
mod: anticorrelation - 2 seconds after you don't use your gun or field get 50% damage
|
||||
requires decorrelation
|
||||
|
||||
mod: discrete optimization - 50% damage and 50% slow fire rotates
|
||||
requires cloaking field
|
||||
|
||||
************** TODO - n-gon **************
|
||||
|
||||
@@ -12,8 +12,6 @@ getting stuck above a mob can immobilize player
|
||||
add a knock to player mob collisions even while player is immune to damage
|
||||
keep the knock very small
|
||||
|
||||
Mod to buff mass-energy-equivalence (maybe take no damage some % and do that dmb to a mob)
|
||||
|
||||
bug - mine spawned one new mine every second
|
||||
after sticking to the top right corner of a wall
|
||||
notes: had only gun mine, mod mine reclamation, field plasma,
|
||||
@@ -33,16 +31,6 @@ add some more computer / AI stuff to the level lore text
|
||||
|
||||
mod - mines stun targets nearby when they explode
|
||||
|
||||
cloaking field mods
|
||||
much longer delay in firing, but a very large bonus
|
||||
larger vision
|
||||
return to stealth faster
|
||||
+damage to nearby mobs
|
||||
+damage to unaware mobs (code for this doesn't seem to work)
|
||||
|
||||
mod - negative mass field intangibility
|
||||
doesn't seem that interesting
|
||||
|
||||
mod - do something for 2 seconds after firing
|
||||
if (mech.fireCDcycle + 120)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user