2 bosses late game

on later levels spawn 2 bosses, but 1 power up each
  starts at simulation.difficulty > 23 //on hard mode level 6, level 12 on easy, level 4 on why?
  makes combat harder, but also means that you will always get at least 2 drops per level
    you used to have a chance to only get 1 near the end of the game
    I'm guessing this will lead to about 3 more total tech by the final boss
  abiogenesis - removed
  parthenogenesis - doesn't duplicate bosses anymore, +8% duplication
This commit is contained in:
landgreen
2023-09-02 15:30:23 -07:00
parent 99bd1c876e
commit 8a3ac11793
5 changed files with 75 additions and 62 deletions

View File

@@ -190,23 +190,23 @@ const level = {
difficultyIncrease(num = 1) { difficultyIncrease(num = 1) {
for (let i = 0; i < num; i++) { for (let i = 0; i < num; i++) {
simulation.difficulty++ simulation.difficulty++
m.dmgScale *= 0.91; //damage done by player decreases each level m.dmgScale *= 0.905; //damage done by player decreases each level
if (simulation.accelScale < 6) simulation.accelScale *= 1.024 //mob acceleration increases each level if (simulation.accelScale < 6) simulation.accelScale *= 1.024 //mob acceleration increases each level
if (simulation.CDScale > 0.15) simulation.CDScale *= 0.964 //mob CD time decreases each level if (simulation.CDScale > 0.15) simulation.CDScale *= 0.964 //mob CD time decreases each level
} }
simulation.dmgScale = Math.max(0.1, 0.29 * simulation.difficulty) //damage done by mobs scales with total levels simulation.dmgScale = Math.max(0.1, 0.285 * simulation.difficulty) //damage done by mobs scales with total levels
simulation.healScale = 1 / (1 + simulation.difficulty * 0.045) //a higher denominator makes for lower heals // m.health += heal * simulation.healScale; simulation.healScale = 1 / (1 + simulation.difficulty * 0.045) //a higher denominator makes for lower heals // m.health += heal * simulation.healScale;
// console.log(`CD = ${simulation.CDScale}`) // console.log(`CD = ${simulation.CDScale}`)
}, },
difficultyDecrease(num = 1) { //used in easy mode for simulation.reset() difficultyDecrease(num = 1) { //used in easy mode for simulation.reset()
for (let i = 0; i < num; i++) { for (let i = 0; i < num; i++) {
simulation.difficulty-- simulation.difficulty--
m.dmgScale /= 0.91; //damage done by player decreases each level m.dmgScale /= 0.905; //damage done by player decreases each level
if (simulation.accelScale > 1) simulation.accelScale /= 1.024 //mob acceleration increases each level if (simulation.accelScale > 1) simulation.accelScale /= 1.024 //mob acceleration increases each level
if (simulation.CDScale < 1) simulation.CDScale /= 0.964 //mob CD time decreases each level if (simulation.CDScale < 1) simulation.CDScale /= 0.964 //mob CD time decreases each level
} }
if (simulation.difficulty < 1) simulation.difficulty = 0; if (simulation.difficulty < 1) simulation.difficulty = 0;
simulation.dmgScale = Math.max(0.1, 0.29 * simulation.difficulty) //damage done by mobs scales with total levels simulation.dmgScale = Math.max(0.1, 0.285 * simulation.difficulty) //damage done by mobs scales with total levels
simulation.healScale = 1 / (1 + simulation.difficulty * 0.045) simulation.healScale = 1 / (1 + simulation.difficulty * 0.045)
}, },
difficultyText() { difficultyText() {
@@ -3836,7 +3836,7 @@ const level = {
} }
} }
} }
spawn.secondaryBossChance(-2300, -800) // spawn.secondaryBossChance(-2300, -800)
} }
} else { } else {
doorIn.isClosing = false doorIn.isClosing = false
@@ -3853,8 +3853,10 @@ const level = {
isFightOver = true isFightOver = true
doorIn.isClosing = false doorIn.isClosing = false
doorOut.isClosing = false doorOut.isClosing = false
powerUps.spawnBossPowerUp(-3600, -100) // powerUps.spawnBossPowerUp(-3600, -100)
powerUps.spawn(-3650, -200, "tech") powerUps.spawn(-3650, -50, "tech")
powerUps.spawn(-3650, -150, "tech")
powerUps.spawn(-3650, -300, "tech")
// if (player.position.x < 2760 && player.position.x > 210) {} // if (player.position.x < 2760 && player.position.x > 210) {}
} }
} }
@@ -3926,7 +3928,7 @@ const level = {
} }
} }
} }
spawn.secondaryBossChance(2200, -800) // spawn.secondaryBossChance(2200, -800)
} }
} else { } else {
doorIn.isClosing = false doorIn.isClosing = false
@@ -3943,8 +3945,10 @@ const level = {
isFightOver = true isFightOver = true
doorIn.isClosing = false doorIn.isClosing = false
doorOut.isClosing = false doorOut.isClosing = false
powerUps.spawnBossPowerUp(3600, -100) // powerUps.spawnBossPowerUp(3600, -100)
powerUps.spawn(3650, -200, "tech") powerUps.spawn(3650, -50, "tech")
powerUps.spawn(3650, -150, "tech")
powerUps.spawn(3650, -300, "tech")
// if (player.position.x < 2760 && player.position.x > 210) {} // if (player.position.x < 2760 && player.position.x > 210) {}
} }
} }
@@ -7604,8 +7608,6 @@ const level = {
}); });
Composite.add(engine.world, consBB[consBB.length - 1]); Composite.add(engine.world, consBB[consBB.length - 1]);
spawn.mapRect(-600 + 300, -2000 * 0.75, 1900, 50); //3rd floor spawn.mapRect(-600 + 300, -2000 * 0.75, 1900, 50); //3rd floor
spawn.mapRect(-600 + 2000 * 0.7, -2000 * 0.74, 50, 375); //center wall spawn.mapRect(-600 + 2000 * 0.7, -2000 * 0.74, 50, 375); //center wall
spawn.bodyRect(-600 + 2000 * 0.7, -2000 * 0.5 - 106, 50, 106); //center block under wall spawn.bodyRect(-600 + 2000 * 0.7, -2000 * 0.5 - 106, 50, 106); //center block under wall
@@ -10783,7 +10785,7 @@ const level = {
} }
anotherBoss = (x, y) => { anotherBoss = (x, y) => {
if (tech.isDuplicateBoss && Math.random() < tech.duplicationChance()) { if (tech.isDuplicateMobs && Math.random() < tech.duplicationChance()) {
tech.isScaleMobsWithDuplication = true tech.isScaleMobsWithDuplication = true
spawn.randomLevelBoss(x, y, ["historyBoss"]); spawn.randomLevelBoss(x, y, ["historyBoss"]);
tech.isScaleMobsWithDuplication = false tech.isScaleMobsWithDuplication = false
@@ -13771,7 +13773,7 @@ const level = {
} //for dynamic stuff that updates while playing that is one Z layer above the player } //for dynamic stuff that updates while playing that is one Z layer above the player
const anotherBoss = (x, y) => { const anotherBoss = (x, y) => {
if (tech.isDuplicateBoss && Math.random() < tech.duplicationChance()) { if (tech.isDuplicateMobs && Math.random() < tech.duplicationChance()) {
tech.isScaleMobsWithDuplication = true tech.isScaleMobsWithDuplication = true
spawn.historyBoss(x, y) spawn.historyBoss(x, y)
tech.isScaleMobsWithDuplication = false tech.isScaleMobsWithDuplication = false

View File

@@ -1357,8 +1357,10 @@ const powerUps = {
powerUps.randomPowerUpCounter++; powerUps.randomPowerUpCounter++;
powerUpChance(Math.max(level.levelsCleared, 10) * 0.1) powerUpChance(Math.max(level.levelsCleared, 10) * 0.1)
} }
if (!(simulation.difficulty > spawn.secondaryBossThreshold)) {
powerUps.randomPowerUpCounter += 0.6; powerUps.randomPowerUpCounter += 0.6;
powerUpChance(Math.max(level.levelsCleared, 6) * 0.1) powerUpChance(Math.max(level.levelsCleared, 6) * 0.1)
}
function powerUpChance(chanceToFail) { function powerUpChance(chanceToFail) {
if (Math.random() * chanceToFail < powerUps.randomPowerUpCounter) { if (Math.random() * chanceToFail < powerUps.randomPowerUpCounter) {

View File

@@ -52,7 +52,7 @@ const spawn = {
const pick = spawn.pickList[Math.floor(Math.random() * spawn.pickList.length)]; const pick = spawn.pickList[Math.floor(Math.random() * spawn.pickList.length)];
spawn[pick](x, y); spawn[pick](x, y);
} }
if (tech.isDuplicateBoss && Math.random() < tech.duplicationChance()) { if (tech.isDuplicateMobs && Math.random() < tech.duplicationChance()) {
const pick = spawn.pickList[Math.floor(Math.random() * spawn.pickList.length)]; const pick = spawn.pickList[Math.floor(Math.random() * spawn.pickList.length)];
spawn[pick](x, y); spawn[pick](x, y);
} }
@@ -67,7 +67,7 @@ const spawn = {
spawn[pick](x + Math.round((Math.random() - 0.5) * 20) + i * size * 2.5, y + Math.round((Math.random() - 0.5) * 20), size); spawn[pick](x + Math.round((Math.random() - 0.5) * 20) + i * size * 2.5, y + Math.round((Math.random() - 0.5) * 20), size);
} }
} }
if (tech.isDuplicateBoss && Math.random() < tech.duplicationChance()) { if (tech.isDuplicateMobs && Math.random() < tech.duplicationChance()) {
for (let i = 0; i < num; ++i) { for (let i = 0; i < num; ++i) {
const pick = spawn.pickList[Math.floor(Math.random() * spawn.pickList.length)]; const pick = spawn.pickList[Math.floor(Math.random() * spawn.pickList.length)];
spawn[pick](x + Math.round((Math.random() - 0.5) * 20) + i * size * 2.5, y + Math.round((Math.random() - 0.5) * 20), size); spawn[pick](x + Math.round((Math.random() - 0.5) * 20) + i * size * 2.5, y + Math.round((Math.random() - 0.5) * 20), size);
@@ -109,23 +109,28 @@ const spawn = {
} }
} }
}, },
secondaryBossThreshold: 22,
secondaryBossChance(x, y) { secondaryBossChance(x, y) {
if (tech.isDuplicateBoss && Math.random() < tech.duplicationChance()) { // if (tech.isDuplicateMobs && Math.random() < tech.duplicationChance()) {
tech.isScaleMobsWithDuplication = true // tech.isScaleMobsWithDuplication = true
// spawn.randomLevelBoss(x, y);
// tech.isScaleMobsWithDuplication = false
// return true
// } else if (tech.isResearchBoss) {
// if (powerUps.research.count > 2) {
// powerUps.research.changeRerolls(-3)
// simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span> <span class='color-symbol'>-=</span> 3<br>${powerUps.research.count}`)
// } else {
// tech.addJunkTechToPool(0.49)
// }
// spawn.randomLevelBoss(x, y);
// return true
// }
if (simulation.difficulty > spawn.secondaryBossThreshold) { //starts on hard mode level 6, level 12 on easy, level 4 on why?
spawn.randomLevelBoss(x, y); spawn.randomLevelBoss(x, y);
tech.isScaleMobsWithDuplication = false
return true
} else if (tech.isResearchBoss) {
if (powerUps.research.count > 2) {
powerUps.research.changeRerolls(-3)
simulation.makeTextLog(`<span class='color-var'>m</span>.<span class='color-r'>research</span> <span class='color-symbol'>-=</span> 3<br>${powerUps.research.count}`)
} else { } else {
tech.addJunkTechToPool(0.49)
}
spawn.randomLevelBoss(x, y);
return true
}
return false return false
}
}, },
//mob templates ********************************************************************************************* //mob templates *********************************************************************************************
//*********************************************************************************************************** //***********************************************************************************************************

View File

@@ -260,7 +260,7 @@ const tech = {
return dmg return dmg
}, },
duplicationChance() { duplicationChance() {
return Math.min(1, Math.max(0, (tech.isPowerUpsVanish ? 0.13 : 0) + (tech.isStimulatedEmission ? 0.17 : 0) + tech.duplication + tech.duplicateChance + 0.05 * tech.isExtraGunField + m.duplicateChance + tech.fieldDuplicate + tech.cloakDuplication + (tech.isAnthropicTech && tech.isDeathAvoidedThisLevel ? 0.5 : 0))) return Math.min(1, Math.max(0, (tech.isPowerUpsVanish ? 0.13 : 0) + (tech.isStimulatedEmission ? 0.17 : 0) + tech.duplication + tech.duplicateChance + 0.05 * tech.isExtraGunField + m.duplicateChance + tech.fieldDuplicate + 0.08 * tech.isDuplicateMobs + tech.cloakDuplication + (tech.isAnthropicTech && tech.isDeathAvoidedThisLevel ? 0.5 : 0)))
}, },
isScaleMobsWithDuplication: false, isScaleMobsWithDuplication: false,
maxDuplicationEvent() { maxDuplicationEvent() {
@@ -3722,25 +3722,25 @@ const tech = {
tech.isTechDebt = false; tech.isTechDebt = false;
} }
}, },
{ // {
name: "abiogenesis", // name: "abiogenesis",
// description: `use ${powerUps.orb.research(4)}(or <strong>49%</strong> <strong class='color-junk'>JUNK</strong> to the <strong class='color-m'>tech</strong> pool if you can't) to add a 2nd <strong>boss</strong> to each level`, // // description: `use ${powerUps.orb.research(4)}(or <strong>49%</strong> <strong class='color-junk'>JUNK</strong> to the <strong class='color-m'>tech</strong> pool if you can't) to add a 2nd <strong>boss</strong> to each level`,
description: `<span style = 'font-size:94%;'>as a level begins spawn a 2nd <strong>boss</strong> using ${powerUps.orb.research(3)}<br>(<strong>+49%</strong> <strong class='color-junk'>JUNK</strong> to the <strong class='color-m'>tech</strong> pool if you can't pay)</span>`, // description: `<span style = 'font-size:94%;'>as a level begins spawn a 2nd <strong>boss</strong> using ${powerUps.orb.research(3)}<br>(<strong>+49%</strong> <strong class='color-junk'>JUNK</strong> to the <strong class='color-m'>tech</strong> pool if you can't pay)</span>`,
maxCount: 1, // maxCount: 1,
count: 0, // count: 0,
frequency: 2, // frequency: 2,
frequencyDefault: 2, // frequencyDefault: 2,
allowed() { // allowed() {
return (build.isExperimentSelection || powerUps.research.count > 2) && !tech.isDuplicateBoss // return (build.isExperimentSelection || powerUps.research.count > 2) && !tech.isDuplicateMobs
}, // },
requires: "at least 3 research, not parthenogenesis", // requires: "at least 3 research, not parthenogenesis",
effect() { // effect() {
tech.isResearchBoss = true; // tech.isResearchBoss = true;
}, // },
remove() { // remove() {
tech.isResearchBoss = false; // tech.isResearchBoss = false;
} // }
}, // },
{ {
name: "meta-analysis", name: "meta-analysis",
description: `if you choose a <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> you instead get a<br>random normal <strong class='color-m'>tech</strong> and spawn ${powerUps.orb.research(2)}`, description: `if you choose a <strong class='color-junk'>JUNK</strong><strong class='color-m'>tech</strong> you instead get a<br>random normal <strong class='color-m'>tech</strong> and spawn ${powerUps.orb.research(2)}`,
@@ -4189,20 +4189,21 @@ const tech = {
}, },
{ {
name: "parthenogenesis", name: "parthenogenesis",
description: "your <strong class='color-dup'>duplication</strong> has a chance to<br><strong class='color-dup'>duplicate</strong> <strong>mobs</strong> and <strong>bosses</strong>", description: "<strong>+8%</strong> chance to <strong class='color-dup'>duplicate</strong> spawned <strong>power ups</strong><br><strong class='color-dup'>duplication</strong> also <strong class='color-dup'>duplicates</strong> <strong>mobs</strong>",
maxCount: 1, maxCount: 1,
count: 0, count: 0,
frequency: 1, frequency: 1,
frequencyDefault: 1, frequencyDefault: 1,
allowed() { allowed() {
return tech.duplicationChance() > 0 && !tech.isResearchBoss return tech.duplicationChance() > 0// && !tech.isResearchBoss
}, },
requires: "some duplication chance, not abiogenesis", requires: "some duplication chance",
effect() { effect() {
tech.isDuplicateBoss = true; tech.isDuplicateMobs = true;
powerUps.setPowerUpMode(); //needed after adjusting duplication chance
}, },
remove() { remove() {
tech.isDuplicateBoss = false; tech.isDuplicateMobs = false;
} }
}, },
{ {
@@ -11602,7 +11603,7 @@ const tech = {
isPauseSwitchField: null, isPauseSwitchField: null,
isPauseEjectTech: null, isPauseEjectTech: null,
isShieldPierce: null, isShieldPierce: null,
isDuplicateBoss: null, isDuplicateMobs: null,
is100Duplicate: null, is100Duplicate: null,
isDynamoBotUpgrade: null, isDynamoBotUpgrade: null,
isBlockPowerUps: null, isBlockPowerUps: null,

View File

@@ -1,10 +1,13 @@
******************************************************** NEXT PATCH ************************************************** ******************************************************** NEXT PATCH **************************************************
community map crimsonTowers by Richard0820 on later levels spawn 2 bosses, but 1 power up each
starts at simulation.difficulty > 23 //on hard mode level 6, level 12 on easy, level 4 on why?
makes combat harder, but also means that you will always get at least 2 drops per level
you used to have a chance to only get 1 near the end of the game
I'm guessing this will lead to about 3 more total tech by the final boss
abiogenesis - removed
parthenogenesis - doesn't duplicate bosses anymore, +8% duplication
new MACHO animation
tech: dark star - MACHO is bigger and damages mobs
*********************************************************** TODO ***************************************************** *********************************************************** TODO *****************************************************