cherenkov radiation
tech: cherenkov radiation - bremsstrahlung damage is increased by 300% over 6 seconds bremsstrahlung does 2->3 damage, and also applies to block collisions tech: nuclear transmutation - radiation sources do 70% more damage and harm enthalpy now drops heal power ups instead of directly healing you foam-shot has 13->15 particles, is slower, and less spread bug fixes
This commit is contained in:
44
js/bullet.js
44
js/bullet.js
@@ -381,7 +381,7 @@ const b = {
|
||||
if (m.immuneCycle < m.cycle) m.energy -= DRAIN
|
||||
if (m.energy < 0) {
|
||||
m.energy = 0
|
||||
if (simulation.dmgScale) m.damage(0.03 * (tech.isRadioactiveResistance ? 0.25 : 1));
|
||||
if (simulation.dmgScale) m.damage(tech.radioactiveDamage * 0.03 * (tech.isRadioactiveResistance ? 0.25 : 1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -431,10 +431,10 @@ const b = {
|
||||
// const mitigate = Math.min(1, Math.max(1 - m.energy * 0.5, 0))
|
||||
m.energy -= 0.15
|
||||
m.damage(0.01 * harm); //remove 99% of the damage 1-0.99
|
||||
console.log(Math.max(0, Math.min(0.15 - 0.01 * player.speed, 0.15)))
|
||||
knock = Vector.mult(Vector.normalise(sub), -player.mass * Math.max(0, Math.min(0.15 - 0.002 * player.speed, 0.15)));
|
||||
// console.log(Math.max(0, Math.min(0.15 - 0.01 * player.speed, 0.15)))
|
||||
knock = Vector.mult(Vector.normalise(sub), -0.6 * player.mass * Math.max(0, Math.min(0.15 - 0.002 * player.speed, 0.15)));
|
||||
player.force.x = knock.x; // not += so crazy forces can't build up with MIRV
|
||||
player.force.y = knock.y;
|
||||
player.force.y = knock.y - 0.3; //some extra vertical kick
|
||||
} else {
|
||||
if (simulation.dmgScale) m.damage(harm);
|
||||
knock = Vector.mult(Vector.normalise(sub), -Math.sqrt(dmg) * player.mass * 0.013);
|
||||
@@ -1090,21 +1090,20 @@ const b = {
|
||||
} else {
|
||||
//aoe damage to player
|
||||
if (Vector.magnitude(Vector.sub(player.position, this.position)) < this.damageRadius) {
|
||||
const DRAIN = tech.isRadioactiveResistance ? 0.0025 * 0.25 : 0.0025
|
||||
const DRAIN = (tech.isRadioactiveResistance ? 0.0025 * 0.25 : 0.0025)
|
||||
if (m.energy > DRAIN) {
|
||||
if (m.immuneCycle < m.cycle) m.energy -= DRAIN
|
||||
} else {
|
||||
m.energy = 0;
|
||||
if (simulation.dmgScale) m.damage(tech.isRadioactiveResistance ? 0.00016 * 0.25 : 0.00016) //0.00015
|
||||
if (simulation.dmgScale) m.damage((tech.isRadioactiveResistance ? 0.00016 * 0.25 : 0.00016) * tech.radioactiveDamage) //0.00015
|
||||
}
|
||||
}
|
||||
//aoe damage to mobs
|
||||
const dmg = m.dmgScale * 0.11 * tech.radioactiveDamage
|
||||
for (let i = 0, len = mob.length; i < len; i++) {
|
||||
if (Vector.magnitude(Vector.sub(mob[i].position, this.position)) < this.damageRadius + mob[i].radius) {
|
||||
let dmg = m.dmgScale * 0.11
|
||||
if (Matter.Query.ray(map, mob[i].position, this.position).length > 0) dmg *= 0.25 //reduce damage if a wall is in the way
|
||||
if (mob[i].shield) dmg *= 3 //to make up for the /5 that shields normally take
|
||||
mob[i].damage(dmg);
|
||||
mob[i].damage(mob[i].shield ? dmg * 3 : dmg);
|
||||
mob[i].locatePlayer();
|
||||
if (tech.isNeutronSlow && mob[i].speed > 4) {
|
||||
Matter.Body.setVelocity(mob[i], {
|
||||
@@ -3199,16 +3198,15 @@ const b = {
|
||||
if (m.immuneCycle < m.cycle) m.energy -= DRAIN
|
||||
} else {
|
||||
m.energy = 0;
|
||||
if (simulation.dmgScale) m.damage(tech.isRadioactiveResistance ? 0.00015 * 0.25 : 0.00015) //0.00015
|
||||
if (simulation.dmgScale) m.damage((tech.isRadioactiveResistance ? 0.00015 * 0.25 : 0.00015) * tech.radioactiveDamage) //0.00015
|
||||
}
|
||||
}
|
||||
//aoe damage to mobs
|
||||
const dmg = (0.12 + 0.04 * tech.isFastDrones) * m.dmgScale * tech.droneRadioDamage * tech.radioactiveDamage
|
||||
for (let i = 0, len = mob.length; i < len; i++) {
|
||||
if (Vector.magnitude(Vector.sub(mob[i].position, this.position)) < this.radioRadius + mob[i].radius) {
|
||||
let dmg = (0.12 + 0.04 * tech.isFastDrones) * m.dmgScale * tech.droneRadioDamage //neutron bombs dmg = 0.09
|
||||
if (Matter.Query.ray(map, mob[i].position, this.position).length > 0) dmg *= 0.25 //reduce damage if a wall is in the way
|
||||
if (mob[i].shield) dmg *= 3 // to make up for the /5 that shields normally take
|
||||
mob[i].damage(dmg);
|
||||
mob[i].damage(mob[i].shield ? dmg * 3 : dmg);
|
||||
mob[i].locatePlayer();
|
||||
}
|
||||
}
|
||||
@@ -3522,7 +3520,7 @@ const b = {
|
||||
inertia: Infinity,
|
||||
frictionAir: 0.003,
|
||||
dmg: 0, //damage on impact
|
||||
damage: tech.foamDamage * (tech.isFastFoam ? 2.5 : 1) * (tech.isBulletTeleport ? 1.43 : 1), //damage done over time
|
||||
damage: tech.foamDamage * (tech.isFastFoam ? 2.5 : 1) * (tech.isBulletTeleport ? 1.47 : 1), //damage done over time
|
||||
scale: 1 - 0.006 / tech.isBulletsLastLonger * (tech.isFastFoam ? 1.65 : 1),
|
||||
classType: "bullet",
|
||||
collisionFilter: {
|
||||
@@ -3536,7 +3534,7 @@ const b = {
|
||||
target: null,
|
||||
targetVertex: null,
|
||||
targetRelativePosition: null,
|
||||
portFrequency: 5 + Math.floor(5 * Math.random()),
|
||||
portFrequency: 7 + Math.floor(5 * Math.random()),
|
||||
nextPortCycle: Infinity, //disabled unless you have the teleport tech
|
||||
beforeDmg(who) {
|
||||
if (!this.target && who.alive) {
|
||||
@@ -3696,7 +3694,7 @@ const b = {
|
||||
}
|
||||
if (this.nextPortCycle < simulation.cycle) { //teleport around if you have tech.isBulletTeleport
|
||||
this.nextPortCycle = simulation.cycle + this.portFrequency
|
||||
const range = 15 * Math.sqrt(this.radius) * Math.random()
|
||||
const range = 13 * Math.sqrt(this.radius) * Math.random()
|
||||
Matter.Body.setPosition(this, Vector.add(this.position, Vector.rotate({ x: range, y: 0 }, 2 * Math.PI * Math.random())))
|
||||
}
|
||||
}
|
||||
@@ -5146,11 +5144,11 @@ const b = {
|
||||
let knock, spread
|
||||
if (input.down) {
|
||||
spread = 0.65
|
||||
m.fireCDcycle = m.cycle + Math.floor(69 * b.fireCDscale) // cool down
|
||||
m.fireCDcycle = m.cycle + Math.floor(73 * b.fireCDscale) // cool down
|
||||
if (tech.isShotgunImmune && m.immuneCycle < m.cycle + Math.floor(60 * b.fireCDscale)) m.immuneCycle = m.cycle + Math.floor(60 * b.fireCDscale); //player is immune to damage for 30 cycles
|
||||
knock = 0.01
|
||||
} else {
|
||||
m.fireCDcycle = m.cycle + Math.floor(53 * b.fireCDscale) // cool down
|
||||
m.fireCDcycle = m.cycle + Math.floor(56 * b.fireCDscale) // cool down
|
||||
if (tech.isShotgunImmune && m.immuneCycle < m.cycle + Math.floor(47 * b.fireCDscale)) m.immuneCycle = m.cycle + Math.floor(47 * b.fireCDscale); //player is immune to damage for 30 cycles
|
||||
spread = 1.3
|
||||
knock = 0.1
|
||||
@@ -5160,7 +5158,7 @@ const b = {
|
||||
player.force.x += 4 * knock * Math.cos(m.angle)
|
||||
player.force.y += 4 * knock * Math.sin(m.angle) - 6 * player.mass * simulation.g
|
||||
} else if (tech.isShotgunRecoil) {
|
||||
m.fireCDcycle -= 0.66 * (45 * b.fireCDscale)
|
||||
m.fireCDcycle -= 0.66 * (56 * b.fireCDscale)
|
||||
player.force.x -= 2 * knock * Math.cos(m.angle)
|
||||
player.force.y -= 2 * knock * Math.sin(m.angle)
|
||||
} else {
|
||||
@@ -5294,16 +5292,16 @@ const b = {
|
||||
b.iceIX(25 + 20 * Math.random(), m.angle + spread * (Math.random() - 0.5))
|
||||
}
|
||||
} else if (tech.isFoamShot) {
|
||||
const spread = (input.down ? 0.35 : 0.7)
|
||||
const spread = (input.down ? 0.2 : 0.6)
|
||||
const where = {
|
||||
x: m.pos.x + 25 * Math.cos(m.angle),
|
||||
y: m.pos.y + 25 * Math.sin(m.angle)
|
||||
}
|
||||
const number = 13 * (tech.isShotgunReversed ? 1.6 : 1)
|
||||
const number = 15 * (tech.isShotgunReversed ? 1.6 : 1)
|
||||
for (let i = 0; i < number; i++) {
|
||||
const SPEED = 25 + 12 * Math.random();
|
||||
const SPEED = 13 + 4 * Math.random();
|
||||
const angle = m.angle + spread * (Math.random() - 0.5)
|
||||
b.foam(where, { x: SPEED * Math.cos(angle), y: SPEED * Math.sin(angle) }, 5 + 8 * Math.random())
|
||||
b.foam(where, { x: SPEED * Math.cos(angle), y: SPEED * Math.sin(angle) }, 6 + 8 * Math.random())
|
||||
}
|
||||
} else if (tech.isNeedles) {
|
||||
const number = 9 * (tech.isShotgunReversed ? 1.6 : 1)
|
||||
|
||||
18
js/engine.js
18
js/engine.js
@@ -197,9 +197,25 @@ function collisionChecks(event) {
|
||||
if (obj.classType === "body" && obj.speed > 6) {
|
||||
const v = Vector.magnitude(Vector.sub(mob[k].velocity, obj.velocity));
|
||||
if (v > 9) {
|
||||
if (tech.blockDmg) { //electricity
|
||||
Matter.Body.setVelocity(mob[k], { x: 0.5 * mob[k].velocity.x, y: 0.5 * mob[k].velocity.y });
|
||||
if (tech.isBlockRadiation && !mob[k].isShielded && !mob[k].isMobBullet) {
|
||||
mobs.statusDoT(mob[k], tech.blockDmg * m.dmgScale * 4 / 12, 360) //200% increase -> x (1+2) //over 7s -> 360/30 = 12 half seconds -> 3/12
|
||||
} else {
|
||||
mob[k].damage(tech.blockDmg * m.dmgScale)
|
||||
simulation.drawList.push({
|
||||
x: pairs[i].activeContacts[0].vertex.x,
|
||||
y: pairs[i].activeContacts[0].vertex.y,
|
||||
radius: 28 * mob[k].damageReduction + 3,
|
||||
color: "rgba(255,0,255,0.8)",
|
||||
time: 4
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
let dmg = tech.blockDamage * m.dmgScale * v * obj.mass * (tech.isMobBlockFling ? 2.5 : 1) * (tech.isBlockRestitution ? 2.5 : 1);
|
||||
if (mob[k].isShielded) dmg *= 0.7
|
||||
// console.log(dmg)
|
||||
|
||||
mob[k].damage(dmg, true);
|
||||
if (tech.isBlockPowerUps && !mob[k].alive && mob[k].isDropPowerUp && m.throwCycle > m.cycle) {
|
||||
let type = tech.isEnergyNoAmmo ? "heal" : "ammo"
|
||||
|
||||
@@ -314,8 +314,13 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>": ""}
|
||||
document.getElementById("tech").style.display = "inline"
|
||||
document.getElementById("guns").style.display = "inline"
|
||||
document.getElementById("field").style.display = "inline"
|
||||
document.getElementById("health").style.display = "inline"
|
||||
document.getElementById("health-bg").style.display = "inline"
|
||||
if (tech.isEnergyHealth) {
|
||||
document.getElementById("health").style.display = "none"
|
||||
document.getElementById("health-bg").style.display = "none"
|
||||
} else {
|
||||
document.getElementById("health").style.display = "inline"
|
||||
document.getElementById("health-bg").style.display = "inline"
|
||||
}
|
||||
// document.body.style.overflow = "hidden"
|
||||
document.getElementById("pause-grid-left").style.display = "none"
|
||||
document.getElementById("pause-grid-right").style.display = "none"
|
||||
|
||||
10
js/level.js
10
js/level.js
@@ -16,11 +16,11 @@ const level = {
|
||||
start() {
|
||||
if (level.levelsCleared === 0) { //this code only runs on the first level
|
||||
// simulation.isHorizontalFlipped = true
|
||||
// m.setField("plasma torch")
|
||||
// b.giveGuns("grenades")
|
||||
// tech.giveTech("rocket-propelled grenade")
|
||||
// tech.giveTech("electric armor")
|
||||
// tech.giveTech("plasma ball")
|
||||
// m.setField("perfect diamagnetism")
|
||||
// b.giveGuns("shotgun")
|
||||
// tech.giveTech("bremsstrahlung")
|
||||
// tech.giveTech("cherenkov radiation")
|
||||
// tech.giveTech("enthalpy")
|
||||
// tech.giveTech("rule 30")
|
||||
// for (let i = 0; i < 10; i++) tech.giveTech("replication")
|
||||
// tech.giveTech("decoherence")
|
||||
|
||||
10
js/mob.js
10
js/mob.js
@@ -157,7 +157,7 @@ const mobs = {
|
||||
who.status.push({
|
||||
effect() {
|
||||
if ((simulation.cycle - this.startCycle) % 30 === 0) {
|
||||
let dmg = m.dmgScale * this.dmg
|
||||
let dmg = m.dmgScale * this.dmg * tech.radioactiveDamage
|
||||
who.damage(dmg);
|
||||
if (who.damageReduction) {
|
||||
simulation.drawList.push({ //add dmg to draw queue
|
||||
@@ -1069,9 +1069,11 @@ const mobs = {
|
||||
dmg *= this.damageReduction
|
||||
//energy and heal drain should be calculated after damage boosts
|
||||
if (tech.energySiphon && dmg !== Infinity && this.isDropPowerUp && m.immuneCycle < m.cycle) m.energy += Math.min(this.health, dmg) * tech.energySiphon
|
||||
if (tech.healthDrain && dmg !== Infinity && this.isDropPowerUp) {
|
||||
m.addHealth(Math.min(this.health, dmg) * tech.healthDrain)
|
||||
if (m.health > m.maxHealth) m.health = m.maxHealth
|
||||
if (tech.healthDrain && dmg !== Infinity && this.isDropPowerUp && Math.random() < tech.healthDrain * Math.min(this.health, dmg)) {
|
||||
powerUps.spawn(m.pos.x + 20 * (Math.random() - 0.5), m.pos.y + 20 * (Math.random() - 0.5), "heal");
|
||||
// powerUps.spawn(this.position.x + 20 * (Math.random() - 0.5), this.position.y + 20 * (Math.random() - 0.5), "heal");
|
||||
// m.addHealth(Math.min(this.health, dmg) * tech.healthDrain)
|
||||
// if (m.health > m.maxHealth) m.health = m.maxHealth
|
||||
}
|
||||
dmg /= Math.sqrt(this.mass)
|
||||
this.health -= dmg
|
||||
|
||||
18
js/player.js
18
js/player.js
@@ -1332,11 +1332,16 @@ const m = {
|
||||
}
|
||||
const unit = Vector.normalise(Vector.sub(player.position, who.position))
|
||||
if (tech.blockDmg) {
|
||||
who.damage(tech.blockDmg * m.dmgScale, true)
|
||||
Matter.Body.setVelocity(who, { x: 0.5 * who.velocity.x, y: 0.5 * who.velocity.y });
|
||||
if (tech.isBlockRadiation && !who.isShielded && !who.isMobBullet) {
|
||||
mobs.statusDoT(who, tech.blockDmg * m.dmgScale * 4 / 12, 360) //200% increase -> x (1+2) //over 7s -> 360/30 = 12 half seconds -> 3/12
|
||||
} else {
|
||||
who.damage(tech.blockDmg * m.dmgScale, true)
|
||||
}
|
||||
//draw electricity
|
||||
const step = 40
|
||||
ctx.beginPath();
|
||||
for (let i = 0, len = 1.3 * tech.blockDmg; i < len; i++) {
|
||||
for (let i = 0, len = 0.8 * tech.blockDmg; i < len; i++) {
|
||||
let x = m.pos.x - 20 * unit.x;
|
||||
let y = m.pos.y - 20 * unit.y;
|
||||
ctx.moveTo(x, y);
|
||||
@@ -1659,10 +1664,15 @@ const m = {
|
||||
}
|
||||
}
|
||||
if (tech.blockDmg) { //electricity
|
||||
mob[i].damage(tech.blockDmg * m.dmgScale)
|
||||
Matter.Body.setVelocity(mob[i], { x: 0.5 * mob[i].velocity.x, y: 0.5 * mob[i].velocity.y });
|
||||
if (tech.isBlockRadiation && !mob[i].isShielded && !mob[i].isMobBullet) {
|
||||
mobs.statusDoT(mob[i], tech.blockDmg * m.dmgScale * 4 / 12, 360) //200% increase -> x (1+2) //over 7s -> 360/30 = 12 half seconds -> 3/12
|
||||
} else {
|
||||
mob[i].damage(tech.blockDmg * m.dmgScale)
|
||||
}
|
||||
const step = 40
|
||||
ctx.beginPath();
|
||||
for (let i = 0, len = 1.3 * tech.blockDmg; i < len; i++) {
|
||||
for (let i = 0, len = 0.8 * tech.blockDmg; i < len; i++) {
|
||||
let x = m.fieldPosition.x - 20 * unit.x;
|
||||
let y = m.fieldPosition.y - 20 * unit.y;
|
||||
ctx.moveTo(x, y);
|
||||
|
||||
@@ -379,7 +379,7 @@ const powerUps = {
|
||||
}
|
||||
if (tech.isRerollBots) {
|
||||
let delay = 0
|
||||
for (const cost = 2 + Math.floor(0.1666 * b.totalBots()); powerUps.research.count > cost - 1; powerUps.research.count -= cost) {
|
||||
for (const cost = 2 + Math.floor(0.2 * b.totalBots()); powerUps.research.count > cost - 1; powerUps.research.count -= cost) { // 1/5 = 0.2
|
||||
delay += 500
|
||||
setTimeout(() => {
|
||||
b.randomBot()
|
||||
|
||||
@@ -720,8 +720,8 @@ const simulation = {
|
||||
simulation.makeTextLog(`engine.timing.timeScale <span class='color-symbol'>=</span> 1`);
|
||||
// simulation.makeTextLog(`input.key.field<span class='color-symbol'>:</span> ["<span class='color-text'>${input.key.field}</span>", "<span class='color-text'>MouseRight</span>"]`);
|
||||
|
||||
document.getElementById("health").style.display = "inline"
|
||||
document.getElementById("health-bg").style.display = "inline"
|
||||
// document.getElementById("health").style.display = "inline"
|
||||
// document.getElementById("health-bg").style.display = "inline"
|
||||
m.alive = true;
|
||||
m.onGround = false
|
||||
m.lastOnGroundCycle = 0
|
||||
|
||||
223
js/tech.js
223
js/tech.js
@@ -1384,7 +1384,7 @@ const tech = {
|
||||
name: "bot fabrication",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Robot' class="link">bot fabrication</a>`,
|
||||
descriptionFunction() {
|
||||
return `after you collect ${powerUps.orb.research(2 + Math.floor(0.1666 * b.totalBots()))}use them to build a<br>random <strong class='color-bot'>bot</strong> <em>(+1 cost every 6 bots)</em>`
|
||||
return `after you collect ${powerUps.orb.research(2 + Math.floor(0.1666 * b.totalBots()))}use them to build a<br>random <strong class='color-bot'>bot</strong> <em>(+1 cost every 5 bots)</em>`
|
||||
},
|
||||
// description: `if you collect ${powerUps.orb.research(2)}use them to build a<br>random <strong class='color-bot'>bot</strong> <em>(+1 cost every 5 bots)</em>`,
|
||||
maxCount: 1,
|
||||
@@ -2590,25 +2590,6 @@ const tech = {
|
||||
tech.isTechDamage = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "enthalpy",
|
||||
description: "<strong class='color-h'>heal</strong> for <strong>2%</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,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
isHealTech: true,
|
||||
allowed() {
|
||||
return !tech.isEnergyHealth
|
||||
},
|
||||
requires: "not mass-energy equivalence",
|
||||
effect() {
|
||||
tech.healthDrain += 0.02;
|
||||
},
|
||||
remove() {
|
||||
tech.healthDrain = 0;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "fluoroantimonic acid",
|
||||
description: "increase <strong class='color-d'>damage</strong> by <strong>35%</strong><br>when your <strong class='color-h'>health</strong> is above <strong>100</strong>",
|
||||
@@ -2714,6 +2695,25 @@ const tech = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "enthalpy",
|
||||
description: `doing <strong class='color-d'>damage</strong> can spawn ${powerUps.orb.heal(1)}<br>take <strong>10%</strong> more <strong class='color-harm'>harm</strong>`,
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
isHealTech: true,
|
||||
allowed() {
|
||||
return !tech.isEnergyHealth
|
||||
},
|
||||
requires: "not mass-energy equivalence",
|
||||
effect() {
|
||||
tech.healthDrain += 0.02;
|
||||
},
|
||||
remove() {
|
||||
tech.healthDrain = 0;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "maintenance",
|
||||
description: `</strong>double</strong> the <strong class='flicker'>frequency</strong> of finding <strong class='color-h'>healing</strong> <strong class='color-m'>tech</strong><br>spawn ${powerUps.orb.heal(13)}`,
|
||||
@@ -4246,7 +4246,7 @@ const tech = {
|
||||
{
|
||||
name: "foam-shot",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Foam' class="link">foam-shot</a>`,
|
||||
description: "<strong>shotgun</strong> sprays <strong>13</strong> sticky <strong>foam</strong> bubbles",
|
||||
description: "<strong>shotgun</strong> sprays <strong>15</strong> sticky <strong>foam</strong> bubbles",
|
||||
isGunTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
@@ -4602,7 +4602,7 @@ const tech = {
|
||||
tech.missileFireCD = 10
|
||||
for (i = 0, len = b.guns.length; i < len; i++) { //find which gun
|
||||
if (b.guns[i].name === "missiles") {
|
||||
b.guns[i].ammoPack = this.ammoBonus;
|
||||
b.guns[i].ammoPack *= this.ammoBonus;
|
||||
b.guns[i].ammo = Math.ceil(b.guns[i].ammo * this.ammoBonus);
|
||||
simulation.updateGunHUD();
|
||||
break
|
||||
@@ -4920,9 +4920,9 @@ const tech = {
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
allowed() {
|
||||
return tech.haveGunCheck("grenades") && !tech.fragments && !tech.isVacuumBomb
|
||||
return tech.haveGunCheck("grenades") && !tech.fragments && !tech.isVacuumBomb && !tech.isExplodeRadio
|
||||
},
|
||||
requires: "grenades, not fragmentation, vacuum bomb",
|
||||
requires: "grenades, not fragmentation, vacuum bomb, iridium-192",
|
||||
effect() {
|
||||
tech.isNeutronBomb = true;
|
||||
b.setGrenadeMode()
|
||||
@@ -4953,14 +4953,14 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "radioactive contamination",
|
||||
description: "after a mob or shield <strong>dies</strong>,<br> leftover <strong class='color-p'>radiation</strong> <strong>spreads</strong> to a nearby mob",
|
||||
description: "after a mob or shield <strong>dies</strong>,<br>leftover <strong class='color-p'>radiation</strong> <strong>spreads</strong> to a nearby mob",
|
||||
isGunTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
allowed() {
|
||||
return tech.isNailRadiation || tech.isWormholeDamage || tech.isNeutronBomb || tech.isExplodeRadio
|
||||
return tech.isNailRadiation || tech.isWormholeDamage || tech.isNeutronBomb || tech.isExplodeRadio || tech.isBlockRadiation
|
||||
},
|
||||
requires: "radiation damage source",
|
||||
effect() {
|
||||
@@ -4970,6 +4970,25 @@ const tech = {
|
||||
tech.isRadioactive = false
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "nuclear transmutation",
|
||||
description: "<strong class='color-p'>radiation</strong> does <strong>70%</strong> more <strong class='color-d'>damage</strong> and <strong class='color-harm'>harm</strong><br><em>nail, drone, neutron bomb, iridium, string, deflect</em>",
|
||||
isGunTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
allowed() {
|
||||
return tech.isNailRadiation || tech.isWormholeDamage || tech.isNeutronBomb || tech.isExplodeRadio || tech.isBlockRadiation || tech.isDroneRadioactive
|
||||
},
|
||||
requires: "radiation damage source",
|
||||
effect() {
|
||||
tech.radioactiveDamage = 1.7
|
||||
},
|
||||
remove() {
|
||||
tech.radioactiveDamage = 1
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "water shielding",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Radiation_protection#Radiation_shielding' class="link">water shielding</a>`,
|
||||
@@ -5523,7 +5542,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "uncertainty principle",
|
||||
description: "<strong>foam</strong> and <strong>wave</strong> particle <strong>positions</strong> are random<br>increase their <strong class='color-d'>damage</strong> by <strong>43%</strong>",
|
||||
description: "<strong>foam</strong> and <strong>wave</strong> particle <strong>positions</strong> are random<br>increase their <strong class='color-d'>damage</strong> by <strong>47%</strong>",
|
||||
isGunTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
@@ -6318,7 +6337,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "bremsstrahlung",
|
||||
description: "<strong>deflecting</strong> does <strong class='color-d'>damage</strong> to mobs",
|
||||
description: "<strong>deflecting</strong> and thrown <strong class='color-block'>blocks</strong><br>do braking <strong class='color-d'>damage</strong> to mobs",
|
||||
isFieldTech: true,
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
@@ -6329,12 +6348,31 @@ const tech = {
|
||||
},
|
||||
requires: "standing wave, perfect diamagnetism",
|
||||
effect() {
|
||||
tech.blockDmg += 2 //if you change this value also update the for loop in the electricity graphics in m.pushMass
|
||||
tech.blockDmg += 3 //if you change this value also update the for loop in the electricity graphics in m.pushMass
|
||||
},
|
||||
remove() {
|
||||
tech.blockDmg = 0;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "cherenkov radiation", //<strong>deflecting</strong> and <strong class='color-block'>blocks</strong>
|
||||
description: "bremsstrahlung's effects are <strong class='color-p'>radioactive</strong><br>increase <strong class='color-d'>damage</strong> <strong>300%</strong> over <strong>6</strong> seconds",
|
||||
isFieldTech: true,
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
allowed() {
|
||||
return (m.fieldUpgrades[m.fieldMode].name === "standing wave" || m.fieldUpgrades[m.fieldMode].name === "perfect diamagnetism") && tech.blockDmg
|
||||
},
|
||||
requires: "bremsstrahlung",
|
||||
effect() {
|
||||
tech.isBlockRadiation = true
|
||||
},
|
||||
remove() {
|
||||
tech.isBlockRadiation = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "triple point",
|
||||
description: "the pressure from <strong>deflecting</strong> is used<br>to condense <strong class='color-s'>ice IX</strong> crystals",
|
||||
@@ -7760,68 +7798,6 @@ const tech = {
|
||||
},
|
||||
remove() {}
|
||||
},
|
||||
{
|
||||
name: "rule 30",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 0,
|
||||
isJunk: true,
|
||||
allowed() {
|
||||
return true
|
||||
},
|
||||
requires: "",
|
||||
effect() {
|
||||
powerUps.spawn(m.pos.x - 50 + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "research");
|
||||
},
|
||||
remove() {},
|
||||
state: [
|
||||
[false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false]
|
||||
],
|
||||
rule30(state, a, b, c) {
|
||||
if (state[a] && state[b] && state[c]) return false; // TTT => F
|
||||
if (state[a] && state[b] && !state[c]) return false; // TTF => F
|
||||
if (state[a] && !state[b] && state[c]) return false; //TFT => F
|
||||
if (state[a] && !state[b] && !state[c]) return true; //TFF => T
|
||||
if (!state[a] && state[b] && state[c]) return true; //FTT => T
|
||||
if (!state[a] && state[b] && !state[c]) return true; //FTF => T
|
||||
if (!state[a] && !state[b] && state[c]) return true; //FFT => T
|
||||
if (!state[a] && !state[b] && !state[c]) return false; //FFF => F
|
||||
},
|
||||
id: 0,
|
||||
descriptionFunction() {
|
||||
const loop = () => {
|
||||
if ((simulation.paused || simulation.isChoosing) && m.alive && !build.isExperimentSelection) { //&& (!simulation.isChoosing || this.count === 0)
|
||||
let b = []; //produce next row
|
||||
b.push(this.rule30(this.state[this.state.length - 1], this.state[this.state.length - 1].length - 1, 0, 1)); //left edge wrap around
|
||||
for (let i = 1; i < this.state[this.state.length - 1].length - 1; i++) { //apply rule to the rest of the array
|
||||
b.push(this.rule30(this.state[this.state.length - 1], i - 1, i, i + 1));
|
||||
}
|
||||
b.push(this.rule30(this.state[this.state.length - 1], this.state[this.state.length - 1].length - 2, this.state[this.state.length - 1].length - 1, 0)); //right edge wrap around
|
||||
this.state.push(b)
|
||||
if (document.getElementById(`cellular-rule-id${this.id}`)) document.getElementById(`cellular-rule-id${this.id}`).innerHTML = this.outputText() //convert to squares and send HTML
|
||||
setTimeout(() => { loop() }, 500);
|
||||
}
|
||||
}
|
||||
setTimeout(() => { loop() }, 500);
|
||||
this.id++
|
||||
return `<span id = "cellular-rule-id${this.id}" style = "letter-spacing: 0px;font-size: 50%;line-height: normal;">${this.outputText()}</span>`
|
||||
},
|
||||
outputText() {
|
||||
let text = ""
|
||||
for (let j = 0; j < this.state.length; j++) {
|
||||
text += "<p style = 'margin-bottom: -11px;'>"
|
||||
for (let i = 0; i < this.state[j].length; i++) {
|
||||
if (this.state[j][i]) {
|
||||
text += "⬛" //"█" //"■"
|
||||
} else {
|
||||
text += "⬜" //" " //"□"
|
||||
}
|
||||
}
|
||||
text += "</p>"
|
||||
}
|
||||
return text
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "discount",
|
||||
description: "get 3 random <strong class='color-j'>JUNK</strong> <strong class='color-m'>tech</strong> for the price of 1!",
|
||||
@@ -9600,7 +9576,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "NFT",
|
||||
descriptionFunction() { return `buy your current game seed: <strong style = 'font-size:130%;'>${Math.initialSeed}</strong><br><em>no one is allowed to use your seeds<br>if they use them they are gonna get in trouble</em><br>your seeds: <span style = 'font-size:70%;'>${localSettings.personalSeeds.join()}</span>` },
|
||||
descriptionFunction() { return `buy your current game seed: <strong style = 'font-size:120%;'>${Math.initialSeed}</strong><br><em>no one is allowed to use your seeds<br>if they use them they are gonna get in trouble</em><br>your seeds: <span style = 'font-size:80%;'>${localSettings.personalSeeds.join(", ")}</span>` },
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 0,
|
||||
@@ -9616,6 +9592,67 @@ const tech = {
|
||||
},
|
||||
remove() {}
|
||||
},
|
||||
{
|
||||
name: "rule 30",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 0,
|
||||
isJunk: true,
|
||||
allowed() {
|
||||
return true
|
||||
},
|
||||
requires: "",
|
||||
effect() {},
|
||||
remove() {},
|
||||
state: [
|
||||
[false, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, false]
|
||||
],
|
||||
rule30(state, a, b, c) {
|
||||
if (state[a] && state[b] && state[c]) return false; // TTT => F
|
||||
if (state[a] && state[b] && !state[c]) return false; // TTF => F
|
||||
if (state[a] && !state[b] && state[c]) return false; //TFT => F
|
||||
if (state[a] && !state[b] && !state[c]) return true; //TFF => T
|
||||
if (!state[a] && state[b] && state[c]) return true; //FTT => T
|
||||
if (!state[a] && state[b] && !state[c]) return true; //FTF => T
|
||||
if (!state[a] && !state[b] && state[c]) return true; //FFT => T
|
||||
if (!state[a] && !state[b] && !state[c]) return false; //FFF => F
|
||||
},
|
||||
id: 0,
|
||||
descriptionFunction() {
|
||||
const loop = () => {
|
||||
if ((simulation.paused || simulation.isChoosing) && m.alive && !build.isExperimentSelection) { //&& (!simulation.isChoosing || this.count === 0)
|
||||
let b = []; //produce next row
|
||||
b.push(this.rule30(this.state[this.state.length - 1], this.state[this.state.length - 1].length - 1, 0, 1)); //left edge wrap around
|
||||
for (let i = 1; i < this.state[this.state.length - 1].length - 1; i++) { //apply rule to the rest of the array
|
||||
b.push(this.rule30(this.state[this.state.length - 1], i - 1, i, i + 1));
|
||||
}
|
||||
b.push(this.rule30(this.state[this.state.length - 1], this.state[this.state.length - 1].length - 2, this.state[this.state.length - 1].length - 1, 0)); //right edge wrap around
|
||||
this.state.push(b)
|
||||
if (document.getElementById(`cellular-rule-id${this.id}`)) document.getElementById(`cellular-rule-id${this.id}`).innerHTML = this.outputText() //convert to squares and send HTML
|
||||
if (this.count && this.state.length < 120 && !(this.state.length % 10)) powerUps.spawn(m.pos.x - 50 + 100 * (Math.random() - 0.5), m.pos.y + 100 * (Math.random() - 0.5), "research");
|
||||
setTimeout(() => { loop() }, 500);
|
||||
}
|
||||
}
|
||||
setTimeout(() => { loop() }, 500);
|
||||
this.id++
|
||||
return `<span id = "cellular-rule-id${this.id}" style = "letter-spacing: 0px;font-size: 50%;line-height: normal;">${this.outputText()}</span>`
|
||||
},
|
||||
outputText() {
|
||||
let text = ""
|
||||
for (let j = 0; j < this.state.length; j++) {
|
||||
text += "<p style = 'margin-bottom: -11px;'>"
|
||||
for (let i = 0; i < this.state[j].length; i++) {
|
||||
if (this.state[j][i]) {
|
||||
text += "⬛" //"█" //"■"
|
||||
} else {
|
||||
text += "⬜" //" " //"□"
|
||||
}
|
||||
}
|
||||
text += "</p>"
|
||||
}
|
||||
return text
|
||||
},
|
||||
},
|
||||
//**************************************************
|
||||
//************************************************** undefined / lore
|
||||
//************************************************** tech
|
||||
@@ -9727,6 +9764,7 @@ const tech = {
|
||||
orbitBotCount: null,
|
||||
collisionImmuneCycles: null,
|
||||
blockDmg: null,
|
||||
isBlockRadiation: null,
|
||||
isPiezo: null,
|
||||
isFastDrones: null,
|
||||
isFastSpores: null,
|
||||
@@ -9840,6 +9878,7 @@ const tech = {
|
||||
wideLaser: null,
|
||||
isPulseLaser: null,
|
||||
isRadioactive: null,
|
||||
radioactiveDamage: null,
|
||||
isRailEnergyGain: null,
|
||||
isMineSentry: null,
|
||||
isIncendiary: null,
|
||||
|
||||
22
todo.txt
22
todo.txt
@@ -1,16 +1,26 @@
|
||||
******************************************************** NEXT PATCH **************************************************
|
||||
|
||||
plasma ball damage radius is 2x bigger
|
||||
map collisions radius is unchanged
|
||||
it no longer pops after hitting mobs
|
||||
energy drain is 50% higher
|
||||
tech: cherenkov radiation - bremsstrahlung damage is increased by 300% over 6 seconds
|
||||
bremsstrahlung does 2->3 damage, and also applies to block collisions
|
||||
|
||||
JUNK tech: rule 30
|
||||
tech: nuclear transmutation - radiation sources do 70% more damage and harm
|
||||
|
||||
generalist cycles guns with final boss phases
|
||||
enthalpy now drops heal power ups instead of directly healing you
|
||||
foam-shot has 13->15 particles, is slower, and less spread
|
||||
|
||||
bug fixes
|
||||
|
||||
******************************************************** TODO ********************************************************
|
||||
|
||||
tech: increase damage from all radioactive sources by 66%
|
||||
apply to dots and to drones, neutron bomb, and radioactive explosions
|
||||
|
||||
tech: damage mobs in your last 10 seconds of history
|
||||
field tech?
|
||||
time dilation?
|
||||
|
||||
standing wave is weak vs. exploding bullets
|
||||
|
||||
add foam tech that makes foam stronger vs. shields
|
||||
|
||||
tech: eternalism - don't pause time during draft
|
||||
|
||||
Reference in New Issue
Block a user