diff --git a/.DS_Store b/.DS_Store index be90e93..7f37cd6 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/js/bullet.js b/js/bullet.js index c82b684..040301c 100644 --- a/js/bullet.js +++ b/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) diff --git a/js/engine.js b/js/engine.js index 1185985..d183e02 100644 --- a/js/engine.js +++ b/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" diff --git a/js/index.js b/js/index.js index 0ee296c..2d5723d 100644 --- a/js/index.js +++ b/js/index.js @@ -314,8 +314,13 @@ ${simulation.isCheating ? "

lore disabled": ""} 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" diff --git a/js/level.js b/js/level.js index 5436c7a..d3dba9b 100644 --- a/js/level.js +++ b/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") diff --git a/js/mob.js b/js/mob.js index b53010e..d182097 100644 --- a/js/mob.js +++ b/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 diff --git a/js/player.js b/js/player.js index 2a6b399..0d92d28 100644 --- a/js/player.js +++ b/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); diff --git a/js/powerup.js b/js/powerup.js index 5e602cc..2381030 100644 --- a/js/powerup.js +++ b/js/powerup.js @@ -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() diff --git a/js/simulation.js b/js/simulation.js index 2d47499..ecf78bb 100644 --- a/js/simulation.js +++ b/js/simulation.js @@ -720,8 +720,8 @@ const simulation = { simulation.makeTextLog(`engine.timing.timeScale = 1`); // simulation.makeTextLog(`input.key.field: ["${input.key.field}", "MouseRight"]`); - 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 diff --git a/js/tech.js b/js/tech.js index b840e2d..d4d73d0 100644 --- a/js/tech.js +++ b/js/tech.js @@ -1384,7 +1384,7 @@ const tech = { name: "bot fabrication", link: `bot fabrication`, descriptionFunction() { - return `after you collect ${powerUps.orb.research(2 + Math.floor(0.1666 * b.totalBots()))}use them to build a
random bot (+1 cost every 6 bots)` + return `after you collect ${powerUps.orb.research(2 + Math.floor(0.1666 * b.totalBots()))}use them to build a
random bot (+1 cost every 5 bots)` }, // description: `if you collect ${powerUps.orb.research(2)}use them to build a
random bot (+1 cost every 5 bots)`, maxCount: 1, @@ -2590,25 +2590,6 @@ const tech = { tech.isTechDamage = false; } }, - { - name: "enthalpy", - description: "heal for 2% of damage done
take 10% more harm", - 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 damage by 35%
when your health is above 100", @@ -2714,6 +2695,25 @@ const tech = { } } }, + { + name: "enthalpy", + description: `doing damage can spawn ${powerUps.orb.heal(1)}
take 10% more harm`, + 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: `double the frequency of finding healing tech
spawn ${powerUps.orb.heal(13)}`, @@ -4246,7 +4246,7 @@ const tech = { { name: "foam-shot", link: `foam-shot`, - description: "shotgun sprays 13 sticky foam bubbles", + description: "shotgun sprays 15 sticky foam 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 dies,
leftover radiation spreads to a nearby mob", + description: "after a mob or shield dies,
leftover radiation spreads 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: "radiation does 70% more damage and harm
nail, drone, neutron bomb, iridium, string, deflect", + 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: `water shielding`, @@ -5523,7 +5542,7 @@ const tech = { }, { name: "uncertainty principle", - description: "foam and wave particle positions are random
increase their damage by 43%", + description: "foam and wave particle positions are random
increase their damage by 47%", isGunTech: true, maxCount: 1, count: 0, @@ -6318,7 +6337,7 @@ const tech = { }, { name: "bremsstrahlung", - description: "deflecting does damage to mobs", + description: "deflecting and thrown blocks
do braking damage 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", //deflecting and blocks + description: "bremsstrahlung's effects are radioactive
increase damage 300% over 6 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 deflecting is used
to condense ice IX 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 `${this.outputText()}` - }, - outputText() { - let text = "" - for (let j = 0; j < this.state.length; j++) { - text += "

" - for (let i = 0; i < this.state[j].length; i++) { - if (this.state[j][i]) { - text += "⬛" //"█" //"■" - } else { - text += "⬜" //"    " //"□" - } - } - text += "

" - } - return text - }, - }, { name: "discount", description: "get 3 random JUNK tech for the price of 1!", @@ -9600,7 +9576,7 @@ const tech = { }, { name: "NFT", - descriptionFunction() { return `buy your current game seed: ${Math.initialSeed}
no one is allowed to use your seeds
if they use them they are gonna get in trouble

your seeds: ${localSettings.personalSeeds.join()}` }, + descriptionFunction() { return `buy your current game seed: ${Math.initialSeed}
no one is allowed to use your seeds
if they use them they are gonna get in trouble

your seeds: ${localSettings.personalSeeds.join(", ")}` }, 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 `${this.outputText()}` + }, + outputText() { + let text = "" + for (let j = 0; j < this.state.length; j++) { + text += "

" + for (let i = 0; i < this.state[j].length; i++) { + if (this.state[j][i]) { + text += "⬛" //"█" //"■" + } else { + text += "⬜" //"    " //"□" + } + } + text += "

" + } + 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, diff --git a/todo.txt b/todo.txt index 0ee1a9c..d722885 100644 --- a/todo.txt +++ b/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