WIMPs for wormhole

tech: WIMPs now requires wormhole
  gives 3-9 research now (was 2-3)

tech: eddy current brake - is 15% larger and caps mob speeds at 20% slower

bug fixes
This commit is contained in:
landgreen
2021-06-13 18:45:53 -07:00
parent 36d44c2569
commit a285375e2b
7 changed files with 78 additions and 99 deletions

View File

@@ -3308,7 +3308,7 @@ const b = {
if (tech.isNailRadiation) {
mobs.statusDoT(who, tech.isFastRadiation ? 12 : 3, tech.isSlowRadiation ? 240 : (tech.isFastRadiation ? 30 : 120)) // one tick every 30 cycles
} else {
let dmg = b.dmgScale * 4.5
let dmg = b.dmgScale * 5
if (tech.isCrit && who.isStunned) dmg *= 4
who.damage(dmg, tech.isNeedleShieldPierce);
simulation.drawList.push({ //add dmg to draw queue

View File

@@ -5956,7 +5956,7 @@ const level = {
//top right
spawn.randomGroup(2000, -5700, 0.6);
powerUps.addRerollToLevel() //needs to run after mobs are spawned
powerUps.addResearchToLevel() //needs to run after mobs are spawned
let bosses = ["shooterBoss", "launcherBoss", "laserTargetingBoss", "streamBoss", "pulsarBoss", "spawnerBossCulture", "laserBoss"];
let abc = Math.random();
if (simulation.difficulty > 3) {

View File

@@ -308,10 +308,9 @@ const m = {
//remove all tech and count current tech total
let totalTech = 0;
for (let i = 0, len = tech.tech.length; i < len; i++) {
if (tech.tech[i].isJunk) tech.tech[i].frequency = 0
if (tech.tech[i].count > 0 && !tech.tech[i].isLore) {
if (tech.tech[i].isJunk) {
tech.tech[i].frequency = 0
} else if (tech.tech[i].frequencyDefault) {
if (tech.tech[i].frequencyDefault) {
tech.tech[i].frequency = tech.tech[i].frequencyDefault
} else {
tech.tech[i].frequency = 1
@@ -1506,12 +1505,12 @@ const m = {
},
{
name: "standing wave harmonics",
description: "<strong>3</strong> oscillating <strong>shields</strong> are permanently active<br><strong>deflecting</strong> drains <strong class='color-f'>energy</strong> with no <strong>cool down</strong><br><strong>deflecting</strong> has <strong>75%</strong> less <strong>recoil</strong>", //<strong class='color-harm'>harm</strong> and
description: "<strong>3</strong> oscillating <strong>shields</strong> are permanently active<br><strong>deflecting</strong> drains <strong class='color-f'>energy</strong> with no <strong>cool down</strong><br><strong>deflecting</strong> has <strong>50%</strong> less <strong>recoil</strong>", //<strong class='color-harm'>harm</strong> and
effect: () => {
// m.fieldHarmReduction = 0.80;
m.fieldBlockCD = 0;
// m.fieldHarmReduction = 0.75;
m.blockingRecoil = 1 //4 is normal
m.blockingRecoil = 2 //4 is normal
m.fieldRange = 175
m.fieldShieldingScale = Math.pow(0.5, (tech.harmonics - 3))
m.harmonicRadius = 1 //for smoothing function when player holds mouse (for harmonicAtomic)
@@ -1548,7 +1547,11 @@ const m = {
}
m.pushMobs360(radius);
}
m.harmonicShield = m.harmonic3Phase
if (tech.harmonics === 2) {
m.harmonicShield = m.harmonic3Phase
} else {
m.harmonicShield = m.harmonicAtomic
}
m.hold = function() {
if (m.isHolding) {
m.drawHold(m.holdingTarget);
@@ -1633,11 +1636,11 @@ const m = {
m.drawFieldMeter()
if (tech.isPerfectBrake) { //cap mob speed around player
const range = 160 + 140 * wave + 150 * m.energy
const range = 160 + 140 * wave + 200 * m.energy
for (let i = 0; i < mob.length; i++) {
const distance = Vector.magnitude(Vector.sub(m.pos, mob[i].position))
if (distance < range) {
const cap = mob[i].isShielded ? 8.5 : 4.5
const cap = mob[i].isShielded ? 8 : 4
if (mob[i].speed > cap && Vector.dot(mob[i].velocity, Vector.sub(m.pos, mob[i].position)) > 0) { // if velocity is directed towards player
Matter.Body.setVelocity(mob[i], Vector.mult(Vector.normalise(mob[i].velocity), cap)); //set velocity to cap, but keep the direction
}

View File

@@ -1194,10 +1194,12 @@ const spawn = {
//teleport everything to center
function toMe(who, where, range) {
for (let i = 0, len = who.length; i < len; i++) {
const SUB = Vector.sub(who[i].position, where)
const DISTANCE = Vector.magnitude(SUB)
if (DISTANCE < range) {
Matter.Body.setPosition(who[i], where)
if (!who[i].isNotHoldable) {
const SUB = Vector.sub(who[i].position, where)
const DISTANCE = Vector.magnitude(SUB)
if (DISTANCE < range) {
Matter.Body.setPosition(who[i], where)
}
}
}
}

View File

@@ -165,7 +165,7 @@
if (tech.isLowEnergyDamage) dmg *= 1 + Math.max(0, 1 - m.energy) * 0.5
if (tech.isMaxEnergyTech) dmg *= 1.5
if (tech.isEnergyNoAmmo) dmg *= 1.6
if (tech.isDamageForGuns) dmg *= 1 + 0.1 * b.inventory.length
if (tech.isDamageForGuns) dmg *= 1 + 0.12 * b.inventory.length
if (tech.isLowHealthDmg) dmg *= 1 + 0.5 * Math.max(0, 1 - m.health)
if (tech.isHarmDamage && m.lastHarmCycle + 600 > m.cycle) dmg *= 3;
if (tech.isEnergyLoss) dmg *= 1.55;
@@ -250,7 +250,7 @@
},
{
name: "arsenal",
description: "increase <strong class='color-d'>damage</strong> by <strong>10%</strong><br>for each <strong class='color-g'>gun</strong> in your inventory",
description: "increase <strong class='color-d'>damage</strong> by <strong>12%</strong><br>for each <strong class='color-g'>gun</strong> in your inventory",
maxCount: 1,
count: 0,
frequency: 2,
@@ -2572,7 +2572,7 @@
},
{
name: "Ψ(t) collapse",
description: "enter an <strong class='alt'>alternate reality</strong> after you <strong class='color-r'>research</strong><br>spawn <strong>15</strong> <strong class='color-r'>research</strong>",
description: "enter an <strong class='alt'>alternate reality</strong> after you <strong class='color-r'>research</strong><br>spawn <strong>16</strong> <strong class='color-r'>research</strong>",
maxCount: 1,
count: 0,
frequency: 1,
@@ -2583,7 +2583,7 @@
requires: "not quantum immortality, many-worlds, non-unitary",
effect() {
tech.isResearchReality = true;
for (let i = 0; i < 15; i++) powerUps.spawn(m.pos.x + Math.random() * 60, m.pos.y + Math.random() * 60, "research", false);
for (let i = 0; i < 16; i++) powerUps.spawn(m.pos.x + Math.random() * 60, m.pos.y + Math.random() * 60, "research", false);
},
remove() {
tech.isResearchReality = false;
@@ -2712,25 +2712,6 @@
},
remove() {}
},
{
name: "WIMPs",
//<strong class='color-harm'>harmful</strong>
description: "a <strong class='color-harm'>harmful</strong> particle slowly <strong>chases</strong> you<br>spawn <strong>2-6</strong> <strong class='color-r'>research</strong> at the end of each <strong>level</strong>",
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true
},
requires: "",
effect: () => {
tech.wimpCount++
},
remove() {
tech.wimpCount = 0
}
},
{
name: "bubble fusion",
description: "after destroying a mob's natural <strong>shield</strong><br>spawn <strong>1-2</strong> <strong class='color-h'>heals</strong>, <strong class='color-g'>ammo</strong>, or <strong class='color-r'>research</strong>",
@@ -5193,6 +5174,25 @@
tech.pilotForce = 0.00002
}
},
{
name: "WIMPs",
description: "a <strong class='color-harm'>harmful</strong> particle slowly <strong>chases</strong> you<br>spawn <strong>3-9</strong> <strong class='color-r'>research</strong> at the end of each <strong>level</strong>",
isFieldTech: true,
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return m.fieldUpgrades[m.fieldMode].name === "wormhole"
},
requires: "wormhole",
effect: () => {
tech.wimpCount++
},
remove() {
tech.wimpCount = 0
}
},
{
name: "cosmic string",
description: "<strong>stun</strong> and do <strong class='color-p'>radioactive</strong> <strong class='color-d'>damage</strong> to <strong>mobs</strong><br>if you tunnel through them with a <strong class='color-worm'>wormhole</strong>",