Release Healer Man 0.1.5
This commit is contained in:
@@ -14,6 +14,12 @@ import {
|
||||
mergeManastormUnlockedContent,
|
||||
setManastormLoadout,
|
||||
} from "../game/manastormProgress";
|
||||
import {
|
||||
DEFAULT_MANASTORM_ADMIN_CONFIG,
|
||||
UNIFIED_MANASTORM_BOSS_CATALOG,
|
||||
resolveBossAdminEntry,
|
||||
} from "../game/manastormAdminConfig";
|
||||
import { useManastormAdminStore } from "../game/manastormAdminStore";
|
||||
|
||||
installDungeonShellRuntime();
|
||||
installManastormShellRuntime();
|
||||
@@ -37,6 +43,29 @@ const character = {
|
||||
lastPlayedAt: 1,
|
||||
};
|
||||
|
||||
function readyBossForMode(modeId: number) {
|
||||
return UNIFIED_MANASTORM_BOSS_CATALOG.find((entry) => (
|
||||
(entry.baseStage?.unlockLevel ?? 1) <= 1
|
||||
&& (entry.baseStage?.minimumPartySize ?? 1) <= 1
|
||||
&& (entry.baseStage?.maximumPartySize ?? 5) >= 5
|
||||
&& (!entry.baseStage?.modeIds?.length || entry.baseStage.modeIds.includes(modeId))
|
||||
&& resolveBossAdminEntry(entry, {
|
||||
...DEFAULT_MANASTORM_ADMIN_CONFIG,
|
||||
bosses: { [entry.key]: { status: "ready" } },
|
||||
}).runnable
|
||||
));
|
||||
}
|
||||
const readyLevelingBoss = readyBossForMode(0);
|
||||
const readyEndgameBoss = readyBossForMode(2);
|
||||
if (!readyLevelingBoss || !readyEndgameBoss) throw new Error("Shell tests require runnable Manastorm bosses for both modes.");
|
||||
const readyTestConfig = {
|
||||
...DEFAULT_MANASTORM_ADMIN_CONFIG,
|
||||
bosses: {
|
||||
[readyLevelingBoss.key]: { status: "ready" as const },
|
||||
[readyEndgameBoss.key]: { status: "ready" as const },
|
||||
},
|
||||
};
|
||||
|
||||
function prepareSelectedCharacter(): void {
|
||||
useShellStore.setState({
|
||||
phase: "characters",
|
||||
@@ -61,6 +90,7 @@ describe("shell store", () => {
|
||||
});
|
||||
useGameStore.getState().resetAtEntrance();
|
||||
useManastormStore.getState().resetRun();
|
||||
useManastormAdminStore.setState({ config: readyTestConfig, draft: readyTestConfig, dirty: false });
|
||||
});
|
||||
|
||||
it("does not open the character hub or a dungeon without a selected character", () => {
|
||||
|
||||
Reference in New Issue
Block a user