elasticity
tech: elasticity - skin, does "crouch landings" a tiny bit more jump and move faster, +15% defense (replaces squirrel cage rotor) tech: diaphragm - skin, defense cycles between -33% and +100% requires aperture tungsten carbide 150->200 maximum health but now does "crouch landings" a more Zectron damage 80->100% and it does a bit less harm to player flip-flop, relay switch are no longer skins pause brings up the most recent in game console message in game console no longer fades out it just instantly goes on and off bug fixes
This commit is contained in:
@@ -3751,7 +3751,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);
|
||||
Matter.Body.setDensity(bullet[me], 0.0008 + 0.0008 * tech.superHarm);
|
||||
Matter.Body.setDensity(bullet[me], 0.0008 + 0.0009 * tech.superHarm);
|
||||
bullet[me].endCycle = simulation.cycle + Math.floor(300 + 90 * Math.random());
|
||||
bullet[me].minDmgSpeed = 0;
|
||||
bullet[me].restitution = 1;
|
||||
@@ -3761,7 +3761,7 @@ const b = {
|
||||
this.force.y += this.mass * 0.0012;
|
||||
if (Matter.Query.collides(this, [player]).length) {
|
||||
this.endCycle = 0
|
||||
let dmg = 0.02 * this.mass * tech.superHarm
|
||||
let dmg = 0.015 * this.mass * tech.superHarm
|
||||
m.damage(dmg);
|
||||
simulation.drawList.push({ //add dmg to draw queue
|
||||
x: this.position.x,
|
||||
|
||||
@@ -35,7 +35,7 @@ function playerOnGroundCheck(event) {
|
||||
//sets a hard land where player stays in a crouch for a bit and can't jump
|
||||
//crouch is forced in groundControl below
|
||||
const momentum = player.velocity.y * player.mass //player mass is 5 so this triggers at 26 down velocity, unless the player is holding something
|
||||
if (momentum > 130) {
|
||||
if (momentum > tech.hardLanding) {
|
||||
m.doCrouch();
|
||||
m.yOff = m.yOffWhen.jump;
|
||||
m.hardLandCD = m.cycle + Math.min(momentum / 6.5 - 6, 40)
|
||||
|
||||
@@ -380,7 +380,7 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>": ""}
|
||||
<div class="grid-title"><div class="circle-grid gun"></div> ${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>`
|
||||
}
|
||||
|
||||
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
|
||||
@@ -441,6 +441,11 @@ ${simulation.isCheating ? "<br><br><em>lore disabled</em>": ""}
|
||||
document.getElementById("field").style.display = "none"
|
||||
document.getElementById("health").style.display = "none"
|
||||
document.getElementById("health-bg").style.display = "none"
|
||||
|
||||
//show in game console
|
||||
// document.getElementById("text-log").style.display = "inline"
|
||||
simulation.lastLogTime = m.cycle //hide in game console
|
||||
|
||||
},
|
||||
unPauseGrid() {
|
||||
document.getElementById("tech").style.display = "inline"
|
||||
|
||||
17
js/level.js
17
js/level.js
@@ -33,12 +33,12 @@ 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.giveGuns("wave") //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[0].ammo = 10000
|
||||
// tech.giveTech("tungsten carbide")
|
||||
// tech.giveTech("ship")
|
||||
// tech.giveTech("aperture")
|
||||
// tech.giveTech("diaphragm")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("mass-energy equivalence")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("squirrel-cage rotor")
|
||||
// for (let i = 0; i < 1; ++i) tech.giveTech("tungsten carbide")
|
||||
// for (let i = 0; i < 1; i++) tech.giveTech("CPT symmetry")
|
||||
// for (let i = 0; i < 1; i++) tech.giveTech("Meissner effect")
|
||||
// for (let i = 0; i < 1; i++) tech.giveTech("elasticity")
|
||||
// for (let i = 0; i < 3; i++) powerUps.directSpawn(450, -50, "tech");
|
||||
// for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "boost");
|
||||
// for (let i = 0; i < 10; i++) powerUps.directSpawn(1750, -500, "coupling");
|
||||
@@ -57,9 +57,13 @@ const level = {
|
||||
// for (let i = 0; i < 40; ++i) tech.giveTech()
|
||||
// for (let i = 0; i < 13; ++i) powerUps.directSpawn(m.pos.x + 50 * Math.random(), m.pos.y + 50 * Math.random(), "research");
|
||||
|
||||
//a for loop that produces Fibinochi numbers
|
||||
|
||||
|
||||
|
||||
level[simulation.isTraining ? "walk" : "intro"]() //normal starting level ************************************************
|
||||
|
||||
// simulation.isAutoZoom = false;
|
||||
// simulation.isAutoZoom = false; //look in close
|
||||
// simulation.zoomScale *= 0.5;
|
||||
// simulation.setZoom();
|
||||
|
||||
@@ -259,7 +263,7 @@ const level = {
|
||||
level.disableExit = true
|
||||
document.getElementById("health").style.display = "none"
|
||||
document.getElementById("health-bg").style.display = "none"
|
||||
document.getElementById("text-log").style.opacity = 0; //fade out any active text logs
|
||||
document.getElementById("text-log").style.display = "none"
|
||||
document.getElementById("fade-out").style.opacity = 1; //slowly fades out
|
||||
setTimeout(function() {
|
||||
simulation.paused = true;
|
||||
@@ -314,6 +318,7 @@ const level = {
|
||||
}
|
||||
|
||||
if (simulation.isTraining) {
|
||||
simulation.isHorizontalFlipped = false
|
||||
level.levels = level.trainingLevels.slice(0) //copy array, not by just by assignment
|
||||
} else { //add remove and shuffle levels for the normal game (not training levels)
|
||||
level.levels = level.playableLevels.slice(0) //copy array, not by just by assignment
|
||||
|
||||
174
js/player.js
174
js/player.js
@@ -464,7 +464,7 @@ const m = {
|
||||
simulation.paused = true;
|
||||
m.health = 0;
|
||||
m.displayHealth();
|
||||
document.getElementById("text-log").style.opacity = 0; //fade out any active text logs
|
||||
document.getElementById("text-log").style.display = "none"
|
||||
document.getElementById("fade-out").style.opacity = 0.9; //slowly fade to 90% white on top of canvas
|
||||
// build.shareURL(false)
|
||||
setTimeout(function() {
|
||||
@@ -533,7 +533,7 @@ const m = {
|
||||
},
|
||||
baseHealth: 1,
|
||||
setMaxHealth() {
|
||||
m.maxHealth = m.baseHealth + tech.extraMaxHealth + 1.5 * tech.isFallingDamage + 4 * tech.isFlipFlop * tech.isFlipFlopOn * tech.isFlipFlopHealth //+ (m.fieldMode === 0 || m.fieldMode === 5) * 0.5 * m.coupling
|
||||
m.maxHealth = m.baseHealth + tech.extraMaxHealth + 2 * tech.isFallingDamage + 4 * tech.isFlipFlop * tech.isFlipFlopOn * tech.isFlipFlopHealth //+ (m.fieldMode === 0 || m.fieldMode === 5) * 0.5 * m.coupling
|
||||
document.getElementById("health-bg").style.width = `${Math.floor(300 * m.maxHealth)}px`
|
||||
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-h'>maxHealth</span> <span class='color-symbol'>=</span> ${m.maxHealth.toFixed(2)}`)
|
||||
if (m.health > m.maxHealth) m.health = m.maxHealth;
|
||||
@@ -546,6 +546,8 @@ const m = {
|
||||
let dmg = 1
|
||||
dmg *= m.fieldHarmReduction
|
||||
// if (!tech.isFlipFlopOn && tech.isFlipFlopHealth) dmg *= 0.5
|
||||
// 1.25 + Math.sin(m.cycle * 0.01)
|
||||
if (tech.isDiaphragm) dmg *= 0.66 + 0.66 * Math.sin(m.cycle * 0.01);
|
||||
if (tech.isZeno) dmg *= 0.15
|
||||
if (tech.isFieldHarmReduction) dmg *= 0.5
|
||||
if (tech.isHarmMACHO) dmg *= 0.4
|
||||
@@ -556,7 +558,7 @@ const m = {
|
||||
if (m.fieldMode === 0 || m.fieldMode === 3) dmg *= 0.73 ** m.coupling
|
||||
if (tech.isLowHealthDefense) dmg *= 1 - Math.max(0, 1 - m.health) * 0.8
|
||||
if (tech.isHarmReduceNoKill && m.lastKillCycle + 300 < m.cycle) dmg *= 0.33
|
||||
if (tech.squirrelFx !== 1) dmg *= 1 + (tech.squirrelFx - 1) / 5 //cause more damage
|
||||
if (tech.squirrelFx !== 1) dmg *= 1 - 3 * (tech.squirrelFx - 1) / 5 //cause more damage
|
||||
if (tech.isAddBlockMass && m.isHolding) dmg *= 0.15
|
||||
if (tech.isSpeedHarm && player.speed > 0.1) dmg *= 1 - Math.min(player.speed * 0.0165, 0.66)
|
||||
if (tech.isHarmReduce && input.field && m.fieldCDcycle < m.cycle) dmg *= 0.25
|
||||
@@ -836,6 +838,9 @@ const m = {
|
||||
draw() {},
|
||||
isAltSkin: false,
|
||||
resetSkin() {
|
||||
m.yOffWhen.jump = 70
|
||||
m.yOffWhen.stand = 49
|
||||
m.yOffWhen.crouch = 22
|
||||
m.isAltSkin = false
|
||||
m.color = {
|
||||
hue: 0,
|
||||
@@ -912,6 +917,94 @@ const m = {
|
||||
none() {
|
||||
m.isAltSkin = true
|
||||
},
|
||||
mech() {
|
||||
m.isAltSkin = true
|
||||
m.yOffWhen.stand = 52
|
||||
m.yOffWhen.jump = 72
|
||||
// m.yOffWhen.crouch = 22
|
||||
// m.color = {
|
||||
// hue: 184,
|
||||
// sat: 0,
|
||||
// light: 55,
|
||||
// }
|
||||
// m.setFillColors();
|
||||
m.draw = function() {
|
||||
m.walk_cycle += m.flipLegs * m.Vx;
|
||||
ctx.save();
|
||||
ctx.globalAlpha = (m.immuneCycle < m.cycle) ? 1 : 0.5 //|| (m.cycle % 40 > 20)
|
||||
ctx.translate(m.pos.x, m.pos.y);
|
||||
m.calcLeg(Math.PI, -1.25);
|
||||
m.drawLeg("#606060");
|
||||
m.calcLeg(0, 0);
|
||||
m.drawLeg("#444");
|
||||
ctx.rotate(m.angle);
|
||||
ctx.beginPath();
|
||||
ctx.arc(0, 0, 30, 0, 2 * Math.PI);
|
||||
ctx.fillStyle = m.bodyGradient
|
||||
ctx.fill();
|
||||
ctx.arc(15, 0, 4, 0, 2 * Math.PI);
|
||||
ctx.strokeStyle = "#333";
|
||||
ctx.lineWidth = 2;
|
||||
ctx.stroke();
|
||||
ctx.restore();
|
||||
m.yOff = m.yOff * 0.85 + m.yOffGoal * 0.15; //smoothly move leg height towards height goal
|
||||
powerUps.boost.draw()
|
||||
}
|
||||
m.drawLeg = function(stroke) {
|
||||
if (m.angle > -Math.PI / 2 && m.angle < Math.PI / 2) {
|
||||
m.flipLegs = 1;
|
||||
} else {
|
||||
m.flipLegs = -1;
|
||||
}
|
||||
const hip = { x: m.hip.x - 5, y: m.hip.y + 5 }
|
||||
const sub = Vector.sub(m.knee, hip)
|
||||
const off = Vector.mult(Vector.rotate(Vector.normalise(sub), Math.PI / 2), 8)
|
||||
const kneeBraceHigh = Vector.add(hip, off)
|
||||
const kneeBraceLow = Vector.add(kneeBraceHigh, Vector.mult(sub, 0.9))
|
||||
const foot = { x: m.foot.x - 10, y: m.foot.y - 15 }
|
||||
ctx.save();
|
||||
ctx.scale(m.flipLegs, 1); //leg lines
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(hip.x, hip.y);
|
||||
ctx.lineTo(m.knee.x, m.knee.y);
|
||||
ctx.lineTo(foot.x, foot.y);
|
||||
//extra upper leg brace
|
||||
ctx.moveTo(kneeBraceHigh.x, kneeBraceHigh.y);
|
||||
ctx.lineTo(kneeBraceLow.x, kneeBraceLow.y);
|
||||
ctx.lineTo(m.knee.x, m.knee.y);
|
||||
|
||||
ctx.strokeStyle = stroke;
|
||||
ctx.lineWidth = 3;
|
||||
ctx.stroke();
|
||||
//foot
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(foot.x, foot.y);
|
||||
ctx.quadraticCurveTo(m.foot.x - 30, m.foot.y + 12, m.foot.x + 13, m.foot.y + 3);
|
||||
ctx.lineWidth = 1.5;
|
||||
ctx.stroke();
|
||||
|
||||
//hip joint
|
||||
ctx.beginPath();
|
||||
ctx.arc(m.hip.x, m.hip.y - 1, 11, 0, 2 * Math.PI);
|
||||
//knee joint
|
||||
ctx.moveTo(m.knee.x + 3, m.knee.y);
|
||||
ctx.arc(m.knee.x, m.knee.y, 3, 0, 2 * Math.PI);
|
||||
//knee brace
|
||||
// ctx.moveTo(kneeBraceHigh.x + 4, kneeBraceHigh.y);
|
||||
// ctx.arc(kneeBraceHigh.x, kneeBraceHigh.y, 4, 0, 2 * Math.PI);
|
||||
ctx.moveTo(kneeBraceLow.x + 2.5, kneeBraceLow.y);
|
||||
ctx.arc(kneeBraceLow.x, kneeBraceLow.y, 2.5, 0, 2 * Math.PI);
|
||||
//foot joint
|
||||
ctx.moveTo(foot.x + 2.5, foot.y);
|
||||
ctx.arc(foot.x, foot.y, 2.5, 0, 2 * Math.PI);
|
||||
ctx.fillStyle = m.fillColor;
|
||||
ctx.fill();
|
||||
ctx.lineWidth = 1;
|
||||
// ctx.strokeStyle = "#333"
|
||||
ctx.stroke();
|
||||
ctx.restore();
|
||||
}
|
||||
},
|
||||
energy() {
|
||||
m.isAltSkin = true
|
||||
m.color = {
|
||||
@@ -1231,19 +1324,90 @@ const m = {
|
||||
ctx.fill();
|
||||
ctx.strokeStyle = "#333";
|
||||
ctx.lineWidth = 2;
|
||||
ctx.arc(12, 0, 8 + 4 * Math.sin(m.cycle * 0.01), 0, 2 * Math.PI); //big eye
|
||||
ctx.stroke();
|
||||
ctx.beginPath();
|
||||
ctx.arc(12, 0, 8 + 4 * Math.sin(m.cycle * 0.01), 0, 2 * Math.PI); //big eye
|
||||
ctx.fillStyle = `hsl(${150+100*Math.sin(m.cycle * 0.01)},100%,50%)`
|
||||
ctx.fill();
|
||||
ctx.strokeStyle = "#333";
|
||||
ctx.lineWidth = 2;
|
||||
ctx.stroke();
|
||||
ctx.restore();
|
||||
m.yOff = m.yOff * 0.85 + m.yOffGoal * 0.15; //smoothly move leg height towards height goal
|
||||
powerUps.boost.draw()
|
||||
}
|
||||
},
|
||||
dilate2() {
|
||||
m.isAltSkin = true
|
||||
m.draw = function() {
|
||||
ctx.fillStyle = m.fillColor;
|
||||
m.walk_cycle += m.flipLegs * m.Vx;
|
||||
ctx.save();
|
||||
ctx.globalAlpha = (m.immuneCycle < m.cycle) ? 1 : 0.5 //|| (m.cycle % 40 > 20)
|
||||
ctx.translate(m.pos.x, m.pos.y);
|
||||
m.calcLeg(Math.PI, -3);
|
||||
m.drawLeg("#5f5f5f");
|
||||
m.calcLeg(0, 0);
|
||||
m.drawLeg("#444");
|
||||
ctx.rotate(m.angle);
|
||||
ctx.beginPath();
|
||||
ctx.arc(0, 0, 30, 0, 2 * Math.PI);
|
||||
ctx.fillStyle = m.bodyGradient
|
||||
ctx.fill();
|
||||
ctx.strokeStyle = "#444";
|
||||
ctx.lineWidth = 3 + 3 * Math.sin(m.cycle * 0.01 + Math.PI);
|
||||
ctx.arc(12, 0, 6 + 3 * Math.sin(m.cycle * 0.01), 0, 2 * Math.PI); //big eye
|
||||
ctx.stroke();
|
||||
ctx.beginPath();
|
||||
ctx.arc(12, 0, 6 + 3 * Math.sin(m.cycle * 0.01), 0, 2 * Math.PI); //big eye
|
||||
ctx.fillStyle = `hsl(${150+100*Math.sin(m.cycle * 0.01)},100%,50%)`
|
||||
ctx.fill();
|
||||
ctx.stroke();
|
||||
ctx.restore();
|
||||
m.yOff = m.yOff * 0.85 + m.yOffGoal * 0.15; //smoothly move leg height towards height goal
|
||||
powerUps.boost.draw()
|
||||
}
|
||||
m.drawLeg = function(stroke) {
|
||||
// if (simulation.mouseInGame.x > m.pos.x) {
|
||||
if (m.angle > -Math.PI / 2 && m.angle < Math.PI / 2) {
|
||||
m.flipLegs = 1;
|
||||
} else {
|
||||
m.flipLegs = -1;
|
||||
}
|
||||
ctx.save();
|
||||
ctx.scale(m.flipLegs, 1); //leg lines
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(m.hip.x, m.hip.y);
|
||||
ctx.lineTo(m.knee.x, m.knee.y);
|
||||
ctx.lineTo(m.foot.x, m.foot.y);
|
||||
ctx.strokeStyle = stroke;
|
||||
ctx.lineWidth = 7;
|
||||
ctx.stroke();
|
||||
|
||||
//toe lines
|
||||
ctx.beginPath();
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x - 15, m.foot.y + 5);
|
||||
ctx.moveTo(m.foot.x, m.foot.y);
|
||||
ctx.lineTo(m.foot.x + 15, m.foot.y + 5);
|
||||
ctx.lineWidth = 4;
|
||||
ctx.stroke();
|
||||
|
||||
//hip joint
|
||||
ctx.beginPath();
|
||||
ctx.arc(m.hip.x, m.hip.y, 11, 0, 2 * Math.PI);
|
||||
//knee joint
|
||||
ctx.moveTo(m.knee.x + 7, m.knee.y);
|
||||
ctx.arc(m.knee.x, m.knee.y, 7, 0, 2 * Math.PI);
|
||||
//foot joint
|
||||
ctx.moveTo(m.foot.x + 6, m.foot.y);
|
||||
ctx.arc(m.foot.x, m.foot.y, 6, 0, 2 * Math.PI);
|
||||
ctx.fillStyle = m.fillColor;
|
||||
ctx.fill();
|
||||
ctx.lineWidth = 3 + 3 * Math.sin(m.cycle * 0.01 + Math.PI);
|
||||
ctx.stroke();
|
||||
ctx.restore();
|
||||
}
|
||||
},
|
||||
CPT() {
|
||||
m.isAltSkin = true
|
||||
m.color = {
|
||||
|
||||
@@ -379,17 +379,34 @@ const simulation = {
|
||||
}
|
||||
requestAnimationFrame(loop)
|
||||
},
|
||||
// lastLogTimeBig: 0,
|
||||
boldActiveGunHUD() {
|
||||
if (b.inventory.length > 0) {
|
||||
for (let i = 0, len = b.inventory.length; i < len; ++i) document.getElementById(b.inventory[i]).style.opacity = "0.3";
|
||||
// document.getElementById(b.activeGun).style.fontSize = "30px";
|
||||
if (document.getElementById(b.activeGun)) document.getElementById(b.activeGun).style.opacity = "1";
|
||||
for (let i = 0, len = b.inventory.length; i < len; ++i) {
|
||||
if (b.inventory[i] === b.activeGun && document.getElementById(b.activeGun)) {
|
||||
document.getElementById(b.inventory[i]).style.opacity = "1";
|
||||
} else {
|
||||
document.getElementById(b.inventory[i]).style.opacity = "0.3";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// if (b.inventory.length > 0) {
|
||||
// for (let i = 0, len = b.inventory.length; i < len; ++i) document.getElementById(b.inventory[i]).style.opacity = "0.3";
|
||||
// // document.getElementById(b.activeGun).style.fontSize = "30px";
|
||||
// if (document.getElementById(b.activeGun)) document.getElementById(b.activeGun).style.opacity = "1";
|
||||
// }
|
||||
},
|
||||
updateGunHUD() {
|
||||
// for (let i = 0, len = b.inventory.length; i < len; ++i) {
|
||||
// if (flashIndex === i) {
|
||||
// document.getElementById(b.inventory[i]).innerHTML = b.guns[b.inventory[i]].name + " - " + b.guns[b.inventory[i]].ammo;
|
||||
// } else {
|
||||
// document.getElementById(b.inventory[i]).innerHTML = b.guns[b.inventory[i]].name + " - " + b.guns[b.inventory[i]].ammo;
|
||||
// }
|
||||
// }
|
||||
for (let i = 0, len = b.inventory.length; i < len; ++i) {
|
||||
document.getElementById(b.inventory[i]).innerHTML = b.guns[b.inventory[i]].name + " - " + b.guns[b.inventory[i]].ammo;
|
||||
// document.getElementById(b.inventory[i]).innerHTML = b.guns[b.inventory[i]].name + " - " + b.guns[b.inventory[i]].ammo;
|
||||
document.getElementById(b.inventory[i]).innerHTML = `${b.guns[b.inventory[i]].name} - ${b.guns[b.inventory[i]].ammo}`
|
||||
}
|
||||
},
|
||||
makeGunHUD() {
|
||||
@@ -402,8 +419,8 @@ const simulation = {
|
||||
for (let i = 0, len = b.inventory.length; i < len; ++i) {
|
||||
const node = document.createElement("div");
|
||||
node.setAttribute("id", b.inventory[i]);
|
||||
let textnode = document.createTextNode(b.guns[b.inventory[i]].name + " - " + b.guns[b.inventory[i]].ammo);
|
||||
node.appendChild(textnode);
|
||||
const textNode = document.createTextNode(`${b.guns[b.inventory[i]].name} - ${b.guns[b.inventory[i]].ammo}`); //b.guns[b.inventory[i]].name + " - " + b.guns[b.inventory[i]].ammo);
|
||||
node.appendChild(textNode);
|
||||
document.getElementById("guns").appendChild(node);
|
||||
}
|
||||
simulation.boldActiveGunHUD();
|
||||
@@ -439,7 +456,7 @@ const simulation = {
|
||||
simulation.lastLogTime = m.cycle + time;
|
||||
} else {
|
||||
document.getElementById("text-log").innerHTML = text;
|
||||
document.getElementById("text-log").style.opacity = 1;
|
||||
document.getElementById("text-log").style.display = "inline";
|
||||
simulation.lastLogTime = m.cycle + time;
|
||||
}
|
||||
}
|
||||
@@ -448,7 +465,7 @@ const simulation = {
|
||||
if (simulation.lastLogTime && simulation.lastLogTime < m.cycle) {
|
||||
simulation.lastLogTime = 0;
|
||||
// document.getElementById("text-log").innerHTML = " ";
|
||||
document.getElementById("text-log").style.opacity = 0;
|
||||
document.getElementById("text-log").style.display = "none";
|
||||
}
|
||||
},
|
||||
nextGun() {
|
||||
@@ -790,7 +807,7 @@ const simulation = {
|
||||
simulation.difficultyMode = Number(document.getElementById("difficulty-select").value)
|
||||
|
||||
simulation.clearNow = true;
|
||||
document.getElementById("text-log").style.opacity = 0;
|
||||
document.getElementById("text-log").style.display = "none"
|
||||
document.getElementById("fade-out").style.opacity = 0;
|
||||
document.title = "n-gon";
|
||||
// simulation.makeTextLog(`input.key.up<span class='color-symbol'>:</span> ["<span class='color-text'>${input.key.up}</span>", "<span class='color-text'>ArrowUp</span>"]`);
|
||||
|
||||
@@ -976,7 +976,7 @@ const spawn = {
|
||||
// m.displayHealth();
|
||||
document.getElementById("health").style.display = "none"
|
||||
document.getElementById("health-bg").style.display = "none"
|
||||
document.getElementById("text-log").style.opacity = 0; //fade out any active text logs
|
||||
document.getElementById("text-log").style.display = "none"
|
||||
document.getElementById("fade-out").style.opacity = 1; //slowly fades out
|
||||
// build.shareURL(false)
|
||||
setTimeout(function() {
|
||||
@@ -2688,13 +2688,13 @@ const spawn = {
|
||||
mobs.spawn(x, y, 6, radius, "transparent");
|
||||
let me = mob[mob.length - 1];
|
||||
me.stroke = "transparent"; //used for drawSneaker
|
||||
me.eventHorizon = radius * 27; //required for blackhole
|
||||
me.eventHorizon = radius * 30; //required for blackhole
|
||||
me.seeAtDistance2 = (me.eventHorizon + 400) * (me.eventHorizon + 400); //vision limit is event horizon
|
||||
me.accelMag = 0.00012 * simulation.accelScale;
|
||||
me.frictionAir = 0.025;
|
||||
me.collisionFilter.mask = cat.player | cat.bullet //| cat.body
|
||||
me.memory = Infinity;
|
||||
Matter.Body.setDensity(me, 0.01); //extra dense //normal is 0.001 //makes effective life much larger
|
||||
Matter.Body.setDensity(me, 0.015); //extra dense //normal is 0.001 //makes effective life much larger
|
||||
me.do = function() {
|
||||
//keep it slow, to stop issues from explosion knock backs
|
||||
if (this.speed > 5) {
|
||||
@@ -2825,7 +2825,7 @@ const spawn = {
|
||||
me.collisionFilter.mask = cat.player | cat.bullet //| cat.body
|
||||
// me.frictionAir = 0.005;
|
||||
me.memory = 1600;
|
||||
Matter.Body.setDensity(me, 0.04); //extra dense //normal is 0.001 //makes effective life much larger
|
||||
Matter.Body.setDensity(me, 0.06); //extra dense //normal is 0.001 //makes effective life much larger
|
||||
me.onDeath = function() {
|
||||
//applying forces to player doesn't seem to work inside this method, not sure why
|
||||
powerUps.spawnBossPowerUp(this.position.x, this.position.y)
|
||||
|
||||
451
js/tech.js
451
js/tech.js
@@ -299,6 +299,234 @@ const tech = {
|
||||
}
|
||||
},
|
||||
tech: [{
|
||||
name: "tungsten carbide",
|
||||
description: "<strong>+200</strong> maximum <strong class='color-h'>health</strong><br><strong>lose</strong> <strong class='color-h'>health</strong> after hard <strong>landings</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
isSkin: true,
|
||||
allowed() {
|
||||
return !m.isAltSkin
|
||||
},
|
||||
requires: "not skin",
|
||||
effect() {
|
||||
tech.hardLanding = 40
|
||||
tech.isFallingDamage = true;
|
||||
m.setMaxHealth();
|
||||
m.addHealth(1 / simulation.healScale)
|
||||
m.skin.tungsten()
|
||||
},
|
||||
remove() {
|
||||
tech.hardLanding = 130
|
||||
tech.isFallingDamage = false;
|
||||
m.setMaxHealth();
|
||||
m.resetSkin();
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "elasticity",
|
||||
description: "<strong>+33%</strong> <strong>movement</strong> and <strong>jumping</strong><br><strong>+15%</strong> <strong class='color-defense'>defense</strong>",
|
||||
maxCount: 3,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
allowed() {
|
||||
return !m.isAltSkin
|
||||
},
|
||||
requires: "not skinned",
|
||||
effect() {
|
||||
m.skin.mech();
|
||||
tech.hardLanding = 80
|
||||
tech.squirrelFx += 0.4;
|
||||
tech.squirrelJump += 0.16;
|
||||
m.setMovement()
|
||||
},
|
||||
remove() {
|
||||
tech.hardLanding = 130
|
||||
tech.squirrelFx = 1;
|
||||
tech.squirrelJump = 1;
|
||||
m.setMovement()
|
||||
m.resetSkin();
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "aperture",
|
||||
description: "your <strong class='color-d'>damage</strong> cycles every <strong>6</strong> seconds<br>between <strong>-75%</strong> and <strong>+125%</strong> <strong class='color-d'>damage</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
isSkin: true,
|
||||
allowed() {
|
||||
return !m.isAltSkin
|
||||
},
|
||||
requires: "not skinned",
|
||||
effect() {
|
||||
tech.isDilate = true
|
||||
m.skin.dilate()
|
||||
},
|
||||
remove() {
|
||||
tech.isDilate = false
|
||||
m.resetSkin();
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "diaphragm",
|
||||
description: "your <strong class='color-defense'>defense</strong> cycles every <strong>6</strong> seconds<br>between <strong>+100%</strong> and <strong>-33%</strong> <strong class='color-defense'>defense</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
isSkin: true,
|
||||
allowed() {
|
||||
return tech.isDilate
|
||||
},
|
||||
requires: "aperture",
|
||||
effect() {
|
||||
tech.isDiaphragm = true
|
||||
m.resetSkin();
|
||||
m.skin.dilate2()
|
||||
},
|
||||
remove() {
|
||||
tech.isDiaphragm = false
|
||||
m.resetSkin();
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "mass-energy equivalence",
|
||||
// description: "<strong class='color-f'>energy</strong> protects you instead of <strong class='color-h'>health</strong><br>√ of <strong class='color-defense'>defense</strong> <strong>reduction</strong> reduces max <strong class='color-f'>energy</strong>",
|
||||
description: "<strong class='color-f'>energy</strong> protects you instead of <strong class='color-h'>health</strong><br>exponentially <strong>reduced</strong> <strong class='color-defense'>defense</strong> <em>(~ x^0.12)</em>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
isSkin: true,
|
||||
allowed() {
|
||||
return !m.isAltSkin && !tech.isPiezo && !tech.isRewindAvoidDeath && !tech.isAnnihilation //&& !tech.isAmmoFromHealth && !tech.isRewindGun
|
||||
},
|
||||
requires: "not piezoelectricity, CPT, annihilation",
|
||||
effect() {
|
||||
m.health = 0
|
||||
document.getElementById("health").style.display = "none"
|
||||
document.getElementById("health-bg").style.display = "none"
|
||||
document.getElementById("dmg").style.backgroundColor = "#0cf";
|
||||
tech.isEnergyHealth = true;
|
||||
simulation.mobDmgColor = "rgba(0, 255, 255,0.6)" //"#0cf"
|
||||
m.displayHealth();
|
||||
m.skin.energy();
|
||||
},
|
||||
remove() {
|
||||
if (tech.isEnergyHealth) {
|
||||
tech.isEnergyHealth = false;
|
||||
document.getElementById("health").style.display = "inline"
|
||||
document.getElementById("health-bg").style.display = "inline"
|
||||
document.getElementById("dmg").style.backgroundColor = "#f67";
|
||||
m.health = Math.max(Math.min(m.maxHealth, m.energy), 0.1);
|
||||
simulation.mobDmgColor = "rgba(255,0,0,0.7)"
|
||||
m.displayHealth();
|
||||
}
|
||||
tech.isEnergyHealth = false;
|
||||
m.resetSkin();
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "1st ionization energy",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Ionization_energy' class="link">1st ionization energy</a>`,
|
||||
// description: `after you collect ${powerUps.orb.heal()}<br><strong>+${0.1 * tech.largerHeals}</strong> maximum <strong class='color-f'>energy</strong>`,
|
||||
// descriptionFunction: `convert current and future ${powerUps.orb.heal()} into <div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div><br><div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div> give <strong>+${10 * tech.largerHeals}</strong> maximum <strong class='color-f'>energy</strong>`,
|
||||
descriptionFunction() {
|
||||
return `convert current and future <div class="heal-circle"></div> into <div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div><br><div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div> give <strong>+${8 * tech.largerHeals * (tech.isHalfHeals ? 0.5 : 1)}</strong> maximum <strong class='color-f'>energy</strong>`
|
||||
},
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
allowed() {
|
||||
return tech.isEnergyHealth
|
||||
},
|
||||
requires: "mass-energy equivalence",
|
||||
effect() {
|
||||
powerUps.healGiveMaxEnergy = true; //tech.healMaxEnergyBonus given from heal power up
|
||||
powerUps.heal.color = "#ff0" //"#0ae"
|
||||
for (let i = 0; i < powerUp.length; i++) { //find active heal power ups and adjust color live
|
||||
if (powerUp[i].name === "heal") powerUp[i].color = powerUps.heal.color
|
||||
}
|
||||
},
|
||||
remove() {
|
||||
powerUps.healGiveMaxEnergy = false;
|
||||
// tech.healMaxEnergyBonus = 0
|
||||
powerUps.heal.color = "#0eb"
|
||||
for (let i = 0; i < powerUp.length; i++) { //find active heal power ups and adjust color live
|
||||
if (powerUp[i].name === "heal") powerUp[i].color = powerUps.heal.color
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "CPT symmetry",
|
||||
// description: "<strong>charge</strong>, <strong>parity</strong>, and <strong>time</strong> invert to undo <strong class='color-defense'>defense</strong><br><strong class='color-rewind'>rewind</strong> <strong>(1.5—5)</strong> seconds for <strong>(66—220)</strong> <strong class='color-f'>energy</strong>",
|
||||
// description: "after losing <strong class='color-h'>health</strong>, if you have <strong>full</strong> <strong class='color-f'>energy</strong><br><strong>rewind</strong> time for <strong>44</strong> <strong class='color-f'>energy</strong> per second",
|
||||
descriptionFunction() {
|
||||
return `after losing <strong class='color-h'>health</strong>, if you have <strong>${(100*Math.min(100,m.maxEnergy)).toFixed(0)}</strong> <strong class='color-f'>energy</strong><br><strong>rewind</strong> time for <strong>40</strong> <strong class='color-f'>energy</strong> per second`
|
||||
},
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
isSkin: true,
|
||||
allowed() {
|
||||
return !m.isAltSkin && m.fieldUpgrades[m.fieldMode].name !== "standing wave" && !tech.isRewindField && !tech.isEnergyHealth
|
||||
},
|
||||
requires: "not skinned, standing wave, max energy reduction, retrocausality, mass-energy",
|
||||
effect() {
|
||||
tech.isRewindAvoidDeath = true;
|
||||
m.skin.CPT()
|
||||
},
|
||||
remove() {
|
||||
tech.isRewindAvoidDeath = false;
|
||||
m.resetSkin();
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "causality bots",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Causality' class="link">causality bots</a>`,
|
||||
description: "when you <strong class='color-rewind'>rewind</strong> build scrap <strong class='color-bot'>bots</strong><br>that protect you for about <strong>9</strong> seconds",
|
||||
maxCount: 3,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
isBotTech: true,
|
||||
allowed() {
|
||||
return tech.isRewindAvoidDeath || tech.isRewindField
|
||||
},
|
||||
requires: "CPT, retrocausality",
|
||||
effect() {
|
||||
tech.isRewindBot++;
|
||||
},
|
||||
remove() {
|
||||
tech.isRewindBot = 0;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "causality bombs",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Causality' class="link">causality bombs</a>`,
|
||||
description: "when you <strong class='color-rewind'>rewind</strong> drop several <strong>grenades</strong><br>become <strong>invulnerable</strong> until they <strong class='color-e'>explode</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
allowed() {
|
||||
return tech.isRewindAvoidDeath || tech.isRewindField
|
||||
},
|
||||
requires: "CPT, retrocausality",
|
||||
effect() {
|
||||
tech.isRewindGrenade = true;
|
||||
},
|
||||
remove() {
|
||||
tech.isRewindGrenade = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "ordnance",
|
||||
description: "<strong>double</strong> the <strong class='flicker'>frequency</strong> of finding <strong class='color-g'>gun</strong><strong class='color-m'>tech</strong><br>spawn a <strong class='color-g'>gun</strong> and <strong>+7%</strong> <strong class='color-junk'>JUNK</strong> to <strong class='color-m'>tech</strong> pool",
|
||||
maxCount: 1,
|
||||
@@ -726,28 +954,7 @@ const tech = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "squirrel-cage rotor",
|
||||
description: "<strong>+30%</strong> <strong>movement</strong> and <strong>jumping</strong><br><strong>–5%</strong> <strong class='color-defense'>defense</strong>",
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
allowed() {
|
||||
return this.count > 0
|
||||
},
|
||||
requires: "",
|
||||
effect() {
|
||||
tech.squirrelFx += 0.25;
|
||||
tech.squirrelJump += 0.1;
|
||||
m.setMovement()
|
||||
},
|
||||
remove() {
|
||||
tech.squirrelFx = 1;
|
||||
tech.squirrelJump = 1;
|
||||
m.setMovement()
|
||||
}
|
||||
},
|
||||
|
||||
// {
|
||||
// name: "coyote",
|
||||
// description: "",
|
||||
@@ -1913,9 +2120,9 @@ const tech = {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!m.isShipMode) {
|
||||
m.skin.flipFlop()
|
||||
}
|
||||
// if (!m.isShipMode) {
|
||||
// m.skin.flipFlop()
|
||||
// }
|
||||
},
|
||||
remove() {
|
||||
tech.isFlipFlop = false
|
||||
@@ -1929,7 +2136,7 @@ const tech = {
|
||||
}
|
||||
}
|
||||
m.eyeFillColor = 'transparent'
|
||||
m.resetSkin();
|
||||
// m.resetSkin();
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -2067,9 +2274,9 @@ const tech = {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!m.isShipMode) {
|
||||
m.skin.flipFlop()
|
||||
}
|
||||
// if (!m.isShipMode) {
|
||||
// m.skin.flipFlop()
|
||||
// }
|
||||
},
|
||||
remove() {
|
||||
tech.isRelay = false
|
||||
@@ -2083,7 +2290,7 @@ const tech = {
|
||||
}
|
||||
}
|
||||
m.eyeFillColor = 'transparent'
|
||||
m.resetSkin();
|
||||
// m.resetSkin();
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -2294,70 +2501,7 @@ const tech = {
|
||||
tech.isSlowFPS = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "CPT symmetry",
|
||||
// description: "<strong>charge</strong>, <strong>parity</strong>, and <strong>time</strong> invert to undo <strong class='color-defense'>defense</strong><br><strong class='color-rewind'>rewind</strong> <strong>(1.5—5)</strong> seconds for <strong>(66—220)</strong> <strong class='color-f'>energy</strong>",
|
||||
// description: "after losing <strong class='color-h'>health</strong>, if you have <strong>full</strong> <strong class='color-f'>energy</strong><br><strong>rewind</strong> time for <strong>44</strong> <strong class='color-f'>energy</strong> per second",
|
||||
descriptionFunction() {
|
||||
return `after losing <strong class='color-h'>health</strong>, if you have <strong>${(100*Math.min(100,m.maxEnergy)).toFixed(0)}</strong> <strong class='color-f'>energy</strong><br><strong>rewind</strong> time for <strong>40</strong> <strong class='color-f'>energy</strong> per second`
|
||||
},
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
isSkin: true,
|
||||
allowed() {
|
||||
return !m.isAltSkin && m.fieldUpgrades[m.fieldMode].name !== "standing wave" && !tech.isRewindField && !tech.isEnergyHealth
|
||||
},
|
||||
requires: "not skinned, standing wave, max energy reduction, retrocausality, mass-energy",
|
||||
effect() {
|
||||
tech.isRewindAvoidDeath = true;
|
||||
m.skin.CPT()
|
||||
},
|
||||
remove() {
|
||||
tech.isRewindAvoidDeath = false;
|
||||
m.resetSkin();
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "causality bots",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Causality' class="link">causality bots</a>`,
|
||||
description: "when you <strong class='color-rewind'>rewind</strong> build scrap <strong class='color-bot'>bots</strong><br>that protect you for about <strong>9</strong> seconds",
|
||||
maxCount: 3,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
isBotTech: true,
|
||||
allowed() {
|
||||
return tech.isRewindAvoidDeath || tech.isRewindField
|
||||
},
|
||||
requires: "CPT, retrocausality",
|
||||
effect() {
|
||||
tech.isRewindBot++;
|
||||
},
|
||||
remove() {
|
||||
tech.isRewindBot = 0;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "causality bombs",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Causality' class="link">causality bombs</a>`,
|
||||
description: "when you <strong class='color-rewind'>rewind</strong> drop several <strong>grenades</strong><br>become <strong>invulnerable</strong> until they <strong class='color-e'>explode</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
allowed() {
|
||||
return tech.isRewindAvoidDeath || tech.isRewindField
|
||||
},
|
||||
requires: "CPT, retrocausality",
|
||||
effect() {
|
||||
tech.isRewindGrenade = true;
|
||||
},
|
||||
remove() {
|
||||
tech.isRewindGrenade = false;
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: "piezoelectricity",
|
||||
description: "if you <strong>collide</strong> with a mob<br>generate <strong>+2048</strong> <strong class='color-f'>energy</strong>", //<br>reduce <strong class='color-defense'>defense</strong> by <strong>15%</strong>
|
||||
@@ -2377,75 +2521,6 @@ const tech = {
|
||||
tech.isPiezo = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "mass-energy equivalence",
|
||||
// description: "<strong class='color-f'>energy</strong> protects you instead of <strong class='color-h'>health</strong><br>√ of <strong class='color-defense'>defense</strong> <strong>reduction</strong> reduces max <strong class='color-f'>energy</strong>",
|
||||
description: "<strong class='color-f'>energy</strong> protects you instead of <strong class='color-h'>health</strong><br>exponentially <strong>reduced</strong> <strong class='color-defense'>defense</strong> <em>(~ x^0.12)</em>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
isSkin: true,
|
||||
allowed() {
|
||||
return !m.isAltSkin && !tech.isPiezo && !tech.isRewindAvoidDeath && !tech.isAnnihilation //&& !tech.isAmmoFromHealth && !tech.isRewindGun
|
||||
},
|
||||
requires: "not piezoelectricity, CPT, annihilation",
|
||||
effect() {
|
||||
m.health = 0
|
||||
document.getElementById("health").style.display = "none"
|
||||
document.getElementById("health-bg").style.display = "none"
|
||||
document.getElementById("dmg").style.backgroundColor = "#0cf";
|
||||
tech.isEnergyHealth = true;
|
||||
simulation.mobDmgColor = "rgba(0, 255, 255,0.6)" //"#0cf"
|
||||
m.displayHealth();
|
||||
m.skin.energy();
|
||||
},
|
||||
remove() {
|
||||
if (tech.isEnergyHealth) {
|
||||
tech.isEnergyHealth = false;
|
||||
document.getElementById("health").style.display = "inline"
|
||||
document.getElementById("health-bg").style.display = "inline"
|
||||
document.getElementById("dmg").style.backgroundColor = "#f67";
|
||||
m.health = Math.max(Math.min(m.maxHealth, m.energy), 0.1);
|
||||
simulation.mobDmgColor = "rgba(255,0,0,0.7)"
|
||||
m.displayHealth();
|
||||
}
|
||||
tech.isEnergyHealth = false;
|
||||
m.resetSkin();
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "1st ionization energy",
|
||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Ionization_energy' class="link">1st ionization energy</a>`,
|
||||
// description: `after you collect ${powerUps.orb.heal()}<br><strong>+${0.1 * tech.largerHeals}</strong> maximum <strong class='color-f'>energy</strong>`,
|
||||
// descriptionFunction: `convert current and future ${powerUps.orb.heal()} into <div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div><br><div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div> give <strong>+${10 * tech.largerHeals}</strong> maximum <strong class='color-f'>energy</strong>`,
|
||||
descriptionFunction() {
|
||||
return `convert current and future <div class="heal-circle"></div> into <div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div><br><div class="heal-circle" style = "background-color: #ff0; border: 0.5px #000 solid;"></div> give <strong>+${8 * tech.largerHeals * (tech.isHalfHeals ? 0.5 : 1)}</strong> maximum <strong class='color-f'>energy</strong>`
|
||||
},
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 2,
|
||||
frequencyDefault: 2,
|
||||
allowed() {
|
||||
return tech.isEnergyHealth
|
||||
},
|
||||
requires: "mass-energy equivalence",
|
||||
effect() {
|
||||
powerUps.healGiveMaxEnergy = true; //tech.healMaxEnergyBonus given from heal power up
|
||||
powerUps.heal.color = "#ff0" //"#0ae"
|
||||
for (let i = 0; i < powerUp.length; i++) { //find active heal power ups and adjust color live
|
||||
if (powerUp[i].name === "heal") powerUp[i].color = powerUps.heal.color
|
||||
}
|
||||
},
|
||||
remove() {
|
||||
powerUps.healGiveMaxEnergy = false;
|
||||
// tech.healMaxEnergyBonus = 0
|
||||
powerUps.heal.color = "#0eb"
|
||||
for (let i = 0; i < powerUp.length; i++) { //find active heal power ups and adjust color live
|
||||
if (powerUp[i].name === "heal") powerUp[i].color = powerUps.heal.color
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "electronegativity",
|
||||
descriptionFunction() {
|
||||
@@ -2860,30 +2935,7 @@ const tech = {
|
||||
tech.isAcidDmg = false;
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "tungsten carbide",
|
||||
description: "<strong>+150</strong> maximum <strong class='color-h'>health</strong><br><strong>lose</strong> <strong class='color-h'>health</strong> after hard <strong>landings</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
isSkin: true,
|
||||
allowed() {
|
||||
return !m.isAltSkin
|
||||
},
|
||||
requires: "not skin",
|
||||
effect() {
|
||||
tech.isFallingDamage = true;
|
||||
m.setMaxHealth();
|
||||
m.addHealth(1 / simulation.healScale)
|
||||
m.skin.tungsten()
|
||||
},
|
||||
remove() {
|
||||
tech.isFallingDamage = false;
|
||||
m.setMaxHealth();
|
||||
m.resetSkin();
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
name: "adiabatic healing",
|
||||
descriptionFunction() {
|
||||
@@ -3510,27 +3562,6 @@ const tech = {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "aperture",
|
||||
description: "your damage cycles every <strong>6</strong> seconds<br>between <strong>-75%</strong> and <strong>+125%</strong> <strong class='color-d'>damage</strong>",
|
||||
maxCount: 1,
|
||||
count: 0,
|
||||
frequency: 1,
|
||||
frequencyDefault: 1,
|
||||
isSkin: true,
|
||||
allowed() {
|
||||
return !m.isAltSkin
|
||||
},
|
||||
requires: "not skinned",
|
||||
effect() {
|
||||
tech.isDilate = true
|
||||
m.skin.dilate()
|
||||
},
|
||||
remove() {
|
||||
tech.isDilate = false
|
||||
m.resetSkin();
|
||||
}
|
||||
},
|
||||
{
|
||||
name: "exciton",
|
||||
descriptionFunction() {
|
||||
@@ -4781,7 +4812,7 @@ const tech = {
|
||||
},
|
||||
{
|
||||
name: "Zectron",
|
||||
description: `<strong>+80%</strong> <strong>super ball</strong> density and <strong class='color-d'>damage</strong>, but<br>after colliding with <strong>super balls</strong> <strong>lose</strong> <strong class='color-h'>health</strong>`,
|
||||
description: `<strong>+100%</strong> <strong>super ball</strong> density and <strong class='color-d'>damage</strong>, but<br>after colliding with <strong>super balls</strong> <strong>lose</strong> <strong class='color-h'>health</strong>`,
|
||||
isGunTech: true,
|
||||
maxCount: 9,
|
||||
count: 0,
|
||||
@@ -11292,4 +11323,6 @@ const tech = {
|
||||
sentryAmmo: null,
|
||||
collidePowerUps: null,
|
||||
isDilate: null,
|
||||
isDiaphragm: null,
|
||||
hardLanding: null,
|
||||
}
|
||||
Reference in New Issue
Block a user