hyperpolarization

tech: hyperpolarization - reduce the CD on depolarization by 1 second

metamaterial absorber 22->25% chance to get power up for mobs not killed
symbiosis -0.5 -> 0.25 max health after killing a mob
dazzler -15->10 energy after decloaking and stunning mobs
Hilbert space 142->300% damage

fixed bug with 1000x more frequent enthalpy
This commit is contained in:
landgreen
2024-02-10 19:58:05 -08:00
parent 17f65cfcea
commit b5e4b0db03
8 changed files with 80 additions and 86 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 23 KiB

BIN
img/hyperpolarization.webp Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

View File

@@ -800,7 +800,7 @@ const b = {
requestAnimationFrame(cycle)
} else {
count++
if (count < 110) requestAnimationFrame(cycle);
if (count < 130) requestAnimationFrame(cycle);
if (!(count % 10)) {
const unit = Vector.rotate({
x: 1,

View File

@@ -1372,7 +1372,7 @@ const mobs = {
}
if (tech.isAddRemoveMaxHealth) {
if (!this.isBoss) {
const amount = 0.005
const amount = 0.0025
if (tech.isEnergyHealth) {
if (m.maxEnergy > amount) {
tech.healMaxEnergyBonus -= amount

View File

@@ -580,36 +580,24 @@ const m = {
},
rewind(steps) { // m.rewind(Math.floor(Math.min(599, 137 * m.energy)))
if (tech.isRewindGrenade) {
const immunityDuration = 65
const immunityDuration = 50
const immunityCycle = m.cycle + immunityDuration + 10 + tech.isPetalsExplode * 30 + tech.isCircleExplode * 21
if (m.immuneCycle < immunityCycle) m.immuneCycle = immunityCycle; //player is immune to damage until after grenades might explode...
for (let i = 1, len = Math.floor(4 + steps / 40); i < len; i++) {
b.grenade(Vector.add(m.pos, {
x: 10 * (Math.random() - 0.5),
y: 10 * (Math.random() - 0.5)
}), -i * Math.PI / len) //fire different angles for each grenade
b.grenade(Vector.add(m.pos, { x: 10 * (Math.random() - 0.5), y: 10 * (Math.random() - 0.5) }), -i * Math.PI / len) //fire different angles for each grenade
const who = bullet[bullet.length - 1]
if (tech.isNeutronBomb) {
Matter.Body.setVelocity(who, {
x: who.velocity.x * 0.3,
y: who.velocity.y * 0.3
});
Matter.Body.setVelocity(who, { x: who.velocity.x * 0.3, y: who.velocity.y * 0.3 });
} else if (tech.isVacuumBomb) {
Matter.Body.setVelocity(who, {
x: who.velocity.x * 0.5,
y: who.velocity.y * 0.5
});
Matter.Body.setVelocity(who, { x: who.velocity.x * 0.5, y: who.velocity.y * 0.5 });
who.endCycle = simulation.cycle + immunityDuration
} else if (tech.isRPG) {
who.endCycle = simulation.cycle + 10
} else {
Matter.Body.setVelocity(who, {
x: who.velocity.x * 0.5,
y: who.velocity.y * 0.5
});
Matter.Body.setVelocity(who, { x: who.velocity.x * 0.5, y: who.velocity.y * 0.5 });
who.endCycle = simulation.cycle + immunityDuration
}
}
@@ -1091,7 +1079,7 @@ const m = {
m.calcLeg(Math.PI, -3);
const diff = (m.lastKillCycle - m.cycle + 240) / 240
const diff = (m.lastKillCycle - m.cycle + tech.isDamageCooldownTime) / tech.isDamageCooldownTime
const color = diff < 0 ? "#fff" : "#aaa"
const hue = 220 + 20 * Math.sin(0.01 * m.cycle)
const colorInverse = diff < 0 ? `hsl(${hue}, 80%, 40%)` : "#fff"
@@ -4285,7 +4273,7 @@ const m = {
if (tech.isCloakStun) { //stun nearby mobs after exiting cloak
let isMobsAround = false
const stunRange = m.fieldDrawRadius * 1.5
const drain = 0.14
const drain = 0.1
if (m.energy > drain) {
for (let i = 0, len = mob.length; i < len; ++i) {
if (Vector.magnitude(Vector.sub(mob[i].position, m.pos)) < stunRange && Matter.Query.ray(map, mob[i].position, m.pos).length === 0 && !mob[i].isBadTarget) {

View File

@@ -1287,7 +1287,7 @@ const simulation = {
for (let i = 0, len = mob.length; i < len; i++) {
if (mob[i].isDropPowerUp && mob[i].alive) count++
}
count *= 0.22 //to fake the 20% chance, this makes it not random, and more predictable
count *= 0.25 //to fake the 25% chance, this makes it not random, and more predictable
let cycle = () => { //run after waiting a cycle for the map to be cleared
const types = ["heal", "ammo", "heal", "ammo", "research", "coupling", "boost", "tech", "gun", "field"]
for (let i = 0; i < count; i++) powerUps.spawnDelay(types[Math.floor(Math.random() * types.length)], 1)

View File

@@ -231,7 +231,7 @@ const tech = {
// }
// }
// }
if (tech.isDamageCooldown) dmg *= m.lastKillCycle + 240 > m.cycle ? 0.5 : 4
if (tech.isDamageCooldown) dmg *= m.lastKillCycle + tech.isDamageCooldownTime > m.cycle ? 0.45 : 4.33
if (tech.isDamageAfterKillNoRegen && m.lastKillCycle + 300 > m.cycle) dmg *= 1.93
if (tech.isDivisor && b.activeGun !== undefined && b.activeGun !== null && b.guns[b.activeGun].ammo % 3 === 0) dmg *= 1.77
if (tech.isNoGroundDamage) dmg *= m.onGround ? 0.85 : 2
@@ -366,30 +366,6 @@ const tech = {
if (this.count) m.resetSkin();
}
},
{
name: "depolarization",
descriptionFunction() {
// return `<strong>+300%</strong> <strong class='color-d'>damage</strong> or <strong>-50%</strong> <strong class='color-d'>damage</strong><br>if a mob has <strong>died</strong> in the last <strong>5 seconds</strong>`
return `<span style = 'font-size:88%;'><strong>+300%</strong> <strong class='color-d'>damage</strong> if <strong>no</strong> mobs <strong>died</strong> in the last <strong>4 seconds</strong><br><strong>-50%</strong> <strong class='color-d'>damage</strong> if a mob <strong>died</strong> in the last <strong>4 seconds</strong></span>`
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isSkin: true,
allowed() {
return !m.isAltSkin
},
requires: "not skinned",
effect() {
m.skin.polar();
tech.isDamageCooldown = true;
},
remove() {
tech.isDamageCooldown = false;
if (this.count) m.resetSkin();
}
},
{
name: "Higgs mechanism",
description: "<strong>+77%</strong> <strong><em>fire rate</em></strong><br>while <strong>firing</strong> your <strong>position</strong> is fixed",
@@ -419,7 +395,7 @@ const tech = {
},
{
name: "Hilbert space",
description: "<strong>+142%</strong> <strong class='color-d'>damage</strong><br>after a <strong>collision</strong> enter an <strong class='alt'>alternate reality</strong>",
description: "<strong>+300%</strong> <strong class='color-d'>damage</strong><br>after a <strong>collision</strong> enter an <strong class='alt'>alternate reality</strong>",
maxCount: 1,
count: 0,
frequency: 1,
@@ -430,7 +406,7 @@ const tech = {
return !m.isAltSkin && !tech.isResearchReality && !tech.isSwitchReality
},
requires: "not skinned, Ψ(t) collapse, many-worlds",
damage: 2.42,
damage: 4, //1+300%
effect() {
m.skin.anodize();
tech.damage *= this.damage
@@ -527,20 +503,20 @@ const tech = {
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: `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>+${11 * tech.largerHeals * (tech.isHalfHeals ? 0.5 : 1)}</strong> maximum <strong class='color-f'>energy</strong>`
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>+${11 * tech.largerHeals * (tech.isHalfHeals ? 0.5 : 1)}</strong> maximum <strong class='color-f'>energy</strong>`
},
maxCount: 1,
count: 0,
frequency: 4,
frequencyDefault: 4,
frequency: 5,
frequencyDefault: 5,
allowed() {
return tech.isEnergyHealth && !tech.isOverHeal
},
requires: "mass-energy equivalence, not quenching",
effect() {
powerUps.healGiveMaxEnergy = true; //tech.healMaxEnergyBonus given from heal power up
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
@@ -555,6 +531,50 @@ const tech = {
}
}
},
{
name: "depolarization",
descriptionFunction() {
// return `<strong>+300%</strong> <strong class='color-d'>damage</strong> or <strong>-50%</strong> <strong class='color-d'>damage</strong><br>if a mob has <strong>died</strong> in the last <strong>5 seconds</strong>`
return `<span style = 'font-size:88%;'><strong>+333%</strong> <strong class='color-d'>damage</strong> if <strong>no</strong> mobs <strong>died</strong> in the last <strong>${(tech.isDamageCooldownTime / 60).toFixed(0)} seconds</strong><br><strong>-55%</strong> <strong class='color-d'>damage</strong> if a mob <strong>died</strong> in the last <strong>${(tech.isDamageCooldownTime / 60).toFixed(0)} seconds</strong></span > `
},
maxCount: 1,
count: 0,
frequency: 1,
frequencyDefault: 1,
isSkin: true,
allowed() {
return !m.isAltSkin
},
requires: "not skinned",
effect() {
m.skin.polar();
tech.isDamageCooldown = true;
},
remove() {
tech.isDamageCooldown = false;
if (this.count) m.resetSkin();
}
},
{
name: "hyperpolarization",
descriptionFunction() {
return `the <strong class= 'color-d'> damage</strong> from <strong> depolarization</strong> <br>resets <strong>1 second</strong> sooner after a mob has <strong>died</strong>`
},
maxCount: 3,
count: 0,
frequency: 4,
frequencyDefault: 4,
allowed() {
return tech.isDamageCooldown
},
requires: "depolarization",
effect() {
tech.isDamageCooldownTime -= 60
},
remove() {
tech.isDamageCooldownTime = 240
}
},
{
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>",
@@ -736,7 +756,7 @@ const tech = {
},
{
name: "applied science",
description: `get a random <strong class='color-g'>gun</strong><strong class='color-m'>tech</strong><br>for each of your <strong class='color-g'>guns</strong>`, //spawn ${powerUps.orb.research(1)} and
description: `get a random <strong class='color-g'>gun</strong><strong class='color-m'>tech</strong><br>for each of your <strong class='color-g'>guns</strong>`, //spawn ${powerUps.orb.research(1)} and
maxCount: 9,
count: 0,
isNonRefundable: true,
@@ -826,8 +846,8 @@ const tech = {
info = `<br>this level: <strong>+${(31 * Math.max(0, b.inventory.length)).toFixed(0)}%</strong> <strong class='color-d'>damage</strong> for <strong class="highlight">${gun}</strong>`
}
return `
a new <strong class='color-g'>gun</strong> is <strong>chosen</strong> to be improved each <strong>level</strong>
<br><strong>+31%</strong> <strong class='color-d'>damage</strong> per <strong class='color-g'>gun</strong> for the <strong>chosen</strong> <strong class='color-g'>gun</strong>${info}`
a new <strong class='color-g'>gun</strong> is <strong>chosen</strong> to be improved each <strong>level</strong>
<br><strong>+31%</strong> <strong class='color-d'>damage</strong> per <strong class='color-g'>gun</strong> for the <strong>chosen</strong> <strong class='color-g'>gun</strong>${info}`
},
maxCount: 1,
count: 0,
@@ -1029,7 +1049,7 @@ 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>`,
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,
@@ -1378,8 +1398,8 @@ const tech = {
},
maxCount: 9,
count: 0,
frequency: 1000,
frequencyDefault: 1000,
frequency: 1,
frequencyDefault: 1,
isHealTech: true,
allowed() {
return true
@@ -6116,7 +6136,7 @@ const tech = {
},
{
name: "booby trap",
description: "<strong>50%</strong> chance to drop a <strong>mine</strong> from <strong>power ups</strong><br><strong>+36%</strong> <strong class='color-junk'>JUNK</strong> to <strong class='color-m'>tech</strong> pool",
description: "<strong>50%</strong> chance to drop a <strong>mine</strong> from <strong>power ups</strong><br><strong>+30%</strong> <strong class='color-junk'>JUNK</strong> to <strong class='color-m'>tech</strong> pool",
isGunTech: true,
maxCount: 1,
count: 0,
@@ -6132,7 +6152,7 @@ const tech = {
x: 0,
y: 0
}, 0)
this.refundAmount += tech.addJunkTechToPool(0.36)
this.refundAmount += tech.addJunkTechToPool(0.30)
},
refundAmount: 0,
remove() {
@@ -8597,7 +8617,7 @@ const tech = {
{
name: "metamaterial absorber", //quantum eraser
descriptionFunction() {
return `for each mob left <strong>alive</strong> after you exit a <strong>level</strong><br>there is a <strong>22%</strong> chance to spawn a random <strong>power up</strong>`
return `for each mob left <strong>alive</strong> after you exit a <strong>level</strong><br>there is a <strong>25%</strong> chance to spawn a random <strong>power up</strong>`
},
// descriptionFunction() {
// return `for each mob left <strong>alive</strong> after you exit a <strong>level</strong><br>`
@@ -8621,7 +8641,7 @@ const tech = {
{
name: "symbiosis",
descriptionFunction() {
return `after a <strong>boss</strong> <strong>dies</strong> spawn ${powerUps.orb.research(4)}${powerUps.orb.heal(3)} and a <strong class='color-m'>tech</strong><br>after a <strong>mob</strong> <strong>dies</strong> <strong>0.5</strong> maximum ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"}`
return `after a <strong>boss</strong> <strong>dies</strong> spawn ${powerUps.orb.research(4)}${powerUps.orb.heal(3)} and a <strong class='color-m'>tech</strong><br>after a <strong>mob</strong> <strong>dies</strong> <strong>0.25</strong> maximum ${tech.isEnergyHealth ? "<strong class='color-f'>energy</strong>" : "<strong class='color-h'>health</strong>"}`
},
isFieldTech: true,
maxCount: 1,
@@ -8685,7 +8705,7 @@ const tech = {
{
name: "dazzler",
link: `<a target="_blank" href='https://en.wikipedia.org/wiki/Dazzler_(weapon)' class="link">dazzler</a>`,
description: "after <strong class='color-cloaked'>decloaking</strong> <strong>stun</strong> nearby mobs<br>and drain <strong>15</strong> <strong class='color-f'>energy</strong>",
description: "after <strong class='color-cloaked'>decloaking</strong> <strong>stun</strong> nearby mobs<br>and drain <strong>10</strong> <strong class='color-f'>energy</strong>",
isFieldTech: true,
maxCount: 1,
count: 0,
@@ -12137,4 +12157,5 @@ const tech = {
isMobFullHealthCloak: null,
isMobLowHealth: null,
isDamageCooldown: null,
isDamageCooldownTime: null,
}

View File

@@ -1,31 +1,16 @@
******************************************************** NEXT PATCH **************************************************
community map - arena by Richard0820
skin tech: depolarization - gain +300 damage or -50% damage if a mobs has died in last 5 seconds
CPT triggers if you have above 90->85 energy
CPT skin graphically indicates when CPT is active
mass-energy defense reduction is 66->50%
tech: hyperpolarization - reduce the CD on depolarization by 1 second
new level load display animation draws the outline of the new map
only on reactor and final levels
choose MINIMAL HUD in settings to disable (or enter testing mode)
enthalpy spawns heals on mobs death with a 5% chance
this is roughly an 80% increase in spawn rate
mass production spawns a few ammo and heals when you first get it
paradigm shift 6->4 health removed
incendiary ammunition drone and shotgun explosions are 30% bigger
Zectron super balls do 75->90% more damage and drain 25->20 energy on hitting player
metamaterial absorber 22->25% chance to get power up for mobs not killed
symbiosis -0.5 -> 0.25 max health after killing a mob
dazzler -15->10 energy after decloaking and stunning mobs
Hilbert space 142->300% damage
fixed bug with optical amplifier and cloaking field
plasma ball can pick up power ups when out of energy, like other fields
fixed bug with not hiding mouse
fixed bug with 1000x more frequent enthalpy
*********************************************************** TODO *****************************************************
final and reactor menu is still kinda annoying
maybe tweak the style and duration
improve new player experience
training is too long to be a tutorial
before nail gun level offer player option to continue or switch to normal game