diff --git a/.DS_Store b/.DS_Store
index 812769a..9e65a47 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/js/bullet.js b/js/bullet.js
index 627b9e5..d47fdfe 100644
--- a/js/bullet.js
+++ b/js/bullet.js
@@ -945,7 +945,6 @@ const b = {
bullet[me].radiusDecay = (0.81 + 0.15 * tech.isNeutronSlow) / tech.isBulletsLastLonger
bullet[me].stuckTo = null;
bullet[me].stuckToRelativePosition = null;
-
if (tech.isRPG) {
const SCALE = 2
Matter.Body.scale(bullet[me], SCALE, SCALE);
@@ -1053,7 +1052,7 @@ const b = {
//aoe damage to mobs
for (let i = 0, len = mob.length; i < len; i++) {
if (Vector.magnitude(Vector.sub(mob[i].position, this.position)) < this.damageRadius + mob[i].radius) {
- let dmg = b.dmgScale * 0.1
+ let dmg = b.dmgScale * 0.11
if (Matter.Query.ray(map, mob[i].position, this.position).length > 0) dmg *= 0.25 //reduce damage if a wall is in the way
if (mob[i].shield) dmg *= 3 //to make up for the /5 that shields normally take
mob[i].damage(dmg);
@@ -1093,8 +1092,6 @@ const b = {
}
}
}
-
-
if (tech.isNeutronBomb) {
b.grenade = grenadeNeutron
} else if (tech.isRPG) {
@@ -1120,7 +1117,7 @@ const b = {
turnRate: isReturn ? 0.1 : 0.03, //0.015
drawStringControlMagnitude: 3000 + 5000 * Math.random(),
drawStringFlip: (Math.round(Math.random()) ? 1 : -1),
- dmg: 0, //damage done in addition to the damage from momentum
+ dmg: 6, //damage done in addition to the damage from momentum
classType: "bullet",
endCycle: simulation.cycle + totalCycles * 2.5 + 15,
collisionFilter: {
@@ -1168,7 +1165,7 @@ const b = {
this.caughtPowerUp.effect();
Matter.Composite.remove(engine.world, this.caughtPowerUp);
powerUp.splice(index, 1);
- if (tech.isHarpoonPowerUp) tech.harpoonDensity = 0.035 //0.005 is normal
+ if (tech.isHarpoonPowerUp) tech.harpoonDensity = 0.006 * 6 //0.006 is normal
} else {
this.dropCaughtPowerUp()
}
@@ -1227,7 +1224,7 @@ const b = {
Matter.Body.setVelocity(this.caughtPowerUp, { x: 0, y: 0 })
} else { //&& simulation.cycle % 2
for (let i = 0, len = powerUp.length; i < len; ++i) {
- const radius = powerUp[i].circleRadius + 25
+ const radius = powerUp[i].circleRadius + 50
if (Vector.magnitudeSquared(Vector.sub(this.vertices[2], powerUp[i].position)) < radius * radius) {
if (powerUp[i].name !== "heal" || m.health !== m.maxHealth || tech.isOverHeal) {
this.caughtPowerUp = powerUp[i]
@@ -1257,8 +1254,10 @@ const b = {
this.dropCaughtPowerUp()
} else { //return to player
this.do = this.returnToPlayer
+ Matter.Body.setDensity(this, 0.0005); //reduce density on return
if (this.angularSpeed < 0.5) this.torque += this.inertia * 0.001 * (Math.random() - 0.5) //(Math.round(Math.random()) ? 1 : -1)
this.collisionFilter.mask = cat.map | cat.mob | cat.mobBullet | cat.mobShield // | cat.body
+
}
} else {
this.grabPowerUp()
@@ -1326,7 +1325,7 @@ const b = {
ctx.lineTo(this.vertices[j].x, this.vertices[j].y);
}
ctx.lineTo(this.vertices[0].x, this.vertices[0].y);
- ctx.lineWidth = 10;
+ ctx.lineWidth = 4;
ctx.strokeStyle = "#000";
ctx.lineJoin = "miter"
ctx.miterLimit = 100;
@@ -2397,7 +2396,7 @@ const b = {
beforeDmg(who) {
if (tech.isIncendiary && simulation.cycle + this.deathCycles < this.endCycle) {
const max = Math.max(Math.min(this.endCycle - simulation.cycle - this.deathCycles, 1500), 0)
- b.explosion(this.position, max * 0.09 + this.isImproved * 100 + 60 * Math.random()); //makes bullet do explosive damage at end
+ b.explosion(this.position, max * 0.1 + this.isImproved * 110 + 60 * Math.random()); //makes bullet do explosive damage at end
this.endCycle -= max
} else {
//move away from target after hitting
@@ -4105,7 +4104,7 @@ const b = {
if (tech.isIncendiary) {
bullet[me].endCycle = simulation.cycle + 60
bullet[me].onEnd = function() {
- b.explosion(this.position, 320 + (Math.random() - 0.5) * 60); //makes bullet do explosive damage at end
+ b.explosion(this.position, 300 + (Math.random() - 0.5) * 60); //makes bullet do explosive damage at end
}
bullet[me].beforeDmg = function() {
this.endCycle = 0; //bullet ends cycle after hitting a mob and triggers explosion
@@ -4160,7 +4159,7 @@ const b = {
y: speed * Math.sin(dirOff)
});
bullet[me].onEnd = function() {
- b.explosion(this.position, 160 * (tech.isShotgunReversed ? 1.6 : 1) + (Math.random() - 0.5) * 40); //makes bullet do explosive damage at end
+ b.explosion(this.position, 150 * (tech.isShotgunReversed ? 1.5 : 1) + (Math.random() - 0.5) * 40); //makes bullet do explosive damage at end
}
bullet[me].beforeDmg = function() {
this.endCycle = 0; //bullet ends cycle after hitting a mob and triggers explosion
@@ -4297,7 +4296,7 @@ const b = {
bullet[me].beforeDmg = function(who) {
mobs.statusStun(who, 180) // (2.3) * 2 / 14 ticks (2x damage over 7 seconds)
if (tech.isIncendiary) {
- b.explosion(this.position, this.mass * 300); //makes bullet do explosive damage at end
+ b.explosion(this.position, this.mass * 280); //makes bullet do explosive damage at end
this.endCycle = 0
}
};
@@ -4326,7 +4325,7 @@ const b = {
};
bullet[me].beforeDmg = function() {
if (tech.isIncendiary) {
- b.explosion(this.position, this.mass * 355 + 70 * Math.random()); //makes bullet do explosive damage at end
+ b.explosion(this.position, this.mass * 320 + 70 * Math.random()); //makes bullet do explosive damage at end
this.endCycle = 0
}
};
@@ -4359,7 +4358,7 @@ const b = {
};
bullet[me].beforeDmg = function() {
if (tech.isIncendiary) {
- b.explosion(this.position, this.mass * 355 + 70 * Math.random()); //makes bullet do explosive damage at end
+ b.explosion(this.position, this.mass * 320 + 70 * Math.random()); //makes bullet do explosive damage at end
this.endCycle = 0
}
};
@@ -5088,8 +5087,8 @@ const b = {
}
//look for closest mob in player's LoS
const dir = { x: Math.cos(m.angle), y: Math.sin(m.angle) }; //make a vector for the player's direction of length 1; used in dot product
- const length = tech.isLargeHarpoon ? 1 + 0.15 * Math.sqrt(this.ammo) : 1
- const totalCycles = 8 * (tech.isFilament ? 1 + Math.min(75, this.ammo) / 33 : 1)
+ const length = tech.isLargeHarpoon ? 1 + 0.09 * Math.sqrt(this.ammo) : 1
+ const totalCycles = 7 * (tech.isFilament ? 1 + 0.009 * Math.min(100, this.ammo) : 1)
if (input.down) {
for (let i = 0, len = mob.length; i < len; ++i) {
if (mob[i].alive && !mob[i].isBadTarget && Matter.Query.ray(map, m.pos, mob[i].position).length === 0) {
@@ -5104,10 +5103,10 @@ const b = {
b.harpoon(where, closest.target, m.angle, length, false, 15)
m.fireCDcycle = m.cycle + 40 * b.fireCDscale; // cool down
} else if (tech.extraHarpoons) {
- const range = 560 * (tech.isFilament ? 1 + this.ammo / 33 : 1)
+ const range = 450 * (tech.isFilament ? 1 + Math.min(100, this.ammo) / 100 : 1)
let targetCount = 0
for (let i = 0, len = mob.length; i < len; ++i) {
- if (mob[i].alive && !mob[i].isBadTarget && Matter.Query.ray(map, m.pos, mob[i].position).length === 0) {
+ if (mob[i].alive && !mob[i].isBadTarget && !mob[i].shield && Matter.Query.ray(map, m.pos, mob[i].position).length === 0) {
const dot = Vector.dot(dir, Vector.normalise(Vector.sub(mob[i].position, m.pos))) //the dot product of diff and dir will return how much over lap between the vectors
const dist = Vector.magnitude(Vector.sub(where, mob[i].position))
if (dist < range && dot > 0.7) { //target closest mob that player is looking at and isn't too close to target
diff --git a/js/index.js b/js/index.js
index 39b4819..e4fb9df 100644
--- a/js/index.js
+++ b/js/index.js
@@ -590,24 +590,26 @@ const build = {
}
removeOne();
}
- // simulation.isCheating = true;
- for (let i = 0, len = tech.tech.length; i < len; i++) {
- // if ((tech.tech[i].isLore && tech.tech[i].count === 0) || (!tech.tech[i].isLore && tech.tech[i].count > 0)) { //don't remove lore frequency if you only have lore tech
- // tech.tech[i].frequency = 0; //remove lore power up chance
- // }
- if (!simulation.isCheating && tech.tech[i].count > 0 && !tech.tech[i].isLore && !tech.tech[i].isExperimentalMode) {
- simulation.isCheating = true;
- }
- if (tech.tech[i].isLore) {
- tech.tech[i].frequency = 0; //remove lore power up chance
- }
- }
- //if you have no tech (not cheating) remove all power ups that might have spawned from tech
if (!simulation.isCheating) {
- function removeAll(array) {
- for (let i = 0; i < array.length; ++i) Matter.Composite.remove(engine.world, array[i]);
+ for (let i = 0, len = tech.tech.length; i < len; i++) {
+ if (tech.tech[i].count > 0 && !tech.tech[i].isLore && !tech.tech[i].isExperimentalMode) {
+ simulation.isCheating = true;
+ }
}
- removeAll(powerUp);
+ if (b.inventory.length !== 0 || m.fieldMode !== 0) simulation.isCheating = true;
+ }
+
+ if (simulation.isCheating) { //if you are cheating remove any lore you might have gotten
+ lore.techCount = 0;
+ for (let i = 0, len = tech.tech.length; i < len; i++) {
+ if (tech.tech[i].isLore) {
+ tech.tech[i].frequency = 0; //remove lore power up chance
+ tech.tech[i].count = 0; //remove lore power up chance
+ }
+ }
+ simulation.updateTechHUD();
+ } else { //if you have no tech (not cheating) remove all power ups that might have spawned from tech
+ for (let i = 0; i < powerUp.length; ++i) Matter.Composite.remove(engine.world, powerUp[i]);
powerUp = [];
}
document.body.style.cursor = "none";
diff --git a/js/level.js b/js/level.js
index e8876e0..dab50e3 100644
--- a/js/level.js
+++ b/js/level.js
@@ -18,7 +18,7 @@ const level = {
// m.setField("time dilation")
// b.giveGuns("harpoon")
// tech.giveTech("toggling harpoon")
- // tech.giveTech("phonon")
+ // tech.giveTech("filament")
// tech.giveTech("isotropic radiator")
// tech.giveTech("necrophage")
// for (let i = 0; i < 3; i++) tech.giveTech("super sized")
@@ -2288,7 +2288,7 @@ const level = {
spawn.mapRect(5300, -275, 50, 175);
spawn.mapRect(5050, -100, 50, 150);
spawn.mapRect(4850, -275, 50, 175);
- // level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why
+ level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why
spawn.starter(1900, -500, 200) //big boy
// spawn.blockGroup(1900, -500)
// for (let i = 0; i < 10; ++i) spawn.bodyRect(1600 + 5, -500, 30, 40);
@@ -2480,11 +2480,21 @@ const level = {
},
intro() {
if (level.levelsCleared === 0) { //if this is the 1st level of the game
- // powerUps.spawn(2500, -50, "research", false);
- powerUps.spawn(2095 + 15 * (Math.random() - 0.5), -2070, "research", false);
- powerUps.spawn(2095 + 15 * (Math.random() - 0.5), -2070 - 25, "heal", false);
- powerUps.spawn(2095 + 15 * (Math.random() - 0.5), -2070 - 75, "heal", false);
- powerUps.spawnStartingPowerUps(2095 + 15 * (Math.random() - 0.5), -2070 - 125);
+ //wait to spawn power ups until unpaused
+ //power ups don't spawn in experiment mode, so they don't get removed at the start of experiment mode
+ function cycle() {
+ if (simulation.cycle > 10) {
+ // powerUps.spawn(2500, -50, "research", false);
+ powerUps.spawn(2095 + 15 * (Math.random() - 0.5), -2070, "research", false);
+ powerUps.spawn(2095 + 15 * (Math.random() - 0.5), -2070 - 25, "heal", false);
+ powerUps.spawn(2095 + 15 * (Math.random() - 0.5), -2070 - 75, "heal", false);
+ powerUps.spawnStartingPowerUps(2095 + 15 * (Math.random() - 0.5), -2070 - 125);
+ } else {
+ requestAnimationFrame(cycle);
+ }
+ }
+ requestAnimationFrame(cycle);
+
if (localSettings.levelsClearedLastGame < 3) {
if (!simulation.isCheating && !m.isShipMode && !build.isExperimentRun) {
spawn.wireFoot();
diff --git a/js/player.js b/js/player.js
index fa6a7b2..afadcb0 100644
--- a/js/player.js
+++ b/js/player.js
@@ -1281,7 +1281,7 @@ const m = {
}
const unit = Vector.normalise(Vector.sub(player.position, who.position))
if (tech.blockDmg) {
- who.damage(tech.blockDmg * b.dmgScale)
+ who.damage(tech.blockDmg * b.dmgScale, true)
//draw electricity
const step = 40
ctx.beginPath();
diff --git a/js/powerup.js b/js/powerup.js
index 5336da8..3d76c15 100644
--- a/js/powerup.js
+++ b/js/powerup.js
@@ -323,7 +323,7 @@ const powerUps = {
b.randomBot()
if (tech.renormalization) {
for (let i = 0; i < cost; i++) {
- if (Math.random() < tech.regularization) {
+ if (Math.random() < 0.4) {
m.fieldCDcycle = m.cycle + 20;
powerUps.spawn(m.pos.x, m.pos.y, "research");
}
@@ -337,7 +337,7 @@ const powerUps = {
if (tech.isDeathAvoid && document.getElementById("tech-anthropic")) {
document.getElementById("tech-anthropic").innerHTML = `-${powerUps.research.count}`
}
- if (tech.renormalization && Math.random() < tech.regularization && amount < 0) {
+ if (tech.renormalization && Math.random() < 0.4 && amount < 0) {
for (let i = 0, len = -amount; i < len; i++) powerUps.spawn(m.pos.x, m.pos.y, "research");
}
if (tech.isRerollHaste) {
diff --git a/js/tech.js b/js/tech.js
index e92d166..a0105f5 100644
--- a/js/tech.js
+++ b/js/tech.js
@@ -2906,34 +2906,12 @@
},
requires: "at least 3 research and not superdeterminism",
effect() {
- tech.renormalization = true; //40% set in regularization tech
+ tech.renormalization = true;
},
remove() {
tech.renormalization = false;
}
},
- {
- name: "regularization",
- description: `increase renormalization chance by 10%
use ${powerUps.orb.research(6)}`,
- maxCount: 3,
- count: 0,
- frequency: 2,
- frequencyDefault: 2,
- allowed() {
- return tech.renormalization && (powerUps.research.count > 5 || build.isExperimentSelection)
- },
- requires: "renormalization",
- effect() {
- tech.regularization += 0.1
- for (let i = 0; i < 6; i++) {
- if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
- }
- for (let i = 0; i < 6; i++) powerUps.spawn(m.pos.x + 120 * (Math.random() - 0.5), m.pos.y + 120 * (Math.random() - 0.5), "research", false);
- },
- remove() {
- tech.regularization = 0.4
- }
- },
{
name: "perturbation theory",
description: `66% decreased delay after firing
when you have no ${powerUps.orb.research(1)} in your inventory`,
@@ -4173,7 +4151,7 @@
},
{
name: "super sized",
- description: `increase super ball radius by 17%
increases damage by about 35%`,
+ description: `increase super ball radius by 15%
increases damage by about 30%`,
isGunTech: true,
maxCount: 9,
count: 0,
@@ -4184,7 +4162,7 @@
},
requires: "super balls",
effect() {
- tech.bulletSize += 0.17
+ tech.bulletSize += 0.15
},
remove() {
tech.bulletSize = 1;
@@ -5020,7 +4998,7 @@
},
{
name: "filament",
- description: "increase the length of your harpoon's rope
by 3% per harpoon ammo",
+ description: "increase the length of your harpoon's rope
by 1% per harpoon ammo",
isGunTech: true,
maxCount: 1,
count: 0,
@@ -5039,7 +5017,7 @@
},
{
name: "unaaq",
- description: "increase the length of your harpoon
by 15% of the square root of its ammo",
+ description: "increase the length of your harpoon
by 10% of the square root of its ammo",
isGunTech: true,
maxCount: 1,
count: 0,
@@ -5073,7 +5051,7 @@
},
remove() {
tech.isHarpoonPowerUp = false
- tech.harpoonDensity = 0.005
+ tech.harpoonDensity = 0.006
}
},
{
@@ -8189,11 +8167,9 @@
isMineStun: null,
isSmartRadius: null,
isFilament: null,
- // isSpear: null,
isLargeHarpoon: null,
extraHarpoons: null,
ammoCap: null,
- regularization: null,
isHarpoonPowerUp: null,
harpoonDensity: null
}
\ No newline at end of file
diff --git a/todo.txt b/todo.txt
index 8090bb1..9f2cc0c 100644
--- a/todo.txt
+++ b/todo.txt
@@ -1,26 +1,33 @@
******************************************************** NEXT PATCH **************************************************
-tech: toggling harpoon - after picking up a power up with the harpoon, your next harpoon is 7x more dense
- this probably needs to be balanced in the next patch
-tech: regularization - use 6 research to increase renormalization by 10%
- (renormalization is 40% chance to get research when you use research)
-tech: bot fabrication uses 2 research to build a bot (+1 cost every 5 bots)
-tech: uncertainty principle now applies to wave beam in addition to foam
-tech: integrated armament gives 19.95% damage (was 23%)
+harpoon damage is increased 30%
+picks up power ups from farther away
+harpoon's range has been reduced about 20%
+filament and unaaq require about 40% more ammo for the same effect
+harpoon density lowers when it retracts
+ so it doesn't do as much damage on retracting
-level: labs - platforming rooms have been simplified
-start with 7/7 undefinded tech if you choose an -experiment- and no other tech
+more bug fixes
******************************************************** TODO ********************************************************
+JUNK tech: planetesimals game inside n-gon
+https://codepen.io/lilgreenland/pen/jrMvaB?editors=0010
+
+how to make it more interesting to get multiple guns?
+ make final boss less about having huge dps
+ lower final boss health when it spawns boss
+ spawn more bosses
+ make guns have more weaknesses/advantages to specific situations
+ no gun should be good at everything
+ remove gun tech that stacks to 9?
+ nerf a few of the most overpowered gun tech
+ make more gun tech apply to multiple guns
+ after picking up a gun tech open a menu with just gun tech for that gun?
+ but then the player never gets to try the vanilla version of the gun
+
Tech: Make player smol
-Tech: For the particle waves gun, Incompatible with phonon
- shooting creates small particles that randomly jump around the map, often randomly changing their position completely instead of randomly jumping
- combine with foam uncertainty?
-
-"Interstellar Disturbance": Cosmic String applies to mobs who cross the wormhole's path, even after initial wormholing, but at reduced damage and stun time.
-
disable zoom progress when paused
harpoon
@@ -43,6 +50,8 @@ harpoon tech
tech - explode after getting hit, but while you are immune to harm
+"Interstellar Disturbance": Cosmic String applies to mobs who cross the wormhole's path, even after initial wormholing, but at reduced damage and stun time.
+
on mouse down wormhole shows a possible wormhole
on mouse up the wormhole becomes real
make the player get a buff after using wormhole
@@ -55,7 +64,7 @@ Pilot wave tech
Grouping blocks will merge them into a massive ball
Size, density is determined by total mass
-make a boss with a tail
+make another boss with a tail
but the tail is made of interesting mobs
stabbers maybe
suckers maybe