wiggle
nematodes now wiggle their tail. it's horrible
tech: transdimensional spores renamed transdimensional worms
spawns spores -> worms
missiles:
20% more ammo
no longer fire rapidly on crouch
instead crouch gives missile initial forward velocity
no crouch makes the missiles recoil back before they accelerate forward
tech: launch system - fire missiles 500% more rapidly, gives 25% ammo
doesn't work with cruse missile
tech: ICBM - cruse missile is even bigger and slower
pavilion has been added back to the map rotation
this will make the game end at 13 again, and feel harder
let me know if it's absence resulted in less NaN game crashes
reactor sprayBoss is now harder to kill
bug fixes
This commit is contained in:
160
js/bullet.js
160
js/bullet.js
@@ -1887,7 +1887,13 @@ const b = {
|
|||||||
Composite.add(engine.world, bullet[me]); //add bullet to world
|
Composite.add(engine.world, bullet[me]); //add bullet to world
|
||||||
},
|
},
|
||||||
missile(where, angle, speed, size = 1) {
|
missile(where, angle, speed, size = 1) {
|
||||||
if (tech.missileSize) size *= 1.5
|
if (tech.isMissileBig) {
|
||||||
|
size *= 1.55
|
||||||
|
if (tech.isMissileBiggest) {
|
||||||
|
size *= 2
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
const me = bullet.length;
|
const me = bullet.length;
|
||||||
bullet[me] = Bodies.rectangle(where.x, where.y, 30 * size, 4 * size, {
|
bullet[me] = Bodies.rectangle(where.x, where.y, 30 * size, 4 * size, {
|
||||||
angle: angle,
|
angle: angle,
|
||||||
@@ -1902,7 +1908,7 @@ const b = {
|
|||||||
},
|
},
|
||||||
minDmgSpeed: 10,
|
minDmgSpeed: 10,
|
||||||
lookFrequency: Math.floor(10 + Math.random() * 3),
|
lookFrequency: Math.floor(10 + Math.random() * 3),
|
||||||
explodeRad: 180 * (tech.missileSize ? 1.5 : 1) + 60 * Math.random(),
|
explodeRad: (tech.isMissileBig ? 230 : 180) + 60 * Math.random(),
|
||||||
density: 0.02, //0.001 is normal
|
density: 0.02, //0.001 is normal
|
||||||
beforeDmg() {
|
beforeDmg() {
|
||||||
Matter.Body.setDensity(this, 0.0001); //reduce density to normal
|
Matter.Body.setDensity(this, 0.0001); //reduce density to normal
|
||||||
@@ -1973,7 +1979,7 @@ const b = {
|
|||||||
ctx.fill();
|
ctx.fill();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const thrust = 0.0066 * bullet[me].mass * (tech.missileSize ? 0.6 : 1);
|
const thrust = 0.0066 * bullet[me].mass * (tech.isMissileBig ? (tech.isMissileBiggest ? 0.15 : 0.7) : 1);
|
||||||
Matter.Body.setVelocity(bullet[me], {
|
Matter.Body.setVelocity(bullet[me], {
|
||||||
x: m.Vx / 2 + speed * Math.cos(angle),
|
x: m.Vx / 2 + speed * Math.cos(angle),
|
||||||
y: m.Vy / 2 + speed * Math.sin(angle)
|
y: m.Vy / 2 + speed * Math.sin(angle)
|
||||||
@@ -2589,7 +2595,7 @@ const b = {
|
|||||||
},
|
},
|
||||||
worm(where, isFreeze = tech.isSporeFreeze) { //used with the tech upgrade in mob.death()
|
worm(where, isFreeze = tech.isSporeFreeze) { //used with the tech upgrade in mob.death()
|
||||||
const bIndex = bullet.length;
|
const bIndex = bullet.length;
|
||||||
const wormSize = 6 + tech.wormSize * 7 * Math.random()
|
const wormSize = 6 + tech.wormSize * 6 * Math.random()
|
||||||
if (bIndex < 500) { //can't make over 500 spores
|
if (bIndex < 500) { //can't make over 500 spores
|
||||||
bullet[bIndex] = Bodies.polygon(where.x, where.y, 3, 3, {
|
bullet[bIndex] = Bodies.polygon(where.x, where.y, 3, 3, {
|
||||||
inertia: Infinity,
|
inertia: Infinity,
|
||||||
@@ -2600,7 +2606,7 @@ const b = {
|
|||||||
frictionAir: 0.025,
|
frictionAir: 0.025,
|
||||||
thrust: (tech.isFastSpores ? 0.001 : 0.0005) * (1 + 0.5 * (Math.random() - 0.5)),
|
thrust: (tech.isFastSpores ? 0.001 : 0.0005) * (1 + 0.5 * (Math.random() - 0.5)),
|
||||||
wormSize: wormSize,
|
wormSize: wormSize,
|
||||||
wormTail: 1 + Math.max(4, wormSize - 2 * tech.wormSize),
|
wormTail: 1 + Math.max(4, Math.min(wormSize - 2 * tech.wormSize, 30)),
|
||||||
dmg: (tech.isMutualism ? 7 : 2.9) * wormSize, //bonus damage from tech.isMutualism //2.5 is extra damage as worm
|
dmg: (tech.isMutualism ? 7 : 2.9) * wormSize, //bonus damage from tech.isMutualism //2.5 is extra damage as worm
|
||||||
lookFrequency: 100 + Math.floor(37 * Math.random()),
|
lookFrequency: 100 + Math.floor(37 * Math.random()),
|
||||||
classType: "bullet",
|
classType: "bullet",
|
||||||
@@ -2637,16 +2643,24 @@ const b = {
|
|||||||
m.displayHealth();
|
m.displayHealth();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
tailCycle: 6.28 * Math.random(),
|
||||||
do() {
|
do() {
|
||||||
|
this.tailCycle += this.speed * 0.025
|
||||||
ctx.beginPath(); //draw nematode
|
ctx.beginPath(); //draw nematode
|
||||||
ctx.moveTo(this.position.x, this.position.y);
|
ctx.moveTo(this.position.x, this.position.y);
|
||||||
const dir = Vector.mult(Vector.normalise(this.velocity), -Math.min(100, this.wormTail * this.speed))
|
// const dir = Vector.mult(Vector.normalise(this.velocity), -Math.min(100, this.wormTail * this.speed))
|
||||||
|
const speed = Math.min(7, this.speed)
|
||||||
|
const dir = Vector.mult(Vector.normalise(this.velocity), -0.6 * this.wormTail * speed)
|
||||||
const tail = Vector.add(this.position, dir)
|
const tail = Vector.add(this.position, dir)
|
||||||
ctx.lineTo(tail.x, tail.y);
|
const wiggle = Vector.add(Vector.add(tail, dir), Vector.rotate(dir, Math.sin(this.tailCycle)))
|
||||||
|
// const wiggle = Vector.add(tail, Vector.rotate(dir, Math.sin((m.cycle - this.endCycle) * 0.03 * this.speed)))
|
||||||
|
ctx.quadraticCurveTo(tail.x, tail.y, wiggle.x, wiggle.y) // ctx.quadraticCurveTo(controlPoint.x, controlPoint.y, this.vertices[0].x, this.vertices[0].y)
|
||||||
|
// ctx.lineTo(tail.x, tail.y);
|
||||||
ctx.lineWidth = this.wormSize;
|
ctx.lineWidth = this.wormSize;
|
||||||
ctx.strokeStyle = "#000";
|
ctx.strokeStyle = "#000";
|
||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
|
|
||||||
|
|
||||||
if (this.lockedOn && this.lockedOn.alive) {
|
if (this.lockedOn && this.lockedOn.alive) {
|
||||||
this.force = Vector.mult(Vector.normalise(Vector.sub(this.lockedOn.position, this.position)), this.mass * this.thrust)
|
this.force = Vector.mult(Vector.normalise(Vector.sub(this.lockedOn.position, this.position)), this.mass * this.thrust)
|
||||||
} else {
|
} else {
|
||||||
@@ -5744,69 +5758,95 @@ const b = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "missiles",
|
name: "missiles",
|
||||||
description: "launch <strong>homing</strong> missiles that <strong class='color-e'>explode</strong><br>crouch to <strong>rapidly</strong> launch smaller missiles",
|
description: "launch <strong>homing</strong> missiles that <strong class='color-e'>explode</strong>",
|
||||||
ammo: 0,
|
ammo: 0,
|
||||||
ammoPack: 4,
|
ammoPack: 5,
|
||||||
have: false,
|
have: false,
|
||||||
fireCycle: 0,
|
fireCycle: 0,
|
||||||
do() {},
|
do() {},
|
||||||
fire() {
|
fire() {
|
||||||
const countReduction = Math.pow(0.9, tech.missileCount)
|
const countReduction = Math.pow(0.9, tech.missileCount)
|
||||||
if (input.down) {
|
// if (input.down) {
|
||||||
m.fireCDcycle = m.cycle + 10 * b.fireCDscale / countReduction; // cool down
|
// m.fireCDcycle = m.cycle + tech.missileFireCD * b.fireCDscale / countReduction; // cool down
|
||||||
// for (let i = 0; i < tech.missileCount; i++) {
|
// // for (let i = 0; i < tech.missileCount; i++) {
|
||||||
// b.missile(where, -Math.PI / 2 + 0.2 * (Math.random() - 0.5) * Math.sqrt(tech.missileCount), -2, Math.sqrt(countReduction))
|
// // b.missile(where, -Math.PI / 2 + 0.2 * (Math.random() - 0.5) * Math.sqrt(tech.missileCount), -2, Math.sqrt(countReduction))
|
||||||
// bullet[bullet.length - 1].force.x += 0.004 * countReduction * (i - (tech.missileCount - 1) / 2);
|
// // bullet[bullet.length - 1].force.x += 0.004 * countReduction * (i - (tech.missileCount - 1) / 2);
|
||||||
// }
|
// // }
|
||||||
|
|
||||||
if (tech.missileCount > 1) {
|
// if (tech.missileCount > 1) {
|
||||||
for (let i = 0; i < tech.missileCount; i++) {
|
// for (let i = 0; i < tech.missileCount; i++) {
|
||||||
setTimeout(() => {
|
// setTimeout(() => {
|
||||||
const where = { x: m.pos.x, y: m.pos.y - 40 }
|
// const where = { x: m.pos.x, y: m.pos.y - 40 }
|
||||||
b.missile(where, -Math.PI / 2 + 0.2 * (Math.random() - 0.5) * Math.sqrt(tech.missileCount), -2, Math.sqrt(countReduction))
|
// b.missile(where, -Math.PI / 2 + 0.2 * (Math.random() - 0.5) * Math.sqrt(tech.missileCount), -2, Math.sqrt(countReduction))
|
||||||
bullet[bullet.length - 1].force.x += 0.025 * countReduction * (i - (tech.missileCount - 1) / 2);
|
// bullet[bullet.length - 1].force.x += 0.025 * countReduction * (i - (tech.missileCount - 1) / 2);
|
||||||
}, 20 * tech.missileCount * Math.random());
|
// }, 20 * tech.missileCount * Math.random());
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
const where = {
|
// const where = {
|
||||||
x: m.pos.x,
|
// x: m.pos.x,
|
||||||
y: m.pos.y - 40
|
// y: m.pos.y - 40
|
||||||
}
|
// }
|
||||||
b.missile(where, -Math.PI / 2 + 0.2 * (Math.random() - 0.5), -2)
|
// b.missile(where, -Math.PI / 2 + 0.2 * (Math.random() - 0.5), -2)
|
||||||
}
|
// }
|
||||||
} else {
|
// } else {
|
||||||
m.fireCDcycle = m.cycle + 50 * b.fireCDscale / countReduction; // cool down
|
m.fireCDcycle = m.cycle + tech.missileFireCD * b.fireCDscale / countReduction; // cool down
|
||||||
const direction = {
|
const direction = {
|
||||||
x: Math.cos(m.angle),
|
x: Math.cos(m.angle),
|
||||||
y: Math.sin(m.angle)
|
y: Math.sin(m.angle)
|
||||||
}
|
}
|
||||||
const push = Vector.mult(Vector.perp(direction), 0.08 * countReduction / Math.sqrt(tech.missileCount))
|
// const where = {
|
||||||
if (tech.missileCount > 1) {
|
// x: m.pos.x + 30 * direction.x,
|
||||||
for (let i = 0; i < tech.missileCount; i++) {
|
// y: m.pos.y + 30 * direction.y
|
||||||
setTimeout(() => {
|
// }
|
||||||
const where = {
|
if (tech.missileCount > 1) {
|
||||||
x: m.pos.x + 40 * direction.x,
|
const push = Vector.mult(Vector.perp(direction), 0.2 * countReduction / Math.sqrt(tech.missileCount))
|
||||||
y: m.pos.y + 40 * direction.y
|
const sqrtCountReduction = Math.sqrt(countReduction)
|
||||||
}
|
|
||||||
b.missile(where, m.angle, 0, Math.sqrt(countReduction))
|
|
||||||
bullet[bullet.length - 1].force.x += push.x * (i - (tech.missileCount - 1) / 2);
|
|
||||||
bullet[bullet.length - 1].force.y += push.y * (i - (tech.missileCount - 1) / 2);
|
|
||||||
}, 40 * tech.missileCount * Math.random());
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
const where = {
|
|
||||||
x: m.pos.x + 40 * direction.x,
|
|
||||||
y: m.pos.y + 40 * direction.y
|
|
||||||
}
|
|
||||||
b.missile(where, m.angle, 0)
|
|
||||||
}
|
|
||||||
// for (let i = 0; i < tech.missileCount; i++) {
|
// for (let i = 0; i < tech.missileCount; i++) {
|
||||||
// setTimeout(() => {
|
// setTimeout(() => {
|
||||||
// b.missile(where, m.angle, 0, size)
|
// if (input.down) {
|
||||||
// bullet[bullet.length - 1].force.x += push.x * (i - (tech.missileCount - 1) / 2);
|
// b.missile(where, m.angle, 20, sqrtCountReduction)
|
||||||
// bullet[bullet.length - 1].force.y += push.y * (i - (tech.missileCount - 1) / 2);
|
// // bullet[bullet.length - 1].force.x += 0.7 * push.x * (i - (tech.missileCount - 1) / 2);
|
||||||
// }, i * 50);
|
// // bullet[bullet.length - 1].force.y += 0.7 * push.y * (i - (tech.missileCount - 1) / 2);
|
||||||
|
// } else {
|
||||||
|
// b.missile(where, m.angle, -10, sqrtCountReduction)
|
||||||
|
// bullet[bullet.length - 1].force.x += push.x * (i - (tech.missileCount - 1) / 2);
|
||||||
|
// bullet[bullet.length - 1].force.y += 0.005 + push.y * (i - (tech.missileCount - 1) / 2);
|
||||||
|
// }
|
||||||
|
|
||||||
|
// }, 1 + i * 10 * tech.missileCount);
|
||||||
// }
|
// }
|
||||||
|
const launchDelay = 4
|
||||||
|
let count = 0
|
||||||
|
const fireMissile = () => {
|
||||||
|
if (input.down) {
|
||||||
|
b.missile({ x: m.pos.x + 30 * direction.x, y: m.pos.y + 30 * direction.y }, m.angle, 20, sqrtCountReduction)
|
||||||
|
bullet[bullet.length - 1].force.x += 0.5 * push.x * (Math.random() - 0.5)
|
||||||
|
bullet[bullet.length - 1].force.y += 0.004 + 0.5 * push.y * (Math.random() - 0.5)
|
||||||
|
} else {
|
||||||
|
b.missile({ x: m.pos.x + 30 * direction.x, y: m.pos.y + 30 * direction.y }, m.angle, -15, sqrtCountReduction)
|
||||||
|
bullet[bullet.length - 1].force.x += push.x * (Math.random() - 0.5)
|
||||||
|
bullet[bullet.length - 1].force.y += 0.005 + push.y * (Math.random() - 0.5)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
const cycle = () => {
|
||||||
|
if ((simulation.paused || m.isBodiesAsleep) && m.alive) {
|
||||||
|
requestAnimationFrame(cycle)
|
||||||
|
} else {
|
||||||
|
count++
|
||||||
|
if (!(count % launchDelay)) {
|
||||||
|
fireMissile()
|
||||||
|
}
|
||||||
|
if (count < tech.missileCount * launchDelay && m.alive) requestAnimationFrame(cycle);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
requestAnimationFrame(cycle);
|
||||||
|
} else {
|
||||||
|
if (input.down) {
|
||||||
|
b.missile({ x: m.pos.x + 40 * direction.x, y: m.pos.y + 40 * direction.y }, m.angle, 25)
|
||||||
|
} else {
|
||||||
|
b.missile({ x: m.pos.x + 40 * direction.x, y: m.pos.y + 40 * direction.y }, m.angle, -12)
|
||||||
|
bullet[bullet.length - 1].force.y += 0.04 * (Math.random() - 0.2)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}, {
|
}, {
|
||||||
|
|||||||
24
js/level.js
24
js/level.js
@@ -8,7 +8,7 @@ const level = {
|
|||||||
onLevel: -1,
|
onLevel: -1,
|
||||||
levelsCleared: 0,
|
levelsCleared: 0,
|
||||||
//see level.populateLevels: (intro, ... , reservoir, reactor, ... , gauntlet, final) added later
|
//see level.populateLevels: (intro, ... , reservoir, reactor, ... , gauntlet, final) added later
|
||||||
playableLevels: ["labs", "rooftops", "skyscrapers", "warehouse", "highrise", "office", "aerie", "satellite", "sewers", "testChamber"], //"pavilion"
|
playableLevels: ["labs", "rooftops", "skyscrapers", "warehouse", "highrise", "office", "aerie", "satellite", "sewers", "testChamber", "pavilion"],
|
||||||
// playableLevels: ["pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion"],
|
// playableLevels: ["pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion", "pavilion"],
|
||||||
communityLevels: ["stronghold", "basement", "crossfire", "vats", "run", "n-gon", "house", "perplex", "coliseum", "tunnel", "islands"],
|
communityLevels: ["stronghold", "basement", "crossfire", "vats", "run", "n-gon", "house", "perplex", "coliseum", "tunnel", "islands"],
|
||||||
trainingLevels: ["walk", "crouch", "jump", "hold", "throw", "throwAt", "deflect", "heal", "fire", "nailGun", "shotGun", "superBall", "matterWave", "missile", "stack", "mine", "grenades", "harpoon"],
|
trainingLevels: ["walk", "crouch", "jump", "hold", "throw", "throwAt", "deflect", "heal", "fire", "nailGun", "shotGun", "superBall", "matterWave", "missile", "stack", "mine", "grenades", "harpoon"],
|
||||||
@@ -17,15 +17,15 @@ const level = {
|
|||||||
if (level.levelsCleared === 0) { //this code only runs on the first level
|
if (level.levelsCleared === 0) { //this code only runs on the first level
|
||||||
// simulation.isHorizontalFlipped = true
|
// simulation.isHorizontalFlipped = true
|
||||||
// m.setField("metamaterial cloaking")
|
// m.setField("metamaterial cloaking")
|
||||||
// b.giveGuns("drones")
|
// b.giveGuns("missiles")
|
||||||
// tech.giveTech("desublimated ammunition")
|
// tech.giveTech("nematodes")
|
||||||
// tech.giveTech("smelting")
|
// tech.giveTech("launch system")
|
||||||
// tech.giveTech("smelting")
|
// tech.giveTech("cruise missile")
|
||||||
// tech.giveTech("616")
|
// tech.giveTech("ICBM")
|
||||||
// tech.giveTech("grappling hook")
|
// tech.giveTech("grappling hook")
|
||||||
// tech.giveTech("coyote")
|
// tech.giveTech("annelids")
|
||||||
// for (let i = 0; i < 2; i++) powerUps.directSpawn(0, 0, "tech");
|
// for (let i = 0; i < 2; i++) powerUps.directSpawn(0, 0, "tech");
|
||||||
// for (let i = 0; i < 2; i++) tech.giveTech("corona discharge")
|
// for (let i = 0; i < 9; i++) tech.giveTech("annelids")
|
||||||
// for (let i = 10; i < tech.tech.length; i++) { tech.tech[i].isBanished = true }
|
// for (let i = 10; i < tech.tech.length; i++) { tech.tech[i].isBanished = true }
|
||||||
// powerUps.research.changeRerolls(100000)
|
// powerUps.research.changeRerolls(100000)
|
||||||
// for (let i = 0; i < 5; i++) tech.giveTech("corona discharge")
|
// for (let i = 0; i < 5; i++) tech.giveTech("corona discharge")
|
||||||
@@ -2551,7 +2551,7 @@ const level = {
|
|||||||
spawn.mapRect(4850, -275, 50, 175);
|
spawn.mapRect(4850, -275, 50, 175);
|
||||||
|
|
||||||
//???
|
//???
|
||||||
level.difficultyIncrease(15) //30 is near max on hard //60 is near max on why
|
level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why
|
||||||
m.addHealth(Infinity)
|
m.addHealth(Infinity)
|
||||||
|
|
||||||
spawn.starter(1900, -500, 200) //big boy
|
spawn.starter(1900, -500, 200) //big boy
|
||||||
@@ -2690,11 +2690,11 @@ const level = {
|
|||||||
if (!isSpawnedBoss) {
|
if (!isSpawnedBoss) {
|
||||||
isSpawnedBoss = true
|
isSpawnedBoss = true
|
||||||
if (Math.random() < 0.33) {
|
if (Math.random() < 0.33) {
|
||||||
for (let i = 0, len = Math.min(simulation.difficulty / 20, 6); i < len; ++i) spawn.bounceBoss(1487 + 200 * i, -1525, 80, false);
|
for (let i = 0, len = Math.min(simulation.difficulty / 15, 7); i < len; ++i) spawn.bounceBoss(1487 + 200 * i, -1525, 80, false);
|
||||||
} else if (Math.random() < 0.5) {
|
} else if (Math.random() < 0.5) {
|
||||||
for (let i = 0, len = Math.min(simulation.difficulty / 9, 8); i < len; ++i) spawn.sprayBoss(2400 - 150 * i, -225, 30, false)
|
for (let i = 0, len = Math.min(simulation.difficulty / 8, 8); i < len; ++i) spawn.sprayBoss(2400 - 150 * i, -225, 30, false)
|
||||||
} else {
|
} else {
|
||||||
for (let i = 0, len = Math.min(simulation.difficulty / 6, 10); i < len; ++i) spawn.mineBoss(1950, -250, 50, false);
|
for (let i = 0, len = Math.min(simulation.difficulty / 5, 11); i < len; ++i) spawn.mineBoss(1950, -250, 50, false);
|
||||||
}
|
}
|
||||||
// for (let i = 0, len = 3 + simulation.difficulty / 20; i < len; ++i) spawn.mantisBoss(1487 + 300 * i, -1525, 35, false)
|
// for (let i = 0, len = 3 + simulation.difficulty / 20; i < len; ++i) spawn.mantisBoss(1487 + 300 * i, -1525, 35, false)
|
||||||
}
|
}
|
||||||
|
|||||||
42
js/player.js
42
js/player.js
@@ -3340,22 +3340,11 @@ const m = {
|
|||||||
body.splice(i, 1);
|
body.splice(i, 1);
|
||||||
m.fieldRange *= 0.8
|
m.fieldRange *= 0.8
|
||||||
if (tech.isWormholeEnergy) m.energy += 0.53
|
if (tech.isWormholeEnergy) m.energy += 0.53
|
||||||
if (tech.isWormholeSpores) { //pandimensional spermia
|
if (tech.isWormholeWorms) { //pandimensional spermia
|
||||||
for (let i = 0, len = Math.ceil(2.5 * (tech.isSporeWorm ? 0.5 : 1) * Math.random()); i < len; i++) {
|
b.worm(Vector.add(m.hole.pos2, Vector.rotate({ x: m.fieldRange * 0.4, y: 0 }, 2 * Math.PI * Math.random())))
|
||||||
if (tech.isSporeWorm) {
|
Matter.Body.setVelocity(bullet[bullet.length - 1], Vector.mult(Vector.rotate(m.hole.unit, Math.PI / 2), -10));
|
||||||
b.worm(Vector.add(m.hole.pos2, Vector.rotate({
|
// for (let i = 0, len = Math.ceil(1.25 * Math.random()); i < len; i++) {
|
||||||
x: m.fieldRange * 0.4,
|
// }
|
||||||
y: 0
|
|
||||||
}, 2 * Math.PI * Math.random())))
|
|
||||||
Matter.Body.setVelocity(bullet[bullet.length - 1], Vector.mult(Vector.rotate(m.hole.unit, Math.PI / 2), -5));
|
|
||||||
} else {
|
|
||||||
b.spore(Vector.add(m.hole.pos2, Vector.rotate({
|
|
||||||
x: m.fieldRange * 0.4,
|
|
||||||
y: 0
|
|
||||||
}, 2 * Math.PI * Math.random())))
|
|
||||||
Matter.Body.setVelocity(bullet[bullet.length - 1], Vector.mult(Vector.rotate(m.hole.unit, Math.PI / 2), -15));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
@@ -3374,22 +3363,11 @@ const m = {
|
|||||||
m.fieldRange *= 0.8
|
m.fieldRange *= 0.8
|
||||||
// if (tech.isWormholeEnergy && m.energy < m.maxEnergy * 2) m.energy = m.maxEnergy * 2
|
// if (tech.isWormholeEnergy && m.energy < m.maxEnergy * 2) m.energy = m.maxEnergy * 2
|
||||||
if (tech.isWormholeEnergy && m.immuneCycle < m.cycle) m.energy += 0.53
|
if (tech.isWormholeEnergy && m.immuneCycle < m.cycle) m.energy += 0.53
|
||||||
if (tech.isWormholeSpores) { //pandimensional spermia
|
if (tech.isWormholeWorms) { //pandimensional spermia
|
||||||
for (let i = 0, len = Math.ceil(2.5 * (tech.isSporeWorm ? 0.5 : 1) * Math.random()); i < len; i++) {
|
b.worm(Vector.add(m.hole.pos1, Vector.rotate({ x: m.fieldRange * 0.4, y: 0 }, 2 * Math.PI * Math.random())))
|
||||||
if (tech.isSporeWorm) {
|
Matter.Body.setVelocity(bullet[bullet.length - 1], Vector.mult(Vector.rotate(m.hole.unit, Math.PI / 2), 5));
|
||||||
b.worm(Vector.add(m.hole.pos1, Vector.rotate({
|
// for (let i = 0, len = Math.ceil(1.25 * Math.random()); i < len; i++) {
|
||||||
x: m.fieldRange * 0.4,
|
// }
|
||||||
y: 0
|
|
||||||
}, 2 * Math.PI * Math.random())))
|
|
||||||
Matter.Body.setVelocity(bullet[bullet.length - 1], Vector.mult(Vector.rotate(m.hole.unit, Math.PI / 2), 5));
|
|
||||||
} else {
|
|
||||||
b.spore(Vector.add(m.hole.pos1, Vector.rotate({
|
|
||||||
x: m.fieldRange * 0.4,
|
|
||||||
y: 0
|
|
||||||
}, 2 * Math.PI * Math.random())))
|
|
||||||
Matter.Body.setVelocity(bullet[bullet.length - 1], Vector.mult(Vector.rotate(m.hole.unit, Math.PI / 2), 15));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
10
js/spawn.js
10
js/spawn.js
@@ -3532,16 +3532,16 @@ const spawn = {
|
|||||||
me.isBoss = true;
|
me.isBoss = true;
|
||||||
me.inertia = Infinity; //no rotation
|
me.inertia = Infinity; //no rotation
|
||||||
// me.accelMag = 0.00008 + 0.00007 * simulation.accelScale;
|
// me.accelMag = 0.00008 + 0.00007 * simulation.accelScale;
|
||||||
me.burstFireFreq = 22 + Math.floor(22 * simulation.CDScale)
|
me.burstFireFreq = 18 + Math.floor(18 * simulation.CDScale)
|
||||||
me.burstTotalPhases = 4 + Math.floor(2 / simulation.CDScale)
|
me.burstTotalPhases = 4 + Math.floor(2 / simulation.CDScale)
|
||||||
me.noFireTotalCycles = 390
|
me.noFireTotalCycles = 360
|
||||||
me.frictionStatic = 0;
|
me.frictionStatic = 0;
|
||||||
me.friction = 0;
|
me.friction = 0;
|
||||||
me.frictionAir = 0;
|
me.frictionAir = 0;
|
||||||
me.restitution = 1
|
me.restitution = 1
|
||||||
spawn.spawnOrbitals(me, radius + 50 + 200 * Math.random(), 1)
|
spawn.spawnOrbitals(me, radius + 50 + 200 * Math.random(), 1)
|
||||||
Matter.Body.setDensity(me, 0.0022 + 0.0002 * Math.sqrt(simulation.difficulty)); //extra dense //normal is 0.001 //makes effective life much larger
|
Matter.Body.setDensity(me, 0.0022 + 0.0002 * Math.sqrt(simulation.difficulty)); //extra dense //normal is 0.001 //makes effective life much larger
|
||||||
me.damageReduction = 0.12 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
me.damageReduction = 0.09 / (tech.isScaleMobsWithDuplication ? 1 + tech.duplicationChance() : 1)
|
||||||
me.onDeath = function() {
|
me.onDeath = function() {
|
||||||
if (isSpawnBossPowerUp) powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
if (isSpawnBossPowerUp) powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
||||||
};
|
};
|
||||||
@@ -4104,7 +4104,7 @@ const spawn = {
|
|||||||
me.swordGrow = function() {
|
me.swordGrow = function() {
|
||||||
this.laserSword(this.vertices[this.swordVertex], this.angle + this.laserAngle);
|
this.laserSword(this.vertices[this.swordVertex], this.angle + this.laserAngle);
|
||||||
this.swordRadius += this.swordRadiusGrowRate
|
this.swordRadius += this.swordRadiusGrowRate
|
||||||
if (this.swordRadius > this.swordRadiusMax) {
|
if (this.swordRadius > this.swordRadiusMax || this.isStunned) {
|
||||||
this.sword = this.swordSlash
|
this.sword = this.swordSlash
|
||||||
this.spinCount = 0
|
this.spinCount = 0
|
||||||
}
|
}
|
||||||
@@ -4113,7 +4113,7 @@ const spawn = {
|
|||||||
this.laserSword(this.vertices[this.swordVertex], this.angle + this.laserAngle);
|
this.laserSword(this.vertices[this.swordVertex], this.angle + this.laserAngle);
|
||||||
this.torque += this.torqueMagnitude;
|
this.torque += this.torqueMagnitude;
|
||||||
this.spinCount++
|
this.spinCount++
|
||||||
if (this.spinCount > 60) {
|
if (this.spinCount > 60 || this.isStunned) {
|
||||||
this.sword = this.swordWaiting
|
this.sword = this.swordWaiting
|
||||||
this.swordRadius = 0
|
this.swordRadius = 0
|
||||||
this.accelMag = 0.001 * simulation.accelScale;
|
this.accelMag = 0.001 * simulation.accelScale;
|
||||||
|
|||||||
93
js/tech.js
93
js/tech.js
@@ -4494,21 +4494,78 @@ const tech = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "cruise missile",
|
name: "cruise missile",
|
||||||
description: "<strong>missiles</strong> travel <strong>63%</strong> slower,<br>but have a <strong>50%</strong> larger <strong class='color-e'>explosive</strong> payload",
|
description: "<strong>missiles</strong> travel <strong>50%</strong> slower,<br>but have a <strong>100%</strong> larger <strong class='color-e'>explosive</strong> payload",
|
||||||
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("missiles") || tech.isMissileField || tech.missileBotCount
|
return (tech.haveGunCheck("missiles") && tech.missileFireCD === 45) || tech.isMissileField || tech.missileBotCount
|
||||||
},
|
},
|
||||||
requires: "missiles",
|
requires: "missiles",
|
||||||
effect() {
|
effect() {
|
||||||
tech.missileSize = true
|
tech.isMissileBig = true
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
tech.missileSize = false
|
tech.isMissileBig = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ICBM",
|
||||||
|
description: "cruise <strong>missiles</strong> travel <strong>66%</strong> slower,<br>but have a <strong>100%</strong> larger <strong class='color-e'>explosive</strong> payload",
|
||||||
|
isGunTech: true,
|
||||||
|
maxCount: 1,
|
||||||
|
count: 0,
|
||||||
|
frequency: 2,
|
||||||
|
frequencyDefault: 2,
|
||||||
|
allowed() {
|
||||||
|
return tech.haveGunCheck("missiles") && tech.isMissileBig //&& !tech.isSmartRadius && !tech.isImmuneExplosion
|
||||||
|
},
|
||||||
|
requires: "missiles, cruse missile", //, not electric reactive armor, controlled explosions",
|
||||||
|
effect() {
|
||||||
|
tech.isMissileBiggest = true
|
||||||
|
},
|
||||||
|
remove() {
|
||||||
|
tech.isMissileBiggest = false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "launch system",
|
||||||
|
description: `reduce <strong>missile</strong> launch cooldown <strong>500%</strong><br>gain <strong>20%</strong> more missile <strong class='color-ammo'>ammo</strong> per ${powerUps.orb.ammo(1)}`,
|
||||||
|
isGunTech: true,
|
||||||
|
maxCount: 1,
|
||||||
|
count: 0,
|
||||||
|
frequency: 2,
|
||||||
|
frequencyDefault: 2,
|
||||||
|
allowed() {
|
||||||
|
return tech.haveGunCheck("missiles") && !tech.isMissileBig
|
||||||
|
},
|
||||||
|
requires: "missiles",
|
||||||
|
ammoBonus: 1.2,
|
||||||
|
effect() {
|
||||||
|
tech.missileFireCD = 10
|
||||||
|
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||||
|
if (b.guns[i].name === "missiles") {
|
||||||
|
b.guns[i].ammoPack = this.ammoBonus;
|
||||||
|
b.guns[i].ammo = Math.ceil(b.guns[i].ammo * this.ammoBonus);
|
||||||
|
simulation.updateGunHUD();
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
remove() {
|
||||||
|
if (tech.missileFireCD !== 45) {
|
||||||
|
tech.missileFireCD = 45;
|
||||||
|
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||||
|
if (b.guns[i].name === "missiles") {
|
||||||
|
b.guns[i].ammoPack = 5;
|
||||||
|
b.guns[i].ammo = Math.ceil(b.guns[i].ammo / this.ammoBonus);
|
||||||
|
simulation.updateGunHUD();
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -4550,7 +4607,7 @@ const tech = {
|
|||||||
frequency: 2,
|
frequency: 2,
|
||||||
frequencyDefault: 2,
|
frequencyDefault: 2,
|
||||||
allowed() {
|
allowed() {
|
||||||
return tech.explosiveRadius === 1 && !tech.isSmallExplosion && (tech.haveGunCheck("missiles") || tech.isIncendiary || (tech.haveGunCheck("grenades") && !tech.isNeutronBomb) || tech.isPulseLaser || tech.isMissileField || tech.boomBotCount > 1 || tech.isTokamak)
|
return tech.explosiveRadius === 1 && !tech.isSmallExplosion && (tech.haveGunCheck("missiles") || tech.missileBotCount || tech.isIncendiary || (tech.haveGunCheck("grenades") && !tech.isNeutronBomb) || tech.isPulseLaser || tech.isMissileField || tech.boomBotCount > 1 || tech.isTokamak)
|
||||||
},
|
},
|
||||||
requires: "an explosive damage source, not ammonium nitrate or nitroglycerin",
|
requires: "an explosive damage source, not ammonium nitrate or nitroglycerin",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
@@ -4721,7 +4778,7 @@ const tech = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "MIRV",
|
name: "MIRV",
|
||||||
description: "fire <strong>+1</strong> <strong>missile</strong> and <strong>grenade</strong><br>decrease <strong class='color-e'>explosion</strong> <strong>radius</strong> up to <strong>10%</strong>",
|
description: "fire <strong>+1</strong> <strong>missile</strong> and <strong>grenade</strong> per shot<br>decrease <strong class='color-e'>explosion</strong> <strong>radius</strong> up to <strong>10%</strong>",
|
||||||
isGunTech: true,
|
isGunTech: true,
|
||||||
maxCount: 9,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
@@ -5070,7 +5127,7 @@ const tech = {
|
|||||||
frequency: 3,
|
frequency: 3,
|
||||||
frequencyDefault: 3,
|
frequencyDefault: 3,
|
||||||
allowed() {
|
allowed() {
|
||||||
return tech.haveGunCheck("spores") || tech.sporesOnDeath > 0 || tech.isSporeField || tech.isWormholeSpores || (tech.haveGunCheck("shotgun") && !tech.isIncendiary && !tech.isRivets && !tech.isIceShot && !tech.isFoamShot && !tech.isNeedles && !tech.isNailShot)
|
return tech.haveGunCheck("spores") || tech.sporesOnDeath > 0 || tech.isSporeField || (tech.haveGunCheck("shotgun") && !tech.isIncendiary && !tech.isRivets && !tech.isIceShot && !tech.isFoamShot && !tech.isNeedles && !tech.isNailShot)
|
||||||
},
|
},
|
||||||
requires: "spore gun, spores",
|
requires: "spore gun, spores",
|
||||||
effect() {
|
effect() {
|
||||||
@@ -7161,9 +7218,9 @@ const tech = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "transdimensional spores",
|
name: "transdimensional worms",
|
||||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Dimension' class="link">transdimensional spores</a>`,
|
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Dimension' class="link">transdimensional worms</a>`,
|
||||||
description: "when <strong class='color-block'>blocks</strong> fall into a <strong class='color-worm'>wormhole</strong><br>higher dimension <strong class='color-p' style='letter-spacing: 2px;'>spores</strong> are summoned",
|
description: "when <strong class='color-block'>blocks</strong> fall into a <strong class='color-worm'>wormhole</strong><br>higher dimension <strong class='color-p' style='letter-spacing: 2px;'>worms</strong> are summoned",
|
||||||
isFieldTech: true,
|
isFieldTech: true,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
@@ -7174,10 +7231,10 @@ const tech = {
|
|||||||
},
|
},
|
||||||
requires: "wormhole",
|
requires: "wormhole",
|
||||||
effect() {
|
effect() {
|
||||||
tech.isWormholeSpores = true
|
tech.isWormholeWorms = true
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
tech.isWormholeSpores = false
|
tech.isWormholeWorms = false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -9233,7 +9290,7 @@ const tech = {
|
|||||||
remove() {}
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "quantum black hole",
|
name: "black hole",
|
||||||
description: `use your <strong class='color-f'>energy</strong> and ${powerUps.orb.research(4)} to <strong>spawn</strong><br>inside the event horizon of a huge <strong>black hole</strong>`,
|
description: `use your <strong class='color-f'>energy</strong> and ${powerUps.orb.research(4)} to <strong>spawn</strong><br>inside the event horizon of a huge <strong>black hole</strong>`,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
@@ -9297,7 +9354,7 @@ const tech = {
|
|||||||
setTimeout(() => { powerUps.spawn(m.pos.x + 50, m.pos.y - 50, "heal"); }, 750);
|
setTimeout(() => { powerUps.spawn(m.pos.x + 50, m.pos.y - 50, "heal"); }, 750);
|
||||||
setTimeout(() => { powerUps.spawn(m.pos.x - 50, m.pos.y, "tech"); }, 1000);
|
setTimeout(() => { powerUps.spawn(m.pos.x - 50, m.pos.y, "tech"); }, 1000);
|
||||||
setTimeout(() => { powerUps.spawn(m.pos.x - 50, m.pos.y - 50, "research"); }, 1250);
|
setTimeout(() => { powerUps.spawn(m.pos.x - 50, m.pos.y - 50, "research"); }, 1250);
|
||||||
}, 1000 * 5);
|
}, 1000 * 5 * 60);
|
||||||
},
|
},
|
||||||
remove() {}
|
remove() {}
|
||||||
},
|
},
|
||||||
@@ -9589,7 +9646,7 @@ const tech = {
|
|||||||
isWormholeDamage: null,
|
isWormholeDamage: null,
|
||||||
isNailCrit: null,
|
isNailCrit: null,
|
||||||
isFlechetteExplode: null,
|
isFlechetteExplode: null,
|
||||||
isWormholeSpores: null,
|
isWormholeWorms: null,
|
||||||
isWormBullets: null,
|
isWormBullets: null,
|
||||||
isWideLaser: null,
|
isWideLaser: null,
|
||||||
wideLaser: null,
|
wideLaser: null,
|
||||||
@@ -9616,7 +9673,8 @@ const tech = {
|
|||||||
isRewindGrenade: null,
|
isRewindGrenade: null,
|
||||||
isExtruder: null,
|
isExtruder: null,
|
||||||
isEndLevelPowerUp: null,
|
isEndLevelPowerUp: null,
|
||||||
missileSize: null,
|
isMissileBig: null,
|
||||||
|
isMissileBiggest: null,
|
||||||
isLaserMine: null,
|
isLaserMine: null,
|
||||||
isAmmoFoamSize: null,
|
isAmmoFoamSize: null,
|
||||||
isIceIX: null,
|
isIceIX: null,
|
||||||
@@ -9748,5 +9806,6 @@ const tech = {
|
|||||||
plasmaDischarge: null,
|
plasmaDischarge: null,
|
||||||
isFlipFlopHealth: null,
|
isFlipFlopHealth: null,
|
||||||
isRelayEnergy: null,
|
isRelayEnergy: null,
|
||||||
coyoteTime: null
|
coyoteTime: null,
|
||||||
|
missileFireCD: null
|
||||||
}
|
}
|
||||||
29
todo.txt
29
todo.txt
@@ -1,27 +1,32 @@
|
|||||||
******************************************************** NEXT PATCH **************************************************
|
******************************************************** NEXT PATCH **************************************************
|
||||||
|
|
||||||
added 2 more classic n-gon dates
|
nematodes now wiggle their tail. it's horrible
|
||||||
|
tech: transdimensional spores renamed transdimensional worms
|
||||||
|
spawns spores -> worms
|
||||||
|
|
||||||
plasma ball
|
missiles:
|
||||||
does 10% more damage
|
20% more ammo
|
||||||
moves 20% faster
|
no longer fire rapidly on crouch
|
||||||
targets mob bullets better
|
instead crouch gives missile initial forward velocity
|
||||||
|
no crouch makes the missiles recoil back before they accelerate forward
|
||||||
|
tech: launch system - fire missiles 500% more rapidly, gives 25% ammo
|
||||||
|
doesn't work with cruse missile
|
||||||
|
tech: ICBM - cruse missile is even bigger and slower
|
||||||
|
|
||||||
standing wave has a 45/60->30/60 second cooldown after blocking a shielded mob
|
pavilion has been added back to the map rotation
|
||||||
but, standing wave now also triggers it's CD on shields that protect groups of mobs
|
this will make the game end at 13 again, and feel harder
|
||||||
|
let me know if it's absence resulted in less NaN game crashes
|
||||||
|
|
||||||
JUNK tech: Mech v4.48 removed
|
reactor sprayBoss is now harder to kill
|
||||||
JUNK tech: cosmogonic myth - opens a random classic version of n-gon in a new tab, after 5 minutes close the tab and spawn 1 of every tech
|
|
||||||
|
|
||||||
bug fixes
|
bug fixes
|
||||||
|
|
||||||
|
|
||||||
******************************************************** TODO ********************************************************
|
******************************************************** TODO ********************************************************
|
||||||
|
|
||||||
bugs: requirement text man discord messages
|
bugs: requirement text man discord messages
|
||||||
|
make sure guns are listed to work with gun tech randomization
|
||||||
|
|
||||||
bring back:
|
bring back:
|
||||||
missiles that fall back and down for a sec after they fire
|
|
||||||
the old phase decoherence field
|
the old phase decoherence field
|
||||||
make cloak only active on input.field down
|
make cloak only active on input.field down
|
||||||
could be a tech
|
could be a tech
|
||||||
@@ -33,6 +38,8 @@ bring back:
|
|||||||
but it does drain some energy
|
but it does drain some energy
|
||||||
tech pilot wave: Bose Einstein condensate - freeze mobs in superposition with pilot wave
|
tech pilot wave: Bose Einstein condensate - freeze mobs in superposition with pilot wave
|
||||||
|
|
||||||
|
tech: plasma drip
|
||||||
|
|
||||||
plasma ball
|
plasma ball
|
||||||
graphics should look more like a real plasma ball
|
graphics should look more like a real plasma ball
|
||||||
gently scale damage with circleRadius
|
gently scale damage with circleRadius
|
||||||
|
|||||||
Reference in New Issue
Block a user