hammer + nail
pneumatic hammer (20 -> +18% size and damage effects) now applies to nails, slugs, needles, in addition to rivets integrated armament 20->25% damage, also if you switch guns converts guntech to new gun backward induction removed symbiosis removes 1 -> 0.5 max health per mob kill plasma jet - costs 1 -> 2 research, and goes a bit farther Occam's razor gives 36 -> 40% damage per removed tech
This commit is contained in:
169
js/bullet.js
169
js/bullet.js
@@ -157,6 +157,39 @@ const b = {
|
|||||||
}
|
}
|
||||||
simulation.makeGunHUD();
|
simulation.makeGunHUD();
|
||||||
b.setFireCD();
|
b.setFireCD();
|
||||||
|
if (tech.isOneGun && b.inventory > 0) {
|
||||||
|
//count how many gun tech you have and remove them
|
||||||
|
let gunTechCount = 0 //2 bonus gun tech
|
||||||
|
for (let i = 0, len = tech.tech.length; i < len; i++) {
|
||||||
|
if (tech.tech[i].isGunTech && tech.tech[i].count > 0 && !tech.tech[i].isNonRefundable && !tech.tech[i].isRemoveGun) {
|
||||||
|
const remove = tech.removeTech(i)
|
||||||
|
// console.log(remove, tech.tech[i].count, tech.tech[i].name)
|
||||||
|
gunTechCount += remove
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// console.log(gunTechCount)
|
||||||
|
|
||||||
|
//get a random gun tech for your gun
|
||||||
|
for (let i = 0; i < gunTechCount; i++) {
|
||||||
|
const gunTechPool = []
|
||||||
|
for (let j = 0, len = tech.tech.length; j < len; j++) {
|
||||||
|
if (tech.tech[j].isGunTech && tech.tech[j].allowed() && !tech.tech[i].isRemoveGun && !tech.tech[j].isJunk && !tech.tech[j].isBadRandomOption && tech.tech[j].count < tech.tech[j].maxCount) {
|
||||||
|
const regex = tech.tech[j].requires.search(b.guns[b.activeGun].name) //get string index of gun name
|
||||||
|
const not = tech.tech[j].requires.search(' not ') //get string index of ' not '
|
||||||
|
//look for the gun name in the requirements, but the gun name needs to show up before the word ' not '
|
||||||
|
if (regex !== -1 && (not === -1 || not > regex)) gunTechPool.push(j)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (gunTechPool.length) {
|
||||||
|
const index = Math.floor(Math.random() * gunTechPool.length)
|
||||||
|
tech.giveTech(gunTechPool[index]) // choose from the gun pool
|
||||||
|
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[gunTechPool[index]].name}</span>")`)
|
||||||
|
} else {
|
||||||
|
tech.giveTech() //get normal tech if you can't find any gun tech
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
},
|
},
|
||||||
removeGun(gun, isRemoveSelection = false) {
|
removeGun(gun, isRemoveSelection = false) {
|
||||||
for (let i = 0; i < b.guns.length; i++) {
|
for (let i = 0; i < b.guns.length; i++) {
|
||||||
@@ -1111,7 +1144,7 @@ const b = {
|
|||||||
b.guns[gunIndex].do = function() {}
|
b.guns[gunIndex].do = function() {}
|
||||||
} else {
|
} else {
|
||||||
if (gunIndex) b.guns[gunIndex].do = function() {
|
if (gunIndex) b.guns[gunIndex].do = function() {
|
||||||
if (!input.field) {
|
if (!input.field && input.down) {
|
||||||
const cycles = 80
|
const cycles = 80
|
||||||
const speed = input.down ? 35 : 20 //input.down ? 43 : 32
|
const speed = input.down ? 35 : 20 //input.down ? 43 : 32
|
||||||
const g = input.down ? 0.137 : 0.135
|
const g = input.down ? 0.137 : 0.135
|
||||||
@@ -1137,7 +1170,7 @@ const b = {
|
|||||||
} else if (tech.isVacuumBomb) {
|
} else if (tech.isVacuumBomb) {
|
||||||
b.grenade = grenadeVacuum
|
b.grenade = grenadeVacuum
|
||||||
if (gunIndex) b.guns[gunIndex].do = function() {
|
if (gunIndex) b.guns[gunIndex].do = function() {
|
||||||
if (!input.field) {
|
if (!input.field && input.down) {
|
||||||
const cycles = Math.floor(input.down ? 50 : 30) //30
|
const cycles = Math.floor(input.down ? 50 : 30) //30
|
||||||
const speed = input.down ? 44 : 35
|
const speed = input.down ? 44 : 35
|
||||||
const v = { x: speed * Math.cos(m.angle), y: speed * Math.sin(m.angle) }
|
const v = { x: speed * Math.cos(m.angle), y: speed * Math.sin(m.angle) }
|
||||||
@@ -1154,7 +1187,7 @@ const b = {
|
|||||||
} else {
|
} else {
|
||||||
b.grenade = grenadeDefault
|
b.grenade = grenadeDefault
|
||||||
if (gunIndex) b.guns[gunIndex].do = function() {
|
if (gunIndex) b.guns[gunIndex].do = function() {
|
||||||
if (!input.field) {
|
if (!input.field && input.down) {
|
||||||
const cycles = Math.floor(input.down ? 120 : 80) //30
|
const cycles = Math.floor(input.down ? 120 : 80) //30
|
||||||
const speed = input.down ? 43 : 32
|
const speed = input.down ? 43 : 32
|
||||||
const v = { x: speed * Math.cos(m.angle), y: speed * Math.sin(m.angle) } //m.Vy / 2 + removed to make the path less jerky
|
const v = { x: speed * Math.cos(m.angle), y: speed * Math.sin(m.angle) } //m.Vy / 2 + removed to make the path less jerky
|
||||||
@@ -1738,7 +1771,7 @@ const b = {
|
|||||||
m.energy = 0;
|
m.energy = 0;
|
||||||
}
|
}
|
||||||
b.isExtruderOn = true
|
b.isExtruderOn = true
|
||||||
const SPEED = 8 + 8 * tech.isPlasmaRange
|
const SPEED = 8 + 12 * tech.isPlasmaRange
|
||||||
const me = bullet.length;
|
const me = bullet.length;
|
||||||
const where = Vector.add(m.pos, player.velocity)
|
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, {
|
bullet[me] = Bodies.polygon(where.x + 20 * Math.cos(m.angle), where.y + 20 * Math.sin(m.angle), 4, 0.01, {
|
||||||
@@ -3253,8 +3286,9 @@ const b = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
nail(pos, velocity, dmg = 1) {
|
nail(pos, velocity, dmg = 1) {
|
||||||
|
dmg *= tech.nailSize
|
||||||
const me = bullet.length;
|
const me = bullet.length;
|
||||||
bullet[me] = Bodies.rectangle(pos.x, pos.y, 25, 2, b.fireAttributes(Math.atan2(velocity.y, velocity.x)));
|
bullet[me] = Bodies.rectangle(pos.x, pos.y, 25 * tech.nailSize, 2 * tech.nailSize, b.fireAttributes(Math.atan2(velocity.y, velocity.x)));
|
||||||
Matter.Body.setVelocity(bullet[me], velocity);
|
Matter.Body.setVelocity(bullet[me], velocity);
|
||||||
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 + 60 + 18 * Math.random();
|
bullet[me].endCycle = simulation.cycle + 60 + 18 * Math.random();
|
||||||
@@ -3269,7 +3303,7 @@ const b = {
|
|||||||
},
|
},
|
||||||
needle(angle = m.angle) {
|
needle(angle = m.angle) {
|
||||||
const me = bullet.length;
|
const me = bullet.length;
|
||||||
bullet[me] = Bodies.rectangle(m.pos.x + 40 * Math.cos(m.angle), m.pos.y + 40 * Math.sin(m.angle), 75, 0.75, b.fireAttributes(angle));
|
bullet[me] = Bodies.rectangle(m.pos.x + 40 * Math.cos(m.angle), m.pos.y + 40 * Math.sin(m.angle), 75 * tech.nailSize, 0.75 * tech.nailSize, b.fireAttributes(angle));
|
||||||
bullet[me].collisionFilter.mask = tech.isShieldPierce ? cat.body : cat.body | cat.mobShield
|
bullet[me].collisionFilter.mask = tech.isShieldPierce ? cat.body : cat.body | cat.mobShield
|
||||||
Matter.Body.setDensity(bullet[me], 0.00001); //0.001 is normal
|
Matter.Body.setDensity(bullet[me], 0.00001); //0.001 is normal
|
||||||
bullet[me].endCycle = simulation.cycle + 100;
|
bullet[me].endCycle = simulation.cycle + 100;
|
||||||
@@ -3289,12 +3323,12 @@ const b = {
|
|||||||
}
|
}
|
||||||
if (!immune) {
|
if (!immune) {
|
||||||
if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.94) {
|
if (tech.isNailCrit && !who.shield && Vector.dot(Vector.normalise(Vector.sub(who.position, this.position)), Vector.normalise(this.velocity)) > 0.94) {
|
||||||
b.explosion(this.position, 220 + 50 * Math.random()); //makes bullet do explosive damage at end
|
b.explosion(this.position, 220 * tech.nailSize + 50 * Math.random()); //makes bullet do explosive damage at end
|
||||||
}
|
}
|
||||||
this.immuneList.push(who.id) //remember that this needle has hit this mob once already
|
this.immuneList.push(who.id) //remember that this needle has hit this mob once already
|
||||||
let dmg = b.dmgScale * 6
|
let dmg = b.dmgScale * 6 * tech.nailSize
|
||||||
if (tech.isNailRadiation) {
|
if (tech.isNailRadiation) {
|
||||||
mobs.statusDoT(who, tech.isFastRadiation ? 6 : 2, tech.isSlowRadiation ? 360 : (tech.isFastRadiation ? 60 : 180)) // one tick every 30 cycles
|
mobs.statusDoT(who, (tech.isFastRadiation ? 6 : 2) * tech.nailSize, tech.isSlowRadiation ? 360 : (tech.isFastRadiation ? 60 : 180)) // one tick every 30 cycles
|
||||||
dmg *= 0.25
|
dmg *= 0.25
|
||||||
}
|
}
|
||||||
if (tech.isCrit && who.isStunned) dmg *= 4
|
if (tech.isCrit && who.isStunned) dmg *= 4
|
||||||
@@ -4364,7 +4398,7 @@ const b = {
|
|||||||
m.fireCDcycle = m.cycle + Math.floor((input.down ? 25 : 17) * b.fireCDscale); // cool down
|
m.fireCDcycle = m.cycle + Math.floor((input.down ? 25 : 17) * b.fireCDscale); // cool down
|
||||||
|
|
||||||
const me = bullet.length;
|
const me = bullet.length;
|
||||||
const size = tech.rivetSize * 8
|
const size = tech.nailSize * 8
|
||||||
bullet[me] = Bodies.rectangle(m.pos.x + 35 * Math.cos(m.angle), m.pos.y + 35 * Math.sin(m.angle), 5 * size, size, b.fireAttributes(m.angle));
|
bullet[me] = Bodies.rectangle(m.pos.x + 35 * Math.cos(m.angle), m.pos.y + 35 * Math.sin(m.angle), 5 * size, size, b.fireAttributes(m.angle));
|
||||||
bullet[me].dmg = tech.isNailRadiation ? 0 : 2.75
|
bullet[me].dmg = tech.isNailRadiation ? 0 : 2.75
|
||||||
Matter.Body.setDensity(bullet[me], 0.002);
|
Matter.Body.setDensity(bullet[me], 0.002);
|
||||||
@@ -4427,7 +4461,7 @@ const b = {
|
|||||||
m.fireCDcycle = m.cycle + Math.floor(CD * b.fireCDscale); // cool down
|
m.fireCDcycle = m.cycle + Math.floor(CD * b.fireCDscale); // cool down
|
||||||
|
|
||||||
const me = bullet.length;
|
const me = bullet.length;
|
||||||
const size = tech.rivetSize * 8
|
const size = tech.nailSize * 8
|
||||||
bullet[me] = Bodies.rectangle(m.pos.x + 35 * Math.cos(m.angle), m.pos.y + 35 * Math.sin(m.angle), 5 * size, size, b.fireAttributes(m.angle));
|
bullet[me] = Bodies.rectangle(m.pos.x + 35 * Math.cos(m.angle), m.pos.y + 35 * Math.sin(m.angle), 5 * size, size, b.fireAttributes(m.angle));
|
||||||
bullet[me].dmg = tech.isNailRadiation ? 0 : 2.75
|
bullet[me].dmg = tech.isNailRadiation ? 0 : 2.75
|
||||||
Matter.Body.setDensity(bullet[me], 0.002);
|
Matter.Body.setDensity(bullet[me], 0.002);
|
||||||
@@ -4557,15 +4591,15 @@ const b = {
|
|||||||
|
|
||||||
if (tech.isSlugShot) {
|
if (tech.isSlugShot) {
|
||||||
const me = bullet.length;
|
const me = bullet.length;
|
||||||
const dir = m.angle + 0.02 * (Math.random() - 0.5)
|
// const dir = m.angle + 0.02 * (Math.random() - 0.5)
|
||||||
bullet[me] = Bodies.rectangle(m.pos.x + 35 * Math.cos(m.angle), m.pos.y + 35 * Math.sin(m.angle), 60, 27, b.fireAttributes(dir));
|
bullet[me] = Bodies.rectangle(m.pos.x + 35 * Math.cos(m.angle), m.pos.y + 35 * Math.sin(m.angle), 60 * tech.nailSize, 27 * tech.nailSize, b.fireAttributes(m.angle));
|
||||||
|
|
||||||
Matter.Body.setDensity(bullet[me], 0.007 * (tech.isShotgunReversed ? 1.6 : 1));
|
Matter.Body.setDensity(bullet[me], 0.007 * (tech.isShotgunReversed ? 1.6 : 1));
|
||||||
Composite.add(engine.world, bullet[me]); //add bullet to world
|
Composite.add(engine.world, bullet[me]); //add bullet to world
|
||||||
const SPEED = (input.down ? 45 : 35) + Math.random() * 6
|
const SPEED = (input.down ? 50 : 37)
|
||||||
Matter.Body.setVelocity(bullet[me], {
|
Matter.Body.setVelocity(bullet[me], {
|
||||||
x: SPEED * Math.cos(dir),
|
x: SPEED * Math.cos(m.angle),
|
||||||
y: SPEED * Math.sin(dir)
|
y: SPEED * Math.sin(m.angle)
|
||||||
});
|
});
|
||||||
if (tech.isIncendiary) {
|
if (tech.isIncendiary) {
|
||||||
bullet[me].endCycle = simulation.cycle + 60
|
bullet[me].endCycle = simulation.cycle + 60
|
||||||
@@ -4581,27 +4615,22 @@ const b = {
|
|||||||
bullet[me].minDmgSpeed = 7
|
bullet[me].minDmgSpeed = 7
|
||||||
// bullet[me].restitution = 0.4
|
// bullet[me].restitution = 0.4
|
||||||
bullet[me].frictionAir = 0.006;
|
bullet[me].frictionAir = 0.006;
|
||||||
|
bullet[me].turnMag = 0.04 * Math.pow(tech.nailSize, 3.75)
|
||||||
bullet[me].do = function() {
|
bullet[me].do = function() {
|
||||||
this.force.y += this.mass * 0.0022
|
this.force.y += this.mass * 0.0022
|
||||||
|
if (this.speed > 6) { //rotates bullet to face current velocity?
|
||||||
//rotates bullet to face current velocity?
|
const facing = { x: Math.cos(this.angle), y: Math.sin(this.angle) }
|
||||||
if (this.speed > 6) {
|
|
||||||
const facing = {
|
|
||||||
x: Math.cos(this.angle),
|
|
||||||
y: Math.sin(this.angle)
|
|
||||||
}
|
|
||||||
const mag = 0.04
|
|
||||||
if (Vector.cross(Vector.normalise(this.velocity), facing) < 0) {
|
if (Vector.cross(Vector.normalise(this.velocity), facing) < 0) {
|
||||||
this.torque += mag
|
this.torque += this.turnMag
|
||||||
} else {
|
} else {
|
||||||
this.torque -= mag
|
this.torque -= this.turnMag
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (tech.fragments) {
|
if (tech.fragments) {
|
||||||
bullet[me].beforeDmg = function() {
|
bullet[me].beforeDmg = function() {
|
||||||
if (this.speed > 4) {
|
if (this.speed > 4) {
|
||||||
b.targetedNail(this.position, tech.fragments * 7)
|
b.targetedNail(this.position, 7 * tech.fragments * tech.nailSize)
|
||||||
this.endCycle = 0 //triggers despawn
|
this.endCycle = 0 //triggers despawn
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -6507,47 +6536,47 @@ const b = {
|
|||||||
// },
|
// },
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
gunRewind: { //this gun is added with a tech
|
// gunRewind: { //this gun is added with a tech
|
||||||
name: "CPT gun",
|
// name: "CPT gun",
|
||||||
description: "use <strong class='color-f'>energy</strong> to <strong>rewind</strong> your <strong class='color-h'>health</strong>, <strong>velocity</strong>,<br> and <strong>position</strong> up to <strong>10</strong> seconds",
|
// description: "use <strong class='color-f'>energy</strong> to <strong>rewind</strong> your <strong class='color-h'>health</strong>, <strong>velocity</strong>,<br> and <strong>position</strong> up to <strong>10</strong> seconds",
|
||||||
ammo: 0,
|
// ammo: 0,
|
||||||
ammoPack: Infinity,
|
// ammoPack: Infinity,
|
||||||
have: false,
|
// have: false,
|
||||||
isRewinding: false,
|
// isRewinding: false,
|
||||||
lastFireCycle: 0,
|
// lastFireCycle: 0,
|
||||||
holdCount: 0,
|
// holdCount: 0,
|
||||||
activeGunIndex: null,
|
// activeGunIndex: null,
|
||||||
do() {},
|
// do() {},
|
||||||
fire() {
|
// fire() {
|
||||||
if (this.lastFireCycle === m.cycle - 1) { //button has been held down
|
// if (this.lastFireCycle === m.cycle - 1) { //button has been held down
|
||||||
this.rewindCount += 8;
|
// this.rewindCount += 8;
|
||||||
const DRAIN = 0.01
|
// const DRAIN = 0.01
|
||||||
let history = m.history[(m.cycle - this.rewindCount) % 600]
|
// let history = m.history[(m.cycle - this.rewindCount) % 600]
|
||||||
if (this.rewindCount > 599 || m.energy < DRAIN || history.activeGun !== this.activeGunIndex) {
|
// if (this.rewindCount > 599 || m.energy < DRAIN || history.activeGun !== this.activeGunIndex) {
|
||||||
this.rewindCount = 0;
|
// this.rewindCount = 0;
|
||||||
m.resetHistory();
|
// m.resetHistory();
|
||||||
m.fireCDcycle = m.cycle + Math.floor(120 * b.fireCDscale); // cool down
|
// m.fireCDcycle = m.cycle + Math.floor(120 * b.fireCDscale); // cool down
|
||||||
} else {
|
// } else {
|
||||||
m.energy -= DRAIN
|
// m.energy -= DRAIN
|
||||||
if (m.immuneCycle < m.cycle + 30) m.immuneCycle = m.cycle + 30; //player is immune to damage for 5 cycles
|
// if (m.immuneCycle < m.cycle + 30) m.immuneCycle = m.cycle + 30; //player is immune to damage for 5 cycles
|
||||||
Matter.Body.setPosition(player, history.position);
|
// Matter.Body.setPosition(player, history.position);
|
||||||
Matter.Body.setVelocity(player, { x: history.velocity.x, y: history.velocity.y });
|
// Matter.Body.setVelocity(player, { x: history.velocity.x, y: history.velocity.y });
|
||||||
if (m.health !== history.health) {
|
// if (m.health !== history.health) {
|
||||||
m.health = history.health
|
// m.health = history.health
|
||||||
m.displayHealth();
|
// m.displayHealth();
|
||||||
}
|
// }
|
||||||
m.yOff = history.yOff
|
// m.yOff = history.yOff
|
||||||
if (m.yOff < 48) {
|
// if (m.yOff < 48) {
|
||||||
m.doCrouch()
|
// m.doCrouch()
|
||||||
} else {
|
// } else {
|
||||||
m.undoCrouch()
|
// m.undoCrouch()
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
} else { //button is held the first time
|
// } else { //button is held the first time
|
||||||
this.rewindCount = 0;
|
// this.rewindCount = 0;
|
||||||
this.activeGunIndex = b.activeGun
|
// this.activeGunIndex = b.activeGun
|
||||||
}
|
// }
|
||||||
this.lastFireCycle = m.cycle;
|
// this.lastFireCycle = m.cycle;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
};
|
};
|
||||||
@@ -232,15 +232,15 @@ function collisionChecks(event) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//determine if player is on the ground
|
//determine if player is on the ground
|
||||||
Events.on(engine, "collisionStart", function (event) {
|
Events.on(engine, "collisionStart", function(event) {
|
||||||
playerOnGroundCheck(event);
|
playerOnGroundCheck(event);
|
||||||
// playerHeadCheck(event);
|
// playerHeadCheck(event);
|
||||||
if (m.alive) collisionChecks(event);
|
if (m.alive) collisionChecks(event);
|
||||||
});
|
});
|
||||||
Events.on(engine, "collisionActive", function (event) {
|
Events.on(engine, "collisionActive", function(event) {
|
||||||
playerOnGroundCheck(event);
|
playerOnGroundCheck(event);
|
||||||
// playerHeadCheck(event);
|
// playerHeadCheck(event);
|
||||||
});
|
});
|
||||||
Events.on(engine, "collisionEnd", function (event) {
|
Events.on(engine, "collisionEnd", function(event) {
|
||||||
playerOffGroundCheck(event);
|
playerOffGroundCheck(event);
|
||||||
});
|
});
|
||||||
37
js/level.js
37
js/level.js
@@ -17,10 +17,10 @@ const level = {
|
|||||||
// level.difficultyIncrease(30) //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
|
||||||
// simulation.isHorizontalFlipped = true
|
// simulation.isHorizontalFlipped = true
|
||||||
// m.setField("wormhole")
|
// m.setField("wormhole")
|
||||||
// b.giveGuns("laser")
|
// b.giveGuns("shotgun")
|
||||||
// b.giveGuns("nail gun")
|
// b.giveGuns("nail gun")
|
||||||
// b.giveGuns("harpoon")
|
// b.giveGuns("harpoon")
|
||||||
// tech.giveTech("affine connection")
|
// tech.giveTech("slug")
|
||||||
// tech.giveTech("regression")
|
// tech.giveTech("regression")
|
||||||
// tech.giveTech("relativistic momentum")
|
// tech.giveTech("relativistic momentum")
|
||||||
// for (let i = 0; i < 2; i++) tech.giveTech("refractory metal")
|
// for (let i = 0; i < 2; i++) tech.giveTech("refractory metal")
|
||||||
@@ -58,7 +58,6 @@ const level = {
|
|||||||
// for (let i = 0; i < 30; i++) powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "tech", false);
|
// for (let i = 0; i < 30; i++) powerUps.spawn(player.position.x + Math.random() * 50, player.position.y - Math.random() * 50, "tech", false);
|
||||||
// for (let i = 0; i < 3; i++) tech.giveTech("undefined")
|
// for (let i = 0; i < 3; i++) tech.giveTech("undefined")
|
||||||
// lore.techCount = 3
|
// lore.techCount = 3
|
||||||
|
|
||||||
// simulation.isCheating = false //true;
|
// simulation.isCheating = false //true;
|
||||||
// localSettings.loreCount = 3; //this sets what conversation is heard
|
// localSettings.loreCount = 3; //this sets what conversation is heard
|
||||||
// localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
|
// localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
|
||||||
@@ -131,8 +130,8 @@ const level = {
|
|||||||
// for (let i = 0; i < 2; i++) powerUps.spawn(player.position.x + 90 * (Math.random() - 0.5), player.position.y + 90 * (Math.random() - 0.5), "tech", false); //start
|
// for (let i = 0; i < 2; i++) powerUps.spawn(player.position.x + 90 * (Math.random() - 0.5), player.position.y + 90 * (Math.random() - 0.5), "tech", false); //start
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
custom() { },
|
custom() {},
|
||||||
customTopLayer() { },
|
customTopLayer() {},
|
||||||
setDifficulty() {
|
setDifficulty() {
|
||||||
simulation.difficulty = 0
|
simulation.difficulty = 0
|
||||||
b.dmgScale = 1; //damage done by player decreases each level
|
b.dmgScale = 1; //damage done by player decreases each level
|
||||||
@@ -574,7 +573,7 @@ const level = {
|
|||||||
body[body.length] = rotor1
|
body[body.length] = rotor1
|
||||||
body[body.length] = rotor2
|
body[body.length] = rotor2
|
||||||
|
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
rotor.collisionFilter.category = cat.body;
|
rotor.collisionFilter.category = cat.body;
|
||||||
rotor.collisionFilter.mask = cat.body | cat.player | cat.bullet | cat.mob | cat.mobBullet //| cat.map
|
rotor.collisionFilter.mask = cat.body | cat.player | cat.bullet | cat.mob | cat.mobBullet //| cat.map
|
||||||
}, 1000);
|
}, 1000);
|
||||||
@@ -589,7 +588,7 @@ const level = {
|
|||||||
Composite.add(engine.world, constraint);
|
Composite.add(engine.world, constraint);
|
||||||
|
|
||||||
if (rotate) {
|
if (rotate) {
|
||||||
rotor.rotate = function () {
|
rotor.rotate = function() {
|
||||||
if (!m.isBodiesAsleep) {
|
if (!m.isBodiesAsleep) {
|
||||||
Matter.Body.applyForce(rotor, {
|
Matter.Body.applyForce(rotor, {
|
||||||
x: rotor.position.x + 100,
|
x: rotor.position.x + 100,
|
||||||
@@ -792,7 +791,7 @@ const level = {
|
|||||||
y: 0
|
y: 0
|
||||||
}, angleB)
|
}, angleB)
|
||||||
|
|
||||||
draw = function () {
|
draw = function() {
|
||||||
ctx.beginPath(); //portal
|
ctx.beginPath(); //portal
|
||||||
let v = this.vertices;
|
let v = this.vertices;
|
||||||
ctx.moveTo(v[0].x, v[0].y);
|
ctx.moveTo(v[0].x, v[0].y);
|
||||||
@@ -802,7 +801,7 @@ const level = {
|
|||||||
ctx.fillStyle = this.color
|
ctx.fillStyle = this.color
|
||||||
ctx.fill();
|
ctx.fill();
|
||||||
}
|
}
|
||||||
query = function (isRemoveBlocks = false) {
|
query = function(isRemoveBlocks = false) {
|
||||||
if (Matter.Query.collides(this, [player]).length === 0) { //not touching player
|
if (Matter.Query.collides(this, [player]).length === 0) { //not touching player
|
||||||
if (player.isInPortal === this) player.isInPortal = null
|
if (player.isInPortal === this) player.isInPortal = null
|
||||||
} else if (player.isInPortal !== this) { //touching player
|
} else if (player.isInPortal !== this) { //touching player
|
||||||
@@ -1417,7 +1416,7 @@ const level = {
|
|||||||
button.isReadyToFire = true
|
button.isReadyToFire = true
|
||||||
} else if (button.isReadyToFire && !button.isUp) {
|
} else if (button.isReadyToFire && !button.isUp) {
|
||||||
button.isReadyToFire = false
|
button.isReadyToFire = false
|
||||||
fireBlock = function (xPos, yPos) {
|
fireBlock = function(xPos, yPos) {
|
||||||
const index = body.length
|
const index = body.length
|
||||||
spawn.bodyRect(xPos, yPos, 35 + 50 * Math.random(), 35 + 50 * Math.random());
|
spawn.bodyRect(xPos, yPos, 35 + 50 * Math.random(), 35 + 50 * Math.random());
|
||||||
const bodyBullet = body[body.length - 1]
|
const bodyBullet = body[body.length - 1]
|
||||||
@@ -1473,7 +1472,7 @@ const level = {
|
|||||||
button.isReadyToFire = true
|
button.isReadyToFire = true
|
||||||
} else if (button.isReadyToFire && !button.isUp) {
|
} else if (button.isReadyToFire && !button.isUp) {
|
||||||
button.isReadyToFire = false
|
button.isReadyToFire = false
|
||||||
fireBlock = function (xPos, yPos) {
|
fireBlock = function(xPos, yPos) {
|
||||||
const index = body.length
|
const index = body.length
|
||||||
spawn.bodyRect(xPos, yPos, 35 + 50 * Math.random(), 35 + 50 * Math.random());
|
spawn.bodyRect(xPos, yPos, 35 + 50 * Math.random(), 35 + 50 * Math.random());
|
||||||
const bodyBullet = body[body.length - 1]
|
const bodyBullet = body[body.length - 1]
|
||||||
@@ -2388,7 +2387,7 @@ const level = {
|
|||||||
level.exit.draw();
|
level.exit.draw();
|
||||||
level.enter.draw();
|
level.enter.draw();
|
||||||
};
|
};
|
||||||
level.customTopLayer = () => { };
|
level.customTopLayer = () => {};
|
||||||
level.setPosToSpawn(0, -50); //normal spawn
|
level.setPosToSpawn(0, -50); //normal spawn
|
||||||
level.exit.x = 1500;
|
level.exit.x = 1500;
|
||||||
level.exit.y = -1875;
|
level.exit.y = -1875;
|
||||||
@@ -5518,7 +5517,7 @@ const level = {
|
|||||||
if (mob[i].isBoss) me = mob[i]
|
if (mob[i].isBoss) me = mob[i]
|
||||||
}
|
}
|
||||||
if (me) {
|
if (me) {
|
||||||
me.onDeath = function () { //please don't edit the onDeath function this causes serious bugs
|
me.onDeath = function() { //please don't edit the onDeath function this causes serious bugs
|
||||||
spawnCouloirEnHaut()
|
spawnCouloirEnHaut()
|
||||||
doorSortieSalle.isOpen = false;
|
doorSortieSalle.isOpen = false;
|
||||||
};
|
};
|
||||||
@@ -5534,7 +5533,7 @@ const level = {
|
|||||||
if (mob[i].isBoss) me = mob[i]
|
if (mob[i].isBoss) me = mob[i]
|
||||||
}
|
}
|
||||||
if (me) {
|
if (me) {
|
||||||
me.onDeath = function () { //please don't edit the onDeath function this causes serious bugs
|
me.onDeath = function() { //please don't edit the onDeath function this causes serious bugs
|
||||||
spawnCouloirEnHaut()
|
spawnCouloirEnHaut()
|
||||||
doorSortieSalle.isOpen = false;
|
doorSortieSalle.isOpen = false;
|
||||||
};
|
};
|
||||||
@@ -5759,11 +5758,11 @@ const level = {
|
|||||||
body[body.length] = part4;
|
body[body.length] = part4;
|
||||||
body[body.length] = part5;
|
body[body.length] = part5;
|
||||||
body[body.length] = part6;
|
body[body.length] = part6;
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
chair.collisionFilter.category = cat.body;
|
chair.collisionFilter.category = cat.body;
|
||||||
chair.collisionFilter.mask = cat.body | cat.player | cat.bullet | cat.mob | cat.mobBullet | cat.map
|
chair.collisionFilter.mask = cat.body | cat.player | cat.bullet | cat.mob | cat.mobBullet | cat.map
|
||||||
}, 1000);
|
}, 1000);
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
chair2.collisionFilter.category = cat.body;
|
chair2.collisionFilter.category = cat.body;
|
||||||
chair2.collisionFilter.mask = cat.body | cat.player | cat.bullet | cat.mob | cat.mobBullet | cat.map
|
chair2.collisionFilter.mask = cat.body | cat.player | cat.bullet | cat.mob | cat.mobBullet | cat.map
|
||||||
}, 1000);
|
}, 1000);
|
||||||
@@ -5818,7 +5817,7 @@ const level = {
|
|||||||
body[body.length] = rightUpperLeg
|
body[body.length] = rightUpperLeg
|
||||||
body[body.length] = rightLowerArm
|
body[body.length] = rightLowerArm
|
||||||
body[body.length] = rightUpperArm
|
body[body.length] = rightUpperArm
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
person.collisionFilter.category = cat.body;
|
person.collisionFilter.category = cat.body;
|
||||||
person.collisionFilter.mask = cat.body | cat.player | cat.bullet | cat.mob | cat.mobBullet | cat.map
|
person.collisionFilter.mask = cat.body | cat.player | cat.bullet | cat.mob | cat.mobBullet | cat.map
|
||||||
}, 1000);
|
}, 1000);
|
||||||
@@ -6210,7 +6209,7 @@ const level = {
|
|||||||
level.exit.draw();
|
level.exit.draw();
|
||||||
level.enter.draw();
|
level.enter.draw();
|
||||||
};
|
};
|
||||||
level.customTopLayer = () => { };
|
level.customTopLayer = () => {};
|
||||||
level.defaultZoom = 1800
|
level.defaultZoom = 1800
|
||||||
simulation.zoomTransition(level.defaultZoom)
|
simulation.zoomTransition(level.defaultZoom)
|
||||||
document.body.style.backgroundColor = "#dcdcde";
|
document.body.style.backgroundColor = "#dcdcde";
|
||||||
@@ -7269,7 +7268,7 @@ const level = {
|
|||||||
body[body.length] = part1;
|
body[body.length] = part1;
|
||||||
body[body.length] = part2;
|
body[body.length] = part2;
|
||||||
body[body.length] = part3;
|
body[body.length] = part3;
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
compoundParts.collisionFilter.category = cat.body;
|
compoundParts.collisionFilter.category = cat.body;
|
||||||
compoundParts.collisionFilter.mask = cat.body | cat.player | cat.bullet | cat.mob | cat.mobBullet | cat.map
|
compoundParts.collisionFilter.mask = cat.body | cat.player | cat.bullet | cat.mob | cat.mobBullet | cat.map
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|||||||
20
js/mob.js
20
js/mob.js
@@ -165,7 +165,7 @@ const mobs = {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
endEffect() { },
|
endEffect() {},
|
||||||
dmg: tickDamage,
|
dmg: tickDamage,
|
||||||
type: "dot",
|
type: "dot",
|
||||||
endCycle: simulation.cycle + cycles,
|
endCycle: simulation.cycle + cycles,
|
||||||
@@ -472,7 +472,7 @@ const mobs = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
laser() {
|
laser() {
|
||||||
const vertexCollision = function (v1, v1End, domain) {
|
const vertexCollision = function(v1, v1End, domain) {
|
||||||
for (let i = 0; i < domain.length; ++i) {
|
for (let i = 0; i < domain.length; ++i) {
|
||||||
let vertices = domain[i].vertices;
|
let vertices = domain[i].vertices;
|
||||||
const len = vertices.length - 1;
|
const len = vertices.length - 1;
|
||||||
@@ -609,7 +609,7 @@ const mobs = {
|
|||||||
ctx.fillStyle = "rgba(0,0,0,0.07)";
|
ctx.fillStyle = "rgba(0,0,0,0.07)";
|
||||||
ctx.fill();
|
ctx.fill();
|
||||||
//spring to random place on map
|
//spring to random place on map
|
||||||
const vertexCollision = function (v1, v1End, domain) {
|
const vertexCollision = function(v1, v1End, domain) {
|
||||||
for (let i = 0; i < domain.length; ++i) {
|
for (let i = 0; i < domain.length; ++i) {
|
||||||
let vertices = domain[i].vertices;
|
let vertices = domain[i].vertices;
|
||||||
const len = vertices.length - 1;
|
const len = vertices.length - 1;
|
||||||
@@ -676,7 +676,7 @@ const mobs = {
|
|||||||
},
|
},
|
||||||
curl(range = 1000, mag = -10) {
|
curl(range = 1000, mag = -10) {
|
||||||
//cause all mobs, and bodies to rotate in a circle
|
//cause all mobs, and bodies to rotate in a circle
|
||||||
applyCurl = function (center, array, isAntiGravity = true) {
|
applyCurl = function(center, array, isAntiGravity = true) {
|
||||||
for (let i = 0; i < array.length; ++i) {
|
for (let i = 0; i < array.length; ++i) {
|
||||||
if (!array[i].isNotHoldable) {
|
if (!array[i].isNotHoldable) {
|
||||||
const sub = Vector.sub(center, array[i].position)
|
const sub = Vector.sub(center, array[i].position)
|
||||||
@@ -825,7 +825,7 @@ const mobs = {
|
|||||||
//be sure to declare searchTarget in mob spawn
|
//be sure to declare searchTarget in mob spawn
|
||||||
//accelerate towards the searchTarget
|
//accelerate towards the searchTarget
|
||||||
if (!this.seePlayer.recall) {
|
if (!this.seePlayer.recall) {
|
||||||
const newTarget = function (that) {
|
const newTarget = function(that) {
|
||||||
if (Math.random() < 0.0005) {
|
if (Math.random() < 0.0005) {
|
||||||
that.searchTarget = player.position; //chance to target player
|
that.searchTarget = player.position; //chance to target player
|
||||||
} else {
|
} else {
|
||||||
@@ -1149,7 +1149,7 @@ const mobs = {
|
|||||||
powerUps.spawn(this.position.x, this.position.y, "tech", false)
|
powerUps.spawn(this.position.x, this.position.y, "tech", false)
|
||||||
// if (0.5 < Math.random()) powerUps.spawn(this.position.x, this.position.y, "tech", false)
|
// if (0.5 < Math.random()) powerUps.spawn(this.position.x, this.position.y, "tech", false)
|
||||||
} else {
|
} else {
|
||||||
const amount = 0.01
|
const amount = 0.005
|
||||||
if (tech.isEnergyHealth) {
|
if (tech.isEnergyHealth) {
|
||||||
if (m.maxEnergy > amount) {
|
if (m.maxEnergy > amount) {
|
||||||
tech.healMaxEnergyBonus -= amount
|
tech.healMaxEnergyBonus -= amount
|
||||||
@@ -1228,7 +1228,7 @@ const mobs = {
|
|||||||
for (let i = 0, len = consBB.length; i < len; ++i) {
|
for (let i = 0, len = consBB.length; i < len; ++i) {
|
||||||
if (consBB[i].bodyA === this) {
|
if (consBB[i].bodyA === this) {
|
||||||
if (consBB[i].bodyB.shield) {
|
if (consBB[i].bodyB.shield) {
|
||||||
consBB[i].bodyB.do = function () {
|
consBB[i].bodyB.do = function() {
|
||||||
this.death();
|
this.death();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1238,7 +1238,7 @@ const mobs = {
|
|||||||
break;
|
break;
|
||||||
} else if (consBB[i].bodyB === this) {
|
} else if (consBB[i].bodyB === this) {
|
||||||
if (consBB[i].bodyA.shield) {
|
if (consBB[i].bodyA.shield) {
|
||||||
consBB[i].bodyA.do = function () {
|
consBB[i].bodyA.do = function() {
|
||||||
this.death();
|
this.death();
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -1297,7 +1297,7 @@ const mobs = {
|
|||||||
//large mobs shrink so they don't block paths
|
//large mobs shrink so they don't block paths
|
||||||
if (body[len].mass + body[len2].mass > 16) {
|
if (body[len].mass + body[len2].mass > 16) {
|
||||||
const massLimit = 8 + 6 * Math.random()
|
const massLimit = 8 + 6 * Math.random()
|
||||||
const shrink = function (that1, that2) {
|
const shrink = function(that1, that2) {
|
||||||
if (that1.mass + that2.mass > massLimit) {
|
if (that1.mass + that2.mass > massLimit) {
|
||||||
const scale = 0.95;
|
const scale = 0.95;
|
||||||
Matter.Body.scale(that1, scale, scale);
|
Matter.Body.scale(that1, scale, scale);
|
||||||
@@ -1320,7 +1320,7 @@ const mobs = {
|
|||||||
//large mobs shrink so they don't block paths
|
//large mobs shrink so they don't block paths
|
||||||
if (body[len].mass > 9) {
|
if (body[len].mass > 9) {
|
||||||
const massLimit = 7 + 4 * Math.random()
|
const massLimit = 7 + 4 * Math.random()
|
||||||
const shrink = function (that) {
|
const shrink = function(that) {
|
||||||
if (that.mass > massLimit) {
|
if (that.mass > massLimit) {
|
||||||
const scale = 0.95;
|
const scale = 0.95;
|
||||||
Matter.Body.scale(that, scale, scale);
|
Matter.Body.scale(that, scale, scale);
|
||||||
|
|||||||
74
js/player.js
74
js/player.js
@@ -133,7 +133,7 @@ const m = {
|
|||||||
transX: 0,
|
transX: 0,
|
||||||
transY: 0,
|
transY: 0,
|
||||||
history: [], //tracks the last second of player position
|
history: [], //tracks the last second of player position
|
||||||
rewindCount: 0, //used with CPT gun
|
rewindCount: 0, //used with CPT
|
||||||
resetHistory() {
|
resetHistory() {
|
||||||
for (let i = 0; i < 600; i++) { //reset history
|
for (let i = 0; i < 600; i++) { //reset history
|
||||||
m.history[i] = {
|
m.history[i] = {
|
||||||
@@ -183,7 +183,7 @@ const m = {
|
|||||||
lastGroundedPositionY: 0,
|
lastGroundedPositionY: 0,
|
||||||
// mouseZoom: 0,
|
// mouseZoom: 0,
|
||||||
lookSmoothing: 0.07, //1 is instant jerky, 0.001 is slow smooth zoom, 0.07 is standard
|
lookSmoothing: 0.07, //1 is instant jerky, 0.001 is slow smooth zoom, 0.07 is standard
|
||||||
look() { }, //set to lookDefault()
|
look() {}, //set to lookDefault()
|
||||||
lookDefault() {
|
lookDefault() {
|
||||||
//always on mouse look
|
//always on mouse look
|
||||||
m.angle = Math.atan2(
|
m.angle = Math.atan2(
|
||||||
@@ -405,7 +405,7 @@ const m = {
|
|||||||
m.health = 1;
|
m.health = 1;
|
||||||
// m.addHealth(1)
|
// m.addHealth(1)
|
||||||
|
|
||||||
simulation.wipe = function () { //set wipe to have trails
|
simulation.wipe = function() { //set wipe to have trails
|
||||||
ctx.fillStyle = "rgba(255,255,255,0)";
|
ctx.fillStyle = "rgba(255,255,255,0)";
|
||||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||||
}
|
}
|
||||||
@@ -415,8 +415,8 @@ const m = {
|
|||||||
m.switchWorlds()
|
m.switchWorlds()
|
||||||
const swapPeriod = 1000
|
const swapPeriod = 1000
|
||||||
for (let i = 0, len = 5; i < len; i++) {
|
for (let i = 0, len = 5; i < len; i++) {
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
simulation.wipe = function () { //set wipe to have trails
|
simulation.wipe = function() { //set wipe to have trails
|
||||||
ctx.fillStyle = "rgba(255,255,255,0)";
|
ctx.fillStyle = "rgba(255,255,255,0)";
|
||||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||||
}
|
}
|
||||||
@@ -426,14 +426,14 @@ const m = {
|
|||||||
simulation.isTextLogOpen = true;
|
simulation.isTextLogOpen = true;
|
||||||
simulation.makeTextLog(`simulation.amplitude <span class='color-symbol'>=</span> 0.${len - i - 1}`, swapPeriod);
|
simulation.makeTextLog(`simulation.amplitude <span class='color-symbol'>=</span> 0.${len - i - 1}`, swapPeriod);
|
||||||
simulation.isTextLogOpen = false;
|
simulation.isTextLogOpen = false;
|
||||||
simulation.wipe = function () { //set wipe to have trails
|
simulation.wipe = function() { //set wipe to have trails
|
||||||
ctx.fillStyle = `rgba(255,255,255,${(i + 1) * (i + 1) * 0.006})`;
|
ctx.fillStyle = `rgba(255,255,255,${(i + 1) * (i + 1) * 0.006})`;
|
||||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||||
}
|
}
|
||||||
}, (i + 1) * swapPeriod);
|
}, (i + 1) * swapPeriod);
|
||||||
}
|
}
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
simulation.wipe = function () { //set wipe to normal
|
simulation.wipe = function() { //set wipe to normal
|
||||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||||
}
|
}
|
||||||
simulation.isTextLogOpen = true;
|
simulation.isTextLogOpen = true;
|
||||||
@@ -448,7 +448,7 @@ const m = {
|
|||||||
document.getElementById("text-log").style.opacity = 0; //fade out any active text logs
|
document.getElementById("text-log").style.opacity = 0; //fade out any active text logs
|
||||||
document.getElementById("fade-out").style.opacity = 0.9; //slowly fade to 90% white on top of canvas
|
document.getElementById("fade-out").style.opacity = 0.9; //slowly fade to 90% white on top of canvas
|
||||||
// build.shareURL(false)
|
// build.shareURL(false)
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
Composite.clear(engine.world);
|
Composite.clear(engine.world);
|
||||||
Engine.clear(engine);
|
Engine.clear(engine);
|
||||||
simulation.splashReturn();
|
simulation.splashReturn();
|
||||||
@@ -588,7 +588,7 @@ const m = {
|
|||||||
if (m.immuneCycle < m.cycle + tech.collisionImmuneCycles) m.immuneCycle = m.cycle + tech.collisionImmuneCycles; //player is immune to damage for 30 cycles
|
if (m.immuneCycle < m.cycle + tech.collisionImmuneCycles) m.immuneCycle = m.cycle + tech.collisionImmuneCycles; //player is immune to damage for 30 cycles
|
||||||
|
|
||||||
let isDrawPlayer = true
|
let isDrawPlayer = true
|
||||||
const shortPause = function () {
|
const shortPause = function() {
|
||||||
if (m.defaultFPSCycle < m.cycle) { //back to default values
|
if (m.defaultFPSCycle < m.cycle) { //back to default values
|
||||||
simulation.fpsCap = simulation.fpsCapDefault
|
simulation.fpsCap = simulation.fpsCapDefault
|
||||||
simulation.fpsInterval = 1000 / simulation.fpsCap;
|
simulation.fpsInterval = 1000 / simulation.fpsCap;
|
||||||
@@ -657,13 +657,13 @@ const m = {
|
|||||||
for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal", false);
|
for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal", false);
|
||||||
m.energy = m.maxEnergy
|
m.energy = m.maxEnergy
|
||||||
if (m.immuneCycle < m.cycle + 300) m.immuneCycle = m.cycle + 300 //disable this.immuneCycle bonus seconds
|
if (m.immuneCycle < m.cycle + 300) m.immuneCycle = m.cycle + 300 //disable this.immuneCycle bonus seconds
|
||||||
simulation.wipe = function () { //set wipe to have trails
|
simulation.wipe = function() { //set wipe to have trails
|
||||||
ctx.fillStyle = "rgba(255,255,255,0.03)";
|
ctx.fillStyle = "rgba(255,255,255,0.03)";
|
||||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||||
}
|
}
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
tech.maxDuplicationEvent()
|
tech.maxDuplicationEvent()
|
||||||
simulation.wipe = function () { //set wipe to normal
|
simulation.wipe = function() { //set wipe to normal
|
||||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||||
}
|
}
|
||||||
}, 3000);
|
}, 3000);
|
||||||
@@ -686,13 +686,13 @@ const m = {
|
|||||||
<br>${powerUps.research.count}`)
|
<br>${powerUps.research.count}`)
|
||||||
for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal", false);
|
for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "heal", false);
|
||||||
if (m.immuneCycle < m.cycle + 300) m.immuneCycle = m.cycle + 300 //disable this.immuneCycle bonus seconds
|
if (m.immuneCycle < m.cycle + 300) m.immuneCycle = m.cycle + 300 //disable this.immuneCycle bonus seconds
|
||||||
simulation.wipe = function () { //set wipe to have trails
|
simulation.wipe = function() { //set wipe to have trails
|
||||||
ctx.fillStyle = "rgba(255,255,255,0.03)";
|
ctx.fillStyle = "rgba(255,255,255,0.03)";
|
||||||
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
||||||
}
|
}
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
tech.maxDuplicationEvent()
|
tech.maxDuplicationEvent()
|
||||||
simulation.wipe = function () { //set wipe to normal
|
simulation.wipe = function() { //set wipe to normal
|
||||||
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
ctx.clearRect(0, 0, canvas.width, canvas.height);
|
||||||
}
|
}
|
||||||
}, 3000);
|
}, 3000);
|
||||||
@@ -709,7 +709,7 @@ const m = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (dmg > 0.06 / m.holdingMassScale) m.drop(); //drop block if holding
|
if (dmg > 0.06 / m.holdingMassScale) m.drop(); //drop block if holding
|
||||||
const normalFPS = function () {
|
const normalFPS = function() {
|
||||||
if (m.defaultFPSCycle < m.cycle) { //back to default values
|
if (m.defaultFPSCycle < m.cycle) { //back to default values
|
||||||
simulation.fpsCap = simulation.fpsCapDefault
|
simulation.fpsCap = simulation.fpsCapDefault
|
||||||
simulation.fpsInterval = 1000 / simulation.fpsCap;
|
simulation.fpsInterval = 1000 / simulation.fpsCap;
|
||||||
@@ -808,7 +808,7 @@ const m = {
|
|||||||
m.knee.x = (l / d) * (m.foot.x - m.hip.x) - (h / d) * (m.foot.y - m.hip.y) + m.hip.x + offset;
|
m.knee.x = (l / d) * (m.foot.x - m.hip.x) - (h / d) * (m.foot.y - m.hip.y) + m.hip.x + offset;
|
||||||
m.knee.y = (l / d) * (m.foot.y - m.hip.y) + (h / d) * (m.foot.x - m.hip.x) + m.hip.y;
|
m.knee.y = (l / d) * (m.foot.y - m.hip.y) + (h / d) * (m.foot.x - m.hip.x) + m.hip.y;
|
||||||
},
|
},
|
||||||
draw() { },
|
draw() {},
|
||||||
drawFlipFlop() {
|
drawFlipFlop() {
|
||||||
ctx.fillStyle = m.fillColor;
|
ctx.fillStyle = m.fillColor;
|
||||||
m.walk_cycle += m.flipLegs * m.Vx;
|
m.walk_cycle += m.flipLegs * m.Vx;
|
||||||
@@ -981,7 +981,7 @@ const m = {
|
|||||||
ctx.fillRect(xOff, yOff, range * m.energy, 10);
|
ctx.fillRect(xOff, yOff, range * m.energy, 10);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
drawFieldMeterCloaking: function () {
|
drawFieldMeterCloaking: function() {
|
||||||
if (m.energy < m.maxEnergy) { // replaces m.drawFieldMeter() with custom code
|
if (m.energy < m.maxEnergy) { // replaces m.drawFieldMeter() with custom code
|
||||||
m.regenEnergy();
|
m.regenEnergy();
|
||||||
const xOff = m.pos.x - m.radius * m.maxEnergy
|
const xOff = m.pos.x - m.radius * m.maxEnergy
|
||||||
@@ -997,11 +997,11 @@ const m = {
|
|||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
regenEnergy: function () { //used in drawFieldMeter // rewritten by some tech
|
regenEnergy: function() { //used in drawFieldMeter // rewritten by some tech
|
||||||
if (m.immuneCycle < m.cycle) m.energy += m.fieldRegen;
|
if (m.immuneCycle < m.cycle) m.energy += m.fieldRegen;
|
||||||
if (m.energy < 0) m.energy = 0
|
if (m.energy < 0) m.energy = 0
|
||||||
},
|
},
|
||||||
regenEnergyDefault: function () {
|
regenEnergyDefault: function() {
|
||||||
if (m.immuneCycle < m.cycle) m.energy += m.fieldRegen;
|
if (m.immuneCycle < m.cycle) m.energy += m.fieldRegen;
|
||||||
if (m.energy < 0) m.energy = 0
|
if (m.energy < 0) m.energy = 0
|
||||||
},
|
},
|
||||||
@@ -1189,7 +1189,7 @@ const m = {
|
|||||||
m.holdingTarget.friction = m.holdingTarget.frictionStatic = m.holdingTarget.frictionAir = 0.001
|
m.holdingTarget.friction = m.holdingTarget.frictionStatic = m.holdingTarget.frictionAir = 0.001
|
||||||
}
|
}
|
||||||
//check every second to see if player is away from thrown body, and make solid
|
//check every second to see if player is away from thrown body, and make solid
|
||||||
const solid = function (that) {
|
const solid = function(that) {
|
||||||
const dx = that.position.x - player.position.x;
|
const dx = that.position.x - player.position.x;
|
||||||
const dy = that.position.y - player.position.y;
|
const dy = that.position.y - player.position.y;
|
||||||
if (that.speed < 3 && dx * dx + dy * dy > 10000 && that !== m.holdingTarget) {
|
if (that.speed < 3 && dx * dx + dy * dy > 10000 && that !== m.holdingTarget) {
|
||||||
@@ -1221,7 +1221,7 @@ const m = {
|
|||||||
m.definePlayerMass() //return to normal player mass
|
m.definePlayerMass() //return to normal player mass
|
||||||
|
|
||||||
if (tech.isAddBlockMass) {
|
if (tech.isAddBlockMass) {
|
||||||
const expand = function (that, massLimit) {
|
const expand = function(that, massLimit) {
|
||||||
if (that.mass < massLimit) {
|
if (that.mass < massLimit) {
|
||||||
const scale = 1.05;
|
const scale = 1.05;
|
||||||
Matter.Body.scale(that, scale, scale);
|
Matter.Body.scale(that, scale, scale);
|
||||||
@@ -1466,7 +1466,7 @@ const m = {
|
|||||||
// wake(powerUp);
|
// wake(powerUp);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
hold() { },
|
hold() {},
|
||||||
setField(index) {
|
setField(index) {
|
||||||
if (isNaN(index)) { //find index by name
|
if (isNaN(index)) { //find index by name
|
||||||
let found = false
|
let found = false
|
||||||
@@ -1490,7 +1490,7 @@ const m = {
|
|||||||
description: "regen <strong>6</strong> <strong class='color-f'>energy</strong> per second<br>use it to <strong>deflect</strong> mobs and <strong>throw</strong> <strong class='color-block'>blocks</strong><br><strong class='color-f'>energy</strong> regen disabled if immune to <strong class='color-harm'>harm</strong>",
|
description: "regen <strong>6</strong> <strong class='color-f'>energy</strong> per second<br>use it to <strong>deflect</strong> mobs and <strong>throw</strong> <strong class='color-block'>blocks</strong><br><strong class='color-f'>energy</strong> regen disabled if immune to <strong class='color-harm'>harm</strong>",
|
||||||
// description: "use <strong class='color-f'>energy</strong> to <strong>deflect</strong> mobs,<br><strong>grab</strong> power ups, and <strong>throw</strong> <strong class='color-block'>blocks</strong><br>regen <strong>6</strong> <strong class='color-f'>energy</strong>/s, when not immune to <strong class='color-harm'>harm</strong>",
|
// description: "use <strong class='color-f'>energy</strong> to <strong>deflect</strong> mobs,<br><strong>grab</strong> power ups, and <strong>throw</strong> <strong class='color-block'>blocks</strong><br>regen <strong>6</strong> <strong class='color-f'>energy</strong>/s, when not immune to <strong class='color-harm'>harm</strong>",
|
||||||
effect: () => {
|
effect: () => {
|
||||||
m.hold = function () {
|
m.hold = function() {
|
||||||
if (m.isHolding) {
|
if (m.isHolding) {
|
||||||
m.drawHold(m.holdingTarget);
|
m.drawHold(m.holdingTarget);
|
||||||
m.holding();
|
m.holding();
|
||||||
@@ -1584,7 +1584,7 @@ const m = {
|
|||||||
} else {
|
} else {
|
||||||
m.harmonicShield = m.harmonicAtomic
|
m.harmonicShield = m.harmonicAtomic
|
||||||
}
|
}
|
||||||
m.hold = function () {
|
m.hold = function() {
|
||||||
if (m.isHolding) {
|
if (m.isHolding) {
|
||||||
m.drawHold(m.holdingTarget);
|
m.drawHold(m.holdingTarget);
|
||||||
m.holding();
|
m.holding();
|
||||||
@@ -1717,7 +1717,7 @@ const m = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m.hold = function () {
|
m.hold = function() {
|
||||||
const wave = Math.sin(m.cycle * 0.022);
|
const wave = Math.sin(m.cycle * 0.022);
|
||||||
m.fieldRange = 160 + 12 * wave + 100 * tech.isBigField
|
m.fieldRange = 160 + 12 * wave + 100 * tech.isBigField
|
||||||
m.fieldArc = 0.34 + 0.04 * wave + 0.065 * tech.isBigField //run calculateFieldThreshold after setting fieldArc, used for powerUp grab and mobPush with lookingAt(mob)
|
m.fieldArc = 0.34 + 0.04 * wave + 0.065 * tech.isBigField //run calculateFieldThreshold after setting fieldArc, used for powerUp grab and mobPush with lookingAt(mob)
|
||||||
@@ -1809,7 +1809,7 @@ const m = {
|
|||||||
m.fieldHarmReduction = 0.45; //55% reduction
|
m.fieldHarmReduction = 0.45; //55% reduction
|
||||||
m.fieldDrawRadius = 0;
|
m.fieldDrawRadius = 0;
|
||||||
|
|
||||||
m.hold = function () {
|
m.hold = function() {
|
||||||
m.airSpeedLimit = 125 //5 * player.mass * player.mass
|
m.airSpeedLimit = 125 //5 * player.mass * player.mass
|
||||||
m.FxAir = 0.016
|
m.FxAir = 0.016
|
||||||
if (m.isHolding) {
|
if (m.isHolding) {
|
||||||
@@ -1953,7 +1953,7 @@ const m = {
|
|||||||
effect: () => {
|
effect: () => {
|
||||||
// m.fieldMeterColor = "#0c5"
|
// m.fieldMeterColor = "#0c5"
|
||||||
// m.eyeFillColor = m.fieldMeterColor
|
// m.eyeFillColor = m.fieldMeterColor
|
||||||
m.hold = function () {
|
m.hold = function() {
|
||||||
if (m.energy > m.maxEnergy - 0.02 && m.fieldCDcycle < m.cycle && !input.field && bullet.length < 200 && (m.cycle % 2)) {
|
if (m.energy > m.maxEnergy - 0.02 && m.fieldCDcycle < m.cycle && !input.field && bullet.length < 200 && (m.cycle % 2)) {
|
||||||
if (tech.isSporeField) {
|
if (tech.isSporeField) {
|
||||||
if (tech.isSporeWorm) {
|
if (tech.isSporeWorm) {
|
||||||
@@ -2074,7 +2074,7 @@ const m = {
|
|||||||
set() {
|
set() {
|
||||||
b.isExtruderOn = false
|
b.isExtruderOn = false
|
||||||
if (tech.isExtruder) {
|
if (tech.isExtruder) {
|
||||||
m.hold = function () {
|
m.hold = function() {
|
||||||
b.isExtruderOn = false
|
b.isExtruderOn = false
|
||||||
if (m.isHolding) {
|
if (m.isHolding) {
|
||||||
m.drawHold(m.holdingTarget);
|
m.drawHold(m.holdingTarget);
|
||||||
@@ -2115,7 +2115,7 @@ const m = {
|
|||||||
ctx.stroke();
|
ctx.stroke();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
m.hold = function () {
|
m.hold = function() {
|
||||||
if (m.isHolding) {
|
if (m.isHolding) {
|
||||||
m.drawHold(m.holdingTarget);
|
m.drawHold(m.holdingTarget);
|
||||||
m.holding();
|
m.holding();
|
||||||
@@ -2147,7 +2147,7 @@ const m = {
|
|||||||
if (tech.isRewindField) {
|
if (tech.isRewindField) {
|
||||||
this.rewindCount = 0
|
this.rewindCount = 0
|
||||||
m.grabPowerUpRange2 = 300000
|
m.grabPowerUpRange2 = 300000
|
||||||
m.hold = function () {
|
m.hold = function() {
|
||||||
if (m.isHolding) {
|
if (m.isHolding) {
|
||||||
m.drawHold(m.holdingTarget);
|
m.drawHold(m.holdingTarget);
|
||||||
m.holding();
|
m.holding();
|
||||||
@@ -2317,7 +2317,7 @@ const m = {
|
|||||||
m.fieldFire = true;
|
m.fieldFire = true;
|
||||||
m.isBodiesAsleep = false;
|
m.isBodiesAsleep = false;
|
||||||
m.drain = 0.0005
|
m.drain = 0.0005
|
||||||
m.hold = function () {
|
m.hold = function() {
|
||||||
if (m.isHolding) {
|
if (m.isHolding) {
|
||||||
m.wakeCheck();
|
m.wakeCheck();
|
||||||
m.drawHold(m.holdingTarget);
|
m.drawHold(m.holdingTarget);
|
||||||
@@ -2413,7 +2413,7 @@ const m = {
|
|||||||
m.isSneakAttack = true;
|
m.isSneakAttack = true;
|
||||||
const drawRadius = 900
|
const drawRadius = 900
|
||||||
|
|
||||||
m.hold = function () {
|
m.hold = function() {
|
||||||
// console.log(m.holdingTarget)
|
// console.log(m.holdingTarget)
|
||||||
if (m.isHolding) {
|
if (m.isHolding) {
|
||||||
m.drawHold(m.holdingTarget);
|
m.drawHold(m.holdingTarget);
|
||||||
@@ -2676,7 +2676,7 @@ const m = {
|
|||||||
m.fieldOn = false;
|
m.fieldOn = false;
|
||||||
m.fieldRadius = 0;
|
m.fieldRadius = 0;
|
||||||
m.drop();
|
m.drop();
|
||||||
m.hold = function () {
|
m.hold = function() {
|
||||||
if (input.field) {
|
if (input.field) {
|
||||||
if (m.fieldCDcycle < m.cycle) {
|
if (m.fieldCDcycle < m.cycle) {
|
||||||
const scale = 25
|
const scale = 25
|
||||||
@@ -2857,12 +2857,12 @@ const m = {
|
|||||||
name: "wormhole",
|
name: "wormhole",
|
||||||
description: "use <strong class='color-f'>energy</strong> to <strong>tunnel</strong> through a <strong class='color-worm'>wormhole</strong><br><strong class='color-worm'>wormholes</strong> attract <strong class='color-block'>blocks</strong> and power ups<br><strong>7%</strong> chance to <strong class='color-dup'>duplicate</strong> spawned <strong>power ups</strong>", //<br>bullets may also traverse <strong class='color-worm'>wormholes</strong>
|
description: "use <strong class='color-f'>energy</strong> to <strong>tunnel</strong> through a <strong class='color-worm'>wormhole</strong><br><strong class='color-worm'>wormholes</strong> attract <strong class='color-block'>blocks</strong> and power ups<br><strong>7%</strong> chance to <strong class='color-dup'>duplicate</strong> spawned <strong>power ups</strong>", //<br>bullets may also traverse <strong class='color-worm'>wormholes</strong>
|
||||||
drain: 0,
|
drain: 0,
|
||||||
effect: function () {
|
effect: function() {
|
||||||
m.duplicateChance = 0.07
|
m.duplicateChance = 0.07
|
||||||
m.fieldRange = 0
|
m.fieldRange = 0
|
||||||
powerUps.setDupChance(); //needed after adjusting duplication chance
|
powerUps.setDupChance(); //needed after adjusting duplication chance
|
||||||
|
|
||||||
m.hold = function () {
|
m.hold = function() {
|
||||||
// m.hole = { //this is reset with each new field, but I'm leaving it here for reference
|
// m.hole = { //this is reset with each new field, but I'm leaving it here for reference
|
||||||
// isOn: false,
|
// isOn: false,
|
||||||
// isReady: true,
|
// isReady: true,
|
||||||
|
|||||||
336
js/spawn.js
336
js/spawn.js
File diff suppressed because it is too large
Load Diff
356
js/tech.js
356
js/tech.js
@@ -289,33 +289,27 @@ const tech = {
|
|||||||
tech: [{
|
tech: [{
|
||||||
name: "integrated armament",
|
name: "integrated armament",
|
||||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Weapon' class="link">integrated armament</a>`,
|
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Weapon' class="link">integrated armament</a>`,
|
||||||
description: `increase <strong class='color-d'>damage</strong> by <strong>19.95%</strong><br>your inventory can only hold 1 <strong class='color-g'>gun</strong>`,
|
description: `<span style = 'font-size:95%;'>increase <strong class='color-d'>damage</strong> by <strong>25%</strong>, but new <strong class='color-g'>guns</strong><br>replace your current <strong class='color-g'>gun</strong> and convert <strong class='color-g'>gun</strong><strong class='color-m'>tech</strong></span>`,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 1,
|
frequency: 1,
|
||||||
frequencyDefault: 1,
|
frequencyDefault: 1,
|
||||||
allowed() {
|
allowed() {
|
||||||
return b.inventory.length === 1 //&& !tech.haveGunCheck("CPT gun")
|
return b.inventory.length === 1
|
||||||
},
|
},
|
||||||
requires: "only 1 gun",
|
requires: "only 1 gun",
|
||||||
effect() {
|
effect() {
|
||||||
tech.isOneGun = true;
|
tech.isOneGun = true;
|
||||||
for (let i = 0; i < tech.tech.length; i++) {
|
|
||||||
if (tech.tech[i].name === "CPT gun") tech.tech[i].description = `adds the <strong>CPT</strong> <strong class='color-g'>gun</strong> to your inventory<br>it <strong>rewinds</strong> your <strong class='color-h'>health</strong>, <strong>velocity</strong>, and <strong>position</strong><br><div style = 'color: #f24'>replaces your current gun</div>`
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
tech.isOneGun = false;
|
tech.isOneGun = false;
|
||||||
for (let i = 0; i < tech.tech.length; i++) {
|
|
||||||
if (tech.tech[i].name === "CPT gun") tech.tech[i].description = `adds the <strong>CPT</strong> <strong class='color-g'>gun</strong> to your inventory<br>it <strong>rewinds</strong> your <strong class='color-h'>health</strong>, <strong>velocity</strong>, and <strong>position</strong>`
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "entanglement",
|
name: "entanglement",
|
||||||
nameInfo: "<span id = 'tech-entanglement'></span>",
|
nameInfo: "<span id = 'tech-entanglement'></span>",
|
||||||
addNameInfo() {
|
addNameInfo() {
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
simulation.boldActiveGunHUD();
|
simulation.boldActiveGunHUD();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
@@ -330,7 +324,7 @@ const tech = {
|
|||||||
requires: "at least 2 guns, not mass-energy",
|
requires: "at least 2 guns, not mass-energy",
|
||||||
effect() {
|
effect() {
|
||||||
tech.isEntanglement = true
|
tech.isEntanglement = true
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
simulation.boldActiveGunHUD();
|
simulation.boldActiveGunHUD();
|
||||||
}, 1000);
|
}, 1000);
|
||||||
|
|
||||||
@@ -406,7 +400,7 @@ const tech = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "gun sciences",
|
name: "gun sciences",
|
||||||
description: "spawn a <strong class='color-g'>gun</strong> and </strong>double</strong> the <strong class='flicker'>frequency</strong><br>of finding <strong class='color-m'>tech</strong> for your <strong class='color-g'>guns</strong>",
|
description: "spawn a <strong class='color-g'>gun</strong> and </strong>double</strong> the <strong class='flicker'>frequency</strong><br>of finding <strong class='color-g'>gun</strong><strong class='color-m'>tech</strong>",
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 1,
|
frequency: 1,
|
||||||
@@ -425,7 +419,7 @@ const tech = {
|
|||||||
if (tech.tech[i].isGunTech) tech.tech[i].frequency *= 2
|
if (tech.tech[i].isGunTech) tech.tech[i].frequency *= 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "ad hoc",
|
name: "ad hoc",
|
||||||
@@ -454,11 +448,11 @@ const tech = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "applied science",
|
name: "applied science",
|
||||||
description: `get a random <strong class='color-m'>tech</strong><br>for each <strong class='color-g'>gun</strong> in your inventory`, //spawn ${powerUps.orb.research(1)} and
|
description: `get a random <strong class='color-g'>gun</strong><strong class='color-m'>tech</strong><br>for each <strong class='color-g'>gun</strong> in your inventory`, //spawn ${powerUps.orb.research(1)} and
|
||||||
maxCount: 9,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
isNonRefundable: true,
|
isNonRefundable: true,
|
||||||
@@ -497,7 +491,7 @@ const tech = {
|
|||||||
}
|
}
|
||||||
simulation.boldActiveGunHUD();
|
simulation.boldActiveGunHUD();
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "logistics",
|
name: "logistics",
|
||||||
@@ -1911,7 +1905,7 @@ const tech = {
|
|||||||
description: `toggle <strong class="color-flop">ON</strong> and <strong class="color-flop">OFF</strong> after a <strong>collision</strong><br>unlock advanced <strong class='color-m'>tech</strong> that runs if <strong class="color-flop">ON</strong>`,
|
description: `toggle <strong class="color-flop">ON</strong> and <strong class="color-flop">OFF</strong> after a <strong>collision</strong><br>unlock advanced <strong class='color-m'>tech</strong> that runs if <strong class="color-flop">ON</strong>`,
|
||||||
nameInfo: "<span id = 'tech-flip-flop'></span>",
|
nameInfo: "<span id = 'tech-flip-flop'></span>",
|
||||||
addNameInfo() {
|
addNameInfo() {
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
if (document.getElementById("tech-flip-flop")) {
|
if (document.getElementById("tech-flip-flop")) {
|
||||||
if (tech.isFlipFlopOn) {
|
if (tech.isFlipFlopOn) {
|
||||||
document.getElementById("tech-flip-flop").innerHTML = ` = <strong>ON</strong>`
|
document.getElementById("tech-flip-flop").innerHTML = ` = <strong>ON</strong>`
|
||||||
@@ -1949,7 +1943,7 @@ const tech = {
|
|||||||
description: `toggle <strong class="color-flop">ON</strong> and <strong class="color-flop">OFF</strong> after picking up a <strong>power up</strong><br>unlock advanced <strong class='color-m'>tech</strong> that runs if <strong class="color-flop">ON</strong>`,
|
description: `toggle <strong class="color-flop">ON</strong> and <strong class="color-flop">OFF</strong> after picking up a <strong>power up</strong><br>unlock advanced <strong class='color-m'>tech</strong> that runs if <strong class="color-flop">ON</strong>`,
|
||||||
nameInfo: "<span id = 'tech-switch'></span>",
|
nameInfo: "<span id = 'tech-switch'></span>",
|
||||||
addNameInfo() {
|
addNameInfo() {
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
if (document.getElementById("tech-switch")) {
|
if (document.getElementById("tech-switch")) {
|
||||||
if (tech.isFlipFlopOn) {
|
if (tech.isFlipFlopOn) {
|
||||||
document.getElementById("tech-switch").innerHTML = ` = <strong>ON</strong>`
|
document.getElementById("tech-switch").innerHTML = ` = <strong>ON</strong>`
|
||||||
@@ -2616,7 +2610,7 @@ const tech = {
|
|||||||
requires: "not ground state, apex predator",
|
requires: "not ground state, apex predator",
|
||||||
effect() {
|
effect() {
|
||||||
tech.isCrouchRegen = true; //only used to check for requirements
|
tech.isCrouchRegen = true; //only used to check for requirements
|
||||||
m.regenEnergy = function () {
|
m.regenEnergy = function() {
|
||||||
if (m.immuneCycle < m.cycle && m.crouch) m.energy += 7 * m.fieldRegen; //m.fieldRegen = 0.001
|
if (m.immuneCycle < m.cycle && m.crouch) m.energy += 7 * m.fieldRegen; //m.fieldRegen = 0.001
|
||||||
if (m.energy < 0) m.energy = 0
|
if (m.energy < 0) m.energy = 0
|
||||||
}
|
}
|
||||||
@@ -2688,7 +2682,7 @@ const tech = {
|
|||||||
requires: "not inductive coupling",
|
requires: "not inductive coupling",
|
||||||
effect() {
|
effect() {
|
||||||
tech.isDamageAfterKillNoRegen = true;
|
tech.isDamageAfterKillNoRegen = true;
|
||||||
m.regenEnergy = function () {
|
m.regenEnergy = function() {
|
||||||
if (m.immuneCycle < m.cycle && (m.lastKillCycle + 300 < m.cycle)) m.energy += m.fieldRegen; //m.fieldRegen = 0.001
|
if (m.immuneCycle < m.cycle && (m.lastKillCycle + 300 < m.cycle)) m.energy += m.fieldRegen; //m.fieldRegen = 0.001
|
||||||
if (m.energy < 0) m.energy = 0
|
if (m.energy < 0) m.energy = 0
|
||||||
}
|
}
|
||||||
@@ -2770,7 +2764,7 @@ const tech = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "entropy exchange",
|
name: "enthalpy",
|
||||||
description: "<strong class='color-h'>heal</strong> for <strong>3%</strong> of <strong class='color-d'>damage</strong> done<br>take <strong>10%</strong> more <strong class='color-harm'>harm</strong>",
|
description: "<strong class='color-h'>heal</strong> for <strong>3%</strong> of <strong class='color-d'>damage</strong> done<br>take <strong>10%</strong> more <strong class='color-harm'>harm</strong>",
|
||||||
maxCount: 9,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
@@ -2906,13 +2900,13 @@ const tech = {
|
|||||||
if (tech.tech[i].isHealTech) tech.tech[i].frequency *= 2
|
if (tech.tech[i].isHealTech) tech.tech[i].frequency *= 2
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "anthropic principle",
|
name: "anthropic principle",
|
||||||
nameInfo: "<span id = 'tech-anthropic'></span>",
|
nameInfo: "<span id = 'tech-anthropic'></span>",
|
||||||
addNameInfo() {
|
addNameInfo() {
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
powerUps.research.changeRerolls(0)
|
powerUps.research.changeRerolls(0)
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
@@ -2929,7 +2923,7 @@ const tech = {
|
|||||||
effect() {
|
effect() {
|
||||||
tech.isDeathAvoid = true;
|
tech.isDeathAvoid = true;
|
||||||
tech.isDeathAvoidedThisLevel = false;
|
tech.isDeathAvoidedThisLevel = false;
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
powerUps.research.changeRerolls(0)
|
powerUps.research.changeRerolls(0)
|
||||||
}, 1000);
|
}, 1000);
|
||||||
},
|
},
|
||||||
@@ -3185,7 +3179,7 @@ const tech = {
|
|||||||
for (let i = 0; i < count; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "tech"); // spawn new tech power ups
|
for (let i = 0; i < count; i++) powerUps.spawn(m.pos.x + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "tech"); // spawn new tech power ups
|
||||||
//have state is checked in m.death()
|
//have state is checked in m.death()
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "Occam's razor",
|
name: "Occam's razor",
|
||||||
@@ -3203,7 +3197,7 @@ const tech = {
|
|||||||
},
|
},
|
||||||
requires: "NOT EXPERIMENT MODE, more than 6 tech",
|
requires: "NOT EXPERIMENT MODE, more than 6 tech",
|
||||||
removePercent: 0.5,
|
removePercent: 0.5,
|
||||||
damagePerRemoved: 0.36,
|
damagePerRemoved: 0.4,
|
||||||
effect() {
|
effect() {
|
||||||
let pool = []
|
let pool = []
|
||||||
for (let i = 0, len = tech.tech.length; i < len; i++) { // spawn new tech power ups
|
for (let i = 0, len = tech.tech.length; i < len; i++) { // spawn new tech power ups
|
||||||
@@ -3460,7 +3454,7 @@ const tech = {
|
|||||||
tech.tech[choose].isLost = true
|
tech.tech[choose].isLost = true
|
||||||
simulation.updateTechHUD();
|
simulation.updateTechHUD();
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "monte carlo experiment",
|
name: "monte carlo experiment",
|
||||||
@@ -3479,7 +3473,7 @@ const tech = {
|
|||||||
const removeTotal = tech.removeTech()
|
const removeTotal = tech.removeTech()
|
||||||
for (let i = 0; i < removeTotal + 1; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "tech");
|
for (let i = 0; i < removeTotal + 1; i++) powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "tech");
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "strange attractor",
|
name: "strange attractor",
|
||||||
@@ -3500,7 +3494,7 @@ const tech = {
|
|||||||
powerUps.directSpawn(m.pos.x, m.pos.y, "tech");
|
powerUps.directSpawn(m.pos.x, m.pos.y, "tech");
|
||||||
if (Math.random() < tech.duplicationChance() * 2) powerUps.directSpawn(m.pos.x + 10, m.pos.y + 5, "tech");
|
if (Math.random() < tech.duplicationChance() * 2) powerUps.directSpawn(m.pos.x + 10, m.pos.y + 5, "tech");
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "vector fields",
|
name: "vector fields",
|
||||||
@@ -3551,34 +3545,50 @@ const tech = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
// {
|
||||||
name: "backward induction",
|
// name: "backward induction",
|
||||||
description: `use ${powerUps.orb.research(2)} to <strong>choose</strong> all the unchosen<br> <strong class='color-m'>tech</strong> from your previous <strong class='color-m'>tech</strong> selection`,
|
// descriptionFunction() {
|
||||||
maxCount: 1,
|
// if (build.isExperimentSelection || powerUps.tech.choiceLog.length < 10) return `use ${powerUps.orb.research(2)} to <strong>choose</strong> all the unchosen <strong class='color-m'>tech</strong><br>from your last selection`
|
||||||
count: 0,
|
|
||||||
frequency: 1,
|
// text = ``
|
||||||
frequencyDefault: 1,
|
// let num = 3
|
||||||
isNonRefundable: true,
|
// if (tech.isExtraChoice) num = 5
|
||||||
isBadRandomOption: true,
|
// if (tech.isDeterminism) num = 1
|
||||||
allowed() {
|
// for (let i = 0; i < num; i++) {
|
||||||
return powerUps.tech.choiceLog.length > 10 && !tech.isDeterminism && powerUps.research.count > 1
|
// const index = powerUps.tech.choiceLog[powerUps.tech.choiceLog.length - i - 1]
|
||||||
},
|
// if (index !== powerUps.lastTechIndex && tech.tech[index].count < tech.tech[index].maxCount && tech.tech[index].allowed() && tech.tech[index].name !== "backward induction") {
|
||||||
requires: "NOT EXPERIMENT MODE, rejected an option in the last tech selection, at least 2 research, not determinism",
|
// text += `${tech.tech[index].name}, `
|
||||||
effect: () => {
|
// }
|
||||||
powerUps.research.changeRerolls(-2)
|
// }
|
||||||
let num = 3
|
// text = text.slice(0, -2);
|
||||||
if (tech.isExtraChoice) num = 5
|
// return `use ${powerUps.orb.research(2)}to <strong>choose</strong> the unchosen<br><strong class='color-m'>tech</strong> from your previous selection:<br><em style = 'font-size:${num===5 ? 70 : 85}%;'>${text}</em>`
|
||||||
if (tech.isDeterminism) num = 1
|
// },
|
||||||
for (let i = 0; i < num; i++) {
|
// // description: `use ${powerUps.orb.research(2)}to <strong>choose</strong> all the unchosen<br> <strong class='color-m'>tech</strong> from your previous <strong class='color-m'>tech</strong> selection`,
|
||||||
const index = powerUps.tech.choiceLog[powerUps.tech.choiceLog.length - i - 1]
|
// maxCount: 1,
|
||||||
if (index !== powerUps.lastTechIndex && tech.tech[index].count < tech.tech[index].maxCount && tech.tech[index].allowed() && tech.tech[index].name !== "backward induction") {
|
// count: 0,
|
||||||
tech.giveTech(index)
|
// frequency: 100,
|
||||||
simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[index].name}</span>") <em> //backward induction</em>`);
|
// frequencyDefault: 100,
|
||||||
}
|
// isNonRefundable: true,
|
||||||
}
|
// isBadRandomOption: true,
|
||||||
},
|
// allowed() {
|
||||||
remove() { }
|
// return powerUps.tech.choiceLog.length > 10 && !tech.isDeterminism && powerUps.research.count > 1
|
||||||
},
|
// },
|
||||||
|
// requires: "NOT EXPERIMENT MODE, rejected an option in the last tech selection, at least 2 research, not determinism",
|
||||||
|
// effect: () => {
|
||||||
|
// powerUps.research.changeRerolls(-2)
|
||||||
|
// let num = 3
|
||||||
|
// if (tech.isExtraChoice) num = 5
|
||||||
|
// if (tech.isDeterminism) num = 1
|
||||||
|
// for (let i = 0; i < num; i++) {
|
||||||
|
// const index = powerUps.tech.choiceLog[powerUps.tech.choiceLog.length - i - 1]
|
||||||
|
// if (index !== powerUps.lastTechIndex && tech.tech[index].count < tech.tech[index].maxCount && tech.tech[index].allowed() && tech.tech[index].name !== "backward induction") {
|
||||||
|
// tech.giveTech(index)
|
||||||
|
// simulation.makeTextLog(`<span class='color-var'>tech</span>.giveTech("<span class='color-text'>${tech.tech[index].name}</span>") <em> //backward induction</em>`);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// },
|
||||||
|
// remove() {}
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
name: "unified field theory",
|
name: "unified field theory",
|
||||||
description: `spawn ${powerUps.orb.research(6)}and when <strong>paused</strong><br><strong>clicking</strong> the <strong class='color-f'>field</strong> box switches your <strong class='color-f'>field</strong>`,
|
description: `spawn ${powerUps.orb.research(6)}and when <strong>paused</strong><br><strong>clicking</strong> the <strong class='color-f'>field</strong> box switches your <strong class='color-f'>field</strong>`,
|
||||||
@@ -3961,21 +3971,49 @@ const tech = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "pneumatic hammer",
|
name: "pneumatic hammer",
|
||||||
description: `<strong>rivets</strong> are <strong>20%</strong> larger<br>increases mass and physical <strong class='color-d'>damage</strong>`,
|
description: `<span style = 'font-size:95%;'><strong>rivets</strong>, <strong>slugs</strong>, <strong>needles</strong>, and <strong>nails</strong> are <strong>18%</strong> larger</span><br>increases mass and physical <strong class='color-d'>damage</strong>`,
|
||||||
isGunTech: true,
|
isGunTech: true,
|
||||||
maxCount: 9,
|
maxCount: 9,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 2,
|
frequency: 2,
|
||||||
frequencyDefault: 2,
|
frequencyDefault: 2,
|
||||||
allowed() {
|
allowed() {
|
||||||
return tech.isRivets
|
// return tech.haveGunCheck("nail gun") || tech.isSlugShot
|
||||||
|
return tech.isMineDrop + tech.nailBotCount + tech.fragments + tech.nailsDeathMob + ((tech.haveGunCheck("mine") && !tech.isLaserMine) + (tech.haveGunCheck("nail gun") && !tech.isShieldPierce) + tech.isNeedleShot + tech.isNailShot + tech.isSlugShot) * 2 > 1
|
||||||
},
|
},
|
||||||
requires: "nail gun, rivet gun",
|
requires: "nails, nail gun, rivets, shotgun, slug",
|
||||||
effect() {
|
effect() {
|
||||||
tech.rivetSize += 0.2
|
tech.nailSize += 0.18
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
tech.rivetSize = 1;
|
tech.nailSize = 1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "pneumatic actuator",
|
||||||
|
description: "<strong>nail gun</strong> takes <strong>no</strong> time to ramp up<br>to it's shortest <strong><em>delay</em></strong> after firing",
|
||||||
|
isGunTech: true,
|
||||||
|
maxCount: 1,
|
||||||
|
count: 0,
|
||||||
|
frequency: 2,
|
||||||
|
frequencyDefault: 2,
|
||||||
|
allowed() {
|
||||||
|
return tech.haveGunCheck("nail gun") && !tech.isRivets && !tech.isNeedles && !tech.nailRecoil
|
||||||
|
},
|
||||||
|
requires: "nail gun, not rotary cannon, rivets, or needles",
|
||||||
|
effect() {
|
||||||
|
tech.nailInstantFireRate = true
|
||||||
|
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||||
|
if (b.guns[i].name === "nail gun") b.guns[i].chooseFireMethod()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
remove() {
|
||||||
|
if (tech.nailInstantFireRate) {
|
||||||
|
tech.nailInstantFireRate = false
|
||||||
|
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||||
|
if (b.guns[i].name === "nail gun") b.guns[i].chooseFireMethod()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -4017,33 +4055,6 @@ const tech = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
|
||||||
name: "pneumatic actuator",
|
|
||||||
description: "<strong>nail gun</strong> takes <strong>no</strong> time to ramp up<br>to it's shortest <strong><em>delay</em></strong> after firing",
|
|
||||||
isGunTech: true,
|
|
||||||
maxCount: 1,
|
|
||||||
count: 0,
|
|
||||||
frequency: 2,
|
|
||||||
frequencyDefault: 2,
|
|
||||||
allowed() {
|
|
||||||
return tech.haveGunCheck("nail gun") && !tech.isRivets && !tech.isNeedles && !tech.nailRecoil
|
|
||||||
},
|
|
||||||
requires: "nail gun, not rotary cannon, rivets, or needles",
|
|
||||||
effect() {
|
|
||||||
tech.nailInstantFireRate = true
|
|
||||||
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
|
||||||
if (b.guns[i].name === "nail gun") b.guns[i].chooseFireMethod()
|
|
||||||
}
|
|
||||||
},
|
|
||||||
remove() {
|
|
||||||
if (tech.nailInstantFireRate) {
|
|
||||||
tech.nailInstantFireRate = false
|
|
||||||
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
|
||||||
if (b.guns[i].name === "nail gun") b.guns[i].chooseFireMethod()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
name: "rotary cannon",
|
name: "rotary cannon",
|
||||||
description: "<strong>nail gun</strong> has increased muzzle <strong>speed</strong>,<br>maximum <strong>fire rate</strong>, <strong>accuracy</strong>, and <strong>recoil</strong>",
|
description: "<strong>nail gun</strong> has increased muzzle <strong>speed</strong>,<br>maximum <strong>fire rate</strong>, <strong>accuracy</strong>, and <strong>recoil</strong>",
|
||||||
@@ -4151,8 +4162,8 @@ const tech = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "shotgun spin-statistics",
|
name: "spin-statistics",
|
||||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Spin%E2%80%93statistics_theorem' class="link">shotgun spin-statistics</a>`,
|
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Spin%E2%80%93statistics_theorem' class="link">spin-statistics</a>`,
|
||||||
description: "<strong>immune</strong> to <strong class='color-harm'>harm</strong> while firing the <strong>shotgun</strong><br>shotgun has <strong>50%</strong> fewer shots",
|
description: "<strong>immune</strong> to <strong class='color-harm'>harm</strong> while firing the <strong>shotgun</strong><br>shotgun has <strong>50%</strong> fewer shots",
|
||||||
isGunTech: true,
|
isGunTech: true,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
@@ -4230,7 +4241,7 @@ const tech = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "shotgun slug",
|
name: "slug",
|
||||||
description: "<strong>shotgun</strong> lobs <strong>1</strong> huge <strong>bullet</strong>",
|
description: "<strong>shotgun</strong> lobs <strong>1</strong> huge <strong>bullet</strong>",
|
||||||
isGunTech: true,
|
isGunTech: true,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
@@ -4243,8 +4254,39 @@ const tech = {
|
|||||||
requires: "shotgun, not nail-shot, foam-shot, worm-shot, ice-shot, needle-shot",
|
requires: "shotgun, not nail-shot, foam-shot, worm-shot, ice-shot, needle-shot",
|
||||||
effect() {
|
effect() {
|
||||||
tech.isSlugShot = true;
|
tech.isSlugShot = true;
|
||||||
|
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||||
|
if (b.guns[i].name === "shotgun") {
|
||||||
|
b.guns[i].do = function() {
|
||||||
|
if (!input.field && input.down) {
|
||||||
|
ctx.beginPath()
|
||||||
|
const speed = input.down ? 212 : 160
|
||||||
|
const v = { x: speed * Math.cos(m.angle), y: speed * Math.sin(m.angle) } //m.Vy / 2 + removed to make the path less jerky
|
||||||
|
const where = { x: m.pos.x, y: m.pos.y }
|
||||||
|
for (let i = 0; i < 20; i++) {
|
||||||
|
v.x *= 0.9712
|
||||||
|
v.y = v.y * 0.977 + 9.87
|
||||||
|
where.x += v.x
|
||||||
|
where.y += v.y
|
||||||
|
ctx.lineTo(where.x, where.y)
|
||||||
|
}
|
||||||
|
ctx.strokeStyle = "rgba(68, 68, 68, 0.2)" //color.map
|
||||||
|
ctx.lineWidth = 2
|
||||||
|
ctx.stroke()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
|
if (tech.isSlugShot) {
|
||||||
|
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||||
|
if (b.guns[i].name === "shotgun") {
|
||||||
|
b.guns[i].do = function() {}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
tech.isSlugShot = false;
|
tech.isSlugShot = false;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -4598,6 +4640,7 @@ const tech = {
|
|||||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">missile-bot</a>`,
|
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">missile-bot</a>`,
|
||||||
description: "gain a <strong class='color-bot'>bot</strong> that fires <strong>missiles</strong> at mobs<br>remove your <strong>missile gun</strong>",
|
description: "gain a <strong class='color-bot'>bot</strong> that fires <strong>missiles</strong> at mobs<br>remove your <strong>missile gun</strong>",
|
||||||
isGunTech: true,
|
isGunTech: true,
|
||||||
|
isRemoveGun: true,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 2,
|
frequency: 2,
|
||||||
@@ -4829,8 +4872,8 @@ const tech = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "mycelial fragmentation",
|
name: "mycelial fragmentation",
|
||||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Fungus' class="link">tinsellated flagella</a>`,
|
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Fungus' class="link">mycelial fragmentation</a>`,
|
||||||
description: "<strong class='color-p' style='letter-spacing: 2px;'>sporangium</strong> release <strong>6</strong> extra <strong class='color-p' style='letter-spacing: 2px;'>spores</strong><br>during their <strong>growth</strong> phase",
|
description: "<strong class='color-p' style='letter-spacing: 2px;'>sporangium</strong> release <strong>6</strong> more <strong class='color-p' style='letter-spacing: 2px;'>spores</strong><br>during their <strong>growth</strong> phase",
|
||||||
isGunTech: true,
|
isGunTech: true,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
@@ -4967,6 +5010,7 @@ const tech = {
|
|||||||
name: "fault tolerance",
|
name: "fault tolerance",
|
||||||
description: "spawn <strong>8</strong> <strong>drones</strong> that last <strong>forever</strong><br>remove your <strong>drone gun</strong>",
|
description: "spawn <strong>8</strong> <strong>drones</strong> that last <strong>forever</strong><br>remove your <strong>drone gun</strong>",
|
||||||
isGunTech: true,
|
isGunTech: true,
|
||||||
|
isRemoveGun: true,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 1,
|
frequency: 1,
|
||||||
@@ -5301,6 +5345,7 @@ const tech = {
|
|||||||
name: "surfactant",
|
name: "surfactant",
|
||||||
description: "trade your <strong>foam gun</strong> for <strong>2</strong> <strong class='color-bot'>foam-bots</strong><br>and <strong>upgrade</strong> all bots to foam<br>",
|
description: "trade your <strong>foam gun</strong> for <strong>2</strong> <strong class='color-bot'>foam-bots</strong><br>and <strong>upgrade</strong> all bots to foam<br>",
|
||||||
isGunTech: true,
|
isGunTech: true,
|
||||||
|
isRemoveGun: true,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
frequency: 1,
|
frequency: 1,
|
||||||
@@ -6032,7 +6077,7 @@ const tech = {
|
|||||||
b.randomBot()
|
b.randomBot()
|
||||||
b.randomBot()
|
b.randomBot()
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "bot prototypes",
|
name: "bot prototypes",
|
||||||
@@ -6109,7 +6154,7 @@ const tech = {
|
|||||||
}
|
}
|
||||||
notUpgradedBots[Math.floor(Math.random() * notUpgradedBots.length)]() //choose random function from the array and run it
|
notUpgradedBots[Math.floor(Math.random() * notUpgradedBots.length)]() //choose random function from the array and run it
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "mycelium manufacturing",
|
name: "mycelium manufacturing",
|
||||||
@@ -6310,7 +6355,7 @@ const tech = {
|
|||||||
{
|
{
|
||||||
name: "plasma jet",
|
name: "plasma jet",
|
||||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Plasma_(physics)' class="link">plasma jet</a>`,
|
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Plasma_(physics)' class="link">plasma jet</a>`,
|
||||||
description: `use ${powerUps.orb.research(1)} to increase <strong class='color-plasma'>plasma</strong> <strong>torch</strong> range <strong>50%</strong>`,
|
description: `use ${powerUps.orb.research(2)} to increase <strong class='color-plasma'>plasma</strong> <strong>torch</strong> range <strong>50%</strong>`,
|
||||||
// description: "use <strong>1</strong> <strong class='color-r'>research</strong> to <br>increase <strong class='color-plasma'>plasma</strong> <strong>torch's</strong> range by <strong>50%</strong>",
|
// description: "use <strong>1</strong> <strong class='color-r'>research</strong> to <br>increase <strong class='color-plasma'>plasma</strong> <strong>torch's</strong> range by <strong>50%</strong>",
|
||||||
isFieldTech: true,
|
isFieldTech: true,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
@@ -6318,16 +6363,18 @@ const tech = {
|
|||||||
frequency: 2,
|
frequency: 2,
|
||||||
frequencyDefault: 2,
|
frequencyDefault: 2,
|
||||||
allowed() {
|
allowed() {
|
||||||
return (tech.plasmaBotCount || m.fieldUpgrades[m.fieldMode].name === "plasma torch") && (build.isExperimentSelection || powerUps.research.count > 0)
|
return (tech.plasmaBotCount || m.fieldUpgrades[m.fieldMode].name === "plasma torch") && (build.isExperimentSelection || powerUps.research.count > 1)
|
||||||
},
|
},
|
||||||
requires: "plasma torch",
|
requires: "plasma torch",
|
||||||
effect() {
|
effect() {
|
||||||
tech.isPlasmaRange += 0.5;
|
tech.isPlasmaRange += 0.5;
|
||||||
|
for (let i = 0; i < 2; i++) {
|
||||||
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
|
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
tech.isPlasmaRange = 1;
|
tech.isPlasmaRange = 1;
|
||||||
if (this.count > 0) powerUps.research.changeRerolls(this.count)
|
if (this.count > 0) powerUps.research.changeRerolls(this.count * 2)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -6508,7 +6555,7 @@ const tech = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "symbiosis",
|
name: "symbiosis",
|
||||||
description: "after a <strong>mob</strong> <strong>dies</strong>, lose <strong>1</strong> max <strong class='color-h'>health</strong><br><strong>bosses</strong> spawn <strong>1</strong> extra <strong class='color-m'>tech</strong> after they <strong>die</strong>",
|
description: "after a <strong>mob</strong> <strong>dies</strong>, lose <strong>0.5</strong> max <strong class='color-h'>health</strong><br><strong>bosses</strong> spawn <strong>1</strong> extra <strong class='color-m'>tech</strong> after they <strong>die</strong>",
|
||||||
isFieldTech: true,
|
isFieldTech: true,
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
@@ -6894,7 +6941,7 @@ const tech = {
|
|||||||
effect() {
|
effect() {
|
||||||
m.shipMode()
|
m.shipMode()
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "-quantum leap-",
|
name: "-quantum leap-",
|
||||||
@@ -7118,7 +7165,7 @@ const tech = {
|
|||||||
for (let i = 0; i < b.guns.length; i++) b.guns[i].ammo = b.guns[i].ammo * Math.pow(2, 10)
|
for (let i = 0; i < b.guns.length; i++) b.guns[i].ammo = b.guns[i].ammo * Math.pow(2, 10)
|
||||||
simulation.updateGunHUD();
|
simulation.updateGunHUD();
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "density",
|
name: "density",
|
||||||
@@ -7237,7 +7284,7 @@ const tech = {
|
|||||||
const bc = new BroadcastChannel('planetesimals');
|
const bc = new BroadcastChannel('planetesimals');
|
||||||
bc.activated = false
|
bc.activated = false
|
||||||
|
|
||||||
bc.onmessage = function (ev) {
|
bc.onmessage = function(ev) {
|
||||||
if (ev.data === 'tech') powerUps.directSpawn(m.pos.x, m.pos.y, "tech");
|
if (ev.data === 'tech') powerUps.directSpawn(m.pos.x, m.pos.y, "tech");
|
||||||
if (ev.data === 'death') {
|
if (ev.data === 'death') {
|
||||||
m.death()
|
m.death()
|
||||||
@@ -7249,7 +7296,7 @@ const tech = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "facsimile",
|
name: "facsimile",
|
||||||
@@ -7265,7 +7312,7 @@ const tech = {
|
|||||||
effect() {
|
effect() {
|
||||||
level.levels.splice(level.onLevel, 0, level.levels[level.onLevel]);
|
level.levels.splice(level.onLevel, 0, level.levels[level.onLevel]);
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "negative friction",
|
name: "negative friction",
|
||||||
@@ -7494,7 +7541,7 @@ const tech = {
|
|||||||
effect: () => {
|
effect: () => {
|
||||||
//setup audio context
|
//setup audio context
|
||||||
function tone(frequency) {
|
function tone(frequency) {
|
||||||
const audioCtx = new (window.AudioContext || window.webkitAudioContext)();
|
const audioCtx = new(window.AudioContext || window.webkitAudioContext)();
|
||||||
const oscillator1 = audioCtx.createOscillator();
|
const oscillator1 = audioCtx.createOscillator();
|
||||||
const gainNode1 = audioCtx.createGain();
|
const gainNode1 = audioCtx.createGain();
|
||||||
gainNode1.gain.value = 0.5; //controls volume
|
gainNode1.gain.value = 0.5; //controls volume
|
||||||
@@ -7508,7 +7555,7 @@ const tech = {
|
|||||||
// let sound = tone(1050)
|
// let sound = tone(1050)
|
||||||
|
|
||||||
function EBS() {
|
function EBS() {
|
||||||
const audioCtx = new (window.AudioContext || window.webkitAudioContext)();
|
const audioCtx = new(window.AudioContext || window.webkitAudioContext)();
|
||||||
|
|
||||||
const oscillator1 = audioCtx.createOscillator();
|
const oscillator1 = audioCtx.createOscillator();
|
||||||
const gainNode1 = audioCtx.createGain();
|
const gainNode1 = audioCtx.createGain();
|
||||||
@@ -7573,7 +7620,7 @@ const tech = {
|
|||||||
}, delay);
|
}, delay);
|
||||||
}, delay);
|
}, delay);
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "automatic",
|
name: "automatic",
|
||||||
@@ -7616,7 +7663,7 @@ const tech = {
|
|||||||
document.getElementById("health-bg").style.display = "none"
|
document.getElementById("health-bg").style.display = "none"
|
||||||
for (let i = 0; i < 15; i++) powerUps.spawn(m.pos.x + 160 * (Math.random() - 0.5), m.pos.y + 160 * (Math.random() - 0.5), "heal");
|
for (let i = 0; i < 15; i++) powerUps.spawn(m.pos.x + 160 * (Math.random() - 0.5), m.pos.y + 160 * (Math.random() - 0.5), "heal");
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "not a bug",
|
name: "not a bug",
|
||||||
@@ -7641,7 +7688,7 @@ const tech = {
|
|||||||
|
|
||||||
// for (;;) {} //freezes the tab
|
// for (;;) {} //freezes the tab
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "posture",
|
name: "posture",
|
||||||
@@ -7681,7 +7728,7 @@ const tech = {
|
|||||||
if (m.onGround && !m.crouch) m.yOffGoal = m.yOffWhen.stand
|
if (m.onGround && !m.crouch) m.yOffGoal = m.yOffWhen.stand
|
||||||
}, 100);
|
}, 100);
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "spinor",
|
name: "spinor",
|
||||||
@@ -7697,7 +7744,7 @@ const tech = {
|
|||||||
},
|
},
|
||||||
requires: "",
|
requires: "",
|
||||||
effect() {
|
effect() {
|
||||||
m.look = function () {
|
m.look = function() {
|
||||||
//always on mouse look
|
//always on mouse look
|
||||||
m.angle = (((m.pos.x + m.pos.y) / 100 + Math.PI) % Math.PI * 2) - Math.PI
|
m.angle = (((m.pos.x + m.pos.y) / 100 + Math.PI) % Math.PI * 2) - Math.PI
|
||||||
//smoothed mouse look translations
|
//smoothed mouse look translations
|
||||||
@@ -7754,7 +7801,7 @@ const tech = {
|
|||||||
}
|
}
|
||||||
}, 1000); //every 1 seconds
|
}, 1000); //every 1 seconds
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// name: "inverted mouse",
|
// name: "inverted mouse",
|
||||||
@@ -7825,7 +7872,7 @@ const tech = {
|
|||||||
simulation.makeGunHUD()
|
simulation.makeGunHUD()
|
||||||
powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "gun");
|
powerUps.spawn(m.pos.x + 60 * (Math.random() - 0.5), m.pos.y + 60 * (Math.random() - 0.5), "gun");
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "probability",
|
name: "probability",
|
||||||
@@ -7855,7 +7902,7 @@ const tech = {
|
|||||||
tech.tech[index].frequency = 100
|
tech.tech[index].frequency = 100
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "encryption",
|
name: "encryption",
|
||||||
@@ -7869,7 +7916,7 @@ const tech = {
|
|||||||
allowed() { return true },
|
allowed() { return true },
|
||||||
requires: "",
|
requires: "",
|
||||||
effect() {
|
effect() {
|
||||||
String.prototype.shuffle = function () {
|
String.prototype.shuffle = function() {
|
||||||
var a = this.split(""),
|
var a = this.split(""),
|
||||||
n = a.length;
|
n = a.length;
|
||||||
|
|
||||||
@@ -7884,7 +7931,7 @@ const tech = {
|
|||||||
|
|
||||||
for (let i = 0, len = tech.tech.length; i < len; i++) tech.tech[i].name = tech.tech[i].name.shuffle()
|
for (let i = 0, len = tech.tech.length; i < len; i++) tech.tech[i].name = tech.tech[i].name.shuffle()
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "transparency",
|
name: "transparency",
|
||||||
@@ -7898,9 +7945,9 @@ const tech = {
|
|||||||
allowed() { return true },
|
allowed() { return true },
|
||||||
requires: "",
|
requires: "",
|
||||||
effect() {
|
effect() {
|
||||||
m.draw = () => { }
|
m.draw = () => {}
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "quantum leap",
|
name: "quantum leap",
|
||||||
@@ -7919,7 +7966,7 @@ const tech = {
|
|||||||
simulation.trails()
|
simulation.trails()
|
||||||
}, 20000); //every 30 seconds
|
}, 20000); //every 30 seconds
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "score",
|
name: "score",
|
||||||
@@ -7938,7 +7985,7 @@ const tech = {
|
|||||||
simulation.makeTextLog(`simulation.score <span class='color-symbol'>=</span> ${score.toFixed(0)}`);
|
simulation.makeTextLog(`simulation.score <span class='color-symbol'>=</span> ${score.toFixed(0)}`);
|
||||||
}, 10000); //every 10 seconds
|
}, 10000); //every 10 seconds
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "pop-ups",
|
name: "pop-ups",
|
||||||
@@ -7956,7 +8003,7 @@ const tech = {
|
|||||||
alert(`The best combo is ${tech.tech[Math.floor(Math.random() * tech.tech.length)].name} with ${tech.tech[Math.floor(Math.random() * tech.tech.length)].name}!`);
|
alert(`The best combo is ${tech.tech[Math.floor(Math.random() * tech.tech.length)].name} with ${tech.tech[Math.floor(Math.random() * tech.tech.length)].name}!`);
|
||||||
}, 30000); //every 30 seconds
|
}, 30000); //every 30 seconds
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "music",
|
name: "music",
|
||||||
@@ -7972,7 +8019,7 @@ const tech = {
|
|||||||
effect() {
|
effect() {
|
||||||
window.open('https://www.youtube.com/results?search_query=music', '_blank')
|
window.open('https://www.youtube.com/results?search_query=music', '_blank')
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "performance",
|
name: "performance",
|
||||||
@@ -7986,9 +8033,9 @@ const tech = {
|
|||||||
allowed() { return true },
|
allowed() { return true },
|
||||||
requires: "",
|
requires: "",
|
||||||
effect() {
|
effect() {
|
||||||
(function () {
|
(function() {
|
||||||
var script = document.createElement('script');
|
var script = document.createElement('script');
|
||||||
script.onload = function () {
|
script.onload = function() {
|
||||||
var stats = new Stats();
|
var stats = new Stats();
|
||||||
document.body.appendChild(stats.dom);
|
document.body.appendChild(stats.dom);
|
||||||
requestAnimationFrame(function loop() {
|
requestAnimationFrame(function loop() {
|
||||||
@@ -8003,7 +8050,7 @@ const tech = {
|
|||||||
document.getElementById("health").style.left = "86px"
|
document.getElementById("health").style.left = "86px"
|
||||||
document.getElementById("health-bg").style.left = "86px"
|
document.getElementById("health-bg").style.left = "86px"
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "repartitioning",
|
name: "repartitioning",
|
||||||
@@ -8026,7 +8073,7 @@ const tech = {
|
|||||||
}
|
}
|
||||||
for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x, m.pos.y, "tech");
|
for (let i = 0; i < 5; i++) powerUps.spawn(m.pos.x, m.pos.y, "tech");
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "defragment",
|
name: "defragment",
|
||||||
@@ -8044,7 +8091,7 @@ const tech = {
|
|||||||
if (tech.tech[i].isJunk) tech.tech[i].frequency = 0
|
if (tech.tech[i].isJunk) tech.tech[i].frequency = 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "ship",
|
name: "ship",
|
||||||
@@ -8063,7 +8110,7 @@ const tech = {
|
|||||||
m.shipMode()
|
m.shipMode()
|
||||||
level.difficultyDecrease(simulation.difficultyMode)
|
level.difficultyDecrease(simulation.difficultyMode)
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// name: "lubrication",
|
// name: "lubrication",
|
||||||
@@ -8100,7 +8147,7 @@ const tech = {
|
|||||||
effect() {
|
effect() {
|
||||||
setInterval(() => { if (!simulation.paused) ctx.rotate(0.001 * Math.sin(simulation.cycle * 0.01)) }, 16);
|
setInterval(() => { if (!simulation.paused) ctx.rotate(0.001 * Math.sin(simulation.cycle * 0.01)) }, 16);
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "umbra",
|
name: "umbra",
|
||||||
@@ -8117,7 +8164,7 @@ const tech = {
|
|||||||
ctx.shadowColor = '#06f';
|
ctx.shadowColor = '#06f';
|
||||||
ctx.shadowBlur = 25;
|
ctx.shadowBlur = 25;
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "lighter",
|
name: "lighter",
|
||||||
@@ -8135,7 +8182,7 @@ const tech = {
|
|||||||
effect() {
|
effect() {
|
||||||
ctx.globalCompositeOperation = "lighter";
|
ctx.globalCompositeOperation = "lighter";
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "rewind",
|
name: "rewind",
|
||||||
@@ -8153,7 +8200,7 @@ const tech = {
|
|||||||
setTimeout(() => { m.rewind(120) }, i * 5000);
|
setTimeout(() => { m.rewind(120) }, i * 5000);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "energy to mass conversion",
|
name: "energy to mass conversion",
|
||||||
@@ -8181,7 +8228,7 @@ const tech = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "level.nextLevel()",
|
name: "level.nextLevel()",
|
||||||
@@ -8197,7 +8244,7 @@ const tech = {
|
|||||||
effect() {
|
effect() {
|
||||||
level.nextLevel();
|
level.nextLevel();
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "expert system",
|
name: "expert system",
|
||||||
@@ -8214,7 +8261,7 @@ const tech = {
|
|||||||
powerUps.spawn(m.pos.x, m.pos.y, "tech");
|
powerUps.spawn(m.pos.x, m.pos.y, "tech");
|
||||||
tech.addJunkTechToPool(0.64)
|
tech.addJunkTechToPool(0.64)
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "energy investment",
|
name: "energy investment",
|
||||||
@@ -8238,7 +8285,7 @@ const tech = {
|
|||||||
}, i * 10000);
|
}, i * 10000);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "missile Launching System",
|
name: "missile Launching System",
|
||||||
@@ -8262,7 +8309,7 @@ const tech = {
|
|||||||
}, i * 1000);
|
}, i * 1000);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "grenade production",
|
name: "grenade production",
|
||||||
@@ -8287,7 +8334,7 @@ const tech = {
|
|||||||
}, i * 1000);
|
}, i * 1000);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
// {
|
// {
|
||||||
// name: "inverted input",
|
// name: "inverted input",
|
||||||
@@ -8327,7 +8374,7 @@ const tech = {
|
|||||||
},
|
},
|
||||||
requires: "",
|
requires: "",
|
||||||
effect() {
|
effect() {
|
||||||
m.draw = function () {
|
m.draw = function() {
|
||||||
ctx.fillStyle = m.fillColor;
|
ctx.fillStyle = m.fillColor;
|
||||||
m.walk_cycle += m.flipLegs * m.Vx;
|
m.walk_cycle += m.flipLegs * m.Vx;
|
||||||
|
|
||||||
@@ -8357,7 +8404,7 @@ const tech = {
|
|||||||
m.yOff = m.yOff * 0.85 + m.yOffGoal * 0.15; //smoothly move leg height towards height goal
|
m.yOff = m.yOff * 0.85 + m.yOffGoal * 0.15; //smoothly move leg height towards height goal
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "diegesis",
|
name: "diegesis",
|
||||||
@@ -8373,7 +8420,7 @@ const tech = {
|
|||||||
},
|
},
|
||||||
requires: "",
|
requires: "",
|
||||||
effect() {
|
effect() {
|
||||||
m.draw = function () {
|
m.draw = function() {
|
||||||
ctx.fillStyle = m.fillColor;
|
ctx.fillStyle = m.fillColor;
|
||||||
m.walk_cycle += m.flipLegs * m.Vx;
|
m.walk_cycle += m.flipLegs * m.Vx;
|
||||||
|
|
||||||
@@ -8398,7 +8445,7 @@ const tech = {
|
|||||||
m.yOff = m.yOff * 0.85 + m.yOffGoal * 0.15; //smoothly move leg height towards height goal
|
m.yOff = m.yOff * 0.85 + m.yOffGoal * 0.15; //smoothly move leg height towards height goal
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "pareidolia",
|
name: "pareidolia",
|
||||||
@@ -8414,7 +8461,7 @@ const tech = {
|
|||||||
},
|
},
|
||||||
requires: "",
|
requires: "",
|
||||||
effect() {
|
effect() {
|
||||||
m.draw = function () {
|
m.draw = function() {
|
||||||
ctx.fillStyle = m.fillColor;
|
ctx.fillStyle = m.fillColor;
|
||||||
m.walk_cycle += m.flipLegs * m.Vx;
|
m.walk_cycle += m.flipLegs * m.Vx;
|
||||||
ctx.save();
|
ctx.save();
|
||||||
@@ -8467,7 +8514,7 @@ const tech = {
|
|||||||
m.yOff = m.yOff * 0.85 + m.yOffGoal * 0.15;
|
m.yOff = m.yOff * 0.85 + m.yOffGoal * 0.15;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "prism",
|
name: "prism",
|
||||||
@@ -8486,12 +8533,12 @@ const tech = {
|
|||||||
sat: 100,
|
sat: 100,
|
||||||
light: 50
|
light: 50
|
||||||
}
|
}
|
||||||
setInterval(function () {
|
setInterval(function() {
|
||||||
m.color.hue++
|
m.color.hue++
|
||||||
m.setFillColors()
|
m.setFillColors()
|
||||||
}, 10);
|
}, 10);
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "assimilation",
|
name: "assimilation",
|
||||||
@@ -8550,7 +8597,7 @@ const tech = {
|
|||||||
const index = Math.floor(Math.random() * bots.length)
|
const index = Math.floor(Math.random() * bots.length)
|
||||||
for (let i = 0; i < total; i++) bots[index]()
|
for (let i = 0; i < total; i++) bots[index]()
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "growth hacking",
|
name: "growth hacking",
|
||||||
@@ -8566,7 +8613,7 @@ const tech = {
|
|||||||
effect() {
|
effect() {
|
||||||
level.difficultyIncrease(simulation.difficultyMode)
|
level.difficultyIncrease(simulation.difficultyMode)
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "stun",
|
name: "stun",
|
||||||
@@ -8582,7 +8629,7 @@ const tech = {
|
|||||||
effect() {
|
effect() {
|
||||||
for (let i = 0; i < mob.length; i++) mobs.statusStun(mob[i], 480)
|
for (let i = 0; i < mob.length; i++) mobs.statusStun(mob[i], 480)
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "re-arm",
|
name: "re-arm",
|
||||||
@@ -8610,7 +8657,7 @@ const tech = {
|
|||||||
}
|
}
|
||||||
simulation.makeGunHUD(); //update gun HUD
|
simulation.makeGunHUD(); //update gun HUD
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "re-research",
|
name: "re-research",
|
||||||
@@ -8632,7 +8679,7 @@ const tech = {
|
|||||||
}
|
}
|
||||||
powerUps.research.count = 0
|
powerUps.research.count = 0
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "quantum black hole",
|
name: "quantum black hole",
|
||||||
@@ -8653,7 +8700,7 @@ const tech = {
|
|||||||
powerUps.research.changeRerolls(-4)
|
powerUps.research.changeRerolls(-4)
|
||||||
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span> <span class='color-symbol'>--</span><br>${powerUps.research.count}`)
|
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span> <span class='color-symbol'>--</span><br>${powerUps.research.count}`)
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "black hole cluster",
|
name: "black hole cluster",
|
||||||
@@ -8673,7 +8720,7 @@ const tech = {
|
|||||||
spawn.sucker(where.x, where.y)
|
spawn.sucker(where.x, where.y)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
remove() { }
|
remove() {}
|
||||||
},
|
},
|
||||||
//**************************************************
|
//**************************************************
|
||||||
//************************************************** undefined / lore
|
//************************************************** undefined / lore
|
||||||
@@ -9036,5 +9083,6 @@ const tech = {
|
|||||||
OccamDamage: null,
|
OccamDamage: null,
|
||||||
isAxion: null,
|
isAxion: null,
|
||||||
isWormholeMapIgnore: null,
|
isWormholeMapIgnore: null,
|
||||||
isLessDamageReduction: null
|
isLessDamageReduction: null,
|
||||||
|
nailSize: null
|
||||||
}
|
}
|
||||||
39
todo.txt
39
todo.txt
@@ -1,24 +1,35 @@
|
|||||||
******************************************************** NEXT PATCH **************************************************
|
******************************************************** NEXT PATCH **************************************************
|
||||||
|
|
||||||
tech: affine connection - wormholes can now tunnel through the map at 200% increased energy cost
|
pneumatic hammer (20 -> +18% size and damage effects)
|
||||||
tech: regression - after bullets hit a mob, the mob takes 5% more future damage (0.5% for bosses)
|
now applies to nails, slugs, needles, in addition to rivets
|
||||||
tech: axion - while inside the MACHO halo, 75% of your total harm reduction is added as damage
|
integrated armament 20->25% damage, also if you switch guns converts guntech to new gun
|
||||||
|
backward induction removed
|
||||||
mob: launcherOne - launches 1 big seeker bullet that chases you
|
symbiosis removes 1 -> 0.5 max health per mob kill
|
||||||
black holes boss and final boss spawn big seeker bullets that chases you during the black hole phase
|
plasma jet - costs 1 -> 2 research, and goes a bit farther
|
||||||
|
Occam's razor gives 36 -> 40% damage per removed tech
|
||||||
applied science no longer gives research (just a random tech for every gun you have)
|
|
||||||
bot fabrication increase cost every 5 -> x6 bots
|
|
||||||
|
|
||||||
average console time to disappear is 3 -> 4 seconds
|
|
||||||
ammo power ups no longer log ammo to in game console for performance reasons
|
|
||||||
|
|
||||||
JUNK tech: catabolysis - set max health to 1; double your current ammo 10 times (2^10 = 1024x ammo)
|
|
||||||
|
|
||||||
******************************************************** TODO ********************************************************
|
******************************************************** TODO ********************************************************
|
||||||
|
|
||||||
|
needle benefit from pneumatic hammer?
|
||||||
|
all nails?
|
||||||
|
|
||||||
|
total guntech:
|
||||||
|
nail gun needle @ 4
|
||||||
|
base nail gun @ 5
|
||||||
|
|
||||||
new late game level that is easier if you can: platform well, jump high, immune to slime, wormhole through walls, fly fast
|
new late game level that is easier if you can: platform well, jump high, immune to slime, wormhole through walls, fly fast
|
||||||
climb vertically to avoid rising slime
|
climb vertically to avoid rising slime
|
||||||
|
populate with multiple boss mobs that can't drop tech
|
||||||
|
bosses spawn in pairs
|
||||||
|
|
||||||
|
antimatter (assuming something else isn't already named this); requires negative mass, causes damage to self and enemies within range while active
|
||||||
|
|
||||||
|
increase mass and movement speed at the same time
|
||||||
|
increase jump differently because it scales extra with mass
|
||||||
|
m.defaultMass = 4.5
|
||||||
|
m.definePlayerMass()
|
||||||
|
|
||||||
|
give history boss legs?
|
||||||
|
|
||||||
field tech - disable blocking, but does high damage to mobs inside field
|
field tech - disable blocking, but does high damage to mobs inside field
|
||||||
and maybe slows mobs it damages
|
and maybe slows mobs it damages
|
||||||
|
|||||||
Reference in New Issue
Block a user