buffs to cloak

This commit is contained in:
landgreen
2020-09-19 19:26:29 -07:00
parent f334372281
commit 33fa0898fb
5 changed files with 22 additions and 18 deletions

View File

@@ -1690,7 +1690,7 @@ const mech = {
mech.grabPowerUp();
mech.lookForPickUp(180);
const DRAIN = 0.001
const DRAIN = 0.0008
if (mech.energy > DRAIN) {
mech.energy -= DRAIN;
if (mech.energy < DRAIN) {
@@ -1768,13 +1768,14 @@ const mech = {
},
{
name: "metamaterial cloaking", //"weak photonic coupling" "electromagnetically induced transparency" "optical non-coupling" "slow light field" "electro-optic transparency"
description: "<strong class='color-cloaked'>cloak</strong> after not using your gun or field<br>while <strong class='color-cloaked'>cloaked</strong> mobs can't see you<br>increase <strong class='color-d'>damage</strong> by <strong>33%</strong>",
description: "<strong class='color-cloaked'>cloak</strong> after not using your gun or field<br>while <strong class='color-cloaked'>cloaked</strong> mobs can't see you<br>increase <strong class='color-d'>damage</strong> by <strong>66%</strong>",
effect: () => {
mech.fieldFire = true;
mech.fieldMeterColor = "#fff";
mech.fieldPhase = 0;
mech.isCloak = false
mech.fieldDamage = 1.33
mech.fieldDamage = 1.66
const drawRadius = 900
mech.hold = function () {
if (mech.isHolding) {
@@ -1805,7 +1806,7 @@ const mech = {
ctx.fillStyle = "#000"
ctx.fill();
for (let i = 0, len = mob.length; i < len; ++i) {
if (Vector.magnitude(Vector.sub(mob[i].position, mech.pos)) < 850) {
if (Vector.magnitude(Vector.sub(mob[i].position, mech.pos)) < drawRadius) {
mobs.statusStun(mob[i], 120)
}
}
@@ -1833,7 +1834,7 @@ const mech = {
}
if (mech.isCloak) {
this.fieldRange = this.fieldRange * 0.9 + 0.1 * 800
this.fieldRange = this.fieldRange * 0.9 + 0.1 * drawRadius
drawField(this.fieldRange)
} else {
if (this.fieldRange < 3000) {
@@ -2113,7 +2114,7 @@ const mech = {
for (let i = 0, len = body.length; i < len; ++i) {
if (Vector.magnitude(Vector.sub(body[i].position, mech.fieldPosition)) < mech.fieldRadius && !body[i].isNotHoldable) {
const DRAIN = speed * body[i].mass * 0.000015
const DRAIN = speed * body[i].mass * 0.000013
if (mech.energy > DRAIN) {
mech.energy -= DRAIN;
Matter.Body.setVelocity(body[i], velocity); //give block mouse velocity