Update Healer Man server

This commit is contained in:
phenom committed 2026-09-30 09:57:13 -04:00
1 parent 35dfdaed61
commit 4fb7a0b9c8
161 files changed
+24618 -529

No files matched your search

+48
View File
@@ -53,6 +53,27 @@ function registerTarget(
useCombatStore.getState().selectMob(id);
}
function stableUnit(seed: string): number {
let hash = 2166136261;
for (const character of seed) {
hash ^= character.charCodeAt(0);
hash = Math.imul(hash, 16777619);
}
return (hash >>> 0) / 0x1_0000_0000;
}
function paladinVindicationProcTime(
sourceActorId: string,
abilityId: string,
targetId: string,
chance: number,
): number {
for (let now = 1_000; now < 100_000; now += 1) {
if (stableUnit(`${sourceActorId}:${abilityId}:${targetId}:${now}:wow335-paladin-vindication`) < chance) return now;
}
throw new Error("Could not find a seeded Vindication proc time.");
}
function unlockReadySpell(id: string): void {
const ability = useCombatStore.getState().abilities.find((entry) => entry.id === id);
expect(ability, id).toBeDefined();
@@ -92,6 +113,33 @@ describe("combat store", () => {
usePartyStore.getState().initializeParty("combat-store-tests", 1, useCombatStore.getState().health);
});
it("procs Vindication from a Paladin Holy hit with the generated rank chance, amount, duration, and owner", () => {
useCombatStore.getState().initializeCharacter({ classId: "paladin", level: 80, xp: 0 });
useCombatStore.setState((state) => ({
talentRanks: { ...state.talentRanks, "talent-1633": 3 },
}));
registerTarget("vindication-target", [2, 0, 0], 10_000, 0);
const abilityId = "wow335-paladin-exorcism";
const now = paladinVindicationProcTime(PLAYER_AGGRO_ID, abilityId, "vindication-target", 0.65);
expect(useCombatStore.getState().damageMob(
"vindication-target",
25,
now,
{ actorId: PLAYER_AGGRO_ID, role: "damage", abilityId },
"holy",
).amount).toBeGreaterThan(0);
expect(useCombatStore.getState().mobs["vindication-target"].auras).toEqual(expect.arrayContaining([
expect.objectContaining({
id: "wow335:paladin:vindication",
sourceActorId: PLAYER_AGGRO_ID,
sourceAbilityId: abilityId,
endsAt: now + 10_000,
magnitude: 357,
}),
]));
});
it("completes a ranged cast after its exact WoW 3.3.5a cast time", () => {
useCombatStore.getState().initializeCharacter({ classId: "mage", level: 1 });
const startingResource = useCombatStore.getState().maxResource;