Release Healer Man 0.1.41
This commit is contained in:
1 parent
197a64117c
commit
c3f8a69b51
42 files changed
+886
-127
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { beforeEach, describe, expect, it } from "vitest";
|
||||
import { defaultActionBarForCharacter } from "./abilityCatalog";
|
||||
import { defaultActionBarForCharacter, resourceProfileForClass } from "./abilityCatalog";
|
||||
import { PLAYER_AGGRO_ID } from "./aggro";
|
||||
import { clearMobRuntimeRegistry, setMobPosition } from "./mobRuntimeRegistry";
|
||||
import {
|
||||
clearPartyRuntimeRegistry,
|
||||
@@ -7,6 +8,7 @@ import {
|
||||
} from "./partyRuntimeRegistry";
|
||||
import { usePartyStore } from "./partyStore";
|
||||
import { useCombatStore } from "./combatStore";
|
||||
import { companionActorFromMember, companionActorWithMemberRuntime } from "./combatActorAuthority";
|
||||
|
||||
describe("RuneWaker combat runtime", () => {
|
||||
beforeEach(() => {
|
||||
@@ -68,6 +70,31 @@ describe("RuneWaker combat runtime", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it.each(["rom-warrior", "rom-scout", "rom-rogue"] as const)(
|
||||
"preserves %s secondary mana in player and companion resource snapshots",
|
||||
(classId) => {
|
||||
useCombatStore.getState().initializeCharacter({
|
||||
classId, secondaryClassId: "rom-warden", raceId: "rom-elf", level: 80,
|
||||
});
|
||||
const state = useCombatStore.getState();
|
||||
expect(state.maxResourcePools.mana).toBe(100);
|
||||
expect(state.resourcePools.mana).toBe(100);
|
||||
state.synchronizeActors();
|
||||
expect(useCombatStore.getState().actors[PLAYER_AGGRO_ID].resources.mana).toMatchObject({ current: 100, maximum: 100 });
|
||||
|
||||
usePartyStore.getState().initializeParty("rom-secondary-mana", 80, state.health);
|
||||
const member = {
|
||||
...usePartyStore.getState().members[0]!, classId, raceId: state.raceId,
|
||||
resourceType: resourceProfileForClass(classId).type, maxResource: state.maxResource,
|
||||
resourcePools: state.resourcePools, gearStats: state.gearStats,
|
||||
};
|
||||
const actor = companionActorFromMember(member);
|
||||
expect(actor.resources.mana).toMatchObject({ current: 100, maximum: 100 });
|
||||
expect(companionActorWithMemberRuntime(actor, member).resources.mana)
|
||||
.toMatchObject({ current: 100, maximum: 100 });
|
||||
},
|
||||
);
|
||||
|
||||
it.each([
|
||||
["rom-priest", "rom-human", "rom-priest-general-1"],
|
||||
["rom-druid", "rom-elf", "rom-druid-primary-0"],
|
||||
@@ -262,10 +289,13 @@ describe("RuneWaker combat runtime", () => {
|
||||
const revival = useCombatStore.getState().auras.find((aura) => aura.definition.utilityTags?.includes("rom-revival-charge"));
|
||||
expect(revival?.stacks).toBe(3);
|
||||
const injuredHealth = useCombatStore.getState().health;
|
||||
const manaBefore = useCombatStore.getState().resourcePools.mana!;
|
||||
|
||||
expect(useCombatStore.getState().castAbility("rom-rogue-rom-warden-elite-60", undefined, Date.now())).toMatchObject({ ok: true });
|
||||
|
||||
expect(useCombatStore.getState().health).toBeGreaterThan(injuredHealth);
|
||||
expect(useCombatStore.getState().resourcePools.mana).toBe(manaBefore - 15);
|
||||
expect(useCombatStore.getState().resourcePools.energy).toBe(100);
|
||||
expect(useCombatStore.getState().auras.some((aura) => aura.definition.utilityTags?.includes("rom-revival-charge"))).toBe(false);
|
||||
});
|
||||
});
|
||||
Reference in new issue
Block a user