Release Healer Man 0.1.5
This commit is contained in:
1 parent
f4c9cf356c
commit
55cfd43d66
62 files changed
+3030
-153
No files matched your search
@@ -7,6 +7,8 @@ import { DualDisplayFrame } from "../components/DualDisplayFrame";
|
||||
import { MANASTORM_CATALOG_SUMMARY } from "../game/manastormCatalogSummary";
|
||||
import { GENERATED_MANASTORM_STAGE_ASSET_PACKAGE_COUNT } from "../game/manastormAssetRegistry";
|
||||
import { INSTALLED_MANASTORM_RUNTIME_CATALOG } from "../game/manastormInstalledCatalog";
|
||||
import { effectiveManastormCatalog } from "../game/manastormAdminConfig";
|
||||
import { useManastormAdminStore } from "../game/manastormAdminStore";
|
||||
import { manastormActiveSpellLoadoutModel } from "../game/manastormSpellLoadout";
|
||||
import {
|
||||
drawManastormStage,
|
||||
@@ -47,15 +49,26 @@ export function ManastormSelectScreen() {
|
||||
const saveSelectedManastormLoadout = useShellStore((state) => state.saveSelectedManastormLoadout);
|
||||
const returnToMainMenu = useShellStore((state) => state.returnToMainMenu);
|
||||
const notice = useShellStore((state) => state.notice);
|
||||
const adminConfig = useManastormAdminStore((state) => state.config);
|
||||
const character = activeCharacter ?? rosterCharacter;
|
||||
const availableRoles = character ? partyRolesForClass(character.classId) : [];
|
||||
const [partySize, setPartySize] = useState<ManastormPartySize>(5);
|
||||
const [resume, setResume] = useState(true);
|
||||
const progress = character?.manastormProgress ?? createEmptyManastormProgress();
|
||||
const effectiveCatalog = useMemo(
|
||||
() => effectiveManastormCatalog(adminConfig, INSTALLED_MANASTORM_RUNTIME_CATALOG),
|
||||
[adminConfig],
|
||||
);
|
||||
const modeId = manastormModeForCharacterLevel(
|
||||
character?.level ?? 1,
|
||||
INSTALLED_MANASTORM_RUNTIME_CATALOG,
|
||||
effectiveCatalog,
|
||||
);
|
||||
const modeEnabled = adminConfig.global.enabled
|
||||
&& (modeId === 2 ? adminConfig.global.endgameEnabled : adminConfig.global.levelingEnabled);
|
||||
const hasReadyBosses = Boolean(effectiveCatalog.stages?.some((stage) => (
|
||||
!stage.modeIds?.length || stage.modeIds.includes(modeId)
|
||||
)));
|
||||
const canEnter = modeEnabled && hasReadyBosses;
|
||||
const modeProgress = manastormModeProgress(progress, modeId);
|
||||
const modeLabel = modeId === 2 ? "End-game" : "Leveling";
|
||||
const partyProgress = manastormPartyProgress(progress, partySize, modeId);
|
||||
@@ -72,7 +85,7 @@ export function ManastormSelectScreen() {
|
||||
[],
|
||||
null,
|
||||
() => 0.5,
|
||||
INSTALLED_MANASTORM_RUNTIME_CATALOG,
|
||||
effectiveCatalog,
|
||||
modeId,
|
||||
Math.max(startingLevel, partyProgress.highestLevel + 1),
|
||||
);
|
||||
@@ -80,13 +93,13 @@ export function ManastormSelectScreen() {
|
||||
preview.encounter,
|
||||
startingLevel,
|
||||
partySize,
|
||||
INSTALLED_MANASTORM_RUNTIME_CATALOG,
|
||||
effectiveCatalog,
|
||||
modeId,
|
||||
);
|
||||
} catch {
|
||||
return null;
|
||||
}
|
||||
}, [modeId, partyProgress.highestLevel, partySize, startingLevel]);
|
||||
}, [effectiveCatalog, modeId, partyProgress.highestLevel, partySize, startingLevel]);
|
||||
const spellLoadoutModel = useMemo(() => character
|
||||
? manastormActiveSpellLoadoutModel(character.classId, character.level, character.talentRanks)
|
||||
: null, [character?.classId, character?.level, character?.talentRanks]);
|
||||
@@ -140,11 +153,13 @@ export function ManastormSelectScreen() {
|
||||
})) ?? []),
|
||||
...availableRoles.map((role) => ({
|
||||
id: `manastorm-role-${role}`,
|
||||
run: () => enterManastorm(role, partySize, startingLevel),
|
||||
run: () => canEnter && enterManastorm(role, partySize, startingLevel),
|
||||
enabled: canEnter,
|
||||
})),
|
||||
{ id: "manastorm-back", run: returnToMainMenu },
|
||||
], [
|
||||
availableRoles,
|
||||
canEnter,
|
||||
checkpoint,
|
||||
enterManastorm,
|
||||
partySize,
|
||||
@@ -187,6 +202,13 @@ export function ManastormSelectScreen() {
|
||||
claim the reward, and cross the portal. Special encounters every five levels
|
||||
unlock the next checkpoint.
|
||||
</p>
|
||||
{!canEnter ? (
|
||||
<p className="front-notice" role="status">
|
||||
{!modeEnabled
|
||||
? `${modeLabel} Manastorms are currently disabled by a Game Master.`
|
||||
: "No bosses are currently marked Ready for this Manastorm mode."}
|
||||
</p>
|
||||
) : null}
|
||||
<dl>
|
||||
<div><dt>Catalog maps</dt><dd>{MANASTORM_CATALOG_SUMMARY.maps}</dd></div>
|
||||
<div><dt>Streamed maps</dt><dd>{GENERATED_MANASTORM_STAGE_ASSET_PACKAGE_COUNT}</dd></div>
|
||||
@@ -246,6 +268,7 @@ export function ManastormSelectScreen() {
|
||||
select={controller.select}
|
||||
className={`manastorm-entry-option ${!resume || checkpoint === 1 ? "is-active" : ""}`}
|
||||
type="button"
|
||||
disabled={!canEnter}
|
||||
onClick={() => setResume(false)}
|
||||
>
|
||||
Start at 1
|
||||
@@ -319,9 +342,10 @@ export function ManastormSelectScreen() {
|
||||
select={controller.select}
|
||||
className={`dungeon-role-option dungeon-role-option--${role}`}
|
||||
type="button"
|
||||
disabled={!canEnter}
|
||||
onFocus={() => preloadRole(role)}
|
||||
onPointerEnter={() => preloadRole(role)}
|
||||
onClick={() => enterManastorm(role, partySize, startingLevel)}
|
||||
onClick={() => canEnter && enterManastorm(role, partySize, startingLevel)}
|
||||
>
|
||||
<b aria-hidden="true">{ROLE_DETAILS[role].sigil}</b>
|
||||
<span>
|
||||
|
||||
Reference in new issue
Block a user