tech debt negative fix
plasma ball moves faster grows/drains extra fast when you have excess energy bug: technical debt no longer produces negative damage at high tech levels maybe this was causing the NaN position bug?
This commit is contained in:
@@ -25,8 +25,8 @@ const level = {
|
|||||||
// powerUps.research.changeRerolls(100000)
|
// powerUps.research.changeRerolls(100000)
|
||||||
// for (let i = 0; i < 2; i++) tech.giveTech("undefined")
|
// for (let i = 0; i < 2; i++) tech.giveTech("undefined")
|
||||||
// tech.tech[297].frequency = 100
|
// tech.tech[297].frequency = 100
|
||||||
m.setField("plasma torch")
|
// m.setField("plasma torch")
|
||||||
tech.giveTech("plasma ball")
|
// tech.giveTech("plasma ball")
|
||||||
|
|
||||||
// m.immuneCycle = Infinity //you can't take damage
|
// m.immuneCycle = Infinity //you can't take damage
|
||||||
// level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why
|
// level.difficultyIncrease(30) //30 is near max on hard //60 is near max on why
|
||||||
|
|||||||
34
js/player.js
34
js/player.js
@@ -2115,14 +2115,14 @@ const m = {
|
|||||||
},
|
},
|
||||||
fire() {
|
fire() {
|
||||||
this.isAttached = false;
|
this.isAttached = false;
|
||||||
const speed = 4 //scale with mass?
|
const speed = 6 //scale with mass?
|
||||||
// Matter.Body.setVelocity(this, {
|
// Matter.Body.setVelocity(this, {
|
||||||
// x: speed * Math.cos(m.angle),
|
// x: speed * Math.cos(m.angle),
|
||||||
// y: speed * Math.sin(m.angle)
|
// y: speed * Math.sin(m.angle)
|
||||||
// });
|
// });
|
||||||
Matter.Body.setVelocity(this, {
|
Matter.Body.setVelocity(this, {
|
||||||
x: player.velocity.x * 0.5 + speed * Math.cos(m.angle),
|
x: player.velocity.x * 0.5 + speed * Math.cos(m.angle),
|
||||||
y: player.velocity.y * 0.2 + speed * Math.sin(m.angle)
|
y: player.velocity.y * 0.1 + speed * Math.sin(m.angle)
|
||||||
});
|
});
|
||||||
m.plasmaBall.setPositionToNose()
|
m.plasmaBall.setPositionToNose()
|
||||||
},
|
},
|
||||||
@@ -2134,13 +2134,17 @@ const m = {
|
|||||||
if (this.isOn) {
|
if (this.isOn) {
|
||||||
//collisions with map
|
//collisions with map
|
||||||
if (Matter.Query.collides(this, map).length > 0) {
|
if (Matter.Query.collides(this, map).length > 0) {
|
||||||
this.scale(Math.max(0.9, 0.98 - 0.05 / m.plasmaBall.circleRadius))
|
if (this.isAttached) {
|
||||||
if (this.speed > 2.5) {
|
this.scale(Math.max(0.9, 1 - 0.05 / m.plasmaBall.circleRadius))
|
||||||
const scale = 0.96
|
} else {
|
||||||
Matter.Body.setVelocity(this, {
|
this.scale(Math.max(0.9, 0.98 - 0.05 / m.plasmaBall.circleRadius))
|
||||||
x: scale * this.velocity.x,
|
if (this.speed > 2.5) {
|
||||||
y: scale * this.velocity.y
|
const scale = 0.96
|
||||||
});
|
Matter.Body.setVelocity(this, {
|
||||||
|
x: scale * this.velocity.x,
|
||||||
|
y: scale * this.velocity.y
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//collisions with mobs
|
//collisions with mobs
|
||||||
@@ -2157,7 +2161,7 @@ const m = {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
//slowly slow down if too fast
|
//slowly slow down if too fast
|
||||||
if (this.speed > 6) {
|
if (this.speed > 8) {
|
||||||
const scale = 0.997
|
const scale = 0.997
|
||||||
Matter.Body.setVelocity(this, {
|
Matter.Body.setVelocity(this, {
|
||||||
x: scale * this.velocity.x,
|
x: scale * this.velocity.x,
|
||||||
@@ -2229,15 +2233,19 @@ const m = {
|
|||||||
}
|
}
|
||||||
} else if (m.energy > m.plasmaBall.drain) { //charge up when attached
|
} else if (m.energy > m.plasmaBall.drain) { //charge up when attached
|
||||||
if (tech.isCapacitor) {
|
if (tech.isCapacitor) {
|
||||||
m.energy -= m.plasmaBall.drain * 4;
|
m.energy -= m.plasmaBall.drain * 2;
|
||||||
const scale = 1 + 5 * 16 * Math.pow(Math.max(1, m.plasmaBall.circleRadius), -1.8)
|
const scale = 1 + 3 * 16 * Math.pow(Math.max(1, m.plasmaBall.circleRadius), -1.8)
|
||||||
Matter.Body.scale(m.plasmaBall, scale, scale); //grow
|
Matter.Body.scale(m.plasmaBall, scale, scale); //grow
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
m.energy -= m.plasmaBall.drain;
|
m.energy -= m.plasmaBall.drain;
|
||||||
const scale = 1 + 16 * Math.pow(Math.max(1, m.plasmaBall.circleRadius), -1.8)
|
const scale = 1 + 16 * Math.pow(Math.max(1, m.plasmaBall.circleRadius), -1.8)
|
||||||
Matter.Body.scale(m.plasmaBall, scale, scale); //grow
|
Matter.Body.scale(m.plasmaBall, scale, scale); //grow
|
||||||
}
|
}
|
||||||
|
if (m.energy > m.maxEnergy) {
|
||||||
|
m.energy -= m.plasmaBall.drain;
|
||||||
|
const scale = 1 + 16 * Math.pow(Math.max(1, m.plasmaBall.circleRadius), -1.8)
|
||||||
|
Matter.Body.scale(m.plasmaBall, scale, scale); //grow
|
||||||
|
}
|
||||||
m.plasmaBall.setPositionToNose()
|
m.plasmaBall.setPositionToNose()
|
||||||
//add friction for player when holding ball, maybe more friction in vertical
|
//add friction for player when holding ball, maybe more friction in vertical
|
||||||
|
|
||||||
|
|||||||
17
js/tech.js
17
js/tech.js
@@ -212,7 +212,7 @@ const tech = {
|
|||||||
},
|
},
|
||||||
damageFromTech() {
|
damageFromTech() {
|
||||||
let dmg = 1 //m.fieldDamage
|
let dmg = 1 //m.fieldDamage
|
||||||
if (tech.isTechDebt) dmg *= 4 - 0.15 * tech.totalCount
|
if (tech.isTechDebt) dmg *= Math.max(41 / (tech.totalCount + 21), 4 - 0.15 * tech.totalCount)
|
||||||
if (tech.isAxion && tech.isHarmMACHO) dmg *= 1 + 0.75 * (1 - m.harmReduction())
|
if (tech.isAxion && tech.isHarmMACHO) dmg *= 1 + 0.75 * (1 - m.harmReduction())
|
||||||
if (tech.OccamDamage) dmg *= tech.OccamDamage
|
if (tech.OccamDamage) dmg *= tech.OccamDamage
|
||||||
if (tech.isCloakingDamage) dmg *= 1.35
|
if (tech.isCloakingDamage) dmg *= 1.35
|
||||||
@@ -543,7 +543,7 @@ const tech = {
|
|||||||
{
|
{
|
||||||
name: "cache",
|
name: "cache",
|
||||||
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Cache_(computing)' class="link">cache</a>`,
|
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Cache_(computing)' class="link">cache</a>`,
|
||||||
description: `${powerUps.orb.ammo()} give <strong>13x</strong> more <strong class='color-ammo'>ammo</strong>, but<br>you can't <strong>store</strong> any more <strong class='color-ammo'>ammo</strong> than that`,
|
description: `${powerUps.orb.ammo()} give <strong>14x</strong> more <strong class='color-ammo'>ammo</strong>, but<br>you can't <strong>store</strong> any more <strong class='color-ammo'>ammo</strong> than that`,
|
||||||
// ammo powerups always max out your gun,
|
// ammo powerups always max out your gun,
|
||||||
// but the maximum ammo ti limited
|
// but the maximum ammo ti limited
|
||||||
// description: `${powerUps.orb.ammo()} give <strong>13x</strong> more <strong class='color-ammo'>ammo</strong>, but<br>you can't <strong>store</strong> any more <strong class='color-ammo'>ammo</strong> than that`,
|
// description: `${powerUps.orb.ammo()} give <strong>13x</strong> more <strong class='color-ammo'>ammo</strong>, but<br>you can't <strong>store</strong> any more <strong class='color-ammo'>ammo</strong> than that`,
|
||||||
@@ -556,7 +556,7 @@ const tech = {
|
|||||||
},
|
},
|
||||||
requires: "not exciton",
|
requires: "not exciton",
|
||||||
effect() {
|
effect() {
|
||||||
tech.ammoCap = 13;
|
tech.ammoCap = 14;
|
||||||
powerUps.ammo.effect()
|
powerUps.ammo.effect()
|
||||||
},
|
},
|
||||||
remove() {
|
remove() {
|
||||||
@@ -3089,7 +3089,8 @@ 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> 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`,
|
// 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() {
|
descriptionFunction() {
|
||||||
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>`
|
// 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>`
|
||||||
|
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*(Math.max(41 / (tech.totalCount + 21), 4 - 0.15 * tech.totalCount) ))-100}%)</em>`
|
||||||
},
|
},
|
||||||
maxCount: 1,
|
maxCount: 1,
|
||||||
count: 0,
|
count: 0,
|
||||||
@@ -6622,9 +6623,9 @@ const tech = {
|
|||||||
frequency: 2,
|
frequency: 2,
|
||||||
frequencyDefault: 2,
|
frequencyDefault: 2,
|
||||||
allowed() {
|
allowed() {
|
||||||
return (tech.plasmaBotCount || m.fieldUpgrades[m.fieldMode].name === "plasma torch") && (build.isExperimentSelection || powerUps.research.count > 1)
|
return (tech.plasmaBotCount || m.fieldUpgrades[m.fieldMode].name === "plasma torch") && (build.isExperimentSelection || powerUps.research.count > 1) && !tech.isPlasmaBall
|
||||||
},
|
},
|
||||||
requires: "plasma torch",
|
requires: "plasma torch, not plasma ball",
|
||||||
effect() {
|
effect() {
|
||||||
tech.isPlasmaRange += 0.5;
|
tech.isPlasmaRange += 0.5;
|
||||||
for (let i = 0; i < 2; i++) {
|
for (let i = 0; i < 2; i++) {
|
||||||
@@ -6645,9 +6646,9 @@ const tech = {
|
|||||||
frequency: 2,
|
frequency: 2,
|
||||||
frequencyDefault: 2,
|
frequencyDefault: 2,
|
||||||
allowed() {
|
allowed() {
|
||||||
return m.fieldUpgrades[m.fieldMode].name === "plasma torch" && !tech.isExtruder
|
return m.fieldUpgrades[m.fieldMode].name === "plasma torch" && !tech.isExtruder && tech.isPlasmaRange === 1
|
||||||
},
|
},
|
||||||
requires: "plasma torch, not extruder",
|
requires: "plasma torch, not extruder, plasma jet",
|
||||||
effect() {
|
effect() {
|
||||||
tech.isPlasmaBall = true;
|
tech.isPlasmaBall = true;
|
||||||
m.fieldUpgrades[m.fieldMode].set()
|
m.fieldUpgrades[m.fieldMode].set()
|
||||||
|
|||||||
15
todo.txt
15
todo.txt
@@ -1,18 +1,23 @@
|
|||||||
******************************************************** NEXT PATCH **************************************************
|
******************************************************** NEXT PATCH **************************************************
|
||||||
|
|
||||||
enthalpy: 3->2% heal from damage done
|
plasma ball
|
||||||
technical debt: 8->15% less damage for each tech
|
moves faster
|
||||||
|
grows/drains extra fast when you have excess energy
|
||||||
|
|
||||||
|
bug: technical debt no longer produces negative damage at high tech levels
|
||||||
|
maybe this was causing the NaN position bug?
|
||||||
|
|
||||||
******************************************************** TODO ********************************************************
|
******************************************************** TODO ********************************************************
|
||||||
|
|
||||||
|
|
||||||
plasma ball
|
plasma ball
|
||||||
maybe grow faster when you have more energy
|
damage is fine
|
||||||
or excess energy
|
disable plasma torch tech with no effect on plasma ball
|
||||||
change size/alpha when touching mobs
|
change size/alpha when touching mobs
|
||||||
explode when touching mobs like spirit bomb?
|
explode when touching mobs like spirit bomb?
|
||||||
player angle rotation speed while firing adds to fire speed
|
player angle rotation speed while firing adds to fire speed
|
||||||
tech upgrade to get electrical arcs that randomly damage nearby mobs
|
tech upgrade to get electrical arcs that randomly damage nearby mobs
|
||||||
use plasma jet tech?
|
could work for all branches of plasma torch
|
||||||
tech: black hole: gives the plasma ball gravity
|
tech: black hole: gives the plasma ball gravity
|
||||||
plasma orb increases in size and power as it eats enemies
|
plasma orb increases in size and power as it eats enemies
|
||||||
maybe does damage to player to grow faster?
|
maybe does damage to player to grow faster?
|
||||||
|
|||||||
Reference in New Issue
Block a user