diff --git a/.DS_Store b/.DS_Store
index 82ef999..d519a28 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/js/bullet.js b/js/bullet.js
index 84e7341..fab7d0d 100644
--- a/js/bullet.js
+++ b/js/bullet.js
@@ -5390,7 +5390,7 @@ const b = {
name: "railgun",
description: "use energy to launch a high-speed dense rod
hold left mouse to charge, release to fire",
ammo: 0,
- ammoPack: 3.5,
+ ammoPack: 3.8,
have: false,
do() {},
fire() {
diff --git a/js/level.js b/js/level.js
index b3dbd1d..3e160e1 100644
--- a/js/level.js
+++ b/js/level.js
@@ -15,13 +15,13 @@ const level = {
// localSettings.levelsClearedLastGame = 10
// level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why
// simulation.isHorizontalFlipped = true
- // m.setField("negative mass")
+ // m.setField("time dilation")
// b.giveGuns("harpoon")
- // tech.giveTech("rotary cannon")
- // tech.giveTech("fragmentation")
- // tech.giveTech("rivet gun")
+ // tech.giveTech("retrocausality")
+ // tech.giveTech("causality bots")
+ // tech.giveTech("causality bombs")
// for (let i = 0; i < 2; i++) tech.giveTech("refractory metal")
- // tech.giveTech("all-stars")
+ // tech.giveTech("antiscience")
// for (let i = 0; i < 1; i++) tech.giveTech("reticulum")
// for (let i = 0; i < 2; i++) tech.giveTech("laser-bot")
// tech.isCancelDuplication = true
diff --git a/js/mob.js b/js/mob.js
index 20c8293..6a9e31d 100644
--- a/js/mob.js
+++ b/js/mob.js
@@ -45,7 +45,7 @@ const mobs = {
applySlow(who)
//look for mobs near the target
if (tech.isAoESlow) {
- const range2 = (180 + 170 * Math.random()) ** 2
+ const range2 = (200 + 170 * Math.random()) ** 2
for (let i = 0, len = mob.length; i < len; i++) {
if (who !== mob[i] && Vector.magnitudeSquared(Vector.sub(who.position, mob[i].position)) < range2 + mob[i].radius) applySlow(mob[i])
}
diff --git a/js/player.js b/js/player.js
index 9950837..b4655a3 100644
--- a/js/player.js
+++ b/js/player.js
@@ -133,6 +133,7 @@ const m = {
transX: 0,
transY: 0,
history: [], //tracks the last second of player position
+ rewindCount: 0, //used with CPT gun
resetHistory() {
for (let i = 0; i < 600; i++) { //reset history
m.history[i] = {
@@ -298,7 +299,7 @@ const m = {
},
alive: false,
switchWorlds() {
- const totalGuns = b.inventory.length - tech.isRewindGun //count guns, but not CPT gun
+ const totalGuns = b.inventory.length //- tech.isRewindGun //count guns, but not CPT gun
simulation.isTextLogOpen = false; //prevent console spam
//remove all tech and count current tech total
let totalTech = 0;
@@ -932,7 +933,7 @@ const m = {
holdingMassScale: 0,
hole: {
isOn: false,
- isReady: true,
+ isReady: false,
pos1: {
x: 0,
y: 0
@@ -983,7 +984,7 @@ const m = {
// m.setMaxEnergy();
m.hole = {
isOn: false,
- isReady: true,
+ isReady: false,
pos1: {
x: 0,
y: 0
@@ -2126,82 +2127,256 @@ 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
move and fire while time is stopped
but, collisions still do harm",
- effect: () => {
- // m.fieldMeterColor = "#000"
- m.fieldFire = true;
- m.isBodiesAsleep = false;
- m.drain = 0.0005
- m.hold = function() {
- if (m.isHolding) {
- m.wakeCheck();
- m.drawHold(m.holdingTarget);
- m.holding();
- m.throwBlock();
- } else if (input.field && m.fieldCDcycle < m.cycle) {
- m.grabPowerUp();
- m.lookForPickUp(180);
+ set() {
+ if (tech.isRewindField) {
+ this.rewindCount = 0
+ m.grabPowerUpRange2 = 300000
+ m.hold = function() {
+ if (m.isHolding) {
+ m.drawHold(m.holdingTarget);
+ m.holding();
+ m.throwBlock();
+ } else if (input.field && m.fieldCDcycle < m.cycle) { //not hold but field button is pressed
+ m.grabPowerUp();
+ if (this.rewindCount === 0) m.lookForPickUp();
- m.drain += 0.0000025
- if (m.energy > m.drain) {
- m.energy -= m.drain;
- if (m.energy < m.drain) {
- m.fieldCDcycle = m.cycle + 120;
- m.energy = 0;
+ if (!m.holdingTarget) {
+ this.rewindCount += 6;
+ const DRAIN = 0.001
+ let history = m.history[(m.cycle - this.rewindCount) % 600]
+ if (this.rewindCount > 599 || m.energy < DRAIN) {
+ this.rewindCount = 0;
+ m.resetHistory();
+ if (m.fireCDcycle < m.cycle + 60) m.fieldCDcycle = m.cycle + 60
+ m.immuneCycle = m.cycle //if you reach the end of the history disable harm immunity
+ } else {
+ //draw field everywhere
+ ctx.globalCompositeOperation = "saturation"
+ ctx.fillStyle = "#ccc";
+ ctx.fillRect(-100000, -100000, 200000, 200000)
+ ctx.globalCompositeOperation = "source-over"
+ // m.grabPowerUp(); //a second grab power up to make the power ups easier to grab, and they more fast which matches the time theme
+ m.energy -= DRAIN
+ if (m.immuneCycle < m.cycle + 60) m.immuneCycle = m.cycle + 60; //player is immune to damage for __ cycles
+ Matter.Body.setPosition(player, history.position);
+ Matter.Body.setVelocity(player, { x: history.velocity.x, y: history.velocity.y });
+ if (m.health < history.health) {
+ m.health = history.health
+ if (m.health > m.maxHealth) m.health = m.maxHealth
+ m.displayHealth();
+ }
+ m.yOff = history.yOff
+ if (m.yOff < 48) {
+ m.doCrouch()
+ } else {
+ m.undoCrouch()
+ }
+ //grab power ups
+ for (let i = 0, len = powerUp.length; i < len; ++i) {
+ if (
+ Vector.magnitudeSquared(Vector.sub(m.pos, powerUp[i].position)) < 100000 &&
+ !simulation.isChoosing &&
+ (powerUp[i].name !== "heal" || m.health !== m.maxHealth || tech.isOverHeal)
+ ) {
+ powerUps.onPickUp(powerUp[i]);
+ powerUp[i].effect();
+ Matter.Composite.remove(engine.world, powerUp[i]);
+ powerUp.splice(i, 1);
+ break; //because the array order is messed up after splice
+ }
+ }
+ if (!(this.rewindCount % 30)) {
+ if (tech.isRewindBot) {
+ for (let i = 0; i < tech.isRewindBot; i++) {
+ b.randomBot(m.pos, false, false)
+ bullet[bullet.length - 1].endCycle = simulation.cycle + 480 + Math.floor(120 * Math.random()) //8-9 seconds
+ }
+ }
+
+ if (tech.isRewindGrenade) {
+ b.grenade(m.pos, this.rewindCount) //Math.PI / 2
+ const who = bullet[bullet.length - 1]
+ // Matter.Body.setVelocity(who, {
+ // x: 0,
+ // y: 0
+ // });
+ who.endCycle = simulation.cycle + 60
+ // if (tech.isVacuumBomb) {
+ // Matter.Body.setVelocity(who, {
+ // x: who.velocity.x * 0.5,
+ // y: who.velocity.y * 0.5
+ // });
+ // } else if (tech.isRPG) {
+ // who.endCycle = simulation.cycle + 10
+ // } else if (tech.isNeutronBomb) {
+ // Matter.Body.setVelocity(who, {
+ // x: who.velocity.x * 0.3,
+ // y: who.velocity.y * 0.3
+ // });
+ // } else {
+ // Matter.Body.setVelocity(who, {
+ // x: who.velocity.x * 0.5,
+ // y: who.velocity.y * 0.5
+ // });
+ // who.endCycle = simulation.cycle + 30
+ // }
+ }
+
+
+ }
+ }
+ }
+ } else if (m.holdingTarget && m.fieldCDcycle < m.cycle) { //holding, but field button is released
+ m.pickUp();
+ this.rewindCount = 0;
+ } else {
+ 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)
+ this.rewindCount = 0;
+ }
+ m.drawFieldMeter()
+
+
+
+
+ // // console.log(this.rewindCount)
+ // if (input.field && m.fieldCDcycle < m.cycle) { //button has been held down
+ // if (m.isHolding) {
+ // m.drawHold(m.holdingTarget);
+ // m.holding();
+ // m.throwBlock();
+ // } else {
+ // m.grabPowerUp();
+ // m.lookForPickUp();
+ // if (!m.holdingTarget) {
+ // this.rewindCount += 8;
+ // const DRAIN = 0.001
+ // let history = m.history[(m.cycle - this.rewindCount) % 600]
+ // if (this.rewindCount > 599 || m.energy < DRAIN) {
+ // this.rewindCount = 0;
+ // m.resetHistory();
+ // } else {
+ // // m.grabPowerUp(); //a second grab power up to make the power ups easier to grab, and they more fast which matches the time theme
+ // m.energy -= DRAIN
+ // if (m.immuneCycle < m.cycle + 30) m.immuneCycle = m.cycle + 30; //player is immune to damage for 30 cycles
+ // Matter.Body.setPosition(player, history.position);
+ // Matter.Body.setVelocity(player, { x: history.velocity.x, y: history.velocity.y });
+ // if (m.health < history.health) {
+ // m.health = history.health
+ // m.displayHealth();
+ // }
+ // m.yOff = history.yOff
+ // if (m.yOff < 48) {
+ // m.doCrouch()
+ // } else {
+ // m.undoCrouch()
+ // }
+ // //grab power ups
+ // for (let i = 0, len = powerUp.length; i < len; ++i) {
+ // if (
+ // Vector.magnitudeSquared(Vector.sub(m.pos, powerUp[i].position)) < 100000 &&
+ // !simulation.isChoosing &&
+ // (powerUp[i].name !== "heal" || m.health !== m.maxHealth || tech.isOverHeal)
+ // ) {
+ // powerUps.onPickUp(powerUp[i]);
+ // powerUp[i].effect();
+ // Matter.Composite.remove(engine.world, powerUp[i]);
+ // powerUp.splice(i, 1);
+ // break; //because the array order is messed up after splice
+ // }
+ // }
+ // }
+ // }
+ // }
+ // } else { //button is held the first time
+ // this.rewindCount = 0;
+ // if (m.holdingTarget && m.fieldCDcycle < m.cycle) {
+ // m.pickUp();
+ // } else {
+ // 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)
+ // }
+ // }
+
+ }
+ } else {
+ m.fieldFire = true;
+ m.isBodiesAsleep = false;
+ m.drain = 0.0005
+ m.hold = function() {
+ if (m.isHolding) {
+ m.wakeCheck();
+ m.drawHold(m.holdingTarget);
+ m.holding();
+ m.throwBlock();
+ } else if (input.field && m.fieldCDcycle < m.cycle) {
+ m.grabPowerUp();
+ m.lookForPickUp();
+
+ m.drain += 0.0000025
+ if (m.energy > m.drain) {
+ m.energy -= m.drain;
+ if (m.energy < m.drain) {
+ m.fieldCDcycle = m.cycle + 120;
+ m.energy = 0;
+ m.wakeCheck();
+ }
+ //draw field everywhere
+ ctx.globalCompositeOperation = "saturation"
+ ctx.fillStyle = "#ccc";
+ ctx.fillRect(-100000, -100000, 200000, 200000)
+ ctx.globalCompositeOperation = "source-over"
+ //stop time
+ m.isBodiesAsleep = true;
+
+ function sleep(who) {
+ for (let i = 0, len = who.length; i < len; ++i) {
+ if (!who[i].isSleeping) {
+ who[i].storeVelocity = who[i].velocity
+ who[i].storeAngularVelocity = who[i].angularVelocity
+ }
+ Matter.Sleeping.set(who[i], true)
+ }
+ }
+ sleep(mob);
+ sleep(body);
+ sleep(bullet);
+
+ simulation.cycle--; //pause all functions that depend on game cycle increasing
+ if (tech.isTimeSkip) {
+ if (m.immuneCycle < m.cycle + 10) m.immuneCycle = m.cycle + 10;
+ simulation.isTimeSkipping = true;
+ m.cycle++;
+ simulation.gravity();
+ if (tech.isFireMoveLock && input.fire) {
+ player.force.x = 0
+ player.force.y = 0
+ }
+ Engine.update(engine, simulation.delta);
+ m.move();
+ simulation.checks();
+ m.walk_cycle += m.flipLegs * m.Vx;
+ b.fire();
+ b.bulletDo();
+ simulation.isTimeSkipping = false;
+ }
+ } else { //holding, but field button is released
m.wakeCheck();
}
- //draw field everywhere
- ctx.globalCompositeOperation = "saturation"
- ctx.fillStyle = "#ccc";
- ctx.fillRect(-100000, -100000, 200000, 200000)
- ctx.globalCompositeOperation = "source-over"
- //stop time
- m.isBodiesAsleep = true;
-
- function sleep(who) {
- for (let i = 0, len = who.length; i < len; ++i) {
- if (!who[i].isSleeping) {
- who[i].storeVelocity = who[i].velocity
- who[i].storeAngularVelocity = who[i].angularVelocity
- }
- Matter.Sleeping.set(who[i], true)
- }
- }
- sleep(mob);
- sleep(body);
- sleep(bullet);
-
- simulation.cycle--; //pause all functions that depend on game cycle increasing
- if (tech.isTimeSkip) {
- if (m.immuneCycle < m.cycle + 10) m.immuneCycle = m.cycle + 10;
- simulation.isTimeSkipping = true;
- m.cycle++;
- simulation.gravity();
- if (tech.isFireMoveLock && input.fire) {
- player.force.x = 0
- player.force.y = 0
- }
- Engine.update(engine, simulation.delta);
- m.move();
- simulation.checks();
- m.walk_cycle += m.flipLegs * m.Vx;
- b.fire();
- b.bulletDo();
- simulation.isTimeSkipping = false;
- }
- } else { //holding, but field button is released
+ } else if (m.holdingTarget && m.fieldCDcycle < m.cycle) { //holding, but field button is released
m.wakeCheck();
+ m.pickUp();
+ } else {
+ if (m.drain > 0.0005) m.drain -= 0.000005 //return drain to base level
+ m.wakeCheck();
+ 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)
}
- } else if (m.holdingTarget && m.fieldCDcycle < m.cycle) { //holding, but field button is released
- m.wakeCheck();
- m.pickUp();
- } else {
- if (m.drain > 0.0005) m.drain -= 0.000005 //return drain to base level
- m.wakeCheck();
- 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)
+ // console.log(m.drain.toFixed(6))
+ m.drawFieldMeter()
}
- // console.log(m.drain.toFixed(6))
- m.drawFieldMeter()
}
+ },
+ effect() {
+ // m.fieldMeterColor = "#000"
+ this.set();
}
},
{
@@ -2678,6 +2853,7 @@ const m = {
description: "use energy to tunnel through a wormhole
wormholes attract blocks and power ups
7% chance to duplicate spawned power ups", //
bullets may also traverse wormholes
effect: function() {
m.duplicateChance = 0.07
+ m.fieldRange = 0
powerUps.setDupChance(); //needed after adjusting duplication chance
m.hold = function() {
@@ -2785,7 +2961,7 @@ const m = {
body.splice(i, 1);
m.fieldRange *= 0.8
if (tech.isWormholeEnergy) m.energy += 0.63
- if (tech.isWormholeSpores) { //pandimensionalspermia
+ if (tech.isWormholeSpores) { //pandimensional spermia
for (let i = 0, len = Math.ceil(3 * (tech.isSporeWorm ? 0.5 : 1) * Math.random()); i < len; i++) {
if (tech.isSporeWorm) {
b.worm(Vector.add(m.hole.pos2, Vector.rotate({
@@ -2819,7 +2995,7 @@ const m = {
m.fieldRange *= 0.8
// if (tech.isWormholeEnergy && m.energy < m.maxEnergy * 2) m.energy = m.maxEnergy * 2
if (tech.isWormholeEnergy && m.immuneCycle < m.cycle) m.energy += 0.63
- if (tech.isWormholeSpores) { //pandimensionalspermia
+ if (tech.isWormholeSpores) { //pandimensional spermia
for (let i = 0, len = Math.ceil(3 * (tech.isSporeWorm ? 0.5 : 1) * Math.random()); i < len; i++) {
if (tech.isSporeWorm) {
b.worm(Vector.add(m.hole.pos1, Vector.rotate({
@@ -2871,12 +3047,60 @@ const m = {
}
}
- if (input.field && m.fieldCDcycle < m.cycle) { //not hold but field button is pressed
- const justPastMouse = Vector.add(Vector.mult(Vector.normalise(Vector.sub(simulation.mouseInGame, m.pos)), 50), simulation.mouseInGame)
+ if (m.fieldCDcycle < m.cycle) {
const scale = 60
- // console.log(Matter.Query.region(map, bounds))
- if (m.hole.isReady &&
- (
+ const justPastMouse = Vector.add(Vector.mult(Vector.normalise(Vector.sub(simulation.mouseInGame, m.pos)), 50), simulation.mouseInGame)
+ const sub = Vector.sub(simulation.mouseInGame, m.pos)
+ const mag = Vector.magnitude(sub)
+ const drain = tech.isFreeWormHole ? 0 : 0.06 + 0.006 * Math.sqrt(mag)
+ if (input.field) {
+ m.grabPowerUp();
+
+ //draw possible wormhole
+ if (mag > 250 && m.energy > drain) {
+ const unit = Vector.perp(Vector.normalise(sub))
+ const where = { x: m.pos.x + 30 * Math.cos(m.angle), y: m.pos.y + 30 * Math.sin(m.angle) }
+ m.fieldRange = 0.97 * m.fieldRange + 0.03 * (50 + 10 * Math.sin(simulation.cycle * 0.025))
+ const edge2a = Vector.add(Vector.mult(unit, 1.5 * m.fieldRange), simulation.mouseInGame)
+ const edge2b = Vector.add(Vector.mult(unit, -1.5 * m.fieldRange), simulation.mouseInGame)
+ ctx.beginPath();
+ ctx.moveTo(where.x, where.y)
+ ctx.bezierCurveTo(where.x, where.y, simulation.mouseInGame.x, simulation.mouseInGame.y, edge2a.x, edge2a.y);
+ ctx.moveTo(where.x, where.y)
+ ctx.bezierCurveTo(where.x, where.y, simulation.mouseInGame.x, simulation.mouseInGame.y, edge2b.x, edge2b.y);
+ if (
+ Matter.Query.region(map, {
+ min: {
+ x: simulation.mouseInGame.x - scale,
+ y: simulation.mouseInGame.y - scale
+ },
+ max: {
+ x: simulation.mouseInGame.x + scale,
+ y: simulation.mouseInGame.y + scale
+ }
+ }).length === 0 &&
+ Matter.Query.ray(map, m.pos, justPastMouse).length === 0
+ ) {
+ m.hole.isReady = true;
+ // ctx.fillStyle = "rgba(255,255,255,0.5)"
+ // ctx.fill();
+ ctx.lineWidth = 1
+ ctx.strokeStyle = "#000"
+ ctx.stroke();
+ } else {
+ m.hole.isReady = false;
+ ctx.lineWidth = 1
+ ctx.strokeStyle = "#000"
+ ctx.lineDashOffset = 30 * Math.random()
+ ctx.setLineDash([20, 40]);
+ ctx.stroke();
+ ctx.setLineDash([]);
+ }
+ }
+ } else {
+ //make new wormhole
+ if (
+ m.hole.isReady && mag > 250 && m.energy > drain &&
Matter.Query.region(map, {
min: {
x: simulation.mouseInGame.x - scale,
@@ -2888,15 +3112,7 @@ const m = {
}
}).length === 0 &&
Matter.Query.ray(map, m.pos, justPastMouse).length === 0
- // Matter.Query.ray(map, m.pos, simulation.mouseInGame).length === 0 &&
- // Matter.Query.ray(map, player.position, simulation.mouseInGame).length === 0 &&
- // Matter.Query.ray(map, player.position, justPastMouse).length === 0
- )
- ) {
- const sub = Vector.sub(simulation.mouseInGame, m.pos)
- const mag = Vector.magnitude(sub)
- const drain = tech.isFreeWormHole ? 0 : 0.06 + 0.006 * Math.sqrt(mag)
- if (m.energy > drain && mag > 300) {
+ ) {
m.energy -= drain
m.hole.isReady = false;
m.fieldRange = 0
@@ -2940,21 +3156,111 @@ const m = {
}
}
}
- } else {
- m.grabPowerUp();
}
- } else {
- m.grabPowerUp();
}
- // } else if (m.holdingTarget && m.fieldCDcycle < m.cycle) { //holding, but field button is released
- // m.pickUp();
- } else {
- m.hole.isReady = true;
}
+
+ // if (input.field && m.fieldCDcycle < m.cycle) { //not hold but field button is pressed
+ // const justPastMouse = Vector.add(Vector.mult(Vector.normalise(Vector.sub(simulation.mouseInGame, m.pos)), 50), simulation.mouseInGame)
+ // const scale = 60
+ // // console.log(Matter.Query.region(map, bounds))
+ // const sub = Vector.sub(simulation.mouseInGame, m.pos)
+ // const mag = Vector.magnitude(sub)
+ // const drain = tech.isFreeWormHole ? 0 : 0.06 + 0.006 * Math.sqrt(mag)
+ // if (m.hole.isReady && mag > 250 && m.energy > drain) {
+ // if (
+ // Matter.Query.region(map, {
+ // min: {
+ // x: simulation.mouseInGame.x - scale,
+ // y: simulation.mouseInGame.y - scale
+ // },
+ // max: {
+ // x: simulation.mouseInGame.x + scale,
+ // y: simulation.mouseInGame.y + scale
+ // }
+ // }).length === 0 &&
+ // Matter.Query.ray(map, m.pos, justPastMouse).length === 0
+ // // Matter.Query.ray(map, m.pos, simulation.mouseInGame).length === 0 &&
+ // // Matter.Query.ray(map, player.position, simulation.mouseInGame).length === 0 &&
+ // // Matter.Query.ray(map, player.position, justPastMouse).length === 0
+ // ) {
+ // m.energy -= drain
+ // m.hole.isReady = false;
+ // m.fieldRange = 0
+ // Matter.Body.setPosition(player, simulation.mouseInGame);
+ // m.buttonCD_jump = 0 //this might fix a bug with jumping
+ // const velocity = Vector.mult(Vector.normalise(sub), 20)
+ // Matter.Body.setVelocity(player, {
+ // x: velocity.x,
+ // y: velocity.y - 4 //an extra vertical kick so the player hangs in place longer
+ // });
+ // if (m.immuneCycle < m.cycle + 15) m.immuneCycle = m.cycle + 15; //player is immune to damage for 1/4 seconds
+ // // move bots to player
+ // for (let i = 0; i < bullet.length; i++) {
+ // if (bullet[i].botType) {
+ // Matter.Body.setPosition(bullet[i], Vector.add(player.position, {
+ // x: 250 * (Math.random() - 0.5),
+ // y: 250 * (Math.random() - 0.5)
+ // }));
+ // Matter.Body.setVelocity(bullet[i], {
+ // x: 0,
+ // y: 0
+ // });
+ // }
+ // }
+
+ // //set holes
+ // m.hole.isOn = true;
+ // m.hole.pos1.x = m.pos.x
+ // m.hole.pos1.y = m.pos.y
+ // m.hole.pos2.x = player.position.x
+ // m.hole.pos2.y = player.position.y
+ // m.hole.angle = Math.atan2(sub.y, sub.x)
+ // m.hole.unit = Vector.perp(Vector.normalise(sub))
+
+ // if (tech.isWormholeDamage) {
+ // who = Matter.Query.ray(mob, m.pos, simulation.mouseInGame, 100)
+ // for (let i = 0; i < who.length; i++) {
+ // if (who[i].body.alive) {
+ // mobs.statusDoT(who[i].body, 1, 420)
+ // mobs.statusStun(who[i].body, 360)
+ // }
+ // }
+ // }
+ // } else {
+ // //draw failed wormhole
+ // const unit = Vector.perp(Vector.normalise(Vector.sub(simulation.mouseInGame, m.pos)))
+ // const where = { x: m.pos.x + 30 * Math.cos(m.angle), y: m.pos.y + 30 * Math.sin(m.angle), }
+ // m.fieldRange = 0.97 * m.fieldRange + 0.03 * (50 + 10 * Math.sin(simulation.cycle * 0.025))
+ // const edge2a = Vector.add(Vector.mult(unit, 1.5 * m.fieldRange), simulation.mouseInGame)
+ // const edge2b = Vector.add(Vector.mult(unit, -1.5 * m.fieldRange), simulation.mouseInGame)
+ // ctx.beginPath();
+ // ctx.moveTo(where.x, where.y)
+ // ctx.bezierCurveTo(where.x, where.y, simulation.mouseInGame.x, simulation.mouseInGame.y, edge2a.x, edge2a.y);
+ // ctx.lineTo(edge2b.x, edge2b.y)
+ // ctx.bezierCurveTo(simulation.mouseInGame.x, simulation.mouseInGame.y, where.x, where.y, where.x, where.y);
+ // // ctx.fillStyle = "rgba(255,255,255,0.5)"
+ // // ctx.fill();
+ // ctx.lineWidth = 1
+ // ctx.strokeStyle = "#000"
+ // ctx.lineDashOffset = 30 * Math.random()
+ // ctx.setLineDash([20, 40]);
+ // ctx.stroke();
+ // ctx.setLineDash([]);
+ // }
+ // }
+ // m.grabPowerUp();
+ // } else {
+ // m.hole.isReady = true;
+ // }
+
+
+
+
m.drawFieldMeter()
}
},
- rewindCount: 0,
+
// rewind: function() {
// if (input.down) {
// if (input.field && m.fieldCDcycle < m.cycle) { //not hold but field button is pressed
diff --git a/js/powerup.js b/js/powerup.js
index ee114b3..f6c9254 100644
--- a/js/powerup.js
+++ b/js/powerup.js
@@ -292,6 +292,7 @@ const powerUps = {
document.body.style.cursor = "none";
// document.body.style.overflow = "hidden"
+ // if (m.alive){}
simulation.paused = false;
simulation.isChoosing = false; //stops p from un pausing on key down
if (m.immuneCycle < m.cycle + 15) m.immuneCycle = m.cycle + 15; //player is immune to damage for 30 cycles
diff --git a/js/simulation.js b/js/simulation.js
index 4bbbc32..672aec1 100644
--- a/js/simulation.js
+++ b/js/simulation.js
@@ -523,6 +523,8 @@ const simulation = {
// document.getElementById("choose-grid").style.display = "none"
document.getElementById("choose-grid").style.visibility = "hidden"
document.getElementById("choose-grid").style.opacity = "0"
+ document.getElementById("choose-background").style.visibility = "hidden"
+ document.getElementById("choose-background").style.opacity = "0"
document.getElementById("info").style.display = "inline";
document.getElementById("info").style.opacity = "0";
document.getElementById("experiment-button").style.display = "inline"
diff --git a/js/tech.js b/js/tech.js
index a2846fb..7c29da8 100644
--- a/js/tech.js
+++ b/js/tech.js
@@ -286,8 +286,8 @@
description: `increase damage by 19.95%
your inventory can only hold 1 gun`,
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return b.inventory.length === 1 //&& !tech.haveGunCheck("CPT gun")
},
@@ -316,8 +316,8 @@
description: "while your first gun is equipped
reduce harm by 13% for each of your guns",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return b.inventory.length > 1 && !tech.isEnergyHealth
},
@@ -401,6 +401,7 @@
maxCount: 1,
count: 0,
frequency: 1,
+ frequencyDefault: 1,
isNonRefundable: true,
// isExperimentHide: true,
isBadRandomOption: true,
@@ -423,8 +424,8 @@
maxCount: 1, //random power up
count: 0,
frequency: 1,
+ frequencyDefault: 1,
isNonRefundable: true,
- // isExperimentHide: true,
allowed() {
return b.inventory.length > 1
},
@@ -559,8 +560,8 @@
description: "reduce harm by 55% when crouching",
maxCount: 1,
count: 0,
- frequency: 4,
- frequencyDefault: 4,
+ frequency: 3,
+ frequencyDefault: 3,
allowed() {
return tech.isCrouchAmmo && !tech.isEnergyHealth
},
@@ -595,8 +596,8 @@
description: "while firing your position is locked
50% decreased delay after firing",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return !m.isShipMode && !tech.isAlwaysFire
},
@@ -619,8 +620,8 @@
description: "move and jump 30% faster
take 5% more harm",
maxCount: 9,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return true
},
@@ -677,8 +678,8 @@
description: "increase damage by up to 33% at a distance
of up to 50 player widths from the target",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return true
},
@@ -695,8 +696,8 @@
description: "increase damage by 20%
20% increased delay after firing",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return true
},
@@ -714,8 +715,8 @@
description: "30% decreased delay after firing",
maxCount: 9,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return true
},
@@ -754,8 +755,8 @@
description: "increase damage by 7%
for every 10 active projectiles",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return true
},
@@ -884,6 +885,7 @@
maxCount: 1,
count: 0,
frequency: 2,
+ frequencyDefault: 2,
isBadRandomOption: true,
allowed() {
return tech.hasExplosiveDamageCheck()
@@ -978,8 +980,8 @@
description: "some detonations and collisions eject nails
blocks, railgun, grenades, missiles, slugs, harpoon",
maxCount: 9,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return tech.haveGunCheck("harpoon") || (tech.haveGunCheck("grenades") && !tech.isNeutronBomb) || tech.haveGunCheck("missiles") || tech.missileBotCount || tech.haveGunCheck("railgun") || (tech.haveGunCheck("shotgun") && tech.isSlugShot) || tech.throwChargeRate > 1
},
@@ -1098,8 +1100,8 @@
description: "increase damage by 100%
after not using your gun or field for 2 seconds",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 3,
+ frequencyDefault: 3,
allowed() {
return tech.isNoFireDefense
},
@@ -1137,8 +1139,8 @@
description: "killing a mob resets your functional scrap bots
to 14 seconds of operation",
maxCount: 1,
count: 0,
- frequency: 1,
- frequencyDefault: 1,
+ frequency: 3,
+ frequencyDefault: 3,
isBotTech: true,
allowed() {
return tech.botSpawner
@@ -1183,8 +1185,8 @@
description: "convert all your bots to nail-bots
500% increased nail-bot fire rate",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 3,
+ frequencyDefault: 3,
isBotTech: true,
allowed() {
return tech.nailBotCount > 1 && !b.hasBotUpgrade()
@@ -1241,8 +1243,8 @@
description: "convert all your bots to foam-bots
250% increased foam size and fire rate",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 3,
+ frequencyDefault: 3,
isBotTech: true,
allowed() {
return tech.foamBotCount > 1 && !b.hasBotUpgrade()
@@ -1299,8 +1301,8 @@
description: "convert all your bots to boom-bots
250% increased explosion damage and size",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 3,
+ frequencyDefault: 3,
isBotTech: true,
allowed() {
return tech.boomBotCount > 1 && !b.hasBotUpgrade()
@@ -1357,8 +1359,8 @@
description: "convert all your bots to laser-bots
75% improved damage, efficiency, and range", // 400% increased laser-bot laser damage",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 3,
+ frequencyDefault: 3,
isBotTech: true,
allowed() {
return tech.laserBotCount > 1 && !b.hasBotUpgrade()
@@ -1415,8 +1417,8 @@
description: "convert all your bots to orbital-bots
increase damage by 250% and radius by 40%",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 3,
+ frequencyDefault: 3,
isBotTech: true,
allowed() {
return tech.orbitBotCount > 1 && !b.hasBotUpgrade()
@@ -1482,8 +1484,8 @@
description: "convert your bots to dynamo-bots
increase regen to 16 energy per second",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 3,
+ frequencyDefault: 3,
isBotTech: true,
allowed() {
return tech.dynamoBotCount > 1 && !b.hasBotUpgrade()
@@ -1519,9 +1521,9 @@
frequencyDefault: 2,
isBotTech: true,
allowed() {
- return powerUps.research.count > 2 || build.isExperimentSelection
+ return powerUps.research.count > 1 || build.isExperimentSelection
},
- requires: "at least 3 research",
+ requires: "at least 2 research",
effect() {
tech.isRerollBots = true;
powerUps.research.changeRerolls(0)
@@ -1529,6 +1531,7 @@
},
remove() {
tech.isRerollBots = false;
+ this.description = `if you collect ${powerUps.orb.research(2 + Math.floor(0.2 * b.totalBots()))}use them to build a
random bot (+1 cost every 5 bots)`
}
},
{
@@ -1571,9 +1574,9 @@
frequencyDefault: 2,
isBotTech: true,
allowed() {
- return b.totalBots() > 3 && !tech.isEnergyHealth
+ return b.totalBots() > 2 && !tech.isEnergyHealth
},
- requires: "at least 4 bots",
+ requires: "at least 3 bots",
effect() {
tech.isBotArmor = true
},
@@ -1590,9 +1593,9 @@
frequencyDefault: 2,
isBotTech: true,
allowed() {
- return b.totalBots() > 3
+ return b.totalBots() > 2
},
- requires: "at least 4 bots",
+ requires: "at least 3 bots",
effect() {
tech.isBotDamage = true
},
@@ -1663,8 +1666,8 @@
description: "charge throws more quickly for less energy
increase block collision damage by 200%",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return m.fieldUpgrades[m.fieldMode].name !== "wormhole"
},
@@ -2066,8 +2069,8 @@
description: `freeze all mobs for 7 seconds
after receiving harm`,
maxCount: 1,
count: 0,
- frequency: 3,
- frequencyDefault: 3,
+ frequency: 2,
+ frequencyDefault: 2,
allowed() {
return tech.isSlowFPS
},
@@ -2102,8 +2105,8 @@
description: "reduce harm by 33%
after dying, continue in an alternate reality",
maxCount: 1,
count: 0,
- frequency: 3,
- frequencyDefault: 3,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return true
},
@@ -2142,8 +2145,8 @@
description: "rebuild your broken parts as drones
chance to occur after receiving harm",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return m.harmReduction() < 1
},
@@ -2203,7 +2206,7 @@
frequency: 2,
frequencyDefault: 2,
allowed() { //&& (m.fieldUpgrades[m.fieldMode].name !== "molecular assembler" || m.maxEnergy > 1)
- return m.maxEnergy > 0.99 && m.fieldUpgrades[m.fieldMode].name !== "standing wave" && !tech.isEnergyHealth && !tech.isRewindGun
+ return m.maxEnergy > 0.99 && m.fieldUpgrades[m.fieldMode].name !== "standing wave" && !tech.isEnergyHealth && !tech.isRewindField //&& !tech.isRewindGun
},
requires: "not standing wave, mass-energy, max energy reduction, CPT gun",
effect() {
@@ -2223,9 +2226,9 @@
frequencyDefault: 2,
isBotTech: true,
allowed() {
- return tech.isRewindAvoidDeath
+ return tech.isRewindAvoidDeath || tech.isRewindField
},
- requires: "CPT",
+ requires: "CPT, retrocausality",
effect() {
tech.isRewindBot++;
},
@@ -2236,15 +2239,15 @@
{
name: "causality bombs",
link: `causality bombs`,
- description: "before you rewind drop several grenades
become immune to harm until they explode",
+ description: "when you rewind drop several grenades
become immune to harm until they explode",
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
- return tech.isRewindAvoidDeath
+ return tech.isRewindAvoidDeath || tech.isRewindField
},
- requires: "CPT",
+ requires: "CPT, retrocausality",
effect() {
tech.isRewindGrenade = true;
},
@@ -2299,7 +2302,7 @@
frequency: 1,
frequencyDefault: 1,
allowed() {
- return !tech.isZeno && !tech.isNoHeals && !tech.isPiezo && !tech.isRewindAvoidDeath && !tech.isRewindGun && !tech.isTechDamage && !tech.isMutualism //&& !tech.isAmmoFromHealth
+ return !tech.isZeno && !tech.isNoHeals && !tech.isPiezo && !tech.isRewindAvoidDeath && !tech.isTechDamage && !tech.isMutualism //&& !tech.isAmmoFromHealth && !tech.isRewindGun
},
requires: "not Zeno, ergodicity, piezoelectricity, CPT, rewind gun, antiscience, mutualism",
effect: () => {
@@ -2392,8 +2395,8 @@
description: "increase damage by 1%
for every 11 stored energy",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return true
},
@@ -2428,8 +2431,8 @@
description: "increase damage by 50%
if a mob dies drain energy by 25%",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return true
},
@@ -2446,8 +2449,8 @@
description: `increase damage by 50%, but
reduce maximum energy by 50`,
maxCount: 1,
count: 0,
- frequency: 4,
- frequencyDefault: 4,
+ frequency: 3,
+ frequencyDefault: 3,
allowed() {
return tech.isEnergyLoss && !tech.isRewindAvoidDeath
},
@@ -2466,8 +2469,8 @@
description: `increase damage by 5%
for every 10 energy below 100`,
maxCount: 1,
count: 0,
- frequency: 4,
- frequencyDefault: 4,
+ frequency: 3,
+ frequencyDefault: 3,
allowed() {
return tech.isEnergyLoss && m.maxEnergy < 1.01
},
@@ -2626,8 +2629,8 @@
// description: "every 5 seconds remove 1/10 of your health
reduce harm by 90%",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return !tech.isEnergyHealth
},
@@ -2717,8 +2720,8 @@
description: "increase your maximum health by 100
landings that force you to crouch cause harm",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return !tech.isEnergyHealth
},
@@ -2738,8 +2741,8 @@
description: `over healing from ${powerUps.orb.heal()} does harm
but it also increase your maximum health`,
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return !tech.isEnergyHealth && !tech.isNoHeals
},
@@ -2772,11 +2775,11 @@
},
{
name: "adiabatic healing",
- description: `${powerUps.orb.heal()} are 100% more effective`,
+ description: `${powerUps.orb.heal()} are 100% more effective
+5% JUNK to the potential tech pool`,
maxCount: 3,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
isHealTech: true,
allowed() {
return ((m.health / m.maxHealth) < 0.7 || build.isExperimentSelection) && !tech.isEnergyHealth && !tech.isNoHeals
@@ -2784,9 +2787,15 @@
requires: "under 70% health, not mass-energy equivalence, ergodicity",
effect() {
tech.largerHeals++;
+ this.refundAmount += tech.addJunkTechToPool(0.05)
},
+ refundAmount: 0,
remove() {
tech.largerHeals = 1;
+ if (this.count > 0 && this.refundAmount > 0) {
+ tech.removeJunkTechFromPool(this.refundAmount)
+ this.refundAmount = 0
+ }
}
},
{
@@ -2821,8 +2830,8 @@
description: `once per level, instead of dying
use ${powerUps.orb.research(1)} and spawn ${powerUps.orb.heal(5)}`,
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
isHealTech: true,
allowed() {
return powerUps.research.count > 0 || build.isExperimentSelection
@@ -3007,8 +3016,8 @@
description: `after choosing a field, tech, or gun
spawn ${powerUps.orb.research(2)}if you have 0 ${powerUps.orb.research(1)} in your inventory`,
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return powerUps.research.count === 0 && !tech.isSuperDeterminism && !tech.isRerollHaste && !tech.isResearchReality
},
@@ -3255,8 +3264,8 @@
description: "your chance to duplicate power ups
increases your damage by the same percent",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return tech.duplicationChance() > 0.15
},
@@ -3273,8 +3282,8 @@
description: " bosses have a 2x chance to be duplicated, but their
health is increased by your duplication chance",
maxCount: 1,
count: 0,
- frequency: 2,
- frequencyDefault: 2,
+ frequency: 1,
+ frequencyDefault: 1,
allowed() {
return tech.duplicationChance() > 0 && !tech.isResearchBoss
},
@@ -3291,8 +3300,8 @@
description: `when you reach 100% duplication
spawn 8 bosses with 100% more health`,
maxCount: 1,
count: 0,
- frequency: 3,
- frequencyDefault: 3,
+ frequency: 2,
+ frequencyDefault: 2,
allowed() {
return tech.duplicationChance() > 0.33
},
@@ -3305,34 +3314,9 @@
tech.is100Duplicate = false;
}
},
- // {
- // 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" || m.fieldUpgrades[m.fieldMode].name === "pilot wave") && (build.isExperimentSelection || powerUps.research.count > 1)
- // },
- // requires: "standing wave 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",
+ description: "convert 1 random tech into 2 new guns
recursive tech lose all stacks",
maxCount: 1,
count: 0,
frequency: 1,
@@ -3354,7 +3338,7 @@
powerUps.spawn(m.pos.x, m.pos.y, "gun");
}
powerUps.spawn(m.pos.x, m.pos.y, "gun");
- powerUps.spawn(m.pos.x, m.pos.y, "gun");
+ // powerUps.spawn(m.pos.x, m.pos.y, "gun");
tech.tech[choose].count = 0;
tech.tech[choose].remove(); // remove a random tech form the list of tech you have
tech.tech[choose].isLost = true
@@ -3372,9 +3356,9 @@
isNonRefundable: true,
isBadRandomOption: true,
allowed() {
- return (tech.totalCount > 3) && !tech.isSuperDeterminism && tech.duplicationChance() > 0
+ return (tech.totalCount > 3) && !tech.isSuperDeterminism
},
- requires: "NOT EXPERIMENT MODE, at least 4 tech, a chance to duplicate power ups, not superdeterminism",
+ requires: "NOT EXPERIMENT MODE, at least 4 tech, not superdeterminism",
effect: () => {
const removeTotal = tech.removeTech()
for (let i = 0; i < removeTotal + 1; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "tech");
@@ -3506,7 +3490,7 @@
},
{
name: "cross disciplinary",
- description: "tech have an extra field or gun choice", //
+7 JUNK to the potential tech pool //
spawn 2 research
+ description: "tech have an extra field or gun choice",
maxCount: 1,
count: 0,
frequency: 1,
@@ -3527,7 +3511,7 @@
},
{
name: "emergence",
- description: "tech, fields, and guns have 5 choices
+5 JUNK to the potential tech pool",
+ description: "tech, fields, and guns have 5 choices
+5% JUNK to the potential tech pool",
maxCount: 1,
count: 0,
frequency: 1,
@@ -3590,8 +3574,8 @@
description: `spawn 5 tech
${powerUps.orb.research(1)}, guns, and fields no longer spawn`,
maxCount: 1,
count: 0,
- frequency: 8,
- frequencyDefault: 8,
+ frequency: 5,
+ frequencyDefault: 5,
isBadRandomOption: true,
allowed() {
return tech.isDeterminism && !tech.isAnsatz && !tech.isGunSwitchField
@@ -3670,51 +3654,51 @@
//************************************************** gun
//************************************************** tech
//**************************************************
- {
- name: "CPT gun",
- link: `CPT gun`,
- description: `adds the CPT gun to your inventory
it rewinds your health, velocity, and position`,
- isGunTech: true,
- maxCount: 1,
- count: 0,
- frequency: 2,
- frequencyDefault: 2,
- allowed() {
- return (b.totalBots() > 3 || m.fieldUpgrades[m.fieldMode].name === "molecular assembler" || m.fieldUpgrades[m.fieldMode].name === "plasma torch" || m.fieldUpgrades[m.fieldMode].name === "pilot wave") && !tech.isEnergyHealth && !tech.isRewindAvoidDeath //build.isExperimentSelection ||
- },
- requires: "bots > 3, plasma torch, assembler, pilot wave, not mass-energy equivalence, CPT",
- effect() {
- tech.isRewindGun = true
- b.guns.push(b.gunRewind)
- b.giveGuns("CPT gun");
- },
- remove() {
- if (tech.isRewindGun) {
- b.removeGun("CPT gun", true)
- // for (let i = 0; i < b.guns.length; i++) {
- // if (b.guns[i].name === "CPT gun") {
- // b.guns[i].have = false
- // for (let j = 0; j < b.inventory.length; j++) {
- // if (b.inventory[j] === i) {
- // b.inventory.splice(j, 1)
- // break
- // }
- // }
- // if (b.inventory.length) {
- // b.activeGun = b.inventory[0];
- // } else {
- // b.activeGun = null;
- // }
- // simulation.makeGunHUD();
+ // {
+ // name: "CPT gun",
+ // link: `CPT gun`,
+ // description: `adds the CPT gun to your inventory
it rewinds your health, velocity, and position`,
+ // isGunTech: true,
+ // maxCount: 1,
+ // count: 0,
+ // frequency: 2,
+ // frequencyDefault: 2,
+ // allowed() {
+ // return (b.totalBots() > 3 || m.fieldUpgrades[m.fieldMode].name === "molecular assembler" || m.fieldUpgrades[m.fieldMode].name === "plasma torch" || m.fieldUpgrades[m.fieldMode].name === "pilot wave") && !tech.isEnergyHealth && !tech.isRewindAvoidDeath //build.isExperimentSelection ||
+ // },
+ // requires: "bots > 3, plasma torch, assembler, pilot wave, not mass-energy equivalence, CPT",
+ // effect() {
+ // tech.isRewindGun = true
+ // b.guns.push(b.gunRewind)
+ // b.giveGuns("CPT gun");
+ // },
+ // remove() {
+ // if (tech.isRewindGun) {
+ // b.removeGun("CPT gun", true)
+ // // for (let i = 0; i < b.guns.length; i++) {
+ // // if (b.guns[i].name === "CPT gun") {
+ // // b.guns[i].have = false
+ // // for (let j = 0; j < b.inventory.length; j++) {
+ // // if (b.inventory[j] === i) {
+ // // b.inventory.splice(j, 1)
+ // // break
+ // // }
+ // // }
+ // // if (b.inventory.length) {
+ // // b.activeGun = b.inventory[0];
+ // // } else {
+ // // b.activeGun = null;
+ // // }
+ // // simulation.makeGunHUD();
- // b.guns.splice(i, 1) //also remove CPT gun from gun pool array
- // break
- // }
- // }
- tech.isRewindGun = false
- }
- }
- },
+ // // b.guns.splice(i, 1) //also remove CPT gun from gun pool array
+ // // break
+ // // }
+ // // }
+ // tech.isRewindGun = false
+ // }
+ // }
+ // },
{
name: "needle ice",
description: `when needles impact walls
they chip off 1-2 freezing ice IX crystals`,
@@ -5883,9 +5867,9 @@
frequency: 2,
frequencyDefault: 2,
allowed() {
- return m.fieldUpgrades[m.fieldMode].name === "pilot wave" || m.fieldUpgrades[m.fieldMode].name === "negative mass" || m.fieldUpgrades[m.fieldMode].name === "time dilation"
+ return m.fieldUpgrades[m.fieldMode].name === "pilot wave" || m.fieldUpgrades[m.fieldMode].name === "negative mass" || (m.fieldUpgrades[m.fieldMode].name === "time dilation" && !tech.isRewindField)
},
- requires: "pilot wave, negative mass, time dilation",
+ requires: "pilot wave, negative mass, time dilation, not retrocausality",
effect() {
tech.isFreezeMobs = true
},
@@ -6255,6 +6239,52 @@
tech.extruderRange = 15
}
},
+ // {
+ // name: "CPT gun",
+ // link: `CPT gun`,
+ // description: `adds the CPT gun to your inventory
it rewinds your health, velocity, and position`,
+ // isGunTech: true,
+ // maxCount: 1,
+ // count: 0,
+ // frequency: 2,
+ // frequencyDefault: 2,
+ // allowed() {
+ // return (b.totalBots() > 3 || m.fieldUpgrades[m.fieldMode].name === "molecular assembler" || m.fieldUpgrades[m.fieldMode].name === "plasma torch" || m.fieldUpgrades[m.fieldMode].name === "pilot wave") && !tech.isEnergyHealth && !tech.isRewindAvoidDeath //build.isExperimentSelection ||
+ // },
+ // requires: "bots > 3, plasma torch, assembler, pilot wave, not mass-energy equivalence, CPT",
+ // effect() {
+ // tech.isRewindGun = true
+ // b.guns.push(b.gunRewind)
+ // b.giveGuns("CPT gun");
+ // },
+ // remove() {
+ // if (tech.isRewindGun) {
+ // b.removeGun("CPT gun", true)
+ // tech.isRewindGun = false
+ // }
+ // }
+ // },
+ {
+ name: "retrocausality",
+ description: "time dilation uses energy to rewind your
health, velocity, and position up to 10 s",
+ isFieldTech: true,
+ maxCount: 1,
+ count: 0,
+ frequency: 2,
+ frequencyDefault: 2,
+ allowed() {
+ return m.fieldUpgrades[m.fieldMode].name === "time dilation" && !m.isShipMode && !tech.isRewindAvoidDeath && !tech.isEnergyHealth && !tech.isTimeSkip && !tech.isFreezeMobs
+ },
+ requires: "time dilation, not CPT symmetry, mass-energy, timelike, Bose Einstein condensate",
+ effect() {
+ tech.isRewindField = true;
+ m.fieldUpgrades[m.fieldMode].set()
+ },
+ remove() {
+ tech.isRewindField = false;
+ if (this.count) m.fieldUpgrades[m.fieldMode].set()
+ }
+ },
{
name: "timelike",
description: "time dilation doubles your relative time rate
and makes you immune to harm",
@@ -6264,9 +6294,9 @@
frequency: 2,
frequencyDefault: 2,
allowed() {
- return m.fieldUpgrades[m.fieldMode].name === "time dilation" && !m.isShipMode
+ return m.fieldUpgrades[m.fieldMode].name === "time dilation" && !m.isShipMode && !tech.isRewindField
},
- requires: "time dilation",
+ requires: "time dilation, not retrocausality",
effect() {
tech.isTimeSkip = true;
b.setFireCD();
@@ -8679,7 +8709,7 @@
isRewindGrenade: null,
isExtruder: null,
isEndLevelPowerUp: null,
- isRewindGun: null,
+ // isRewindGun: null,
missileSize: null,
isLaserMine: null,
isAmmoFoamSize: null,
@@ -8791,5 +8821,6 @@
baseJumpForce: null,
baseFx: null,
isNeutronium: null,
- isFreeWormHole: null
+ isFreeWormHole: null,
+ isRewindField: null
}
\ No newline at end of file
diff --git a/todo.txt b/todo.txt
index 42b7e5c..2e08075 100644
--- a/todo.txt
+++ b/todo.txt
@@ -1,20 +1,32 @@
******************************************************** NEXT PATCH **************************************************
-field tech balance:
- pilot wave has access to more field tech: time crystals, WIMPs, no-cloning
- time dilation: can get symbiosis
- flux pinning: 2s -> 4s stun on blocking
- zero point energy: 74 energy -> 100 energy
- tessellation: 4->2 research cost
- bremsstrahlung: 33% more damage
- triple point: 50% more ice
+time dilation tech: retrocausality - instead of pausing time your field rewinds time, including your health
+ this tech replaces replaces CPT gun
+ works well with tech: causality bots and grenades
- bug fixes
+wormhole
+ activated on mouse up
+ draw an outline of the wormhole to show if can work at your mouse location
+
+adiabatic healing: adds 5% JUNK in addition to 100% better heals
+
+several tech pool frequencies have been adjusted to roughly this rule:
+ no requirements: 1x chance
+ requirements: 2x chance
+ (most gun and field tech)
+ strict requirements: 3x chance or higher
+
+bug fixes
******************************************************** TODO ********************************************************
-tech perfect diamagnetism - holding the field makes the field slowly travel forward
- could be base effect
+make causality bots and bombs work with retrocausality
+
+tech: after bullets hit a mob, the mob takes 1% more damage
+ this.damageReduction *= 1.01
+
+make CPT gun a tech for time dilation field
+ tech: CPT - time dilation field rewinds your health velocity and position
bug - death while paused crashes game?
@@ -53,13 +65,6 @@ be nice if block throwing had a projected path
JUNK tech: planetesimals game inside n-gon
https://codepen.io/lilgreenland/pen/jrMvaB?editors=0010
-on mouse down wormhole shows a possible wormhole
- on mouse up the wormhole becomes real
-make the player get a buff after using wormhole
- while energy lasts: drain energy and give damage buff
-using wormhole makes you immune to harm and drains energy until you run out
- disable incoming energy, by saving current energy and just setting energy in the next cycle to be lower then the saved value
-
Pilot wave tech
Energy use is increased, but you can now shape blocks using pressure
Grouping blocks will merge them into a massive ball