plasma extruder
  extruder lag issues should be fixed!
  extruder graphics have a cool glow
  45% more damage
  20% more energy drain
  slows mobs a bit more
  extends faster
  it can hit mobs that get near it now instead of just inside it
  plasma jet now works with extruder
This commit is contained in:
landgreen
2021-10-07 05:49:49 -07:00
parent 8d1222301d
commit f135046e0b
7 changed files with 84 additions and 57 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@@ -1518,7 +1518,7 @@ const b = {
didExtruderDrain: false,
canExtruderFire: true,
extruder() {
const DRAIN = 0.0008 + m.fieldRegen
const DRAIN = 0.0011 + m.fieldRegen
if (m.energy > DRAIN && b.canExtruderFire) {
m.energy -= DRAIN
if (m.energy < 0) {
@@ -1526,18 +1526,18 @@ const b = {
m.energy = 0;
}
b.isExtruderOn = true
const SPEED = 14
const SPEED = 10 + 10 * tech.isPlasmaRange
const me = bullet.length;
const where = Vector.add(m.pos, player.velocity)
bullet[me] = Bodies.polygon(where.x + 20 * Math.cos(m.angle), where.y + 20 * Math.sin(m.angle), 4, 0.01, {
cycle: -0.5,
isWave: true,
endCycle: simulation.cycle + 53, // + 30 * tech.isPlasmaRange,
endCycle: simulation.cycle + 33, // + 30 * tech.isPlasmaRange,
inertia: Infinity,
frictionAir: 0,
isInHole: true, //this keeps the bullet from entering wormholes
minDmgSpeed: 0,
dmg: b.dmgScale * 1.8, //damage also changes when you divide by mob.mass on in .do()
dmg: b.dmgScale * 2.5, //damage also changes when you divide by mob.mass on in .do()
classType: "bullet",
isBranch: false,
restitution: 0,
@@ -1555,25 +1555,31 @@ const b = {
if (Matter.Query.point(map, this.position).length) { //check if inside map
this.isBranch = true;
} else { //check if inside a body
const q = Matter.Query.point(mob, this.position)
for (let i = 0; i < q.length; i++) {
Matter.Body.setVelocity(q[i], {
x: q[i].velocity.x * 0.2,
y: q[i].velocity.y * 0.2
});
Matter.Body.setPosition(this, Vector.add(this.position, q[i].velocity)) //move with the medium
let dmg = this.dmg / Math.min(10, q[i].mass)
q[i].damage(dmg);
if (q[i].alive) q[i].foundPlayer();
//removed to improve performance
// simulation.drawList.push({ //add dmg to draw queue
// x: this.position.x,
// y: this.position.y,
// radius: Math.log(2 * dmg + 1.1) * 40,
// color: "rgba(255, 0, 119, 0.5)",
// time: simulation.drawTime
// });
for (let i = 0, len = mob.length; i < len; i++) {
const dist = Vector.magnitudeSquared(Vector.sub(this.position, mob[i].position))
const radius = mob[i].radius + 20
if (dist < radius * radius) {
Matter.Body.setVelocity(mob[i], {
x: mob[i].velocity.x * 0.15,
y: mob[i].velocity.y * 0.15
});
Matter.Body.setPosition(this, Vector.add(this.position, mob[i].velocity)) //move with the medium
let dmg = this.dmg / Math.min(10, mob[i].mass)
mob[i].damage(dmg);
if (mob[i].alive) mob[i].foundPlayer();
}
}
// const q = Matter.Query.point(mob, this.position)
// for (let i = 0; i < q.length; i++) {
// Matter.Body.setVelocity(q[i], {
// x: q[i].velocity.x * 0.15,
// y: q[i].velocity.y * 0.15
// });
// Matter.Body.setPosition(this, Vector.add(this.position, q[i].velocity)) //move with the medium
// let dmg = this.dmg / Math.min(10, q[i].mass)
// q[i].damage(dmg);
// if (q[i].alive) q[i].foundPlayer();
// }
}
this.cycle++
const wiggleMag = (input.down ? 6 : 12) * Math.cos(simulation.cycle * 0.09)
@@ -4348,10 +4354,11 @@ const b = {
m.fireCDcycle = m.cycle + Math.floor((input.down ? 23 : 15) * b.fireCDscale); // cool down
const SPREAD = input.down ? 0.08 : 0.13
const num = tech.missileCount + 2
const radius = 11 * tech.bulletSize
let dir = m.angle - SPREAD * (num - 1) / 2;
for (let i = 0; i < num; i++) {
const me = bullet.length;
bullet[me] = Bodies.polygon(m.pos.x + 30 * Math.cos(m.angle), m.pos.y + 30 * Math.sin(m.angle), 12, 11 * tech.bulletSize, b.fireAttributes(dir, false));
bullet[me] = Bodies.polygon(m.pos.x + 30 * Math.cos(m.angle), m.pos.y + 30 * Math.sin(m.angle), 12, radius, b.fireAttributes(dir, false));
Composite.add(engine.world, bullet[me]); //add bullet to world
Matter.Body.setVelocity(bullet[me], {
x: SPEED * Math.cos(dir),

View File

@@ -174,9 +174,7 @@ window.onresize = () => {
//**********************************************************************
//set wikipedia link
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (!tech.tech[i].link) {
tech.tech[i].link = `<a target="_blank" href='https://en.wikipedia.org/w/index.php?search=${encodeURIComponent(tech.tech[i].name).replace(/'/g, '%27')}&title=Special:Search' style="color: #000;">${tech.tech[i].name}</a>`
}
if (!tech.tech[i].link) tech.tech[i].link = `<a target="_blank" href='https://en.wikipedia.org/w/index.php?search=${encodeURIComponent(tech.tech[i].name).replace(/'/g, '%27')}&title=Special:Search' style="color: #000;">${tech.tech[i].name}</a>`
}
const build = {

View File

@@ -15,9 +15,9 @@ const level = {
// localSettings.levelsClearedLastGame = 10
// level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why
// simulation.isHorizontalFlipped = true
// m.setField("pilot wave")
// m.setField("plasma torch")
// b.giveGuns("harpoon")
// tech.giveTech("toggling harpoon")
// tech.giveTech("extruder")
// tech.giveTech("filament")
// tech.giveTech("mouth")
// tech.giveTech("all-stars")
@@ -128,18 +128,19 @@ const level = {
for (let i = 0; i < num; i++) {
simulation.difficulty++
b.dmgScale *= 0.914; //damage done by player decreases each level
if (simulation.accelScale < 5) simulation.accelScale *= 1.02 //mob acceleration increases each level
if (simulation.CDScale > 0.2) simulation.CDScale *= 0.97 //mob CD time decreases each level
if (simulation.accelScale < 6) simulation.accelScale *= 1.025 //mob acceleration increases each level
if (simulation.CDScale > 0.15) simulation.CDScale *= 0.965 //mob CD time decreases each level
}
simulation.dmgScale = 0.41 * simulation.difficulty //damage done by mobs increases each level
simulation.healScale = 1 / (1 + simulation.difficulty * 0.055) //a higher denominator makes for lower heals // m.health += heal * simulation.healScale;
// console.log(`CD = ${simulation.CDScale}`)
},
difficultyDecrease(num = 1) { //used in easy mode for simulation.reset()
for (let i = 0; i < num; i++) {
simulation.difficulty--
b.dmgScale /= 0.914; //damage done by player decreases each level
if (simulation.accelScale > 0.2) simulation.accelScale /= 1.02 //mob acceleration increases each level
if (simulation.CDScale < 5) simulation.CDScale /= 0.97 //mob CD time decreases each level
if (simulation.accelScale > 1) simulation.accelScale /= 1.025 //mob acceleration increases each level
if (simulation.CDScale < 1) simulation.CDScale /= 0.965 //mob CD time decreases each level
}
if (simulation.difficulty < 1) simulation.difficulty = 0;
simulation.dmgScale = 0.41 * simulation.difficulty //damage done by mobs increases each level
@@ -2300,8 +2301,8 @@ const level = {
// spawn.laserBombingBoss(1900, -500)
// for (let i = 0; i < 5; i++) spawn.focuser(1900, -500)
spawn.slashBoss(1900, -500)
// spawn.ghoster(1900, -500, 200)
// spawn.slashBoss(1900, -500)
spawn.shooter(1900, -500)
// spawn.shield(mob[mob.length - 1], 1900, -500, 1);
// mob[mob.length - 1].isShielded = true
// spawn.growBossCulture(1200, -500)

View File

@@ -2006,20 +2006,30 @@ const m = {
b.wasExtruderOn = false
b.canExtruderFire = true
}
ctx.lineWidth = 5;
ctx.strokeStyle = "#f07"
ctx.beginPath(); //draw all the wave bullets
for (let i = 0, len = bullet.length; i < len; i++) {
if (bullet[i].isWave) {
if (bullet[i].isBranch) {
ctx.stroke();
ctx.beginPath(); //draw all the wave bullets
ctx.moveTo(bullet[i].position.x, bullet[i].position.y)
// ctx.lineWidth = 5;
// ctx.strokeStyle = "#f07"
// ctx.stroke();
// ctx.lineWidth = 30;
// ctx.strokeStyle = "rgba(255,0,110,0.05)"
// ctx.stroke();
// ctx.beginPath(); //draw all the wave bullets
} else {
ctx.lineTo(bullet[i].position.x, bullet[i].position.y)
}
}
}
if (b.wasExtruderOn && b.isExtruderOn) ctx.lineTo(m.pos.x + 15 * Math.cos(m.angle), m.pos.y + 15 * Math.sin(m.angle))
ctx.lineWidth = 5;
ctx.strokeStyle = "#f07"
ctx.stroke();
ctx.lineWidth = 35;
ctx.strokeStyle = "rgba(255,0,110,0.05)"
ctx.stroke();
}
}

View File

@@ -2832,6 +2832,7 @@
},
{
name: "non-unitary operator",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Unitary_operator' style="color: #000;">non-unitary operator</a>`,
description: "reduce combat <strong>difficulty</strong> by <strong>2 levels</strong>, but<br>after a <strong>collision</strong> enter an <strong class='alt'>alternate reality</strong>",
maxCount: 1,
count: 0,
@@ -2873,6 +2874,7 @@
},
{
name: "Ψ(t) collapse",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Wave_function_collapse' style="color: #000;">Ψ(t) collapse</a>`,
description: `enter an <strong class='alt'>alternate reality</strong> after you <strong class='color-r'>research</strong><br>spawn ${powerUps.orb.research(16)}`,
maxCount: 1,
count: 0,
@@ -3616,7 +3618,7 @@
allowed() {
return (b.totalBots() > 3 || m.fieldUpgrades[m.fieldMode].name === "molecular assembler" || m.fieldUpgrades[m.fieldMode].name === "plasma torch" || m.fieldUpgrades[m.fieldMode].name === "pilot wave") && !tech.isEnergyHealth && !tech.isRewindAvoidDeath //build.isExperimentSelection ||
},
requires: "bots > 3, plasma torch, nano-scale, pilot wave, not mass-energy equivalence, CPT",
requires: "bots > 3, plasma torch, assembler, pilot wave, not mass-energy equivalence, CPT",
effect() {
tech.isRewindGun = true
b.guns.push(b.gunRewind)
@@ -4197,7 +4199,7 @@
},
requires: "super balls",
effect() {
tech.bulletSize += 0.15
tech.bulletSize += 0.14
},
remove() {
tech.bulletSize = 1;
@@ -5800,7 +5802,7 @@
}
simulation.makeTextLog(`tech.isOrbitalBotUpgrade = true`)
})
for (let i = 0; i < 2; i++) { //double chance for dynamo-bot, since it's very good for nano-scale
for (let i = 0; i < 2; i++) { //double chance for dynamo-bot, since it's very good for assembler
notUpgradedBots.push(() => {
tech.giveTech("dynamo-bot upgrade")
for (let i = 0; i < num; i++) {
@@ -5817,8 +5819,8 @@
{
name: "mycelium manufacturing",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Mycelium' style="color: #000;">mycelium manufacturing</a>`,
description: `use ${powerUps.orb.research(3)}to repurpose <strong>nano-scale</strong> field<br>excess <strong class='color-f'>energy</strong> used to grow <strong class='color-p' style='letter-spacing: 2px;'>spores</strong>`,
// description: "use <strong>3</strong> <strong class='color-r'>research</strong> to repurpose <strong>nano-scale</strong><br>excess <strong class='color-f'>energy</strong> used to grow <strong class='color-p' style='letter-spacing: 2px;'>spores</strong>",
description: `use ${powerUps.orb.research(3)}to repurpose <strong>molecular assembler</strong><br>excess <strong class='color-f'>energy</strong> used to grow <strong class='color-p' style='letter-spacing: 2px;'>spores</strong>`,
// description: "use <strong>3</strong> <strong class='color-r'>research</strong> to repurpose <strong>assembler</strong><br>excess <strong class='color-f'>energy</strong> used to grow <strong class='color-p' style='letter-spacing: 2px;'>spores</strong>",
isFieldTech: true,
maxCount: 1,
count: 0,
@@ -5844,8 +5846,8 @@
{
name: "missile manufacturing",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Missile' style="color: #000;">missile manufacturing</a>`,
description: `use ${powerUps.orb.research(3)}to repurpose <strong>nano-scale</strong> field<br>excess <strong class='color-f'>energy</strong> used to construct <strong>missiles</strong>`,
// description: "use <strong>3</strong> <strong class='color-r'>research</strong> to repurpose <strong>nano-scale</strong><br>excess <strong class='color-f'>energy</strong> used to construct <strong>missiles</strong>",
description: `use ${powerUps.orb.research(3)}to repurpose <strong>molecular assembler</strong><br>excess <strong class='color-f'>energy</strong> used to construct <strong>missiles</strong>`,
// description: "use <strong>3</strong> <strong class='color-r'>research</strong> to repurpose <strong>assembler</strong><br>excess <strong class='color-f'>energy</strong> used to construct <strong>missiles</strong>",
isFieldTech: true,
maxCount: 1,
count: 0,
@@ -5871,8 +5873,8 @@
{
name: "ice IX manufacturing",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Ice-nine_(disambiguation)' style="color: #000;">ice IX manufacturing</a>`,
description: `use ${powerUps.orb.research(3)}to repurpose <strong>nano-scale</strong> field<br>excess <strong class='color-f'>energy</strong> used to condense <strong class='color-s'>ice IX</strong>`,
// description: "use <strong>3</strong> <strong class='color-r'>research</strong> to repurpose <strong>nano-scale</strong><br>excess <strong class='color-f'>energy</strong> used to condense <strong class='color-s'>ice IX</strong>",
description: `use ${powerUps.orb.research(3)}to repurpose <strong>molecular assembler</strong><br>excess <strong class='color-f'>energy</strong> used to condense <strong class='color-s'>ice IX</strong>`,
// description: "use <strong>3</strong> <strong class='color-r'>research</strong> to repurpose <strong>assembler</strong><br>excess <strong class='color-f'>energy</strong> used to condense <strong class='color-s'>ice IX</strong>",
isFieldTech: true,
maxCount: 1,
count: 0,
@@ -5966,7 +5968,7 @@
allowed() {
return !tech.isExtruder && m.fieldUpgrades[m.fieldMode].name === "plasma torch" && (build.isExperimentSelection || powerUps.research.count > 0)
},
requires: "plasma torch, not micro-extruder",
requires: "plasma torch, not extruder",
effect() {
tech.plasmaBotCount++;
b.plasmaBot();
@@ -6002,9 +6004,9 @@
frequency: 2,
frequencyDefault: 2,
allowed() {
return (tech.plasmaBotCount || (m.fieldUpgrades[m.fieldMode].name === "plasma torch" && !tech.isExtruder)) && (build.isExperimentSelection || powerUps.research.count > 0)
return (tech.plasmaBotCount || m.fieldUpgrades[m.fieldMode].name === "plasma torch") && (build.isExperimentSelection || powerUps.research.count > 0)
},
requires: "plasma torch, not micro-extruder",
requires: "plasma torch",
effect() {
tech.isPlasmaRange += 0.5;
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
@@ -6023,9 +6025,9 @@
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldUpgrades[m.fieldMode].name === "plasma torch" && tech.isPlasmaRange === 1 && tech.plasmaBotCount === 0
return m.fieldUpgrades[m.fieldMode].name === "plasma torch" && tech.plasmaBotCount === 0
},
requires: "plasma torch, not plasma jet, plasma-bot",
requires: "plasma torch, not plasma-bot",
effect() {
tech.isExtruder = true;
},
@@ -6042,7 +6044,7 @@
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldUpgrades[m.fieldMode].name === "time dilation"
return m.fieldUpgrades[m.fieldMode].name === "time dilation" && !m.isShipMode
},
requires: "time dilation",
effect() {

View File

@@ -1,12 +1,20 @@
******************************************************** NEXT PATCH **************************************************
tech, field, and gun names are now clickable wikipedia searches
works in pause and experiment modes
several names have also been adjusted
plasma extruder
extruder lag issues should be fixed!
extruder graphics have a cool glow
45% more damage
20% more energy drain
slows mobs a bit more
extends faster
it can hit mobs that get near it now instead of just inside it
plasma jet now works with extruder
******************************************************** TODO ********************************************************
bad links:
toggle harpoon is weak and should be more obvious
Tech: "Growth": Increase damage by 3% for every mob currently alive.
add link URL to all tech guns and field on page load
but only if URL is undefined so hard to search names can be added in by hand
@@ -475,6 +483,7 @@ possible names for tech
gnarl
SQUID (for superconducting quantum interference device) is a very sensitive magnetometer used to measure extremely subtle magnetic fields, based on superconducting loops containing Josephson junctions.
nuclear pasta - hard matter in neutron star
nonlocal
a tutorial / lore intro
needs to be optional so it doesn't slow experienced players