Update Healer Man server

This commit is contained in:
phenom committed 2026-09-27 14:31:15 -04:00
1 parent ab1434a3b8
commit e284f4fc76
60 files changed
+2704 -118

No files matched your search

+22 -2
View File
@@ -5,6 +5,7 @@ import { finalDungeonBoss } from "./dungeonRunStore";
import type { DungeonDefinition } from "./dungeonTypes";
import type { PopulationEntityDefinition } from "./mobPopulation";
import type { ContentCategoryId } from "../app/contentCategories";
import { isBiteSizedDungeonId } from "./dungeonContentSource";
import { resolveBossBalanceOverride } from "./bossBalanceOverrides";
const WOW_BOSS_HEALTH_FLOOR: readonly (readonly [level: number, health: number])[] = [
@@ -39,6 +40,15 @@ const WOW_BOSS_TEST_DAMAGE_SCALE: readonly (readonly [level: number, scale: numb
];
const BOSS_TEST_HEALTH_FLOOR_MULTIPLIER = 0.6;
const FINAL_BOSS_HEALTH_FLOOR_MULTIPLIER = 1.9;
// A single boss follows one or two short packs. Measured Ready Priest party
// damage changes sharply with unlocks, so use a small bracket curve to keep
// these bosses near the existing 25–45 second mechanic window at levels 1–80.
const BITE_SIZED_BOSS_HEALTH_BANDS: readonly (readonly [number, number, number])[] = [
[1, 2.2, 2.45], [9, 0.95, 1.1], [10, 0.65, 0.8], [20, 0.7, 0.85],
[30, 0.82, 0.94], [40, 0.85, 1], [50, 0.7, 0.82],
[55, 0.43, 0.53], [60, 0.4, 0.5], [65, 0.33, 0.4],
[70, 0.35, 0.43], [80, 0.35, 0.43],
];
function interpolatedFloor(level: number, anchors: readonly (readonly [number, number])[]): number {
const upperIndex = anchors.findIndex(([anchorLevel]) => level <= anchorLevel);
@@ -81,8 +91,16 @@ export function dungeonEnemyScaling(dungeon: DungeonDefinition, entity: Populati
const finalBoss = boss && !testing && finalDungeonBoss(dungeon, difficultyId)?.id === instanceId;
// Match durability to the character's game, including when crossing dungeon catalogs.
const partyHealthFloor = partyBossHealthFloor(level, characterSource, testing);
const biteSizedBoss = boss && !testing && isBiteSizedDungeonId(dungeon.id);
const biteSizedFloorScale = biteSizedBoss
? interpolatedFloor(characterLevel, BITE_SIZED_BOSS_HEALTH_BANDS.map(([levelAnchor, floor]) => [levelAnchor, floor]))
: 1;
const biteSizedCeilingScale = biteSizedBoss
? interpolatedFloor(characterLevel, BITE_SIZED_BOSS_HEALTH_BANDS.map(([levelAnchor, , ceiling]) => [levelAnchor, ceiling]))
: Number.POSITIVE_INFINITY;
const finaleFloor = finalBoss && dungeon.finalBossDurability !== "standard";
const bossFloor = partyHealthFloor * (finaleFloor ? FINAL_BOSS_HEALTH_FLOOR_MULTIPLIER : 1);
const bossFloor = partyHealthFloor * (finaleFloor ? FINAL_BOSS_HEALTH_FLOOR_MULTIPLIER
: biteSizedFloorScale);
// A test room's sole objective must not promote every boss to a campaign
// finale. A reduced floor still prevents high-level source creatures with
// tiny extrapolated level-two health from dying before mechanics can run.
@@ -93,7 +111,9 @@ export function dungeonEnemyScaling(dungeon: DungeonDefinition, entity: Populati
const scaledHealth = boss
? testing
? Math.max(Math.min(originalHealth, testingBossCeiling), testingBossFloor)
: Math.max(originalHealth, bossFloor)
: biteSizedBoss
? Math.min(Math.max(originalHealth, bossFloor), partyHealthFloor * biteSizedCeilingScale)
: Math.max(originalHealth, bossFloor)
: originalHealth;
const testingDamageScale = testing && characterSource === "wow"
? interpolatedFloor(level, WOW_BOSS_TEST_DAMAGE_SCALE)