diff --git a/.DS_Store b/.DS_Store
index 2229428..697f9d7 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/js/bullet.js b/js/bullet.js
index e3af1fc..750bbaf 100644
--- a/js/bullet.js
+++ b/js/bullet.js
@@ -3122,10 +3122,9 @@ const b = {
this.target.damage(m.dmgScale * this.damage);
}
} else if (this.target !== null) { //look for a new target
- this.target = null
this.collisionFilter.category = cat.bullet;
this.collisionFilter.mask = cat.mob //| cat.mobShield //cat.map | cat.body | cat.mob | cat.mobBullet | cat.mobShield
- if (tech.isFoamGrowOnDeath && bullet.length < 180) {
+ if (tech.isFoamGrowOnDeath && bullet.length < 180 && !this.target.isMobBullet) {
let targets = []
for (let i = 0, len = mob.length; i < len; i++) {
const dist = Vector.magnitudeSquared(Vector.sub(this.position, mob[i].position));
@@ -3147,6 +3146,7 @@ const b = {
}
}
}
+ this.target = null
} else if (Matter.Query.point(map, this.position).length > 0) { //slow when touching map or blocks
const slow = 0.85
Matter.Body.setVelocity(this, {
@@ -5581,7 +5581,7 @@ const b = {
name: "harpoon",
description: "fire a self-steering harpoon that uses energy
to retract and refund its ammo cost",
ammo: 0,
- ammoPack: 1,
+ ammoPack: 0.3,
have: false,
do() {},
fire() {
diff --git a/js/engine.js b/js/engine.js
index 2de2465..7a5490c 100644
--- a/js/engine.js
+++ b/js/engine.js
@@ -135,7 +135,7 @@ function collisionChecks(event) {
}
if (tech.isPiezo) m.energy += 20.48;
if (tech.isStimulatedEmission) powerUps.ejectTech()
- if (mob[k].onHit) mob[k].onHit(k);
+ if (mob[k].onHit) mob[k].onHit();
if (m.immuneCycle < m.cycle + tech.collisionImmuneCycles) m.immuneCycle = m.cycle + tech.collisionImmuneCycles; //player is immune to damage for 30 cycles
//extra kick between player and mob //this section would be better with forces but they don't work...
let angle = Math.atan2(player.position.y - mob[k].position.y, player.position.x - mob[k].position.x);
diff --git a/js/level.js b/js/level.js
index 3ee2458..adeff64 100644
--- a/js/level.js
+++ b/js/level.js
@@ -15,7 +15,7 @@ const level = {
start() {
if (level.levelsCleared === 0) { //this code only runs on the first level
// simulation.isHorizontalFlipped = true
- // m.setField("standing wave")
+ // m.setField("time dilation")
// b.giveGuns("harpoon")
// for (let i = 0; i < 100; i++) tech.giveTech("slow light")
// tech.giveTech("tungsten carbide")
@@ -30,7 +30,7 @@ const level = {
// tech.tech[297].frequency = 100
// m.immuneCycle = Infinity //you can't take damage
- // level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why
+ // 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.reactor();
// level.testing(); //not in rotation, used for testing
@@ -2617,13 +2617,13 @@ const level = {
spawn.mapRect(-400, -750, 625, 1200);
// spawn.mapVertex(200, 0, "-200 0 -100 -100 100 -100 200 0");
- spawn.bodyRect(225, -100, 100, 100, 0.5);
- spawn.bodyRect(225, -200, 75, 100, 0.5);
- spawn.bodyRect(325, -70, 150, 70, 1);
- spawn.bodyRect(-275, -850, 75, 100, 0.4);
- spawn.bodyRect(1525, -100, 100, 100, 0.3);
- spawn.bodyRect(2325, -50, 125, 50, 0.3);
- spawn.bodyRect(2375, -100, 50, 50, 0.3);
+ // spawn.bodyRect(225, -100, 100, 100, 0.5);
+ // spawn.bodyRect(225, -200, 75, 100, 0.5);
+ spawn.bodyRect(250, -70, 100, 70, 1);
+ // spawn.bodyRect(-275, -850, 75, 100, 0.4);
+ // spawn.bodyRect(1525, -100, 100, 100, 0.3);
+ // spawn.bodyRect(2325, -50, 125, 50, 0.3);
+ // spawn.bodyRect(2375, -100, 50, 50, 0.3);
for (let i = 0; i < 3; ++i) powerUps.spawn(400 + 2000 * Math.random(), -25, "ammo");
spawn.mapRect(-425, 0, 4200, 2100);
@@ -2700,10 +2700,12 @@ const level = {
doorOut.isClosing = true
if (!isSpawnedBoss) {
isSpawnedBoss = true
- if (Math.random() > 0.5) {
+ if (Math.random() < 0.33) {
for (let i = 0, len = Math.min(simulation.difficulty / 20, 5); i < len; ++i) spawn.bounceBoss(1487 + 200 * i, -1525, 80, false);
- } else {
+ } else if (Math.random() < 0.5) {
for (let i = 0, len = Math.min(simulation.difficulty / 10, 10); i < len; ++i) spawn.sprayBoss(2400 - 150 * i, -225, 30, false)
+ } else {
+ for (let i = 0, len = Math.min(simulation.difficulty / 8, 10); i < len; ++i) spawn.mineBoss(1950, -250, 50, false);
}
// for (let i = 0, len = 3 + simulation.difficulty / 20; i < len; ++i) spawn.mantisBoss(1487 + 300 * i, -1525, 35, false)
}
diff --git a/js/player.js b/js/player.js
index ce1975f..df503f0 100644
--- a/js/player.js
+++ b/js/player.js
@@ -514,7 +514,7 @@ const m = {
if (tech.isSlowFPS) dmg *= 0.8
if (tech.isHarmReduce && input.field && m.fieldCDcycle < m.cycle) dmg *= 0.4
if (tech.isNeutronium && input.field && m.fieldCDcycle < m.cycle) dmg *= 0.1
- if (tech.isBotArmor) dmg *= 0.92 ** b.totalBots()
+ if (tech.isBotArmor) dmg *= 0.93 ** b.totalBots()
if (tech.isHarmArmor && m.lastHarmCycle + 600 > m.cycle) dmg *= 0.33;
if (tech.isNoFireDefense && m.cycle > m.fireCDcycle + 120) dmg *= 0.3
if (tech.energyRegen === 0) dmg *= 0.34
@@ -3618,7 +3618,7 @@ const m = {
m.damage(dmg);
if (tech.isPiezo) m.energy += 20.48;
if (tech.isStimulatedEmission) powerUps.ejectTech()
- if (mob[k].onHit) mob[k].onHit(k);
+ if (mob[k].onHit) mob[k].onHit();
if (m.immuneCycle < m.cycle + tech.collisionImmuneCycles) m.immuneCycle = m.cycle + tech.collisionImmuneCycles; //player is immune to damage for 30 cycles
//extra kick between player and mob //this section would be better with forces but they don't work...
let angle = Math.atan2(player.position.y - mob[k].position.y, player.position.x - mob[k].position.x);
diff --git a/js/powerup.js b/js/powerup.js
index beb02df..c4679eb 100644
--- a/js/powerup.js
+++ b/js/powerup.js
@@ -306,11 +306,6 @@ const powerUps = {
const index = powerUps.tech.choiceLog.length - i - 1
if (powerUps.tech.choiceLog[index] && tech.tech[powerUps.tech.choiceLog[index]]) {
tech.tech[powerUps.tech.choiceLog[index]].isBanished = true
- } else { //if no tech options available eject banish tech
- for (let i = 0, len = tech.tech.length; i < len; i++) {
- if (tech.tech[i].name === "decoherence") powerUps.ejectTech(i)
- }
- powerUps.endDraft("tech");
}
}
simulation.makeTextLog(`powerUps.tech.length: ${Math.max(0,powerUps.tech.lastTotalChoices - banishLength)}`)
@@ -404,18 +399,7 @@ const powerUps = {
const banishLength = tech.isDeterminism ? 1 : 3 + tech.isExtraChoice * 2
for (let i = 0; i < banishLength; i++) {
const index = powerUps.tech.choiceLog.length - i - 1
- // console.log(index)
- // console.log(powerUps.tech.choiceLog.length)
- // console.log(powerUps.tech.choiceLog[index])
- // console.log(tech.tech[powerUps.tech.choiceLog[index]])
- if (powerUps.tech.choiceLog[index] && tech.tech[powerUps.tech.choiceLog[index]]) {
- tech.tech[powerUps.tech.choiceLog[index]].isBanished = true
- } else { //if no tech options available eject banish tech
- for (let i = 0, len = tech.tech.length; i < len; i++) {
- if (tech.tech[i].name === "decoherence") powerUps.ejectTech(i)
- }
- powerUps.endDraft("tech");
- }
+ if (powerUps.tech.choiceLog[index] && tech.tech[powerUps.tech.choiceLog[index]]) tech.tech[powerUps.tech.choiceLog[index]].isBanished = true
}
simulation.makeTextLog(`powerUps.tech.length: ${Math.max(0,powerUps.tech.lastTotalChoices - banishLength)}`)
}
@@ -697,6 +681,10 @@ const powerUps = {
// text += `