electric armor
electric reactive armor renamed electric armor
reduce harm from explosions by 99%, drain 15 energy,
and greatly increase knock back
it does look like you can go through some thin walls,
but that's how it is in the real world, so not a bug
grenades have 40% more ammo
time dilation generates 12->18 energy/s
This commit is contained in:
38
js/bullet.js
38
js/bullet.js
@@ -378,7 +378,6 @@ const b = {
|
||||
//player damage
|
||||
if (Vector.magnitude(Vector.sub(where, player.position)) < radius) {
|
||||
const DRAIN = (tech.isExplosionHarm ? 0.9 : 0.45) * (tech.isRadioactiveResistance ? 0.25 : 1)
|
||||
// * (tech.isImmuneExplosion ? Math.min(1, Math.max(1 - m.energy * 0.7, 0)) : 1)
|
||||
if (m.immuneCycle < m.cycle) m.energy -= DRAIN
|
||||
if (m.energy < 0) {
|
||||
m.energy = 0
|
||||
@@ -426,16 +425,23 @@ const b = {
|
||||
dist = Vector.magnitude(sub);
|
||||
|
||||
if (dist < radius) {
|
||||
const harm = radius * (tech.isExplosionHarm ? 0.00036 : 0.00018)
|
||||
if (tech.isImmuneExplosion) {
|
||||
const mitigate = Math.min(1, Math.max(1 - m.energy * 0.5, 0))
|
||||
if (simulation.dmgScale) m.damage(mitigate * harm);
|
||||
} else {
|
||||
if (simulation.dmgScale) m.damage(harm);
|
||||
if (simulation.dmgScale) {
|
||||
const harm = radius * (tech.isExplosionHarm ? 0.00036 : 0.00018)
|
||||
if (tech.isImmuneExplosion && m.energy > 0.15) {
|
||||
// const mitigate = Math.min(1, Math.max(1 - m.energy * 0.5, 0))
|
||||
m.energy -= 0.15
|
||||
m.damage(0.01 * harm); //remove 99% of the damage 1-0.99
|
||||
console.log(Math.max(0, Math.min(0.15 - 0.01 * player.speed, 0.15)))
|
||||
knock = Vector.mult(Vector.normalise(sub), -player.mass * Math.max(0, Math.min(0.15 - 0.002 * player.speed, 0.15)));
|
||||
player.force.x = knock.x; // not += so crazy forces can't build up with MIRV
|
||||
player.force.y = knock.y;
|
||||
} else {
|
||||
if (simulation.dmgScale) m.damage(harm);
|
||||
knock = Vector.mult(Vector.normalise(sub), -Math.sqrt(dmg) * player.mass * 0.013);
|
||||
player.force.x += knock.x;
|
||||
player.force.y += knock.y;
|
||||
}
|
||||
}
|
||||
knock = Vector.mult(Vector.normalise(sub), -Math.sqrt(dmg) * player.mass * 0.013);
|
||||
player.force.x += knock.x;
|
||||
player.force.y += knock.y;
|
||||
} else if (dist < alertRange) {
|
||||
knock = Vector.mult(Vector.normalise(sub), -Math.sqrt(dmg) * player.mass * 0.005);
|
||||
player.force.x += knock.x;
|
||||
@@ -4529,11 +4535,11 @@ const b = {
|
||||
const distanceToPlayer = Vector.magnitude(Vector.sub(this.position, player.position))
|
||||
if (distanceToPlayer > 100) { //if far away move towards player
|
||||
if (this.explode) {
|
||||
if (tech.isImmuneExplosion && m.energy > 1.43) {
|
||||
b.explosion(this.position, this.explode);
|
||||
} else {
|
||||
b.explosion(this.position, Math.max(0, Math.min(this.explode, (distanceToPlayer - 70) / b.explosionRange())));
|
||||
}
|
||||
// if (tech.isImmuneExplosion && m.energy > 1.43) {
|
||||
// b.explosion(this.position, this.explode);
|
||||
// } else {
|
||||
// }
|
||||
b.explosion(this.position, Math.max(0, Math.min(this.explode, (distanceToPlayer - 70) / b.explosionRange())));
|
||||
this.explode = 0;
|
||||
}
|
||||
this.force = Vector.mult(Vector.normalise(Vector.sub(player.position, this.position)), this.mass * this.acceleration)
|
||||
@@ -5922,7 +5928,7 @@ const b = {
|
||||
name: "grenades",
|
||||
description: "lob a single <strong>bouncy</strong> projectile<br><strong class='color-e'>explodes</strong> on <strong>contact</strong> or after one second",
|
||||
ammo: 0,
|
||||
ammoPack: 5,
|
||||
ammoPack: 7,
|
||||
have: false,
|
||||
do() {}, //do is set in b.setGrenadeMode()
|
||||
fire() {
|
||||
|
||||
22
js/level.js
22
js/level.js
@@ -17,10 +17,10 @@ const level = {
|
||||
if (level.levelsCleared === 0) { //this code only runs on the first level
|
||||
// simulation.isHorizontalFlipped = true
|
||||
// m.setField("time dilation")
|
||||
// b.giveGuns("foam")
|
||||
// b.giveGuns("grenades")
|
||||
// tech.giveTech("rocket-propelled grenade")
|
||||
// tech.giveTech("needle gun")
|
||||
// tech.giveTech("rivet gun")
|
||||
// tech.giveTech("electric armor")
|
||||
// tech.giveTech("MIRV")
|
||||
// tech.giveTech("capacitor bank")
|
||||
// tech.giveTech("rotary cannon")
|
||||
// tech.giveTech("pneumatic actuator")
|
||||
@@ -37,7 +37,7 @@ const level = {
|
||||
// m.immuneCycle = Infinity //you can't take damage
|
||||
// level.difficultyIncrease(15) //30 is near max on hard //60 is near max on why
|
||||
// simulation.enableConstructMode() //used to build maps in testing mode
|
||||
// level.labs();
|
||||
// level.warehouse();
|
||||
// level.testing(); //not in rotation, used for testing
|
||||
if (simulation.isTraining) { level.walk(); } else { level.intro(); } //normal starting level ************************************************
|
||||
// powerUps.research.changeRerolls(3000)
|
||||
@@ -5217,13 +5217,13 @@ const level = {
|
||||
spawn.mapRect(-1900, -600, 1775, 100);
|
||||
spawn.mapRect(-1900, -550, 100, 1250);
|
||||
//house
|
||||
spawn.mapRect(-175, -550, 50, 400);
|
||||
spawn.mapRect(-175, -10, 350, 50);
|
||||
spawn.mapRect(-225, -550, 100, 400);
|
||||
spawn.mapRect(-225, -10, 400, 50);
|
||||
spawn.mapRect(-25, -20, 100, 50);
|
||||
|
||||
//exit house
|
||||
spawn.mapRect(300, -10, 350, 50);
|
||||
spawn.mapRect(-150, -300, 800, 50);
|
||||
spawn.mapRect(-150, -350, 800, 100);
|
||||
spawn.mapRect(600, -275, 50, 75);
|
||||
spawn.mapRect(425, -20, 100, 25);
|
||||
// spawn.mapRect(-1900, 600, 2700, 100);
|
||||
@@ -5324,10 +5324,10 @@ const level = {
|
||||
Composite.add(engine.world, cons[cons.length - 1]);
|
||||
}
|
||||
//blocks
|
||||
spawn.bodyRect(-165, -150, 30, 35, 1);
|
||||
spawn.bodyRect(-165, -115, 30, 35, 1);
|
||||
spawn.bodyRect(-165, -80, 30, 35, 1);
|
||||
spawn.bodyRect(-165, -45, 30, 35, 1);
|
||||
spawn.bodyRect(-212, -150, 30, 35, 1);
|
||||
spawn.bodyRect(-212, -115, 30, 35, 1);
|
||||
spawn.bodyRect(-212, -80, 30, 35, 1);
|
||||
spawn.bodyRect(-212, -45, 30, 35, 1);
|
||||
|
||||
spawn.bodyRect(-750, 400, 150, 150, 0.5);
|
||||
spawn.bodyRect(-400, 1175, 100, 250, 1); //block to get to top path on bottom level
|
||||
|
||||
@@ -2477,7 +2477,7 @@ const m = {
|
||||
{
|
||||
name: "time dilation",
|
||||
// description: "use <strong class='color-f'>energy</strong> to <strong style='letter-spacing: 1px;'>stop time</strong><br>while time is stopped you can <strong>move</strong> and <strong>fire</strong><br>and <strong>collisions</strong> do <strong>50%</strong> less <strong class='color-harm'>harm</strong>",
|
||||
description: "use <strong class='color-f'>energy</strong> to <strong style='letter-spacing: 2px;'>stop time</strong><br>for everything except you<br>generate <strong>12</strong> <strong class='color-f'>energy</strong>/second",
|
||||
description: "use <strong class='color-f'>energy</strong> to <strong style='letter-spacing: 2px;'>stop time</strong><br>for everything except you<br>generate <strong>18</strong> <strong class='color-f'>energy</strong>/second",
|
||||
set() {
|
||||
if (tech.isRewindField) {
|
||||
this.rewindCount = 0
|
||||
@@ -2637,6 +2637,7 @@ const m = {
|
||||
m.holdingTarget = null; //clears holding target (this is so you only pick up right after the field button is released and a hold target exists)
|
||||
}
|
||||
if (m.energy < m.maxEnergy) m.regenEnergy(); //extra energy regen
|
||||
if (m.energy < m.maxEnergy) m.regenEnergy(); //extra energy regen
|
||||
m.drawFieldMeter()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -4812,9 +4812,9 @@ const tech = {
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "electric reactive armor",
|
||||
name: "electric armor",
|
||||
// description: "<strong class='color-e'>explosions</strong> do no <strong class='color-harm'>harm</strong><br> while your <strong class='color-f'>energy</strong> is above <strong>98%</strong>",
|
||||
description: "<strong class='color-harm'>harm</strong> from <strong class='color-e'>explosions</strong> is passively reduced<br>by <strong>5%</strong> for every <strong>10</strong> stored <strong class='color-f'>energy</strong>",
|
||||
description: "<strong class='color-e'>explosion</strong> <strong class='color-harm'>harm</strong> is reduce by <strong>99%</strong>, but<br>they drain <strong>15</strong> <strong class='color-f'>energy</strong> and have more force",
|
||||
isGunTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
|
||||
29
todo.txt
29
todo.txt
@@ -1,27 +1,22 @@
|
||||
******************************************************** NEXT PATCH **************************************************
|
||||
|
||||
default foam gun fires a stream
|
||||
tech: pressure vessel - in addition to the stream, foam gun builds up charges.
|
||||
charges release after you stop firing
|
||||
capacitor tech doubles pressure vessel effect
|
||||
tech: syntactic foam - foam does 41% more damage per second
|
||||
quantum foam removed
|
||||
electric reactive armor renamed electric armor
|
||||
reduce harm from explosions by 99%, drain 15 energy,
|
||||
and greatly increase knock back
|
||||
it does look like you can go through some thin walls,
|
||||
but that's how it is in the real world, so not a bug
|
||||
|
||||
spore gun has 25% more ammo and fires 25% more often
|
||||
spores and worms move 25% faster
|
||||
grenades have 40% more ammo
|
||||
|
||||
nail gun has 5% more ammo
|
||||
all versions of nail gun have a much higher fire rate
|
||||
|
||||
harpoon/grapple density reduced by 20%
|
||||
this also lowers damage about 10%
|
||||
harpoon/grapple properly follow conservation of momentum
|
||||
(a small jerk when it retracts)
|
||||
|
||||
bug fixes
|
||||
time dilation generates 12->18 energy/s
|
||||
|
||||
******************************************************** TODO ********************************************************
|
||||
|
||||
a self referencing tech that switches states every time you access the text of it
|
||||
switches state with it runs the description function
|
||||
could be ON/OFF tech
|
||||
could be JUNK
|
||||
|
||||
gunIndex section at the end seems pointless
|
||||
merge with the choosing functions?
|
||||
|
||||
|
||||
Reference in New Issue
Block a user