4 community levels

new community levels: (you can enable community maps in the settings)
  rings by thatLittleFrog
  flappyGon by Digin
  trial by Cirryn and Tarantula Hawk
  arena level updated by Whyisthisnotavalable

difficulty scaling:  0.84->0.85x player damage per level
research spawn per level is no longer in the difficulty settings
  instead players get 1 research for only the first few levels
cell boss has less health at high difficulty

converted JUNK tech to additive, instead of the multiplicative
  makes the first JUNK you take do the same, but if you take too much you can get to 100%
right aligned some text in tech descriptions
added some circles to the in-game console messages

renamed slow light -> delayed-choice - a single 0.4 second delayed 0.7x damage laser beam
  also now works with reflection
plasma torch field gets 1.5x damage by default
molecular assembler coupling 0.8->0.6 energy per second
nail-bot upgrade 5->4x fire rate
foam-bot upgrade 3->2.5x size and fire rate
sound-bot upgrade 2.5->2x fire rate, damage, 1->2x wave packet length
boom-bot upgrade reduced range, bot acceleration
orbital-bot upgrade 1.5->2x radius
perimeter defense 0.95->0.96x damage taken per bot
network effect 1.05->1.04x damage per bot
tech: working mass - cleaned up physics and logic a bit
negative feedback scales with health below maxHealth, not health below 100
  1.007->1.006x damage per missing health
homeostasis scales with missing health, not health below 100
  limit of 0.2x at 0 health
This commit is contained in:
landgreen
2024-06-20 19:13:51 -07:00
parent 1903b9e938
commit 5e12cea685
10 changed files with 2181 additions and 881 deletions

View File

@@ -198,7 +198,7 @@ const b = {
} }
if (gunTechPool.length) { if (gunTechPool.length) {
const index = Math.floor(Math.random() * gunTechPool.length) const index = Math.floor(Math.random() * gunTechPool.length)
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[gunTechPool[index]].name}</span>")`) simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<strong class='color-text'>${tech.tech[gunTechPool[index]].name}</strong>")`)
tech.giveTech(gunTechPool[index]) // choose from the gun pool tech.giveTech(gunTechPool[index]) // choose from the gun pool
} else { } else {
tech.giveTech() //get normal tech if you can't find any gun tech tech.giveTech() //get normal tech if you can't find any gun tech
@@ -370,7 +370,7 @@ const b = {
} }
}, },
explosionRange() { explosionRange() {
return tech.explosiveRadius * (tech.isExplosionHarm ? 1.7 : 1) * (tech.isSmallExplosion ? 0.66 : 1) * (tech.isExplodeRadio ? 1.25 : 1) return tech.explosiveRadius * (tech.isExplosionHarm ? 1.7 : 1) * (tech.isSmallExplosion ? 0.7 : 1) * (tech.isExplodeRadio ? 1.25 : 1)
}, },
explosion(where, radius, color = "rgba(255,25,0,0.6)") { // typically explode is used for some bullets with .onEnd explosion(where, radius, color = "rgba(255,25,0,0.6)") { // typically explode is used for some bullets with .onEnd
radius *= tech.explosiveRadius radius *= tech.explosiveRadius
@@ -380,8 +380,8 @@ const b = {
if (tech.isExplosionHarm) radius *= 1.7 // 1/sqrt(2) radius -> area if (tech.isExplosionHarm) radius *= 1.7 // 1/sqrt(2) radius -> area
if (tech.isSmallExplosion) { if (tech.isSmallExplosion) {
// color = "rgba(255,0,30,0.7)" // color = "rgba(255,0,30,0.7)"
radius *= 0.66 radius *= 0.7
dmg *= 1.66 dmg *= 1.7
} }
if (tech.isExplodeRadio) { //radiation explosion if (tech.isExplodeRadio) { //radiation explosion
@@ -2374,22 +2374,8 @@ const b = {
}, dmg = tech.laserDamage, reflections = tech.laserReflections, isThickBeam = false, push = 1) { }, dmg = tech.laserDamage, reflections = tech.laserReflections, isThickBeam = false, push = 1) {
const reflectivity = 1 - 1 / (reflections * 3) const reflectivity = 1 - 1 / (reflections * 3)
let damage = m.dmgScale * dmg let damage = m.dmgScale * dmg
let best = { x: 1, y: 1, dist2: Infinity, who: null, v1: 1, v2: 1 };
let best = { const path = [{ x: where.x, y: where.y }, { x: whereEnd.x, y: whereEnd.y }];
x: 1,
y: 1,
dist2: Infinity,
who: null,
v1: 1,
v2: 1
};
const path = [{
x: where.x,
y: where.y
}, {
x: whereEnd.x,
y: whereEnd.y
}];
const checkForCollisions = function () { const checkForCollisions = function () {
best = vertexCollision(path[path.length - 2], path[path.length - 1], [mob, map, body]); best = vertexCollision(path[path.length - 2], path[path.length - 1], [mob, map, body]);
@@ -4760,7 +4746,6 @@ const b = {
} }
}, },
dynamoBot(position = player.position, isKeep = true) { dynamoBot(position = player.position, isKeep = true) {
// if (isKeep) simulation.makeTextLog(`<span class='color-var'>b</span>.dynamoBot()`);
const me = bullet.length; const me = bullet.length;
bullet[me] = Bodies.polygon(position.x, position.y, 5, 10, { bullet[me] = Bodies.polygon(position.x, position.y, 5, 10, {
isUpgraded: tech.isDynamoBotUpgrade, isUpgraded: tech.isDynamoBotUpgrade,
@@ -4862,7 +4847,6 @@ const b = {
b.setDynamoBotDelay() b.setDynamoBotDelay()
}, },
nailBot(position = { x: player.position.x + 50 * (Math.random() - 0.5), y: player.position.y + 50 * (Math.random() - 0.5) }, isKeep = true) { nailBot(position = { x: player.position.x + 50 * (Math.random() - 0.5), y: player.position.y + 50 * (Math.random() - 0.5) }, isKeep = true) {
// if (isKeep) simulation.makeTextLog(`<span class='color-var'>b</span>.nailBot()`);
const me = bullet.length; const me = bullet.length;
const dir = m.angle; const dir = m.angle;
const RADIUS = (12 + 4 * Math.random()) const RADIUS = (12 + 4 * Math.random())
@@ -4878,7 +4862,7 @@ const b = {
minDmgSpeed: 2, minDmgSpeed: 2,
// lookFrequency: 56 + Math.floor(17 * Math.random()) - isUpgraded * 20, // lookFrequency: 56 + Math.floor(17 * Math.random()) - isUpgraded * 20,
lastLookCycle: simulation.cycle + 60 * Math.random(), lastLookCycle: simulation.cycle + 60 * Math.random(),
delay: Math.floor((tech.isNailBotUpgrade ? 18 : 85)), delay: Math.floor((tech.isNailBotUpgrade ? 22 : 85)),
acceleration: (isKeep ? 0.005 : 0.001) * (1 + 0.5 * Math.random()), acceleration: (isKeep ? 0.005 : 0.001) * (1 + 0.5 * Math.random()),
range: 60 * (1 + 0.3 * Math.random()) + 3 * b.totalBots() + !isKeep * 100, range: 60 * (1 + 0.3 * Math.random()) + 3 * b.totalBots() + !isKeep * 100,
endCycle: Infinity, endCycle: Infinity,
@@ -4927,7 +4911,6 @@ const b = {
Composite.add(engine.world, bullet[me]); //add bullet to world Composite.add(engine.world, bullet[me]); //add bullet to world
}, },
missileBot(position = { x: player.position.x + 50 * (Math.random() - 0.5), y: player.position.y + 50 * (Math.random() - 0.5) }, isKeep = true) { missileBot(position = { x: player.position.x + 50 * (Math.random() - 0.5), y: player.position.y + 50 * (Math.random() - 0.5) }, isKeep = true) {
// if (isKeep) simulation.makeTextLog(`<span class='color-var'>b</span>.missileBot()`);
const me = bullet.length; const me = bullet.length;
bullet[me] = Bodies.rectangle(position.x, position.y, 28, 11, { bullet[me] = Bodies.rectangle(position.x, position.y, 28, 11, {
botType: "missile", botType: "missile",
@@ -4998,7 +4981,6 @@ const b = {
Composite.add(engine.world, bullet[me]); //add bullet to world Composite.add(engine.world, bullet[me]); //add bullet to world
}, },
foamBot(position = { x: player.position.x + 50 * (Math.random() - 0.5), y: player.position.y + 50 * (Math.random() - 0.5) }, isKeep = true) { foamBot(position = { x: player.position.x + 50 * (Math.random() - 0.5), y: player.position.y + 50 * (Math.random() - 0.5) }, isKeep = true) {
// if (isKeep) simulation.makeTextLog(`<span class='color-var'>b</span>.foamBot()`);
const me = bullet.length; const me = bullet.length;
const dir = m.angle; const dir = m.angle;
const RADIUS = (10 + 5 * Math.random()) const RADIUS = (10 + 5 * Math.random())
@@ -5016,7 +4998,7 @@ const b = {
cd: 0, cd: 0,
fireCount: 0, fireCount: 0,
fireLimit: 5 + 2 * tech.isFoamBotUpgrade, fireLimit: 5 + 2 * tech.isFoamBotUpgrade,
delay: Math.floor((145 + (tech.isFoamBotUpgrade ? 0 : 230))),// + 30 - 20 * tech.isFoamBotUpgrade,//20 + Math.floor(85 * b.fireCDscale) - 20 * tech.isFoamBotUpgrade, delay: Math.floor((200 + (tech.isFoamBotUpgrade ? 0 : 200))),// + 30 - 20 * tech.isFoamBotUpgrade,//20 + Math.floor(85 * b.fireCDscale) - 20 * tech.isFoamBotUpgrade,
acceleration: (isKeep ? 0.005 : 0.001) * (1 + 0.5 * Math.random()), acceleration: (isKeep ? 0.005 : 0.001) * (1 + 0.5 * Math.random()),
range: 60 * (1 + 0.3 * Math.random()) + 3 * b.totalBots() + !isKeep * 100, //how far from the player the bot will move range: 60 * (1 + 0.3 * Math.random()) + 3 * b.totalBots() + !isKeep * 100, //how far from the player the bot will move
endCycle: Infinity, endCycle: Infinity,
@@ -5038,7 +5020,7 @@ const b = {
const radius = 5 + 3 * Math.random() const radius = 5 + 3 * Math.random()
const SPEED = Math.max(5, 25 - radius * 0.4); //(m.crouch ? 32 : 20) - radius * 0.7; const SPEED = Math.max(5, 25 - radius * 0.4); //(m.crouch ? 32 : 20) - radius * 0.7;
const velocity = Vector.mult(Vector.normalise(Vector.sub(this.fireTarget, this.position)), SPEED) const velocity = Vector.mult(Vector.normalise(Vector.sub(this.fireTarget, this.position)), SPEED)
b.foam(this.position, Vector.rotate(velocity, 0.07 * (Math.random() - 0.5)), radius + 6 * this.isUpgraded) b.foam(this.position, Vector.rotate(velocity, 0.07 * (Math.random() - 0.5)), radius + 5 * this.isUpgraded)
//recoil //recoil
// const force = Vector.mult(Vector.normalise(velocity), 0.005 * this.mass * (tech.isFoamCavitation ? 2 : 1)) // const force = Vector.mult(Vector.normalise(velocity), 0.005 * this.mass * (tech.isFoamCavitation ? 2 : 1))
@@ -5068,58 +5050,11 @@ const b = {
} else { //fire mode: quickly fire at targets and doesn't follow player } else { //fire mode: quickly fire at targets and doesn't follow player
this.fire() this.fire()
} }
// const distanceToPlayer = Vector.magnitude(Vector.sub(this.position, m.pos))
// if (distanceToPlayer > this.range) { //if far away move towards player
// this.force = Vector.mult(Vector.normalise(Vector.sub(m.pos, this.position)), this.mass * this.acceleration)
// } else { //close to player
// Matter.Body.setVelocity(this, Vector.add(Vector.mult(this.velocity, 0.90), Vector.mult(player.velocity, 0.17))); //add player's velocity
// //&& !(simulation.cycle % this.lookFrequency)
// if (this.cd < simulation.cycle && !m.isCloak) {
// let target
// for (let i = 0, len = mob.length; i < len; i++) {
// const dist2 = Vector.magnitudeSquared(Vector.sub(this.position, mob[i].position));
// if (dist2 < 2000000 && !mob[i].isBadTarget && Matter.Query.ray(map, this.position, mob[i].position).length === 0 && !mob[i].isInvulnerable) {
// this.fireCount++
// if (this.fireCount > 5) {
// this.fireCount = 0
// this.cd = simulation.cycle + this.delay;
// } else {
// // this.cd = simulation.cycle + 1;
// }
// target = Vector.add(mob[i].position, Vector.mult(mob[i].velocity, Math.sqrt(dist2) / 60))
// const radius = 6 + 7 * Math.random()
// const SPEED = Math.max(5, 25 - radius * 0.4); //(m.crouch ? 32 : 20) - radius * 0.7;
// const velocity = Vector.mult(Vector.normalise(Vector.sub(target, this.position)), SPEED)
// b.foam(this.position, velocity, radius + 7.5 * this.isUpgraded)
// //recoil
// // const force = Vector.mult(Vector.normalise(velocity), 0.005 * this.mass * (tech.isFoamCavitation ? 2 : 1))
// const force = Vector.mult(velocity, 0.0003 * this.mass * (tech.isFoamCavitation ? 2 : 1))
// this.force.x -= force.x
// this.force.y -= force.y
// break;
// }
// }
// }
// }
} }
}) })
Composite.add(engine.world, bullet[me]); //add bullet to world Composite.add(engine.world, bullet[me]); //add bullet to world
}, },
soundBot(position = { x: player.position.x + 50 * (Math.random() - 0.5), y: player.position.y + 50 * (Math.random() - 0.5) }, isKeep = true) { soundBot(position = { x: player.position.x + 50 * (Math.random() - 0.5), y: player.position.y + 50 * (Math.random() - 0.5) }, isKeep = true) {
// if (isKeep) simulation.makeTextLog(`<span class='color-var'>b</span>.soundBot()`);
const me = bullet.length; const me = bullet.length;
const dir = m.angle; const dir = m.angle;
bullet[me] = Bodies.rectangle(position.x, position.y, 12, 30, { bullet[me] = Bodies.rectangle(position.x, position.y, 12, 30, {
@@ -5132,11 +5067,11 @@ const b = {
restitution: 0.6 * (1 + 0.5 * Math.random()), restitution: 0.6 * (1 + 0.5 * Math.random()),
dmg: 0, // 0.14 //damage done in addition to the damage from momentum dmg: 0, // 0.14 //damage done in addition to the damage from momentum
minDmgSpeed: 2, minDmgSpeed: 2,
lookFrequency: 17 + Math.floor(7 * Math.random()) - 5 * tech.isSoundBotUpgrade, lookFrequency: 17 + Math.floor(7 * Math.random()) - 3 * tech.isSoundBotUpgrade,
cd: 0, cd: 0,
fireCount: 0, fireCount: 0,
fireLimit: 5 + 2 * tech.isSoundBotUpgrade, fireLimit: 5 + 3 * tech.isSoundBotUpgrade,
delay: Math.floor((120 + (tech.isSoundBotUpgrade ? 0 : 70))),// + 30 - 20 * tech.isFoamBotUpgrade,//20 + Math.floor(85 * b.fireCDscale) - 20 * tech.isFoamBotUpgrade, delay: Math.floor((140 + (tech.isSoundBotUpgrade ? 0 : 50))),// + 30 - 20 * tech.isFoamBotUpgrade,//20 + Math.floor(85 * b.fireCDscale) - 20 * tech.isFoamBotUpgrade,
acceleration: (isKeep ? 0.005 : 0.001) * (1 + 0.5 * Math.random()), acceleration: (isKeep ? 0.005 : 0.001) * (1 + 0.5 * Math.random()),
range: 60 * (1 + 0.3 * Math.random()) + 3 * b.totalBots() + !isKeep * 100, //how far from the player the bot will move range: 60 * (1 + 0.3 * Math.random()) + 3 * b.totalBots() + !isKeep * 100, //how far from the player the bot will move
endCycle: Infinity, endCycle: Infinity,
@@ -5151,7 +5086,7 @@ const b = {
waves: [], waves: [],
phononWaveCD: 0, phononWaveCD: 0,
addWave(where, angle) { addWave(where, angle) {
const halfArc = 0.2 * (tech.isBulletTeleport ? 0.66 + (Math.random() - 0.5) : 1) + 0.05 * tech.isSoundBotUpgrade //6.28 is a full circle, but these arcs needs to stay small because we are using small angle linear approximation, for collisions const halfArc = 0.2 * (tech.isBulletTeleport ? 0.66 + (Math.random() - 0.5) : 1) + 0.04 * tech.isSoundBotUpgrade //6.28 is a full circle, but these arcs needs to stay small because we are using small angle linear approximation, for collisions
this.waves.push({ this.waves.push({
position: where, position: where,
angle: angle - halfArc, //used in drawing ctx.arc angle: angle - halfArc, //used in drawing ctx.arc
@@ -5160,7 +5095,7 @@ const b = {
arc: halfArc * 2, arc: halfArc * 2,
radius: 25, radius: 25,
resonanceCount: 0, resonanceCount: 0,
dmg: (tech.isUpgraded ? 4 : 1.5) * m.dmgScale * tech.wavePacketDamage * tech.waveBeamDamage * (tech.isBulletTeleport ? 1.5 : 1), dmg: (tech.isUpgraded ? 3.5 : 1.5) * m.dmgScale * tech.wavePacketDamage * tech.waveBeamDamage * (tech.isBulletTeleport ? 1.5 : 1),
}) })
}, },
fire() { fire() {
@@ -5285,7 +5220,6 @@ const b = {
Composite.add(engine.world, bullet[me]); //add bullet to world Composite.add(engine.world, bullet[me]); //add bullet to world
}, },
laserBot(position = { x: player.position.x + 50 * (Math.random() - 0.5), y: player.position.y + 50 * (Math.random() - 0.5) }, isKeep = true) { laserBot(position = { x: player.position.x + 50 * (Math.random() - 0.5), y: player.position.y + 50 * (Math.random() - 0.5) }, isKeep = true) {
// if (isKeep) simulation.makeTextLog(`<span class='color-var'>b</span>.laserBot()`);
const me = bullet.length; const me = bullet.length;
const dir = m.angle; const dir = m.angle;
const RADIUS = (14 + 6 * Math.random()) const RADIUS = (14 + 6 * Math.random())
@@ -5468,7 +5402,6 @@ const b = {
Composite.add(engine.world, bullet[me]); //add bullet to world Composite.add(engine.world, bullet[me]); //add bullet to world
}, },
boomBot(position = { x: player.position.x + 50 * (Math.random() - 0.5), y: player.position.y + 50 * (Math.random() - 0.5) }, isKeep = true) { boomBot(position = { x: player.position.x + 50 * (Math.random() - 0.5), y: player.position.y + 50 * (Math.random() - 0.5) }, isKeep = true) {
// if (isKeep) simulation.makeTextLog(`<span class='color-var'>b</span>.boomBot()`);
const me = bullet.length; const me = bullet.length;
const dir = m.angle; const dir = m.angle;
const RADIUS = (7 + 2 * Math.random()) const RADIUS = (7 + 2 * Math.random())
@@ -5484,8 +5417,8 @@ const b = {
minDmgSpeed: 0, minDmgSpeed: 0,
lookFrequency: 43 + Math.floor(7 * Math.random()) - 13 * tech.isBoomBotUpgrade, lookFrequency: 43 + Math.floor(7 * Math.random()) - 13 * tech.isBoomBotUpgrade,
acceleration: (isKeep ? 0.005 : 0.001) * (1 + 0.5 * Math.random()), acceleration: (isKeep ? 0.005 : 0.001) * (1 + 0.5 * Math.random()),
attackAcceleration: 0.012 + 0.006 * tech.isBoomBotUpgrade, attackAcceleration: 0.012 + 0.005 * tech.isBoomBotUpgrade,
range: 500 * (1 + 0.1 * Math.random()) + 350 * tech.isBoomBotUpgrade + !isKeep * 100, range: 500 * (1 + 0.1 * Math.random()) + 250 * tech.isBoomBotUpgrade + !isKeep * 100,
endCycle: Infinity, endCycle: Infinity,
classType: "bullet", classType: "bullet",
collisionFilter: { collisionFilter: {
@@ -5556,7 +5489,6 @@ const b = {
Composite.add(engine.world, bullet[me]); //add bullet to world Composite.add(engine.world, bullet[me]); //add bullet to world
}, },
plasmaBot(position = { x: player.position.x + 50 * (Math.random() - 0.5), y: player.position.y + 50 * (Math.random() - 0.5) }, isKeep = true) { plasmaBot(position = { x: player.position.x + 50 * (Math.random() - 0.5), y: player.position.y + 50 * (Math.random() - 0.5) }, isKeep = true) {
// if (isKeep) simulation.makeTextLog(`<span class='color-var'>b</span>.plasmaBot()`);
const me = bullet.length; const me = bullet.length;
const dir = m.angle; const dir = m.angle;
const RADIUS = 21 const RADIUS = 21
@@ -5694,7 +5626,6 @@ const b = {
Composite.add(engine.world, bullet[me]); //add bullet to world Composite.add(engine.world, bullet[me]); //add bullet to world
}, },
orbitBot(position = player.position, isKeep = true) { orbitBot(position = player.position, isKeep = true) {
// if (isKeep) simulation.makeTextLog(`<span class='color-var'>b</span>.orbitBot()`);
const me = bullet.length; const me = bullet.length;
bullet[me] = Bodies.polygon(position.x, position.y, 9, 12, { bullet[me] = Bodies.polygon(position.x, position.y, 9, 12, {
isUpgraded: tech.isOrbitBotUpgrade, isUpgraded: tech.isOrbitBotUpgrade,
@@ -5729,7 +5660,7 @@ const b = {
} }
} }
}, },
range: 190 + 130 * tech.isOrbitBotUpgrade + !isKeep * 60 * (0.5 - Math.random()), //range is set in bot upgrade too! range: 190 + 170 * tech.isOrbitBotUpgrade + !isKeep * 60 * (0.5 - Math.random()), //range is set in bot upgrade too!
orbitalSpeed: 0, orbitalSpeed: 0,
phase: 2 * Math.PI * Math.random(), phase: 2 * Math.PI * Math.random(),
do() { do() {
@@ -6125,7 +6056,7 @@ const b = {
name: "shotgun", //1 name: "shotgun", //1
// description: `fire a wide <strong>burst</strong> of short range <strong> bullets</strong><br>with a low <strong><em>fire rate</em></strong><br><strong>3-4</strong> nails per ${powerUps.orb.ammo()}`, // description: `fire a wide <strong>burst</strong> of short range <strong> bullets</strong><br>with a low <strong><em>fire rate</em></strong><br><strong>3-4</strong> nails per ${powerUps.orb.ammo()}`,
descriptionFunction() { descriptionFunction() {
return `fire a wide <strong>burst</strong> of short range <strong> bullets</strong><br>has a slow <strong><em>fire rate</em></strong><br><strong>${this.ammoPack.toFixed(1)}</strong> shots per ${powerUps.orb.ammo()}` return `fire a wide <strong>burst</strong> of short range <strong>pellets</strong><br>has a slow <strong><em>fire rate</em></strong><br><strong>${this.ammoPack.toFixed(1)}</strong> shots per ${powerUps.orb.ammo()}`
}, },
ammo: 0, ammo: 0,
ammoPack: 1.6, ammoPack: 1.6,
@@ -6414,9 +6345,8 @@ const b = {
} }
}, { }, {
name: "super balls", //2 name: "super balls", //2
// description: `fire <strong>3</strong> balls in a wide arc<br>balls <strong>bounce</strong> with no momentum loss<br><strong>9</strong> balls per ${powerUps.orb.ammo()}`,
descriptionFunction() { descriptionFunction() {
return `fire <strong>3</strong> balls in a wide arc<br>balls <strong>bounce</strong> with no momentum loss<br><strong>${this.ammoPack.toFixed(0)}</strong> balls per ${powerUps.orb.ammo()}` return `fire <strong>3</strong> balls that retain<br><strong>momentum</strong> and <strong>kinetic energy</strong> after <strong>collisions</strong><br><strong>${this.ammoPack.toFixed(0)}</strong> balls per ${powerUps.orb.ammo()}`
}, },
ammo: 0, ammo: 0,
ammoPack: 4.05, ammoPack: 4.05,
@@ -6974,7 +6904,7 @@ const b = {
name: "grenades", //5 name: "grenades", //5
// description: `lob a single <strong>bouncy</strong> projectile<br><strong class='color-e'>explodes</strong> on <strong>contact</strong> or after one second<br><strong>7</strong> grenades per ${powerUps.orb.ammo()}`, // description: `lob a single <strong>bouncy</strong> projectile<br><strong class='color-e'>explodes</strong> on <strong>contact</strong> or after one second<br><strong>7</strong> grenades per ${powerUps.orb.ammo()}`,
descriptionFunction() { descriptionFunction() {
return `lob a single <strong>bouncy</strong> projectile<br><strong class='color-e'>explodes</strong> on <strong>contact</strong> or after one second<br><strong>${this.ammoPack.toFixed(0)}</strong> grenades per ${powerUps.orb.ammo()}` return `lob a single <strong>bouncy</strong> projectile<br><strong class='color-e'>explodes</strong> on <strong>contact</strong> or after <strong>1.5</strong> seconds<br><strong>${this.ammoPack.toFixed(0)}</strong> grenades per ${powerUps.orb.ammo()}`
}, },
ammo: 0, ammo: 0,
ammoPack: 3.2, ammoPack: 3.2,
@@ -7357,7 +7287,7 @@ const b = {
name: "harpoon", //9 name: "harpoon", //9
// description: `throw a <strong>self-steering</strong> harpoon that uses <strong class='color-f'>energy</strong><br>to <strong>retract</strong> and refund its <strong class='color-ammo'>ammo</strong> cost<br><strong>1-2</strong> harpoons per ${powerUps.orb.ammo()}`, // description: `throw a <strong>self-steering</strong> harpoon that uses <strong class='color-f'>energy</strong><br>to <strong>retract</strong> and refund its <strong class='color-ammo'>ammo</strong> cost<br><strong>1-2</strong> harpoons per ${powerUps.orb.ammo()}`,
descriptionFunction() { descriptionFunction() {
return `throw a <strong>self-steering</strong> harpoon that uses <strong class='color-f'>energy</strong><br>to <strong>retract</strong> and refund its <strong class='color-ammo'>ammo</strong> cost<br><strong>${this.ammoPack.toFixed(1)}</strong> harpoons per ${powerUps.orb.ammo()}` return `throw a <strong>harpoon</strong> that uses <strong class='color-f'>energy</strong> to <strong>retract</strong><br><strong>harpoons</strong> refund <strong class='color-ammo'>ammo</strong><br><strong>${this.ammoPack.toFixed(1)}</strong> harpoons per ${powerUps.orb.ammo()}`
}, },
ammo: 0, ammo: 0,
ammoPack: 0.77, //update this in railgun tech ammoPack: 0.77, //update this in railgun tech
@@ -7767,7 +7697,7 @@ const b = {
{ {
name: "laser", //11 name: "laser", //11
descriptionFunction() { descriptionFunction() {
return `emit a <strong>beam</strong> of collimated coherent <strong class='color-laser'>light</strong><br>costs <strong>${(tech.laserDrain * 6000).toFixed(1)}</strong> <strong class='color-f'>energy</strong> per second<br>doesn't use <strong>ammo</strong>` return `emit a <strong>beam</strong> of collimated coherent <strong class='color-laser'>light</strong><br>reflects off map, <strong class='color-block'>blocks</strong>, and mobs <strong>${(tech.isWideLaser || tech.isPulseLaser) ? 0 : tech.laserReflections}</strong> times<br>costs <strong>${(tech.laserDrain * 6000).toFixed(1)}</strong> <strong class='color-f'>energy</strong> per second and 0 <strong>ammo</strong>`
}, },
ammo: 0, ammo: 0,
ammoPack: Infinity, ammoPack: Infinity,
@@ -7902,79 +7832,6 @@ const b = {
} }
// this.fire = this.firePhoton // this.fire = this.firePhoton
}, },
// fireLaser() {
// // console.log('hi')
// const drain = tech.laserDrain / b.fireCDscale
// if (m.energy < drain) {
// m.fireCDcycle = m.cycle + 100; // cool down if out of energy
// } else {
// m.fireCDcycle = m.cycle
// m.energy -= drain
// const range = {
// x: 5000 * Math.cos(m.angle),
// y: 5000 * Math.sin(m.angle)
// }
// const laserSeparation = 3
// const rangeOffPlus = {
// x: laserSeparation * Math.cos(m.angle + Math.PI / 2),
// y: laserSeparation * Math.sin(m.angle + Math.PI / 2)
// }
// const rangeOffMinus = {
// x: laserSeparation * Math.cos(m.angle - Math.PI / 2),
// y: laserSeparation * Math.sin(m.angle - Math.PI / 2)
// }
// const dmg = 0.70 * tech.laserDamage / b.fireCDscale * this.lensDamage // 3.5 * 0.55 = 200% more damage
// const where = {
// x: m.pos.x + 30 * Math.cos(m.angle),
// y: m.pos.y + 30 * Math.sin(m.angle)
// }
// const eye = {
// x: m.pos.x + 15 * Math.cos(m.angle),
// y: m.pos.y + 15 * Math.sin(m.angle)
// }
// // ctx.strokeStyle = tech.laserColor;
// // ctx.lineWidth = 8
// // ctx.beginPath();
// if (Matter.Query.ray(map, eye, where).length === 0 && Matter.Query.ray(body, eye, where).length === 0) {
// b.laser(eye, {
// x: eye.x + range.x,
// y: eye.y + range.y
// }, dmg)
// }
// for (let i = 1; i < 2; i++) {
// let whereOff = Vector.add(where, {
// x: i * rangeOffPlus.x,
// y: i * rangeOffPlus.y
// })
// if (Matter.Query.ray(map, eye, whereOff).length === 0 && Matter.Query.ray(body, eye, whereOff).length === 0) {
// ctx.moveTo(eye.x, eye.y)
// ctx.lineTo(whereOff.x, whereOff.y)
// b.laser(whereOff, {
// x: whereOff.x + range.x,
// y: whereOff.y + range.y
// }, dmg)
// }
// whereOff = Vector.add(where, {
// x: i * rangeOffMinus.x,
// y: i * rangeOffMinus.y
// })
// if (Matter.Query.ray(map, eye, whereOff).length === 0 && Matter.Query.ray(body, eye, whereOff).length === 0) {
// ctx.moveTo(eye.x, eye.y)
// ctx.lineTo(whereOff.x, whereOff.y)
// b.laser(whereOff, {
// x: whereOff.x + range.x,
// y: whereOff.y + range.y
// }, dmg)
// }
// }
// // ctx.stroke();
// // if (tech.isLaserLens && b.guns[11].lensDamage !== 1) {
// // ctx.lineWidth = 20 + 3 * b.guns[11].lensDamageOn
// // ctx.globalAlpha = 0.3
// // ctx.stroke();
// // }
// }
// },
fireLaser() { fireLaser() {
const drain = tech.laserDrain / b.fireCDscale const drain = tech.laserDrain / b.fireCDscale
if (m.energy < drain) { if (m.energy < drain) {
@@ -8004,10 +7861,7 @@ const b = {
// const scale = Math.pow(0.9, tech.beamSplitter) // const scale = Math.pow(0.9, tech.beamSplitter)
// const pushScale = scale * scale // const pushScale = scale * scale
let dmg = tech.laserDamage / b.fireCDscale * this.lensDamage // * scale //Math.pow(0.9, tech.laserDamage) let dmg = tech.laserDamage / b.fireCDscale * this.lensDamage // * scale //Math.pow(0.9, tech.laserDamage)
const where = { const where = { x: m.pos.x + 20 * Math.cos(m.angle), y: m.pos.y + 20 * Math.sin(m.angle) }
x: m.pos.x + 20 * Math.cos(m.angle),
y: m.pos.y + 20 * Math.sin(m.angle)
}
const divergence = m.crouch ? 0.15 : 0.35 const divergence = m.crouch ? 0.15 : 0.35
const angle = m.angle - tech.beamSplitter * divergence / 2 const angle = m.angle - tech.beamSplitter * divergence / 2
for (let i = 0; i < 1 + tech.beamSplitter; i++) { for (let i = 0; i < 1 + tech.beamSplitter; i++) {
@@ -8098,8 +7952,8 @@ const b = {
} else { } else {
m.fireCDcycle = m.cycle m.fireCDcycle = m.cycle
m.energy -= drain m.energy -= drain
const dmg = 0.5 * tech.laserDamage / b.fireCDscale * this.lensDamage // 3.5 * 0.55 = 200% more damage const dmg = tech.laserDamage / b.fireCDscale * this.lensDamage
const spacing = Math.ceil(10 - 0.4 * tech.historyLaser) const spacing = Math.ceil(23 - tech.historyLaser)
ctx.beginPath(); ctx.beginPath();
b.laser({ b.laser({
x: m.pos.x + 20 * Math.cos(m.angle), x: m.pos.x + 20 * Math.cos(m.angle),
@@ -8107,18 +7961,21 @@ const b = {
}, { }, {
x: m.pos.x + 3000 * Math.cos(m.angle), x: m.pos.x + 3000 * Math.cos(m.angle),
y: m.pos.y + 3000 * Math.sin(m.angle) y: m.pos.y + 3000 * Math.sin(m.angle)
}, dmg, 0, true, 0.2); }, dmg);
for (let i = 1, len = 3 + tech.historyLaser * 3; i < len; i++) {
for (let i = 1, len = 1 + tech.historyLaser; i < len; i++) {
const history = m.history[(m.cycle - i * spacing) % 600] const history = m.history[(m.cycle - i * spacing) % 600]
const off = history.yOff - 24.2859 const off = history.yOff - 24.2859 + 2 * i
// ctx.globalAlpha = 0.13
b.laser({ b.laser({
x: history.position.x + 20 * Math.cos(history.angle), x: history.position.x + 20 * Math.cos(history.angle),
y: history.position.y + 20 * Math.sin(history.angle) - off y: history.position.y + 20 * Math.sin(history.angle) - off
}, { }, {
x: history.position.x + 3000 * Math.cos(history.angle), x: history.position.x + 3000 * Math.cos(history.angle),
y: history.position.y + 3000 * Math.sin(history.angle) - off y: history.position.y + 3000 * Math.sin(history.angle) - off
}, dmg, 0, true, 0.2); }, 0.7 * dmg, tech.laserReflections, true);
} }
// ctx.globalAlpha = 1
ctx.strokeStyle = tech.laserColor; ctx.strokeStyle = tech.laserColor;
ctx.lineWidth = 1 ctx.lineWidth = 1
ctx.stroke(); ctx.stroke();

View File

@@ -117,7 +117,7 @@ function collisionChecks(event) {
if (tech.isCollisionRealitySwitch && m.alive) { if (tech.isCollisionRealitySwitch && m.alive) {
m.switchWorlds() m.switchWorlds()
simulation.trails() simulation.trails(90)
simulation.makeTextLog(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`); simulation.makeTextLog(`simulation.amplitude <span class='color-symbol'>=</span> ${Math.random()}`);
} }
if (tech.isPiezo) m.energy += 20.48; if (tech.isPiezo) m.energy += 20.48;

View File

@@ -464,12 +464,12 @@ const build = {
let text = `<div class="pause-grid-module" style="padding: 8px;"> let text = `<div class="pause-grid-module" style="padding: 8px;">
<span style="font-size:1.4em;font-weight: 600; float: left;">PAUSED</span> <span style="font-size:1.4em;font-weight: 600; float: left;">PAUSED</span>
<span style="float: right;">press ${input.key.pause} to resume</span> <em style="float: right;color:#ccc;">press ${input.key.pause} to resume</em>
<br> <br>
<input onclick="build.showImages('pause')" type="checkbox" id="hide-images-pause" name="hide-images-pause" ${localSettings.isHideImages ? "checked" : ""}> <input onclick="build.showImages('pause')" type="checkbox" id="hide-images-pause" name="hide-images-pause" ${localSettings.isHideImages ? "checked" : ""}>
<label for="hide-images-pause" title="hide images for fields, guns, and tech" style="font-size:1.15em;" >hide images</label> <label for="hide-images-pause" title="hide images for fields, guns, and tech" style="font-size:1.15em;" >hide images</label>
<br> <br>
<button onclick="build.shareURL(false)" class='sort-button' style="font-size:1em;float: right;">copy build url</button> <button onclick="build.shareURL(false)" class='sort-button' style="font-size:1em;float: right;">copy build URL</button>
<input onclick="build.hideHUD('settings')" type="checkbox" id="hide-hud" name="hide-hud" ${localSettings.isHideHUD ? "checked" : ""}> <input onclick="build.hideHUD('settings')" type="checkbox" id="hide-hud" name="hide-hud" ${localSettings.isHideHUD ? "checked" : ""}>
<label for="hide-hud" title="hide: tech, damage taken, damage, in game console" style="font-size:1.15em;">minimal HUD</label> <label for="hide-hud" title="hide: tech, damage taken, damage, in game console" style="font-size:1.15em;">minimal HUD</label>
</div> </div>
@@ -503,18 +503,18 @@ ${tech.junkChance ? `<br><strong class='color-junk'>JUNK</strong>: ${(100 * tech
<details id="difficulty-parameters-details" style="padding: 0 8px;"> <details id="difficulty-parameters-details" style="padding: 0 8px;">
<summary>difficulty parameters</summary> <summary>difficulty parameters</summary>
<div class="pause-details"> <div class="pause-details">
${simulation.difficultyMode > 0 ? `<div class="pause-difficulty-row"><strong>0.84x</strong> <strong class='color-d'>damage</strong> done per level<br><strong>1.23x</strong> <strong class='color-defense'>damage taken</strong> per level</div>` : " "} ${simulation.difficultyMode > 0 ? `<div class="pause-difficulty-row"><strong>0.85x</strong> <strong class='color-d'>damage</strong> done per level<br><strong>1.23x</strong> <strong class='color-defense'>damage taken</strong> per level</div>` : " "}
${simulation.difficultyMode > 1 ? `<div class="pause-difficulty-row"><strong>-5</strong> initial <strong>power ups</strong><br><strong>faster</strong> and <strong>more</strong> mobs per level</div>` : " "} ${simulation.difficultyMode > 1 ? `<div class="pause-difficulty-row"><strong>-5</strong> initial <strong>power ups</strong><br><strong>faster</strong> and <strong>more</strong> mobs per level</div>` : " "}
${simulation.difficultyMode > 2 ? `<div class="pause-difficulty-row"><strong>0.84x</strong> <strong class='color-d'>damage</strong> done per level<br><strong>1.23x</strong> <strong class='color-defense'>damage taken</strong> per level</div>` : " "} ${simulation.difficultyMode > 2 ? `<div class="pause-difficulty-row"><strong>0.85x</strong> <strong class='color-d'>damage</strong> done per level<br><strong>1.23x</strong> <strong class='color-defense'>damage taken</strong> per level</div>` : " "}
${simulation.difficultyMode > 3 ? `<div class="pause-difficulty-row"><strong>+1</strong> boss per level, <strong>-1</strong> <strong class='color-m'>tech</strong> per boss<br><strong>-1</strong> ${powerUps.orb.research()} per level</div>` : " "} ${simulation.difficultyMode > 3 ? `<div class="pause-difficulty-row"><strong>+1</strong> boss per level<br><strong>-1</strong> <strong class='color-m'>tech</strong> per boss</div>` : " "}
${simulation.difficultyMode > 4 ? `<div class="pause-difficulty-row"><strong>0.84x</strong> <strong class='color-d'>damage</strong> done per level<br><strong>1.23x</strong> <strong class='color-defense'>damage taken</strong> per level</div>` : " "} ${simulation.difficultyMode > 4 ? `<div class="pause-difficulty-row"><strong>0.85x</strong> <strong class='color-d'>damage</strong> done per level<br><strong>1.23x</strong> <strong class='color-defense'>damage taken</strong> per level</div>` : " "}
${simulation.difficultyMode > 5 ? `<div class="pause-difficulty-row"><strong>3x</strong> chance for <strong>shielded</strong> mobs<br><strong>-3</strong> initial power ups</div>` : " "} ${simulation.difficultyMode > 5 ? `<div class="pause-difficulty-row"><strong>3x</strong> chance for <strong>shielded</strong> mobs<br><strong>-3</strong> initial power ups</div>` : " "}
</div> </div>
</details> </details>
</div>` </div>`
if (!localSettings.isHideHUD) text += `<div class="pause-grid-module card-background" style="height:auto;"> if (!localSettings.isHideHUD) text += `<div class="pause-grid-module card-background" style="height:auto;">
<details id = "console-log-details" style="padding: 0 8px;"> <details id = "console-log-details" style="padding: 0 8px;">
<summary>console messages</summary> <summary>console log</summary>
<div class="pause-details"> <div class="pause-details">
<div class="pause-grid-module" style="background-color: rgba(255,255,255,0.3);font-size: 0.8em;">${document.getElementById("text-log").innerHTML}</div> <div class="pause-grid-module" style="background-color: rgba(255,255,255,0.3);font-size: 0.8em;">${document.getElementById("text-log").innerHTML}</div>
</div> </div>

File diff suppressed because it is too large Load Diff

View File

@@ -553,17 +553,18 @@ const m = {
if (tech.isHarmMACHO) dmg *= tech.isMoveMACHO ? 0.3 : 0.4 if (tech.isHarmMACHO) dmg *= tech.isMoveMACHO ? 0.3 : 0.4
if (tech.isImmortal) dmg *= 0.7 if (tech.isImmortal) dmg *= 0.7
if (m.fieldMode === 0 || m.fieldMode === 3) dmg *= 0.973 ** m.coupling if (m.fieldMode === 0 || m.fieldMode === 3) dmg *= 0.973 ** m.coupling
if (tech.isLowHealthDefense) dmg *= 1 - Math.max(0, 1 - m.health) * 0.8
if (tech.isHarmReduceNoKill && m.lastKillCycle + 300 < m.cycle) dmg *= 0.3 if (tech.isHarmReduceNoKill && m.lastKillCycle + 300 < m.cycle) dmg *= 0.3
if (tech.isAddBlockMass && m.isHolding) dmg *= 0.1 if (tech.isAddBlockMass && m.isHolding) dmg *= 0.1
if (tech.isSpeedHarm && (tech.speedAdded + player.speed) > 0.1) dmg *= 1 - Math.min((tech.speedAdded + player.speed) * 0.0193, 0.8) //capped at speed of 55 if (tech.isSpeedHarm && (tech.speedAdded + player.speed) > 0.1) dmg *= 1 - Math.min((tech.speedAdded + player.speed) * 0.0193, 0.8) //capped at speed of 55
if (tech.isHarmReduce && input.field) dmg *= 0.1 if (tech.isHarmReduce && input.field) dmg *= 0.1
if (tech.isNeutronium && input.field && m.fieldCDcycle < m.cycle) dmg *= 0.05 if (tech.isNeutronium && input.field && m.fieldCDcycle < m.cycle) dmg *= 0.05
if (tech.isBotArmor) dmg *= 0.95 ** b.totalBots() if (tech.isBotArmor) dmg *= 0.96 ** b.totalBots()
if (tech.isHarmArmor && m.lastHarmCycle + 600 > m.cycle) dmg *= 0.3; if (tech.isHarmArmor && m.lastHarmCycle + 600 > m.cycle) dmg *= 0.3;
if (tech.isNoFireDefense && m.cycle > m.fireCDcycle + 120) dmg *= 0.3 if (tech.isNoFireDefense && m.cycle > m.fireCDcycle + 120) dmg *= 0.3
if (tech.isTurret && m.crouch) dmg *= 0.3; if (tech.isTurret && m.crouch) dmg *= 0.3;
if (tech.isFirstDer && b.inventory[0] === b.activeGun) dmg *= 0.85 ** b.inventory.length if (tech.isFirstDer && b.inventory[0] === b.activeGun) dmg *= 0.85 ** b.inventory.length
// if (tech.isLowHealthDefense) dmg *= Math.pow(0.3, Math.max(0, (tech.isEnergyHealth ? m.maxEnergy - m.energy : m.maxHealth - m.health)))
if (tech.isLowHealthDefense) dmg *= Math.pow(0.2, Math.max(0, 1 - (tech.isEnergyHealth ? m.energy / m.maxEnergy : m.health / m.maxHealth)))
// return tech.isEnergyHealth ? Math.pow(dmg, 0.7) : dmg //defense has less effect // return tech.isEnergyHealth ? Math.pow(dmg, 0.7) : dmg //defense has less effect
// dmg *= m.fieldHarmReduction // dmg *= m.fieldHarmReduction
return dmg * m.fieldHarmReduction return dmg * m.fieldHarmReduction
@@ -2115,7 +2116,7 @@ const m = {
isFieldActive: false, isFieldActive: false,
fieldRange: 155, fieldRange: 155,
fieldShieldingScale: 1, fieldShieldingScale: 1,
// fieldDamage: 1, fieldDamage: 1,
isSneakAttack: false, isSneakAttack: false,
lastHit: 0, //stores value of last damage player took above a threshold, in m.damage lastHit: 0, //stores value of last damage player took above a threshold, in m.damage
sneakAttackCycle: 0, sneakAttackCycle: 0,
@@ -2152,6 +2153,7 @@ const m = {
m.eyeFillColor = m.fieldMeterColor m.eyeFillColor = m.fieldMeterColor
m.fieldShieldingScale = 1; m.fieldShieldingScale = 1;
m.fieldBlockCD = 10; m.fieldBlockCD = 10;
m.fieldDamage = 1
m.fieldHarmReduction = 1; m.fieldHarmReduction = 1;
m.lastHit = 0 m.lastHit = 0
m.isSneakAttack = false m.isSneakAttack = false
@@ -2241,7 +2243,7 @@ const m = {
} else { } else {
m.fieldRegen = 0.001 //6 energy per second m.fieldRegen = 0.001 //6 energy per second
} }
if (m.fieldMode === 0 || m.fieldMode === 4) m.fieldRegen += 0.000133 * m.coupling if (m.fieldMode === 0 || m.fieldMode === 4) m.fieldRegen += 0.0001 * m.coupling
if (tech.isTimeCrystals) { if (tech.isTimeCrystals) {
m.fieldRegen *= 2.5 m.fieldRegen *= 2.5
} else if (tech.isGroundState) { } else if (tech.isGroundState) {
@@ -2867,7 +2869,7 @@ const m = {
case 3: //negative mass case 3: //negative mass
return `<strong>${(0.973 ** couple).toFixed(2)}x</strong> <strong class='color-defense'>damage taken</strong>` return `<strong>${(0.973 ** couple).toFixed(2)}x</strong> <strong class='color-defense'>damage taken</strong>`
case 4: //assembler case 4: //assembler
return `<strong>+${(0.8 * couple).toFixed(1)}</strong> <strong class='color-f'>energy</strong> per second` return `<strong>+${(0.6 * couple).toFixed(1)}</strong> <strong class='color-f'>energy</strong> per second`
case 5: //plasma case 5: //plasma
return `<strong>${(1 + 0.015 * couple).toFixed(3)}x</strong> <strong class='color-d'>damage</strong>` return `<strong>${(1 + 0.015 * couple).toFixed(3)}x</strong> <strong class='color-d'>damage</strong>`
case 6: //time dilation case 6: //time dilation
@@ -2883,7 +2885,7 @@ const m = {
} }
}, },
couplingChange(change = 0) { couplingChange(change = 0) {
if (change > 0 && level.onLevel !== -1) simulation.makeTextLog(`m.coupling <span class='color-symbol'>+=</span> ${change}`, 60); //level.onLevel !== -1 means not on lore level if (change > 0 && level.onLevel !== -1) simulation.makeTextLog(`<div class="coupling-circle"></div> m.coupling <span class='color-symbol'>+=</span> ${change}`, 60); //level.onLevel !== -1 means not on lore level
m.coupling += change m.coupling += change
if (m.coupling < 0) { if (m.coupling < 0) {
//look for coupling power ups on this level and remove them to prevent exploiting tech ejections //look for coupling power ups on this level and remove them to prevent exploiting tech ejections
@@ -2921,7 +2923,7 @@ const m = {
document.getElementById("field").innerHTML = m.fieldUpgrades[index].name document.getElementById("field").innerHTML = m.fieldUpgrades[index].name
m.setHoldDefaults(); m.setHoldDefaults();
m.fieldUpgrades[index].effect(); m.fieldUpgrades[index].effect();
simulation.makeTextLog(`<span class='color-var'>m</span>.setField("<span class='color-text'>${m.fieldUpgrades[m.fieldMode].name}</span>")`); simulation.makeTextLog(`<div class="circle-grid field"></div> &nbsp; <span class='color-var'>m</span>.setField("<strong class='color-text'>${m.fieldUpgrades[m.fieldMode].name}</strong>")<br>input.key.field<span class='color-symbol'>:</span> ["<span class='color-text'>MouseRight</span>"]`);
}, },
fieldUpgrades: [{ fieldUpgrades: [{
name: "field emitter", name: "field emitter",
@@ -3058,7 +3060,7 @@ const m = {
}, },
{ {
name: "perfect diamagnetism", name: "perfect diamagnetism",
description: "<strong>deflecting</strong> does not drain <strong class='color-f'>energy</strong><br>maintains <strong>functionality</strong> while <strong>inactive</strong><br><strong>5</strong> <strong class='color-f'>energy</strong> per second", description: "<strong>deflecting</strong> does not drain <strong class='color-f'>energy</strong><br><strong>shield</strong> maintains <strong>functionality</strong> while inactive<br><strong>5</strong> <strong class='color-f'>energy</strong> per second",
effect: () => { effect: () => {
m.fieldMeterColor = "#48f" //"#0c5" m.fieldMeterColor = "#48f" //"#0c5"
m.eyeFillColor = m.fieldMeterColor m.eyeFillColor = m.fieldMeterColor
@@ -3481,11 +3483,11 @@ const m = {
}, },
{ {
name: "molecular assembler", name: "molecular assembler",
description: `excess <strong class='color-f'>energy</strong> used to <strong class='color-print'>print</strong> ${simulation.molecularMode === 0 ? "<strong class='color-p' style='letter-spacing: 2px;'>spores" : simulation.molecularMode === 1 ? "<strong>missiles" : simulation.molecularMode === 2 ? "<strong class='color-s'>ice IX" : "<strong>drones"}</strong><br>use <strong class='color-f'>energy</strong> to <strong>deflect</strong> mobs<br><strong>12</strong> <strong class='color-f'>energy</strong> per second`, description: `use <strong class='color-f'>energy</strong> to <strong>deflect</strong> mobs<br>excess <strong class='color-f'>energy</strong> used to <strong class='color-print'>print</strong> ${simulation.molecularMode === 0 ? "<strong class='color-p' style='letter-spacing: 2px;'>spores" : simulation.molecularMode === 1 ? "<strong>missiles" : simulation.molecularMode === 2 ? "<strong class='color-s'>ice IX" : "<strong>drones"}</strong><br><strong>12</strong> <strong class='color-f'>energy</strong> per second`,
setDescription() { setDescription() {
return `excess <strong class='color-f'>energy</strong> used to <strong class='color-print'>print</strong> ${simulation.molecularMode === 0 ? "<strong class='color-p' style='letter-spacing: 2px;'>spores" : simulation.molecularMode === 1 ? "<strong>missiles" : simulation.molecularMode === 2 ? "<strong class='color-s'>ice IX" : "<strong>drones"}</strong><br>use <strong class='color-f'>energy</strong> to <strong>deflect</strong> mobs<br><strong>12</strong> <strong class='color-f'>energy</strong> per second` return `use <strong class='color-f'>energy</strong> to <strong>deflect</strong> mobs<br>excess <strong class='color-f'>energy</strong> used to <strong class='color-print'>print</strong> ${simulation.molecularMode === 0 ? "<strong class='color-p' style='letter-spacing: 2px;'>spores" : simulation.molecularMode === 1 ? "<strong>missiles" : simulation.molecularMode === 2 ? "<strong class='color-s'>ice IX" : "<strong>drones"}</strong><br><strong>12</strong> <strong class='color-f'>energy</strong> per second`
}, },
blockJumpPhase: 0,
effect: () => { effect: () => {
m.fieldMeterColor = "#ff0" m.fieldMeterColor = "#ff0"
m.eyeFillColor = m.fieldMeterColor m.eyeFillColor = m.fieldMeterColor
@@ -3596,115 +3598,15 @@ 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) 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)
} }
m.drawRegenEnergy() m.drawRegenEnergy()
if (tech.isBlockJump) {
if (m.onGround && m.buttonCD_jump + 10 < m.cycle) this.blockJumpPhase = 0 //reset after touching ground or block
if (this.blockJumpPhase === 0 && !m.onGround) { //1st jump or fall
this.blockJumpPhase = 1
} else if (this.blockJumpPhase === 1 && !input.up && m.buttonCD_jump + 10 < m.cycle) { //not pressing jump
this.blockJumpPhase = 2
} else if (this.blockJumpPhase === 2 && input.up && m.buttonCD_jump + 10 < m.cycle) { //2nd jump
this.blockJumpPhase = 3
//make a block
const radius = 25 + Math.floor(15 * Math.random())
body[body.length] = Matter.Bodies.polygon(m.pos.x, m.pos.y + 65 + radius, 4, radius, {
friction: 0.05,
frictionAir: 0.001,
collisionFilter: {
category: cat.body,
mask: cat.player | cat.map | cat.body | cat.bullet | cat.mob | cat.mobBullet
},
classType: "body",
});
const block = body[body.length - 1]
//mess with the block shape (this code is horrible)
Composite.add(engine.world, block); //add to world
const r1 = radius * (1 + 0.4 * Math.random())
const r2 = radius * (1 + 0.4 * Math.random())
let angle = 0
const vertices = []
for (let i = 0, len = block.vertices.length; i < len; i++) {
angle += 2 * Math.PI / len
vertices.push({ x: block.position.x + r1 * Math.cos(angle), y: block.position.y + r2 * Math.sin(angle) })
}
Matter.Body.setVertices(block, vertices)
Matter.Body.setAngle(block, Math.PI / 4)
Matter.Body.setVelocity(block, { x: 0.9 * player.velocity.x, y: 10 });
Matter.Body.applyForce(block, m.pos, { x: 0, y: m.jumpForce * 0.12 * Math.min(m.standingOn.mass, 5) });
if (tech.isBlockRestitution) {
block.restitution = 0.999 //extra bouncy
block.friction = block.frictionStatic = block.frictionAir = 0.001
}
if (tech.isAddBlockMass) {
const expand = function (that, massLimit) {
if (that.mass < massLimit) {
const scale = 1.04;
Matter.Body.scale(that, scale, scale);
setTimeout(expand, 20, that, massLimit);
}
};
expand(block, Math.min(20, block.mass * 3))
}
//jump
m.buttonCD_jump = m.cycle; //can't jump again until 20 cycles pass
let horizontalVelocity = 8 * (- input.left + input.right)
Matter.Body.setVelocity(player, { x: player.velocity.x + horizontalVelocity, y: -7.5 + 0.25 * player.velocity.y });
player.force.y = -m.jumpForce; //player jump force
} else if (this.blockJumpPhase === 3 && m.onGround && m.buttonCD_jump + 10 < m.cycle) {
//reset
this.blockJumpPhase = 0 //reset
}
}
// if (tech.isBlockJump) {
// //make sure only 1 ephemera is running
// simulation.ephemera.push({
// name: "2 jump",
// mode: 0,
// do() {
// // console.log('hi')
// if (m.buttonCD_jump + 20 < m.cycle && m.onGround) simulation.removeEphemera(this.name)
// if (this.mode === 0) {
// if (!input.up) this.mode = 1
// } else if (this.mode === 1) {
// if (input.up && m.buttonCD_jump + 20 < m.cycle) {
// simulation.removeEphemera(this.name)
// //make a block
// body[body.length] = Matter.Bodies.polygon(m.pos.x, m.pos.y + 80, 4, 30 + Math.floor(10 * Math.random()), {
// friction: 0.05,
// frictionAir: 0.001,
// collisionFilter: {
// category: cat.body,
// mask: cat.player | cat.map | cat.body | cat.bullet | cat.mob | cat.mobBullet
// },
// classType: "body",
// // isPrinted: true,
// });
// const who = body[body.length - 1]
// Composite.add(engine.world, who); //add to world
// Matter.Body.setVelocity(who, { x: player.velocity.x * 0.5, y: +30 });
// Matter.Body.applyForce(who, m.pos, { x: 0, y: m.jumpForce * 0.12 * Math.min(m.standingOn.mass, 5) });
// //jump again
// m.buttonCD_jump = m.cycle; //can't jump again until 20 cycles pass
// player.force.y = -m.jumpForce; //player jump force
// Matter.Body.setVelocity(player, { x: player.velocity.x, y: -7.5 + 0.25 * player.velocity.y });
// }
// }
// },
// })
// }
} }
} }
}, },
{ {
name: "plasma torch", name: "plasma torch",
description: "use <strong class='color-f'>energy</strong> to emit short range <strong class='color-plasma'>plasma</strong><br><strong class='color-d'>damages</strong> and <strong>pushes</strong> mobs away<br><strong>10</strong> <strong class='color-f'>energy</strong> per second", description: "use <strong class='color-f'>energy</strong> to emit short range <strong class='color-plasma'>plasma</strong><br><strong>1.5x</strong> <strong class='color-d'>damage</strong><br><strong>10</strong> <strong class='color-f'>energy</strong> per second",
set() { set() {
b.isExtruderOn = false b.isExtruderOn = false
m.fieldDamage = 1.5
// m.fieldCDcycleAlternate = 0 // m.fieldCDcycleAlternate = 0
if (m.plasmaBall) { if (m.plasmaBall) {
@@ -4500,16 +4402,18 @@ const m = {
} }
this.drawRegenEnergyCloaking() this.drawRegenEnergyCloaking()
if (m.isSneakAttack && m.sneakAttackCycle + Math.min(100, 0.66 * (m.cycle - m.enterCloakCycle)) > m.cycle) { //show sneak attack status if (m.isSneakAttack && m.sneakAttackCycle + Math.min(100, 0.66 * (m.cycle - m.enterCloakCycle)) > m.cycle) { //show sneak attack status
m.fieldDamage = 4.5 * (1 + 0.033 * m.coupling)
const timeLeft = (m.sneakAttackCycle + Math.min(100, 0.66 * (m.cycle - m.enterCloakCycle)) - m.cycle) * 0.5 const timeLeft = (m.sneakAttackCycle + Math.min(100, 0.66 * (m.cycle - m.enterCloakCycle)) - m.cycle) * 0.5
ctx.beginPath(); ctx.beginPath();
ctx.arc(m.pos.x, m.pos.y, 32, 0, 2 * Math.PI); ctx.arc(m.pos.x, m.pos.y, 32, 0, 2 * Math.PI);
ctx.strokeStyle = "rgba(180,30,70,0.5)";//"rgba(0,0,0,0.7)";//"rgba(255,255,255,0.7)";//"rgba(255,0,100,0.7)"; ctx.strokeStyle = "rgba(180,30,70,0.5)";//"rgba(0,0,0,0.7)";//"rgba(255,255,255,0.7)";//"rgba(255,0,100,0.7)";
ctx.lineWidth = Math.max(Math.min(10, timeLeft), 3); ctx.lineWidth = Math.max(Math.min(10, timeLeft), 3);
ctx.stroke(); ctx.stroke();
// ctx.globalCompositeOperation = "multiply"; // ctx.globalCompositeOperation = "multiply";
// m.drawCloakedM() // m.drawCloakedM()
// ctx.globalCompositeOperation = "source-over"; // ctx.globalCompositeOperation = "source-over";
} else {
m.fieldDamage = 1
} }
} }
} }
@@ -4742,66 +4646,6 @@ const m = {
m.fieldRadius = 0 m.fieldRadius = 0
} }
m.drawRegenEnergy("rgba(0,0,0,0.2)") m.drawRegenEnergy("rgba(0,0,0,0.2)")
if (tech.isBlockJump) {
if (m.onGround && m.buttonCD_jump + 10 < m.cycle) this.blockJumpPhase = 0 //reset after touching ground or block
if (this.blockJumpPhase === 0 && !m.onGround) { //1st jump or fall
this.blockJumpPhase = 1
} else if (this.blockJumpPhase === 1 && !input.up && m.buttonCD_jump + 10 < m.cycle) { //not pressing jump
this.blockJumpPhase = 2
} else if (this.blockJumpPhase === 2 && input.up && m.buttonCD_jump + 10 < m.cycle) { //2nd jump
this.blockJumpPhase = 3
//make a block
const radius = 25 + Math.floor(15 * Math.random())
body[body.length] = Matter.Bodies.polygon(m.pos.x, m.pos.y + 60 + radius, 4, radius, {
friction: 0.05,
frictionAir: 0.001,
collisionFilter: {
category: cat.body,
mask: cat.player | cat.map | cat.body | cat.bullet | cat.mob | cat.mobBullet
},
classType: "body",
});
const block = body[body.length - 1]
//mess with the block shape (this code is horrible)
Composite.add(engine.world, block); //add to world
const r1 = radius * (1 + 0.4 * Math.random())
const r2 = radius * (1 + 0.4 * Math.random())
let angle = 0
const vertices = []
for (let i = 0, len = block.vertices.length; i < len; i++) {
angle += 2 * Math.PI / len
vertices.push({ x: block.position.x + r1 * Math.cos(angle), y: block.position.y + r2 * Math.sin(angle) })
}
Matter.Body.setVertices(block, vertices)
Matter.Body.setAngle(block, Math.PI / 4)
Matter.Body.setVelocity(block, { x: 0.9 * player.velocity.x, y: 10 });
Matter.Body.applyForce(block, m.pos, { x: 0, y: m.jumpForce * 0.12 * Math.min(m.standingOn.mass, 5) });
if (tech.isBlockRestitution) {
block.restitution = 0.999 //extra bouncy
block.friction = block.frictionStatic = block.frictionAir = 0.001
}
if (tech.isAddBlockMass) {
const expand = function (that, massLimit) {
if (that.mass < massLimit) {
const scale = 1.04;
Matter.Body.scale(that, scale, scale);
setTimeout(expand, 20, that, massLimit);
}
};
expand(block, Math.min(20, block.mass * 3))
}
//jump
m.buttonCD_jump = m.cycle; //can't jump again until 20 cycles pass
let horizontalVelocity = 8 * (- input.left + input.right)
Matter.Body.setVelocity(player, { x: player.velocity.x + horizontalVelocity, y: -7.5 + 0.25 * player.velocity.y });
player.force.y = -m.jumpForce; //player jump force
} else if (this.blockJumpPhase === 3 && m.onGround && m.buttonCD_jump + 10 < m.cycle) {
//reset
this.blockJumpPhase = 0 //reset
}
}
} }
} }
}, },

View File

@@ -273,7 +273,7 @@ const powerUps = {
choose(type, index) { choose(type, index) {
if (type === "gun") { if (type === "gun") {
b.giveGuns(index) b.giveGuns(index)
let text = `b.giveGuns("<span class='color-text'>${b.guns[index].name}</span>")` let text = `<div class="circle-grid gun"></div> &nbsp; b.giveGuns("<strong class='color-text'>${b.guns[index].name}</strong>")`
if (b.inventory.length === 1) text += `<br>input.key.gun<span class='color-symbol'>:</span> ["<span class='color-text'>MouseLeft</span>"]` if (b.inventory.length === 1) text += `<br>input.key.gun<span class='color-symbol'>:</span> ["<span class='color-text'>MouseLeft</span>"]`
if (b.inventory.length === 2) text += ` if (b.inventory.length === 2) text += `
<br>input.key.nextGun<span class='color-symbol'>:</span> ["<span class='color-text'>${input.key.nextGun}</span>","<span class='color-text'>MouseWheel</span>"] <br>input.key.nextGun<span class='color-symbol'>:</span> ["<span class='color-text'>${input.key.nextGun}</span>","<span class='color-text'>MouseWheel</span>"]
@@ -282,8 +282,8 @@ const powerUps = {
} else if (type === "field") { } else if (type === "field") {
m.setField(index) m.setField(index)
} else if (type === "tech") { } else if (type === "tech") {
// if (tech.isBanish && tech.tech[index].isBanished) tech.tech[index].isBanished = false // if (tech.isBanish && tech.tech[index].isBanished) tech.tech[index].isBanished = false
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[index].name}</span>")`); simulation.makeTextLog(`<div class="circle-grid tech"></div> &nbsp; <span class='color-var'>tech</span>.giveTech("<strong class='color-text'>${tech.tech[index].name}</strong>")`);
tech.giveTech(index) tech.giveTech(index)
} }
powerUps.endDraft(type); powerUps.endDraft(type);
@@ -421,11 +421,11 @@ const powerUps = {
</datalist> </datalist>
</div> </div>
<div class="right-column"> <div class="right-column">
<div class="row" id="constraint-1"><strong>0.84x</strong> <strong class='color-d'>damage</strong> done per level<br><strong>1.23x</strong> <strong class='color-defense'>damage taken</strong> per level</div> <div class="row" id="constraint-1"><strong>0.85x</strong> <strong class='color-d'>damage</strong> done per level<br><strong>1.23x</strong> <strong class='color-defense'>damage taken</strong> per level</div>
<div class="row" id="constraint-2"><strong>-5</strong> initial <strong>power ups</strong><br><strong>faster</strong> and <strong>more</strong> mobs per level</div> <div class="row" id="constraint-2"><strong>-5</strong> initial <strong>power ups</strong><br><strong>faster</strong> and <strong>more</strong> mobs per level</div>
<div class="row" id="constraint-3"><strong>0.84x</strong> <strong class='color-d'>damage</strong> done per level<br><strong>1.23x</strong> <strong class='color-defense'>damage taken</strong> per level</div> <div class="row" id="constraint-3"><strong>0.85x</strong> <strong class='color-d'>damage</strong> done per level<br><strong>1.23x</strong> <strong class='color-defense'>damage taken</strong> per level</div>
<div class="row" id="constraint-4"><strong>+1</strong> boss per level, <strong>-1</strong> <strong class='color-m'>tech</strong> per boss<br><strong>-1</strong> ${powerUps.orb.research()} per level</div> <div class="row" id="constraint-4"><strong>+1</strong> boss per level<br><strong>-1</strong> <strong class='color-m'>tech</strong> per boss</div>
<div class="row" id="constraint-5"><strong>0.84x</strong> <strong class='color-d'>damage</strong> done per level<br><strong>1.23x</strong> <strong class='color-defense'>damage taken</strong> per level</div> <div class="row" id="constraint-5"><strong>0.85x</strong> <strong class='color-d'>damage</strong> done per level<br><strong>1.23x</strong> <strong class='color-defense'>damage taken</strong> per level</div>
<div class="row" id="constraint-6"><strong>3x</strong> chance for <strong>shielded</strong> mobs<br><strong>-3</strong> initial power ups</div> <div class="row" id="constraint-6"><strong>3x</strong> chance for <strong>shielded</strong> mobs<br><strong>-3</strong> initial power ups</div>
</div> </div>
<div class="far-right-column"> <div class="far-right-column">
@@ -648,7 +648,7 @@ const powerUps = {
let overHeal = m.health + heal * simulation.healScale - m.maxHealth //used with tech.isOverHeal let overHeal = m.health + heal * simulation.healScale - m.maxHealth //used with tech.isOverHeal
const healOutput = Math.min(m.maxHealth - m.health, heal) * simulation.healScale const healOutput = Math.min(m.maxHealth - m.health, heal) * simulation.healScale
m.addHealth(heal); m.addHealth(heal);
if (healOutput > 0) simulation.makeTextLog(`<span class='color-var'>m</span>.health <span class='color-symbol'>+=</span> ${(healOutput).toFixed(3)}`) // <br>${m.health.toFixed(3)} if (healOutput > 0) simulation.makeTextLog(`<div class="circle-grid heal"></div> &nbsp; <span class='color-var'>m</span>.health <span class='color-symbol'>+=</span> ${(healOutput).toFixed(3)}`) // <br>${m.health.toFixed(3)}
if (tech.isOverHeal && overHeal > 0) { //tech quenching if (tech.isOverHeal && overHeal > 0) { //tech quenching
overHeal *= 2 //double the over heal converted to max health overHeal *= 2 //double the over heal converted to max health
//make sure overHeal doesn't kill player //make sure overHeal doesn't kill player
@@ -658,7 +658,7 @@ const powerUps = {
m.setMaxHealth(); m.setMaxHealth();
m.damage(overHeal); m.damage(overHeal);
overHeal *= m.defense() // account for defense after m.damage() so the text log is accurate overHeal *= m.defense() // account for defense after m.damage() so the text log is accurate
simulation.makeTextLog(`<span class='color-var'>m</span>.health <span class='color-symbol'>-=</span> ${(overHeal).toFixed(3)}`) // <br>${m.health.toFixed(3)} simulation.makeTextLog(`<div class="circle-grid heal"></div> &nbsp; <span class='color-var'>m</span>.health <span class='color-symbol'>-=</span> ${(overHeal).toFixed(3)}`) // <br>${m.health.toFixed(3)}
simulation.drawList.push({ //add dmg to draw queue simulation.drawList.push({ //add dmg to draw queue
x: m.pos.x, x: m.pos.x,
y: m.pos.y, y: m.pos.y,
@@ -1218,8 +1218,7 @@ const powerUps = {
for (let i = 0, len = tech.tech.length; i < len; i++) { for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].name === "decoherence") powerUps.ejectTech(i, true) if (tech.tech[i].name === "decoherence") powerUps.ejectTech(i, true)
} }
simulation.makeTextLog(`decoherence <span class='color-var'>tech</span> ejected`) simulation.makeTextLog(`decoherence <span class='color-var'>tech</span> ejected<br>options reset`)
simulation.makeTextLog(`options reset`)
} }
} }
if (tech.tooManyTechChoices) { if (tech.tooManyTechChoices) {
@@ -1244,7 +1243,7 @@ const powerUps = {
const choose = options[Math.floor(Math.seededRandom(0, options.length))] //pick an element from the array of options const choose = options[Math.floor(Math.seededRandom(0, options.length))] //pick an element from the array of options
if (tech.isBanish) { if (tech.isBanish) {
tech.tech[choose].isBanished = true tech.tech[choose].isBanished = true
if (i === 0) simulation.makeTextLog(`options.length = ${optionLengthNoDuplicates} <span class='color-text'>//tech removed from pool by decoherence</span>`) if (i === 0) simulation.makeTextLog(`options.length = ${optionLengthNoDuplicates} <em class='color-text'>//tech removed from pool by decoherence</em>`)
} }
removeOption(choose) //move from future options pool to avoid repeats on this selection removeOption(choose) //move from future options pool to avoid repeats on this selection
tech.tech[choose].isRecentlyShown = true //this flag prevents this option from being shown the next time you pick up a tech power up tech.tech[choose].isRecentlyShown = true //this flag prevents this option from being shown the next time you pick up a tech power up
@@ -1391,10 +1390,8 @@ const powerUps = {
if (!alreadyHasGun) text += powerUps.gunText(choose, `powerUps.choose('gun',${choose})`) if (!alreadyHasGun) text += powerUps.gunText(choose, `powerUps.choose('gun',${choose})`)
} }
for (let i = 0; i < localSettings.entanglement.techIndexes.length; i++) { //add tech for (let i = 0; i < localSettings.entanglement.techIndexes.length; i++) { //add tech
let found = false; let found = false;
let choose = undefined let choose = undefined
console.log(localSettings.entanglement.techIndexes[i])
for (let j = 0; j < tech.tech.length; j++) { for (let j = 0; j < tech.tech.length; j++) {
if (localSettings.entanglement.techIndexes[i] === tech.tech[j].name) { if (localSettings.entanglement.techIndexes[i] === tech.tech[j].name) {
choose = j; choose = j;
@@ -1402,12 +1399,9 @@ const powerUps = {
break; break;
} }
} }
// let choose = localSettings.entanglement.techIndexes[i]
console.log(choose)
if (found && tech.tech[choose]) { if (found && tech.tech[choose]) {
const isCount = tech.tech[choose].count > 0 ? `(${tech.tech[choose].count + 1}x)` : ""; const isCount = tech.tech[choose].count > 0 ? `(${tech.tech[choose].count + 1}x)` : "";
if (choose === null || tech.tech[choose].count + 1 > tech.tech[choose].maxCount || !tech.tech[choose].allowed()) { if (choose === null || tech.tech[choose].count + 1 > tech.tech[choose].maxCount || !tech.tech[choose].allowed()) {
// text += `<div class="choose-grid-module" style = "background-color: #efeff5; border: 0px; opacity:0.5; font-size: 60%; line-height: 130%; margin: 1px; padding-top: 6px; padding-bottom: 6px;"><div class="grid-title">${tech.tech[choose].name} <span style = "color: #aaa;font-weight: normal;font-size:80%;">- incoherent</span></div></div>`
text += powerUps.incoherentTechText(choose) text += powerUps.incoherentTechText(choose)
} else { } else {
if (tech.tech[choose].isFieldTech) { if (tech.tech[choose].isFieldTech) {
@@ -1428,7 +1422,6 @@ const powerUps = {
} }
} }
} }
// document.getElementById("choose-grid").classList.add("flipX");
document.getElementById("choose-grid").innerHTML = text document.getElementById("choose-grid").innerHTML = text
powerUps.showDraft(); powerUps.showDraft();
localSettings.entanglement = undefined localSettings.entanglement = undefined
@@ -1557,7 +1550,8 @@ const powerUps = {
} }
}, },
addResearchToLevel() { //add a random power up to a location that has a mob, mostly used to give each level a research addResearchToLevel() { //add a random power up to a location that has a mob, mostly used to give each level a research
if (simulation.difficultyMode < 4 && mob.length) { //don't spawn on higher difficulty settings // if (simulation.difficultyMode < 4 && mob.length) { //don't spawn on higher difficulty settings
if (level.levelsCleared < 13 - simulation.difficultyMode * 2 && mob.length) { //don't spawn late game
const index = Math.floor(Math.random() * mob.length) const index = Math.floor(Math.random() * mob.length)
powerUps.spawn(mob[index].position.x, mob[index].position.y, "research"); powerUps.spawn(mob[index].position.x, mob[index].position.y, "research");
} }
@@ -1599,7 +1593,7 @@ const powerUps = {
if (have.length) { if (have.length) {
choose = have[Math.floor(Math.random() * have.length)] choose = have[Math.floor(Math.random() * have.length)]
simulation.makeTextLog(`<span class='color-var'>tech</span>.remove("<span class='color-text'>${tech.tech[choose].name}</span>")`) simulation.makeTextLog(`<span class='color-var'>tech</span>.remove("<strong class='color-text'>${tech.tech[choose].name}</strong>")`)
for (let i = 0; i < tech.tech[choose].count; i++) { for (let i = 0; i < tech.tech[choose].count; i++) {
powerUps.directSpawn(m.pos.x, m.pos.y, "tech"); powerUps.directSpawn(m.pos.x, m.pos.y, "tech");
@@ -1617,7 +1611,7 @@ const powerUps = {
return false return false
} }
} else if (tech.tech[choose].count && !tech.tech[choose].isInstant) { } else if (tech.tech[choose].count && !tech.tech[choose].isInstant) {
simulation.makeTextLog(`<span class='color-var'>tech</span>.remove("<span class='color-text'>${tech.tech[choose].name}</span>")`) simulation.makeTextLog(`<span class='color-var'>tech</span>.remove("<strong class='color-text'>${tech.tech[choose].name}</strong>")`)
for (let i = 0; i < tech.tech[choose].count; i++) { for (let i = 0; i < tech.tech[choose].count; i++) {
powerUps.directSpawn(m.pos.x, m.pos.y, "tech"); powerUps.directSpawn(m.pos.x, m.pos.y, "tech");

View File

@@ -114,7 +114,7 @@ const spawn = {
} }
}, },
secondaryBossChance(x, y) { secondaryBossChance(x, y) {
if (simulation.difficultyMode > 2 && level.levelsCleared > 1) { if (simulation.difficultyMode > 2 && level.levelsCleared > 2) {
spawn.randomLevelBoss(x, y); spawn.randomLevelBoss(x, y);
} else { } else {
return false return false
@@ -1428,7 +1428,7 @@ const spawn = {
me.seeAtDistance2 = 1400000; me.seeAtDistance2 = 1400000;
me.cellMassMax = 70 me.cellMassMax = 70
me.collisionFilter.mask = cat.player | cat.bullet | cat.body// | cat.map me.collisionFilter.mask = cat.player | cat.bullet | cat.body// | cat.map
Matter.Body.setDensity(me, 0.0001 + 0.00002 * simulation.difficulty) // normal density is 0.001 Matter.Body.setDensity(me, 0.00012 + 0.00001 * simulation.difficulty) // normal density is 0.001
me.damageReduction = 0.17 me.damageReduction = 0.17
const k = 642 //k=r^2/m const k = 642 //k=r^2/m

View File

@@ -73,9 +73,13 @@ const tech = {
}, },
junkChance: 0, junkChance: 0,
addJunkTechToPool(percent) { //percent is number between 0-1 addJunkTechToPool(percent) { //percent is number between 0-1
simulation.makeTextLog(`<strong>+${(100 * percent).toFixed(0)}%</strong> <span class='color-text'>JUNK</span><span class='color-var'>tech</span> chance`) simulation.makeTextLog(`<strong>+${(100 * percent).toFixed(0)}%</strong> <span class='color-text'>JUNK</span><span class='color-var'>tech</span> chance (${100 * tech.junkChance.toFixed(0)} total chance)`)
tech.junkChance += (1 - tech.junkChance) * percent // tech.junkChance += (1 - tech.junkChance) * percent
tech.junkChance += percent
if (tech.junkChance < 0.001 || tech.junkChance === undefined) tech.junkChance = 0
if (tech.junkChance > 1) tech.junkChance = 1
return percent return percent
//make an array for possible junk tech to add //make an array for possible junk tech to add
// let options = []; // let options = [];
// for (let i = 0; i < tech.tech.length; i++) { // for (let i = 0; i < tech.tech.length; i++) {
@@ -103,12 +107,15 @@ const tech = {
// } // }
// } // }
// } // }
if (percent > 0) {
tech.junkChance = (tech.junkChance - percent) / (1 - percent)
if (tech.junkChance < 0.001 || tech.junkChance === undefined) tech.junkChance = 0
}
},
// if (percent > 0) {
// tech.junkChance = (tech.junkChance - percent) / (1 - percent)
// if (tech.junkChance < 0.001 || tech.junkChance === undefined) tech.junkChance = 0
// }
tech.junkChance -= percent
if (tech.junkChance < 0.001 || tech.junkChance === undefined) tech.junkChance = 0
if (tech.junkChance > 1) tech.junkChance = 1
},
giveTech(index = 'random') { giveTech(index = 'random') {
if (index === 'random') { if (index === 'random') {
let options = []; let options = [];
@@ -118,7 +125,7 @@ const tech = {
// give a random tech from the tech I don't have // give a random tech from the tech I don't have
if (options.length > 0) { if (options.length > 0) {
let newTech = options[Math.floor(Math.random() * options.length)] let newTech = options[Math.floor(Math.random() * options.length)]
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[newTech].name}</span>")<em> //random tech</em>`); simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<strong class='color-text'>${tech.tech[newTech].name}</strong>")<em> //random tech</em>`);
tech.giveTech(newTech) tech.giveTech(newTech)
} }
} else { } else {
@@ -199,7 +206,7 @@ const tech = {
}, },
damage: 1, //used for tech changes to player damage that don't have complex conditions damage: 1, //used for tech changes to player damage that don't have complex conditions
damageFromTech() { damageFromTech() {
let dmg = tech.damage //m.fieldDamage let dmg = tech.damage * m.fieldDamage
if (tech.isImmunityDamage && m.immuneCycle > m.cycle) dmg *= 4 if (tech.isImmunityDamage && m.immuneCycle > m.cycle) dmg *= 4
if (tech.isPowerUpDamage) dmg *= 1 + 0.05 * powerUp.length if (tech.isPowerUpDamage) dmg *= 1 + 0.05 * powerUp.length
if (tech.isDamageCooldown) dmg *= m.lastKillCycle + tech.isDamageCooldownTime > m.cycle ? 0.5 : 4 if (tech.isDamageCooldown) dmg *= m.lastKillCycle + tech.isDamageCooldownTime > m.cycle ? 0.5 : 4
@@ -210,7 +217,6 @@ const tech = {
if (tech.isGunChoice && tech.buffedGun === b.inventoryGun) dmg *= 1 + 0.3 * b.inventory.length if (tech.isGunChoice && tech.buffedGun === b.inventoryGun) dmg *= 1 + 0.3 * b.inventory.length
if (powerUps.boost.endCycle > m.cycle) dmg *= 1 + powerUps.boost.damage if (powerUps.boost.endCycle > m.cycle) dmg *= 1 + powerUps.boost.damage
if (m.coupling && (m.fieldMode === 0 || m.fieldMode === 5)) dmg *= 1 + 0.015 * m.coupling if (m.coupling && (m.fieldMode === 0 || m.fieldMode === 5)) dmg *= 1 + 0.015 * m.coupling
if (m.isSneakAttack && m.sneakAttackCycle + Math.min(100, 0.66 * (m.cycle - m.enterCloakCycle)) > m.cycle) dmg *= 4.5 * (1 + 0.033 * m.coupling)
if (tech.deathSkipTime) dmg *= 1 + 0.6 * tech.deathSkipTime if (tech.deathSkipTime) dmg *= 1 + 0.6 * tech.deathSkipTime
if (tech.isTechDebt) dmg *= tech.totalCount > 20 ? Math.pow(0.85, tech.totalCount - 20) : 4 - 0.15 * tech.totalCount if (tech.isTechDebt) dmg *= tech.totalCount > 20 ? Math.pow(0.85, tech.totalCount - 20) : 4 - 0.15 * tech.totalCount
if (tech.isAnthropicDamage && tech.isDeathAvoidedThisLevel) dmg *= 2.71828 if (tech.isAnthropicDamage && tech.isDeathAvoidedThisLevel) dmg *= 2.71828
@@ -219,7 +225,7 @@ const tech = {
if (tech.isOneGun && b.inventory.length < 2) dmg *= 1.3 if (tech.isOneGun && b.inventory.length < 2) dmg *= 1.3
if (tech.isAcidDmg && m.health > 1) dmg *= 1.35; if (tech.isAcidDmg && m.health > 1) dmg *= 1.35;
if (tech.isRerollDamage) dmg *= 1 + Math.max(0, 0.05 * powerUps.research.count) if (tech.isRerollDamage) dmg *= 1 + Math.max(0, 0.05 * powerUps.research.count)
if (tech.isBotDamage) dmg *= 1 + 0.05 * b.totalBots() if (tech.isBotDamage) dmg *= 1 + 0.04 * b.totalBots()
if (tech.restDamage > 1 && player.speed < 1) dmg *= tech.restDamage if (tech.restDamage > 1 && player.speed < 1) dmg *= tech.restDamage
if (tech.isLowEnergyDamage) dmg *= 1 + Math.max(0, 1 - m.energy) if (tech.isLowEnergyDamage) dmg *= 1 + Math.max(0, 1 - m.energy)
if (tech.energyDamage) dmg *= 1 + m.energy * 0.23 * tech.energyDamage; if (tech.energyDamage) dmg *= 1 + m.energy * 0.23 * tech.energyDamage;
@@ -229,7 +235,8 @@ const tech = {
if (tech.isAxion && tech.isHarmMACHO) dmg *= (tech.isMoveMACHO ? 3 : 2) if (tech.isAxion && tech.isHarmMACHO) dmg *= (tech.isMoveMACHO ? 3 : 2)
if (tech.isHarmDamage && m.lastHarmCycle + 480 > m.cycle) dmg *= 3; if (tech.isHarmDamage && m.lastHarmCycle + 480 > m.cycle) dmg *= 3;
if (tech.lastHitDamage && m.lastHit) dmg *= 1 + tech.lastHitDamage * m.lastHit if (tech.lastHitDamage && m.lastHit) dmg *= 1 + tech.lastHitDamage * m.lastHit
if (tech.isLowHealthDmg) dmg *= 1 + 0.7 * Math.max(0, 1 - (tech.isEnergyHealth ? m.energy : m.health)) // if (tech.isLowHealthDmg) dmg *= 1 + 0.6 * Math.max(0, 1 - (tech.isEnergyHealth ? m.energy : m.health))
if (tech.isLowHealthDmg) dmg *= 1 + 0.6 * Math.max(0, (tech.isEnergyHealth ? m.maxEnergy - m.energy : m.maxHealth - m.health))
if (tech.isJunkDNA) dmg *= 1 + 2 * tech.junkChance if (tech.isJunkDNA) dmg *= 1 + 2 * tech.junkChance
return dmg return dmg
}, },
@@ -628,7 +635,7 @@ const tech = {
frequencyDefault: 1, frequencyDefault: 1,
isInstant: true, isInstant: true,
isBadRandomOption: true, isBadRandomOption: true,
allowed: () => true, allowed: () => tech.junkChance < 1,
requires: "", requires: "",
effect() { effect() {
powerUps.spawn(m.pos.x, m.pos.y, "gun"); powerUps.spawn(m.pos.x, m.pos.y, "gun");
@@ -648,7 +655,7 @@ const tech = {
{ {
name: "arsenal", name: "arsenal",
descriptionFunction() { descriptionFunction() {
return `<strong>1.25x</strong> <strong class='color-d'>damage</strong> per unequipped <strong class='color-g'>gun</strong><br><em>(${(1 + 0.25 * Math.max(0, b.inventory.length - 1)).toFixed(2)}x)</em>` return `<strong>1.25x</strong> <strong class='color-d'>damage</strong> per unequipped <strong class='color-g'>gun</strong><br><em style ="float: right;">(${(1 + 0.25 * Math.max(0, b.inventory.length - 1)).toFixed(2)}x)</em>`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -666,7 +673,7 @@ const tech = {
{ {
name: "active cooling", name: "active cooling",
descriptionFunction() { descriptionFunction() {
return `<strong>1.25x</strong> <em>fire rate</em> per unequipped <strong class='color-g'>gun</strong><br><em>(${(1 / Math.pow(0.8, Math.max(0, b.inventory.length - 1))).toFixed(2)}x)</em>` return `<strong>1.25x</strong> <em>fire rate</em> per unequipped <strong class='color-g'>gun</strong><br><em style ="float: right;">(${(1 / Math.pow(0.8, Math.max(0, b.inventory.length - 1))).toFixed(2)}x)</em>`
}, //<br>but not including your equipped <strong class='color-g'>gun</strong>` }, }, //<br>but not including your equipped <strong class='color-g'>gun</strong>` },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -815,7 +822,7 @@ const tech = {
{ {
name: "supply chain", name: "supply chain",
descriptionFunction() { descriptionFunction() {
return `spawn a <strong class='color-g'>gun</strong><br>spawn ${powerUps.orb.ammo(1)} equal to all your active <strong class='color-g'>gun's</strong> <strong class='color-ammo'>ammo</strong>` return `spawn a <strong class='color-g'>gun</strong><br>spawn ${powerUps.orb.ammo(1)} that will <strong>2x</strong> your <strong class='color-g'>gun's</strong> <strong class='color-ammo'>ammo</strong>`
}, },
maxCount: 9, maxCount: 9,
count: 0, count: 0,
@@ -1038,7 +1045,7 @@ const tech = {
{ {
name: "Newtons 1st law", name: "Newtons 1st law",
descriptionFunction() { descriptionFunction() {
return `<strong class='color-defense'>damage taken</strong> is proportional to your <strong class="color-speed">speed</strong><br>up to <strong>0.2x</strong> <strong class='color-defense'>damage taken</strong> at <strong>55</strong> <strong class="color-speed">speed</strong> <em>(${(1 - Math.min((tech.speedAdded + player.speed) * 0.0193, 0.8)).toFixed(2)}x)</em>` return `<strong class='color-defense'>damage taken</strong> is proportional to your <strong class="color-speed">speed</strong><br>up to <strong>0.2x</strong> <strong class='color-defense'>damage taken</strong> at <strong>55</strong> <strong class="color-speed">speed</strong> <em style ="float: right;">(${(1 - Math.min((tech.speedAdded + player.speed) * 0.0193, 0.8)).toFixed(2)}x)</em>`
}, },
description: "", description: "",
maxCount: 1, maxCount: 1,
@@ -1059,7 +1066,7 @@ const tech = {
{ {
name: "Newtons 2nd law", name: "Newtons 2nd law",
descriptionFunction() { descriptionFunction() {
return `<strong class='color-d'>damage</strong> is proportional to your <strong class="color-speed">speed</strong><br>up to <strong>2x</strong> <strong class='color-d'>damage</strong> at <strong>55</strong> <strong class="color-speed">speed</strong> <em>(${(1 + Math.min(1, ((tech.speedAdded + player.speed) * 0.0193))).toFixed(2)}x)</em>` return `<strong class='color-d'>damage</strong> is proportional to your <strong class="color-speed">speed</strong><br>up to <strong>2x</strong> <strong class='color-d'>damage</strong> at <strong>55</strong> <strong class="color-speed">speed</strong> <em style ="float: right;">(${(1 + Math.min(1, ((tech.speedAdded + player.speed) * 0.0193))).toFixed(2)}x)</em>`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -1143,7 +1150,7 @@ const tech = {
}, },
{ {
name: "regression", name: "regression",
description: "bullet <strong>collisions</strong> increase <strong>vulnerability</strong> to<br><strong class='color-d'>damage</strong> by <strong>1.05x</strong> for mobs <em>(+1.025x for bosses)</em>", description: "bullet <strong>collisions</strong> increase <strong>vulnerability</strong> to<br><strong class='color-d'>damage</strong> by <strong>1.05x</strong> for mobs and <strong>+1.025x</strong> for bosses",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 1, frequency: 1,
@@ -1207,7 +1214,7 @@ const tech = {
let damageTotal = 1 let damageTotal = 1
for (let i = 0; i < this.damageSoFar.length; i++) damageTotal *= this.damageSoFar[i] for (let i = 0; i < this.damageSoFar.length; i++) damageTotal *= this.damageSoFar[i]
let currentDamage = "" let currentDamage = ""
if (this.count) currentDamage = `<br><em>(${(damageTotal).toFixed(2)}x)</em>` if (this.count) currentDamage = `<br><em style ="float: right;">(${(damageTotal).toFixed(2)}x)</em>`
return `randomly gain between <strong>1x</strong> and <strong>1.3x</strong> <strong class='color-d'>damage</strong>` + currentDamage return `randomly gain between <strong>1x</strong> and <strong>1.3x</strong> <strong class='color-d'>damage</strong>` + currentDamage
}, },
maxCount: 9, maxCount: 9,
@@ -1374,6 +1381,46 @@ const tech = {
tech.deathSkipTime = 0 tech.deathSkipTime = 0
} }
}, },
{
name: "exciton",
descriptionFunction() {
return `<span style = 'font-size:94%;'>after mobs <strong>die</strong> they have a <strong>14%</strong> chance to<br>spawn ${powerUps.orb.boost(1)} that give <strong>${(1 + powerUps.boost.damage).toFixed(2)}x</strong> <strong class='color-d'>damage</strong> for <strong>${(powerUps.boost.duration / 60).toFixed(0)}</strong> seconds</span>`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed: () => true,
requires: "",
effect() {
tech.isBoostPowerUps = true
},
remove() {
tech.isBoostPowerUps = false
}
},
{
name: "band gap",
descriptionFunction() {
return `${powerUps.orb.boost(1)} give <strong>1.77x</strong> <strong class='color-d'>damage</strong><br>but their duration is reduced by <strong>1</strong> second`
},
maxCount: 9,
count: 1,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isBoostPowerUps || tech.isBoostReplaceAmmo
},
requires: "exciton, quasiparticles",
effect() {
powerUps.boost.duration -= 60
powerUps.boost.damage += 0.77
},
remove() {
powerUps.boost.duration = 600
powerUps.boost.damage = 1.25
}
},
{ {
name: "collider", name: "collider",
descriptionFunction() { descriptionFunction() {
@@ -1397,7 +1444,7 @@ const tech = {
{ {
name: "bubble fusion", name: "bubble fusion",
descriptionFunction() { descriptionFunction() {
return `after destroying a mob's <strong>shield</strong><br>spawn <strong>1-2</strong> ${powerUps.orb.heal()}, ${powerUps.orb.ammo()}, or ${powerUps.orb.research(1)} <em>(once per mob)</em>` return `after destroying a mob's <strong>shield</strong><br>spawn <strong>1-2</strong> ${powerUps.orb.heal()}, ${powerUps.orb.ammo()}, or ${powerUps.orb.research(1)} <em style ="float: right;">(once per mob)</em>`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -1546,7 +1593,7 @@ const tech = {
{ {
name: "nail-bot upgrade", name: "nail-bot upgrade",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">nail-bot upgrade</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">nail-bot upgrade</a>`,
description: "<strong>convert</strong> your bots to <strong>nail-bots</strong><br><strong>5x</strong> <em>fire rate</em> and <strong>1.4x</strong> nail <strong>velocity</strong>", description: "<strong>convert</strong> your bots to <strong>nail-bots</strong><br><strong>4x</strong> <em>fire rate</em> and <strong>1.4x</strong> nail <strong>velocity</strong>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 3, frequency: 3,
@@ -1604,7 +1651,7 @@ const tech = {
{ {
name: "foam-bot upgrade", name: "foam-bot upgrade",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">foam-bot upgrade</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">foam-bot upgrade</a>`,
description: "<strong>convert</strong> your bots to <strong>foam-bots</strong><br><strong>3x</strong> foam <strong>size</strong> and <em>fire rate</em>", description: "<strong>convert</strong> your bots to <strong>foam-bots</strong><br><strong>2.5x</strong> foam <strong>size</strong> and <em>fire rate</em>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 3, frequency: 3,
@@ -1660,7 +1707,7 @@ const tech = {
{ {
name: "sound-bot upgrade", name: "sound-bot upgrade",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">sound-bot upgrade</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">sound-bot upgrade</a>`,
description: "<strong>convert</strong> your bots to <strong>sound-bots</strong><br><strong>2.5x</strong> wave <em>fire rate</em> and <strong>2.5x</strong> <strong class='color-d'>damage</strong>", description: "<strong>convert</strong> your bots to <strong>sound-bots</strong><br><strong>2x</strong> wave <em>fire rate</em>, <strong class='color-d'>damage</strong>, and duration",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 3, frequency: 3,
@@ -1776,7 +1823,7 @@ const tech = {
{ {
name: "laser-bot upgrade", name: "laser-bot upgrade",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">laser-bot upgrade</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">laser-bot upgrade</a>`,
description: "<strong>convert</strong> your bots to <strong>laser-bots</strong><br><strong>2.00x</strong> <strong class='color-d'>damage</strong>, efficiency, and range", description: "<strong>convert</strong> your bots to <strong>laser-bots</strong><br><strong>2x</strong> <strong class='color-d'>damage</strong>, efficiency, and range",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 3, frequency: 3,
@@ -1834,7 +1881,7 @@ const tech = {
{ {
name: "orbital-bot upgrade", name: "orbital-bot upgrade",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">orbital-bot upgrade</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">orbital-bot upgrade</a>`,
description: "<strong>convert</strong> your bots to <strong>orbital-bots</strong><br><strong>4x</strong> orbital <strong class='color-d'>damage</strong> and <strong>1.5x</strong> <strong>radius</strong>", description: "<strong>convert</strong> your bots to <strong>orbital-bots</strong><br><strong>4x</strong> orbital <strong class='color-d'>damage</strong> and <strong>2x</strong> <strong>radius</strong>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 3, frequency: 3,
@@ -1932,7 +1979,7 @@ const tech = {
}, },
{ {
name: "perimeter defense", name: "perimeter defense",
description: "for each permanent <strong class='color-bot'>bot</strong><br><strong>0.95x</strong> <strong class='color-defense'>damage taken</strong>", description: "for each permanent <strong class='color-bot'>bot</strong><br><strong>0.96x</strong> <strong class='color-defense'>damage taken</strong>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 2, frequency: 2,
@@ -1951,7 +1998,7 @@ const tech = {
}, },
{ {
name: "network effect", name: "network effect",
description: "for each permanent <strong class='color-bot'>bot</strong><br><strong>1.05x</strong> <strong class='color-d'>damage</strong>", description: "for each permanent <strong class='color-bot'>bot</strong><br><strong>1.04x</strong> <strong class='color-d'>damage</strong>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 2, frequency: 2,
@@ -1972,7 +2019,7 @@ const tech = {
name: "bot fabrication", name: "bot fabrication",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">bot fabrication</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">bot fabrication</a>`,
descriptionFunction() { descriptionFunction() {
return `after you collect ${powerUps.orb.research(2 + Math.floor(0.1666 * b.totalBots()))}use them to build a<br>random <strong class='color-bot'>bot</strong> <em>(+1 cost every 5 bots)</em>` return `after you collect ${powerUps.orb.research(2 + Math.floor(0.1666 * b.totalBots()))}use them to build a<br>random <strong class='color-bot'>bot</strong> <em style ="float: right;">(+1 cost every 5 bots)</em>`
}, },
// description: `if you collect ${powerUps.orb.research(2)}use them to build a<br>random <strong class='color-bot'>bot</strong> <em>(+1 cost every 5 bots)</em>`, // description: `if you collect ${powerUps.orb.research(2)}use them to build a<br>random <strong class='color-bot'>bot</strong> <em>(+1 cost every 5 bots)</em>`,
maxCount: 1, maxCount: 1,
@@ -2351,7 +2398,7 @@ const tech = {
{ {
name: "first derivative", name: "first derivative",
descriptionFunction() { descriptionFunction() {
return `while your <strong>first</strong> <strong class='color-g'>gun</strong> is equipped<br><strong>0.85x</strong> <strong class='color-defense'>damage taken</strong> per <strong class='color-g'>gun</strong> <em>(${(0.85 ** b.inventory.length).toFixed(2)}x)</em>` return `while your <strong>first</strong> <strong class='color-g'>gun</strong> is equipped<br><strong>0.85x</strong> <strong class='color-defense'>damage taken</strong> per <strong class='color-g'>gun</strong> <em style ="float: right;">(${(0.85 ** b.inventory.length).toFixed(2)}x)</em>`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -2682,7 +2729,7 @@ const tech = {
{ {
name: "Gibbs free energy", name: "Gibbs free energy",
descriptionFunction() { descriptionFunction() {
return `use ${powerUps.orb.research(2)}<br><span style = 'font-size:94%;'><strong>1.01x</strong> <strong class='color-d'>damage</strong> per <strong class='color-f'>energy</strong> below <strong>100</strong> <em>(${(1 + Math.max(0, 1 - m.energy)).toFixed(2)}x)</em></span>` return `use ${powerUps.orb.research(2)}<br><span style = 'font-size:94%;'><strong>1.01x</strong> <strong class='color-d'>damage</strong> per <strong class='color-f'>energy</strong> below <strong>100</strong> <em style ="float: right;">(${(1 + Math.max(0, 1 - m.energy)).toFixed(2)}x)</em></span>`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -2707,19 +2754,19 @@ const tech = {
}, },
{ {
name: "overcharge", name: "overcharge",
description: "<strong>+88</strong> maximum <strong class='color-f'>energy</strong><br><strong>+5%</strong> <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> chance", description: "<strong>+88</strong> maximum <strong class='color-f'>energy</strong><br><strong>+4%</strong> <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> chance",
maxCount: 9, maxCount: 9,
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed() {
return true return tech.junkChance < 1
}, },
requires: "", requires: "",
effect() { effect() {
tech.bonusEnergy += 0.88 tech.bonusEnergy += 0.88
m.setMaxEnergy() m.setMaxEnergy()
this.refundAmount += tech.addJunkTechToPool(0.05) this.refundAmount += tech.addJunkTechToPool(0.04)
}, },
refundAmount: 0, refundAmount: 0,
remove() { remove() {
@@ -2739,7 +2786,7 @@ const tech = {
frequency: 2, frequency: 2,
frequencyDefault: 2, frequencyDefault: 2,
allowed() { allowed() {
return m.energy > m.maxEnergy || build.isExperimentSelection return (m.energy > m.maxEnergy || build.isExperimentSelection) && tech.junkChance < 1
}, },
requires: "energy above your max", requires: "energy above your max",
effect() { effect() {
@@ -2780,7 +2827,7 @@ const tech = {
}, },
{ {
name: "energy conservation", name: "energy conservation",
description: "<strong>1.04x</strong> of <strong class='color-d'>damage</strong> done recovered as <strong class='color-f'>energy</strong>", description: "doing <strong class='color-d'>damage</strong> to mobs generates <strong class='color-f'>energy</strong>",
maxCount: 9, maxCount: 9,
count: 0, count: 0,
frequency: 1, frequency: 1,
@@ -2821,7 +2868,7 @@ const tech = {
}, },
{ {
name: "waste heat recovery", name: "waste heat recovery",
description: "if a mob has <strong>died</strong> in the last <strong>5</strong> seconds<br>generate <strong>0.05x</strong> max <strong class='color-f'>energy</strong> per second", description: "if a mob has <strong>died</strong> in the last <strong>5</strong> seconds<br>generate <strong>0.05x</strong> max <strong class='color-f'>energy</strong> every second",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 1, frequency: 1,
@@ -2840,7 +2887,7 @@ const tech = {
{ {
name: "recycling", name: "recycling",
descriptionFunction() { descriptionFunction() {
return `if a mob has <strong>died</strong> in the last <strong>5</strong> seconds<br>recover <strong>0.005x</strong> max ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} per second` return `if a mob has <strong>died</strong> in the last <strong>5</strong> seconds<br>recover <strong>0.005x</strong> max ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} every second`
}, },
description: "", description: "",
maxCount: 1, maxCount: 1,
@@ -2880,14 +2927,16 @@ const tech = {
{ {
name: "homeostasis", name: "homeostasis",
descriptionFunction() { descriptionFunction() {
return `<strong>0.8x</strong> <strong class='color-defense'>damage taken</strong> per <strong class='color-h'>health</strong> below <strong>100</strong><br><em>(${(1 - Math.max(0, 1 - m.health) * 0.8).toFixed(2)}x)</em>` // return `<strong>0.9x</strong> <strong class='color-defense'>damage taken</strong> for each ${name} missing<br><em>(${(Math.pow(0.1 * max, Math.max(0, max - h))).toFixed(2)}x)</em>`
const scale = 0.2 //adjust this to control the strength of this effect
return `reduce <strong class='color-defense'>damage taken</strong> for each missing ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"}<br>down to a limit of <strong>${scale}x</strong> at <strong>0</strong> ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"}<em style ="float: right;">(${(Math.pow(scale, Math.max(0, 1 - (tech.isEnergyHealth ? m.energy / m.maxEnergy : m.health / m.maxHealth)))).toFixed(2)}x)</em>`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed() {
return m.health < 0.6 || build.isExperimentSelection return m.health < 0.9 || build.isExperimentSelection
}, },
requires: "health below 60", requires: "health below 60",
effect() { effect() {
@@ -2900,16 +2949,16 @@ const tech = {
{ {
name: "negative feedback", name: "negative feedback",
descriptionFunction() { descriptionFunction() {
return `<strong>1.007x</strong> <strong class='color-d'>damage</strong> per ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} below <strong>100</strong><br><em>(${(1 + 0.7 * Math.max(0, 1 - (tech.isEnergyHealth ? m.energy : m.health))).toFixed(2)}x)</em>` return `<strong>1.006x</strong> <strong class='color-d'>damage</strong> for each missing ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"}<br><em style ="float: right;">(${(1 + 0.6 * Math.max(0, (tech.isEnergyHealth ? m.maxEnergy - m.energy : m.maxHealth - m.health))).toFixed(2)}x)</em>` //1 + 0.6 * Math.max(0, (tech.isEnergyHealth ? m.maxEnergy - m.energy : m.maxHealth - m.health))
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed() {
return m.health < 0.6 || build.isExperimentSelection return m.health < 0.9 || build.isExperimentSelection
}, },
requires: "health below 60", requires: "health below 90",
effect() { effect() {
tech.isLowHealthDmg = true; //used in mob.damage() tech.isLowHealthDmg = true; //used in mob.damage()
}, },
@@ -2946,6 +2995,7 @@ const tech = {
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
isBadRandomOption: true,
allowed() { allowed() {
return true return true
}, },
@@ -3048,7 +3098,7 @@ const tech = {
frequencyDefault: 1, frequencyDefault: 1,
isHealTech: true, isHealTech: true,
allowed() { allowed() {
return (m.health / m.maxHealth) < 0.7 || build.isExperimentSelection return ((m.health / m.maxHealth) < 0.7 || build.isExperimentSelection) && tech.junkChance < 1
}, },
requires: "under 70% health", requires: "under 70% health",
effect() { effect() {
@@ -3128,7 +3178,7 @@ const tech = {
{ {
name: "accretion disk", name: "accretion disk",
descriptionFunction() { descriptionFunction() {
return `<strong>1.05x</strong> <strong class='color-d'>damage</strong> <em>(${(1 + 0.05 * powerUp.length).toFixed(2)}x)</em><br>for each <strong>power up</strong> that exists on this <strong>level</strong>` return `<strong>1.05x</strong> <strong class='color-d'>damage</strong> for each <strong>power up</strong> on this <strong>level</strong><br><em style ="float: right;">(${(1 + 0.05 * powerUp.length).toFixed(2)}x)</em>`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -3301,7 +3351,7 @@ const tech = {
{ {
name: "many-worlds", name: "many-worlds",
// description: "each <strong>level</strong> is an <strong class='alt'>alternate reality</strong>, where you<br>find a <strong class='color-m'>tech</strong> at the start of each level", // description: "each <strong>level</strong> is an <strong class='alt'>alternate reality</strong>, where you<br>find a <strong class='color-m'>tech</strong> at the start of each level",
description: `on each new <strong>level</strong> spawn a <strong class='color-m'>tech</strong> power up<br>and enter an <strong class='alt'>alternate reality</strong>`, description: `at the start of each <strong>level</strong> spawn a <strong class='color-m'>tech</strong><br>and enter an <strong class='alt'>alternate reality</strong>`,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 1, frequency: 1,
@@ -3321,7 +3371,7 @@ const tech = {
{ {
name: "Ψ(t) collapse", name: "Ψ(t) collapse",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Wave_function_collapse' class="link">Ψ(t) collapse</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Wave_function_collapse' class="link">Ψ(t) collapse</a>`,
description: `after a <strong>boss</strong> <strong>dies</strong> spawn ${powerUps.orb.research(5)}<br>after you <strong class='color-r'>research</strong> enter an <strong class='alt'>alternate reality</strong>`, description: `after a <strong>boss</strong> <strong>dies</strong> spawn ${powerUps.orb.research(5)}<br>if you <strong class='color-r'>research</strong> enter an <strong class='alt'>alternate reality</strong>`,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 1, frequency: 1,
@@ -3375,9 +3425,9 @@ const tech = {
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed() {
return (powerUps.research.count > 1 || build.isExperimentSelection) && !tech.isSuperDeterminism return (powerUps.research.count > 0 || build.isExperimentSelection) && !tech.isSuperDeterminism
}, },
requires: "at least 2 research, not superdeterminism", requires: "at least 1 research, not superdeterminism",
effect() { effect() {
tech.isResearchDamage = true; tech.isResearchDamage = true;
}, },
@@ -3405,13 +3455,13 @@ const tech = {
}, },
{ {
name: "renormalization", name: "renormalization",
description: `<strong>+5%</strong> <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> chance<br><strong>47%</strong> chance to spawn ${powerUps.orb.research(1)} after consuming ${powerUps.orb.research(1)}`, description: `<strong>47%</strong> chance to spawn ${powerUps.orb.research(1)} after consuming ${powerUps.orb.research(1)}<br><strong>+5%</strong> <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> chance`,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 2, frequency: 2,
frequencyDefault: 2, frequencyDefault: 2,
allowed() { allowed() {
return (powerUps.research.count > 3 || build.isExperimentSelection) && !tech.isSuperDeterminism return (powerUps.research.count > 3 || build.isExperimentSelection) && !tech.isSuperDeterminism && tech.junkChance < 1
}, },
requires: "at least 4 research, not superdeterminism", requires: "at least 4 research, not superdeterminism",
effect() { effect() {
@@ -3453,7 +3503,7 @@ const tech = {
{ {
name: "Bayesian statistics", name: "Bayesian statistics",
descriptionFunction() { descriptionFunction() {
return `<strong>1.05x</strong> <strong class='color-d'>damage</strong> per ${powerUps.orb.research(1)} in your inventory<br><em>(${(1 + Math.max(0, 0.05 * powerUps.research.count)).toFixed(2)}x)</em>` return `<strong>1.05x</strong> <strong class='color-d'>damage</strong> per ${powerUps.orb.research(1)} in your inventory<br><em style ="float: right;">(${(1 + Math.max(0, 0.05 * powerUps.research.count)).toFixed(2)}x)</em>`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -3602,7 +3652,7 @@ const tech = {
{ {
name: "path integral", name: "path integral",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Path_integral_formulation' class="link">path integral</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Path_integral_formulation' class="link">path integral</a>`,
description: "your next <strong class='color-m'>tech</strong> <strong class='color-choice'><span>ch</span><span>oi</span><span>ce</span></strong> has all possible <strong>options</strong><br><strong>+5%</strong> <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> chance", description: "your next <strong class='color-m'>tech</strong> <strong class='color-choice'><span>ch</span><span>oi</span><span>ce</span></strong> has all possible <strong>options</strong><br><strong>+4%</strong> <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> chance",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 1, frequency: 1,
@@ -3610,13 +3660,13 @@ const tech = {
isInstant: true, isInstant: true,
// isJunk: true, // isJunk: true,
allowed() { allowed() {
return !tech.isDeterminism && !tech.isBrainstorm return !tech.isDeterminism && !tech.isBrainstorm && tech.junkChance < 1
}, },
requires: "not determinism, brainstorm", requires: "not determinism, brainstorm",
effect() { effect() {
tech.tooManyTechChoices = 1 tech.tooManyTechChoices = 1
// for (let i = 0; i < this.bonusResearch; i++) powerUps.spawn(m.pos.x + 40 * (Math.random() - 0.5), m.pos.y + 40 * (Math.random() - 0.5), "research", false); // for (let i = 0; i < this.bonusResearch; i++) powerUps.spawn(m.pos.x + 40 * (Math.random() - 0.5), m.pos.y + 40 * (Math.random() - 0.5), "research", false);
this.refundAmount += tech.addJunkTechToPool(0.05) this.refundAmount += tech.addJunkTechToPool(0.04)
}, },
refundAmount: 0, refundAmount: 0,
remove() { remove() {
@@ -3674,7 +3724,7 @@ const tech = {
{ {
name: "technical debt", name: "technical debt",
descriptionFunction() { descriptionFunction() {
return `<strong>4x</strong> <strong class='color-d'>damage</strong> but lose <strong>0.15x</strong> <strong class='color-d'>damage</strong><br>for each <strong class='color-m'>tech</strong> you have learned <em>(${(tech.totalCount > 20 ? (Math.pow(0.85, tech.totalCount - 20)) : (4 - 0.15 * tech.totalCount)).toFixed(2)}x)</em>` return `<strong>4x</strong> <strong class='color-d'>damage</strong> but lose <strong>0.15x</strong> <strong class='color-d'>damage</strong><br>for each <strong class='color-m'>tech</strong> you have learned <em style ="float: right;">(${(tech.totalCount > 20 ? (Math.pow(0.85, tech.totalCount - 20)) : (4 - 0.15 * tech.totalCount)).toFixed(2)}x)</em>`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -3712,19 +3762,19 @@ const tech = {
}, },
{ {
name: "dark patterns", name: "dark patterns",
description: "<strong>1.3x</strong> <strong class='color-d'>damage</strong><br><strong>+17%</strong> <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> chance", description: "<strong>1.3x</strong> <strong class='color-d'>damage</strong><br><strong>+15%</strong> <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> chance",
maxCount: 9, maxCount: 9,
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed() {
return true return tech.junkChance < 1
}, },
requires: "", requires: "",
damage: 1.3, damage: 1.3,
effect() { effect() {
tech.damage *= this.damage tech.damage *= this.damage
this.refundAmount += tech.addJunkTechToPool(0.17) this.refundAmount += tech.addJunkTechToPool(0.15)
}, },
refundAmount: 0, refundAmount: 0,
remove() { remove() {
@@ -3737,7 +3787,7 @@ const tech = {
{ {
name: "junk DNA", name: "junk DNA",
descriptionFunction() { descriptionFunction() {
return `increase <strong class='color-d'>damage</strong> by twice the<br><strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> chance <em>(${(1 + 2 * tech.junkChance).toFixed(2)}x)</em>` return `increase <strong class='color-d'>damage</strong> by twice the<br><strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> chance <em style ="float: right;">(${(1 + 2 * tech.junkChance).toFixed(2)}x)</em>`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -3754,46 +3804,6 @@ const tech = {
tech.isJunkDNA = false tech.isJunkDNA = false
} }
}, },
{
name: "exciton",
descriptionFunction() {
return `<span style = 'font-size:94%;'>after mobs <strong>die</strong> they have a <strong>14%</strong> chance to<br>spawn ${powerUps.orb.boost(1)} that give <strong>${(1 + powerUps.boost.damage).toFixed(2)}x</strong> <strong class='color-d'>damage</strong> for <strong>${(powerUps.boost.duration / 60).toFixed(0)}</strong> seconds</span>`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed: () => true,
requires: "",
effect() {
tech.isBoostPowerUps = true
},
remove() {
tech.isBoostPowerUps = false
}
},
{
name: "band gap",
descriptionFunction() {
return `${powerUps.orb.boost(1)} give <strong>1.77x</strong> <strong class='color-d'>damage</strong><br>but their duration is reduced by <strong>1</strong> second`
},
maxCount: 9,
count: 1,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.isBoostPowerUps || tech.isBoostReplaceAmmo
},
requires: "exciton, quasiparticles",
effect() {
powerUps.boost.duration -= 60
powerUps.boost.damage += 0.77
},
remove() {
powerUps.boost.duration = 600
powerUps.boost.damage = 1.25
}
},
{ {
name: "mass production", name: "mass production",
descriptionFunction() { descriptionFunction() {
@@ -4091,20 +4101,20 @@ const tech = {
}, },
{ {
name: "replication", name: "replication",
description: "<strong>+10%</strong> chance to <strong class='color-dup'>duplicate</strong> spawned <strong>power ups</strong><br><strong>+22%</strong> <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> chance", description: "<strong>+10%</strong> chance to <strong class='color-dup'>duplicate</strong> spawned <strong>power ups</strong><br><strong>+15%</strong> <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> chance",
maxCount: 9, maxCount: 9,
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed() {
return tech.duplicationChance() < 1. return tech.duplicationChance() < 1 && tech.junkChance < 1
}, },
requires: "below 100% duplication chance", requires: "below 100% duplication chance",
effect() { effect() {
tech.duplicateChance += 0.1 tech.duplicateChance += 0.1
powerUps.setPowerUpMode(); //needed after adjusting duplication chance powerUps.setPowerUpMode(); //needed after adjusting duplication chance
if (!build.isExperimentSelection && !simulation.isTextLogOpen) simulation.circleFlare(0.1); if (!build.isExperimentSelection && !simulation.isTextLogOpen) simulation.circleFlare(0.1);
this.refundAmount += tech.addJunkTechToPool(0.22) this.refundAmount += tech.addJunkTechToPool(0.15)
}, },
refundAmount: 0, refundAmount: 0,
remove() { remove() {
@@ -4140,7 +4150,7 @@ const tech = {
{ {
name: "correlated damage", name: "correlated damage",
descriptionFunction() { descriptionFunction() {
return `<strong class='color-dup'>duplication</strong> increases <strong class='color-d'>damage</strong><br><em>(${(1 + Math.min(1, tech.duplicationChance())).toFixed(2)}x)</em>` return `<strong class='color-dup'>duplication</strong> increases <strong class='color-d'>damage</strong><br><em style ="float: right;">(${(1 + Math.min(1, tech.duplicationChance())).toFixed(2)}x)</em>`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -4165,7 +4175,7 @@ const tech = {
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed() {
return tech.duplicationChance() > 0// && !tech.isResearchBoss return tech.duplicationChance() > 0
}, },
requires: "some duplication chance", requires: "some duplication chance",
effect() { effect() {
@@ -4287,7 +4297,7 @@ const tech = {
{ {
name: "martingale", name: "martingale",
descriptionFunction() { descriptionFunction() {
return `<span style = 'font-size:95%;'><strong>${(1 + this.damage).toFixed(1)}x</strong> <strong class='color-d'>damage</strong>. <span class='color-remove'>removing</span> this has a <strong>50%</strong><br>chance return with <strong>2x</strong> its <strong class='color-d'>damage</strong> <em>(${(1 + this.damage).toFixed(1)}x→${(1 + 2 * this.damage).toFixed(1)}x)</em></span>` return `<span style = 'font-size:95%;'><strong>${(1 + this.damage).toFixed(1)}x</strong> <strong class='color-d'>damage</strong>. <span class='color-remove'>removing</span> this has a <strong>50%</strong><br>chance return with <strong>2x</strong> its <strong class='color-d'>damage</strong> <em style ="float: right;">(${(1 + this.damage).toFixed(1)}x→${(1 + 2 * this.damage).toFixed(1)}x)</em></span>`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -4346,7 +4356,7 @@ const tech = {
name: "deprecated", name: "deprecated",
scale: 0.07, scale: 0.07,
descriptionFunction() { descriptionFunction() {
return `after <span class='color-remove'>removing</span> this gain<br><strong>${1 + this.scale}x</strong> <strong class='color-d'>damage</strong> per <span class='color-remove'>removed</span> <strong class='color-m'>tech</strong><em>(${(1 + this.scale * ((this.frequency === 0 ? 0 : 1) + tech.removeCount)).toFixed(2)}x)</em>` return `after <span class='color-remove'>removing</span> this gain<br><strong>${1 + this.scale}x</strong> <strong class='color-d'>damage</strong> per <span class='color-remove'>removed</span> <strong class='color-m'>tech</strong><em style ="float: right;">(${(1 + this.scale * ((this.frequency === 0 ? 0 : 1) + tech.removeCount)).toFixed(2)}x)</em>`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -4371,7 +4381,7 @@ const tech = {
{ {
name: "paradigm shift", name: "paradigm shift",
descriptionFunction() { descriptionFunction() {
return `when <strong>paused</strong> clicking a <strong class='color-m'>tech</strong> <span class='color-remove'>ejects</span> it<br><strong>${tech.pauseEjectTech.toFixed(1)}</strong> ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} cost <em>(1.3x cost each use)</em>` return `when <strong>paused</strong> clicking a <strong class='color-m'>tech</strong> <span class='color-remove'>ejects</span> it<br><strong>${tech.pauseEjectTech.toFixed(1)}</strong> ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} cost <em style ="float: right;">(1.3x cost each use)</em>`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -4439,7 +4449,7 @@ const tech = {
{ {
name: "Occams razor", name: "Occams razor",
descriptionFunction() { descriptionFunction() {
return `randomly <span class='color-remove'>remove</span> <strong>half</strong> your <strong class='color-m'>tech</strong><br>for each removed <strong>${(1 + this.damagePerRemoved).toFixed(2)}x</strong> <strong class='color-d'>damage</strong> <em>(~${((this.count === 0) ? 1 + this.damagePerRemoved * 0.5 * tech.totalCount : this.damage).toFixed(2)}x)</em>` return `randomly <span class='color-remove'>remove</span> <strong>half</strong> your <strong class='color-m'>tech</strong><br>for each removed <strong>${(1 + this.damagePerRemoved).toFixed(2)}x</strong> <strong class='color-d'>damage</strong> <em style ="float: right;">(~${((this.count === 0) ? 1 + this.damagePerRemoved * 0.5 * tech.totalCount : this.damage).toFixed(2)}x)</em>`
}, },
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -4617,7 +4627,7 @@ const tech = {
}, },
{ {
name: "stress concentration", name: "stress concentration",
description: "mobs below <strong>50%</strong> durability <strong>die</strong> after you shoot<br>them near their <strong>center</strong> with <strong>needles</strong> or <strong>rivets</strong>", description: "mobs below <strong>half</strong> durability <strong>die</strong> after you shoot<br>them near their <strong>center</strong> with <strong>needles</strong> or <strong>rivets</strong>",
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -5344,7 +5354,7 @@ const tech = {
}, },
{ {
name: "bound state", name: "bound state",
description: "wave packets <strong>reflect</strong> backwards <strong>2</strong> times<br><strong>0.66x</strong> wave <strong>range</strong>", description: "wave packets <strong>reflect</strong> backwards <strong>2</strong> times<br><strong>0.7x</strong> wave <strong>range</strong>",
isGunTech: true, isGunTech: true,
maxCount: 9, maxCount: 9,
count: 0, count: 0,
@@ -5655,7 +5665,7 @@ const tech = {
}, },
{ {
name: "nitroglycerin", name: "nitroglycerin",
description: "<strong>1.66x</strong> <strong class='color-e'>explosive</strong> <strong class='color-d'>damage</strong><br><strong>0.66x</strong> smaller <strong class='color-e'>explosive</strong> <strong>radius</strong>", description: "<strong>1.7x</strong> <strong class='color-e'>explosive</strong> <strong class='color-d'>damage</strong><br><strong>0.7x</strong> smaller <strong class='color-e'>explosive</strong> <strong>radius</strong>",
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -5799,7 +5809,7 @@ const tech = {
}, },
{ {
name: "chain reaction", name: "chain reaction",
description: "<strong>1.33x</strong> <strong>grenade</strong> radius and <strong class='color-d'>damage</strong><br><strong class='color-block'>blocks</strong> caught in <strong class='color-e'>explosions</strong> also <strong class='color-e'>explode</strong>", description: "<strong>1.3x</strong> <strong>grenade</strong> radius and <strong class='color-d'>damage</strong><br><strong class='color-block'>blocks</strong> caught in <strong class='color-e'>explosions</strong> also <strong class='color-e'>explode</strong>",
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -5994,20 +6004,20 @@ const tech = {
}, },
{ {
name: "booby trap", name: "booby trap",
description: "<strong>50%</strong> chance to drop a <strong>mine</strong> from <strong>power ups</strong><br><strong>+30%</strong> <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> chance", description: "<strong>50%</strong> chance to drop a <strong>mine</strong> from <strong>power ups</strong><br><strong>+15%</strong> <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> chance",
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 2, frequency: 2,
frequencyDefault: 2, frequencyDefault: 2,
allowed() { allowed() {
return tech.haveGunCheck("mine") return tech.haveGunCheck("mine") && tech.junkChance < 1
}, },
requires: "mines", requires: "mines",
effect() { effect() {
tech.isMineDrop = true; tech.isMineDrop = true;
if (tech.isMineDrop) b.mine(m.pos, { x: 0, y: 0 }, 0) if (tech.isMineDrop) b.mine(m.pos, { x: 0, y: 0 }, 0)
this.refundAmount += tech.addJunkTechToPool(0.30) this.refundAmount += tech.addJunkTechToPool(0.15)
}, },
refundAmount: 0, refundAmount: 0,
remove() { remove() {
@@ -7289,19 +7299,18 @@ const tech = {
} }
}, },
{ {
name: "slow light", name: "delayed-choice",
description: "<strong class='color-laser'>laser</strong> <strong class='color-g'>gun</strong> beam is <strong>spread</strong> into your recent <strong>past</strong><br><strong>4x</strong> full beam <strong class='color-d'>damage</strong>", description: "<strong class='color-laser'>laser</strong> <strong class='color-g'>gun</strong> fires a <strong>0.4</strong> second <strong>delayed</strong> beam<br>delayed beams do <strong>0.7x</strong> <strong class='color-d'>damage</strong>",
isGunTech: true, isGunTech: true,
maxCount: 9, maxCount: 9,
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed() {
return tech.haveGunCheck("laser") && tech.laserReflections < 3 && !tech.beamSplitter && !tech.isWideLaser return tech.haveGunCheck("laser") && !tech.beamSplitter && !tech.isWideLaser
}, },
requires: "laser gun, not specular reflection, diffraction grating, diffuse beam", requires: "laser gun, diffraction grating, diffuse beam",
effect() { effect() {
// this.description = `add 5 more <strong>laser</strong> beams into into your past`
tech.historyLaser++ tech.historyLaser++
b.guns[11].chooseFireMethod() b.guns[11].chooseFireMethod()
}, },
@@ -7506,7 +7515,7 @@ const tech = {
{ {
name: "electronegativity", name: "electronegativity",
descriptionFunction() { descriptionFunction() {
return `<strong>1.0023x</strong> <strong class='color-d'>damage</strong> per <strong class='color-f'>energy</strong><br><em>(${(1 + 0.23 * m.maxEnergy).toFixed(2)}x damage at max energy)</em>` return `<strong>1.0023x</strong> <strong class='color-d'>damage</strong> per <strong class='color-f'>energy</strong><br><em style ="float: right;">(${(1 + 0.23 * m.maxEnergy).toFixed(2)}x damage at max energy)</em>`
}, },
// description: "<strong>+1%</strong> <strong class='color-d'>damage</strong> per <strong>8</strong> stored <strong class='color-f'>energy</strong>", // description: "<strong>+1%</strong> <strong class='color-d'>damage</strong> per <strong>8</strong> stored <strong class='color-f'>energy</strong>",
isFieldTech: true, isFieldTech: true,
@@ -7644,7 +7653,7 @@ const tech = {
{ {
name: "dynamic equilibrium", name: "dynamic equilibrium",
descriptionFunction() { descriptionFunction() {
return `increase <strong class='color-d'>damage</strong> by your last ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} loss<br><em>(${(1 + tech.lastHitDamage * m.lastHit).toFixed(2)}x damage)</em>` return `increase <strong class='color-d'>damage</strong> by your last ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"} loss<br> style ="float: right;">(${(1 + tech.lastHitDamage * m.lastHit).toFixed(2)}x damage)</em>`
}, },
isFieldTech: true, isFieldTech: true,
maxCount: 9, maxCount: 9,
@@ -7873,7 +7882,8 @@ const tech = {
// description: "molecular assembler <strong class='color-print'>prints</strong> one <strong class='color-block'>block</strong><br>to <strong>jump</strong> off while midair", // description: "molecular assembler <strong class='color-print'>prints</strong> one <strong class='color-block'>block</strong><br>to <strong>jump</strong> off while midair",
descriptionFunction() { descriptionFunction() {
const fieldName = m.fieldMode === 8 ? "pilot wave" : "molecular assembler" const fieldName = m.fieldMode === 8 ? "pilot wave" : "molecular assembler"
return `${fieldName} <strong class='color-print'>prints</strong> a <strong class='color-block'>block</strong><br>to <strong>jump</strong> off while midair a second time` return `a second <strong>jump</strong> in <strong>midair</strong><br>will <strong class='color-print'>print</strong> a <strong class='color-block'>block</strong> to <strong>jump</strong> off`
// return `${fieldName} <strong class='color-print'>prints</strong> a <strong class='color-block'>block</strong><br>to <strong>jump</strong> off while midair`
}, },
isFieldTech: true, isFieldTech: true,
maxCount: 1, maxCount: 1,
@@ -7885,10 +7895,66 @@ const tech = {
}, },
requires: "molecular assembler, pilot wave", requires: "molecular assembler, pilot wave",
effect() { effect() {
tech.isBlockJump = true simulation.ephemera.push({
name: "blockJump",
blockJumpPhase: 0,
do() {
if (m.onGround && m.buttonCD_jump + 10 < m.cycle && !(m.lastOnGroundCycle + m.coyoteCycles > m.cycle)) this.blockJumpPhase = 0 //reset after touching ground or block
if (this.blockJumpPhase === 0 && !m.onGround && !input.up && m.buttonCD_jump + 10 < m.cycle) { //not pressing jump
this.blockJumpPhase = 1
} else if (this.blockJumpPhase === 1 && input.up && m.buttonCD_jump + 10 < m.cycle) { //2nd jump
this.blockJumpPhase = 2
let horizontalVelocity = 8 * (- input.left + input.right) //ive player and block horizontal momentum
const radius = 25 + Math.floor(15 * Math.random())
body[body.length] = Matter.Bodies.polygon(m.pos.x, m.pos.y + 60 + radius, 4, radius, {
friction: 0.05,
frictionAir: 0.001,
collisionFilter: {
category: cat.body,
mask: cat.player | cat.map | cat.body | cat.bullet | cat.mob | cat.mobBullet
},
classType: "body",
});
const block = body[body.length - 1]
//mess with the block shape (this code is horrible)
Composite.add(engine.world, block); //add to world
const r1 = radius * (1 + 0.4 * Math.random())
const r2 = radius * (1 + 0.4 * Math.random())
let angle = Math.PI / 4
const vertices = []
for (let i = 0, len = block.vertices.length; i < len; i++) {
angle += 2 * Math.PI / len
vertices.push({ x: block.position.x + r1 * Math.cos(angle), y: block.position.y + r2 * Math.sin(angle) })
}
Matter.Body.setVertices(block, vertices)
// Matter.Body.setAngle(block, Math.PI / 4)
Matter.Body.setVelocity(block, { x: 0.9 * player.velocity.x - horizontalVelocity, y: 10 });
Matter.Body.applyForce(block, m.pos, { x: 0, y: m.jumpForce * 0.12 * Math.min(m.standingOn.mass, 5) });
if (tech.isBlockRestitution) {
block.restitution = 0.999 //extra bouncy
block.friction = block.frictionStatic = block.frictionAir = 0.001
}
if (tech.isAddBlockMass) {
const expand = function (that, massLimit) {
if (that.mass < massLimit) {
const scale = 1.04;
Matter.Body.scale(that, scale, scale);
setTimeout(expand, 20, that, massLimit);
}
};
expand(block, Math.min(20, block.mass * 3))
}
//jump
m.buttonCD_jump = m.cycle; //can't jump again until 20 cycles pass
Matter.Body.setVelocity(player, { x: player.velocity.x + horizontalVelocity, y: -7.5 + 0.25 * player.velocity.y });
player.force.y = -m.jumpForce; //player jump force
}
},
})
}, },
remove() { remove() {
tech.isBlockJump = false if (this.count) simulation.removeEphemera("blockJump")
} }
}, },
{ {
@@ -8213,7 +8279,7 @@ const tech = {
{ {
name: "time crystals", name: "time crystals",
descriptionFunction() { descriptionFunction() {
return `<strong>2.5x</strong> passive <strong class='color-f'>energy</strong> generation<br><em>(+${(150 * m.fieldRegen * 60).toFixed(1)} energy per second)</em>` return `<strong>2.5x</strong> passive <strong class='color-f'>energy</strong> generation<br><em style ="float: right;">(+${(150 * m.fieldRegen * 60).toFixed(1)} energy per second)</em>`
}, },
isFieldTech: true, isFieldTech: true,
maxCount: 1, maxCount: 1,
@@ -8228,14 +8294,14 @@ const tech = {
tech.isTimeCrystals = true tech.isTimeCrystals = true
m.setFieldRegen() m.setFieldRegen()
this.descriptionFunction = function () { this.descriptionFunction = function () {
return `<strong>2.5x</strong> passive <strong class='color-f'>energy</strong> generation<br><em>(+${(60 * m.fieldRegen * 60).toFixed(1)} energy per second)</em>` return `<strong>2.5x</strong> passive <strong class='color-f'>energy</strong> generation<br><em style ="float: right;">(+${(60 * m.fieldRegen * 60).toFixed(1)} energy per second)</em>`
} }
}, },
remove() { remove() {
tech.isTimeCrystals = false tech.isTimeCrystals = false
m.setFieldRegen() m.setFieldRegen()
this.descriptionFunction = function () { this.descriptionFunction = function () {
return `<strong>2.5x</strong> passive <strong class='color-f'>energy</strong> generation<br><em>(+${(150 * m.fieldRegen * 60).toFixed(1)} energy per second)</em>` return `<strong>2.5x</strong> passive <strong class='color-f'>energy</strong> generation<br><em style ="float: right;">(+${(150 * m.fieldRegen * 60).toFixed(1)} energy per second)</em>`
} }
} }
}, },
@@ -8394,9 +8460,9 @@ const tech = {
frequency: 2, frequency: 2,
frequencyDefault: 2, frequencyDefault: 2,
allowed() { allowed() {
return m.fieldMode === 9 || m.fieldMode === 8 || m.fieldMode === 6 return m.fieldMode === 9 || m.fieldMode === 8
}, },
requires: "wormhole, pilot wave, time dilation", requires: "wormhole, pilot wave",
effect() { effect() {
tech.wimpCount++ tech.wimpCount++
spawn.WIMP() spawn.WIMP()
@@ -9267,7 +9333,7 @@ const tech = {
if (tech.tech[i].isJunk) list.push(tech.tech[i].name) if (tech.tech[i].isJunk) list.push(tech.tech[i].name)
} }
let name = list[Math.floor(Math.random() * list.length)] let name = list[Math.floor(Math.random() * list.length)]
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${name}</span>")<em>`); simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${name}</span>")`);
tech.giveTech(name) tech.giveTech(name)
} }
}, },
@@ -10477,19 +10543,19 @@ const tech = {
}, },
{ {
name: "expert system", name: "expert system",
description: "spawn a <strong class='color-m'>tech</strong> power up<br><strong>+64%</strong> <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> chance", description: "spawn a <strong class='color-m'>tech</strong> power up<br><strong>+50%</strong> <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> chance",
maxCount: 9, maxCount: 9,
count: 0, count: 0,
frequency: 0, frequency: 0,
isInstant: true, isInstant: true,
isJunk: true, isJunk: true,
allowed() { allowed() {
return true return tech.junkChance < 1
}, },
requires: "", requires: "",
effect() { effect() {
powerUps.spawn(m.pos.x, m.pos.y, "tech"); powerUps.spawn(m.pos.x, m.pos.y, "tech");
tech.addJunkTechToPool(0.64) tech.addJunkTechToPool(0.5)
}, },
remove() { } remove() { }
}, },
@@ -11723,7 +11789,6 @@ const tech = {
isDroneTeleport: null, isDroneTeleport: null,
isDroneFastLook: null, isDroneFastLook: null,
isBulletTeleport: null, isBulletTeleport: null,
isResearchBoss: null,
isJunkResearch: null, isJunkResearch: null,
laserColor: null, laserColor: null,
laserColorAlpha: null, laserColorAlpha: null,
@@ -11844,5 +11909,4 @@ const tech = {
interestRate: null, interestRate: null,
isImmunityDamage: null, isImmunityDamage: null,
isMobDeathImmunity: null, isMobDeathImmunity: null,
isBlockJump: null,
} }

View File

@@ -193,8 +193,6 @@ summary {
gap: 10px; gap: 10px;
background-color: #444; background-color: #444;
/* padding: 10px 1px; */ /* padding: 10px 1px; */
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
@@ -212,6 +210,7 @@ summary {
overflow: auto; overflow: auto;
-ms-overflow-style: none; -ms-overflow-style: none;
scrollbar-width: none; scrollbar-width: none;
/* box-shadow: 7px 7px 6px rgba(0, 0, 0, 0.13); */
} }
@@ -394,7 +393,7 @@ summary {
border-top-right-radius: 0px; border-top-right-radius: 0px;
padding: 0.2em 0px; padding: 0.2em 0px;
/* height: 210px; */ /* height: 210px; */
box-shadow: 8px 8px 7px rgba(0, 0, 50, 0.15); box-shadow: 8px 8px 6px rgba(0, 0, 50, 0.15);
} }
.card-background { .card-background {
@@ -589,6 +588,7 @@ summary {
border-radius: 8px; border-radius: 8px;
border: 2px #333 solid; border: 2px #333 solid;
background-color: #fff; background-color: #fff;
/* box-shadow: 8px 8px 6px rgba(0, 0, 60, 0.11); */
} }
@@ -1575,9 +1575,10 @@ summary {
} }
.pause-difficulty-row { .pause-difficulty-row {
line-height: 140%; line-height: 130%;
font-size: 1em; font-size: 1em;
padding: 10px; padding: 7px 0px 7px 0px;
/* top | right | bottom | left */
margin: -5px 0; margin: -5px 0;
} }
@@ -1656,6 +1657,7 @@ summary {
background-color: hsl(240, 18%, 93%); background-color: hsl(240, 18%, 93%);
border: 1px solid #333; border: 1px solid #333;
border-radius: 5px; border-radius: 5px;
padding: 5px; padding: 7px;
margin-bottom: 10px; margin-bottom: 10px;
/* box-shadow: 4px 4px 4px hsla(240, 0%, 17%, 0.14); */
} }

View File

@@ -1,17 +1,37 @@
******************************************************** NEXT PATCH ************************************************** ******************************************************** NEXT PATCH **************************************************
tech: working mass - in midair molecular assembler or pilot wave prints a block to jump off new community levels: (you can enable community maps in the settings)
rings by thatLittleFrog
flappyGon by Digin
trial by Cirryn and Tarantula Hawk
arena level updated by Whyisthisnotavalable
buckling: 100%->50% chance to spawn a power up from any block that kills a mob difficulty scaling: 0.84->0.85x player damage per level
no longer requires the block to be thrown research spawn per level is no longer in the difficulty settings
mobs: powerUpBoss, snakeBoss tails, cellBoss, ghoster, sucker - all collide with blocks now instead players get 1 research for only the first few levels
added a few more blocks to towers level cell boss has less health at high difficulty
deprecated: 1.05->1.07 damage per removed tech
laserLayerBoss has 33% less health and has fewer lasers at higher difficulties
bugfix converted JUNK tech to additive, instead of the multiplicative
disabled spawnDelay stopping on damage because it had too many negative tech interactions makes the first JUNK you take do the same, but if you take too much you can get to 100%
metastability + paradigm shift no longer makes all ejected tech explode right aligned some text in tech descriptions
added some circles to the in-game console messages
renamed slow light -> delayed-choice - a single 0.4 second delayed 0.7x damage laser beam
also now works with reflection
plasma torch field gets 1.5x damage by default
molecular assembler coupling 0.8->0.6 energy per second
nail-bot upgrade 5->4x fire rate
foam-bot upgrade 3->2.5x size and fire rate
sound-bot upgrade 2.5->2x fire rate, damage, 1->2x wave packet length
boom-bot upgrade reduced range, bot acceleration
orbital-bot upgrade 1.5->2x radius
perimeter defense 0.95->0.96x damage taken per bot
network effect 1.05->1.04x damage per bot
tech: working mass - cleaned up physics and logic a bit
negative feedback scales with health below maxHealth, not health below 100
1.007->1.006x damage per missing health
homeostasis scales with missing health, not health below 100
limit of 0.2x at 0 health
******************************************************* DESIGN ****************************************************** ******************************************************* DESIGN ******************************************************
@@ -39,6 +59,17 @@ list of powerful synergies
*********************************************************** TODO ***************************************************** *********************************************************** TODO *****************************************************
figure out how to put controls in background on initial level
mouse smooth makes the text position jitter when it moves sub pixels
hide the jitter with artificial jitter to make it seem intentional
make it look like the instructions are on a fuzzy TV screen
when player presses move buttons highlight the box/letter for those buttons
a few bosses have too much health
probably the ones that scale with simulation.difficulty
Matter.Body.setDensity(me, 0.00012 + 0.00001 * simulation.difficulty) // normal density is 0.001
make player mass an adjustable var in the skin make player mass an adjustable var in the skin
does this mess with jump height or air control? does this mess with jump height or air control?
increase mass and movement speed at the same time increase mass and movement speed at the same time
@@ -48,27 +79,20 @@ increase mass and movement speed at the same time
possible player.mass bad interactions possible player.mass bad interactions
grapple grapple
tech: - if health === maxHealth take 0.6x damage
do 1.5x damage?
JUNK tech - player takes damage from block collisions JUNK tech - player takes damage from block collisions
is this gonna contribute to lag? is this gonna contribute to lag?
player damage seems low tech: anthropic principle - cost 1 research to let you not die once per level
player damage taken seems fine, or maybe increase another tech that allows it to trigger multiple times
difficulty rework: explicit changes to the game to increase difficulty
UI -
add a wire attached to difficulty power up
like the one attached to player, but thinner
laser: slow light is the least fun laser tech, make it more fun
tokamak synergy tech tokamak synergy tech
tech: stellarator - after firing a block with tokamak, heal (scale heal amount with block mass?) tech: stellarator - after firing a block with tokamak, heal (scale heal amount with block mass?)
tech: inertial confinement - while charging tokamak you can fly, and invulnerable tech: inertial confinement - while charging tokamak you can fly, and invulnerable
but energy drains but energy drains
after getting a new tech,gun,field draw that tech where it would be in a pause menu for a second seconds
this makes it easier for people to see what's going on
bullets should trigger shrinking platforms level element? bullets should trigger shrinking platforms level element?
level element - player activated elevators level element - player activated elevators