diff --git a/index.html b/index.html
index c668ee9..1a1c2ca 100644
--- a/index.html
+++ b/index.html
@@ -94,8 +94,6 @@
-
-
settings
diff --git a/js/bullets.js b/js/bullets.js
index bce930e..813c769 100644
--- a/js/bullets.js
+++ b/js/bullets.js
@@ -1731,7 +1731,7 @@ const b = {
name: "foam", //15
description: "spray bubbly foam that sticks to enemies
does damage over time and slows movement",
ammo: 0,
- ammoPack: 95,
+ ammoPack: 90,
have: false,
isStarterGun: true,
fire() {
@@ -1788,22 +1788,22 @@ const b = {
if (this.count < 17) {
this.count++
//grow
- const SCALE = 1.1
+ const SCALE = 1.08
Matter.Body.scale(this, SCALE, SCALE);
this.radius *= SCALE;
} else {
//shrink
- const SCALE = 1 - 0.006 / b.isModBulletsLastLonger
+ const SCALE = 1 - 0.0035 / b.isModBulletsLastLonger
Matter.Body.scale(this, SCALE, SCALE);
this.radius *= SCALE;
- if (this.radius < 11) this.endCycle = 0;
+ if (this.radius < 14) this.endCycle = 0;
}
if (this.target && this.target.alive) { //if stuck to a target
Matter.Body.setPosition(this, this.target.vertices[this.targetVertex])
Matter.Body.setVelocity(this.target, Matter.Vector.mult(this.target.velocity, 0.94))
Matter.Body.setAngularVelocity(this.target, this.target.angularVelocity * 0.94)
- this.target.damage(b.dmgScale * 0.0025);
+ this.target.damage(b.dmgScale * 0.004);
} else if (this.target !== null) { //look for a new target
this.target = null
this.collisionFilter.category = cat.bullet;
@@ -1813,8 +1813,8 @@ const b = {
}
});
World.add(engine.world, bullet[me]); //add bullet to world
- mech.fireCDcycle = mech.cycle + Math.floor((mech.crouch ? 15 : 4) * b.modFireRate); // cool down
- const SPEED = mech.crouch ? 20 : 14 - RADIUS * 0.25;
+ mech.fireCDcycle = mech.cycle + Math.floor((mech.crouch ? 12 : 4) * b.modFireRate); // cool down
+ const SPEED = mech.crouch ? 22 : 12 - RADIUS * 0.25;
Matter.Body.setVelocity(bullet[me], {
x: SPEED * Math.cos(dir),
y: SPEED * Math.sin(dir)
diff --git a/js/index.js b/js/index.js
index 8778c10..64fdbad 100644
--- a/js/index.js
+++ b/js/index.js
@@ -98,21 +98,6 @@ game mechanics
low friction ground
bouncy ground
-
-// collision info:
- category mask
-powerUp: 0x100000 0x100001
-body: 0x010000 0x011111
-player: 0x001000 0x010011
-bullet: 0x000100 0x010011
-mob: 0x000010 0x011111
-mobBullet: 0x000010 0x011101
-mobShield: 0x000010 0x001100
-map: 0x000001 0x111111
-
-
-
-
*/
//collision groups
// cat.player | cat.map | cat.body | cat.bullet | cat.powerUp | cat.mob | cat.mobBullet | cat.mobShield
diff --git a/js/mobs.js b/js/mobs.js
index 5eb9ebe..fed150d 100644
--- a/js/mobs.js
+++ b/js/mobs.js
@@ -362,9 +362,9 @@ const mobs = {
// hitting player
if (best.who === player) {
if (b.isModTempResist) {
- dmg = 0.0008 * game.dmgScale;
+ dmg = 0.0004 * game.dmgScale;
} else {
- dmg = 0.004 * game.dmgScale;
+ dmg = 0.002 * game.dmgScale;
}
mech.damage(dmg);
diff --git a/js/player.js b/js/player.js
index 86ca9e0..7c26880 100644
--- a/js/player.js
+++ b/js/player.js
@@ -849,31 +849,29 @@ const mech = {
ctx.stroke();
},
grabPowerUp() { //look for power ups to grab with field
- if (mech.fieldCDcycle < mech.cycle) {
- const grabPowerUpRange2 = (mech.grabRange + 220) * (mech.grabRange + 220)
- 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;
- const dist2 = dxP * dxP + dyP * dyP;
- // float towards player if looking at and in range or if very close to player
- if (dist2 < grabPowerUpRange2 && mech.lookingAt(powerUp[i]) || dist2 < 16000) {
- if (dist2 < 5000) { //use power up if it is close enough
- Matter.Body.setVelocity(player, { //player knock back, after grabbing power up
- x: player.velocity.x + ((powerUp[i].velocity.x * powerUp[i].mass) / player.mass) * 0.3,
- y: player.velocity.y + ((powerUp[i].velocity.y * powerUp[i].mass) / player.mass) * 0.3
- });
- mech.usePowerUp(i);
- return;
- }
- mech.fieldMeter -= mech.fieldRegen * 0.5;
- powerUp[i].force.x += 7 * (dxP / dist2) * powerUp[i].mass;
- powerUp[i].force.y += 7 * (dyP / dist2) * powerUp[i].mass - powerUp[i].mass * game.g; //negate gravity
- //extra friction
- Matter.Body.setVelocity(powerUp[i], {
- x: powerUp[i].velocity.x * 0.11,
- y: powerUp[i].velocity.y * 0.11
+ const grabPowerUpRange2 = (mech.grabRange + 220) * (mech.grabRange + 220)
+ 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;
+ const dist2 = dxP * dxP + dyP * dyP;
+ // float towards player if looking at and in range or if very close to player
+ if (dist2 < grabPowerUpRange2 && mech.lookingAt(powerUp[i]) || dist2 < 16000) {
+ if (dist2 < 5000) { //use power up if it is close enough
+ Matter.Body.setVelocity(player, { //player knock back, after grabbing power up
+ x: player.velocity.x + ((powerUp[i].velocity.x * powerUp[i].mass) / player.mass) * 0.3,
+ y: player.velocity.y + ((powerUp[i].velocity.y * powerUp[i].mass) / player.mass) * 0.3
});
+ mech.usePowerUp(i);
+ return;
}
+ mech.fieldMeter -= mech.fieldRegen * 0.5;
+ powerUp[i].force.x += 7 * (dxP / dist2) * powerUp[i].mass;
+ powerUp[i].force.y += 7 * (dyP / dist2) * powerUp[i].mass - powerUp[i].mass * game.g; //negate gravity
+ //extra friction
+ Matter.Body.setVelocity(powerUp[i], {
+ x: powerUp[i].velocity.x * 0.11,
+ y: powerUp[i].velocity.y * 0.11
+ });
}
}
},
@@ -1056,7 +1054,7 @@ const mech = {
mech.drawHold(mech.holdingTarget);
mech.holding();
mech.throw();
- } else if ((keys[32] || game.mouseDownRight && mech.fieldMeter > 0.1 && mech.fieldCDcycle < mech.cycle)) { //not hold but field button is pressed
+ } else if ((keys[32] || game.mouseDownRight && mech.fieldMeter > 0.05 && mech.fieldCDcycle < mech.cycle)) { //not hold but field button is pressed
mech.drawField();
mech.grabPowerUp();
mech.lookForPickUp();
@@ -1402,7 +1400,7 @@ const mech = {
mech.fieldMode = 4;
mech.fieldText();
mech.setHoldDefaults();
- mech.fieldRegen *= 0.5;
+ mech.fieldRegen *= 0.6;
mech.fieldShieldingScale = 1.5;
mech.hold = function () {