Update Healer Man server
This commit is contained in:
1 parent
ab1434a3b8
commit
e284f4fc76
60 files changed
+2704
-118
No files matched your search
@@ -1879,12 +1879,27 @@ describe("combat store", () => {
|
||||
resourcePools: { ...state.resourcePools, mana: Math.round(state.maxResource / 2) },
|
||||
}));
|
||||
expect(useCombatStore.getState().castAbility("wow335-priest-shadowfiend", [0, 0, 0], 1_000).ok).toBe(true);
|
||||
expect(useCombatStore.getState().summons.filter((summon) => summon.sourceAbilityId === "wow335-priest-shadowfiend"))
|
||||
.toHaveLength(1);
|
||||
const fiends = useCombatStore.getState().summons.filter((summon) => (
|
||||
summon.sourceAbilityId === "wow335-priest-shadowfiend"
|
||||
));
|
||||
expect(fiends).toHaveLength(1);
|
||||
expect(fiends[0]?.creatureId).toBe(19668);
|
||||
expect(fiends[0]?.pulseIntervalMs).toBe(1_500);
|
||||
expect(useCombatStore.getState().combatEvents.some((event) => event.kind === "resource"
|
||||
&& event.sourceActorId === fiends[0]?.id)).toBe(false);
|
||||
const manaBeforeAttack = useCombatStore.getState().resource;
|
||||
useCombatStore.getState().tick(1, 2_000);
|
||||
expect(useCombatStore.getState().mobs["fiend-target"].health).toBeLessThan(100_000);
|
||||
expect(useCombatStore.getState().resource).toBeGreaterThanOrEqual(manaBeforeAttack + Math.floor(useCombatStore.getState().maxResource * 0.01));
|
||||
expect(useCombatStore.getState().combatEvents).toEqual(expect.arrayContaining([
|
||||
expect.objectContaining({ kind: "damage", sourceActorId: fiends[0]?.id,
|
||||
targetActorId: "fiend-target", abilityId: "wow335-priest-shadowfiend", school: "shadow" }),
|
||||
expect.objectContaining({ kind: "resource", sourceActorId: fiends[0]?.id,
|
||||
targetActorId: PLAYER_AURA_ENTITY_ID, abilityId: "wow335-priest-shadowfiend",
|
||||
effectiveAmount: useCombatStore.getState().maxResource * 0.05 }),
|
||||
]));
|
||||
expect(useCombatStore.getState().resource).toBeGreaterThanOrEqual(
|
||||
manaBeforeAttack + Math.floor(useCombatStore.getState().maxResource * 0.05),
|
||||
);
|
||||
});
|
||||
|
||||
it("casts Kill Shot only below 20 percent health and resolves one direct hit", () => {
|
||||
@@ -1946,6 +1961,10 @@ describe("combat store", () => {
|
||||
registerTarget("penance-target", [8, 0, 0], 100_000, 0);
|
||||
useCombatStore.getState().damagePlayer(500);
|
||||
const casterHealth = useCombatStore.getState().health;
|
||||
const visuals: CombatPresentationEvent[] = [];
|
||||
const stopVisuals = subscribeCombatPresentation((message) => {
|
||||
if (message.kind === "event" && message.event.abilityId === "wow335-priest-penance") visuals.push(message.event);
|
||||
});
|
||||
expect(useCombatStore.getState().castAbility("wow335-priest-penance", [0, 0, 0], 1_000).ok).toBe(true);
|
||||
expect(useCombatStore.getState().activeCast).toMatchObject({ mode: "channel", totalTicks: 3,
|
||||
completesAt: 3_000, nextTickAt: 1_000 });
|
||||
@@ -1964,6 +1983,12 @@ describe("combat store", () => {
|
||||
const after = useCombatStore.getState().mobs["penance-target"].health;
|
||||
useCombatStore.getState().tick(0, 4_000);
|
||||
expect(useCombatStore.getState().mobs["penance-target"].health).toBe(after);
|
||||
stopVisuals();
|
||||
expect(visuals.map((event) => [event.phase, event.sourceSpellId])).toEqual([
|
||||
["cast-start", 47540],
|
||||
...Array.from({ length: 3 }, () => [["tick", 47666], ["impact", 47666]]).flat(),
|
||||
["release", 47540],
|
||||
]);
|
||||
});
|
||||
|
||||
it("channels Penance healing and stops future pulses when interrupted", () => {
|
||||
@@ -1972,6 +1997,10 @@ describe("combat store", () => {
|
||||
usePartyStore.getState().selectSelf();
|
||||
useCombatStore.getState().damagePlayer(2_000);
|
||||
const before = useCombatStore.getState().health;
|
||||
const visuals: CombatPresentationEvent[] = [];
|
||||
const stopVisuals = subscribeCombatPresentation((message) => {
|
||||
if (message.kind === "event" && message.event.abilityId === "wow335-priest-penance") visuals.push(message.event);
|
||||
});
|
||||
expect(useCombatStore.getState().castAbility("wow335-priest-penance", [0, 0, 0], 1_000).ok).toBe(true);
|
||||
useCombatStore.getState().tick(0, 1_000);
|
||||
const first = useCombatStore.getState().health;
|
||||
@@ -1983,6 +2012,11 @@ describe("combat store", () => {
|
||||
useCombatStore.getState().tick(0, 3_000);
|
||||
expect(useCombatStore.getState().health).toBe(interruptedAt);
|
||||
expect(useCombatStore.getState().activeCast).toBeNull();
|
||||
stopVisuals();
|
||||
expect(visuals.map((event) => [event.phase, event.sourceSpellId])).toEqual([
|
||||
["cast-start", 47540], ["tick", 47750], ["impact", 47750],
|
||||
["tick", 47750], ["impact", 47750], ["cast-cancel", 47540],
|
||||
]);
|
||||
});
|
||||
|
||||
it("channels ground-area Volley over its selected point without a target or post-channel damage", () => {
|
||||
|
||||
Reference in new issue
Block a user