From 0a834d87a7cc3e4762b0a8496aafc6778d98f0ba Mon Sep 17 00:00:00 2001 From: landgreen Date: Fri, 4 Oct 2019 19:09:23 -0700 Subject: [PATCH] field balance and graphics --- js/player.js | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/js/player.js b/js/player.js index e192a6a..cca6142 100644 --- a/js/player.js +++ b/js/player.js @@ -497,6 +497,7 @@ const mech = { this.fieldRegen = 0.0015; this.fieldCDcycle = 0; this.isStealth = false; + player.collisionFilter.mask = 0x010011 //0x010011 is normal this.holdingMassScale = 0.5; this.throwChargeRate = 2; this.throwChargeMax = 50; @@ -873,9 +874,6 @@ const mech = { ctx.arc(mech.pos.x, mech.pos.y + 15, mech.grabRange, 0, 2 * Math.PI); ctx.fillStyle = "rgba(255,255,255," + (0.5 + 0.17 * Math.random()) + ")"; ctx.fill(); - ctx.strokeStyle = "#000" - ctx.lineWidth = 2; - ctx.stroke(); function slow(who, friction = 0) { for (let i = 0, len = who.length; i < len; ++i) { @@ -1127,10 +1125,10 @@ const mech = { }, () => { mech.fieldMode = 6; - game.makeTextLog("Dimensional Phasing
(right mouse or space bar)

player can pass through enemies while field is active.
player is invisible while field is active.

", 1200); + game.makeTextLog("Phase Decoherence Field
(right mouse or space bar)

phase through enemies while field is active
can't see or be seen outside field while field is active

", 1200); mech.setHoldDefaults(); // mech.fieldShieldingScale = 3; - // mech.grabRange = 220 + mech.grabRange = 220 mech.hold = function () { mech.isStealth = false //isStealth is checked in mob foundPlayer() @@ -1140,12 +1138,12 @@ const mech = { mech.holding(); mech.throw(); } else if ((keys[32] || game.mouseDownRight) && mech.fieldCDcycle < game.cycle) { - const DRAIN = 0.004 //mech.fieldRegen = 0.0015 + const DRAIN = 0.002 //mech.fieldRegen = 0.0015 if (mech.fieldMeter > DRAIN) { mech.fieldMeter -= DRAIN; mech.isStealth = true //isStealth is checked in mob foundPlayer() - player.collisionFilter.mask = 0x010001 //0x010011 is normals + player.collisionFilter.mask = 0x000001 //0x010011 is normals // if (mech.crouch) { // mech.grabRange = mech.grabRange * 0.96 + 400 * 0.04; @@ -1163,6 +1161,7 @@ const mech = { ctx.lineWidth = 2; ctx.stroke(); + // mech.pushMobs360(150); mech.grabPowerUp(); mech.lookForPickUp();