Release Healer Man 0.1.16
This commit is contained in:
1 parent
f49e54f35f
commit
b57d2b2839
89 files changed
+6055
-17
No files matched your search
@@ -0,0 +1,27 @@
|
||||
const HEALER_SPECIALIZATIONS = new Set([
|
||||
"paladin:holy", "priest:discipline", "priest:holy", "shaman:restoration", "druid:restoration",
|
||||
"witch-doctor:brewing", "bloodmage:fleshweaver", "chronomancer:time", "cultist:heretic",
|
||||
"starcaller:moon-priest", "sun-cleric:blessings", "tinker:invention", "venomancer:vizier",
|
||||
"primalist:life",
|
||||
]);
|
||||
|
||||
const TANK_SPECIALIZATIONS = new Set([
|
||||
"warrior:protection", "paladin:protection", "death-knight:blood", "druid:feral-bear",
|
||||
"felsworn:infernal", "witch-hunter:black-knight", "knight-of-xoroth:defiance", "guardian:vanguard",
|
||||
"templar:oathkeeper", "bloodmage:eternal", "cultist:dreadnought", "starcaller:moon-guard",
|
||||
"sun-cleric:valkyrie", "venomancer:fortitude", "reaper:domination", "primalist:mountain-king",
|
||||
"runemaster:riftblade",
|
||||
]);
|
||||
|
||||
export function arenaRoleForSpecialization(classId, specializationId, ruleset) {
|
||||
const normalizedClass = String(classId ?? "").trim().toLowerCase();
|
||||
const normalizedSpec = String(specializationId ?? "").trim().toLowerCase();
|
||||
if (!normalizedClass || !normalizedSpec || !normalizedSpec.startsWith(`${normalizedClass}:`)) return null;
|
||||
if (ruleset === "rom") {
|
||||
if (normalizedSpec === `${normalizedClass}:role-healer`) return "healer";
|
||||
if (normalizedSpec === `${normalizedClass}:role-damage`) return "damage";
|
||||
return normalizedSpec.endsWith(":role-tank") ? "tank" : null;
|
||||
}
|
||||
if (TANK_SPECIALIZATIONS.has(normalizedSpec)) return "tank";
|
||||
return HEALER_SPECIALIZATIONS.has(normalizedSpec) ? "healer" : "damage";
|
||||
}
|
||||
Reference in new issue
Block a user