Use hybrid WoW-stat gear for five RoM builds
This commit is contained in:
1 parent
f4a7d33f74
commit
8e95480d4f
10 files changed
+134
-29
No files matched your search
@@ -3,20 +3,22 @@ import { abilitiesForCharacter, learnedAbilityForBuild } from "./abilityCatalog"
|
||||
import { isValidRomClassPair } from "../app/romDualClass";
|
||||
import { loadCanonicalBenchmarkBuilds } from "./benchmark/benchmarkBuilds";
|
||||
import { readinessStatusFor } from "./companionSpecReadiness";
|
||||
import { resolvedEquipmentLoadout } from "./heirloomEquipment";
|
||||
import { classCanEquipItem } from "./equipment";
|
||||
import { equipmentStatsForItems, resolvedEquipmentLoadout } from "./heirloomEquipment";
|
||||
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 { romDualClassBaseStats, romNativeClassBaseStats } from "./romStats";
|
||||
import { romGearProfile } from "./specializationCatalog";
|
||||
import { deriveCharacterStats } from "./wotlkStats";
|
||||
|
||||
const CASES = [
|
||||
{ classId: "rom-priest", role: "healer", layout: "caster" },
|
||||
{ classId: "rom-priest", role: "healer", layout: "weapon-shield" },
|
||||
{ classId: "rom-knight", role: "tank", layout: "weapon-shield" },
|
||||
{ classId: "rom-scout", role: "damage", layout: "ranged" },
|
||||
{ classId: "rom-rogue", role: "damage", layout: "dual-wield" },
|
||||
{ classId: "rom-mage", role: "damage", layout: "caster" },
|
||||
{ classId: "rom-mage", role: "damage", layout: "two-hand" },
|
||||
] as const;
|
||||
|
||||
describe("RoM five class validation scope", () => {
|
||||
@@ -126,11 +128,55 @@ describe("RoM five class validation scope", () => {
|
||||
level: 60,
|
||||
});
|
||||
if (classId === "rom-knight") expect(loadout["off-hand"]?.armorType).toBe("shield");
|
||||
if (classId === "rom-scout") expect(loadout.ranged?.weaponType).toBe("bow");
|
||||
if (classId === "rom-priest") {
|
||||
expect(loadout["main-hand"]?.weaponType).toBe("mace");
|
||||
expect(loadout["off-hand"]?.armorType).toBe("shield");
|
||||
}
|
||||
if (classId === "rom-scout") {
|
||||
expect(loadout["main-hand"]?.weaponType).toBe("dagger");
|
||||
expect(loadout["main-hand"]?.inventorySlot).toBe("one-hand");
|
||||
expect(loadout.ranged?.weaponType).toBe("bow");
|
||||
}
|
||||
if (classId === "rom-rogue") {
|
||||
expect(loadout["main-hand"]?.weaponType).toBe("dagger");
|
||||
expect(loadout["off-hand"]?.weaponType).toBe("dagger");
|
||||
}
|
||||
if (classId === "rom-mage") {
|
||||
expect(loadout["main-hand"]?.weaponType).toBe("staff");
|
||||
expect(loadout["main-hand"]?.inventorySlot).toBe("two-hand");
|
||||
expect(loadout["off-hand"]).toBeUndefined();
|
||||
}
|
||||
expect(loadout.wrist).toBeUndefined();
|
||||
for (const item of Object.values(loadout)) expect(classCanEquipItem(classId, item!)).toBe(true);
|
||||
}
|
||||
});
|
||||
|
||||
it("grows the five hybrid combat loadouts through the heirloom levels", () => {
|
||||
for (const { classId, role } of CASES) {
|
||||
const identity = ROM_FIVE_IDENTITIES.find((entry) => entry.classId === classId && entry.role === role)!;
|
||||
let priorHealth = 0;
|
||||
let priorPower = 0;
|
||||
for (const level of [1, 20, 40, 60, 79]) {
|
||||
const loadout = resolvedEquipmentLoadout({}, [], {
|
||||
ownerId: `rom-hybrid:${classId}`,
|
||||
ownerKind: "player",
|
||||
classId,
|
||||
specializationId: null,
|
||||
role,
|
||||
level,
|
||||
});
|
||||
const gear = equipmentStatsForItems(Object.values(loadout).filter((item) => item !== undefined));
|
||||
const combat = deriveCharacterStats(classId, level, gear, identity.raceId, {}, level >= 10 ? identity.secondaryClassId : null);
|
||||
const power = classId === "rom-scout" ? combat.rangedAttackPower
|
||||
: classId === "rom-rogue" || classId === "rom-knight" ? combat.attackPower
|
||||
: combat.spellPower;
|
||||
expect(combat.health, `${classId} health at ${level}`).toBeGreaterThan(priorHealth);
|
||||
expect(power, `${classId} power at ${level}`).toBeGreaterThan(priorPower);
|
||||
expect(Object.values(loadout).every((item) => item?.itemLevel === level)).toBe(true);
|
||||
if (classId === "rom-knight" || classId === "rom-priest") expect(combat.blockValue).toBeGreaterThan(0);
|
||||
priorHealth = combat.health;
|
||||
priorPower = power;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user