negative mass field mod
This commit is contained in:
@@ -57,13 +57,14 @@ const b = {
|
||||
isModFlechetteMultiShot: null,
|
||||
isModMineAmmoBack: null,
|
||||
isModRailNails: null,
|
||||
isModHawking: null,
|
||||
modOnHealthChange() { //used with acid mod
|
||||
if (b.isModAcidDmg && mech.health > 0.8) {
|
||||
game.playerDmgColor = "rgba(0,80,80,0.9)"
|
||||
b.modAcidDmg = 0.9
|
||||
b.modAcidDmg = 1.5
|
||||
} else {
|
||||
game.playerDmgColor = "rgba(0,0,0,0.7)"
|
||||
b.modAcidDmg = 0
|
||||
b.modAcidDmg = 1
|
||||
}
|
||||
},
|
||||
mods: [{
|
||||
@@ -1014,6 +1015,22 @@ const b = {
|
||||
b.isModSporeField = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "hawking radiation",
|
||||
description: "<strong>negative mass field</strong> releases virtual particles that<br><strong class='color-d'>damage</strong> mobs within range",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
allowed() {
|
||||
return mech.fieldUpgrades[mech.fieldMode].name === "negative mass field"
|
||||
},
|
||||
requires: "negative mass field",
|
||||
effect() {
|
||||
b.isModHawking = true;
|
||||
},
|
||||
remove() {
|
||||
b.isModHawking = false;
|
||||
}
|
||||
},
|
||||
],
|
||||
removeMod(index) {
|
||||
b.mods[index].remove();
|
||||
|
||||
@@ -178,6 +178,7 @@ function collisionChecks(event) {
|
||||
if (obj.classType === "bullet" && obj.speed > obj.minDmgSpeed) {
|
||||
// const dmg = b.dmgScale * (obj.dmg + 0.15 * obj.mass * Vector.magnitude(Vector.sub(mob[k].velocity, obj.velocity)));
|
||||
let dmg = b.dmgScale * (obj.dmg + b.modAcidDmg + 0.15 * obj.mass * Vector.magnitude(Vector.sub(mob[k].velocity, obj.velocity)))
|
||||
// console.log(obj.dmg / (0.15 * obj.mass * Vector.magnitude(Vector.sub(mob[k].velocity, obj.velocity))))
|
||||
if (b.isModCrit && !mob[k].seePlayer.recall && !mob[k].shield) dmg *= 5
|
||||
mob[k].foundPlayer();
|
||||
mob[k].damage(dmg);
|
||||
@@ -195,7 +196,7 @@ function collisionChecks(event) {
|
||||
if (obj.classType === "body" && obj.speed > 5) {
|
||||
const v = Vector.magnitude(Vector.sub(mob[k].velocity, obj.velocity));
|
||||
if (v > 8) {
|
||||
let dmg = b.dmgScale * (b.modAcidDmg + v * Math.sqrt(obj.mass) * 0.07);
|
||||
let dmg = b.dmgScale * (v * Math.sqrt(obj.mass) * 0.07);
|
||||
mob[k].damage(dmg, true);
|
||||
if (mob[k].distanceToPlayer2() < 1000000) mob[k].foundPlayer();
|
||||
game.drawList.push({
|
||||
|
||||
@@ -1442,6 +1442,15 @@ const mech = {
|
||||
ctx.globalCompositeOperation = "difference";
|
||||
ctx.fill();
|
||||
ctx.globalCompositeOperation = "source-over";
|
||||
|
||||
if (b.isModHawking) {
|
||||
for (let i = 0, len = mob.length; i < len; i++) {
|
||||
if (Vector.magnitude(Vector.sub(mob[i].position, mech.pos)) < this.fieldDrawRadius) {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
} else {
|
||||
//trigger cool down
|
||||
mech.fieldCDcycle = mech.cycle + 120;
|
||||
|
||||
6
todo.txt
6
todo.txt
@@ -1,5 +1,7 @@
|
||||
************** TODO - n-gon **************
|
||||
|
||||
mod - negative mass field does damage to mobs in zone
|
||||
|
||||
mod - flechettes mod for poison damage
|
||||
other flechettes multi-shot is disabled
|
||||
mod - flechettes are guided towards targets
|
||||
@@ -13,10 +15,6 @@ gun - buff vacuum bomb
|
||||
mod - double explosions?
|
||||
mod - doesn't suck player in?
|
||||
|
||||
mod - negative mass field does damage to mobs in zone
|
||||
|
||||
mod - rail gun burst on impact into nails
|
||||
|
||||
mod - make bodies destroyable
|
||||
they drop ammo and heals
|
||||
|
||||
|
||||
Reference in New Issue
Block a user