Files
healer-man/src/game/dungeonDifficulty.ts
T
2026-09-13 13:21:27 -04:00

14 lines
597 B
TypeScript

/** Separate from the source dungeon's Normal/Heroic creature variant. */
export function validBossDifficulty(value: unknown): value is number {
return typeof value === "number" && Number.isInteger(value) && value >= 1 && value <= 10;
}
export function bossDifficultyMultipliers(level: number) {
const difficulty = validBossDifficulty(level) ? level : 1;
return { health: 1 + (difficulty - 1) * 0.25, damage: 1 + (difficulty - 1) * 0.15 };
}
export function bossDifficultyLabel(level?: number): string {
return level ? `Difficulty ${level}${level === 1 ? " · Easy" : ""}` : "Legacy";
}