forked from phenom/healer-man
Release Healer Man 0.1.46
This commit is contained in:
1 parent
f82daf1c13
commit
9ff574ac0b
73 files changed
+33486
-174
No files matched your search
@@ -21,12 +21,16 @@ import { dungeonContentIsUsable } from "../content/contentManager";
|
||||
import { useDungeonRunStore } from "./dungeonRunStore";
|
||||
import type { DungeonRunProgress } from "./dungeonRunTypes";
|
||||
import { validBossDifficulty } from "./dungeonDifficulty";
|
||||
import { resetDungeonRouteRuntime } from "./dungeonRouteRuntime";
|
||||
import { useDungeonSimulationStore } from "./dungeonSimulationStore";
|
||||
import { dungeonRouteDefinition } from "./dungeonRoutes";
|
||||
|
||||
export interface DungeonSessionOptions {
|
||||
readonly bossDifficulty?: number;
|
||||
readonly gameMode?: GameMode;
|
||||
readonly spawn?: WorldSpawn;
|
||||
readonly gmTestMode?: boolean;
|
||||
readonly dungeonSimulation?: boolean;
|
||||
readonly bossTest?: BossTestSession | null;
|
||||
readonly gmReviewTarget?: GmReviewTarget | null;
|
||||
/** Used by in-game encounter transitions so character progression and inventory survive. */
|
||||
@@ -50,7 +54,8 @@ export function activateDungeonSession(
|
||||
const definition = dungeonDefinitionById(dungeonId);
|
||||
const testingSource = bossTestingSourceDungeonId(dungeonId);
|
||||
const testing = Boolean(testingSource && options.gmTestMode && options.bossTest?.sourceDungeonId === testingSource);
|
||||
if (!definition || (!testing && !dungeonCanEnter(dungeonId))
|
||||
const dungeonSimulation = Boolean(options.dungeonSimulation && options.gmTestMode && dungeonRouteDefinition(dungeonId));
|
||||
if (!definition || (!testing && !dungeonSimulation && !dungeonCanEnter(dungeonId))
|
||||
|| !dungeonContentIsUsable(testing ? testingSource! : dungeonId)) {
|
||||
return false;
|
||||
}
|
||||
@@ -72,6 +77,8 @@ export function activateDungeonSession(
|
||||
resetDungeonEncounters("dungeon", dungeonId);
|
||||
clearMobRuntimeRegistry();
|
||||
clearPartyRuntimeRegistry();
|
||||
resetDungeonRouteRuntime();
|
||||
useDungeonSimulationStore.getState().leave();
|
||||
clearDungeonRuntimeCaches();
|
||||
resetPartyRuntimeClock();
|
||||
if (options.preserveCharacter) {
|
||||
@@ -97,6 +104,7 @@ export function activateDungeonSession(
|
||||
});
|
||||
usePartyStore.setState({
|
||||
seed: null,
|
||||
spectatorParty: false,
|
||||
members: [],
|
||||
command: "defend",
|
||||
selectedMemberId: null,
|
||||
|
||||
Reference in new issue
Block a user