forked from phenom/healer-man
Update Healer Man server
This commit is contained in:
1 parent
1fedb9368d
commit
cc3b2fa4d5
27 files changed
+1988
-83
No files matched your search
@@ -93,6 +93,26 @@ function buildIdentity(build: SelectableBenchmarkBuildCatalogEntry): string {
|
||||
return `${build.source}:${build.classId}:${build.role}:${build.orientation}:${build.talentBuildId ?? "default"}`;
|
||||
}
|
||||
|
||||
function randomPartyCapacity(builds: readonly SelectableBenchmarkBuildCatalogEntry[]): number {
|
||||
const defaults = builds.filter((build) => build.defaultTalentBuild);
|
||||
const pool = defaults.length > 0 ? defaults : builds;
|
||||
const tanks = pool.filter((build) => build.role === "tank").length;
|
||||
const healers = pool.filter((build) => build.role === "healer").length;
|
||||
const damage = pool.filter((build) => build.role === "damage").length;
|
||||
return damage < 3 ? 0 : tanks * healers * (damage * (damage - 1) * (damage - 2)) / 6;
|
||||
}
|
||||
|
||||
function cappedRandomPartyCount(
|
||||
builds: readonly SelectableBenchmarkBuildCatalogEntry[],
|
||||
requestedPerSource: number,
|
||||
): number {
|
||||
const bySource = new Map<string, SelectableBenchmarkBuildCatalogEntry[]>();
|
||||
for (const build of builds) bySource.set(build.source, [...(bySource.get(build.source) ?? []), build]);
|
||||
return [...bySource.values()].reduce((total, rows) => (
|
||||
total + Math.min(requestedPerSource, randomPartyCapacity(rows))
|
||||
), 0);
|
||||
}
|
||||
|
||||
export function BalanceLabScreen({
|
||||
onClose,
|
||||
executionTarget = "server",
|
||||
@@ -178,8 +198,9 @@ export function BalanceLabScreen({
|
||||
? selectedBossKeys.length
|
||||
: BOSS_TESTING_CATALOG.filter((boss) => bossScope === "all" || boss.category === bossScope).length;
|
||||
const coverageBuilds = specSelection === "all" ? automaticBuilds : selectedBuilds;
|
||||
const requestedRandomPartyCount = partyConfigurations * (source === "all" ? 3 : 1);
|
||||
const partyCount = specSelection === "random"
|
||||
? partyConfigurations * (source === "all" ? 3 : 1)
|
||||
? cappedRandomPartyCount(automaticBuilds, partyConfigurations)
|
||||
: coveragePartyCount(coverageBuilds);
|
||||
const coveredSpecCount = specSelection === "all" ? automaticBuilds.length : selectedBuilds.length;
|
||||
const estimatedRunsPerLevel = partyCount * (seatSweep ? 5 : 1) * bossCount * simulationsPerParty;
|
||||
@@ -409,6 +430,9 @@ export function BalanceLabScreen({
|
||||
? `${coveredSpecCount} class/spec builds will be covered at least once across the minimum valid party set.`
|
||||
: `${coveredSpecCount} selected class/spec builds will be covered; unselected specs fill required party roles.`}
|
||||
</p>}
|
||||
{specSelection === "random" && partyCount < requestedRandomPartyCount && <p className="balance-lab-coverage-note">
|
||||
The eligible pools provide {partyCount.toLocaleString()} unique party configuration{partyCount === 1 ? "" : "s"}. Each will run once; identical parties will not be duplicated to reach the requested {requestedRandomPartyCount.toLocaleString()}.
|
||||
</p>}
|
||||
{specSelection === "specific" && (
|
||||
<section className="balance-lab-boss-picker balance-lab-spec-picker">
|
||||
<header>
|
||||
|
||||
Reference in new issue
Block a user