Update Healer Man server

This commit is contained in:
phenom committed 2026-10-02 10:38:12 -04:00
1 parent 4c768fbec6
commit b16821e92e
330 files changed
+35406 -1760

No files matched your search

+67 -4
View File
@@ -16,6 +16,10 @@ import {
WOW335_HUNTER_LOCK_AND_LOAD_READY_TAG,
} from "./wow335HunterRuntime";
import { usePartyStore } from "./partyStore";
import {
wow335HunterPetBaseStatsForLevel,
wow335HunterPetBiteDamage,
} from "./wow335HunterPetRuntime";
describe("WoW 3.3.5 Hunter Readiness", () => {
it("preserves Readiness's Bestial Wrath cooldown exception", () => {
@@ -187,7 +191,20 @@ describe("WoW 3.3.5 Hunter pet mechanics", () => {
const callResult = useCombatStore.getState().castAbility(callPetId, undefined, 1_000);
expect(callResult, JSON.stringify(callResult)).toMatchObject({ ok: true });
const pet = useCombatStore.getState().summons.find((summon) => summon.kind === "pet");
expect(pet).toBeDefined();
const basePetStats = wow335HunterPetBaseStatsForLevel(80);
expect(pet).toMatchObject({
hunterPet: {
baseStats: { strength: 192, attackPower: 364 },
effectiveStats: {
inheritedStamina: expect.any(Number),
inheritedRangedAttackPower: expect.any(Number),
},
},
});
expect(pet!.maxHealth).toBe(pet!.hunterPet!.effectiveStats.maxHealth);
expect(pet!.attackDamage).toBe(pet!.hunterPet!.effectiveStats.averageAutoAttackDamage);
expect(pet!.maxHealth).toBeGreaterThan(basePetStats.maxHealth);
expect(pet!.attackDamage).toBeGreaterThan(basePetStats.averageAutoAttackDamage);
const result = useCombatStore.getState().castAbility(bestialWrathId, undefined, 3_000);
expect(result, JSON.stringify(result)).toMatchObject({ ok: true });
@@ -209,6 +226,44 @@ describe("WoW 3.3.5 Hunter pet mechanics", () => {
]));
});
it("updates Hunter pet health and AP inheritance when the owner gains stamina and ranged AP", () => {
const callPetId = hunterAbilityId("Call Pet");
expect(useCombatStore.getState().castAbility(callPetId, undefined, 1_000).ok).toBe(true);
const initialPet = useCombatStore.getState().summons.find((summon) => summon.kind === "pet")!;
const initialEffectiveStats = initialPet.hunterPet!.effectiveStats;
useCombatStore.setState((state) => ({
auras: applyAura(state.auras, {
definition: {
id: "test:hunter-owner-pet-inheritance",
name: "Test owner attributes",
disposition: "buff",
durationMs: 10_000,
modifiers: [
{ kind: "stat", stat: "stamina", operation: "flat", value: 100 },
{ kind: "stat", stat: "ranged-attack-power", operation: "flat", value: 1_000 },
],
},
sourceId: PLAYER_AURA_ENTITY_ID,
targetId: PLAYER_AURA_ENTITY_ID,
now: 2_000,
}).auras,
}));
useCombatStore.getState().tick(0.1, 2_000);
const updatedPet = useCombatStore.getState().summons.find((summon) => summon.kind === "pet")!;
expect(updatedPet.hunterPet!.effectiveStats.inheritedStamina
- initialEffectiveStats.inheritedStamina).toBeCloseTo(45);
expect(updatedPet.hunterPet!.effectiveStats.inheritedRangedAttackPower
- initialEffectiveStats.inheritedRangedAttackPower).toBeCloseTo(220);
expect(updatedPet.hunterPet!.effectiveStats.inheritedSpellDamage
- initialEffectiveStats.inheritedSpellDamage).toBeCloseTo(128.7);
expect(updatedPet.maxHealth - initialPet.maxHealth).toBe(450);
expect(updatedPet.attackDamage).toBeGreaterThan(initialPet.attackDamage);
expect(wow335HunterPetBiteDamage(updatedPet.hunterPet!)
- wow335HunterPetBiteDamage(initialPet.hunterPet!)).toBeCloseTo(220 * 0.07 + 128.7 * 0.119658);
});
it("uses The Beast Within's 50% rank-one proc chance", () => {
const callPetId = hunterAbilityId("Call Pet");
const bestialWrathId = unlockHunterTalent("Bestial Wrath");
@@ -324,13 +379,21 @@ describe("WoW 3.3.5 Hunter pet mechanics", () => {
));
expect(aura?.targetId).toBe(pet!.id);
expect(aura?.expiresAt).toBe(33_000);
expect(aura?.definition.maxStacks).toBeUndefined();
expect(aura?.definition.initialStacks).toBeUndefined();
expect(aura?.definition.maxStacks).toBe(3);
expect(aura?.definition.initialStacks).toBe(3);
expect(aura?.definition.modifiers?.some((modifier) => modifier.kind === "damage") ?? false).toBe(false);
useCombatStore.setState((state) => ({
summons: state.summons.map((summon) => summon.id === pet!.id
? { ...summon, hunterPetSpecialReadyAt: 100_000 }
: summon),
}));
useCombatStore.getState().tick(1, 4_000);
expect(useCombatStore.getState().auras.find((entry) => entry.instanceId === aura?.instanceId)?.expiresAt).toBe(33_000);
expect(useCombatStore.getState().auras.find((entry) => entry.instanceId === aura?.instanceId)).toMatchObject({
expiresAt: 33_000,
stacks: 3,
});
});
it("arms Freezing Arrow at its ground point and freezes only an approaching target", () => {