instant tech
adjusted text and math for the fire rate system to use the new "x" syntax tech search is no longer case sensitive Zectron 1.9->2x damage, -25% -> -5 energy exothermic process -20% -> -5 energy instant/unRemovable tech has a unique icon and no longer shows up in the tech list marginal utility - no longer spawns ammo heuristics - no longer spawn a gun, 1.2->1.3 fire rate open-source - gives 1 extra bot option and 3x bot tech frequency robotics - now just spawns 2 bots induction brake - doesn't spawn heals, but lasts 15->17 seconds accretion - doesn't spawn heals, but gets 3% duplication mass production - doesn't spawn power ups, but gets 3% duplication Ψ(t) collapse - doesn't spawn research, spawns 5 research from bosses decoherence - doesn't spawn research, spawns 2 research from bosses fine-structure constant - doesn't spawn coupling, spawn 9 coupling from bosses Bayesian statistics - 1.03->1.05x damage, doesn't spawn research Born rule code rewritten, but it should have a similar effect as before triple point - 1.5->5 second freeze, but no coupling spawn geodesics - no longer spawns ammo and guns, but gives 1.5x damage ideal gas law - doesn't remove ammo, 12->6x foam ammo per ammo power up
This commit is contained in:
@@ -1,3 +1,3 @@
|
||||
2-d physics rogue-lite platformer shooter sidescroller
|
||||
2-d physics rogue-lite platformer shooter
|
||||
|
||||
https://landgreen.github.io/sidescroller/
|
||||
https://landgreen.github.io/n-gon/
|
||||
|
||||
23
js/bullet.js
23
js/bullet.js
@@ -179,7 +179,7 @@ const b = {
|
||||
//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) {
|
||||
if (tech.tech[i].isGunTech && tech.tech[i].count > 0 && !tech.tech[i].isInstant && !tech.tech[i].isRemoveGun) {
|
||||
const remove = tech.removeTech(i)
|
||||
gunTechCount += remove
|
||||
}
|
||||
@@ -287,9 +287,9 @@ const b = {
|
||||
setFireCD() {
|
||||
b.fireCDscale = tech.fireRate * tech.slowFire * tech.researchHaste * tech.aimDamage
|
||||
if (m.fieldMode === 6) b.fireCDscale *= 0.8
|
||||
if (tech.isFastTime) b.fireCDscale *= 0.5
|
||||
if (tech.isFireRateForGuns) b.fireCDscale *= Math.pow(0.8, Math.max(0, b.inventory.length - 1))
|
||||
if (tech.isFireMoveLock) b.fireCDscale *= 0.2 // 77% fire rate
|
||||
if (tech.isFastTime) b.fireCDscale *= 0.666
|
||||
if (tech.isFireRateForGuns) b.fireCDscale *= Math.pow(0.76923, Math.max(0, b.inventory.length - 1))
|
||||
if (tech.isFireMoveLock) b.fireCDscale *= 0.25
|
||||
},
|
||||
fireAttributes(dir, rotate = true) {
|
||||
if (rotate) {
|
||||
@@ -398,11 +398,11 @@ const b = {
|
||||
|
||||
//player damage
|
||||
if (Vector.magnitude(Vector.sub(where, player.position)) < radius) {
|
||||
const DRAIN = (tech.isExplosionHarm ? 0.6 : 0.45) * (tech.isRadioactiveResistance ? 0.25 : 1)
|
||||
const DRAIN = (tech.isExplosionHarm ? 0.6 : 0.45) * (tech.isRadioactiveResistance ? 0.2 : 1)
|
||||
if (m.immuneCycle < m.cycle) m.energy -= DRAIN
|
||||
if (m.energy < 0) {
|
||||
m.energy = 0
|
||||
if (simulation.dmgScale) m.damage(tech.radioactiveDamage * 0.03 * (tech.isRadioactiveResistance ? 0.25 : 1));
|
||||
if (simulation.dmgScale) m.damage(tech.radioactiveDamage * 0.03 * (tech.isRadioactiveResistance ? 0.2 : 1));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1030,12 +1030,12 @@ 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.2 : 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) * tech.radioactiveDamage) //0.00015
|
||||
if (simulation.dmgScale) m.damage((tech.isRadioactiveResistance ? 0.00016 * 0.2 : 0.00016) * tech.radioactiveDamage) //0.00015
|
||||
}
|
||||
}
|
||||
//aoe damage to mobs
|
||||
@@ -3615,7 +3615,7 @@ const b = {
|
||||
if (m.immuneCycle < m.cycle) m.energy -= DRAIN
|
||||
} else {
|
||||
m.energy = 0;
|
||||
if (simulation.dmgScale) m.damage((tech.isRadioactiveResistance ? 0.00005 : 0.0002) * tech.radioactiveDamage) //0.00015
|
||||
if (simulation.dmgScale) m.damage((tech.isRadioactiveResistance ? 0.00004 : 0.0002) * tech.radioactiveDamage) //0.00015
|
||||
}
|
||||
}
|
||||
//aoe damage to mobs
|
||||
@@ -3777,7 +3777,7 @@ const b = {
|
||||
bullet[me] = Bodies.polygon(where.x, where.y, 12, radius, b.fireAttributes(dir, false));
|
||||
Composite.add(engine.world, bullet[me]); //add bullet to world
|
||||
Matter.Body.setVelocity(bullet[me], velocity);
|
||||
bullet[me].calcDensity = function () { return 0.0007 + 0.00065 * tech.isSuperHarm + 0.0004 * tech.isBulletTeleport }
|
||||
bullet[me].calcDensity = function () { return 0.0007 + 0.0007 * tech.isSuperHarm + 0.0004 * tech.isBulletTeleport }
|
||||
Matter.Body.setDensity(bullet[me], bullet[me].calcDensity());
|
||||
bullet[me].endCycle = simulation.cycle + Math.floor(270 + 90 * Math.random());
|
||||
bullet[me].minDmgSpeed = 0;
|
||||
@@ -3790,7 +3790,8 @@ const b = {
|
||||
this.force.y += this.mass * 0.001;
|
||||
if (Matter.Query.collides(this, [player]).length) {
|
||||
this.endCycle = 0
|
||||
m.energy -= m.energy * 0.2
|
||||
m.energy -= 0.05
|
||||
if (m.energy < 0) m.energy = 0
|
||||
simulation.drawList.push({ //add dmg to draw queue
|
||||
x: this.position.x,
|
||||
y: this.position.y,
|
||||
|
||||
23
js/engine.js
23
js/engine.js
@@ -147,7 +147,7 @@ function collisionChecks(event) {
|
||||
}
|
||||
if (tech.isPiezo) m.energy += 20.48;
|
||||
if (tech.isCouplingNoHit && m.coupling > 0) {
|
||||
m.couplingChange(-5)
|
||||
m.couplingChange(-4)
|
||||
|
||||
const unit = Vector.rotate({ x: 1, y: 0 }, 6.28 * Math.random())
|
||||
let where = Vector.add(m.pos, Vector.mult(unit, 17))
|
||||
@@ -182,27 +182,6 @@ function collisionChecks(event) {
|
||||
color: 'rgba(0, 171, 238, 0.7)',
|
||||
time: 32
|
||||
});
|
||||
// simulation.drawList.push({ //add dmg to draw queue
|
||||
// x: m.pos.x,
|
||||
// y: m.pos.y,
|
||||
// radius: 150,
|
||||
// color: 'rgba(0, 171, 238, 0.33)',
|
||||
// time: 6
|
||||
// });
|
||||
// simulation.drawList.push({ //add dmg to draw queue
|
||||
// x: m.pos.x,
|
||||
// y: m.pos.y,
|
||||
// radius: 75,
|
||||
// color: 'rgba(0, 171, 238, 0.5)',
|
||||
// time: 16
|
||||
// });
|
||||
// simulation.drawList.push({ //add dmg to draw queue
|
||||
// x: m.pos.x,
|
||||
// y: m.pos.y,
|
||||
// radius: 25,
|
||||
// color: 'rgba(0, 171, 238, 0.75)',
|
||||
// time: 25
|
||||
// });
|
||||
}
|
||||
if (tech.isHarpoonDefense) { //fire harpoons at mobs after getting hit
|
||||
const maxCount = 10 + 3 * tech.extraHarpoons //scale the number of hooks fired
|
||||
|
||||
36
js/index.js
36
js/index.js
@@ -191,7 +191,7 @@ let color = { //light
|
||||
// check for URL parameters to load an experimental game
|
||||
//**********************************************************************
|
||||
|
||||
//example https://landgreen.github.io/sidescroller/index.html?
|
||||
//example https://landgreen.github.io/n-gon/index.html?
|
||||
// &gun1=minigun&gun2=laser
|
||||
// &tech1=laser-bot&tech2=mass%20driver&tech3=overcharge&tech4=laser-bot&tech5=laser-bot&field=phase%20decoherence%20field&difficulty=2
|
||||
//add ? to end of url then for each power up add
|
||||
@@ -477,9 +477,9 @@ const build = {
|
||||
<label for="hide-hud" title="hide: tech, damage taken, damage, in game console" style="font-size:1.15em;">minimal HUD</label>
|
||||
<br>
|
||||
|
||||
<br><strong class='color-d'>damage</strong>: ${((tech.damageFromTech())).toPrecision(4)} <span style="float: right;"><strong class='color-d'>difficulty:</strong> ${((m.dmgScale)).toPrecision(4)}</span>
|
||||
<br><strong class='color-defense'>damage taken</strong>: ${(m.defense()).toPrecision(4)} <span style="float: right;"><strong class='color-defense'>difficulty:</strong> ${(simulation.dmgScale).toPrecision(4)}</span>
|
||||
<br><strong><em>fire rate</em></strong>: ${((1 - b.fireCDscale) * 100).toFixed(b.fireCDscale < 0.1 ? 2 : 0)}%
|
||||
<br><strong class='color-d'>damage</strong>: ${((tech.damageFromTech())).toPrecision(4)}x <span style="float: right;"><strong class='color-d'>difficulty:</strong> ${((m.dmgScale)).toPrecision(4)}x</span>
|
||||
<br><strong class='color-defense'>damage taken</strong>: ${(m.defense()).toPrecision(4)}x <span style="float: right;"><strong class='color-defense'>difficulty:</strong> ${(simulation.dmgScale).toPrecision(4)}x</span>
|
||||
<br><strong><em>fire rate</em></strong>: ${(1 / b.fireCDscale).toFixed(2)}x
|
||||
${tech.duplicationChance() ? `<br><strong class='color-dup'>duplication</strong>: ${(tech.duplicationChance() * 100).toFixed(0)}%` : ""}
|
||||
${m.coupling ? `<br><span style = 'font-size:90%;'>` + m.couplingDescription(m.coupling) + `</span> from ${(m.coupling).toFixed(0)} ${powerUps.orb.coupling(1)}` : ""}
|
||||
${botText}
|
||||
@@ -562,8 +562,8 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
|
||||
if (tech.tech[i].count > 0) {
|
||||
const style = (localSettings.isHideImages || tech.tech[i].isJunk || tech.tech[i].isLore) ? `style="height:auto;"` : `style = "background-image: url('img/${tech.tech[i].name}.webp');"`
|
||||
const techCountText = tech.tech[i].count > 1 ? `(${tech.tech[i].count}x)` : "";
|
||||
if (tech.tech[i].isNonRefundable) {
|
||||
text += `<div class="pause-grid-module" id ="${i}-pause-tech" style = "border: 0px; opacity:0.5; font-size: 60%; line-height: 130%; margin: 1px; padding: 6px;"><div class="grid-title">${tech.tech[i].link} ${techCountText}</div>${tech.tech[i].descriptionFunction ? tech.tech[i].descriptionFunction() : tech.tech[i].description}</div></div>`
|
||||
if (tech.tech[i].isInstant) {
|
||||
// text += `<div class="pause-grid-module" id ="${i}-pause-tech" style = "border: 0px; opacity:0.5; font-size: 60%; line-height: 130%; margin: 1px; padding: 6px;"><div class="grid-title">${tech.tech[i].link} ${techCountText}</div>${tech.tech[i].descriptionFunction ? tech.tech[i].descriptionFunction() : tech.tech[i].description}</div></div>`
|
||||
} else if (tech.tech[i].isFieldTech) {
|
||||
text += `<div id="${i}-pause-tech" class="pause-grid-module card-background ${ejectClass}" onclick="powerUps.pauseEjectTech(${i})" ${style}>`
|
||||
text += build.fieldTechText(i) + "</div>"
|
||||
@@ -689,7 +689,7 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
|
||||
} else if (find === 'energy') {
|
||||
tech.tech.sort(sortKeyword);
|
||||
} else if (find === 'input') {
|
||||
find = document.getElementById("sort-input").value;
|
||||
find = document.getElementById("sort-input").value.toLowerCase();
|
||||
tech.tech.sort(sortKeyword);
|
||||
}
|
||||
if (isExperiment) {
|
||||
@@ -731,6 +731,12 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
|
||||
<div class="grid-title" ><div class="circle-grid tech"></div> ${build.nameLink(tech.tech[i].name)} ${tech.tech[i].count > 1 ? `(${tech.tech[i].count}x)` : ""}</div>
|
||||
${tech.tech[i].descriptionFunction ? tech.tech[i].descriptionFunction() : tech.tech[i].description}</div>`
|
||||
},
|
||||
instantTechText(i) {
|
||||
//
|
||||
return `<div class="card-text" >
|
||||
<div class="grid-title" > <div class="circle-grid-instant"></div> ${build.nameLink(tech.tech[i].name)} ${tech.tech[i].count > 1 ? `(${tech.tech[i].count}x)` : ""}</div>
|
||||
${tech.tech[i].descriptionFunction ? tech.tech[i].descriptionFunction() : tech.tech[i].description}</div>`
|
||||
},
|
||||
skinTechText(i) {
|
||||
return `<div class="card-text"> <div class="grid-title">
|
||||
<span style="position:relative;">
|
||||
@@ -803,10 +809,10 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
|
||||
}
|
||||
} else if (type === "tech") {
|
||||
if (tech.tech[index].count < tech.tech[index].maxCount) {
|
||||
// if (!tech.tech[index].isLore && !tech.tech[index].isNonRefundable && !who.classList.contains("build-tech-selected")) who.classList.add("build-tech-selected");
|
||||
// if (!tech.tech[index].isLore && !tech.tech[index].isInstant && !who.classList.contains("build-tech-selected")) who.classList.add("build-tech-selected");
|
||||
if (!document.getElementById("tech-" + index).classList.contains("build-tech-selected")) document.getElementById("tech-" + index).classList.add("build-tech-selected");
|
||||
tech.giveTech(index)
|
||||
} else if (!tech.tech[index].isNonRefundable) {
|
||||
} else if (!tech.tech[index].isInstant) {
|
||||
// tech.totalCount -= tech.tech[index].count
|
||||
document.getElementById("tech-" + index).classList.remove("build-tech-selected");
|
||||
tech.removeTech(index);
|
||||
@@ -835,6 +841,8 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
|
||||
} else if (tech.tech[i].isSkin) {
|
||||
techID.classList.remove('experiment-grid-hide');
|
||||
techID.innerHTML = build.skinTechText(i)
|
||||
} else if (tech.tech[i].isInstant) {
|
||||
techID.innerHTML = build.instantTechText(i)
|
||||
} else {
|
||||
techID.innerHTML = build.techText(i)
|
||||
}
|
||||
@@ -860,6 +868,8 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
|
||||
techID.innerHTML = build.junkTechText(i)
|
||||
} else if (tech.tech[i].isSkin) {
|
||||
techID.innerHTML = build.skinTechText(i)
|
||||
} else if (tech.tech[i].isInstant) {
|
||||
techID.innerHTML = build.instantTechText(i)
|
||||
} else {
|
||||
techID.innerHTML = build.techText(i)
|
||||
}
|
||||
@@ -937,7 +947,7 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
|
||||
for (let i = 0, len = tech.tech.length; i < len; i++) {
|
||||
if ((!tech.tech[i].isJunk || localSettings.isJunkExperiment) && !tech.tech[i].isLore) {
|
||||
const style = (localSettings.isHideImages || tech.tech[i].isJunk) ? hideStyle : `style="background-image: url('img/${tech.tech[i].name}.webp');"`
|
||||
if ((tech.tech[i].allowed() || tech.tech[i].count > 0) && (!tech.tech[i].isNonRefundable || localSettings.isJunkExperiment)) { // || tech.tech[i].name === "+1 cardinality") { //|| tech.tech[i].name === "leveraged investment"
|
||||
if ((tech.tech[i].allowed() || tech.tech[i].count > 0) && (!tech.tech[i].isInstant || localSettings.isJunkExperiment)) { // || tech.tech[i].name === "+1 cardinality") { //|| tech.tech[i].name === "leveraged investment"
|
||||
text += `<div id="tech-${i}" class="experiment-grid-module card-background ${tech.tech[i].count ? "build-tech-selected" : ""}" onclick="build.choosePowerUp(${i},'tech')" ${style}>`
|
||||
} else { //disabled
|
||||
text += `<div id="tech-${i}" class="experiment-grid-module card-background experiment-grid-disabled" ${style}>`
|
||||
@@ -951,6 +961,8 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
|
||||
text += build.skinTechText(i)
|
||||
} else if (tech.tech[i].isJunk) {
|
||||
text += build.junkTechText(i)
|
||||
} else if (tech.tech[i].isInstant) {
|
||||
text += build.instantTechText(i)
|
||||
} else {
|
||||
text += build.techText(i)
|
||||
}
|
||||
@@ -1014,7 +1026,7 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
|
||||
document.getElementById("experiment-grid").style.display = "grid"
|
||||
},
|
||||
shareURL(isCustom = false) {
|
||||
let url = "https://landgreen.github.io/sidescroller/index.html?"
|
||||
let url = "https://landgreen.github.io/n-gon/index.html?"
|
||||
url += `&seed=${Math.initialSeed}`
|
||||
let count = 0;
|
||||
for (let i = 0; i < b.inventory.length; i++) {
|
||||
@@ -1026,7 +1038,7 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
|
||||
count = 0;
|
||||
for (let i = 0; i < tech.tech.length; i++) {
|
||||
for (let j = 0; j < tech.tech[i].count; j++) {
|
||||
if (!tech.tech[i].isLore && !tech.tech[i].isJunk && !tech.tech[i].isNonRefundable) {
|
||||
if (!tech.tech[i].isLore && !tech.tech[i].isJunk && !tech.tech[i].isInstant) {
|
||||
url += `&tech${count}=${encodeURIComponent(tech.tech[i].name.trim())}`
|
||||
count++
|
||||
}
|
||||
|
||||
21
js/level.js
21
js/level.js
@@ -29,6 +29,7 @@ const level = {
|
||||
// m.couplingChange(10)
|
||||
// m.setField("plasma torch") //1 standing wave 2 perfect diamagnetism 3 negative mass 4 molecular assembler 5 plasma torch 6 time dilation 7 metamaterial cloaking 8 pilot wave 9 wormhole 10 grappling hook
|
||||
// m.energy = 0
|
||||
// powerUps.research.count = 3
|
||||
// tech.isHookWire = true
|
||||
// m.energy = 0
|
||||
// simulation.molecularMode = 2
|
||||
@@ -39,16 +40,16 @@ const level = {
|
||||
// b.giveGuns("laser") //0 nail gun 1 shotgun 2 super balls 3 wave 4 missiles 5 grenades 6 spores 7 drones 8 foam 9 harpoon 10 mine 11 laser
|
||||
// b.guns[8].ammo = 100000000
|
||||
// requestAnimationFrame(() => { tech.giveTech("optical amplifier") });
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("mass production")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("combinatorial optimization")
|
||||
// tech.giveTech("Pareto efficiency")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("reduced tolerances")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("Newtons 1st law")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("Newtons 2nd law")
|
||||
// requestAnimationFrame(() => { for (let i = 0; i < 1; i++) tech.giveTech("paradigm shift") });
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("Higgs mechanism")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("active cooling")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("heuristics")
|
||||
// requestAnimationFrame(() => { for (let i = 0; i < 10; i++) b.orbitBot(m.pos, false) });
|
||||
// requestAnimationFrame(() => { for (let i = 0; i < 1; i++) tech.giveTech("ersatz bots") });
|
||||
// for (let i = 0; i < 1; i++) tech.giveTech("tungsten carbide")
|
||||
// m.lastKillCycle = m.cycle
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("deprecated")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("Lorentz transformation")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("unified field theory")
|
||||
// for (let i = 0; i < 3; i++) powerUps.directSpawn(450, -50, "tech");
|
||||
// for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "research");
|
||||
@@ -1778,12 +1779,12 @@ const level = {
|
||||
|
||||
if (this.height > 0 && Matter.Query.region([player], this).length) {
|
||||
if (m.immuneCycle < m.cycle) {
|
||||
const DRAIN = 0.004 * (tech.isRadioactiveResistance ? 0.25 : 1)
|
||||
const DRAIN = 0.004 * (tech.isRadioactiveResistance ? 0.2 : 1)
|
||||
if (m.energy > DRAIN) {
|
||||
m.energy -= DRAIN
|
||||
if (tech.isEnergyHealth && m.energy < 0) m.death()
|
||||
} else {
|
||||
m.damage(damage * (tech.isRadioactiveResistance ? 0.25 : 1))
|
||||
m.damage(damage * (tech.isRadioactiveResistance ? 0.2 : 1))
|
||||
|
||||
}
|
||||
}
|
||||
@@ -12460,11 +12461,11 @@ const level = {
|
||||
// Trolled
|
||||
const hasCPT = tech.isRewindAvoidDeath;
|
||||
tech.isRewindAvoidDeath = false;
|
||||
const DRAIN = 0.002 * (tech.isRadioactiveResistance ? 0.25 : 1) + 0.001;
|
||||
const DRAIN = 0.002 * (tech.isRadioactiveResistance ? 0.2 : 1) + 0.001;
|
||||
if (m.energy > DRAIN && !tech.isEnergyHealth) {
|
||||
m.energy -= DRAIN;
|
||||
}
|
||||
m.damage(0.00015 * (tech.isRadioactiveResistance ? 0.25 : 1));
|
||||
m.damage(0.00015 * (tech.isRadioactiveResistance ? 0.2 : 1));
|
||||
if (tech.isEnergyHealth) {
|
||||
const previousEnergy = m.energy;
|
||||
m.regenEnergy();
|
||||
|
||||
@@ -1228,7 +1228,10 @@ const mobs = {
|
||||
simulation.loop(); //ending with a wipe and normal loop fixes some very minor graphical issues where things are draw in the wrong locations
|
||||
}); //wrapping in animation frame prevents errors, probably
|
||||
}
|
||||
if (tech.isEnergyLoss) m.energy *= 0.8;
|
||||
if (tech.isEnergyLoss) {
|
||||
m.energy -= 0.05;
|
||||
if (m.energy < 0) m.energy = 0
|
||||
}
|
||||
powerUps.spawnRandomPowerUp(this.position.x, this.position.y);
|
||||
m.lastKillCycle = m.cycle; //tracks the last time a kill was made, mostly used in simulation.checks()
|
||||
mobs.mobDeaths++
|
||||
|
||||
@@ -483,7 +483,7 @@ const powerUps = {
|
||||
}
|
||||
if (tech.isRerollHaste) {
|
||||
if (powerUps.research.count === 0) {
|
||||
tech.researchHaste = 0.66;
|
||||
tech.researchHaste = 0.5;
|
||||
b.setFireCD();
|
||||
} else {
|
||||
tech.researchHaste = 1;
|
||||
@@ -557,7 +557,7 @@ const powerUps = {
|
||||
});
|
||||
}
|
||||
if (tech.isHealBrake) {
|
||||
const totalTime = 900
|
||||
const totalTime = 1020
|
||||
//check if you already have this effect
|
||||
let foundActiveEffect = false
|
||||
for (let i = 0; i < simulation.ephemera.length; i++) {
|
||||
@@ -771,6 +771,15 @@ const powerUps = {
|
||||
<div class="grid-title"><div class="circle-grid tech"></div> ${tech.tech[choose].name} ${techCountText}</div>
|
||||
${tech.tech[choose].descriptionFunction ? tech.tech[choose].descriptionFunction() : tech.tech[choose].description}</div></div>`
|
||||
},
|
||||
instantTechText(choose, click) {
|
||||
const techCountText = tech.tech[choose].count > 0 ? `(${tech.tech[choose].count + 1}x)` : "";
|
||||
const style = localSettings.isHideImages || tech.tech[choose].isLore ? powerUps.hideStyle : `style="background-image: url('img/${tech.tech[choose].name}.webp');"`
|
||||
// <div class="circle-grid tech"></div>
|
||||
return `<div class="choose-grid-module card-background" onclick="${click}" onauxclick="${click}"${style}>
|
||||
<div class="card-text">
|
||||
<div class="grid-title"> <div class="circle-grid-instant"></div> ${tech.tech[choose].name} ${techCountText}</div>
|
||||
${tech.tech[choose].descriptionFunction ? tech.tech[choose].descriptionFunction() : tech.tech[choose].description}</div></div>`
|
||||
},
|
||||
skinTechText(choose, click) {
|
||||
const techCountText = tech.tech[choose].count > 0 ? `(${tech.tech[choose].count + 1}x)` : "";
|
||||
const style = localSettings.isHideImages ? powerUps.hideStyle : `style="background-image: url('img/${tech.tech[choose].name}.webp');"`
|
||||
@@ -1060,6 +1069,8 @@ const powerUps = {
|
||||
text += powerUps.junkTechText(choose, `powerUps.choose('tech',${choose})`)
|
||||
} else if (tech.tech[choose].isSkin) {
|
||||
text += powerUps.skinTechText(choose, `powerUps.choose('tech',${choose})`)
|
||||
} else if (tech.tech[choose].isInstant) {
|
||||
text += powerUps.instantTechText(choose, `powerUps.choose('tech',${choose})`)
|
||||
} else { //normal tech
|
||||
text += powerUps.techText(choose, `powerUps.choose('tech',${choose})`)
|
||||
}
|
||||
@@ -1202,6 +1213,8 @@ const powerUps = {
|
||||
text += powerUps.junkTechText(choose, `powerUps.choose('tech',${choose})`)
|
||||
} else if (tech.tech[choose].isSkin) {
|
||||
text += powerUps.skinTechText(choose, `powerUps.choose('tech',${choose})`)
|
||||
} else if (tech.tech[choose].isInstant) {
|
||||
text += powerUps.instantTechTextTechText(choose, `powerUps.choose('tech',${choose})`)
|
||||
} else { //normal tech
|
||||
text += powerUps.techText(choose, `powerUps.choose('tech',${choose})`)
|
||||
}
|
||||
@@ -1327,8 +1340,6 @@ const powerUps = {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (tech.isAddRemoveMaxHealth) {
|
||||
powerUps.spawn(x + 20, y, "tech", false)
|
||||
powerUps.spawn(x - 20, y, "research", false)
|
||||
@@ -1338,20 +1349,11 @@ const powerUps = {
|
||||
powerUps.spawn(x, y - 20, "heal", false)
|
||||
powerUps.spawn(x, y + 40, "heal", false)
|
||||
powerUps.spawn(x, y - 40, "heal", false)
|
||||
// if (this.isBoss && this.isDropPowerUp) {
|
||||
// } else {
|
||||
// const amount = 0.005
|
||||
// if (tech.isEnergyHealth) {
|
||||
// if (m.maxEnergy > amount) {
|
||||
// tech.healMaxEnergyBonus -= amount
|
||||
// m.setMaxEnergy();
|
||||
// }
|
||||
// } else if (m.maxHealth > amount) {
|
||||
// tech.extraMaxHealth -= amount //decrease max health
|
||||
// m.setMaxHealth();
|
||||
// }
|
||||
// }
|
||||
}
|
||||
if (tech.isResearchReality) powerUps.spawnDelay("research", 5)
|
||||
if (tech.isBanish) powerUps.spawnDelay("research", 2)
|
||||
if (tech.isCouplingNoHit) powerUps.spawnDelay("coupling", 9)
|
||||
// if (tech.isRerollDamage) powerUps.spawnDelay("research", 1)
|
||||
}
|
||||
},
|
||||
chooseRandomPowerUp(x, y) { //100% chance to drop a random power up //used in spawn.debris
|
||||
@@ -1389,12 +1391,12 @@ const powerUps = {
|
||||
},
|
||||
ejectTech(choose = 'random', isOverride = false) {
|
||||
if (!simulation.isChoosing || isOverride) {
|
||||
// console.log(tech.tech[choose].name, tech.tech[choose].count, tech.tech[choose].isNonRefundable)
|
||||
// console.log(tech.tech[choose].name, tech.tech[choose].count, tech.tech[choose].isInstant)
|
||||
//find which tech you have
|
||||
if (choose === 'random') {
|
||||
const have = []
|
||||
for (let i = 0; i < tech.tech.length; i++) {
|
||||
if (tech.tech[i].count > 0 && !tech.tech[i].isNonRefundable) have.push(i)
|
||||
if (tech.tech[i].count > 0 && !tech.tech[i].isInstant) have.push(i)
|
||||
}
|
||||
// if (have.length === 0) {
|
||||
// for (let i = 0; i < tech.tech.length; i++) {
|
||||
@@ -1421,7 +1423,7 @@ const powerUps = {
|
||||
} else {
|
||||
return false
|
||||
}
|
||||
} else if (tech.tech[choose].count && !tech.tech[choose].isNonRefundable) {
|
||||
} else if (tech.tech[choose].count && !tech.tech[choose].isInstant) {
|
||||
simulation.makeTextLog(`<span class='color-var'>tech</span>.remove("<span class='color-text'>${tech.tech[choose].name}</span>")`)
|
||||
|
||||
for (let i = 0; i < tech.tech[choose].count; i++) {
|
||||
@@ -1442,7 +1444,7 @@ const powerUps = {
|
||||
}
|
||||
},
|
||||
pauseEjectTech(index) {
|
||||
if ((tech.isPauseEjectTech || simulation.testing) && !simulation.isChoosing && !tech.tech[index].isNonRefundable) {
|
||||
if ((tech.isPauseEjectTech || simulation.testing) && !simulation.isChoosing && !tech.tech[index].isInstant) {
|
||||
// if (tech.tech[index].bonusResearch !== undefined && tech.tech[index].bonusResearch > powerUps.research.count) {
|
||||
// tech.removeTech(index)
|
||||
// } else {
|
||||
|
||||
@@ -432,7 +432,7 @@ const simulation = {
|
||||
if (tech.tech[i].isLost) {
|
||||
if (text) text += "<br>" //add a new line, but not on the first line
|
||||
text += `<span style="text-decoration: line-through;">${tech.tech[i].name}</span>`
|
||||
} else if (tech.tech[i].count > 0 && !tech.tech[i].isNonRefundable) {
|
||||
} else if (tech.tech[i].count > 0 && !tech.tech[i].isInstant) {
|
||||
if (text) text += "<br>" //add a new line, but not on the first line
|
||||
text += tech.tech[i].name
|
||||
if (tech.tech[i].nameInfo) {
|
||||
|
||||
12
js/spawn.js
12
js/spawn.js
@@ -254,12 +254,12 @@ const spawn = {
|
||||
|
||||
//aoe damage to player
|
||||
if (m.immuneCycle < m.cycle && Vector.magnitude(Vector.sub(player.position, this.position)) < this.radius) {
|
||||
const DRAIN = tech.isRadioactiveResistance ? 0.05 * 0.25 : 0.05
|
||||
const DRAIN = tech.isRadioactiveResistance ? 0.05 * 0.2 : 0.05
|
||||
if (m.energy > DRAIN) {
|
||||
if (m.immuneCycle < m.cycle) m.energy -= DRAIN
|
||||
} else {
|
||||
m.energy = 0;
|
||||
m.damage((tech.isRadioactiveResistance ? 0.005 * 0.25 : 0.005) * simulation.dmgScale)
|
||||
m.damage((tech.isRadioactiveResistance ? 0.005 * 0.2 : 0.005) * simulation.dmgScale)
|
||||
simulation.drawList.push({ //add dmg to draw queue
|
||||
x: this.position.x,
|
||||
y: this.position.y,
|
||||
@@ -2089,8 +2089,8 @@ const spawn = {
|
||||
this.death();
|
||||
//hit player
|
||||
if (Vector.magnitude(Vector.sub(this.position, player.position)) < this.explodeRange && m.immuneCycle < m.cycle) {
|
||||
m.damage(0.01 * simulation.dmgScale * (tech.isRadioactiveResistance ? 0.25 : 1));
|
||||
m.energy -= 0.1 * (tech.isRadioactiveResistance ? 0.25 : 1)
|
||||
m.damage(0.01 * simulation.dmgScale * (tech.isRadioactiveResistance ? 0.2 : 1));
|
||||
m.energy -= 0.1 * (tech.isRadioactiveResistance ? 0.2 : 1)
|
||||
if (m.energy < 0) m.energy = 0
|
||||
}
|
||||
const range = this.explodeRange + 50 //mines get a slightly larger range to explode
|
||||
@@ -5060,8 +5060,8 @@ const spawn = {
|
||||
this.death();
|
||||
//hit player
|
||||
if (Vector.magnitude(Vector.sub(this.position, player.position)) < this.explodeRange && m.immuneCycle < m.cycle) {
|
||||
m.damage(0.02 * simulation.dmgScale * (tech.isRadioactiveResistance ? 0.25 : 1));
|
||||
m.energy -= 0.2 * (tech.isRadioactiveResistance ? 0.25 : 1)
|
||||
m.damage(0.02 * simulation.dmgScale * (tech.isRadioactiveResistance ? 0.2 : 1));
|
||||
m.energy -= 0.2 * (tech.isRadioactiveResistance ? 0.2 : 1)
|
||||
if (m.energy < 0) m.energy = 0
|
||||
}
|
||||
// mob[i].isInvulnerable = false //make mineBoss not invulnerable ?
|
||||
|
||||
1043
js/tech.js
1043
js/tech.js
File diff suppressed because it is too large
Load Diff
10
style.css
10
style.css
@@ -934,6 +934,16 @@ summary {
|
||||
margin-bottom: -0.3em;
|
||||
}
|
||||
|
||||
.circle-grid-instant {
|
||||
width: 1.1em;
|
||||
height: 1.1em;
|
||||
border-radius: 50%;
|
||||
border: 0.15em solid hsl(255, 100%, 71%);
|
||||
display: inline-block;
|
||||
margin-bottom: -0.35em;
|
||||
/* background-color: hsla(255, 100%, 71%, 0.3); */
|
||||
}
|
||||
|
||||
.circle-grid-skin {
|
||||
width: 1.25em;
|
||||
height: 1.25em;
|
||||
|
||||
50
todo.txt
50
todo.txt
@@ -1,23 +1,41 @@
|
||||
******************************************************** NEXT PATCH **************************************************
|
||||
|
||||
switched github pages hosting folder
|
||||
https://landgreen.github.io/sidescroller/ -> https://landgreen.github.io/n-gon/
|
||||
<meta http-equiv="refresh" content="0; url=https://landgreen.github.io/n-gon/">
|
||||
adjusted text and math for the fire rate system to use the new "x" syntax
|
||||
tech search is no longer case sensitive
|
||||
|
||||
player damage reduction adjustment: 0.905x -> 0.9x per level per difficulty mode (1,2,4,5)
|
||||
on easy that's 0.30 -> 0.28 by level 12 (a 6% player damage nerf)
|
||||
on why that's 0.0025 -> 0.001797 by level 12 (a 28% player damage nerf)
|
||||
Zectron 1.9->2x damage, -25% -> -5 energy
|
||||
exothermic process -20% -> -5 energy
|
||||
|
||||
you can only get applied science 9->1 time
|
||||
supply chain - spawns a gun, but doesn't give applied science frequency
|
||||
|
||||
bug fixes
|
||||
instant/unRemovable tech has a unique icon and no longer shows up in the tech list
|
||||
marginal utility - no longer spawns ammo
|
||||
heuristics - no longer spawn a gun, 1.2->1.3 fire rate
|
||||
open-source - gives 1 extra bot option and 3x bot tech frequency
|
||||
robotics - now just spawns 2 bots
|
||||
induction brake - doesn't spawn heals, but lasts 15->17 seconds
|
||||
accretion - doesn't spawn heals, but gets 3% duplication
|
||||
mass production - doesn't spawn power ups, but gets 3% duplication
|
||||
Ψ(t) collapse - doesn't spawn research, spawns 5 research from bosses
|
||||
decoherence - doesn't spawn research, spawns 2 research from bosses
|
||||
fine-structure constant - doesn't spawn coupling, spawn 9 coupling from bosses
|
||||
Bayesian statistics - 1.03->1.05x damage, doesn't spawn research
|
||||
Born rule code rewritten, but it should have a similar effect as before
|
||||
triple point - 1.5->5 second freeze, but no coupling spawn
|
||||
geodesics - no longer spawns ammo and guns, but gives 1.5x damage
|
||||
ideal gas law - doesn't remove ammo, 12->6x foam ammo per ammo power up
|
||||
|
||||
*********************************************************** TODO *****************************************************
|
||||
|
||||
removeJunkTechFromPool doesn't seem to remove the correct amount
|
||||
after clicking on a new tech (or getting it in any way) animate adding the tech to your collection
|
||||
|
||||
make search not case sensitive
|
||||
tech - getting caught in an explosion gives you _____
|
||||
damage for 10 seconds?
|
||||
heals
|
||||
|
||||
tech - limit total number of tech to like 10?
|
||||
|
||||
tech - destroying blocks gives _____
|
||||
|
||||
removeJunkTechFromPool doesn't seem to remove the correct amount
|
||||
|
||||
wormholes that end inside wall check to see if the space before the wall is safe and end there instead
|
||||
can use laser code
|
||||
@@ -34,11 +52,9 @@ make sure healing isn't effected by simulation.healScale
|
||||
|
||||
tech - destroys a random tech each new level and gains +damage each time
|
||||
|
||||
tech - destroy all but active gun and convert ammo over to main gun
|
||||
|
||||
List of ways to break the game
|
||||
CPT + high energy regen
|
||||
research->bot fabrication-> ersatz bots -> various bot upgrades
|
||||
research -> bot fabrication -> ersatz bots -> various bot upgrades
|
||||
grappling hook + high fire rate + alternator + time dilation
|
||||
duplication 100%
|
||||
interest + coupling, research + peer review?
|
||||
@@ -1112,6 +1128,8 @@ possible names for tech
|
||||
sidereal - with respect to the stars (an extra rotation for time keeping)
|
||||
holonomy - parallel transport of a vector leads to movement (applies to curved space)
|
||||
holographic - 2-D surface can predict the 3-D space behind it? I think
|
||||
entropic gravity - gravity is emergent in a holographic way
|
||||
(maybe a field tech for negative mass)
|
||||
conformal - similar rules for small and big scales linked to holographic principle
|
||||
hypergolic - A hypergolic propellant combination used in a rocket engine is one whose components spontaneously ignite when they come into contact with each other.
|
||||
swarm intelligence - for a drone tech
|
||||
@@ -1163,7 +1181,7 @@ possible names for tech
|
||||
radioisotope thermoelectric generator -
|
||||
retrovirus: these things make JUNK DNA so link it somehow to that tech?
|
||||
Upon infection with a retrovirus, a cell converts the retroviral RNA into DNA and sometimes the DNA will be passed on to progeny as JUNK DNA
|
||||
|
||||
amalgam, amalgamation - the action, process, or result of combining or uniting.
|
||||
|
||||
******************************************************** CARS IMAGES ********************************************************
|
||||
|
||||
|
||||
Reference in New Issue
Block a user