diff --git a/.DS_Store b/.DS_Store
index de4d8a8..9ebb094 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/js/bullet.js b/js/bullet.js
index 3213672..beded82 100644
--- a/js/bullet.js
+++ b/js/bullet.js
@@ -1607,12 +1607,12 @@ const b = {
bulletType: "mine",
angle: m.angle,
friction: 0,
- frictionAir: 0.05,
+ frictionAir: 0.025,
restitution: 0.5,
dmg: 0, // 0.14 //damage done in addition to the damage from momentum
minDmgSpeed: 2,
lookFrequency: 67 + Math.floor(7 * Math.random()),
- drain: 0.45 * tech.isLaserDiode * tech.laserFieldDrain,
+ drain: 0.5 * tech.isLaserDiode * tech.laserFieldDrain,
isArmed: false,
torqueMagnitude: 0.000003 * (Math.round(Math.random()) ? 1 : -1),
range: 1500,
@@ -1645,6 +1645,7 @@ const b = {
) {
if (tech.isMineStun) b.AoEStunEffect(this.position, 1300);
this.do = this.laserSpin
+ if (this.angularSpeed < 0.5) this.torque += this.inertia * this.torqueMagnitude * 200 //spin
this.endCycle = simulation.cycle + 360 + 120
// if (this.angularSpeed < 0.01) this.torque += this.inertia * this.torqueMagnitude * 5 //spin
this.isArmed = true
@@ -1658,7 +1659,7 @@ const b = {
//drain energy
if (m.energy > this.drain) {
m.energy -= this.drain
- if (this.angularSpeed < 0.02) this.torque += this.inertia * this.torqueMagnitude //spin
+ if (this.angularSpeed < 0.05) this.torque += this.inertia * this.torqueMagnitude //spin
//fire lasers
ctx.strokeStyle = tech.laserColor;
@@ -1791,6 +1792,15 @@ const b = {
// }
// },
arm() {
+ //false alert
+ // for (let i = 0, len = mob.length; i < len; i++) {
+ // if (!mob[i].seePlayer.recall && Vector.magnitudeSquared(Vector.sub(this.position, mob[i].position)) < 4000000) { //2000 range
+ // mob[i].seePlayer.recall = 240; //cycles before mob falls a sleep
+ // mob[i].seePlayer.position.x = this.position.x;
+ // mob[i].seePlayer.position.y = this.position.y;
+ // }
+ // }
+
this.collisionFilter.mask = cat.map | cat.body | cat.mob | cat.mobBullet | cat.mobShield | cat.bullet //can now collide with other bullets
this.lookFrequency = simulation.cycle + 60
this.do = function() { //overwrite the do method for this bullet
@@ -1819,7 +1829,7 @@ const b = {
if (tech.isMineStun) b.AoEStunEffect(this.position, 700 + mob[i].radius + random);
if (tech.isMineSentry) {
this.lookFrequency = 8 + Math.floor(3 * Math.random())
- this.endCycle = simulation.cycle + 960
+ this.endCycle = simulation.cycle + 1020
this.do = function() { //overwrite the do method for this bullet
this.force.y += this.mass * 0.002; //extra gravity
if (!(simulation.cycle % this.lookFrequency) && !m.isBodiesAsleep) { //find mob targets
@@ -2597,7 +2607,7 @@ const b = {
inertia: Infinity,
frictionAir: 0.003,
dmg: 0, //damage on impact
- damage: (tech.isFastFoam ? 0.044 : 0.011) * (tech.isFoamTeleport ? 1.60 : 1), //damage done over time
+ damage: (tech.isFastFoam ? 0.039 : 0.011) * (tech.isFoamTeleport ? 1.55 : 1), //damage done over time
scale: 1 - 0.006 / tech.isBulletsLastLonger * (tech.isFastFoam ? 1.65 : 1),
classType: "bullet",
collisionFilter: {
@@ -3874,8 +3884,8 @@ const b = {
name: "shotgun",
description: "fire a wide burst of short range bullets",
ammo: 0,
- ammoPack: 4.3,
- defaultAmmoPack: 4.3,
+ ammoPack: 4,
+ defaultAmmoPack: 4,
have: false,
do() {},
fire() {
@@ -4641,10 +4651,9 @@ const b = {
have: false,
do() {},
fire() {
-
if (m.crouch) {
if (tech.isLaserMine) {
- const speed = 40
+ const speed = 30
const velocity = { x: speed * Math.cos(m.angle), y: speed * Math.sin(m.angle) }
b.laserMine(m.pos, velocity)
} else {
@@ -4885,7 +4894,7 @@ const b = {
if (!simulation.paused) {
b.foam(position, Vector.rotate(velocity, spread), radius)
// (tech.isFastFoam ? 0.044 : 0.011) * (tech.isFoamTeleport ? 1.60 : 1)
- bullet[bullet.length - 1].damage *= (1 + 0.75 * tech.foamFutureFire)
+ bullet[bullet.length - 1].damage *= (1 + 0.7 * tech.foamFutureFire)
}
}, 250 * tech.foamFutureFire);
} else {
diff --git a/js/index.js b/js/index.js
index 6a0b70b..1ef65f0 100644
--- a/js/index.js
+++ b/js/index.js
@@ -1252,4 +1252,5 @@ function cycle() {
// loop[i]()
// }
}
-}
\ No newline at end of file
+}
+// simulation.introPlayer()
\ No newline at end of file
diff --git a/js/level.js b/js/level.js
index 895dcb9..ec482df 100644
--- a/js/level.js
+++ b/js/level.js
@@ -17,7 +17,7 @@ const level = {
// b.giveGuns("mine")
// b.giveGuns("nail gun")
// m.setField("wormhole")
- // tech.giveTech("ice crystal nucleation")
+ // tech.giveTech("laser-mines")
// tech.giveTech("irradiated nails")
// for (let i = 0; i < 9; i++) tech.giveTech("MIRV")
@@ -2271,8 +2271,8 @@ const level = {
// spawn.laserBombingBoss(1900, -500)
// for (let i = 0; i < 5; i++) spawn.focuser(1900, -500)
- spawn.sniper(1900, -500)
- spawn.grenadier(1900, -500)
+ // spawn.sniper(1900, -500)
+ // spawn.grenadier(1900, -500)
// spawn.sneaker(1900, -500)
// spawn.shield(mob[mob.length - 1], 1900, -500, 1);
// mob[mob.length - 1].isShielded = true
diff --git a/js/simulation.js b/js/simulation.js
index ade7bae..5589463 100644
--- a/js/simulation.js
+++ b/js/simulation.js
@@ -501,6 +501,52 @@ const simulation = {
},
fpsInterval: 0, //set in startGame
then: null,
+ introPlayer() { //not work, but trying to show player in the intro screen
+ setTimeout(() => {
+ document.getElementById("info").style.display = "none";
+ document.getElementById("splash").style.display = "none"; //hides the element that spawned the function
+
+ simulation.clearMap()
+ m.draw = m.drawDefault //set the play draw to normal, undoing some junk tech
+ m.spawn(); //spawns the player
+ m.look = m.lookDefault
+
+
+ //level
+
+ level.testing(); //not in rotation, used for testing
+
+
+ //load level
+ simulation.setZoom();
+ level.addToWorld(); //add bodies to game engine
+ simulation.draw.setPaths();
+
+ function cycle() {
+ simulation.gravity();
+ Engine.update(engine, simulation.delta);
+ simulation.wipe();
+ if (m.onGround) {
+ m.groundControl()
+ } else {
+ m.airControl()
+ }
+ m.move();
+ // m.look();
+ // simulation.camera();
+ m.draw();
+ m.hold();
+ simulation.draw.drawMapPath();
+ ctx.restore();
+ if (simulation.onTitlePage) requestAnimationFrame(cycle);
+ }
+ requestAnimationFrame(cycle)
+
+
+
+
+ }, 1000);
+ },
startGame(isBuildRun = false) {
simulation.clearMap()
if (!isBuildRun) { //if a build run logic flow returns to "experiment-button").addEventListener
diff --git a/js/spawn.js b/js/spawn.js
index a7ee047..2459581 100644
--- a/js/spawn.js
+++ b/js/spawn.js
@@ -1496,7 +1496,7 @@ const spawn = {
let targets = [] //track who is in the node boss, for shields
mobs.spawn(x, y, 6, radius, "#b386e8");
let me = mob[mob.length - 1];
- Matter.Body.setDensity(me, 0.0032); //extra dense //normal is 0.001 //makes effective life much larger
+ Matter.Body.setDensity(me, 0.0032); //extra dense //normal is 0.001 //makes effective life much larger and damage on collision
me.isBoss = true;
targets.push(me.id) //add to shield protection
@@ -1538,7 +1538,7 @@ const spawn = {
Composite.add(engine.world, cons[cons.length - 1]);
cons[len2].length = 100 + 1.5 * radius;
me.cons2 = cons[len2];
- me.damageReduction = 0.25
+ me.damageReduction = 0.25 //normal is 1, most bosses have 0.25
me.do = function() {
// this.armor();
this.gravity();
@@ -1694,7 +1694,7 @@ const spawn = {
me.showHealthBar = false; //drawn in this.awake
me.delayLimit = 60 + Math.floor(30 * Math.random());
- me.followDelay = 600 - Math.floor(60 * Math.random())
+ me.followDelay = 600 - Math.floor(90 * Math.random())
me.stroke = "transparent"; //used for drawGhost
me.collisionFilter.mask = cat.bullet | cat.body
me.memory = Infinity
@@ -1772,7 +1772,7 @@ const spawn = {
// ctx.fillStyle = "rgba(150,0,255,0.03)";
// ctx.fill();
if (!m.isBodiesAsleep && !this.isStunned && !this.isSlowed) {
- if (this.followDelay > this.delayLimit) this.followDelay -= 0.2;
+ if (this.followDelay > this.delayLimit) this.followDelay -= 0.15;
let history = m.history[(m.cycle - Math.floor(this.followDelay)) % 600]
Matter.Body.setPosition(this, { x: history.position.x, y: history.position.y - history.yOff + 24.2859 }) //bullets move with player
}
diff --git a/js/tech.js b/js/tech.js
index 8c4c2fc..500a3fe 100644
--- a/js/tech.js
+++ b/js/tech.js
@@ -470,7 +470,7 @@
},
{
name: "desublimated ammunition",
- description: "use 50% less ammo when crouching",
+ description: "use 50% less ammo when crouching<
strong>+6 JUNK to the potential tech pool",
maxCount: 1,
count: 0,
frequency: 2,
@@ -481,11 +481,32 @@
requires: "",
effect() {
tech.isCrouchAmmo = true
+ tech.addJunkTechToPool(6)
},
remove() {
tech.isCrouchAmmo = false;
+ if (this.count > 0) tech.removeJunkTechFromPool(6)
}
},
+ // JUNK to the potential tech pool",
+ // maxCount: 9,
+ // count: 0,
+ // frequency: 1,
+ // frequencyDefault: 1,
+ // allowed() {
+ // return true
+ // },
+ // requires: "",
+ // effect() {
+ // tech.bonusEnergy += 0.6
+ // m.setMaxEnergy()
+ // tech.addJunkTechToPool(10)
+ // },
+ // remove() {
+ // tech.bonusEnergy = 0;
+ // m.setMaxEnergy()
+ // if (this.count > 0) tech.removeJunkTechFromPool(10)
+ // }
{
name: "gun turret",
description: "reduce harm by 55% when crouching",
@@ -3155,23 +3176,54 @@
},
{
name: "apomixis",
- description: "after reaching 100% duplication chance
immediately spawn 8 bosses",
+ description: "use 11 research to spawn 8 bosses
immediately after reaching 100% duplication",
maxCount: 1,
count: 0,
- frequency: 4,
- frequencyDefault: 4,
+ frequency: 3,
+ frequencyDefault: 3,
allowed() {
- return tech.duplicationChance() > 0.6
+ return tech.duplicationChance() > 0.6 && powerUps.research.count > 10
},
requires: "duplication chance above 60%",
effect() {
tech.is100Duplicate = true;
tech.maxDuplicationEvent()
+ for (let i = 0; i < 11; i++) {
+ if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
+ }
},
remove() {
- tech.is100Duplicate = false;
+ if (tech.is100Duplicate) {
+ tech.is100Duplicate = false;
+ if (this.count > 0) powerUps.research.changeRerolls(11)
+ }
}
},
+ // {
+ // name: "zero point energy",
+ // description: "use 2 research to
increase your maximum energy by 74",
+ // isFieldTech: true,
+ // maxCount: 1,
+ // count: 0,
+ // frequency: 3,
+ // frequencyDefault: 3,
+ // allowed() {
+ // return (m.fieldUpgrades[m.fieldMode].name === "standing wave harmonics" || m.fieldUpgrades[m.fieldMode].name === "pilot wave") && (build.isExperimentSelection || powerUps.research.count > 1)
+ // },
+ // requires: "standing wave harmonics or pilot wave",
+ // effect() {
+ // tech.harmonicEnergy = 0.74
+ // m.setMaxEnergy()
+ // for (let i = 0; i < 2; i++) {
+ // if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
+ // }
+ // },
+ // remove() {
+ // tech.harmonicEnergy = 0;
+ // m.setMaxEnergy()
+ // if (this.count > 0) powerUps.research.changeRerolls(2)
+ // }
+ // },
{
name: "exchange symmetry",
description: "convert 1 random tech into 3 new guns
recursive tech lose all stacks",
@@ -3835,6 +3887,7 @@
if (b.guns[i].name === "shotgun") {
b.guns[i].ammo = Math.ceil(b.guns[i].ammo * 0.5);
b.guns[i].ammoPack = b.guns[i].defaultAmmoPack * 0.5
+ simulation.makeGunHUD();
break;
}
}
@@ -3847,6 +3900,7 @@
if (b.guns[i].name === "shotgun") {
b.guns[i].ammoPack = b.guns[i].defaultAmmoPack;
b.guns[i].ammo = Math.ceil(b.guns[i].ammo * 2);
+ simulation.makeGunHUD();
break;
}
}
@@ -4455,7 +4509,7 @@
},
{
name: "sentry",
- description: "instead of detonating, mines target mobs
with a stream of nails for about 15 seconds",
+ description: "instead of detonating, mines target mobs
with a stream of nails for about 17 seconds",
isGunTech: true,
maxCount: 1,
count: 0,
@@ -4771,6 +4825,7 @@
if (b.guns[i].name === "drones") {
b.guns[i].ammoPack = b.guns[i].defaultAmmoPack * 0.25
b.guns[i].ammo = Math.ceil(b.guns[i].ammo * 0.25)
+ simulation.makeGunHUD();
}
}
},
@@ -4781,6 +4836,7 @@
if (b.guns[i].name === "drones") {
b.guns[i].ammoPack = b.guns[i].defaultAmmoPack
b.guns[i].ammo = b.guns[i].ammo * 4
+ simulation.makeGunHUD();
}
}
}
@@ -4845,7 +4901,7 @@
},
{
name: "uncertainty principle",
- description: "foam bubbles randomly change position
increase foam damage per second by 60%",
+ description: "foam bubbles randomly change position
increase foam damage per second by 55%",
isGunTech: true,
maxCount: 1,
count: 0,
@@ -4883,7 +4939,7 @@
},
{
name: "aerogel",
- description: "foam bubbles float and dissipate 50% faster
increase foam damage per second by 300%",
+ description: "foam bubbles float and dissipate 50% faster
increase foam damage per second by 260%",
isGunTech: true,
maxCount: 1,
count: 0,
@@ -4904,7 +4960,7 @@
},
{
name: "quantum foam",
- description: "foam gun fires 0.25 seconds into the future
increase foam gun damage by 70%",
+ description: "foam gun fires 0.25 seconds into the future
increase foam gun damage by 66%",
isGunTech: true,
maxCount: 9,
count: 0,
diff --git a/todo.txt b/todo.txt
index eb8e79c..851b087 100644
--- a/todo.txt
+++ b/todo.txt
@@ -1,9 +1,36 @@
******************************************************** NEXT PATCH **************************************************
20% damage for all mine modes
+laser mines spin super fast when it first finds a target, and a bit faster overall
+mine sentry lasts 17 seconds (2 more seconds)
+desublimated ammunition comes with 7 JUNK tech
+several foam tech do 5% less damage
+shotgun has 1/9 less ammo
+apomixis now requires 11 research
+historyBoss takes 25% longer to reach it's minimum follow distance
+
+bug fixes
******************************************************** TODO ********************************************************
+work on necroBoss from TheShwarma
+ make spawned blocks in the direction of the player
+ make it search the level for blocks, but also kinda avoid the player
+
+falling particle rain
+ what causes it?
+ after taking damage
+ mines
+ grenades
+ mines and grenades
+ once a second you just eject rain upwards
+ after collecting a power up
+ basically spores with no guidance
+ lag if too many particles?
+
+wormhole show where you would go on mouse down
+ trigger teleport on release
+
look into 360 wave beam lag
aoe effect pushes mobs away, then rapidly pulls them in