diff --git a/js/bullets.js b/js/bullets.js index 12ce330..2ab9ab7 100644 --- a/js/bullets.js +++ b/js/bullets.js @@ -102,7 +102,7 @@ const b = { }, { name: "ceramic plating", - description: "protection from to high temperatures
5x less damage from explosions, lasers", + description: "protection from to high temperatures
5x less damage from explosions and lasers", have: false, //5 effect: () => { b.isModTempResist = true; //good for guns with explosions @@ -174,7 +174,7 @@ const b = { }, { name: "Gauss rifle", - description: "launch blocks at much higher speeds
carry more massive blocks", + description: "launch blocks at much higher speeds
hold onto larger blocks even after getting hit", have: false, //14 effect: () => { // good with guns that run out of ammo mech.throwChargeRate = 4; @@ -398,7 +398,7 @@ const b = { }, explode(me) { // typically explode is used for some bullets with .onEnd - const radius = bullet[me].explodeRad * b.modExplosionRadius + let radius = bullet[me].explodeRad * b.modExplosionRadius //add dmg to draw queue game.drawList.push({ x: bullet[me].position.x, @@ -482,7 +482,8 @@ const b = { knock = Matter.Vector.mult(Matter.Vector.normalise(sub), (-Math.sqrt(dmg * damageScale) * mob[i].mass) / 18); mob[i].force.x += knock.x; mob[i].force.y += knock.y; - damageScale *= 0.8 //reduced damage for each additional explosion target + radius *= 0.9 //reduced range for each additional explosion target + damageScale *= 0.9 //reduced damage for each additional explosion target } else if (!mob[i].seePlayer.recall && dist < alertRange) { mob[i].locatePlayer(); knock = Matter.Vector.mult(Matter.Vector.normalise(sub), (-Math.sqrt(dmg * damageScale) * mob[i].mass) / 35); @@ -1222,7 +1223,7 @@ const b = { name: "flak", //8 description: "fire a cluster of short range projectiles
explodes on contact or after half a second", ammo: 0, - ammoPack: 20, + ammoPack: 22, have: false, isStarterGun: true, fire() { @@ -1265,7 +1266,7 @@ const b = { name: "grenades", //9 description: "lob a single bouncy projectile
explodes on contact or after one second", ammo: 0, - ammoPack: 9, + ammoPack: 10, have: false, isStarterGun: false, fire() { @@ -1278,9 +1279,10 @@ const b = { bullet[me].totalCycles = 100; bullet[me].endCycle = game.cycle + Math.floor((mech.crouch ? 120 : 60) * b.isModBulletsLastLonger); bullet[me].restitution = 0.5; - bullet[me].explodeRad = 210; + bullet[me].explodeRad = 270; bullet[me].onEnd = b.explode; //makes bullet do explosive damage before despawn bullet[me].minDmgSpeed = 1; + Matter.Body.setDensity(bullet[me], 0.0002); bullet[me].onDmg = function () { this.endCycle = 0; //bullet ends cycle after doing damage //this also triggers explosion }; @@ -1311,6 +1313,7 @@ const b = { bullet[me].inertia = Infinity; //prevents rotation bullet[me].restitution = 0; bullet[me].friction = 1; + Matter.Body.setDensity(bullet[me], 0.0002); bullet[me].explodeRad = 380 + Math.floor(Math.random() * 60); bullet[me].onEnd = b.explode; //makes bullet do explosive damage before despawn @@ -1724,9 +1727,8 @@ const b = { } } - const FIELD_DRAIN = 0.0016 - if (this.lockedOn && this.lockedOn.alive && mech.fieldMeter > FIELD_DRAIN) { //hit target with laser - mech.fieldMeter -= FIELD_DRAIN + if (this.lockedOn && this.lockedOn.alive && mech.fieldMeter > 0.15) { //hit target with laser + mech.fieldMeter -= 0.0016 //make sure you can still see target const DIST = Matter.Vector.magnitude(Matter.Vector.sub(this.vertices[0], this.lockedOn.position)); diff --git a/js/index.js b/js/index.js index 6b5b09d..e83264b 100644 --- a/js/index.js +++ b/js/index.js @@ -187,8 +187,8 @@ document.getElementById("build-button").addEventListener("click", () => { -
- Choose up to five power ups. Once you start, only health and ammo will drop, so pick carefully. +
+ Choose five power ups.
Click start to begin.
` for (let i = 1, len = mech.fieldUpgrades.length; i < len; i++) { text += `
  ${mech.fieldUpgrades[i].name}
${mech.fieldUpgrades[i].description}
` diff --git a/js/player.js b/js/player.js index 384bd27..29184df 100644 --- a/js/player.js +++ b/js/player.js @@ -461,7 +461,7 @@ const mech = { // freeze game and display a full screen red color if (dmg > 0.05) { - this.drop(); //drop block if holding + if (dmg > 0.07 && mech.holdingMassScale > 0.2) this.drop(); //drop block if holding game.fpsCap = 4 //40 - Math.min(25, 100 * dmg) game.fpsInterval = 1000 / game.fpsCap; } else { diff --git a/style.css b/style.css index 4ce042d..155e464 100644 --- a/style.css +++ b/style.css @@ -70,7 +70,7 @@ summary { display: none; /* display: grid; */ - grid-template-columns: repeat(auto-fit, minmax(292px, 1fr)); + grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); grid-auto-rows: minmax(auto, auto); grid-gap: 15px;