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();
|
||||
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) {
|
||||
for (let i = 0; i < b.guns.length; i++) {
|
||||
@@ -1111,7 +1144,7 @@ const b = {
|
||||
b.guns[gunIndex].do = function() {}
|
||||
} else {
|
||||
if (gunIndex) b.guns[gunIndex].do = function() {
|
||||
if (!input.field) {
|
||||
if (!input.field && input.down) {
|
||||
const cycles = 80
|
||||
const speed = input.down ? 35 : 20 //input.down ? 43 : 32
|
||||
const g = input.down ? 0.137 : 0.135
|
||||
@@ -1137,7 +1170,7 @@ const b = {
|
||||
} else if (tech.isVacuumBomb) {
|
||||
b.grenade = grenadeVacuum
|
||||
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 speed = input.down ? 44 : 35
|
||||
const v = { x: speed * Math.cos(m.angle), y: speed * Math.sin(m.angle) }
|
||||
@@ -1154,7 +1187,7 @@ const b = {
|
||||
} else {
|
||||
b.grenade = grenadeDefault
|
||||
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 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
|
||||
@@ -1738,7 +1771,7 @@ const b = {
|
||||
m.energy = 0;
|
||||
}
|
||||
b.isExtruderOn = true
|
||||
const SPEED = 8 + 8 * tech.isPlasmaRange
|
||||
const SPEED = 8 + 12 * tech.isPlasmaRange
|
||||
const me = bullet.length;
|
||||
const where = Vector.add(m.pos, player.velocity)
|
||||
bullet[me] = Bodies.polygon(where.x + 20 * Math.cos(m.angle), where.y + 20 * Math.sin(m.angle), 4, 0.01, {
|
||||
@@ -3253,8 +3286,9 @@ const b = {
|
||||
}
|
||||
},
|
||||
nail(pos, velocity, dmg = 1) {
|
||||
dmg *= tech.nailSize
|
||||
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);
|
||||
Composite.add(engine.world, bullet[me]); //add bullet to world
|
||||
bullet[me].endCycle = simulation.cycle + 60 + 18 * Math.random();
|
||||
@@ -3269,7 +3303,7 @@ const b = {
|
||||
},
|
||||
needle(angle = m.angle) {
|
||||
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
|
||||
Matter.Body.setDensity(bullet[me], 0.00001); //0.001 is normal
|
||||
bullet[me].endCycle = simulation.cycle + 100;
|
||||
@@ -3289,12 +3323,12 @@ const b = {
|
||||
}
|
||||
if (!immune) {
|
||||
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
|
||||
let dmg = b.dmgScale * 6
|
||||
let dmg = b.dmgScale * 6 * tech.nailSize
|
||||
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
|
||||
}
|
||||
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
|
||||
|
||||
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].dmg = tech.isNailRadiation ? 0 : 2.75
|
||||
Matter.Body.setDensity(bullet[me], 0.002);
|
||||
@@ -4427,7 +4461,7 @@ const b = {
|
||||
m.fireCDcycle = m.cycle + Math.floor(CD * b.fireCDscale); // cool down
|
||||
|
||||
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].dmg = tech.isNailRadiation ? 0 : 2.75
|
||||
Matter.Body.setDensity(bullet[me], 0.002);
|
||||
@@ -4557,15 +4591,15 @@ const b = {
|
||||
|
||||
if (tech.isSlugShot) {
|
||||
const me = bullet.length;
|
||||
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));
|
||||
// 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 * tech.nailSize, 27 * tech.nailSize, b.fireAttributes(m.angle));
|
||||
|
||||
Matter.Body.setDensity(bullet[me], 0.007 * (tech.isShotgunReversed ? 1.6 : 1));
|
||||
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], {
|
||||
x: SPEED * Math.cos(dir),
|
||||
y: SPEED * Math.sin(dir)
|
||||
x: SPEED * Math.cos(m.angle),
|
||||
y: SPEED * Math.sin(m.angle)
|
||||
});
|
||||
if (tech.isIncendiary) {
|
||||
bullet[me].endCycle = simulation.cycle + 60
|
||||
@@ -4581,27 +4615,22 @@ const b = {
|
||||
bullet[me].minDmgSpeed = 7
|
||||
// bullet[me].restitution = 0.4
|
||||
bullet[me].frictionAir = 0.006;
|
||||
bullet[me].turnMag = 0.04 * Math.pow(tech.nailSize, 3.75)
|
||||
bullet[me].do = function() {
|
||||
this.force.y += this.mass * 0.0022
|
||||
|
||||
//rotates bullet to face current velocity?
|
||||
if (this.speed > 6) {
|
||||
const facing = {
|
||||
x: Math.cos(this.angle),
|
||||
y: Math.sin(this.angle)
|
||||
}
|
||||
const mag = 0.04
|
||||
if (this.speed > 6) { //rotates bullet to face current velocity?
|
||||
const facing = { x: Math.cos(this.angle), y: Math.sin(this.angle) }
|
||||
if (Vector.cross(Vector.normalise(this.velocity), facing) < 0) {
|
||||
this.torque += mag
|
||||
this.torque += this.turnMag
|
||||
} else {
|
||||
this.torque -= mag
|
||||
this.torque -= this.turnMag
|
||||
}
|
||||
}
|
||||
};
|
||||
if (tech.fragments) {
|
||||
bullet[me].beforeDmg = function() {
|
||||
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
|
||||
}
|
||||
}
|
||||
@@ -6507,47 +6536,47 @@ const b = {
|
||||
// },
|
||||
},
|
||||
],
|
||||
gunRewind: { //this gun is added with a tech
|
||||
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",
|
||||
ammo: 0,
|
||||
ammoPack: Infinity,
|
||||
have: false,
|
||||
isRewinding: false,
|
||||
lastFireCycle: 0,
|
||||
holdCount: 0,
|
||||
activeGunIndex: null,
|
||||
do() {},
|
||||
fire() {
|
||||
if (this.lastFireCycle === m.cycle - 1) { //button has been held down
|
||||
this.rewindCount += 8;
|
||||
const DRAIN = 0.01
|
||||
let history = m.history[(m.cycle - this.rewindCount) % 600]
|
||||
if (this.rewindCount > 599 || m.energy < DRAIN || history.activeGun !== this.activeGunIndex) {
|
||||
this.rewindCount = 0;
|
||||
m.resetHistory();
|
||||
m.fireCDcycle = m.cycle + Math.floor(120 * b.fireCDscale); // cool down
|
||||
} else {
|
||||
m.energy -= DRAIN
|
||||
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.setVelocity(player, { x: history.velocity.x, y: history.velocity.y });
|
||||
if (m.health !== history.health) {
|
||||
m.health = history.health
|
||||
m.displayHealth();
|
||||
}
|
||||
m.yOff = history.yOff
|
||||
if (m.yOff < 48) {
|
||||
m.doCrouch()
|
||||
} else {
|
||||
m.undoCrouch()
|
||||
}
|
||||
}
|
||||
} else { //button is held the first time
|
||||
this.rewindCount = 0;
|
||||
this.activeGunIndex = b.activeGun
|
||||
}
|
||||
this.lastFireCycle = m.cycle;
|
||||
}
|
||||
}
|
||||
// gunRewind: { //this gun is added with a tech
|
||||
// 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",
|
||||
// ammo: 0,
|
||||
// ammoPack: Infinity,
|
||||
// have: false,
|
||||
// isRewinding: false,
|
||||
// lastFireCycle: 0,
|
||||
// holdCount: 0,
|
||||
// activeGunIndex: null,
|
||||
// do() {},
|
||||
// fire() {
|
||||
// if (this.lastFireCycle === m.cycle - 1) { //button has been held down
|
||||
// this.rewindCount += 8;
|
||||
// const DRAIN = 0.01
|
||||
// let history = m.history[(m.cycle - this.rewindCount) % 600]
|
||||
// if (this.rewindCount > 599 || m.energy < DRAIN || history.activeGun !== this.activeGunIndex) {
|
||||
// this.rewindCount = 0;
|
||||
// m.resetHistory();
|
||||
// m.fireCDcycle = m.cycle + Math.floor(120 * b.fireCDscale); // cool down
|
||||
// } else {
|
||||
// m.energy -= DRAIN
|
||||
// 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.setVelocity(player, { x: history.velocity.x, y: history.velocity.y });
|
||||
// if (m.health !== history.health) {
|
||||
// m.health = history.health
|
||||
// m.displayHealth();
|
||||
// }
|
||||
// m.yOff = history.yOff
|
||||
// if (m.yOff < 48) {
|
||||
// m.doCrouch()
|
||||
// } else {
|
||||
// m.undoCrouch()
|
||||
// }
|
||||
// }
|
||||
// } else { //button is held the first time
|
||||
// this.rewindCount = 0;
|
||||
// this.activeGunIndex = b.activeGun
|
||||
// }
|
||||
// this.lastFireCycle = m.cycle;
|
||||
// }
|
||||
// }
|
||||
};
|
||||
@@ -17,10 +17,10 @@ const level = {
|
||||
// level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why
|
||||
// simulation.isHorizontalFlipped = true
|
||||
// m.setField("wormhole")
|
||||
// b.giveGuns("laser")
|
||||
// b.giveGuns("shotgun")
|
||||
// b.giveGuns("nail gun")
|
||||
// b.giveGuns("harpoon")
|
||||
// tech.giveTech("affine connection")
|
||||
// tech.giveTech("slug")
|
||||
// tech.giveTech("regression")
|
||||
// tech.giveTech("relativistic momentum")
|
||||
// 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 < 3; i++) tech.giveTech("undefined")
|
||||
// lore.techCount = 3
|
||||
|
||||
// simulation.isCheating = false //true;
|
||||
// localSettings.loreCount = 3; //this sets what conversation is heard
|
||||
// localStorage.setItem("localSettings", JSON.stringify(localSettings)); //update local storage
|
||||
|
||||
@@ -1149,7 +1149,7 @@ const mobs = {
|
||||
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 {
|
||||
const amount = 0.01
|
||||
const amount = 0.005
|
||||
if (tech.isEnergyHealth) {
|
||||
if (m.maxEnergy > amount) {
|
||||
tech.healMaxEnergyBonus -= amount
|
||||
|
||||
@@ -133,7 +133,7 @@ const m = {
|
||||
transX: 0,
|
||||
transY: 0,
|
||||
history: [], //tracks the last second of player position
|
||||
rewindCount: 0, //used with CPT gun
|
||||
rewindCount: 0, //used with CPT
|
||||
resetHistory() {
|
||||
for (let i = 0; i < 600; i++) { //reset history
|
||||
m.history[i] = {
|
||||
|
||||
@@ -16,10 +16,10 @@ const spawn = {
|
||||
"stabber", "stabber",
|
||||
"springer", "springer",
|
||||
"pulsar", "pulsar",
|
||||
"exploder",
|
||||
"sneaker",
|
||||
"launcher",
|
||||
"launcherOne",
|
||||
"exploder",
|
||||
"sneaker",
|
||||
"sucker",
|
||||
"sniper",
|
||||
"spinner",
|
||||
|
||||
212
js/tech.js
212
js/tech.js
@@ -289,26 +289,20 @@ const tech = {
|
||||
tech: [{
|
||||
name: "integrated armament",
|
||||
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,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
allowed() {
|
||||
return b.inventory.length === 1 //&& !tech.haveGunCheck("CPT gun")
|
||||
return b.inventory.length === 1
|
||||
},
|
||||
requires: "only 1 gun",
|
||||
effect() {
|
||||
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() {
|
||||
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>`
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -406,7 +400,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
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,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -458,7 +452,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
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,
|
||||
count: 0,
|
||||
isNonRefundable: true,
|
||||
@@ -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>",
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
@@ -3203,7 +3197,7 @@ const tech = {
|
||||
},
|
||||
requires: "NOT EXPERIMENT MODE, more than 6 tech",
|
||||
removePercent: 0.5,
|
||||
damagePerRemoved: 0.36,
|
||||
damagePerRemoved: 0.4,
|
||||
effect() {
|
||||
let pool = []
|
||||
for (let i = 0, len = tech.tech.length; i < len; i++) { // spawn new tech power ups
|
||||
@@ -3551,34 +3545,50 @@ const tech = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
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`,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
isNonRefundable: true,
|
||||
isBadRandomOption: true,
|
||||
allowed() {
|
||||
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: "backward induction",
|
||||
// descriptionFunction() {
|
||||
// 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`
|
||||
|
||||
// text = ``
|
||||
// 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") {
|
||||
// text += `${tech.tech[index].name}, `
|
||||
// }
|
||||
// }
|
||||
// text = text.slice(0, -2);
|
||||
// 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>`
|
||||
// },
|
||||
// // 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`,
|
||||
// maxCount: 1,
|
||||
// count: 0,
|
||||
// frequency: 100,
|
||||
// frequencyDefault: 100,
|
||||
// isNonRefundable: true,
|
||||
// isBadRandomOption: true,
|
||||
// allowed() {
|
||||
// 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",
|
||||
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",
|
||||
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,
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
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() {
|
||||
tech.rivetSize += 0.2
|
||||
tech.nailSize += 0.18
|
||||
},
|
||||
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",
|
||||
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",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Spin%E2%80%93statistics_theorem' class="link">shotgun spin-statistics</a>`,
|
||||
name: "spin-statistics",
|
||||
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",
|
||||
isGunTech: true,
|
||||
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>",
|
||||
isGunTech: true,
|
||||
maxCount: 1,
|
||||
@@ -4243,8 +4254,39 @@ const tech = {
|
||||
requires: "shotgun, not nail-shot, foam-shot, worm-shot, ice-shot, needle-shot",
|
||||
effect() {
|
||||
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() {
|
||||
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;
|
||||
}
|
||||
},
|
||||
@@ -4598,6 +4640,7 @@ const tech = {
|
||||
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>",
|
||||
isGunTech: true,
|
||||
isRemoveGun: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
@@ -4829,8 +4872,8 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "mycelial fragmentation",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Fungus' class="link">tinsellated flagella</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",
|
||||
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> more <strong class='color-p' style='letter-spacing: 2px;'>spores</strong><br>during their <strong>growth</strong> phase",
|
||||
isGunTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
@@ -4967,6 +5010,7 @@ const tech = {
|
||||
name: "fault tolerance",
|
||||
description: "spawn <strong>8</strong> <strong>drones</strong> that last <strong>forever</strong><br>remove your <strong>drone gun</strong>",
|
||||
isGunTech: true,
|
||||
isRemoveGun: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -5301,6 +5345,7 @@ const tech = {
|
||||
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>",
|
||||
isGunTech: true,
|
||||
isRemoveGun: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
@@ -6310,7 +6355,7 @@ const tech = {
|
||||
{
|
||||
name: "plasma jet",
|
||||
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>",
|
||||
isFieldTech: true,
|
||||
maxCount: 1,
|
||||
@@ -6318,16 +6363,18 @@ const tech = {
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
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",
|
||||
effect() {
|
||||
tech.isPlasmaRange += 0.5;
|
||||
for (let i = 0; i < 2; i++) {
|
||||
if (powerUps.research.count > 0) powerUps.research.changeRerolls(-1)
|
||||
}
|
||||
},
|
||||
remove() {
|
||||
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",
|
||||
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,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
@@ -9036,5 +9083,6 @@ const tech = {
|
||||
OccamDamage: null,
|
||||
isAxion: null,
|
||||
isWormholeMapIgnore: null,
|
||||
isLessDamageReduction: null
|
||||
isLessDamageReduction: null,
|
||||
nailSize: null
|
||||
}
|
||||
39
todo.txt
39
todo.txt
@@ -1,24 +1,35 @@
|
||||
******************************************************** NEXT PATCH **************************************************
|
||||
|
||||
tech: affine connection - wormholes can now tunnel through the map at 200% increased energy cost
|
||||
tech: regression - after bullets hit a mob, the mob takes 5% more future damage (0.5% for bosses)
|
||||
tech: axion - while inside the MACHO halo, 75% of your total harm reduction is added as damage
|
||||
|
||||
mob: launcherOne - launches 1 big seeker bullet that chases you
|
||||
black holes boss and final boss spawn big seeker bullets that chases you during the black hole phase
|
||||
|
||||
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)
|
||||
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
|
||||
|
||||
******************************************************** 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
|
||||
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
|
||||
and maybe slows mobs it damages
|
||||
|
||||
Reference in New Issue
Block a user