diff --git a/js/engine.js b/js/engine.js index 5856b25..b6d8c65 100644 --- a/js/engine.js +++ b/js/engine.js @@ -104,8 +104,8 @@ function collisionChecks(event) { mech.immuneCycle = mech.cycle + mod.collisionImmuneCycles; //player is immune to collision damage for 30 cycles mob[k].foundPlayer(); let dmg = Math.min(Math.max(0.025 * Math.sqrt(mob[k].mass), 0.05), 0.3) * game.dmgScale; //player damage is capped at 0.3*dmgScale of 1.0 - if (mod.isPiezo) mech.energy += mech.maxEnergy * 2; mech.damage(dmg); + if (mod.isPiezo) mech.energy += mech.maxEnergy * 2; if (mod.isBayesian) powerUps.ejectMod() if (mob[k].onHit) mob[k].onHit(k); //extra kick between player and mob //this section would be better with forces but they don't work... diff --git a/js/index.js b/js/index.js index 654628b..fb95772 100644 --- a/js/index.js +++ b/js/index.js @@ -200,7 +200,7 @@ const build = { let countMods = 0 for (let i = 0, len = b.guns.length; i < len; i++) { if (b.guns[i].have) { - text += `
  ${b.guns[i].name}
${b.guns[i].description}
` + text += `
  ${b.guns[i].name} - ${b.guns[i].ammo}
${b.guns[i].description}
` countGuns++ } } diff --git a/js/level.js b/js/level.js index f00b947..3d5af7e 100644 --- a/js/level.js +++ b/js/level.js @@ -82,6 +82,18 @@ const level = { powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "heal", false); } } + if (mod.isPerpetualReroll) powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "reroll", false); + if (mod.isPerpetualAmmo) { + powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "ammo", false); + powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "ammo", false); + } + if (mod.isPerpetualHeal) { + powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "heal", false); + powerUps.spawn(mech.pos.x + 60 * (Math.random() - 0.5), mech.pos.y + 60 * (Math.random() - 0.5), "heal", false); + } + if (mod.isPerpetualStun) { + for (let i = 0; i < mob.length; i++) mobs.statusStun(mob[i], 60 * 8) + } if (mod.isGunCycle) { b.inventoryGun++; if (b.inventoryGun > b.inventory.length - 1) b.inventoryGun = 0; diff --git a/js/mods.js b/js/mods.js index 9b42461..80741c5 100644 --- a/js/mods.js +++ b/js/mods.js @@ -987,9 +987,9 @@ const mod = { maxCount: 1, count: 0, allowed() { - return mech.fieldUpgrades[mech.fieldMode].name !== "nano-scale manufacturing" && mech.fieldUpgrades[mech.fieldMode].name !== "standing wave harmonics" && !mod.isEnergyHealth && !mod.isEnergyLoss + return (mech.fieldUpgrades[mech.fieldMode].name !== "nano-scale manufacturing" || mech.maxEnergy > 1) && mech.fieldUpgrades[mech.fieldMode].name !== "standing wave harmonics" && !mod.isEnergyHealth && !mod.isEnergyLoss && !mod.isPiezo }, - requires: "not nano-scale manufacturing, not mass-energy equivalence, not standing wave harmonics, not acute stress response", + requires: "not nano-scale manufacturing, mass-energy equivalence, standing wave harmonics, acute stress response, piezoelectricity", effect() { mod.isTimeAvoidDeath = true; }, @@ -1003,9 +1003,9 @@ const mod = { maxCount: 1, count: 0, allowed() { - return !mod.isEnergyHealth + return !mod.isEnergyHealth && !mod.isTimeAvoidDeath }, - requires: "not mass-energy equivalence", + requires: "not mass-energy equivalence, CPT reversal", effect() { mod.isPiezo = true; mech.energy += mech.maxEnergy * 2; @@ -1016,11 +1016,11 @@ const mod = { }, { name: "ground state", - description: "reduce harm by 50%
you no longer passively regenerate energy", + description: "reduce harm by 60%
you no longer passively regenerate energy", maxCount: 1, count: 0, allowed() { - return mod.isPiezo && !mod.timeEnergyRegen + return mod.isPiezo && mod.energyRegen > 0.001 }, requires: "piezoelectricity", effect: () => { @@ -1559,7 +1559,7 @@ const mod = { }, { name: "quantum immortality", - description: "after dying, continue in an alternate reality
spawn 5 rerolls", + description: "after dying, continue in an alternate reality
spawn 4 rerolls", maxCount: 1, count: 0, allowed() { @@ -1568,9 +1568,8 @@ const mod = { requires: "at least 2 rerolls", effect() { mod.isImmortal = true; - for (let i = 0; i < 5; i++) { - powerUps.spawn(mech.pos.x, mech.pos.y, "reroll", false); - } + powerUps.spawn(mech.pos.x, mech.pos.y, "reroll", false); + for (let i = 0; i < 4; i++) {} }, remove() { mod.isImmortal = false; @@ -1635,6 +1634,70 @@ const mod = { }, remove() {} }, + { + name: "perpetual rerolls", + description: "find 1 reroll power up
at the start of each level", + maxCount: 1, + count: 0, + allowed() { + return !mod.isSuperDeterminism && !mod.isPerpetualHeal && !mod.isPerpetualAmmo && !mod.isPerpetualStun + }, + requires: "only 1 perpetual effect, not superdeterminism", + effect() { + mod.isPerpetualReroll = true + }, + remove() { + mod.isPerpetualReroll = false + } + }, + { + name: "perpetual heals", + description: "find 2 heal power ups
at the start of each level", + maxCount: 1, + count: 0, + allowed() { + return !mod.isPerpetualReroll && !mod.isPerpetualAmmo && !mod.isPerpetualStun + }, + requires: "only 1 perpetual effect", + effect() { + mod.isPerpetualHeal = true + }, + remove() { + mod.isPerpetualHeal = false + } + }, + { + name: "perpetual ammo", + description: "find 2 ammo power ups
at the start of each level", + maxCount: 1, + count: 0, + allowed() { + return !mod.isPerpetualReroll && !mod.isPerpetualHeal && !mod.isPerpetualReroll && !mod.isPerpetualStun + }, + requires: "only 1 perpetual effect, not exciton lattice", + effect() { + mod.isPerpetualAmmo = true + }, + remove() { + mod.isPerpetualAmmo = false + } + }, + { + name: "perpetual stun", + description: "stun all mobs for up to 8 seconds
at the start of each level", + maxCount: 1, + count: 0, + allowed() { + return !mod.isPerpetualReroll && !mod.isPerpetualHeal && !mod.isPerpetualAmmo + }, + requires: "only 1 perpetual effect", + effect() { + mod.isPerpetualStun = true + }, + remove() { + mod.isPerpetualStun = false + } + }, //************************************************** //************************************************** gun //************************************************** mods @@ -2774,9 +2837,9 @@ const mod = { maxCount: 1, count: 0, allowed() { - return mod.isStunField || mod.oneSuperBall || mod.isCloakStun || mod.orbitBotCount > 1 + return mod.isStunField || mod.oneSuperBall || mod.isCloakStun || mod.orbitBotCount > 1 || mod.isPerpetualStun }, - requires: "flux pinning or super ball
or flashbang", + requires: "a stun effect", effect() { mod.isCrit = true; }, @@ -2830,7 +2893,7 @@ const mod = { maxCount: 1, count: 0, allowed() { - return mech.fieldUpgrades[mech.fieldMode].name === "time dilation field" + return mech.fieldUpgrades[mech.fieldMode].name === "time dilation field" && mod.energyRegen !== 0; }, requires: "time dilation field", effect: () => { @@ -3193,10 +3256,9 @@ const mod = { }, remove() {} }, - { name: "rerolls", - description: "spawn 5 reroll power ups", + description: "spawn 4 reroll power ups", maxCount: 9, count: 0, isNonRefundable: true, @@ -3206,7 +3268,7 @@ const mod = { }, requires: "not superdeterminism", effect() { - for (let i = 0; i < 5; i++) { + for (let i = 0; i < 4; i++) { powerUps.spawn(mech.pos.x, mech.pos.y, "reroll"); } this.count-- @@ -3401,7 +3463,6 @@ const mod = { isWideLaser: null, wideLaser: null, isPulseLaser: null, - timeEnergyRegen: null, isRadioactive: null, isRailEnergyGain: null, isMineSentry: null, @@ -3412,5 +3473,9 @@ const mod = { historyLaser: null, isSpeedHarm: null, isSpeedDamage: null, - isTimeSkip: null + isTimeSkip: null, + isPerpetualReroll: null, + isPerpetualAmmo: null, + isPerpetualHeal: null, + isPerpetualStun: null } \ No newline at end of file diff --git a/js/player.js b/js/player.js index efe94ce..644f378 100644 --- a/js/player.js +++ b/js/player.js @@ -272,8 +272,7 @@ const mech = { }, alive: false, death() { - if (mod.isImmortal) { //if player has the immortality buff, spawn on the same level with randomized stats - + if (mod.isImmortal) { //if player has the immortality buff, spawn on the same level with randomized damage //count mods let totalMods = 0; for (let i = 0; i < mod.mods.length; i++) { @@ -466,7 +465,7 @@ const mech = { if (mod.isBotArmor) dmg *= 0.95 ** mod.totalBots() if (mod.isHarmArmor && mech.lastHarmCycle + 600 > mech.cycle) dmg *= 0.5; if (mod.isNoFireDefense && mech.cycle > mech.fireCDcycle + 120) dmg *= 0.6 - if (mod.energyRegen === 0) dmg *= 0.5 //0.22 + 0.78 * mech.energy //77% damage reduction at zero energy + if (mod.energyRegen === 0) dmg *= 0.4 //0.22 + 0.78 * mech.energy //77% damage reduction at zero energy if (mod.isTurret && mech.crouch) dmg *= 0.5; if (mod.isEntanglement && b.inventory[0] === b.activeGun) { for (let i = 0, len = b.inventory.length; i < len; i++) { @@ -1832,7 +1831,7 @@ const mech = { } //120 cycles after shooting (or using field) enable cloak - if (mech.energy < 0.05 && mech.fireCDcycle < mech.cycle) mech.fireCDcycle = mech.cycle + if (mech.energy < 0.05 && mech.fireCDcycle < mech.cycle && !input.fire) mech.fireCDcycle = mech.cycle if (mech.fireCDcycle + 50 < mech.cycle) { if (!mech.isCloak) { mech.isCloak = true //enter cloak diff --git a/js/spawn.js b/js/spawn.js index 1c776d4..423d3ca 100644 --- a/js/spawn.js +++ b/js/spawn.js @@ -2262,7 +2262,7 @@ const spawn = { // this.explode(); // }; me.collisionFilter.mask = cat.bullet | cat.player | cat.mob - me.accelMag = 0.0006 * game.accelScale; + me.accelMag = 0.0004 * game.accelScale; me.leaveBody = false; me.frictionAir = 0.02; me.isSnakeTail = true; diff --git a/style.css b/style.css index fa14ed7..0a74cca 100644 --- a/style.css +++ b/style.css @@ -248,7 +248,7 @@ summary { .grid-title { padding-bottom: 6px; - font-size: 1.3em; + font-size: 1.4em; font-weight: 600; } @@ -510,6 +510,7 @@ em { padding: 2px; border-radius: 4px; letter-spacing: 1px; + font-weight: 100; } .color-r { diff --git a/todo.txt b/todo.txt index 16c44fb..d9d8195 100644 --- a/todo.txt +++ b/todo.txt @@ -1,10 +1,7 @@ *********** NEXT PATCH *********** -mod: CPT reversal - avoid damage by rewinding to your past, but use up all your energy - requires wormhole or time dilation - -several minor buffs to wormhole -small changes to mob distribution on a few maps +4 new mods: perpetual ammo/rerolls/heals - get that power up at the start of each level + also perpetual stun: stuns all mobs for 8 seconds at the start ************** BUGS ************** @@ -47,6 +44,7 @@ time dilation - slow down the game engine by 1/2, but run an extra player cycle flavor - your bullets destroy blocks this isn't really a bonus, so maybe just add this as flavor to another mod/field/gun + a chance for destroyed blocks to drop ammo? mod plasma : plasma length increases then decreases as you hold down the field button (like stabbing with a spear) grows to 1.5 longer after 0.3 seconds, then returns to normal length over 1 second, until field is pressed again