bug fix patch

enthalpy: 3->2% heal from damage done
technical debt: 8->15% less damage for each tech
This commit is contained in:
landgreen
2022-03-24 05:58:58 -07:00
parent 6b2b59a115
commit bae43b334c
6 changed files with 10 additions and 22 deletions

View File

@@ -25,8 +25,8 @@ const level = {
// powerUps.research.changeRerolls(100000)
// for (let i = 0; i < 2; i++) tech.giveTech("undefined")
// tech.tech[297].frequency = 100
// m.setField("plasma torch")
// tech.giveTech("plasma ball")
m.setField("plasma torch")
tech.giveTech("plasma ball")
// m.immuneCycle = Infinity //you can't take damage
// level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why

View File

@@ -1077,7 +1077,7 @@ const mobs = {
this.health -= dmg
//this.fill = this.color + this.health + ')';
this.onDamage(dmg); //custom damage effects
if (this.health < 0.05 && this.alive) {
if ((this.health < 0.05 || isNaN(this.health)) && this.alive) {
this.death();
}
}

View File

@@ -2171,7 +2171,7 @@ const m = {
this.alpha = 0.5 + 0.1 * Math.random()
gradient.addColorStop(0, `rgba(255,255,255,${this.alpha})`);
gradient.addColorStop(0.18 + 0.1 * Math.random(), `rgba(255,150,255,${this.alpha})`);
gradient.addColorStop(0.95, `rgba(255,0,255,${this.alpha})`);
gradient.addColorStop(1, `rgba(255,0,255,${this.alpha})`);
// gradient.addColorStop(1, `rgba(255,150,255,${this.alpha})`);
ctx.fillStyle = gradient
ctx.beginPath();
@@ -2228,8 +2228,6 @@ const m = {
m.plasmaBall.setPositionToNose()
}
} else if (m.energy > m.plasmaBall.drain) { //charge up when attached
if (tech.isCapacitor) {
m.energy -= m.plasmaBall.drain * 4;
const scale = 1 + 5 * 16 * Math.pow(Math.max(1, m.plasmaBall.circleRadius), -1.8)
@@ -2241,7 +2239,6 @@ const m = {
Matter.Body.scale(m.plasmaBall, scale, scale); //grow
}
m.plasmaBall.setPositionToNose()
//add friction for player when holding ball, maybe more friction in vertical
} else {
@@ -2264,7 +2261,6 @@ const m = {
m.drawFieldMeter("rgba(0, 0, 0, 0.2)")
m.plasmaBall.do()
console.log(m.plasmaBall.isAttached)
}

View File

@@ -212,7 +212,7 @@ const tech = {
},
damageFromTech() {
let dmg = 1 //m.fieldDamage
if (tech.isTechDebt) dmg *= 4 - 0.08 * tech.totalCount
if (tech.isTechDebt) dmg *= 4 - 0.15 * tech.totalCount
if (tech.isAxion && tech.isHarmMACHO) dmg *= 1 + 0.75 * (1 - m.harmReduction())
if (tech.OccamDamage) dmg *= tech.OccamDamage
if (tech.isCloakingDamage) dmg *= 1.35
@@ -2510,7 +2510,7 @@ const tech = {
},
{
name: "enthalpy",
description: "<strong class='color-h'>heal</strong> for <strong>3%</strong> of <strong class='color-d'>damage</strong> done<br>take <strong>10%</strong> more <strong class='color-harm'>harm</strong>",
description: "<strong class='color-h'>heal</strong> for <strong>2%</strong> of <strong class='color-d'>damage</strong> done<br>take <strong>10%</strong> more <strong class='color-harm'>harm</strong>",
maxCount: 9,
count: 0,
frequency: 1,
@@ -2521,7 +2521,7 @@ const tech = {
},
requires: "not mass-energy equivalence",
effect() {
tech.healthDrain += 0.03;
tech.healthDrain += 0.02;
},
remove() {
tech.healthDrain = 0;
@@ -3089,7 +3089,7 @@ const tech = {
// description: `increase <strong class='color-d'>damage</strong> by <strong>300%</strong> minus <strong>10%</strong> for <strong class='color-m'>tech</strong> you have learned(${4 - 0.1 * tech.totalCount})`,
// description: `increase <strong class='color-d'>damage</strong> by <strong>300%</strong>, but reduce <strong class='color-d'>damage</strong><br>by <strong>10%</strong> for <strong class='color-m'>tech</strong> you have learned`,
descriptionFunction() {
return `increase <strong class='color-d'>damage</strong> by <strong>300%</strong> minus <strong>8%</strong><br>for <strong class='color-m'>tech</strong> you have learned <em>(${Math.floor(100*(4 - 0.08 * tech.totalCount))-100}%)</em>`
return `increase <strong class='color-d'>damage</strong> by <strong>300%</strong> minus <strong>15%</strong><br>for each <strong class='color-m'>tech</strong> you have learned <em>(${Math.floor(100*(4 - 0.14 * tech.totalCount))-100}%)</em>`
},
maxCount: 1,
count: 0,