pause menu can sort tech by keywords

tech: mechatronics - randomly add +(7 to 13)% damage

a few new images
bug fixes
  cherenkov radiation damage bug fixed it does much more damage and matches the description
This commit is contained in:
landgreen
2023-06-15 10:00:19 -07:00
parent d8e978fbe6
commit da559f44f6
20 changed files with 241 additions and 231 deletions

View File

@@ -268,7 +268,7 @@ function collisionChecks(event) {
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
mobs.statusDoT(mob[k], tech.blockDmg * 0.42, 180) //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({

View File

@@ -336,6 +336,25 @@ const build = {
},
pauseGrid() {
// build.pixelDraw();
build.generatePauseLeft() //makes the left side of the pause menu with the tech
build.generatePauseRight() //makes the right side of the pause menu with the tech
document.getElementById("tech").style.display = "none"
document.getElementById("guns").style.display = "none"
document.getElementById("field").style.display = "none"
document.getElementById("health").style.display = "none"
document.getElementById("health-bg").style.display = "none"
document.getElementById("defense-bar").style.display = "none"
document.getElementById("damage-bar").style.display = "none"
//show in game console
// document.getElementById("text-log").style.display = "inline"
simulation.lastLogTime = m.cycle //hide in game console
},
generatePauseLeft() {
//used for junk estimation
let junkCount = 0
let totalCount = 1 //start at one to avoid NaN issues
@@ -358,17 +377,19 @@ const build = {
let text = `<div class="pause-grid-module" style = "padding: 10px; line-height: 110%;">
<span style = "font-size: 0.87em;">
<svg class="SVG-button" onclick="build.shareURL(false)" width="92" height="20" style="padding:0px; margin: 1px;">
<g stroke='none' fill='#333' stroke-width="2" font-size="14px" font-family="Ariel, sans-serif"> <text x="5" y="15">copy build url</text></g>
</svg><span style="font-size:1.5em;font-weight: 600; float: right;">PAUSED</span>
<br>
<input onclick="build.showImages('pause')" type="checkbox" id="hide-images-pause" name="hide-images-pause" ${localSettings.isHideImages ? "checked" : ""}>
<label for="hide-images-pause" title="hide images for fields, guns, and tech" style="font-size:1.3em;" >hide images</label>
<span style="font-size:1.5em;font-weight: 600; float: left;">PAUSED</span>
<span style="float: right;">press ${input.key.pause} to resume</span>
<br>
<input onclick="build.hideHUD('settings')" type="checkbox" id="hide-hud" name="hide-hud" ${localSettings.isHideHUD ? "checked" : ""}>
<label for="hide-hud" title="hide: tech, defense, damage, in game console" style="font-size:1.3em;">minimal HUD</label>
<br>
<button onclick="build.shareURL(false)" class='sort-button' style="font-size:1em;float: right;">copy build url</button>
<input onclick="build.showImages('pause')" type="checkbox" id="hide-images-pause" name="hide-images-pause" ${localSettings.isHideImages ? "checked" : ""}>
<label for="hide-images-pause" title="hide images for fields, guns, and tech" style="font-size:1.15em;" >hide images</label>
<br>
<input onclick="build.hideHUD('settings')" type="checkbox" id="hide-hud" name="hide-hud" ${localSettings.isHideHUD ? "checked" : ""}>
<label for="hide-hud" title="hide: tech, defense, damage, in game console" style="font-size:1.15em;">minimal HUD</label>
<br>
<br><strong class='color-d'>damage</strong>: ${((tech.damageFromTech())).toPrecision(4)} &nbsp; &nbsp; difficulty: ${((m.dmgScale)).toPrecision(4)}
<br><strong class='color-defense'>defense</strong>: ${tech.isEnergyHealth ? (1 - Math.pow(m.defense(), 0.13)).toPrecision(5) : (1 - m.defense()).toPrecision(5)} &nbsp; &nbsp; difficulty: ${(1 / simulation.dmgScale).toPrecision(4)}
<br><strong><em>fire rate</em></strong>: ${((1 - b.fireCDscale) * 100).toFixed(b.fireCDscale < 0.1 ? 2 : 0)}%
@@ -395,15 +416,15 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
if (tech.isPauseSwitchField && !simulation.isChoosing) {
const style = localSettings.isHideImages ? `style="height:auto;"` : `style="background-image: url('img/field/${m.fieldUpgrades[m.fieldMode].name}${m.fieldMode === 0 ? m.fieldUpgrades[0].imageNumber : ""}.webp');"`
text += `<div class="pause-grid-module card-background" id ="pause-field" ${style} >
<div class="card-text" style = "animation: fieldColorCycle 1s linear infinite alternate;">
<div class="grid-title"><div class="circle-grid field"></div> &nbsp; ${build.nameLink(m.fieldUpgrades[m.fieldMode].name)}</div>
${m.fieldUpgrades[m.fieldMode].description}</div> </div>`
<div class="card-text" style = "animation: fieldColorCycle 1s linear infinite alternate;">
<div class="grid-title"><div class="circle-grid field"></div> &nbsp; ${build.nameLink(m.fieldUpgrades[m.fieldMode].name)}</div>
${m.fieldUpgrades[m.fieldMode].description}</div> </div>`
} else {
const style = localSettings.isHideImages ? `style="height:auto;"` : `style="background-image: url('img/field/${m.fieldUpgrades[m.fieldMode].name}${m.fieldMode === 0 ? m.fieldUpgrades[0].imageNumber : ""}.webp');"`
text += `<div class="pause-grid-module card-background" id ="pause-field" ${style} >
<div class="card-text">
<div class="grid-title"><div class="circle-grid field"></div> &nbsp; ${build.nameLink(m.fieldUpgrades[m.fieldMode].name)}</div>
${m.fieldUpgrades[m.fieldMode].description}</div> </div>`
<div class="card-text">
<div class="grid-title"><div class="circle-grid field"></div> &nbsp; ${build.nameLink(m.fieldUpgrades[m.fieldMode].name)}</div>
${m.fieldUpgrades[m.fieldMode].description}</div> </div>`
}
// for (let i = 0, len = b.inventory.length; i < len; i++) {
// text += `<div class="pause-grid-module"><div class="grid-title"><div class="circle-grid gun"></div> &nbsp; ${build.nameLink(b.guns[b.inventory[i]].name)} - <span style="font-size:100%;font-weight: 100;">${b.guns[b.inventory[i]].ammo}</span></div> ${b.guns[b.inventory[i]].description}</div>`
@@ -411,16 +432,34 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
for (let i = 0, len = b.inventory.length; i < len; i++) {
const style = localSettings.isHideImages ? `style="height:auto;"` : `style="background-image: url('img/gun/${b.guns[b.inventory[i]].name}.webp');"`
text += `<div class="pause-grid-module card-background" ${style} >
<div class="card-text">
<div class="grid-title"><div class="circle-grid gun"></div> &nbsp; ${build.nameLink(b.guns[b.inventory[i]].name)} - <span style="font-size:100%;font-weight: 100;">${b.guns[b.inventory[i]].ammo}</span></div>
${b.guns[b.inventory[i]].description}</div> </div>`
<div class="card-text">
<div class="grid-title"><div class="circle-grid gun"></div> &nbsp; ${build.nameLink(b.guns[b.inventory[i]].name)} - <span style="font-size:100%;font-weight: 100;">${b.guns[b.inventory[i]].ammo}</span></div>
${b.guns[b.inventory[i]].description}</div> </div>`
}
if (!localSettings.isHideHUD) text += `<div class="pause-grid-module pause-console" style = "background-color: rgba(255,255,255,0.3);">${document.getElementById("text-log").innerHTML}</div>` //show last in game console message
let el = document.getElementById("pause-grid-left")
el.style.display = "grid"
el.innerHTML = text
},
generatePauseRight() {
//right side
text = "";
// <input onclick="" type="checkbox" id="sort-damage" name="sort-damage" style="width:1em; height:1em;">
// <label for="sort-damage" title="sort tech by damage"><strong class='color-d'>damage</strong></label>
// <input onclick="build.sortTech('guntech')" type="checkbox" id="sort-guntech" name="sort-guntech" style="width:1em; height:1em;">
// <label for="sort-guntech" title="sort guntech"> <strong class='color-g'>gun</strong><strong class='color-m'>tech</strong></label>
// <button onclick="build.sortTech('bot')" class='sort-button'><strong class='color-bot'>bot</strong></button>
let text = `<div class="sort">
<button onclick="build.sortTech('damage')" class='sort-button'><strong class='color-d'>damage</strong></button>
<button onclick="build.sortTech('guntech')" class='sort-button'><strong class='color-g'>gun</strong><strong class='color-m'>tech</strong></button>
<button onclick="build.sortTech('fieldtech')" class='sort-button'><strong class='color-f'>field</strong><strong class='color-m'>tech</strong></button>
<button onclick="build.sortTech('heal')" class='sort-button'><strong class='color-h'>heal</strong></button>
<button onclick="build.sortTech('defense')" class='sort-button'><strong style="letter-spacing: 1px;font-weight: 100;">defense</strong></button>
<button onclick="build.sortTech('energy')" class='sort-button'><strong class='color-f'>energy</strong></button>
<input type="search" id="sort-input" style="width: 8em;font-size: 0.6em;color:#888;" placeholder="sort by"/>
<button onclick="build.sortTech('input')" class='sort-button' style="border-radius: 0em;border: 1.5px #000 solid;font-size: 0.6em;" value="damage">sort</button>
</div>`;
// const style = (tech.isPauseEjectTech && !simulation.isChoosing) ? 'style="animation: techColorCycle 1s linear infinite alternate;"' : ''
const ejectClass = (tech.isPauseEjectTech && !simulation.isChoosing) ? 'pause-eject' : ''
for (let i = 0, len = tech.tech.length; i < len; i++) {
@@ -470,23 +509,55 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>" : ""}
text += `<div class="pause-grid-module" style="text-decoration: line-through; padding-left: 8px; opacity: 0.4;"><div class="grid-title">${tech.tech[i].link}</div>${tech.tech[i].descriptionFunction ? tech.tech[i].descriptionFunction() : tech.tech[i].description}</div></div>`
}
}
el = document.getElementById("pause-grid-right")
const el = document.getElementById("pause-grid-right")
el.style.display = "grid"
el.innerHTML = text
},
sortTech(find) {
const sortKeyword = (a, b) => {
let aHasKeyword = (a.descriptionFunction ? a.descriptionFunction() : a.description).includes(find) || a.name.includes(find)
let bHasKeyword = (b.descriptionFunction ? b.descriptionFunction() : b.description).includes(find) || b.name.includes(find)
if ((aHasKeyword) && !bHasKeyword) return -1;
if (!aHasKeyword && bHasKeyword) return 1;
return 0;
}
document.getElementById("tech").style.display = "none"
document.getElementById("guns").style.display = "none"
document.getElementById("field").style.display = "none"
document.getElementById("health").style.display = "none"
document.getElementById("health-bg").style.display = "none"
document.getElementById("defense-bar").style.display = "none"
document.getElementById("damage-bar").style.display = "none"
//show in game console
// document.getElementById("text-log").style.display = "inline"
simulation.lastLogTime = m.cycle //hide in game console
if (find === 'guntech') {
tech.tech.sort((a, b) => {
if (a.isGunTech && !b.isGunTech) return -1; //sort to the top
if (!a.isGunTech && b.isGunTech) return 1; //sort to the bottom
return 0;
});
} else if (find === 'fieldtech') {
tech.tech.sort((a, b) => {
if (a.isFieldTech && !b.isFieldTech) return -1; //sort to the top
if (!a.isFieldTech && b.isFieldTech) return 1; //sort to the bottom
return 0;
});
} else if (find === 'damage') {
tech.tech.sort(sortKeyword);
} else if (find === 'defense') {
tech.tech.sort(sortKeyword);
} else if (find === 'energy') {
tech.tech.sort(sortKeyword);
} else if (find === 'heal') {
tech.tech.sort((a, b) => {
if (a.isHealTech && !b.isHealTech) return -1; //sort to the top
if (!a.isHealTech && b.isHealTech) return 1; //sort to the bottom
return 0;
});
} else if (find === 'bot') {
tech.tech.sort((a, b) => {
if (a.isBotTech && !b.isBotTech) return -1; //sort to the top
if (!a.isBotTech && b.isBotTech) return 1; //sort to the bottom
return 0;
});
} else if (find === 'input') {
find = document.getElementById("sort-input").value;
tech.tech.sort(sortKeyword);
}
build.generatePauseRight() //makes the right side of the pause menu with the tech
document.getElementById("sort-input").value = find; //make the sorted string display in the keyword search input field
},
unPauseGrid() {
document.getElementById("guns").style.display = "inline"
@@ -1158,7 +1229,7 @@ window.addEventListener("keydown", function (event) {
}
break
case input.key.testing:
if (m.alive && localSettings.loreCount > 0) {
if (m.alive && localSettings.loreCount > 0 && !simulation.paused) {
if (simulation.difficultyMode > 4) {
simulation.makeTextLog("<em>testing mode disabled for this difficulty</em>");
break

View File

@@ -27,24 +27,26 @@ const level = {
// m.immuneCycle = Infinity //you can't take damage
// tech.tech[297].frequency = 100
// m.couplingChange(10)
// m.setField("negative mass") //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
// m.setField("standing wave") //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
// m.energy = 0
// simulation.molecularMode = 2
// m.damage(0.1);
// b.giveGuns("nail gun") //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.giveGuns("shotgun") //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[3].ammo = 100000000
// tech.giveTech("accretion")
// tech.giveTech("surface plasmons")
// tech.giveTech("bremsstrahlung")
// tech.giveTech("cherenkov radiation")
// tech.giveTech("irradiated nails")
// for (let i = 0; i < 6; ++i) tech.giveTech("Lorentz transformation")
// for (let i = 0; i < 1; ++i) tech.giveTech("waste heat recovery")
// for (let i = 0; i < 1; ++i) tech.giveTech("rivet gun")
// requestAnimationFrame(() => { for (let i = 0; i < 1; i++) tech.giveTech("foam-bot") });
// for (let i = 0; i < 1; i++) tech.giveTech("foam-bot upgrade")
// for (let i = 0; i < 1; ++i) tech.giveTech("flatland")
// for (let i = 0; i < 1; ++i) tech.giveTech("ternary")
// for (let i = 0; i < 3; ++i) tech.giveTech("mechatronics")
// for (let i = 0; i < 3; i++) powerUps.directSpawn(450, -50, "tech");
// for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "research");
// for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "coupling");
// level.subway();
// level.testing();
// spawn.nodeGroup(3200, -300, "sniper")
// spawn.nodeGroup(2200, -300, "sniper")
// spawn.nodeGroup(2200, -300, "sniper")
@@ -1850,100 +1852,6 @@ const level = {
testing() {
simulation.enableConstructMode() //tech.giveTech('motion sickness') //used to build maps in testing mode
//clipping everything except LoS
//stroke around map
// simulation.ephemera.push({
// name: "LoS", count: 0, do() {
// const pos = m.pos
// const radius = 5000
// if (!simulation.isTimeSkipping) {
// const vertices = simulation.sight.circleLoS(pos, radius);
// if (vertices.length) {
// ctx.beginPath();
// ctx.moveTo(vertices[0].x, vertices[0].y);
// for (var i = 1; i < vertices.length; i++) {
// var currentDistance = Math.sqrt((vertices[i - 1].x - pos.x) ** 2 + (vertices[i - 1].y - pos.y) ** 2);
// var newDistance = Math.sqrt((vertices[i].x - pos.x) ** 2 + (vertices[i].y - pos.y) ** 2);
// if (Math.abs(currentDistance - radius) < 1 && Math.abs(newDistance - radius) < 1) {
// const currentAngle = Math.atan2(vertices[i - 1].y - pos.y, vertices[i - 1].x - pos.x);
// const newAngle = Math.atan2(vertices[i].y - pos.y, vertices[i].x - pos.x);
// ctx.arc(pos.x, pos.y, radius, currentAngle, newAngle);
// } else {
// ctx.lineTo(vertices[i].x, vertices[i].y)
// }
// }
// newDistance = Math.sqrt((vertices[0].x - pos.x) ** 2 + (vertices[0].y - pos.y) ** 2);
// currentDistance = Math.sqrt((vertices[vertices.length - 1].x - pos.x) ** 2 + (vertices[vertices.length - 1].y - pos.y) ** 2);
// if (Math.abs(currentDistance - radius) < 1 && Math.abs(newDistance - radius) < 1) {
// const currentAngle = Math.atan2(vertices[vertices.length - 1].y - pos.y, vertices[vertices.length - 1].x - pos.x);
// const newAngle = Math.atan2(vertices[0].y - pos.y, vertices[0].x - pos.x);
// ctx.arc(pos.x, pos.y, radius, currentAngle, newAngle);
// } else {
// ctx.lineTo(vertices[0].x, vertices[0].y)
// }
// ctx.strokeStyle = "#000";
// ctx.lineWidth = 20;
// ctx.stroke(simulation.draw.mapPath);
// ctx.globalCompositeOperation = "destination-in";
// ctx.fillStyle = "#000";
// ctx.fill();
// ctx.globalCompositeOperation = "source-over";
// ctx.clip();
// }
// }
// },
// })
//clipping everything except LoS
//redrawing map, so it's still visible
// simulation.ephemera.push({
// name: "LoS", count: 0, do() {
// const pos = m.pos
// const radius = 3000
// if (!simulation.isTimeSkipping) {
// const vertices = simulation.sight.circleLoS(pos, radius);
// if (vertices.length) {
// ctx.beginPath();
// ctx.moveTo(vertices[0].x, vertices[0].y);
// for (var i = 1; i < vertices.length; i++) {
// var currentDistance = Math.sqrt((vertices[i - 1].x - pos.x) ** 2 + (vertices[i - 1].y - pos.y) ** 2);
// var newDistance = Math.sqrt((vertices[i].x - pos.x) ** 2 + (vertices[i].y - pos.y) ** 2);
// if (Math.abs(currentDistance - radius) < 1 && Math.abs(newDistance - radius) < 1) {
// const currentAngle = Math.atan2(vertices[i - 1].y - pos.y, vertices[i - 1].x - pos.x);
// const newAngle = Math.atan2(vertices[i].y - pos.y, vertices[i].x - pos.x);
// ctx.arc(pos.x, pos.y, radius, currentAngle, newAngle);
// } else {
// ctx.lineTo(vertices[i].x, vertices[i].y)
// }
// }
// newDistance = Math.sqrt((vertices[0].x - pos.x) ** 2 + (vertices[0].y - pos.y) ** 2);
// currentDistance = Math.sqrt((vertices[vertices.length - 1].x - pos.x) ** 2 + (vertices[vertices.length - 1].y - pos.y) ** 2);
// if (Math.abs(currentDistance - radius) < 1 && Math.abs(newDistance - radius) < 1) {
// const currentAngle = Math.atan2(vertices[vertices.length - 1].y - pos.y, vertices[vertices.length - 1].x - pos.x);
// const newAngle = Math.atan2(vertices[0].y - pos.y, vertices[0].x - pos.x);
// ctx.arc(pos.x, pos.y, radius, currentAngle, newAngle);
// } else {
// ctx.lineTo(vertices[0].x, vertices[0].y)
// }
// ctx.strokeStyle = "#234";
// ctx.lineWidth = 9;
// ctx.stroke(simulation.draw.mapPath);
// ctx.globalCompositeOperation = "destination-in";
// ctx.fillStyle = "#000";
// ctx.fill();
// ctx.globalCompositeOperation = "source-over";
// // ctx.fill(simulation.draw.mapPath);
// // ctx.fillStyle = "#000";
// ctx.clip();
// }
// }
// },
// })
document.body.style.backgroundColor = "#fff";
// color.map = "#444" //custom map color
// level.difficultyIncrease(14); //hard mode level 7
@@ -2033,10 +1941,10 @@ const level = {
//???
// level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why
level.difficultyIncrease(3 * 4) //30 is near max on hard //60 is near max on why
// m.addHealth(Infinity)
// spawn.starter(1900, -500, 200) //big boy
spawn.starter(1900, -500, 200) //big boy
// for (let i = 0; i < 10; ++i) spawn.launcher(1900, -500)
// spawn.suckerBoss(1900, -500)
// spawn.launcherBoss(3200, -500)

View File

@@ -188,7 +188,8 @@ const mobs = {
who.status.push({
effect() {
if ((simulation.cycle - this.startCycle) % 30 === 0) {
let dmg = m.dmgScale * this.dmg * tech.radioactiveDamage
let dmg = m.dmgScale * tech.radioactiveDamage * this.dmg
console.log(dmg)
who.damage(dmg);
if (who.damageReduction) {
simulation.drawList.push({ //add dmg to draw queue

View File

@@ -377,9 +377,9 @@ const m = {
//randomize ammo based on ammo/ammoPack count
for (let i = 0, len = b.inventory.length; i < len; i++) {
if (b.guns[b.inventory[i]].ammo !== Infinity) b.guns[b.inventory[i]].ammo = Math.max(0, Math.floor(ammoCount / b.inventory.length * b.guns[b.inventory[i]].ammoPack * (1.05 + 0.3 * (Math.random() - 0.5))))
if (b.guns[b.inventory[i]].ammo !== Infinity) b.guns[b.inventory[i]].ammo = Math.max(0, Math.floor(ammoCount / b.inventory.length * b.guns[b.inventory[i]].ammoPack * (1.15 + 0.3 * (Math.random() - 0.5))))
}
console.log(b.activeGun)
//randomize tech
for (let i = 0; i < totalTech; i++) {
//find what tech I could get
@@ -545,7 +545,7 @@ const m = {
if (tech.isZeno) dmg *= 0.15
if (tech.isFieldHarmReduction) dmg *= 0.5
if (tech.isHarmMACHO) dmg *= 0.4
if (tech.isImmortal) dmg *= 0.67
if (tech.isImmortal) dmg *= 0.7
if (tech.energyRegen === 0) dmg *= 0.34
// if (tech.healthDrain) dmg *= 1 + 3.33 * tech.healthDrain //tech.healthDrain = 0.03 at one stack //cause more damage
if (m.fieldMode === 0 || m.fieldMode === 3) dmg *= 0.973 ** m.coupling
@@ -2317,7 +2317,7 @@ const m = {
if (who.isMobBullet) {
who.damage(tech.blockDmg * m.dmgScale * 3, true)
} else {
mobs.statusDoT(who, tech.blockDmg * m.dmgScale * 4 / 12, 360) //200% increase -> x (1+2) //over 7s -> 360/30 = 12 half seconds -> 3/12
mobs.statusDoT(who, tech.blockDmg * 0.42, 180) //200% increase -> x (1+2) //over 7s -> 360/30 = 12 half seconds -> 3/12
}
} else {
who.damage(tech.blockDmg * m.dmgScale, true)
@@ -2531,7 +2531,7 @@ const m = {
},
fieldUpgrades: [{
name: "field emitter",
imageNumber: Math.floor(Math.random() * 20),
imageNumber: Math.floor(Math.random() * 23),
description: `use <strong class='color-f'>energy</strong> to <strong>deflect</strong> mobs
<br>generate <strong>6</strong> <strong class='color-f'>energy</strong> per second`, // <br><strong>100</strong> max <strong class='color-f'>energy</strong>
effect: () => {
@@ -2727,7 +2727,7 @@ const m = {
if (mob[i].isMobBullet) {
mob[i].damage(tech.blockDmg * m.dmgScale * 3, true)
} else {
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
mobs.statusDoT(mob[i], tech.blockDmg * m.dmgScale * 0.42, 180) //200% increase -> x (1+2) //over 7s -> 360/30 = 12 half seconds -> 3/12
}
} else {
mob[i].damage(tech.blockDmg * m.dmgScale, true)

View File

@@ -254,7 +254,7 @@ const tech = {
if (tech.isSpeedDamage) dmg *= 1 + Math.min(0.66, player.speed * 0.0165)
if (tech.isDamageAfterKillNoRegen && m.lastKillCycle + 300 > m.cycle) dmg *= 1.6
if (tech.isAxion && tech.isHarmMACHO) dmg *= 2 - m.defense()
if (tech.isHarmDamage && m.lastHarmCycle + 600 > m.cycle) dmg *= 3;
if (tech.isHarmDamage && m.lastHarmCycle + 480 > m.cycle) dmg *= 3;
if (tech.lastHitDamage && m.lastHit) dmg *= 1 + tech.lastHitDamage * m.lastHit * (2 - m.defense()) // if (!simulation.paused) m.lastHit = 0
if (tech.isLowHealthDmg) dmg *= 1 + 0.7 * Math.max(0, 1 - (tech.isEnergyHealth ? m.energy : m.health))
return dmg
@@ -757,25 +757,6 @@ const tech = {
// }
}
},
{
name: "integrated armament",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Weapon' class="link">integrated armament</a>`,
description: `<span style = 'font-size:95%;'>+<strong>25%</strong> <strong class='color-d'>damage</strong>, but new <strong class='color-g'>guns</strong><br>replace your current <strong class='color-g'>gun</strong> and convert <strong class='color-g'>gun</strong><strong class='color-m'>tech</strong></span>`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return b.inventory.length === 1
},
requires: "only 1 gun",
effect() {
tech.isOneGun = true;
},
remove() {
tech.isOneGun = false;
}
},
{
name: "supply chain",
descriptionFunction() {
@@ -987,7 +968,52 @@ const tech = {
}
}
},
{
name: "integrated armament",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Weapon' class="link">integrated armament</a>`,
description: `<span style = 'font-size:95%;'>+<strong>25%</strong> <strong class='color-d'>damage</strong>, but new <strong class='color-g'>guns</strong> replace<br>your current <strong class='color-g'>gun</strong> and convert <strong class='color-g'>gun</strong><strong class='color-m'>tech</strong></span>`,
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() {
return b.inventory.length === 1
},
requires: "only 1 gun",
effect() {
tech.isOneGun = true;
},
remove() {
tech.isOneGun = false;
}
},
{
name: "mechatronics",
descriptionFunction() {
let damageTotal = 1
for (let i = 0; i < this.damageSoFar.length; i++) damageTotal *= this.damageSoFar[i]
let currentDamage = ""
if (this.count) currentDamage = `<br><em>(+${(100 * (damageTotal - 1)).toFixed(0)}%)</em>`
return `gain between <strong>+7%</strong> and <strong>+13%</strong> <strong class='color-d'>damage</strong>` + currentDamage
},
maxCount: 9,
count: 0,
frequency: 1,
frequencyDefault: 1,
allowed() { return true },
requires: "",
damage: 1.1,
damageSoFar: [], //tracks the random damage upgrades so it can be removed and in descriptionFunction
effect() {
const damage = (Math.floor((Math.random() * 0.07 + 0.07 + 1) * 100)) / 100
tech.damage *= damage
this.damageSoFar.push(damage)
},
remove() {
for (let i = 0; i < this.damageSoFar.length; i++) tech.damage /= this.damageSoFar[i]
this.damageSoFar.length = 0
}
},
// {
// name: "coyote",
// description: "",
@@ -1055,7 +1081,7 @@ const tech = {
{
name: "microstates",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Microstate_(statistical_mechanics)' class="link">microstates</a>`,
description: "for each active <strong>bullet / bot</strong><br><strong>+0.7%</strong> <strong class='color-d'>damage</strong>",
description: "for each active <strong>bullet</strong> or <strong>bot</strong><br><strong>+0.7%</strong> <strong class='color-d'>damage</strong>",
maxCount: 1,
count: 0,
frequency: 1,
@@ -3166,7 +3192,7 @@ const tech = {
},
{
name: "quantum immortality",
description: "<strong>+33%</strong> <strong class='color-defense'>defense</strong><br>after <strong>dying</strong>, continue in an <strong class='alt'>alternate reality</strong>",
description: "<strong>+30%</strong> <strong class='color-defense'>defense</strong><br>after <strong>dying</strong>, continue in an <strong class='alt'>alternate reality</strong>",
maxCount: 1,
count: 0,
frequency: 1,
@@ -4068,7 +4094,7 @@ const tech = {
},
{
name: "null hypothesis",
description: `<strong>+9%</strong> <strong class='color-d'>damage</strong><br><strong>removing</strong> this spawns ${powerUps.orb.research(15)}`,
description: `<strong>+8%</strong> <strong class='color-d'>damage</strong><br><strong>removing</strong> this spawns ${powerUps.orb.research(15)}`,
maxCount: 1,
count: 0,
frequency: 1,
@@ -4078,7 +4104,7 @@ const tech = {
return true
},
requires: "",
damage: 1.09,
damage: 1.08,
effect() {
tech.damage *= this.damage
},
@@ -7360,7 +7386,7 @@ const tech = {
},
{
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><strong>+300%</strong> <strong class='color-d'>damage</strong> over <strong>6</strong> seconds",
description: "bremsstrahlung's effects are <strong class='color-p'>radioactive</strong><br><strong>+250%</strong> <strong class='color-d'>damage</strong> over <strong>3</strong> seconds",
isFieldTech: true,
maxCount: 1,
count: 0,
@@ -7483,7 +7509,7 @@ const tech = {
},
{
name: "radiative equilibrium",
description: "after losing <strong class='color-h'>health</strong><br><strong>+200%</strong> <strong class='color-d'>damage</strong> for <strong>10</strong> seconds",
description: "after losing <strong class='color-h'>health</strong><br><strong>+200%</strong> <strong class='color-d'>damage</strong> for <strong>8</strong> seconds",
isFieldTech: true,
maxCount: 1,
count: 0,