Release Healer Man 0.1.30
This commit is contained in:
1 parent
544c1bee91
commit
7d7fd567f0
845 files changed
+2040
-87
No files matched your search
@@ -1,6 +1,7 @@
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
import { clearMobRuntimeRegistry, setMobPosition } from "./mobRuntimeRegistry";
|
||||
import { useCombatStore } from "./combatStore";
|
||||
import { subscribeCombatPresentation, type CombatPresentationEvent } from "./combatPresentation";
|
||||
import {
|
||||
normalizeEnemyAttack,
|
||||
type EnemyAttackDefinition,
|
||||
@@ -81,6 +82,25 @@ describe("enemy casting and interrupts", () => {
|
||||
expect(useCombatStore.getState().mobs.caster.activeCast).toBeNull();
|
||||
});
|
||||
|
||||
it("marks an instant source spell release without publishing a synthetic cast event", () => {
|
||||
registerCaster([spell("shadow-bolt", "shadow", 0)]);
|
||||
const events: CombatPresentationEvent[] = [];
|
||||
const unsubscribe = subscribeCombatPresentation((message) => {
|
||||
if (message.kind === "event" && message.event.sourceActorId === "caster") {
|
||||
events.push(message.event);
|
||||
}
|
||||
});
|
||||
|
||||
expect(useCombatStore.getState().advanceMobCombat(1_000)).toBeGreaterThan(0);
|
||||
expect(events.map((event) => event.phase)).toEqual(["release", "impact"]);
|
||||
expect(events[0]).toMatchObject({
|
||||
sourceSpellId: 686,
|
||||
instantCast: true,
|
||||
});
|
||||
|
||||
unsubscribe();
|
||||
});
|
||||
|
||||
it("interrupts the active cast and locks only that spell school", () => {
|
||||
useCombatStore.getState().initializeCharacter({ classId: "rogue", level: 20 });
|
||||
registerCaster([
|
||||
|
||||
Reference in new issue
Block a user