Release Healer Man 0.1.40

This commit is contained in:
phenom committed 2026-09-13 13:21:27 -04:00
1 parent ed0d2fea3d
commit 197a64117c
215 files changed
+5131 -181

No files matched your search

+8 -1
View File
@@ -20,8 +20,10 @@ import type { DungeonEncounterSnapshot } from "./dungeonEncounterTypes";
import { dungeonContentIsUsable } from "../content/contentManager";
import { useDungeonRunStore } from "./dungeonRunStore";
import type { DungeonRunProgress } from "./dungeonRunTypes";
import { validBossDifficulty } from "./dungeonDifficulty";
export interface DungeonSessionOptions {
readonly bossDifficulty?: number;
readonly gameMode?: GameMode;
readonly spawn?: WorldSpawn;
readonly gmTestMode?: boolean;
@@ -48,12 +50,15 @@ export function activateDungeonSession(
if (!definition || !dungeonCanEnter(dungeonId) || !dungeonContentIsUsable(dungeonId)) {
return false;
}
if ((difficultyId !== undefined && !definition.difficultyVariants.some((variant) => variant.id === difficultyId))
|| (options.bossDifficulty !== undefined && !validBossDifficulty(options.bossDifficulty))) return false;
const previousDefinition = dungeonDefinitionById(useGameStore.getState().activeDungeonId);
const bossDifficulty = options.bossDifficulty ?? options.runProgress?.bossDifficulty ?? 1;
if (previousDefinition) releaseDungeonGltfCache(previousDefinition);
if (!options.preserveCharacter) {
useDungeonRunStore.getState().begin(dungeonId, difficultyId ?? definition.defaultDifficultyId,
options.runProgress, options.legacyResume);
options.runProgress, options.legacyResume, bossDifficulty);
}
activateDungeonEncounterDefinitions(
dungeonId,
@@ -103,6 +108,7 @@ export function activateDungeonSession(
spawn: shelvedDungeonSpawn(dungeonId, options.spawn),
gmTestMode: options.gmTestMode,
gmReviewTarget: options.gmReviewTarget,
bossDifficulty,
});
if (options.encounterSnapshots?.length) {
importDungeonEncounterSnapshots(dungeonId, options.encounterSnapshots, { authoritative: true });
@@ -124,6 +130,7 @@ export function restartActiveDungeonSession(): boolean {
gmTestMode: game.gmTestMode,
gmReviewTarget: game.activeGmReviewTarget,
preserveCharacter: true,
bossDifficulty: game.activeBossDifficulty,
encounterSnapshots,
});
}