forked from phenom/healer-man
Release Healer Man 0.1.54
This commit is contained in:
1 parent
d6976e6ef6
commit
2dbb0acfc1
26 files changed
+1893
-912
No files matched your search
@@ -6,6 +6,7 @@ import { EMPTY_ITEM_STATS } from "./itemStats";
|
||||
import { commitPartyAbilityUse, choosePartyAbility, partyAbilityIsReady, partyAbilityAmount } from "./partyAbilityAi";
|
||||
import { usePartyStore, type PartyMember } from "./partyStore";
|
||||
import { deriveCharacterStats } from "./wotlkStats";
|
||||
import { runtimePartyTalentRanksForLevel } from "./partyTalentRuntime";
|
||||
|
||||
function memberFor(classId: PartyMember["classId"], role: PartyMember["role"]): PartyMember {
|
||||
const base = usePartyStore.getState().members[0];
|
||||
@@ -88,6 +89,44 @@ describe("catalog-driven party rotations", () => {
|
||||
expect(partyAbilityIsReady(member, heal, 2_000)).toBe(false);
|
||||
});
|
||||
|
||||
it("banks Rage for a higher-priority signature strike instead of starving it with Slam", () => {
|
||||
const talents = runtimePartyTalentRanksForLevel("warrior", "Arms", 80);
|
||||
const base = {
|
||||
...memberFor("warrior", "damage"),
|
||||
specialization: "Arms",
|
||||
specializationId: "warrior:arms",
|
||||
talentRanks: talents,
|
||||
};
|
||||
const stance = abilitiesForClass("warrior").find((ability) => ability.name === "Battle Stance")!;
|
||||
const rend = abilitiesForClass("warrior").find((ability) => ability.name === "Rend")!;
|
||||
const maintainedAbilityIds = new Set([stance.id, rend.id]);
|
||||
const target = { ...useCombatStore.getState().mobs.caster, activeCast: null };
|
||||
const empty = { ...base, resource: 0, resourcePools: { rage: 0 } };
|
||||
expect(choosePartyAbility(empty, { now: 2_000, target, maintainedAbilityIds })?.name)
|
||||
.toBe("Bloodrage");
|
||||
const bloodrage = abilitiesForClass("warrior").find((ability) => ability.name === "Bloodrage")!;
|
||||
const saving = { ...base, resource: 15, resourcePools: { rage: 15 }, cooldowns: { [bloodrage.id]: 60_000 } };
|
||||
expect(choosePartyAbility(saving, { now: 2_000, target, maintainedAbilityIds })).toBeNull();
|
||||
const funded = { ...base, resource: 30, resourcePools: { rage: 30 }, cooldowns: { [bloodrage.id]: 60_000 } };
|
||||
expect(choosePartyAbility(funded, { now: 2_000, target, maintainedAbilityIds })?.name)
|
||||
.toBe("Mortal Strike");
|
||||
});
|
||||
|
||||
it("opens Arcane combat with the learned Arcane Barrage signature", () => {
|
||||
const member = {
|
||||
...memberFor("mage", "damage"),
|
||||
specialization: "Arcane",
|
||||
specializationId: "mage:arcane",
|
||||
talentRanks: runtimePartyTalentRanksForLevel("mage", "Arcane", 80),
|
||||
};
|
||||
const maintainedAbilityIds = new Set(abilitiesForClass("mage")
|
||||
.filter((ability) => ["Mage Armor", "Ice Armor", "Frost Armor"].includes(ability.name))
|
||||
.map((ability) => ability.id));
|
||||
const target = { ...useCombatStore.getState().mobs.caster, activeCast: null };
|
||||
expect(choosePartyAbility(member, { now: 2_000, target, maintainedAbilityIds })?.name)
|
||||
.toBe("Arcane Barrage");
|
||||
});
|
||||
|
||||
it("preserves spell base damage when its bonus-power coefficient is zero", () => {
|
||||
const member = { ...memberFor("warrior", "tank"), level: 5, gearStats: EMPTY_ITEM_STATS };
|
||||
const ability = abilitiesForClass("warrior").find((candidate) => candidate.id === "warrior-heroic-strike")!;
|
||||
|
||||
Reference in new issue
Block a user