gun ammo descriptions

missile Bot: +10% bigger explosions, +10% damage, +7% fire rate
plasma Bot: +40% damage, and drains 2% less energy
1st ionization energy: 8->11 energy per heal
mass-energy: defense reduction factor 0.13->0.33
neutron bomb: +25% damage
non-renewables: 78->88% damage
junk DNA: applies to all damage, not just spores
pseudoscience: adds (1-4)->(1-3) JUNK to tech pool per free research
futures exchange: 4.1->4.3 duplication per cancel

default skin has slightly more narrow legs

added ammo to gun descriptions
This commit is contained in:
landgreen
2023-09-25 19:49:07 -07:00
parent 8a3ac11793
commit bf5f8661fc
7 changed files with 2341 additions and 2259 deletions

View File

@@ -1108,10 +1108,7 @@ const b = {
Composite.add(engine.world, bullet[me]); //add bullet to world
}
grenadeNeutron = function (where = {
x: m.pos.x + 30 * Math.cos(m.angle),
y: m.pos.y + 30 * Math.sin(m.angle)
}, angle = m.angle, size = 1) {
grenadeNeutron = function (where = { x: m.pos.x + 30 * Math.cos(m.angle), y: m.pos.y + 30 * Math.sin(m.angle) }, angle = m.angle, size = 1) {
const me = bullet.length;
bullet[me] = Bodies.polygon(where.x, where.y, 10, 4, b.fireAttributes(angle, false));
b.fireProps((m.crouch ? 45 : 25) / Math.pow(0.92, tech.missileCount), m.crouch ? 35 : 20, angle, me); //cd , speed
@@ -1132,15 +1129,9 @@ const b = {
Matter.Body.scale(bullet[me], SCALE, SCALE);
speed = m.crouch ? 25 : 15
// speed = m.crouch ? 43 : 32
Matter.Body.setVelocity(bullet[me], {
x: m.Vx / 2 + speed * Math.cos(angle),
y: m.Vy / 2 + speed * Math.sin(angle)
});
Matter.Body.setVelocity(bullet[me], { x: m.Vx / 2 + speed * Math.cos(angle), y: m.Vy / 2 + speed * Math.sin(angle) });
const MAG = 0.005
bullet[me].thrust = {
x: bullet[me].mass * MAG * Math.cos(angle),
y: bullet[me].mass * MAG * Math.sin(angle)
}
bullet[me].thrust = { x: bullet[me].mass * MAG * Math.cos(angle), y: bullet[me].mass * MAG * Math.sin(angle) }
}
bullet[me].beforeDmg = function () { };
@@ -1148,26 +1139,17 @@ const b = {
bullet[me].do = function () {
const onCollide = () => {
this.collisionFilter.mask = 0; //non collide with everything
Matter.Body.setVelocity(this, {
x: 0,
y: 0
});
if (tech.isRPG) this.thrust = {
x: 0,
y: 0
}
Matter.Body.setVelocity(this, { x: 0, y: 0 });
if (tech.isRPG) this.thrust = { x: 0, y: 0 }
this.do = this.radiationMode;
}
const mobCollisions = Matter.Query.collides(this, mob)
if (mobCollisions.length) {
onCollide()
this.stuckTo = mobCollisions[0].bodyA
mobs.statusDoT(this.stuckTo, 0.5, 360) //apply radiation damage status effect on direct hits
mobs.statusDoT(this.stuckTo, 0.6, 360) //apply radiation damage status effect on direct hits
if (this.stuckTo.isVerticesChange) {
this.stuckToRelativePosition = {
x: 0,
y: 0
}
this.stuckToRelativePosition = { x: 0, y: 0 }
} else {
//find the relative position for when the mob is at angle zero by undoing the mobs rotation
this.stuckToRelativePosition = Vector.rotate(Vector.sub(this.position, this.stuckTo.position), -this.stuckTo.angle)
@@ -1234,17 +1216,14 @@ const b = {
}
}
//aoe damage to mobs
let dmg = m.dmgScale * 0.11 * tech.radioactiveDamage
let dmg = m.dmgScale * 0.15 * tech.radioactiveDamage
for (let i = 0, len = mob.length; i < len; i++) {
if (Vector.magnitude(Vector.sub(mob[i].position, this.position)) < this.damageRadius + mob[i].radius) {
if (Matter.Query.ray(map, mob[i].position, this.position).length > 0) dmg *= 0.25 //reduce damage if a wall is in the way
if (Matter.Query.ray(map, mob[i].position, this.position).length > 0) dmg *= 0.2 //reduce damage if a wall is in the way
mob[i].damage(mob[i].shield ? dmg * 3 : dmg);
mob[i].locatePlayer();
if (tech.isNeutronSlow && mob[i].speed > 4) {
Matter.Body.setVelocity(mob[i], {
x: mob[i].velocity.x * 0.97,
y: mob[i].velocity.y * 0.97
});
Matter.Body.setVelocity(mob[i], { x: mob[i].velocity.x * 0.97, y: mob[i].velocity.y * 0.97 });
}
}
}
@@ -1255,16 +1234,12 @@ const b = {
ctx.fill();
ctx.globalCompositeOperation = "source-over"
if (tech.isNeutronSlow) {
let slow = (who, radius = this.explodeRad * 3.2) => {
for (i = 0, len = who.length; i < len; i++) {
const sub = Vector.sub(this.position, who[i].position);
const dist = Vector.magnitude(sub);
if (dist < radius) {
Matter.Body.setVelocity(who[i], {
x: who[i].velocity.x * 0.975,
y: who[i].velocity.y * 0.975
});
Matter.Body.setVelocity(who[i], { x: who[i].velocity.x * 0.975, y: who[i].velocity.y * 0.975 });
}
}
}
@@ -1313,10 +1288,7 @@ const b = {
if (!input.field && m.crouch) {
const cycles = Math.floor(m.crouch ? 50 : 30) //30
const speed = m.crouch ? 44 : 35
const v = {
x: speed * Math.cos(m.angle),
y: speed * Math.sin(m.angle)
}
const v = { x: speed * Math.cos(m.angle), y: speed * Math.sin(m.angle) }
ctx.strokeStyle = "rgba(68, 68, 68, 0.2)" //color.map
ctx.lineWidth = 2
ctx.beginPath()
@@ -1333,10 +1305,7 @@ const b = {
if (!input.field && m.crouch) {
const cycles = Math.floor(m.crouch ? 120 : 80) //30
const speed = m.crouch ? 43 : 32
const v = {
x: speed * Math.cos(m.angle),
y: speed * Math.sin(m.angle)
} //m.Vy / 2 + removed to make the path less jerky
const v = { x: speed * Math.cos(m.angle), y: speed * Math.sin(m.angle) } //m.Vy / 2 + removed to make the path less jerky
ctx.strokeStyle = "rgba(68, 68, 68, 0.2)" //color.map
ctx.lineWidth = 2
ctx.beginPath()
@@ -3195,7 +3164,7 @@ const b = {
thrust: (tech.isSporeFollow ? 0.0012 : 0.00055) * (1 + 0.5 * (Math.random() - 0.5)),
wormSize: wormSize,
wormTail: 1 + Math.max(4, Math.min(wormSize - 2 * tech.wormSize, 30)),
dmg: (tech.isMutualism ? 9.5 : 3.2) * wormSize * (tech.isJunkDNA ? 1 + 0.53 * tech.junkCount : 1),
dmg: (tech.isMutualism ? 9.5 : 3.2) * wormSize,
lookFrequency: 100 + Math.floor(37 * Math.random()),
classType: "bullet",
collisionFilter: {
@@ -3311,7 +3280,7 @@ const b = {
friction: 0,
frictionAir: 0.025,
thrust: (tech.isSporeFollow ? 0.0011 : 0.0005) * (1 + 0.3 * (Math.random() - 0.5)),
dmg: (tech.isMutualism ? 20 : 7) * (tech.isJunkDNA ? 1 + 0.53 * tech.junkCount : 1), //bonus damage from tech.isMutualism
dmg: (tech.isMutualism ? 20 : 7), //bonus damage from tech.isMutualism
lookFrequency: 100 + Math.floor(117 * Math.random()),
classType: "bullet",
isSpore: true,
@@ -3335,6 +3304,7 @@ const b = {
if (m.health > m.maxHealth) m.health = m.maxHealth;
m.displayHealth();
}
console.log(this.dmg)
},
do() {
if (this.lockedOn && this.lockedOn.alive) {
@@ -3533,7 +3503,7 @@ const b = {
cd: simulation.cycle + 10,
dmg: 0,
setDamage() { //dmg is set to zero after doing damage once, and set back to normal after jumping
this.dmg = radius * (tech.isMutualism ? 2.9 : 1) * (tech.isJunkDNA ? 1 + 0.53 * tech.junkCount : 1) //damage done in addition to the damage from momentum //spores do 7 dmg, worms do 18
this.dmg = radius * (tech.isMutualism ? 2.9 : 1) //damage done in addition to the damage from momentum //spores do 7 dmg, worms do 18
},
beforeDmg(who) {
Matter.Body.setVelocity(this, Vector.mult(Vector.normalise(Vector.sub(this.position, who.position)), 10 + 10 * Math.random())); //push away from target
@@ -5335,10 +5305,7 @@ const b = {
})
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)
}, isConsole = true) {
missileBot(position = { x: player.position.x + 50 * (Math.random() - 0.5), y: player.position.y + 50 * (Math.random() - 0.5) }, isConsole = true) {
if (isConsole) simulation.makeTextLog(`<span class='color-var'>b</span>.missileBot()`);
const me = bullet.length;
bullet[me] = Bodies.rectangle(position.x, position.y, 28, 11, {
@@ -5350,9 +5317,9 @@ const b = {
restitution: 0.7,
dmg: 0, // 0.14 //damage done in addition to the damage from momentum
minDmgSpeed: 2,
lookFrequency: 27 + Math.ceil(6 * Math.random()),
lookFrequency: 26 + Math.ceil(6 * Math.random()),
cd: 0,
delay: Math.floor(65 * b.fireCDscale),
delay: Math.floor(60 * b.fireCDscale),
range: 70 + 3 * b.totalBots(),
endCycle: Infinity,
classType: "bullet",
@@ -5387,11 +5354,8 @@ const b = {
if (tech.missileCount > 1) {
const countReduction = Math.pow(0.85, tech.missileCount)
const size = 0.9 * Math.sqrt(countReduction)
const direction = {
x: Math.cos(angle),
y: Math.sin(angle)
}
const size = Math.sqrt(countReduction)
const direction = { x: Math.cos(angle), y: Math.sin(angle) }
const push = Vector.mult(Vector.perp(direction), 0.015 * countReduction / Math.sqrt(tech.missileCount))
for (let i = 0; i < tech.missileCount; i++) {
setTimeout(() => {
@@ -5401,7 +5365,7 @@ const b = {
}, 40 * tech.missileCount * Math.random());
}
} else {
b.missile(this.position, angle, -8, 0.9)
b.missile(this.position, angle, -8) // missile(where, angle, speed, size = 1) {
}
break;
}
@@ -6039,10 +6003,7 @@ const b = {
})
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)
}, isConsole = true) {
plasmaBot(position = { x: player.position.x + 50 * (Math.random() - 0.5), y: player.position.y + 50 * (Math.random() - 0.5) }, isConsole = true) {
if (isConsole) simulation.makeTextLog(`<span class='color-var'>b</span>.plasmaBot()`);
const me = bullet.length;
const dir = m.angle;
@@ -6100,7 +6061,7 @@ const b = {
const DIST = Vector.magnitude(sub);
const unit = Vector.normalise(sub)
if (DIST < tech.isPlasmaRange * 450 && m.energy > this.drainThreshold) {
m.energy -= 0.00135 //0.004; //normal plasma field is 0.00008 + m.fieldRegen = 0.00108
m.energy -= 0.0013 //0.004; //normal plasma field is 0.00008 + m.fieldRegen = 0.00108
// if (m.energy < 0) {
// m.fieldCDcycle = m.cycle + 120;
// m.energy = 0;
@@ -6150,33 +6111,23 @@ const b = {
}
};
//check for collisions
best = {
x: null,
y: null,
dist2: Infinity,
who: null,
v1: null,
v2: null
};
best = { x: null, y: null, dist2: Infinity, who: null, v1: null, v2: null };
vertexCollision(path[0], path[1], mob);
vertexCollision(path[0], path[1], map);
vertexCollision(path[0], path[1], body);
if (best.dist2 != Infinity) { //if hitting something
path[path.length - 1] = {
x: best.x,
y: best.y
};
path[path.length - 1] = { x: best.x, y: best.y };
if (best.who.alive) {
const dmg = 0.9 * m.dmgScale; //********** SCALE DAMAGE HERE *********************
const dmg = 1.4 * m.dmgScale; //********** SCALE DAMAGE HERE *********************
best.who.damage(dmg);
best.who.locatePlayer();
//push mobs away
const force = Vector.mult(Vector.normalise(Vector.sub(m.pos, path[1])), -0.01 * Math.min(5, best.who.mass))
const force = Vector.mult(Vector.normalise(Vector.sub(m.pos, path[1])), -0.007 * Math.min(5, best.who.mass))
Matter.Body.applyForce(best.who, path[1], force)
if (best.who.speed > 3) {
if (best.who.speed > 2.5) {
Matter.Body.setVelocity(best.who, { //friction
x: best.who.velocity.x * 0.7,
y: best.who.velocity.y * 0.7
x: best.who.velocity.x * 0.75,
y: best.who.velocity.y * 0.75
});
}
//draw mob damage circle
@@ -6340,9 +6291,13 @@ const b = {
//9 harpoon
//10 mine
//11 laser
guns: [{
guns: [
{
name: "nail gun", // 0
description: "use compressed air to fire a stream of <strong>nails</strong><br><strong><em>delay</em></strong> after firing <strong>decreases</strong> as you shoot",
// description: `use compressed air to shoot a stream of <strong>nails</strong><br><em>fire rate</em> <strong>increases</strong> the longer you fire<br><strong>60</strong> nails per ${powerUps.orb.ammo()}`,
descriptionFunction() {
return `use compressed air to rapidly drive <strong>nails</strong><br><em>fire rate</em> <strong>increases</strong> the longer you fire<br><strong>${this.ammoPack.toFixed(0)}</strong> nails per ${powerUps.orb.ammo()}`
},
ammo: 0,
ammoPack: 60,
defaultAmmoPack: 60,
@@ -6654,7 +6609,10 @@ const b = {
},
{
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>",
// 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() {
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> nails per ${powerUps.orb.ammo()}`
},
ammo: 0,
ammoPack: 3.5,
defaultAmmoPack: 3.5,
@@ -6942,7 +6900,10 @@ const b = {
}
}, {
name: "super balls", //2
description: "fire <strong>3</strong> balls in a wide arc<br>balls <strong>bounce</strong> with no momentum loss",
// 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() {
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()}`
},
ammo: 0,
ammoPack: 9,
have: false,
@@ -7017,7 +6978,10 @@ const b = {
},
{
name: "wave", //3
description: "emit <strong>wave packets</strong> that propagate through <strong>solids</strong><br>waves <strong class='color-s'>slow</strong> mobs", // of oscillating particles<br>
// description: `emit <strong>wave packets</strong> that propagate through <strong>solids</strong><br>waves <strong class='color-s'>slow</strong> mobs<br><strong>115</strong> packets per ${powerUps.orb.ammo()}`,
descriptionFunction() {
return `emit <strong>wave packets</strong> that propagate through <strong>solids</strong><br>waves <strong class='color-s'>slow</strong> mobs<br><strong>${this.ammoPack.toFixed(0)}</strong> wave packets per ${powerUps.orb.ammo()}`
},
ammo: 0,
ammoPack: 115,
defaultAmmoPack: 115,
@@ -7377,7 +7341,10 @@ const b = {
},
{
name: "missiles", //6
description: "launch <strong>homing</strong> missiles that target mobs<br>missiles <strong class='color-e'>explode</strong> on contact with mobs",
// description: `launch <strong>homing</strong> missiles that target mobs<br>missiles <strong class='color-e'>explode</strong> on contact with mobs<br><strong>5</strong> missiles per ${powerUps.orb.ammo()}`,
descriptionFunction() {
return `launch <strong>homing</strong> missiles that target mobs<br>missiles <strong class='color-e'>explode</strong> on contact with mobs<br><strong>${this.ammoPack.toFixed(1)}</strong> missiles per ${powerUps.orb.ammo()}`
},
ammo: 0,
ammoPack: 5,
have: false,
@@ -7482,7 +7449,10 @@ const b = {
}
}, {
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",
// 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() {
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()}`
},
ammo: 0,
ammoPack: 7,
have: false,
@@ -7503,7 +7473,10 @@ const b = {
},
}, {
name: "spores", //6
description: "fire a <strong class='color-p' style='letter-spacing: 2px;'>sporangium</strong> that discharges <strong class='color-p' style='letter-spacing: 2px;'>spores</strong><br><strong class='color-p' style='letter-spacing: 2px;'>spores</strong> seek out nearby mobs",
// description: `toss a <strong class='color-p' style='letter-spacing: 2px;'>sporangium</strong> that discharges <strong class='color-p' style='letter-spacing: 2px;'>spores</strong><br><strong class='color-p' style='letter-spacing: 2px;'>spores</strong> seek out nearby mobs<br><strong>2-3</strong> sporangium per ${powerUps.orb.ammo()}`,
descriptionFunction() {
return `toss a <strong class='color-p' style='letter-spacing: 2px;'>sporangium</strong> that discharges ${b.guns[6].nameString("s")}<br>${b.guns[6].nameString("s")} seek out nearby mobs<br><strong>${this.ammoPack.toFixed(1)}</strong> sporangium per ${powerUps.orb.ammo()}`
},
ammo: 0,
ammoPack: 2.6,
have: false,
@@ -7700,7 +7673,10 @@ const b = {
}
}, {
name: "drones", //7
description: "deploy <strong>autonomous</strong> drones that <strong>smash</strong> into mobs<br>and <strong>collect</strong> nearby power ups", //crashes reduce their <strong>lifespan</strong> by 1 second
// description: `deploy <strong>autonomous</strong> drones that <strong>smash</strong> into mobs<br>and <strong>collect</strong> nearby power ups<br><strong>16</strong> drones per ${powerUps.orb.ammo()}`,
descriptionFunction() {
return `deploy <strong>autonomous</strong> <strong>drones</strong> that smash into mobs<br>drones <strong>collect</strong> nearby power ups<br><strong>${this.ammoPack.toFixed(0)}</strong> drones per ${powerUps.orb.ammo()}`
},
ammo: 0,
ammoPack: 16,
defaultAmmoPack: 16,
@@ -7740,7 +7716,10 @@ const b = {
},
{
name: "foam", //8
description: "spray bubbly foam that <strong>sticks</strong> to mobs<br><strong class='color-s'>slows</strong> mobs and does <strong class='color-d'>damage</strong> over time",
// description: `spray bubbly foam that <strong>sticks</strong> to mobs<br><strong class='color-s'>slows</strong> mobs and does <strong class='color-d'>damage</strong> over time<br><strong>24</strong> bubbles per ${powerUps.orb.ammo()}`,
descriptionFunction() {
return `spray bubbly <strong>foam</strong> that <strong>sticks</strong> to mobs<br><strong class='color-s'>slows</strong> mobs and does <strong class='color-d'>damage</strong> over time<br><strong>${this.ammoPack.toFixed(0)}</strong> bubbles per ${powerUps.orb.ammo()}`
},
ammo: 0,
ammoPack: 24,
have: false,
@@ -7854,7 +7833,10 @@ const b = {
},
{
name: "harpoon", //9
description: "fire 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",
// 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() {
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()}`
},
ammo: 0,
ammoPack: 1.7, //update this in railgun tech
have: false,
@@ -8200,7 +8182,10 @@ const b = {
},
}, {
name: "mine", //10
description: "toss a <strong>proximity</strong> mine that <strong>sticks</strong> to walls<br>refund <strong>undetonated</strong> mines on <strong>exiting</strong> a level", //fires <strong>nails</strong> at mobs within range
// description: `toss a <strong>proximity</strong> mine that <strong>sticks</strong> to walls<br>refund <strong>undetonated</strong> mines on <strong>exiting</strong> a level<br><strong>1-2</strong> mines per ${powerUps.orb.ammo()}`,
descriptionFunction() {
return `toss a <strong>proximity</strong> mine that <strong>sticks</strong> to walls<br>refund <strong>undetonated</strong> mines on <strong>exiting</strong> a level<br><strong>${this.ammoPack.toFixed(1)}</strong> mines per ${powerUps.orb.ammo()}`
},
ammo: 0,
ammoPack: 1.7,
have: false,
@@ -8271,7 +8256,10 @@ const b = {
},
{
name: "laser", //11
description: "emit a <strong>beam</strong> of collimated coherent <strong class='color-laser'>light</strong><br>drains <strong class='color-f'>energy</strong> instead of ammunition",
// description: `emit a <strong>beam</strong> of collimated coherent <strong class='color-laser'>light</strong><br>drains <strong class='color-f'>energy</strong> instead of ammo<br>drains <strong>${(0.001 + tech.laserDrain) * 100}%</strong> <strong class='color-f'>energy</strong> per second`,
descriptionFunction() {
return `emit a <strong>beam</strong> of collimated coherent <strong class='color-laser'>light</strong><br>drains <strong>${((0.001 + tech.laserDrain) * 600).toFixed(2)}</strong> <strong class='color-f'>energy</strong> per second<br>doesn't use <strong>ammo</strong>`
},
ammo: 0,
ammoPack: Infinity,
have: false,

View File

@@ -394,7 +394,7 @@ const build = {
<br>
<br><strong class='color-d'>damage</strong>: ${((tech.damageFromTech())).toPrecision(4)} &nbsp; &nbsp; difficulty: ${((m.dmgScale)).toPrecision(4)}
<br><strong class='color-defense'>defense</strong>: ${tech.isEnergyHealth ? (1 - Math.pow(m.defense(), 0.13)).toPrecision(5) : (1 - m.defense()).toPrecision(5)} &nbsp; &nbsp; difficulty: ${(1 / simulation.dmgScale).toPrecision(4)}
<br><strong class='color-defense'>defense</strong>: ${(1 - m.defense()).toPrecision(5)} &nbsp; &nbsp; difficulty: ${(1 / simulation.dmgScale).toPrecision(4)}
<br><strong><em>fire rate</em></strong>: ${((1 - b.fireCDscale) * 100).toFixed(b.fireCDscale < 0.1 ? 2 : 0)}%
${tech.duplicationChance() ? `<br><strong class='color-dup'>duplication</strong>: ${(tech.duplicationChance() * 100).toFixed(0)}%` : ""}
${m.coupling ? `<br><span style = 'font-size:90%;'>` + m.couplingDescription(m.coupling) + `</span> from ${(m.coupling).toFixed(0)} ${powerUps.orb.coupling(1)}` : ""}
@@ -437,7 +437,7 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
text += `<div class="pause-grid-module card-background" ${style} >
<div class="card-text">
<div class="grid-title"><div class="circle-grid gun"></div> &nbsp; ${build.nameLink(b.guns[b.inventory[i]].name)} - <span style="font-size:100%;font-weight: 100;">${b.guns[b.inventory[i]].ammo}</span></div>
${b.guns[b.inventory[i]].description}</div> </div>`
${b.guns[b.inventory[i]].descriptionFunction()}</div> </div>`
}
if (!localSettings.isHideHUD) text += `<div class="pause-grid-module pause-console" style = "background-color: rgba(255,255,255,0.3);">${document.getElementById("text-log").innerHTML}</div>` //show last in game console message
let el = document.getElementById("pause-grid-left")
@@ -842,7 +842,7 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
text += `<div id="gun-${i}" class="experiment-grid-module card-background ${b.guns[i].have ? "build-gun-selected" : ""}" onclick="build.choosePowerUp(${i},'gun')" ${style} >
<div class="card-text">
<div class="grid-title"><div class="circle-grid gun"></div> &nbsp; ${build.nameLink(b.guns[i].name)}</div>
${b.guns[i].description}</div> </div>`
${b.guns[i].descriptionFunction()}</div> </div>`
}
for (let i = 0, len = tech.tech.length; i < len; i++) {
if ((!tech.tech[i].isJunk || localSettings.isJunkExperiment) && !tech.tech[i].isLore) {
@@ -1667,7 +1667,7 @@ if (localSettings.isAllowed && !localSettings.isEmpty) {
if (localSettings.isHideImages === undefined) localSettings.isHideImages = true //default to hide images
document.getElementById("hide-images").checked = localSettings.isHideImages
if (localSettings.isHideHUD === undefined) localSettings.isHideHUD = false
if (localSettings.isHideHUD === undefined) localSettings.isHideHUD = true
document.getElementById("hide-hud").checked = localSettings.isHideHUD
} else {

View File

@@ -8,7 +8,7 @@ const level = {
onLevel: -1,
levelsCleared: 0,
// playableLevels: ["pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion"],
//see level.populateLevels: (intro, ... , reservoir or factory, reactor, ... , gauntlet, final) added later
//see level.populateLevels: (intro, ... , reservoir or factory, reactor, ... , subway, final) added later
playableLevels: ["labs", "rooftops", "skyscrapers", "warehouse", "highrise", "office", "aerie", "satellite", "sewers", "testChamber", "pavilion", "lock"],
communityLevels: ["gauntlet", "stronghold", "basement", "crossfire", "vats", "run", "ngon", "house", "perplex", "coliseum", "tunnel", "islands", "temple", "dripp", "biohazard", "stereoMadness", "yingYang", "staircase", "fortress", "commandeer", "clock", "buttonbutton", "downpour", "superNgonBros", "underpass", "cantilever", "dojo", "tlinat", "ruins", "ace", "crimsonTowers"],
trainingLevels: ["walk", "crouch", "jump", "hold", "throw", "throwAt", "deflect", "heal", "fire", "nailGun", "shotGun", "superBall", "matterWave", "missile", "stack", "mine", "grenades", "harpoon", "diamagnetism"],
@@ -36,7 +36,7 @@ const level = {
// b.guns[3].ammo = 100000000
// requestAnimationFrame(() => { tech.giveTech("MACHO") });
// for (let i = 0; i < 1; ++i) tech.giveTech("additive manufacturing")
// for (let i = 0; i < 1; ++i) tech.giveTech("dark star")
// for (let i = 0; i < 1; ++i) tech.giveTech("flatland")
// for (let i = 0; i < 1; ++i) tech.giveTech("foam-bot")
// for (let i = 0; i < 1; ++i) tech.giveTech("nail-bot")
// for (let i = 0; i < 1; ++i) tech.giveTech("sound-bot upgrade")

View File

@@ -579,7 +579,7 @@ const m = {
if (tech.isTurret && m.crouch) dmg *= 0.34;
if (tech.isFirstDer && b.inventory[0] === b.activeGun) dmg *= 0.85 ** b.inventory.length
if (tech.isEnergyHealth) {
return Math.pow(dmg, 0.19) //defense has less effect
return Math.pow(dmg, 0.33) //defense has less effect
} else {
return dmg
}
@@ -729,7 +729,7 @@ const m = {
powerUps.research.changeRerolls(-1)
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span><span class='color-symbol'>--</span><br>${powerUps.research.count}`)
for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal", false);
m.energy = m.maxEnergy
m.energy = m.maxEnergy + 0.1
if (m.immuneCycle < m.cycle + 300) m.immuneCycle = m.cycle + 300 //disable this.immuneCycle bonus seconds
simulation.wipe = function () { //set wipe to have trails
ctx.fillStyle = "rgba(255,255,255,0.03)";
@@ -910,27 +910,27 @@ const m = {
ctx.lineTo(m.knee.x, m.knee.y);
ctx.lineTo(m.foot.x, m.foot.y);
ctx.strokeStyle = stroke;
ctx.lineWidth = 7;
ctx.lineWidth = 6;
ctx.stroke();
//toe lines
ctx.beginPath();
ctx.moveTo(m.foot.x, m.foot.y);
ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
ctx.lineTo(m.foot.x - 14, m.foot.y + 5);
ctx.moveTo(m.foot.x, m.foot.y);
ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
ctx.lineTo(m.foot.x + 14, m.foot.y + 5);
ctx.lineWidth = 4;
ctx.stroke();
//hip joint
ctx.beginPath();
ctx.arc(m.hip.x, m.hip.y, 11, 0, 2 * Math.PI);
ctx.arc(m.hip.x, m.hip.y, 10, 0, 2 * Math.PI);
//knee joint
ctx.moveTo(m.knee.x + 7, m.knee.y);
ctx.arc(m.knee.x, m.knee.y, 7, 0, 2 * Math.PI);
ctx.moveTo(m.knee.x + 6, m.knee.y);
ctx.arc(m.knee.x, m.knee.y, 6, 0, 2 * Math.PI);
//foot joint
ctx.moveTo(m.foot.x + 6, m.foot.y);
ctx.arc(m.foot.x, m.foot.y, 6, 0, 2 * Math.PI);
ctx.moveTo(m.foot.x + 5, m.foot.y + 1);
ctx.arc(m.foot.x, m.foot.y + 1, 5, 0, 2 * Math.PI);
ctx.fillStyle = m.fillColor;
ctx.fill();
ctx.lineWidth = 2;
@@ -938,6 +938,83 @@ const m = {
ctx.restore();
}
},
// resetSkin() {
// simulation.isAutoZoom = true;
// m.yOffWhen.jump = 70
// m.yOffWhen.stand = 49
// m.yOffWhen.crouch = 22
// m.isAltSkin = false
// m.color = {
// hue: 0,
// sat: 0,
// light: 100,
// }
// m.setFillColors();
// m.draw = function () {
// ctx.fillStyle = m.fillColor;
// m.walk_cycle += m.flipLegs * m.Vx;
// ctx.save();
// ctx.globalAlpha = (m.immuneCycle < m.cycle) ? 1 : 0.5 //|| (m.cycle % 40 > 20)
// ctx.translate(m.pos.x, m.pos.y);
// m.calcLeg(Math.PI, -3);
// m.drawLeg("#4a4a4a");
// m.calcLeg(0, 0);
// m.drawLeg("#333");
// ctx.rotate(m.angle);
// ctx.beginPath();
// ctx.arc(0, 0, 30, 0, 2 * Math.PI);
// ctx.fillStyle = m.bodyGradient
// ctx.fill();
// ctx.arc(15, 0, 4, 0, 2 * Math.PI);
// ctx.strokeStyle = "#333";
// ctx.lineWidth = 2;
// ctx.stroke();
// ctx.restore();
// m.yOff = m.yOff * 0.85 + m.yOffGoal * 0.15; //smoothly move leg height towards height goal
// powerUps.boost.draw()
// }
// m.drawLeg = function (stroke) {
// // if (simulation.mouseInGame.x > m.pos.x) {
// if (m.angle > -Math.PI / 2 && m.angle < Math.PI / 2) {
// m.flipLegs = 1;
// } else {
// m.flipLegs = -1;
// }
// ctx.save();
// ctx.scale(m.flipLegs, 1); //leg lines
// ctx.beginPath();
// ctx.moveTo(m.hip.x, m.hip.y);
// ctx.lineTo(m.knee.x, m.knee.y);
// ctx.lineTo(m.foot.x, m.foot.y);
// ctx.strokeStyle = stroke;
// ctx.lineWidth = 7;
// ctx.stroke();
// //toe lines
// ctx.beginPath();
// ctx.moveTo(m.foot.x, m.foot.y);
// ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
// ctx.moveTo(m.foot.x, m.foot.y);
// ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
// ctx.lineWidth = 4;
// ctx.stroke();
// //hip joint
// ctx.beginPath();
// ctx.arc(m.hip.x, m.hip.y, 11, 0, 2 * Math.PI);
// //knee joint
// ctx.moveTo(m.knee.x + 7, m.knee.y);
// ctx.arc(m.knee.x, m.knee.y, 7, 0, 2 * Math.PI);
// //foot joint
// ctx.moveTo(m.foot.x + 6, m.foot.y);
// ctx.arc(m.foot.x, m.foot.y, 6, 0, 2 * Math.PI);
// ctx.fillStyle = m.fillColor;
// ctx.fill();
// ctx.lineWidth = 2;
// ctx.stroke();
// ctx.restore();
// }
// },
skin: {
none() {
m.isAltSkin = true
@@ -1122,27 +1199,27 @@ const m = {
ctx.lineTo(m.knee.x, m.knee.y);
ctx.lineTo(m.foot.x, m.foot.y);
ctx.strokeStyle = stroke;
ctx.lineWidth = 7;
ctx.lineWidth = 6;
ctx.stroke();
//toe lines
ctx.beginPath();
ctx.moveTo(m.foot.x, m.foot.y);
ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
ctx.lineTo(m.foot.x - 14, m.foot.y + 5);
ctx.moveTo(m.foot.x, m.foot.y);
ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
ctx.lineTo(m.foot.x + 14, m.foot.y + 5);
ctx.lineWidth = 4;
ctx.stroke();
//hip joint
ctx.beginPath();
ctx.arc(m.hip.x, m.hip.y, 11, 0, 2 * Math.PI);
ctx.arc(m.hip.x, m.hip.y, 10, 0, 2 * Math.PI);
//knee joint
ctx.moveTo(m.knee.x + 7, m.knee.y);
ctx.arc(m.knee.x, m.knee.y, 7, 0, 2 * Math.PI);
ctx.moveTo(m.knee.x + 6, m.knee.y);
ctx.arc(m.knee.x, m.knee.y, 6, 0, 2 * Math.PI);
//foot joint
ctx.moveTo(m.foot.x + 6, m.foot.y);
ctx.arc(m.foot.x, m.foot.y, 6, 0, 2 * Math.PI);
ctx.moveTo(m.foot.x + 5, m.foot.y);
ctx.arc(m.foot.x, m.foot.y + 1, 5, 0, 2 * Math.PI);
ctx.strokeStyle = "rgba(0,255,255,0.25)";
ctx.lineWidth = 5;
ctx.stroke();

View File

@@ -326,7 +326,7 @@ const powerUps = {
return
}
if (tech.isCancelDuplication) {
tech.duplication += 0.041
tech.duplication += 0.043
tech.maxDuplicationEvent()
simulation.makeTextLog(`tech.duplicationChance() <span class='color-symbol'>+=</span> ${0.043}`)
simulation.circleFlare(0.043);
@@ -579,7 +579,7 @@ const powerUps = {
}
}
if (powerUps.healGiveMaxEnergy) {
tech.healMaxEnergyBonus += 0.08 * tech.largerHeals * (tech.isHalfHeals ? 0.5 : 1)
tech.healMaxEnergyBonus += 0.11 * tech.largerHeals * (tech.isHalfHeals ? 0.5 : 1)
m.setMaxEnergy();
}
},
@@ -667,7 +667,7 @@ const powerUps = {
text += `<div class='choose-grid-module entanglement flipX' onclick='powerUps.endDraft("${type}",true)'>entanglement</div>`
} else if (tech.isJunkResearch && powerUps.research.currentRerollCount < 3) {
text += `<div onclick="powerUps.research.use('${type}')" class='research-card'>` // style = "margin-left: 192px; margin-right: -192px;"
tech.junkResearchNumber = Math.ceil(4 * Math.random())
tech.junkResearchNumber = Math.ceil(3 * Math.random())
text += `<div><div> <span style="position:relative;">`
for (let i = 0; i < tech.junkResearchNumber; i++) {
text += `<div class="circle-grid junk" style="position:absolute; top:0; left:${15 * i}px ;opacity:0.8; border: 1px #fff solid;width: 1.15em;height: 1.15em;"></div>`
@@ -689,7 +689,7 @@ const powerUps = {
text += `<span class='research-card entanglement flipX' style="width: 275px;" onclick='powerUps.endDraft("${type}",true)'><span style="letter-spacing: 6px;">entanglement</span></span>` //&zwnj;
} else if (tech.isJunkResearch && powerUps.research.currentRerollCount < 3) {
text += `<span onclick="powerUps.research.use('${type}')" class='research-card' style="width: 275px;float: left;">` // style = "margin-left: 192px; margin-right: -192px;"
tech.junkResearchNumber = Math.ceil(4 * Math.random())
tech.junkResearchNumber = Math.ceil(3 * Math.random())
text += `<div><div><span style="position:relative;">`
for (let i = 0, len = tech.junkResearchNumber; i < len; i++) {
text += `<div class="circle-grid junk" style="position:absolute; top:0; left:${15 * i}px ;opacity:0.8; border: 1px #fff solid;width: 1.15em;height: 1.15em;"></div>`
@@ -775,7 +775,7 @@ const powerUps = {
return `<div class="choose-grid-module card-background" onclick="${click}" onauxclick="${click}" ${style}>
<div class="card-text">
<div class="grid-title"><div class="circle-grid gun"></div> &nbsp; ${b.guns[choose].name}</div>
${b.guns[choose].description}</div></div>`
${b.guns[choose].descriptionFunction()}</div></div>`
},
fieldText(choose, click) {
const style = localSettings.isHideImages ? powerUps.hideStyle : `style="background-image: url('img/field/${m.fieldUpgrades[choose].name}${choose === 0 ? Math.floor(Math.random() * 10) : ""}.webp');"`
@@ -1169,7 +1169,7 @@ const powerUps = {
document.body.style.cursor = "auto";
document.getElementById("choose-grid").style.transitionDuration = "0s";
}
if (count < 5 && simulation.isChoosing) {
if (count < 10 && simulation.isChoosing) {
requestAnimationFrame(cycle);
} else {
tech.isBrainstormActive = false

View File

@@ -83,6 +83,7 @@ const tech = {
// }
// },
addJunkTechToPool(percent) { //percent is number between 0-1
tech.junkPoolPercent += percent
//make an array for possible junk tech to add
let options = [];
for (let i = 0; i < tech.tech.length; i++) {
@@ -110,6 +111,7 @@ const tech = {
}
}
}
tech.junkPoolPercent = 0
},
giveRandomJUNK() {
const list = []
@@ -120,7 +122,6 @@ const tech = {
tech.giveTech(name)
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${name}</span>")<em>`);
},
giveTech(index = 'random') {
if (index === 'random') {
let options = [];
@@ -161,6 +162,7 @@ const tech = {
simulation.updateTechHUD();
}
},
junkPoolPercent: 0,
junkCount: 0,
countJunkTech() {
tech.junkCount = 0
@@ -257,6 +259,7 @@ const tech = {
if (tech.isHarmDamage && m.lastHarmCycle + 480 > m.cycle) dmg *= 3;
if (tech.lastHitDamage && m.lastHit) dmg *= 1 + tech.lastHitDamage * m.lastHit * (2 - m.defense()) // if (!simulation.paused) m.lastHit = 0
if (tech.isLowHealthDmg) dmg *= 1 + 0.7 * Math.max(0, 1 - (tech.isEnergyHealth ? m.energy : m.health))
if (tech.isJunkDNA) dmg *= 1 + tech.junkPoolPercent
return dmg
},
duplicationChance() {
@@ -408,7 +411,7 @@ const tech = {
{
name: "mass-energy equivalence",
// description: "<strong class='color-f'>energy</strong> protects you instead of <strong class='color-h'>health</strong><br>√ of <strong class='color-defense'>defense</strong> <strong>reduction</strong> reduces max <strong class='color-f'>energy</strong>",
description: "<strong class='color-f'>energy</strong> protects you instead of <strong class='color-h'>health</strong><br>exponentially <strong>reduced</strong> <strong class='color-defense'>defense</strong> <em>(~ x^0.19)</em>",
description: `<strong class='color-f'>energy</strong> protects you instead of <strong class='color-h'>health</strong><br><strong class='color-defense'>defensive</strong> upgrades <strong>reduced</strong> by <strong>~66%</strong>`,
maxCount: 1,
count: 0,
frequency: 1,
@@ -450,7 +453,7 @@ const tech = {
// description: `after you collect ${powerUps.orb.heal()}<br><strong>+${0.1 * tech.largerHeals}</strong> maximum <strong class='color-f'>energy</strong>`,
// descriptionFunction: `convert current and future ${powerUps.orb.heal()} into <div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div><br><div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div> give <strong>+${10 * tech.largerHeals}</strong> maximum <strong class='color-f'>energy</strong>`,
descriptionFunction() {
return `convert current and future <div class="heal-circle"></div> into <div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div><br><div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div> give <strong>+${8 * tech.largerHeals * (tech.isHalfHeals ? 0.5 : 1)}</strong> maximum <strong class='color-f'>energy</strong>`
return `convert current and future <div class="heal-circle"></div> into <div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div><br><div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div> give <strong>+${11 * tech.largerHeals * (tech.isHalfHeals ? 0.5 : 1)}</strong> maximum <strong class='color-f'>energy</strong>`
},
maxCount: 1,
count: 0,
@@ -854,7 +857,7 @@ const tech = {
},
{
name: "non-renewables",
description: `<strong>+78%</strong> <strong class='color-d'>damage</strong><br>${powerUps.orb.ammo()} can't <strong>spawn</strong>`,
description: `<strong>+88%</strong> <strong class='color-d'>damage</strong><br>${powerUps.orb.ammo()} can't <strong>spawn</strong>`,
maxCount: 1,
count: 0,
frequency: 1,
@@ -863,7 +866,7 @@ const tech = {
return !tech.isAmmoFromHealth && !tech.isBoostReplaceAmmo
},
requires: "not catabolism, quasiparticles",
damage: 1.78,
damage: 1.88,
effect() {
tech.damage *= this.damage
tech.isEnergyNoAmmo = true;
@@ -875,7 +878,6 @@ const tech = {
},
{
name: "desublimated ammunition",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Deposition_(phase_transition)' class="link">desublimated ammunition</a>`,
description: `if <strong>crouching</strong><br>alternating shots use no <strong class='color-ammo'>ammo</strong>`,
maxCount: 1,
count: 0,
@@ -1406,7 +1408,7 @@ const tech = {
{
name: "nail-bot upgrade",
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>+500%</strong> <strong>fire rate</strong> and <strong>+40%</strong> nail <strong>velocity</strong>",
description: "<strong>convert</strong> your bots to <strong>nail-bots</strong><br><strong>+500%</strong> <em>fire rate</em> and <strong>+40%</strong> nail <strong>velocity</strong>",
maxCount: 1,
count: 0,
frequency: 3,
@@ -1438,7 +1440,7 @@ const tech = {
{
name: "foam-bot",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">foam-bot</a>`,
description: "a <strong class='color-bot'>bot</strong> fires <strong>foam</strong> at nearby mobs",
description: "a <strong class='color-bot'>bot</strong> sprays sticky <strong>foam</strong> at nearby mobs",
maxCount: 9,
count: 0,
frequency: 1,
@@ -3547,7 +3549,7 @@ const tech = {
},
{
name: "pseudoscience",
description: "<span style = 'font-size:94%;'>when <strong>selecting</strong> a power up, <strong class='color-r'>research</strong> <strong>3</strong> times</span><br>for <strong>free</strong>, but add <strong>1-4%</strong> <strong class='color-junk'>JUNK</strong> to the <strong class='color-m'>tech</strong> pool",
description: "<span style = 'font-size:94%;'>when <strong>selecting</strong> a power up, <strong class='color-r'>research</strong> <strong>3</strong> times</span><br>for <strong>free</strong>, but add <strong>1-3%</strong> <strong class='color-junk'>JUNK</strong> to the <strong class='color-m'>tech</strong> pool",
maxCount: 1,
count: 0,
frequency: 1,
@@ -3783,6 +3785,34 @@ const tech = {
}
}
},
{
name: "junk DNA",
descriptionFunction() {
// return ` <strong>+100%</strong> ${b.guns[6].nameString()} <strong class='color-d'>damage</strong> per <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> <em>(${(100 * tech.junkCount).toFixed(0)}%)</em><br><strong>+33%</strong> <strong class='color-junk'>JUNK</strong> to <strong class='color-m'>tech</strong> pool`
return `<strong class='color-d'>damage</strong> scales with <strong class='color-junk'>JUNK</strong> <strong class='color-m'>tech</strong> pool percent`
},
// isGunTech: true,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return tech.junkPoolPercent > 0
},
requires: "JUNK in tech pool",
effect() {
tech.isJunkDNA = true
// this.refundAmount += tech.addJunkTechToPool(0.20)
},
// refundAmount: 0,
remove() {
tech.isJunkDNA = false
// if (this.count > 0 && this.refundAmount > 0) {
// tech.removeJunkTechFromPool(this.refundAmount)
// this.refundAmount = 0
// }
}
},
{
name: "exciton",
descriptionFunction() {
@@ -4079,7 +4109,7 @@ const tech = {
},
{
name: "futures exchange",
description: "clicking <strong class='color-cancel'>cancel</strong> for a <strong class='color-f'>field</strong>, <strong class='color-m'>tech</strong>, or <strong class='color-g'>gun</strong><br>gives <strong>+4.1%</strong> power up <strong class='color-dup'>duplication</strong> chance",
description: "clicking <strong class='color-cancel'>cancel</strong> for a <strong class='color-f'>field</strong>, <strong class='color-m'>tech</strong>, or <strong class='color-g'>gun</strong><br>gives <strong>+4.3%</strong> power up <strong class='color-dup'>duplication</strong> chance",
// descriptionFunction() {
// return `clicking <strong style = 'font-size:150%;'>×</strong> to <strong>cancel</strong> a <strong class='color-f'>field</strong>, <strong class='color-m'>tech</strong>, or <strong class='color-g'>gun</strong><br>gives <strong>+${4.9 - 0.15*simulation.difficultyMode}%</strong> power up <strong class='color-dup'>duplication</strong> chance`
// },
@@ -4229,7 +4259,7 @@ const tech = {
{
name: "strange attractor",
descriptionFunction() {
return `<strong>+7%</strong> <strong class='color-d'>damage</strong><br><strong>removing</strong> this increases <strong class='color-dup'>duplication</strong> by <strong>+10%</strong>`
return `<strong>+7%</strong> <strong class='color-d'>damage</strong><br><strong>removing</strong> this increases <strong class='color-dup'>duplication</strong> by <strong>+11%</strong>`
},
maxCount: 1,
count: 0,
@@ -4246,7 +4276,7 @@ const tech = {
},
remove() {
if (this.count > 0 && m.alive) {
tech.duplication += 0.1
tech.duplication += 0.11
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
tech.damage /= this.damage
this.frequency = 0
@@ -6168,33 +6198,6 @@ const tech = {
tech.isSporeFollow = false
}
},
{
name: "junk DNA",
descriptionFunction() {
return `<strong>+53%</strong> ${b.guns[6].nameString()} <strong class='color-d'>damage</strong> per <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> <em>(${(53 * tech.junkCount).toFixed(0)}%)</em><br><strong>+50%</strong> <strong class='color-junk'>JUNK</strong> to <strong class='color-m'>tech</strong> pool`
},
isGunTech: true,
maxCount: 1,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return tech.haveGunCheck("spores") || tech.sporesOnDeath > 0 || (m.fieldMode === 4 && simulation.molecularMode === 0) || tech.isSporeWorm || tech.isSporeFlea
},
requires: "spores",
effect() {
tech.isJunkDNA = true
this.refundAmount += tech.addJunkTechToPool(0.5)
},
refundAmount: 0,
remove() {
tech.isJunkDNA = false
if (this.count > 0 && this.refundAmount > 0) {
tech.removeJunkTechFromPool(this.refundAmount)
this.refundAmount = 0
}
}
},
// {
// name: "junk DNA",
// //increase damage by 10% for each JUNK tech percent in the tech pool, remove all JUNK tech,
@@ -6264,7 +6267,7 @@ const tech = {
},
{
name: "siphonaptera",
description: "<strong class='color-p' style='letter-spacing: 2px;'>spores</strong> metamorphose into <strong class='color-p' style='letter-spacing: -0.8px;'>fleas</strong>",
description: "<strong class='color-p' style='letter-spacing: 2px;'>spores</strong> metamorphose into <strong class='color-p' style='letter-spacing: -0.8px;'>fleas</strong><br><strong>shotgun</strong> fires <strong class='color-p' style='letter-spacing: -0.8px;'>fleas</strong>",
isGunTech: true,
maxCount: 1,
count: 0,
@@ -6284,7 +6287,7 @@ const tech = {
},
{
name: "nematodes",
description: "<strong class='color-p' style='letter-spacing: 2px;'>spores</strong> metamorphose into <strong class='color-p' style='letter-spacing: -0.8px;'>worms</strong>",
description: "<strong class='color-p' style='letter-spacing: 2px;'>spores</strong> metamorphose into <strong class='color-p' style='letter-spacing: -0.8px;'>worms</strong><br><strong>shotgun</strong> fires <strong class='color-p' style='letter-spacing: -0.8px;'>worms</strong>",
isGunTech: true,
maxCount: 1,
count: 0,
@@ -7669,7 +7672,10 @@ const tech = {
},
{
name: "radiative equilibrium",
description: "after losing <strong class='color-h'>health</strong><br><strong>+200%</strong> <strong class='color-d'>damage</strong> for <strong>8</strong> seconds",
descriptionFunction() {
return `after losing ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"}<br><strong>+200%</strong> <strong class='color-d'>damage</strong> for <strong>8</strong> seconds`
},
// description: `after losing ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"}<br><strong>+200%</strong> <strong class='color-d'>damage</strong> for <strong>8</strong> seconds`,
isFieldTech: true,
maxCount: 1,
count: 0,
@@ -9377,7 +9383,7 @@ const tech = {
effect() {
tech.isBrainstorm = true
tech.isBrainstormActive = false
tech.brainStormDelay = 500
tech.brainStormDelay = 500 //show each option for 0.5 seconds
},
remove() {
tech.isBrainstorm = false
@@ -10261,67 +10267,70 @@ const tech = {
},
remove() { }
},
{
name: "flatland",
description: "map blocks line of sight",
maxCount: 1,
count: 0,
frequency: 0,
isNonRefundable: true,
isJunk: true,
allowed() { return true },
requires: "",
effect() {
simulation.ephemera.push({
name: "LoS", count: 0, do() {
const pos = m.pos
const radius = 3000
if (!simulation.isTimeSkipping) {
const vertices = simulation.sight.circleLoS(pos, radius);
if (vertices.length) {
ctx.beginPath();
ctx.moveTo(vertices[0].x, vertices[0].y);
for (var i = 1; i < vertices.length; i++) {
var currentDistance = Math.sqrt((vertices[i - 1].x - pos.x) ** 2 + (vertices[i - 1].y - pos.y) ** 2);
var newDistance = Math.sqrt((vertices[i].x - pos.x) ** 2 + (vertices[i].y - pos.y) ** 2);
if (Math.abs(currentDistance - radius) < 1 && Math.abs(newDistance - radius) < 1) {
const currentAngle = Math.atan2(vertices[i - 1].y - pos.y, vertices[i - 1].x - pos.x);
const newAngle = Math.atan2(vertices[i].y - pos.y, vertices[i].x - pos.x);
ctx.arc(pos.x, pos.y, radius, currentAngle, newAngle);
} else {
ctx.lineTo(vertices[i].x, vertices[i].y)
}
}
newDistance = Math.sqrt((vertices[0].x - pos.x) ** 2 + (vertices[0].y - pos.y) ** 2);
currentDistance = Math.sqrt((vertices[vertices.length - 1].x - pos.x) ** 2 + (vertices[vertices.length - 1].y - pos.y) ** 2);
if (Math.abs(currentDistance - radius) < 1 && Math.abs(newDistance - radius) < 1) {
const currentAngle = Math.atan2(vertices[vertices.length - 1].y - pos.y, vertices[vertices.length - 1].x - pos.x);
const newAngle = Math.atan2(vertices[0].y - pos.y, vertices[0].x - pos.x);
ctx.arc(pos.x, pos.y, radius, currentAngle, newAngle);
} else {
ctx.lineTo(vertices[0].x, vertices[0].y)
}
// {
// name: "flatland",
// description: "map blocks line of sight",
// maxCount: 1,
// count: 0,
// frequency: 0,
// isNonRefundable: true,
// isJunk: true,
// allowed() { return true },
// requires: "",
// effect() {
// simulation.draw.lineOfSightPrecalculation() //required precalculation for line of sight
// simulation.draw.drawMapPath = simulation.draw.drawMapSight
//stroke the map, so it looks different form the line of sight
ctx.strokeStyle = "#234";
ctx.lineWidth = 9;
ctx.stroke(simulation.draw.mapPath); //this has a pretty large impact on performance, maybe 5% worse performance
// simulation.ephemera.push({
// name: "LoS", count: 0, do() {
// const pos = m.pos
// const radius = 3000
// if (!simulation.isTimeSkipping) {
// const vertices = simulation.sight.circleLoS(pos, radius);
// if (vertices.length) {
// ctx.beginPath();
// ctx.moveTo(vertices[0].x, vertices[0].y);
// for (var i = 1; i < vertices.length; i++) {
// var currentDistance = Math.sqrt((vertices[i - 1].x - pos.x) ** 2 + (vertices[i - 1].y - pos.y) ** 2);
// var newDistance = Math.sqrt((vertices[i].x - pos.x) ** 2 + (vertices[i].y - pos.y) ** 2);
// if (Math.abs(currentDistance - radius) < 1 && Math.abs(newDistance - radius) < 1) {
// const currentAngle = Math.atan2(vertices[i - 1].y - pos.y, vertices[i - 1].x - pos.x);
// const newAngle = Math.atan2(vertices[i].y - pos.y, vertices[i].x - pos.x);
// ctx.arc(pos.x, pos.y, radius, currentAngle, newAngle);
// } else {
// ctx.lineTo(vertices[i].x, vertices[i].y)
// }
// }
// newDistance = Math.sqrt((vertices[0].x - pos.x) ** 2 + (vertices[0].y - pos.y) ** 2);
// currentDistance = Math.sqrt((vertices[vertices.length - 1].x - pos.x) ** 2 + (vertices[vertices.length - 1].y - pos.y) ** 2);
// if (Math.abs(currentDistance - radius) < 1 && Math.abs(newDistance - radius) < 1) {
// const currentAngle = Math.atan2(vertices[vertices.length - 1].y - pos.y, vertices[vertices.length - 1].x - pos.x);
// const newAngle = Math.atan2(vertices[0].y - pos.y, vertices[0].x - pos.x);
// ctx.arc(pos.x, pos.y, radius, currentAngle, newAngle);
// } else {
// ctx.lineTo(vertices[0].x, vertices[0].y)
// }
ctx.globalCompositeOperation = "destination-in";
ctx.fillStyle = "#000";
ctx.fill();
ctx.globalCompositeOperation = "source-over";
// also see the map
// ctx.fill(simulation.draw.mapPath);
// //stroke the map, so it looks different form the line of sight
// ctx.strokeStyle = "#234";
// ctx.lineWidth = 9;
// ctx.stroke(simulation.draw.mapPath); //this has a pretty large impact on performance, maybe 5% worse performance
// ctx.globalCompositeOperation = "destination-in";
// ctx.fillStyle = "#000";
ctx.clip();
}
}
},
})
},
remove() { }
},
// ctx.fill();
// ctx.globalCompositeOperation = "source-over";
// // also see the map
// // ctx.fill(simulation.draw.mapPath);
// // ctx.fillStyle = "#000";
// ctx.clip();
// }
// }
// },
// })
// },
// remove() { }
// },
{
name: "umbra",
description: "produce a blue glow around everything<br>and probably some simulation lag",

View File

@@ -1,12 +1,20 @@
******************************************************** NEXT PATCH **************************************************
on later levels spawn 2 bosses, but 1 power up each
starts at simulation.difficulty > 23 //on hard mode level 6, level 12 on easy, level 4 on why?
makes combat harder, but also means that you will always get at least 2 drops per level
you used to have a chance to only get 1 near the end of the game
I'm guessing this will lead to about 3 more total tech by the final boss
abiogenesis - removed
parthenogenesis - doesn't duplicate bosses anymore, +8% duplication
missile Bot: +10% bigger explosions, +10% damage, +7% fire rate
plasma Bot: +40% damage, and drains 2% less energy
1st ionization energy: 8->11 energy per heal
mass-energy: defense reduction factor 0.13->0.33
neutron bomb: +25% damage
non-renewables: 78->88% damage
junk DNA: applies to all damage, not just spores
pseudoscience: adds (1-4)->(1-3) JUNK to tech pool per free research
futures exchange: 4.1->4.3 duplication per cancel
default skin has slightly more narrow legs
added ammo to gun descriptions
calculate the ammo drop rate for each gun live based on ammo tech?
need to make a generic function
*********************************************************** TODO *****************************************************