import type { CharacterProfile } from "../app/types"; import { GENERATED_MANASTORM_STAGE_ASSET_PACKAGE_COUNT } from "../game/manastormAssetRegistry"; import { MANASTORM_CATALOG_SUMMARY } from "../game/manastormCatalogSummary"; import { INSTALLED_MANASTORM_RUNTIME_CATALOG } from "../game/manastormInstalledCatalog"; import { manastormCacheChance, manastormModeForCharacterLevel, } from "../game/manastorm"; import { createEmptyManastormProgress, MANASTORM_PARTY_SIZES, manastormModeProgress, manastormPartyProgress, } from "../game/manastormProgress"; import type { CompanionCommand } from "../platform/dualScreenSync"; import { BrandMark, FrontSurface } from "./FrontSurface"; export function CompanionManastormPanel({ selected, send, }: { selected: CharacterProfile | null; send: (command: CompanionCommand) => void; }) { const progress = selected?.manastormProgress ?? createEmptyManastormProgress(); const modeId = manastormModeForCharacterLevel( selected?.level ?? 1, INSTALLED_MANASTORM_RUNTIME_CATALOG, ); const modeProgress = manastormModeProgress(progress, modeId); const modeLabel = modeId === 2 ? "End-game" : "Leveling"; return (
MANASTORM EXPEDITION
{MANASTORM_PARTY_SIZES.map((partySize) => { const record = manastormPartyProgress(progress, partySize, modeId); return (
{partySize} {partySize === 1 ? "Solo" : `${partySize} players`} Highest {record.highestLevel} / checkpoint {record.checkpointLevel}
); })}

Installed Ascension snapshot

{modeLabel} ยท {MANASTORM_CATALOG_SUMMARY.encounters} encounters

Catalog maps
{MANASTORM_CATALOG_SUMMARY.maps}
Streamed maps
{GENERATED_MANASTORM_STAGE_ASSET_PACKAGE_COUNT}
Bedlam Bullions
{progress.currencies.bedlamBullions}
Bonzo Bolts
{progress.currencies.bonzoBolts}
Cache chance
{modeId === 2 ? Math.round(manastormCacheChance( Math.max(1, modeProgress.partySizes[5].highestLevel + 1), modeProgress.cacheMeter, ) * 100) : 100}%

Choose party size, checkpoint, active spells, and role on the upper display.

); }