diff --git a/img/depolarization.webp b/img/depolarization.webp index 2932607..1ff8484 100644 Binary files a/img/depolarization.webp and b/img/depolarization.webp differ diff --git a/img/hyperpolarization.webp b/img/hyperpolarization.webp new file mode 100644 index 0000000..2932607 Binary files /dev/null and b/img/hyperpolarization.webp differ diff --git a/js/bullet.js b/js/bullet.js index 320ba5e..674bfd5 100644 --- a/js/bullet.js +++ b/js/bullet.js @@ -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, diff --git a/js/mob.js b/js/mob.js index 58f7ad5..6f5b85c 100644 --- a/js/mob.js +++ b/js/mob.js @@ -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 diff --git a/js/player.js b/js/player.js index d9e7a83..5a9876d 100644 --- a/js/player.js +++ b/js/player.js @@ -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) { diff --git a/js/simulation.js b/js/simulation.js index fdb0940..1dfeb9c 100644 --- a/js/simulation.js +++ b/js/simulation.js @@ -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) diff --git a/js/tech.js b/js/tech.js index 4a66256..7900dfa 100644 --- a/js/tech.js +++ b/js/tech.js @@ -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 `+300% damage or -50% damage
if a mob has died in the last 5 seconds` - return `+300% damage if no mobs died in the last 4 seconds
-50% damage if a mob died in the last 4 seconds
` - }, - 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: "+77% fire rate
while firing your position is fixed", @@ -419,7 +395,7 @@ const tech = { }, { name: "Hilbert space", - description: "+142% damage
after a collision enter an alternate reality", + description: "+300% damage
after a collision enter an alternate reality", 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: `1st ionization energy`, // description: `after you collect ${powerUps.orb.heal()}
+${0.1 * tech.largerHeals} maximum energy`, - // descriptionFunction: `convert current and future ${powerUps.orb.heal()} into

give +${10 * tech.largerHeals} maximum energy`, + // descriptionFunction: `convert current and future ${powerUps.orb.heal()} into

give +${10 * tech.largerHeals} maximum energy`, descriptionFunction() { - return `convert current and future
into

give +${11 * tech.largerHeals * (tech.isHalfHeals ? 0.5 : 1)} maximum energy` + return `convert current and future
into

give +${11 * tech.largerHeals * (tech.isHalfHeals ? 0.5 : 1)} maximum energy` }, 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 `+300% damage or -50% damage
if a mob has died in the last 5 seconds` + return `+333% damage if no mobs died in the last ${(tech.isDamageCooldownTime / 60).toFixed(0)} seconds
-55% damage if a mob died in the last ${(tech.isDamageCooldownTime / 60).toFixed(0)} seconds
` + }, + 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 damage from depolarization
resets 1 second sooner after a mob has died` + }, + 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: "charge, parity, and time invert to undo defense
rewind (1.5—5) seconds for (66—220) energy", @@ -736,7 +756,7 @@ const tech = { }, { name: "applied science", - description: `get a random guntech
for each of your guns`, //spawn ${powerUps.orb.research(1)} and + description: `get a random guntech
for each of your guns`, //spawn ${powerUps.orb.research(1)} and maxCount: 9, count: 0, isNonRefundable: true, @@ -826,8 +846,8 @@ const tech = { info = `
this level: +${(31 * Math.max(0, b.inventory.length)).toFixed(0)}% damage for ${gun}` } return ` - a new gun is chosen to be improved each level -
+31% damage per gun for the chosen gun${info}` + a new gun is chosen to be improved each level +
+31% damage per gun for the chosen gun${info}` }, maxCount: 1, count: 0, @@ -1029,7 +1049,7 @@ const tech = { { name: "integrated armament", link: `integrated armament`, - description: `+25% damage, but new guns replace
your current gun and convert guntech
`, + description: `+25% damage, but new guns replace
your current gun and convert guntech
`, 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: "50% chance to drop a mine from power ups
+36% JUNK to tech pool", + description: "50% chance to drop a mine from power ups
+30% JUNK to tech 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 alive after you exit a level
there is a 22% chance to spawn a random power up` + return `for each mob left alive after you exit a level
there is a 25% chance to spawn a random power up` }, // descriptionFunction() { // return `for each mob left alive after you exit a level
` @@ -8621,7 +8641,7 @@ const tech = { { name: "symbiosis", descriptionFunction() { - return `after a boss dies spawn ${powerUps.orb.research(4)}${powerUps.orb.heal(3)} and a tech
after a mob dies –0.5 maximum ${tech.isEnergyHealth ? "energy" : "health"}` + return `after a boss dies spawn ${powerUps.orb.research(4)}${powerUps.orb.heal(3)} and a tech
after a mob dies –0.25 maximum ${tech.isEnergyHealth ? "energy" : "health"}` }, isFieldTech: true, maxCount: 1, @@ -8685,7 +8705,7 @@ const tech = { { name: "dazzler", link: `dazzler`, - description: "after decloaking stun nearby mobs
and drain –15 energy", + description: "after decloaking stun nearby mobs
and drain –10 energy", isFieldTech: true, maxCount: 1, count: 0, @@ -12137,4 +12157,5 @@ const tech = { isMobFullHealthCloak: null, isMobLowHealth: null, isDamageCooldown: null, + isDamageCooldownTime: null, } \ No newline at end of file diff --git a/todo.txt b/todo.txt index b90510e..3bf436e 100644 --- a/todo.txt +++ b/todo.txt @@ -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