diff --git a/.DS_Store b/.DS_Store
index 72ac406..7ef5901 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/js/bullet.js b/js/bullet.js
index 6d786cc..6523c9c 100644
--- a/js/bullet.js
+++ b/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 bouncy projectile
explodes on contact or after one second",
ammo: 0,
- ammoPack: 5,
+ ammoPack: 7,
have: false,
do() {}, //do is set in b.setGrenadeMode()
fire() {
diff --git a/js/level.js b/js/level.js
index 0fb71ef..6dc8694 100644
--- a/js/level.js
+++ b/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
diff --git a/js/player.js b/js/player.js
index 42300a1..fa16024 100644
--- a/js/player.js
+++ b/js/player.js
@@ -2477,7 +2477,7 @@ const m = {
{
name: "time dilation",
// description: "use energy to stop time
while time is stopped you can move and fire
and collisions do 50% less harm",
- description: "use energy to stop time
for everything except you
generate 12 energy/second",
+ description: "use energy to stop time
for everything except you
generate 18 energy/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()
}
}
diff --git a/js/tech.js b/js/tech.js
index e5ae0ce..fa56668 100644
--- a/js/tech.js
+++ b/js/tech.js
@@ -4812,9 +4812,9 @@ const tech = {
}
},
{
- name: "electric reactive armor",
+ name: "electric armor",
// description: "explosions do no harm
while your energy is above 98%",
- description: "harm from explosions is passively reduced
by 5% for every 10 stored energy",
+ description: "explosion harm is reduce by 99%, but
they drain 15 energy and have more force",
isGunTech: true,
maxCount: 1,
count: 0,
diff --git a/todo.txt b/todo.txt
index a9a215f..e07ebd8 100644
--- a/todo.txt
+++ b/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?