Higgs
tech: Higgs mechanism - you can't move when firing, reduce harm by 60% when firing removed Galilean group damage immunity graphic is more obvious
This commit is contained in:
43
js/bullet.js
43
js/bullet.js
@@ -7,7 +7,9 @@ const b = {
|
|||||||
inventoryGun: 0,
|
inventoryGun: 0,
|
||||||
inventory: [], //list of what guns player has // 0 starts with basic gun
|
inventory: [], //list of what guns player has // 0 starts with basic gun
|
||||||
setFireMethod() {
|
setFireMethod() {
|
||||||
if (tech.isFireNotMove) {
|
if (tech.isFireMoveLock) {
|
||||||
|
b.fire = b.fireFloat
|
||||||
|
} else if (tech.isFireNotMove) {
|
||||||
b.fire = b.fireNotMove
|
b.fire = b.fireNotMove
|
||||||
} else {
|
} else {
|
||||||
b.fire = b.fireNormal
|
b.fire = b.fireNormal
|
||||||
@@ -75,6 +77,45 @@ const b = {
|
|||||||
if (mech.holdingTarget) mech.drop();
|
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}.<span class='color-gun'>ammo</span><span class='color-symbol'>:</span> 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) {
|
giveGuns(gun = "random", ammoPacks = 10) {
|
||||||
if (tech.isOneGun) b.removeAllGuns();
|
if (tech.isOneGun) b.removeAllGuns();
|
||||||
if (gun === "random") {
|
if (gun === "random") {
|
||||||
|
|||||||
@@ -1005,10 +1005,8 @@ const mobs = {
|
|||||||
if (this.shield) dmg *= 0.075
|
if (this.shield) dmg *= 0.075
|
||||||
|
|
||||||
//energy and heal drain should be calculated after damage boosts
|
//energy and heal drain should be calculated after damage boosts
|
||||||
if (tech.energySiphon && dmg !== Infinity && this.dropPowerUp) {
|
if (tech.energySiphon && dmg !== Infinity && this.dropPowerUp) mech.energy += Math.min(this.health, dmg) * tech.energySiphon
|
||||||
mech.energy += Math.min(this.health, dmg) * tech.energySiphon
|
|
||||||
// if (mech.energy > mech.maxEnergy) mech.energy = mech.maxEnergy
|
|
||||||
}
|
|
||||||
if (tech.healthDrain && dmg !== Infinity && this.dropPowerUp) {
|
if (tech.healthDrain && dmg !== Infinity && this.dropPowerUp) {
|
||||||
mech.addHealth(Math.min(this.health, dmg) * tech.healthDrain)
|
mech.addHealth(Math.min(this.health, dmg) * tech.healthDrain)
|
||||||
if (mech.health > mech.maxHealth) mech.health = mech.maxHealth
|
if (mech.health > mech.maxHealth) mech.health = mech.maxHealth
|
||||||
|
|||||||
@@ -502,7 +502,7 @@ const mech = {
|
|||||||
if (tech.isNoFireDefense && mech.cycle > mech.fireCDcycle + 120) dmg *= 0.6
|
if (tech.isNoFireDefense && mech.cycle > mech.fireCDcycle + 120) dmg *= 0.6
|
||||||
if (tech.energyRegen === 0) dmg *= 0.4
|
if (tech.energyRegen === 0) dmg *= 0.4
|
||||||
if (tech.isTurret && mech.crouch) dmg *= 0.5;
|
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) {
|
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
|
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
|
//draw body
|
||||||
ctx.save();
|
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);
|
ctx.translate(mech.pos.x, mech.pos.y);
|
||||||
mech.calcLeg(Math.PI, -3);
|
mech.calcLeg(Math.PI, -3);
|
||||||
mech.drawLeg("#4a4a4a");
|
mech.drawLeg("#4a4a4a");
|
||||||
|
|||||||
141
js/tech.js
141
js/tech.js
@@ -363,21 +363,93 @@ const tech = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Galilean group",
|
name: "Higgs mechanism",
|
||||||
description: "reduce <strong class='color-harm'>harm</strong> by <strong>50%</strong> when at <strong>rest</strong>",
|
description: "<strong>movement</strong> isn't possible while <strong>firing</strong><br>reduce <strong class='color-harm'>harm</strong> by <strong>60%</strong> when <strong>firing</strong>",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
allowed() {
|
allowed() {
|
||||||
return tech.isFireNotMove
|
return true
|
||||||
},
|
},
|
||||||
requires: "inertial frame",
|
requires: "",
|
||||||
effect() {
|
effect: () => {
|
||||||
tech.isRestHarm = true
|
tech.isFireMoveLock = true;
|
||||||
|
b.setFireMethod();
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
tech.isRestHarm = false;
|
if (tech.isFireMoveLock) {
|
||||||
|
tech.isFireMoveLock = false
|
||||||
|
b.setFireMethod();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "squirrel-cage rotor",
|
||||||
|
description: "<strong>move</strong> and <strong>jump</strong> about <strong>25%</strong> 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 <strong>speeds</strong> reduces <strong class='color-harm'>harm</strong><br>by up to <strong>50%</strong>",
|
||||||
|
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 <strong>speeds</strong> increases <strong class='color-d'>damage</strong><br> by up to <strong>33%</strong>",
|
||||||
|
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 <strong class='color-harm'>harm</strong> by <strong>50%</strong> when at <strong>rest</strong>",
|
||||||
|
// 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",
|
name: "kinetic bombardment",
|
||||||
description: "increase <strong class='color-d'>damage</strong> by up to <strong>33%</strong><br>at a <strong>distance</strong> of 40 steps from the target",
|
description: "increase <strong class='color-d'>damage</strong> by up to <strong>33%</strong><br>at a <strong>distance</strong> of 40 steps from the target",
|
||||||
@@ -914,58 +986,6 @@ const tech = {
|
|||||||
},
|
},
|
||||||
remove() {}
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "squirrel-cage rotor",
|
|
||||||
description: "<strong>move</strong> and <strong>jump</strong> about <strong>25%</strong> 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 <strong>speeds</strong> reduces <strong class='color-harm'>harm</strong><br>by up to <strong>50%</strong>",
|
|
||||||
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 <strong>speeds</strong> increases <strong class='color-d'>damage</strong><br> by up to <strong>33%</strong>",
|
|
||||||
maxCount: 1,
|
|
||||||
count: 0,
|
|
||||||
allowed() {
|
|
||||||
return mech.Fx > 0.016
|
|
||||||
},
|
|
||||||
requires: "speed increase",
|
|
||||||
effect() {
|
|
||||||
tech.isSpeedDamage = true
|
|
||||||
},
|
|
||||||
remove() {
|
|
||||||
tech.isSpeedDamage = false
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "mass driver",
|
name: "mass driver",
|
||||||
description: "increase <strong>block</strong> collision <strong class='color-d'>damage</strong> by <strong>100%</strong><br>charge <strong>throws</strong> more <strong>quickly</strong> for less <strong class='color-f'>energy</strong>",
|
description: "increase <strong>block</strong> collision <strong class='color-d'>damage</strong> by <strong>100%</strong><br>charge <strong>throws</strong> more <strong>quickly</strong> for less <strong class='color-f'>energy</strong>",
|
||||||
@@ -4113,5 +4133,6 @@ const tech = {
|
|||||||
cyclicImmunity: null,
|
cyclicImmunity: null,
|
||||||
isTechDamage: null,
|
isTechDamage: null,
|
||||||
isFireNotMove: null,
|
isFireNotMove: null,
|
||||||
isRestHarm: null
|
isRestHarm: null,
|
||||||
|
isFireMoveLock: null
|
||||||
}
|
}
|
||||||
16
todo.txt
16
todo.txt
@@ -1,13 +1,10 @@
|
|||||||
******************************************************** NEXT PATCH ********************************************************
|
******************************************************** 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 ********************************************************
|
******************************************************** BUGS ********************************************************
|
||||||
|
|
||||||
CPT check for crouch after rewind
|
CPT check for crouch after rewind
|
||||||
@@ -27,6 +24,11 @@ CPT check for crouch after rewind
|
|||||||
|
|
||||||
******************************************************** TODO ********************************************************
|
******************************************************** 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
|
tech: can't fire while moving, get attack speed and damage
|
||||||
|
|
||||||
bot that follows the players history
|
bot that follows the players history
|
||||||
|
|||||||
Reference in New Issue
Block a user