Update Healer Man server

This commit is contained in:
phenom committed 2026-09-19 21:01:51 -04:00
1 parent f8314e7de1
commit 1fedb9368d
76 files changed
+20556 -2523

No files matched your search

+78
View File
@@ -6,6 +6,8 @@ from scripts.balance_lab import (
automatic_parties,
coverage_parties,
random_party,
readiness_eligible_builds,
resolve_build,
runtime_session_command,
search_bosses,
tuning_label,
@@ -13,6 +15,15 @@ from scripts.balance_lab import (
class BalanceLabControllerTests(unittest.TestCase):
def test_class_spec_selector_prefers_the_named_default_build(self) -> None:
builds = [
{"id": "fire-default", "classId": "mage", "className": "Mage", "role": "damage",
"specialization": "Fire", "label": "Mage Fire Playerbots", "defaultTalentBuild": True},
{"id": "fire-alt", "classId": "mage", "className": "Mage", "role": "damage",
"specialization": "Fire", "label": "Mage Fire Executable", "defaultTalentBuild": False},
]
self.assertEqual(resolve_build("mage:fire", builds)["id"], "fire-default")
def test_headless_runtime_uses_the_no_watch_vite_mode(self) -> None:
command = runtime_session_command("wow", 40)
self.assertEqual(command[1:3], ["--mode", "balance-lab"])
@@ -34,6 +45,20 @@ class BalanceLabControllerTests(unittest.TestCase):
])
self.assertEqual(len({member["id"] for member in first[2:]}), 3)
def test_random_party_uses_named_default_profiles(self) -> None:
builds = [
{"id": "tank-default", "role": "tank", "defaultTalentBuild": True},
{"id": "tank-alt", "role": "tank", "defaultTalentBuild": False},
{"id": "healer-default", "role": "healer", "defaultTalentBuild": True},
{"id": "healer-alt", "role": "healer", "defaultTalentBuild": False},
*({"id": f"damage-default-{index}", "role": "damage", "defaultTalentBuild": True}
for index in range(3)),
*({"id": f"damage-alt-{index}", "role": "damage", "defaultTalentBuild": False}
for index in range(3)),
]
party = random_party(builds, 17)
self.assertTrue(all(member["defaultTalentBuild"] for member in party))
def test_tuning_flags_keep_both_sides_of_the_median(self) -> None:
self.assertEqual(tuning_label(1.51), "very high")
self.assertEqual(tuning_label(1.25), "high")
@@ -102,6 +127,43 @@ class BalanceLabControllerTests(unittest.TestCase):
self.assertTrue(set(selected).issubset(covered))
self.assertTrue(all(observed.count(build_id) == 1 for build_id in selected))
def test_readiness_filters_only_wow_and_beta_requires_opt_in(self) -> None:
builds = [
{"id": "ready-tank", "source": "wow", "specializationId": "warrior:protection"},
{"id": "beta-damage", "source": "wow", "specializationId": "paladin:retribution"},
{"id": "testing-damage", "source": "wow", "specializationId": "priest:shadow"},
{"id": "rom-damage", "source": "rom", "specializationId": "mage:primary"},
]
policy = {"config": {"statuses": {
"warrior:protection": "ready",
"paladin:retribution": "beta",
"priest:shadow": "needs-testing",
}}}
self.assertEqual(
[build["id"] for build in readiness_eligible_builds(builds, policy, False)],
["ready-tank", "rom-damage"],
)
self.assertEqual(
[build["id"] for build in readiness_eligible_builds(builds, policy, True)],
["ready-tank", "beta-damage", "rom-damage"],
)
def test_targeted_needs_testing_build_uses_ready_fillers(self) -> None:
builds = [
{"id": "ready-tank", "source": "wow", "role": "tank", "specializationId": "warrior:protection", "readinessStatus": "ready", "defaultTalentBuild": True},
{"id": "ready-healer", "source": "wow", "role": "healer", "specializationId": "priest:discipline", "readinessStatus": "ready", "defaultTalentBuild": True},
{"id": "ready-hunter", "source": "wow", "role": "damage", "specializationId": "hunter:marksmanship", "readinessStatus": "ready", "defaultTalentBuild": True},
{"id": "ready-mage", "source": "wow", "role": "damage", "specializationId": "mage:fire", "readinessStatus": "ready", "defaultTalentBuild": True},
{"id": "ready-rogue", "source": "wow", "role": "damage", "specializationId": "rogue:assassination", "readinessStatus": "ready", "defaultTalentBuild": True},
{"id": "testing-shadow", "source": "wow", "role": "damage", "specializationId": "priest:shadow", "readinessStatus": "needs-testing", "defaultTalentBuild": True},
]
eligible = readiness_eligible_builds(builds, None, False)
parties = coverage_parties(builds, ("wow",), ["testing-shadow"], 13, eligible)
self.assertEqual(len(parties), 1)
ids = [member["id"] for member in parties[0]["party"]]
self.assertIn("testing-shadow", ids)
self.assertTrue(all(build_id == "testing-shadow" or build_id.startswith("ready-") for build_id in ids))
def test_boss_search_matches_name_dungeon_key_and_source(self) -> None:
bosses = [
{"key": "gundrak/eck", "name": "Eck the Ferocious", "dungeonTitle": "Gundrak", "category": "wow"},
@@ -164,6 +226,22 @@ class BalanceLabControllerTests(unittest.TestCase):
self.assertEqual(by_id["mage-fireball"]["damageShare"], 0.5)
self.assertTrue(by_id["mage-unused-blast"]["unusedAvailable"])
def test_missing_profile_action_requires_repeated_uncommitted_decisions(self) -> None:
class_key = ("wow", "mage-fire", "mage", "Mage", "Fire", "damage")
class_runs = [{"partyConfigurationId": "party-1", "bossKey": "boss-1", "elapsedSeconds": 10, "damage": 0}]
base = {
"abilityName": "Fireball", "icon": "", "categories": ["damage"],
"cooldownSeconds": 0, "rotationProfileId": "mage:fire", "rotationPriority": 5,
"expectedUsage": "profile", "available": True, "used": False,
"casts": 0, "hits": 0, "rawDamage": 0, "effectiveDamage": 0,
"rawHealing": 0, "effectiveHealing": 0, "overheal": 0, "absorbs": 0,
"partyConfigurationId": "party-1", "bossKey": "boss-1", "elapsedSeconds": 10,
}
once = aggregate_class_abilities({(*class_key, "fireball"): [{**base, "rotationDecisions": 1}]}, {class_key: class_runs})[0]
repeated = aggregate_class_abilities({(*class_key, "fireball"): [{**base, "rotationDecisions": 3}]}, {class_key: class_runs})[0]
self.assertEqual(once["status"], "unused")
self.assertEqual(repeated["status"], "missing-profile-action")
if __name__ == "__main__":
unittest.main()