forked from phenom/healer-man
Validate RoM primary five hybrid stats and pair mechanics
This commit is contained in:
1 parent
8e95480d4f
commit
c8b3a3d95a
18 files changed
+2061
-48
No files matched your search
@@ -9,9 +9,10 @@ import { partyRolesForClass } from "./partyRoles";
|
||||
import { createConfiguredPartyMember, createDungeonParty, createSpectatorDungeonParty, usePartyStore } from "./partyStore";
|
||||
import { ROM_ORDINARY_ABILITIES_BY_CLASS } from "./romAbilityCatalog";
|
||||
import { ROM_FIVE_IDENTITIES } from "./romFiveIdentities";
|
||||
import { EMPTY_ITEM_STATS } from "./itemStats";
|
||||
import { romDualClassBaseStats, romNativeClassBaseStats } from "./romStats";
|
||||
import { romGearProfile } from "./specializationCatalog";
|
||||
import { deriveCharacterStats } from "./wotlkStats";
|
||||
import { baseAttributesFor, baseResourcesFor, deriveCharacterStats, healthFromTotalStamina, manaFromTotalIntellect, MANA_POOL_MULTIPLIER } from "./wotlkStats";
|
||||
|
||||
const CASES = [
|
||||
{ classId: "rom-priest", role: "healer", layout: "weapon-shield" },
|
||||
@@ -22,6 +23,34 @@ const CASES = [
|
||||
] as const;
|
||||
|
||||
describe("RoM five class validation scope", () => {
|
||||
it.each([1, 10, 30, 60, 79])("uses WoW base attribute and resource curves for the accepted pairs at level %i", (level) => {
|
||||
const referenceRace: Record<string, "human" | "night-elf"> = {
|
||||
"rom-knight": "human",
|
||||
"rom-priest": "human",
|
||||
"rom-scout": "night-elf",
|
||||
"rom-rogue": "human",
|
||||
"rom-mage": "human",
|
||||
};
|
||||
for (const identity of ROM_FIVE_IDENTITIES) {
|
||||
const secondary = level >= 10 ? identity.secondaryClassId : null;
|
||||
const primaryBase = baseAttributesFor(identity.classId, level, referenceRace[identity.classId] ?? "human");
|
||||
const secondaryBase = secondary ? baseAttributesFor(secondary, level, referenceRace[secondary] ?? "human") : null;
|
||||
const expected = Object.fromEntries((Object.keys(primaryBase) as (keyof typeof primaryBase)[]).map((stat) => [
|
||||
stat, Math.round(primaryBase[stat] + (secondaryBase?.[stat] ?? 0) * .1),
|
||||
]));
|
||||
const combat = deriveCharacterStats(identity.classId, level, EMPTY_ITEM_STATS, identity.raceId, {}, secondary);
|
||||
expect(combat, `${identity.name} at ${level}`).toMatchObject(expected);
|
||||
const baseResources = baseResourcesFor(identity.classId, level);
|
||||
const secondaryResources = secondary ? baseResourcesFor(secondary, level) : null;
|
||||
expect(combat.health).toBe(Math.round(baseResources.health + (secondaryResources?.health ?? 0) * .1
|
||||
+ healthFromTotalStamina(combat.stamina)));
|
||||
if (identity.classId === "rom-knight" || identity.classId === "rom-priest" || identity.classId === "rom-mage") {
|
||||
expect(combat.mana).toBe(MANA_POOL_MULTIPLIER * Math.round(baseResources.mana
|
||||
+ (secondaryResources?.mana ?? 0) * .1 + manaFromTotalIntellect(combat.intellect)));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
it.each([10, 30, 60, 80])("keeps each secondary class at the primary level for stat growth at level %i", (level) => {
|
||||
for (const identity of ROM_FIVE_IDENTITIES) {
|
||||
const primary = romNativeClassBaseStats(identity.classId, level);
|
||||
|
||||
Reference in new issue
Block a user