fleas please

tech: colony - sporangium discharge 38% more stuff, but it has a chance to discharge random bullet type
tech: annelids renamed -> K-selection - fleas and worms are bigger and do more damage
tech: anti-shear topology now applies to grenades, shotgun so basically everything that matters
  no longer a "gun tech"
This commit is contained in:
landgreen
2022-07-14 06:47:42 -07:00
parent 4e29a517fc
commit ae5c42e5bd
8 changed files with 183 additions and 193 deletions

View File

@@ -583,7 +583,7 @@ const b = {
v1: null, v1: null,
v2: null v2: null
}; };
if (tech.isPulseAim && input.down) { //find mobs in line of sight if (tech.isPulseAim && !input.down) { //find mobs in line of sight
let dist = 2200 let dist = 2200
for (let i = 0, len = mob.length; i < len; i++) { for (let i = 0, len = mob.length; i < len; i++) {
const newDist = Vector.magnitude(Vector.sub(path[0], mob[i].position)) const newDist = Vector.magnitude(Vector.sub(path[0], mob[i].position))
@@ -861,7 +861,7 @@ const b = {
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)
}); });
bullet[me].endCycle = simulation.cycle + Math.floor(input.down ? 120 : 80); bullet[me].endCycle = simulation.cycle + Math.floor(input.down ? 120 : 80) * tech.isBulletsLastLonger;
bullet[me].restitution = 0.4; bullet[me].restitution = 0.4;
bullet[me].do = function() { bullet[me].do = function() {
this.force.y += this.mass * 0.0025; //extra gravity for harder arcs this.force.y += this.mass * 0.0025; //extra gravity for harder arcs
@@ -885,7 +885,7 @@ const b = {
}); });
Composite.add(engine.world, bullet[me]); //add bullet to world Composite.add(engine.world, bullet[me]); //add bullet to world
bullet[me].endCycle = simulation.cycle + 70; bullet[me].endCycle = simulation.cycle + 70 * tech.isBulletsLastLonger;
bullet[me].frictionAir = 0.07; bullet[me].frictionAir = 0.07;
const MAG = 0.015 const MAG = 0.015
bullet[me].thrust = { bullet[me].thrust = {
@@ -916,7 +916,7 @@ const b = {
y: m.Vy / 2 + speed * Math.sin(angle) y: m.Vy / 2 + speed * Math.sin(angle)
}); });
Composite.add(engine.world, bullet[me]); //add bullet to world Composite.add(engine.world, bullet[me]); //add bullet to world
bullet[me].endCycle = simulation.cycle + 70; bullet[me].endCycle = simulation.cycle + 70 * tech.isBulletsLastLonger;
bullet[me].frictionAir = 0.07; bullet[me].frictionAir = 0.07;
bullet[me].suckCycles = 40 bullet[me].suckCycles = 40
const MAG = 0.015 const MAG = 0.015
@@ -1033,7 +1033,7 @@ const b = {
speed = 35 speed = 35
// speed = input.down ? 43 : 32 // speed = input.down ? 43 : 32
bullet[me].endCycle = simulation.cycle + 70; bullet[me].endCycle = simulation.cycle + 70 * tech.isBulletsLastLonger;
if (input.down) { if (input.down) {
speed += 9 speed += 9
bullet[me].endCycle += 20; bullet[me].endCycle += 20;
@@ -1086,13 +1086,11 @@ const b = {
if (tech.isRPG) this.thrust = { x: 0, y: 0 } if (tech.isRPG) this.thrust = { x: 0, y: 0 }
this.do = this.radiationMode; this.do = this.radiationMode;
} }
const mobCollisions = Matter.Query.collides(this, mob) const mobCollisions = Matter.Query.collides(this, mob)
if (mobCollisions.length) { if (mobCollisions.length) {
onCollide() onCollide()
this.stuckTo = mobCollisions[0].bodyA 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.5, 360) //apply radiation damage status effect on direct hits
if (this.stuckTo.isVerticesChange) { if (this.stuckTo.isVerticesChange) {
this.stuckToRelativePosition = { this.stuckToRelativePosition = {
x: 0, x: 0,
@@ -2715,7 +2713,7 @@ const b = {
thrust: (tech.isSporeFollow ? 0.0012 : 0.00055) * (1 + 0.5 * (Math.random() - 0.5)), thrust: (tech.isSporeFollow ? 0.0012 : 0.00055) * (1 + 0.5 * (Math.random() - 0.5)),
wormSize: wormSize, wormSize: wormSize,
wormTail: 1 + Math.max(4, Math.min(wormSize - 2 * tech.wormSize, 30)), 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 ? 8 : 3.2) * 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",
collisionFilter: { collisionFilter: {
@@ -3021,7 +3019,7 @@ const b = {
// y: m.Vy / 2 + speed * Math.sin(dir) // y: m.Vy / 2 + speed * Math.sin(dir)
// }); // });
}, },
flea(where, velocity, radius = 7 + 3 * Math.random()) { flea(where, velocity, radius = 6 + 3 * Math.random() + 10 * tech.wormSize * Math.random()) {
const me = bullet.length; const me = bullet.length;
bullet[me] = Bodies.polygon(where.x, where.y, 5, radius, { bullet[me] = Bodies.polygon(where.x, where.y, 5, radius, {
isFlea: true, isFlea: true,
@@ -3031,9 +3029,8 @@ const b = {
frictionAir: 0, //0.01, frictionAir: 0, //0.01,
restitution: 0, restitution: 0,
density: 0.0005, // 0.001 is normal density density: 0.0005, // 0.001 is normal density
dmg: 9 * (tech.isMutualism ? 2.5 : 1), //damage done in addition to the damage from momentum //spores do 7 dmg, worms do 18 lookFrequency: 19 + Math.floor(7 * Math.random()),
lookFrequency: 19 + Math.floor(11 * Math.random()), endCycle: simulation.cycle + Math.floor((900 * tech.isBulletsLastLonger + 360 * Math.random()) + Math.max(0, 150 - bullet.length)), // 13 - 19s
endCycle: simulation.cycle + Math.floor((780 * tech.isBulletsLastLonger + 360 * Math.random()) + Math.max(0, 150 - bullet.length)), // 13 - 19s
classType: "bullet", classType: "bullet",
collisionFilter: { collisionFilter: {
category: cat.bullet, category: cat.bullet,
@@ -3043,6 +3040,10 @@ const b = {
lockedOn: null, lockedOn: null,
delay: 50, delay: 50,
cd: simulation.cycle + 10, 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.5 : 1) //damage done in addition to the damage from momentum //spores do 7 dmg, worms do 18
},
beforeDmg(who) { beforeDmg(who) {
// this.endCycle = 0 // this.endCycle = 0
Matter.Body.setVelocity(this, Vector.mult(Vector.normalise(Vector.sub(this.position, who.position)), 10 + 10 * Math.random())); //push away from target Matter.Body.setVelocity(this, Vector.mult(Vector.normalise(Vector.sub(this.position, who.position)), 10 + 10 * Math.random())); //push away from target
@@ -3054,7 +3055,7 @@ const b = {
if (tech.isSpawnBulletsOnDeath && who.alive && who.isDropPowerUp) { if (tech.isSpawnBulletsOnDeath && who.alive && who.isDropPowerUp) {
setTimeout(() => { setTimeout(() => {
if (!who.alive) { if (!who.alive) {
for (let i = 0; i < 3; i++) { //spawn 3 more for (let i = 0; i < 2; i++) { //spawn 2 more
const speed = 10 + 5 * Math.random() const speed = 10 + 5 * Math.random()
const angle = 2 * Math.PI * Math.random() const angle = 2 * Math.PI * Math.random()
b.flea(this.position, { x: speed * Math.cos(angle), y: speed * Math.sin(angle) }) b.flea(this.position, { x: speed * Math.cos(angle), y: speed * Math.sin(angle) })
@@ -3063,8 +3064,15 @@ const b = {
this.endCycle = 0; this.endCycle = 0;
}, 1); }, 1);
} }
setTimeout(() => { this.dmg = 0 })
},
onEnd() {
if (tech.isMutualism && this.isMutualismActive && !tech.isEnergyHealth) {
m.health += 0.01
if (m.health > m.maxHealth) m.health = m.maxHealth;
m.displayHealth();
}
}, },
onEnd() {},
gravity: 0.002 + 0.002 * tech.isSporeFollow, gravity: 0.002 + 0.002 * tech.isSporeFollow,
do() { do() {
// if (true && this.lockedOn && this.cd < simulation.cycle) { //blink towards mobs // if (true && this.lockedOn && this.cd < simulation.cycle) { //blink towards mobs
@@ -3137,11 +3145,17 @@ const b = {
this.force.y = -(0.03 + 0.08 * Math.random()) * this.mass this.force.y = -(0.03 + 0.08 * Math.random()) * this.mass
} }
Matter.Body.setVelocity(this, { x: 0, y: 0 }); Matter.Body.setVelocity(this, { x: 0, y: 0 });
this.setDamage() //after jumping damage is no longer zero
} }
} }
}) })
Composite.add(engine.world, bullet[me]); //add bullet to world Composite.add(engine.world, bullet[me]); //add bullet to world
Matter.Body.setVelocity(bullet[me], velocity); Matter.Body.setVelocity(bullet[me], velocity);
if (tech.isMutualism && m.health > 0.01) {
m.health -= 0.005
m.displayHealth();
bullet[bullet.length - 1].isMutualismActive = true
}
}, },
drone(where = { x: m.pos.x + 30 * Math.cos(m.angle) + 20 * (Math.random() - 0.5), y: m.pos.y + 30 * Math.sin(m.angle) + 20 * (Math.random() - 0.5) }, speed = 1) { drone(where = { x: m.pos.x + 30 * Math.cos(m.angle) + 20 * (Math.random() - 0.5), y: m.pos.y + 30 * Math.sin(m.angle) + 20 * (Math.random() - 0.5) }, speed = 1) {
const me = bullet.length; const me = bullet.length;
@@ -5544,7 +5558,7 @@ const b = {
const me = bullet.length; const me = bullet.length;
bullet[me] = Bodies.rectangle(m.pos.x + 50 * Math.cos(m.angle), m.pos.y + 50 * Math.sin(m.angle), 17, 4, b.fireAttributes(dir)); bullet[me] = Bodies.rectangle(m.pos.x + 50 * Math.cos(m.angle), m.pos.y + 50 * Math.sin(m.angle), 17, 4, b.fireAttributes(dir));
const end = END + Math.random() * 4 const end = END + Math.random() * 4
bullet[me].endCycle = 2 * end + simulation.cycle bullet[me].endCycle = 2 * end * tech.isBulletsLastLonger + simulation.cycle
const speed = 25 * end / END const speed = 25 * end / END
const dirOff = dir + (Math.random() - 0.5) * spread const dirOff = dir + (Math.random() - 0.5) * spread
Matter.Body.setVelocity(bullet[me], { Matter.Body.setVelocity(bullet[me], {
@@ -5644,7 +5658,7 @@ const b = {
x: SPEED * Math.cos(dir), x: SPEED * Math.cos(dir),
y: SPEED * Math.sin(dir) y: SPEED * Math.sin(dir)
}); });
bullet[me].endCycle = simulation.cycle + 40 bullet[me].endCycle = simulation.cycle + 40 * tech.isBulletsLastLonger
bullet[me].minDmgSpeed = 15 bullet[me].minDmgSpeed = 15
if (tech.isShotgunReversed) Matter.Body.setDensity(bullet[me], 0.0016) if (tech.isShotgunReversed) Matter.Body.setDensity(bullet[me], 0.0016)
// bullet[me].restitution = 0.4 // bullet[me].restitution = 0.4
@@ -6312,6 +6326,15 @@ const b = {
ammo: 0, ammo: 0,
ammoPack: 2.6, ammoPack: 2.6,
have: false, have: false,
nameString(suffix = "") {
if (tech.isSporeFlea) {
return `<strong class='color-p' style='letter-spacing: -0.8px;'>flea${suffix}</strong>`
} else if (tech.isSporeWorm) {
return `<strong class='color-p' style='letter-spacing: -0.8px;'>worm${suffix}</strong>`
} else {
return `<strong class='color-p' style='letter-spacing: 2px;'>spore${suffix}</strong>`
}
},
do() {}, do() {},
fire() { fire() {
const me = bullet.length; const me = bullet.length;
@@ -6326,16 +6349,13 @@ const b = {
bullet[me].maxRadius = 30; bullet[me].maxRadius = 30;
bullet[me].restitution = 0.3; bullet[me].restitution = 0.3;
bullet[me].minDmgSpeed = 0; bullet[me].minDmgSpeed = 0;
bullet[me].totalSpores = 8 + 2 * tech.isSporeFreeze * (tech.isSporeWorm ? 0.5 : 1) bullet[me].totalSpores = 8 + 2 * tech.isSporeFreeze + 3 * tech.isSporeZooid
bullet[me].stuck = function() {}; bullet[me].stuck = function() {};
bullet[me].beforeDmg = function() {}; bullet[me].beforeDmg = function() {};
bullet[me].do = function() { bullet[me].do = function() {
function onCollide(that) { function onCollide(that) {
that.collisionFilter.mask = 0; //non collide with everything that.collisionFilter.mask = 0; //non collide with everything
Matter.Body.setVelocity(that, { Matter.Body.setVelocity(that, { x: 0, y: 0 });
x: 0,
y: 0
});
that.do = that.grow; that.do = that.grow;
} }
@@ -6345,10 +6365,7 @@ const b = {
this.stuckTo = mobCollisions[0].bodyA this.stuckTo = mobCollisions[0].bodyA
if (this.stuckTo.isVerticesChange) { if (this.stuckTo.isVerticesChange) {
this.stuckToRelativePosition = { this.stuckToRelativePosition = { x: 0, y: 0 }
x: 0,
y: 0
}
} else { } else {
//find the relative position for when the mob is at angle zero by undoing the mobs rotation //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) this.stuckToRelativePosition = Vector.rotate(Vector.sub(this.position, this.stuckTo.position), -this.stuckTo.angle)
@@ -6432,17 +6449,55 @@ const b = {
}; };
//spawn bullets on end //spawn bullets on end
bullet[me].onEnd = function() { bullet[me].onEnd = function() {
if (tech.isSporeFlea) {
for (let i = 0, len = this.totalSpores * 0.5; i < len; i++) { let count = 0 //used in for loop below
const things = [
() => { //spore
b.spore(this.position)
},
() => { //worm
count++ //count as 2 things
b.worm(this.position)
},
() => { //flea
count++ //count as 2 things
const speed = 10 + 5 * Math.random() const speed = 10 + 5 * Math.random()
const angle = 2 * Math.PI * Math.random() const angle = 2 * Math.PI * Math.random()
b.flea(this.position, { x: speed * Math.cos(angle), y: speed * Math.sin(angle) }) b.flea(this.position, { x: speed * Math.cos(angle), y: speed * Math.sin(angle) })
},
() => { // drones
b.drone(this.position)
},
() => { // ice IX
b.iceIX(1, Math.random() * 2 * Math.PI, this.position)
},
() => { //missile
count++ //count as 2 things
b.missile(this.position, -Math.PI / 2 + 0.5 * (Math.random() - 0.5), 0, 1)
},
() => { //nail
b.targetedNail(this.position, 1, 39 + 6 * Math.random())
},
]
for (len = this.totalSpores; count < len; count++) {
if (tech.isSporeZooid && Math.random() < 0.5) {
things[Math.floor(Math.random() * things.length)]()
} else if (tech.isSporeFlea) {
things[2]()
} else if (tech.isSporeWorm) {
things[1]()
} else {
things[0]() //spores
} }
} else if (tech.isSporeWorm) {
for (let i = 0, len = this.totalSpores * 0.5; i < len; i++) b.worm(this.position)
} else {
for (let i = 0; i < this.totalSpores; i++) b.spore(this.position)
} }
// } else if (tech.isSporeFlea) {
// for (let i = 0, len = this.totalSpores; i < len; i++) things[2]()
// } else if (tech.isSporeWorm) {
// for (let i = 0, len = this.totalSpores; i < len; i++) things[1]()
// } else {
// for (let i = 0; i < this.totalSpores; i++) things[0]()
// }
if (tech.isStun) b.AoEStunEffect(this.position, 600, 270 + 120 * Math.random()); //AoEStunEffect(where, range, cycles = 120 + 60 * Math.random()) { if (tech.isStun) b.AoEStunEffect(this.position, 600, 270 + 120 * Math.random()); //AoEStunEffect(where, range, cycles = 120 + 60 * Math.random()) {
} }
} }
@@ -6721,7 +6776,7 @@ const b = {
} }
} }
} }
b.harpoon(where, input.down ? closest.target : null, m.angle, harpoonSize, false) b.harpoon(where, input.down ? null : closest.target, m.angle, harpoonSize, false)
} }
this.charge = 0; this.charge = 0;

View File

@@ -188,7 +188,7 @@ function collisionChecks(event) {
obj.beforeDmg(mob[k]); //some bullets do actions when they hits things, like despawn //forces don't seem to work here obj.beforeDmg(mob[k]); //some bullets do actions when they hits things, like despawn //forces don't seem to work here
let dmg = m.dmgScale * (obj.dmg + 0.15 * obj.mass * Vector.magnitude(Vector.sub(mob[k].velocity, obj.velocity))) let dmg = m.dmgScale * (obj.dmg + 0.15 * obj.mass * Vector.magnitude(Vector.sub(mob[k].velocity, obj.velocity)))
if (tech.isCrit && mob[k].isStunned) dmg *= 4 if (tech.isCrit && mob[k].isStunned) dmg *= 4
// console.log(dmg) // console.log(dmg) //remove this
mob[k].damage(dmg); mob[k].damage(dmg);
if (mob[k].alive) mob[k].foundPlayer(); if (mob[k].alive) mob[k].foundPlayer();
if (mob[k].damageReduction) { if (mob[k].damageReduction) {

View File

@@ -16,30 +16,27 @@ const level = {
start() { start() {
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.enableConstructMode() //used to build maps in testing mode // simulation.enableConstructMode() //used to build maps in testing mode
// level.difficultyIncrease(8 * 4) //30 is near max on hard //60 is near max on why
// simulation.isHorizontalFlipped = true // simulation.isHorizontalFlipped = true
// m.addHealth(Infinity)
// m.setField("molecular assembler")
// b.giveGuns("spores")
// tech.giveTech("fleas")
// tech.giveTech("flagella")
// b.guns[0].ammo = 10000
// for (let i = 0; i < 1; ++i) tech.giveTech("mycelium manufacturing")
// for (let i = 0; i < 9; ++i) tech.giveTech("WIMPs")
// for (let i = 0; i < 100; ++i) tech.giveTech("nail-bot")
// for (let i = 0; i < 1; ++i) tech.giveTech("necrophage")
// for (let i = 0; i < 1; i++) tech.giveTech("cryodesiccation")
// for (let i = 0; i < 10; i++) powerUps.directSpawn(450, -50, "tech");
// for (let i = 0; i < 10; i++) powerUps.directSpawn(450, -50, "research");
// m.maxHealth = m.health = 100 // m.maxHealth = m.health = 100
// powerUps.research.changeRerolls(100000) // powerUps.research.changeRerolls(100000)
// m.immuneCycle = Infinity //you can't take damage // m.immuneCycle = Infinity //you can't take damage
// powerUps.research.changeRerolls(100) // powerUps.research.changeRerolls(100)
// tech.tech[297].frequency = 100 // tech.tech[297].frequency = 100
// b.guns[0].ammo = 10000
// m.setField("molecular assembler") //molecular assembler time dilation
// b.giveGuns("spores")
// tech.giveTech("K-selection")
// tech.giveTech("fleas")
// tech.giveTech("colony")
// tech.giveTech("mycelium manufacturing")
// for (let i = 0; i < 100; ++i) tech.giveTech("nail-bot")
// for (let i = 0; i < 1; ++i) tech.giveTech("necrophage")
// for (let i = 0; i < 1; i++) tech.giveTech("cryodesiccation")
// for (let i = 0; i < 10; i++) powerUps.directSpawn(450, -50, "tech");
// for (let i = 0; i < 10; i++) powerUps.directSpawn(450, -50, "research");
// spawn.starter(1900, -500, 200) // spawn.starter(1900, -500, 200)
// for (let i = 0; i < 10; ++i) spawn.hopBullet(1900, -500) // for (let i = 0; i < 10; ++i) spawn.hopBullet(1900, -500)
// spawn.hopMomBoss(1900, -500)
// spawn.grenadier(1900, -1450, 10)
// level.difficultyIncrease(8 * 4) //30 is near max on hard //60 is near max on why
// level.testing(); //not in rotation, used for testing // level.testing(); //not in rotation, used for testing
// for (let i = 0; i < 7; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "research"); // for (let i = 0; i < 7; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "research");
// for (let i = 0; i < 4; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "tech"); // for (let i = 0; i < 4; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "tech");

View File

@@ -1181,7 +1181,14 @@ const mobs = {
powerUps.spawnRandomPowerUp(this.position.x, this.position.y); powerUps.spawnRandomPowerUp(this.position.x, this.position.y);
m.lastKillCycle = m.cycle; //tracks the last time a kill was made, mostly used in simulation.checks() m.lastKillCycle = m.cycle; //tracks the last time a kill was made, mostly used in simulation.checks()
if (Math.random() < tech.sporesOnDeath) { if (Math.random() < tech.sporesOnDeath) {
if (tech.isSporeWorm) { if (tech.isSporeFlea) {
const len = Math.min(25, Math.floor(2 + this.mass * (0.5 + 0.5 * Math.random()))) / 2
for (let i = 0; i < len; i++) {
const speed = 10 + 5 * Math.random()
const angle = 2 * Math.PI * Math.random()
b.flea(this.position, { x: speed * Math.cos(angle), y: speed * Math.sin(angle) })
}
} else if (tech.isSporeWorm) {
const len = Math.min(25, Math.floor(2 + this.mass * (0.5 + 0.5 * Math.random()))) / 2 const len = Math.min(25, Math.floor(2 + this.mass * (0.5 + 0.5 * Math.random()))) / 2
for (let i = 0; i < len; i++) b.worm(this.position) for (let i = 0; i < len; i++) b.worm(this.position)
} else { } else {

View File

@@ -555,6 +555,8 @@ const m = {
x: who.velocity.x * 0.5, x: who.velocity.x * 0.5,
y: who.velocity.y * 0.5 y: who.velocity.y * 0.5
}); });
who.endCycle = simulation.cycle + immunityDuration
} else if (tech.isRPG) { } else if (tech.isRPG) {
who.endCycle = simulation.cycle + 10 who.endCycle = simulation.cycle + 10
} else { } else {
@@ -2027,14 +2029,14 @@ const m = {
if (m.energy > m.maxEnergy - 0.02 && m.fieldCDcycle < m.cycle && !input.field && bullet.length < 300 && (m.cycle % 2)) { if (m.energy > m.maxEnergy - 0.02 && m.fieldCDcycle < m.cycle && !input.field && bullet.length < 300 && (m.cycle % 2)) {
if (tech.isSporeField) { if (tech.isSporeField) {
if (tech.isSporeFlea) { if (tech.isSporeFlea) {
const drain = 0.16 + (Math.max(bullet.length, 130) - 130) * 0.02 const drain = 0.15 + (Math.max(bullet.length, 130) - 130) * 0.02
if (m.energy > drain) { if (m.energy > drain) {
m.energy -= drain m.energy -= drain
const speed = m.crouch ? 20 + 8 * Math.random() : 10 + 3 * Math.random() const speed = m.crouch ? 20 + 8 * Math.random() : 10 + 3 * Math.random()
b.flea({ x: m.pos.x + 35 * Math.cos(m.angle), y: m.pos.y + 35 * Math.sin(m.angle) }, { x: speed * Math.cos(m.angle), y: speed * Math.sin(m.angle) }) b.flea({ x: m.pos.x + 35 * Math.cos(m.angle), y: m.pos.y + 35 * Math.sin(m.angle) }, { x: speed * Math.cos(m.angle), y: speed * Math.sin(m.angle) })
} }
} else if (tech.isSporeWorm) { } else if (tech.isSporeWorm) {
const drain = 0.16 + (Math.max(bullet.length, 130) - 130) * 0.02 const drain = 0.15 + (Math.max(bullet.length, 130) - 130) * 0.02
if (m.energy > drain) { if (m.energy > drain) {
m.energy -= drain m.energy -= drain
b.worm({ x: m.pos.x + 35 * Math.cos(m.angle), y: m.pos.y + 35 * Math.sin(m.angle) }) b.worm({ x: m.pos.x + 35 * Math.cos(m.angle), y: m.pos.y + 35 * Math.sin(m.angle) })

View File

@@ -857,7 +857,7 @@ const simulation = {
if (tech.isMutualism && !tech.isEnergyHealth) { if (tech.isMutualism && !tech.isEnergyHealth) {
for (let i = 0; i < bullet.length; i++) { for (let i = 0; i < bullet.length; i++) {
if (bullet[i].isMutualismActive) { if (bullet[i].isMutualismActive) {
m.health += 0.005 + 0.005 * tech.isSporeWorm m.health += 0.005 + 0.005 * (bullet[i].isSpore || bullet[i].isFlea)
if (m.health > m.maxHealth) m.health = m.maxHealth; if (m.health > m.maxHealth) m.health = m.maxHealth;
m.displayHealth(); m.displayHealth();
} }
@@ -878,6 +878,7 @@ const simulation = {
} }
} }
simulation.lastLogTime = 0; //clear previous messages simulation.lastLogTime = 0; //clear previous messages
spawn.allowShields = true;
powerUps.totalPowerUps = powerUp.length powerUps.totalPowerUps = powerUp.length
let holdTarget = (m.holdingTarget) ? m.holdingTarget : undefined //if player is holding something this remembers it before it gets deleted let holdTarget = (m.holdingTarget) ? m.holdingTarget : undefined //if player is holding something this remembers it before it gets deleted
tech.deathSpawnsFromBoss = 0; tech.deathSpawnsFromBoss = 0;

View File

@@ -880,6 +880,26 @@ const tech = {
tech.isCrit = false; tech.isCrit = false;
} }
}, },
{
name: "anti-shear topology",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Topology' class="link">anti-shear topology</a>`,
description: "<strong>+30%</strong> projectile <strong>duration</strong>", //<br><em style = 'font-size: 83%'>drone spore worm flea missile foam wave neutron ice</em>",
isGunTech: true,
maxCount: 3,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return true //m.fieldUpgrades[m.fieldMode].name === "molecular assembler" || tech.haveGunCheck("spores") || tech.haveGunCheck("drones") || tech.haveGunCheck("missiles") || tech.haveGunCheck("foam") || tech.haveGunCheck("matter wave") || tech.isNeutronBomb || tech.isIceField || tech.isIceShot || tech.relayIce || tech.isNeedleIce || tech.blockingIce > 1 || tech.isSporeWorm || tech.isFoamBotUpgrade || tech.isFoamBall
},
requires: "", //drones, spores, missiles, foam, matter wave, neutron bomb, ice IX, flea
effect() {
tech.isBulletsLastLonger += 0.3
},
remove() {
tech.isBulletsLastLonger = 1;
}
},
{ {
name: "thermal runaway", name: "thermal runaway",
description: "after mobs <strong>die</strong><br>they <strong class='color-e'>explode</strong>", description: "after mobs <strong>die</strong><br>they <strong class='color-e'>explode</strong>",
@@ -919,7 +939,8 @@ const tech = {
{ {
name: "zoospore vector", name: "zoospore vector",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Disease_vector' class="link">zoospore vector</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Disease_vector' class="link">zoospore vector</a>`,
description: "after mobs <strong>die</strong><br>they have a <strong>+10%</strong> chance to grow <strong class='color-p' style='letter-spacing: 2px;'>spores</strong>", descriptionFunction() { return `after mobs <strong>die</strong><br>they have a <strong>+10%</strong> chance to grow ${b.guns[6].nameString('s')}` },
// description: "after mobs <strong>die</strong><br>they have a <strong>+10%</strong> chance to grow <strong class='color-p' style='letter-spacing: 2px;'>spores</strong>",
maxCount: 9, maxCount: 9,
count: 0, count: 0,
frequency: 1, frequency: 1,
@@ -5159,7 +5180,7 @@ const tech = {
{ {
name: "mycelial fragmentation", name: "mycelial fragmentation",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Fungus' class="link">mycelial fragmentation</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Fungus' class="link">mycelial fragmentation</a>`,
description: "during their <strong>growth</strong> phase<br><strong class='color-p' style='letter-spacing: 2px;'>sporangium</strong> release <strong>+6</strong> <strong class='color-p' style='letter-spacing: 2px;'>spores</strong>", description: "during their <strong>growth</strong> phase<br><strong>+70%</strong> <strong class='color-p' style='letter-spacing: 2px;'>sporangium</strong> discharge",
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -5176,49 +5197,30 @@ const tech = {
tech.isSporeGrowth = false tech.isSporeGrowth = false
} }
}, },
// {
// name: "tinsellated flagella",
// link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Zoospore#Flagella_types' class="link">tinsellated flagella</a>`,
// description: "<strong class='color-p' style='letter-spacing: 2px;'>sporangium</strong> release <strong>+2</strong> <strong class='color-p' style='letter-spacing: 2px;'>spores</strong><br><strong class='color-p' style='letter-spacing: 2px;'>spores</strong> accelerate <strong>50% faster</strong>",
// isGunTech: true,
// maxCount: 1,
// count: 0,
// frequency: 2,
// frequencyDefault: 2,
// allowed() {
// return tech.haveGunCheck("spores") || tech.sporesOnDeath > 0 || tech.isSporeField
// },
// requires: "spores",
// effect() {
// tech.isFastSpores = true
// },
// remove() {
// tech.isFastSpores = false
// }
// },
{ {
name: "flagella", name: "colony",
description: "<strong>+50%</strong> <strong class='color-p' style='letter-spacing: 2px;'>spores</strong> acceleration<br>if they can't find a target <strong class='color-p' style='letter-spacing: 2px;'>spores</strong> follow you", description: "<strong>+38%</strong> <strong class='color-p' style='letter-spacing: 2px;'>sporangium</strong> discharge<br><strong>38%</strong> chance to discharge something different",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Colony_(biology)' class="link">colony</a>`,
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("spores") || tech.sporesOnDeath > 0 || tech.isSporeField || tech.isSporeWorm || tech.isSporeFlea return tech.haveGunCheck("spores")
}, },
requires: "spores", requires: "spores",
effect() { effect() {
tech.isSporeFollow = true //isSporeFollow tech.isSporeZooid = true
}, },
remove() { remove() {
tech.isSporeFollow = false //isFastSpores tech.isSporeZooid = false
} }
}, },
{ {
name: "cryodesiccation", name: "cryodesiccation",
description: "<strong class='color-p' style='letter-spacing: 2px;'>sporangium</strong> release <strong>2</strong> more <strong class='color-p' style='letter-spacing: 2px;'>spores</strong><br><strong class='color-p' style='letter-spacing: 2px;'>spores</strong> <strong class='color-s'>freeze</strong> mobs for <strong>1.5</strong> second", descriptionFunction() { return `<strong>+25%</strong> <strong class='color-p' style='letter-spacing: 2px;'>sporangium</strong> discharge<br> ${b.guns[6].nameString('s')} <strong class='color-s'>freeze</strong> mobs for <strong>1.5</strong> second` },
// <br><strong class='color-p' style='letter-spacing: 2px;'>spores</strong> do <strong>1/3</strong> <strong class='color-d'>damage</strong> // description: "<strong>+25%</strong> <strong class='color-p' style='letter-spacing: 2px;'>sporangium</strong> discharge<br><strong class='color-p' style='letter-spacing: 2px;'>spores</strong> <strong class='color-s'>freeze</strong> mobs for <strong>1.5</strong> second",
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -5235,28 +5237,30 @@ const tech = {
tech.isSporeFreeze = false tech.isSporeFreeze = false
} }
}, },
// { {
// name: "diplochory", name: "flagella",
// description: "if <strong class='color-p' style='letter-spacing: 2px;'>spores</strong> can't <strong>locate</strong> a viable host<br>they use you for <strong>dispersal</strong>", descriptionFunction() { return `<strong>+50%</strong> ${b.guns[6].nameString()} acceleration<br>if they can't find a target ${b.guns[6].nameString('s')} follow you` },
// isGunTech: true, // description: "<strong>+50%</strong> <strong class='color-p' style='letter-spacing: 2px;'>spore</strong> acceleration<br>if they can't find a target <strong class='color-p' style='letter-spacing: 2px;'>spores</strong> follow you",
// maxCount: 1, isGunTech: true,
// count: 0, maxCount: 1,
// frequency: 2, count: 0,
// frequencyDefault: 2, frequency: 2,
// allowed() { frequencyDefault: 2,
// return tech.haveGunCheck("spores") || tech.sporesOnDeath > 0 || tech.isSporeField || tech.isSporeWorm allowed() {
// }, return tech.haveGunCheck("spores") || tech.sporesOnDeath > 0 || tech.isSporeField || tech.isSporeWorm || tech.isSporeFlea
// requires: "spores", },
// effect() { requires: "spores",
// tech.isSporeFollow = true effect() {
// }, tech.isSporeFollow = true
// remove() { },
// tech.isSporeFollow = false remove() {
// } tech.isSporeFollow = false
// }, }
},
{ {
name: "mutualism", name: "mutualism",
description: "<strong>+150%</strong> <strong class='color-p' style='letter-spacing: 2px;'>spore</strong> <strong class='color-d'>damage</strong><br><strong class='color-p' style='letter-spacing: 2px;'>spores</strong> borrow <strong>0.5</strong> <strong class='color-h'>health</strong> until they <strong>die</strong>", descriptionFunction() { return `<strong>+150%</strong> ${b.guns[6].nameString()} <strong class='color-d'>damage</strong><br>${b.guns[6].nameString('s')} borrow <strong>0.5</strong> <strong class='color-h'>health</strong> until they <strong>die</strong>` },
// description: `<strong>+150%</strong> ${b.guns[6].name()} <strong class='color-d'>damage</strong><br><strong class='color-p' style='letter-spacing: 2px;'>spores</strong> borrow <strong>0.5</strong> <strong class='color-h'>health</strong> until they <strong>die</strong>`,
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -5275,7 +5279,7 @@ const tech = {
}, },
{ {
name: "fleas", name: "fleas",
description: "<strong class='color-p' style='letter-spacing: 2px;'>sporangium</strong> hatch <strong class='color-p' style='letter-spacing: -0.8px;'>fleas</strong><br><strong class='color-p' style='letter-spacing: 2px;'>spore</strong> <strong class='color-m'>tech</strong> applies to <strong class='color-p' style='letter-spacing: -0.8px;'>fleas</strong>", description: "<strong class='color-p' style='letter-spacing: 2px;'>sporangium</strong> hatch <strong class='color-p' style='letter-spacing: -0.8px;'>fleas</strong>", //<br><strong class='color-p' style='letter-spacing: 2px;'>spore</strong> <strong class='color-m'>tech</strong> applies to <strong class='color-p' style='letter-spacing: -0.8px;'>fleas</strong>
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -5293,38 +5297,9 @@ const tech = {
} }
}, },
// ammoBonus: 8,
// effect() {
// tech.isRailGun = true;
// for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
// if (b.guns[i].name === "harpoon") {
// b.guns[i].chooseFireMethod()
// b.guns[i].ammoPack = this.ammoBonus;
// b.guns[i].ammo = b.guns[i].ammo * this.ammoBonus;
// simulation.updateGunHUD();
// break
// }
// }
// },
// remove() {
// if (tech.isRailGun) {
// tech.isRailGun = false;
// for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
// if (b.guns[i].name === "harpoon") {
// b.guns[i].chooseFireMethod()
// b.guns[i].ammoPack = 0.6;
// b.guns[i].ammo = Math.ceil(b.guns[i].ammo / this.ammoBonus);
// simulation.updateGunHUD();
// break
// }
// }
// }
// }
{ {
name: "nematodes", name: "nematodes",
description: "<strong>shotgun</strong> and <strong class='color-p' style='letter-spacing: 2px;'>sporangium</strong> hatch <strong class='color-p' style='letter-spacing: -0.8px;'>worms</strong><br><strong class='color-p' style='letter-spacing: 2px;'>spore</strong> <strong class='color-m'>tech</strong> applies to <strong class='color-p' style='letter-spacing: -0.8px;'>worms</strong>", description: "<strong>shotgun</strong> and <strong class='color-p' style='letter-spacing: 2px;'>sporangium</strong> hatch <strong class='color-p' style='letter-spacing: -0.8px;'>worms</strong>", //<br><strong class='color-p' style='letter-spacing: 2px;'>spore</strong> <strong class='color-m'>tech</strong> applies to <strong class='color-p' style='letter-spacing: -0.8px;'>worms</strong>
isGunTech: true, isGunTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -5342,17 +5317,17 @@ const tech = {
} }
}, },
{ {
name: "annelids", name: "K-selection",
description: "<strong>+37%</strong> <strong class='color-p' style='letter-spacing: -0.8px;'>worm</strong> size and <strong class='color-d'>damage</strong>", description: "<strong>+37%</strong> size and <strong class='color-d'>damage</strong><br>for <strong class='color-p' style='letter-spacing: -0.8px;'>worms</strong> and <strong class='color-p' style='letter-spacing: -0.8px;'>fleas</strong>",
isGunTech: true, isGunTech: true,
maxCount: 3, maxCount: 3,
count: 0, count: 0,
frequency: 3, frequency: 3,
frequencyDefault: 3, frequencyDefault: 3,
allowed() { allowed() {
return tech.isSporeWorm return tech.isSporeWorm || tech.isSporeFlea
}, },
requires: "spores, shotgun, worms", requires: "spores, shotgun, worms, fleas",
effect() { effect() {
tech.wormSize++ tech.wormSize++
}, },
@@ -5379,26 +5354,6 @@ const tech = {
tech.isDronesTravel = false tech.isDronesTravel = false
} }
}, },
{
name: "anti-shear topology",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Topology' class="link">anti-shear topology</a>`,
description: "<strong>+30%</strong> projectile <strong>duration</strong><br><em style = 'font-size: 83%'>drone spore worm flea missile foam wave neutron ice</em>",
isGunTech: true,
maxCount: 3,
count: 0,
frequency: 2,
frequencyDefault: 2,
allowed() {
return m.fieldUpgrades[m.fieldMode].name === "molecular assembler" || tech.haveGunCheck("spores") || tech.haveGunCheck("drones") || tech.haveGunCheck("missiles") || tech.haveGunCheck("foam") || tech.haveGunCheck("matter wave") || tech.isNeutronBomb || tech.isIceField || tech.isIceShot || tech.relayIce || tech.isNeedleIce || tech.blockingIce > 1 || tech.isSporeWorm || tech.isFoamBotUpgrade || tech.isFoamBall
},
requires: "drones, spores, missiles, foam, matter wave, neutron bomb, ice IX, flea",
effect() {
tech.isBulletsLastLonger += 0.3
},
remove() {
tech.isBulletsLastLonger = 1;
}
},
{ {
name: "reduced tolerances", name: "reduced tolerances",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Engineering_tolerance' class="link">reduced tolerances</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Engineering_tolerance' class="link">reduced tolerances</a>`,
@@ -6865,8 +6820,8 @@ const tech = {
{ {
name: "mycelium manufacturing", name: "mycelium manufacturing",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Mycelium' class="link">mycelium manufacturing</a>`, link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Mycelium' class="link">mycelium manufacturing</a>`,
description: `use ${powerUps.orb.research(1)}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 ${powerUps.orb.research(1)}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>", descriptionFunction() { return `use ${powerUps.orb.research(1)}to repurpose <strong>molecular assembler</strong><br>excess <strong class='color-f'>energy</strong> used to grow ${b.guns[6].nameString('s')}` },
isFieldTech: true, isFieldTech: true,
maxCount: 1, maxCount: 1,
count: 0, count: 0,
@@ -10524,5 +10479,6 @@ const tech = {
isPhononBlock: null, isPhononBlock: null,
isMicroTransactions: null, isMicroTransactions: null,
isLaserLens: null, isLaserLens: null,
laserCrit: null laserCrit: null,
isSporeZooid: null,
} }

View File

@@ -1,21 +1,10 @@
******************************************************** NEXT PATCH ************************************************** ******************************************************** NEXT PATCH **************************************************
tech: fleas - replace spores with little hoppers
frame-dragging - time dilation field stops time when you aren't moving or firing, +33% defense tech: colony - sporangium discharge 38% more stuff, but it has a chance to discharge random bullet type
the odds of finding this tech is low because I find it kinda annoying, but maybe you will like it tech: annelids renamed -> K-selection - fleas and worms are bigger and do more damage
tech: anti-shear topology now applies to grenades, shotgun so basically everything that matters
molecular assembler field energy meter is yellow no longer a "gun tech"
wormhole is lavender
perfect diamagnetism is blue
time dilation is green blue
pilot wave is black
new room in labs: hopBossMom
harpoon now auto targets by default, but disabled when crouched
pulse + neocognitron auto targeting also disabled when crouched
bug fixes
*********************************************************** TODO ***************************************************** *********************************************************** TODO *****************************************************
@@ -24,25 +13,8 @@ fleas
zero velocity while on short delay? try it? zero velocity while on short delay? try it?
flea tech: flea tech:
add a delay to flea jumping also +dmg add a delay to flea jumping also +dmg
reduce lifespan after hitting mob, like drones
but add in a long cooldown after a hit
mid flight attraction towards nearby mobs?
if close to mob and line of sight: set isAttached flag = true
draw a line to mob, attraction
reset isAttached to false after: 1-2s or distance gets too big
tech for shotgun?
anti-shear topology apply to grenades too? and other less useful bullets molecular fabricator defaults to random type on game load
then open up tech requirements
menagerie: sporangium release a variety of things
spores, worms, hoppers, drones, iceIX?, foam?, missiles?
benefit: they release more stuff than normal
swim through slime
hold up to float while in slime?
level element: exploding barrels
improve mob invincible graphic improve mob invincible graphic
opacity oscillates from 100% to 0%? opacity oscillates from 100% to 0%?