diff --git a/js/bullet.js b/js/bullet.js
index 887c5d2..01b1056 100644
--- a/js/bullet.js
+++ b/js/bullet.js
@@ -7,7 +7,9 @@ const b = {
inventoryGun: 0,
inventory: [], //list of what guns player has // 0 starts with basic gun
setFireMethod() {
- if (tech.isFireNotMove) {
+ if (tech.isFireMoveLock) {
+ b.fire = b.fireFloat
+ } else if (tech.isFireNotMove) {
b.fire = b.fireNotMove
} else {
b.fire = b.fireNormal
@@ -75,6 +77,45 @@ const b = {
if (mech.holdingTarget) mech.drop();
}
},
+ fireFloat() {
+ //added && player.speed < 0.5 && mech.onGround *************************
+ if (input.fire && (!input.field || mech.fieldFire) && b.inventory.length) {
+ if (mech.fireCDcycle < mech.cycle) {
+ if (b.guns[b.activeGun].ammo > 0) {
+ b.guns[b.activeGun].fire();
+ if (tech.isCrouchAmmo && mech.crouch) {
+ if (tech.isCrouchAmmo % 2) {
+ b.guns[b.activeGun].ammo--;
+ simulation.updateGunHUD();
+ }
+ tech.isCrouchAmmo++ //makes the no ammo toggle off and on
+ } else {
+ b.guns[b.activeGun].ammo--;
+ simulation.updateGunHUD();
+ }
+ } else {
+ if (tech.isAmmoFromHealth) {
+ if (mech.health > 0.05) {
+ mech.damage(0.05 / mech.harmReduction()); // /mech.harmReduction() undoes damage increase from difficulty
+ if (!(tech.isRewindAvoidDeath && mech.energy > 0.66)) { //don't give ammo if CPT triggered
+ for (let i = 0; i < 3; i++) powerUps.spawn(mech.pos.x, mech.pos.y, "ammo");
+ }
+ }
+ } else {
+ simulation.makeTextLog(`${b.guns[b.activeGun].name}.ammo: 0`);
+ }
+ mech.fireCDcycle = mech.cycle + 30; //fire cooldown
+ }
+ if (mech.holdingTarget) mech.drop();
+ }
+ Matter.Body.setVelocity(player, {
+ x: 0,
+ y: -55 * player.mass * simulation.g //undo gravity before it is added
+ });
+ player.force.x = 0
+ player.force.y = 0
+ }
+ },
giveGuns(gun = "random", ammoPacks = 10) {
if (tech.isOneGun) b.removeAllGuns();
if (gun === "random") {
diff --git a/js/mob.js b/js/mob.js
index faa2f3d..da8eef1 100644
--- a/js/mob.js
+++ b/js/mob.js
@@ -1005,10 +1005,8 @@ const mobs = {
if (this.shield) dmg *= 0.075
//energy and heal drain should be calculated after damage boosts
- if (tech.energySiphon && dmg !== Infinity && this.dropPowerUp) {
- mech.energy += Math.min(this.health, dmg) * tech.energySiphon
- // if (mech.energy > mech.maxEnergy) mech.energy = mech.maxEnergy
- }
+ if (tech.energySiphon && dmg !== Infinity && this.dropPowerUp) mech.energy += Math.min(this.health, dmg) * tech.energySiphon
+
if (tech.healthDrain && dmg !== Infinity && this.dropPowerUp) {
mech.addHealth(Math.min(this.health, dmg) * tech.healthDrain)
if (mech.health > mech.maxHealth) mech.health = mech.maxHealth
diff --git a/js/player.js b/js/player.js
index 527bc80..61484a4 100644
--- a/js/player.js
+++ b/js/player.js
@@ -502,7 +502,7 @@ const mech = {
if (tech.isNoFireDefense && mech.cycle > mech.fireCDcycle + 120) dmg *= 0.6
if (tech.energyRegen === 0) dmg *= 0.4
if (tech.isTurret && mech.crouch) dmg *= 0.5;
- if (tech.isRestHarm && player.speed < 1) dmg *= 0.5;
+ if (tech.isFireMoveLock && input.fire) dmg *= 0.4;
if (tech.isEntanglement && b.inventory[0] === b.activeGun) {
for (let i = 0, len = b.inventory.length; i < len; i++) dmg *= 0.87 // 1 - 0.15
}
@@ -789,7 +789,7 @@ const mech = {
//draw body
ctx.save();
- ctx.globalAlpha = (mech.immuneCycle < mech.cycle) ? 1 : 0.7
+ ctx.globalAlpha = (mech.immuneCycle < mech.cycle) ? 1 : 0.5
ctx.translate(mech.pos.x, mech.pos.y);
mech.calcLeg(Math.PI, -3);
mech.drawLeg("#4a4a4a");
diff --git a/js/tech.js b/js/tech.js
index 924014c..e7813ff 100644
--- a/js/tech.js
+++ b/js/tech.js
@@ -363,21 +363,93 @@ const tech = {
}
},
{
- name: "Galilean group",
- description: "reduce harm by 50% when at rest",
+ name: "Higgs mechanism",
+ description: "movement isn't possible while firing
reduce harm by 60% when firing",
maxCount: 1,
count: 0,
allowed() {
- return tech.isFireNotMove
+ return true
},
- requires: "inertial frame",
- effect() {
- tech.isRestHarm = true
+ requires: "",
+ effect: () => {
+ tech.isFireMoveLock = true;
+ b.setFireMethod();
},
remove() {
- tech.isRestHarm = false;
+ if (tech.isFireMoveLock) {
+ tech.isFireMoveLock = false
+ b.setFireMethod();
+ }
}
},
+ {
+ name: "squirrel-cage rotor",
+ description: "move and jump about 25% faster",
+ maxCount: 9,
+ count: 0,
+ allowed() {
+ return true
+ },
+ requires: "",
+ effect() { // good with melee builds, content skipping builds
+ tech.squirrelFx += 0.2;
+ tech.squirrelJump += 0.09;
+ mech.setMovement()
+ },
+ remove() {
+ tech.squirrelFx = 1;
+ tech.squirrelJump = 1;
+ mech.setMovement()
+ }
+ },
+ {
+ name: "Newton's 1st law",
+ description: "moving at high speeds reduces harm
by up to 50%",
+ maxCount: 1,
+ count: 0,
+ allowed() {
+ return mech.Fx > 0.016 && !tech.isEnergyHealth
+ },
+ requires: "speed increase, not mass-energy equivalence",
+ effect() {
+ tech.isSpeedHarm = true
+ },
+ remove() {
+ tech.isSpeedHarm = false
+ }
+ },
+ {
+ name: "Newton's 2nd law",
+ description: "moving at high speeds increases damage
by up to 33%",
+ maxCount: 1,
+ count: 0,
+ allowed() {
+ return mech.Fx > 0.016
+ },
+ requires: "speed increase",
+ effect() {
+ tech.isSpeedDamage = true
+ },
+ remove() {
+ tech.isSpeedDamage = false
+ }
+ },
+ // {
+ // name: "Galilean group",
+ // description: "reduce harm by 50% when at rest",
+ // maxCount: 1,
+ // count: 0,
+ // allowed() {
+ // return tech.isFireNotMove || tech.isFireMoveLock
+ // },
+ // requires: "inertial frame or Higgs mechanism",
+ // effect() {
+ // tech.isRestHarm = true
+ // },
+ // remove() {
+ // tech.isRestHarm = false;
+ // }
+ // },
{
name: "kinetic bombardment",
description: "increase damage by up to 33%
at a distance of 40 steps from the target",
@@ -914,58 +986,6 @@ const tech = {
},
remove() {}
},
- {
- name: "squirrel-cage rotor",
- description: "move and jump about 25% faster",
- maxCount: 9,
- count: 0,
- allowed() {
- return true
- },
- requires: "",
- effect() { // good with melee builds, content skipping builds
- tech.squirrelFx += 0.2;
- tech.squirrelJump += 0.09;
- mech.setMovement()
- },
- remove() {
- tech.squirrelFx = 1;
- tech.squirrelJump = 1;
- mech.setMovement()
- }
- },
- {
- name: "Newton's 1st law",
- description: "moving at high speeds reduces harm
by up to 50%",
- maxCount: 1,
- count: 0,
- allowed() {
- return mech.Fx > 0.016 && !tech.isEnergyHealth
- },
- requires: "speed increase, not mass-energy equivalence",
- effect() {
- tech.isSpeedHarm = true
- },
- remove() {
- tech.isSpeedHarm = false
- }
- },
- {
- name: "Newton's 2nd law",
- description: "moving at high speeds increases damage
by up to 33%",
- maxCount: 1,
- count: 0,
- allowed() {
- return mech.Fx > 0.016
- },
- requires: "speed increase",
- effect() {
- tech.isSpeedDamage = true
- },
- remove() {
- tech.isSpeedDamage = false
- }
- },
{
name: "mass driver",
description: "increase block collision damage by 100%
charge throws more quickly for less energy",
@@ -4113,5 +4133,6 @@ const tech = {
cyclicImmunity: null,
isTechDamage: null,
isFireNotMove: null,
- isRestHarm: null
+ isRestHarm: null,
+ isFireMoveLock: null
}
\ No newline at end of file
diff --git a/todo.txt b/todo.txt
index 8c6f6e5..871c13f 100644
--- a/todo.txt
+++ b/todo.txt
@@ -1,13 +1,10 @@
******************************************************** NEXT PATCH ********************************************************
-health background finally updates to show max health changes
+tech: Higgs mechanism - you can't move when firing, reduce harm by 60% when firing
+ removed Galilean group
+
+damage immunity graphic is more obvious
-tech: rest frame is removed
-tech: inertial frame - gain 66% fire rate, but you can't fire when moving
-tech: dead reckoning - when at rest do 33% more damage
- requires inertial frame
-tech: Galilean group - when at rest take 50% less harm
- requires inertial frame
******************************************************** BUGS ********************************************************
CPT check for crouch after rewind
@@ -27,6 +24,11 @@ CPT check for crouch after rewind
******************************************************** TODO ********************************************************
+tech: nail gun no longer ramps up in speed, nail gun fires slugs (like the shotgun)
+
+tech: you are unable to move while firing
+ float in mid air
+
tech: can't fire while moving, get attack speed and damage
bot that follows the players history