fix: integer formatting, exploration durations, runestone preview, and gold achievement tracking
Security Scan and Upload / Security & DefectDojo Upload (pull_request) Successful in 1m8s
CI / Lint, Build & Test (pull_request) Failing after 1m12s

Closes #199
Closes #203
Closes #204
Closes #219
Closes #220
Closes #231
Closes #232
This commit is contained in:
2026-04-06 12:42:40 -07:00
committed by Naomi Carrigan
parent e53a25290b
commit 1c10df88fb
12 changed files with 170 additions and 105 deletions
+8 -2
View File
@@ -15,6 +15,7 @@ import { updateChallengeProgress } from "../services/dailyChallenges.js";
import { logger } from "../services/logger.js";
import {
buildPostPrestigeState,
calculatePrestigeThreshold,
computeRunestoneMultipliers,
isEligibleForPrestige,
} from "../services/prestige.js";
@@ -40,10 +41,15 @@ prestigeRouter.post("/", async(context) => {
const state = record.state as unknown as GameState;
if (!isEligibleForPrestige(state)) {
const thresholdMultiplier
= state.transcendence?.echoPrestigeThresholdMultiplier ?? 1;
const required = calculatePrestigeThreshold(
state.prestige.count,
thresholdMultiplier,
);
return context.json(
{
// eslint-disable-next-line stylistic/max-len -- Error message cannot be shortened
error: "Not eligible for prestige — collect 1,000,000 total gold first",
error: `Not eligible for prestige — collect ${required.toLocaleString()} total gold first`,
},
400,
);
+3 -2
View File
@@ -62,6 +62,7 @@ const BattleModal = ({
enableNotifications,
enableSounds,
flushBossLoreToasts,
formatInteger,
formatNumber,
} = useGame();
@@ -241,14 +242,14 @@ const BattleModal = ({
{result.rewards.crystals > 0
&& <span>
{"💎 "}
{formatNumber(result.rewards.crystals)}
{formatInteger(result.rewards.crystals)}
{" crystals"}
</span>
}
{result.rewards.bountyRunestones > 0
&& <span className="battle-bounty">
{"🔮 "}
{formatNumber(result.rewards.bountyRunestones)}
{formatInteger(result.rewards.bountyRunestones)}
{" runestones (first kill!)"}
</span>
}
+6 -1
View File
@@ -23,6 +23,7 @@ interface BossCardProperties {
readonly onChallenge: (bossId: string)=> void;
readonly isChallenging: boolean;
readonly unlockHint: string | undefined;
readonly formatInteger: (n: number)=> string;
readonly formatNumber: (n: number)=> string;
}
@@ -34,6 +35,7 @@ interface BossCardProperties {
* @param props.onChallenge - Callback to challenge this boss.
* @param props.isChallenging - Whether this boss is currently being challenged.
* @param props.unlockHint - Optional hint for how to unlock this boss.
* @param props.formatInteger - The integer formatting utility function.
* @param props.formatNumber - The number formatting utility function.
* @returns The JSX element.
*/
@@ -43,6 +45,7 @@ const BossCard = ({
onChallenge,
isChallenging,
unlockHint,
formatInteger,
formatNumber,
}: BossCardProperties): JSX.Element => {
const scaled = boss.currentHp * 100;
@@ -117,7 +120,7 @@ const BossCard = ({
{boss.crystalReward > 0
&& <span>
{"💎 "}
{formatNumber(boss.crystalReward)}
{formatInteger(boss.crystalReward)}
</span>
}
{boss.equipmentRewards.length > 0
@@ -166,6 +169,7 @@ const BossPanel = (): JSX.Element => {
const {
state,
challengeBoss,
formatInteger,
formatNumber,
toggleAutoBoss,
autoBossLastResult,
@@ -395,6 +399,7 @@ const BossPanel = (): JSX.Element => {
return (
<BossCard
boss={boss}
formatInteger={formatInteger}
formatNumber={formatNumber}
isChallenging={challengingBossId === bossId}
key={bossId}
+11 -10
View File
@@ -41,7 +41,7 @@ const calculateThreshold = (prestigeCount: number): number => {
* @returns The compounding multiplier applied to all income sources.
*/
const calculateProductionMultiplier = (prestigeCount: number): number => {
return Math.pow(1.15, prestigeCount);
return Math.pow(1.3, prestigeCount);
};
const categoryOrder: Array<PrestigeUpgradeCategory> = [
@@ -61,6 +61,7 @@ const PrestigePanel = (): JSX.Element => {
const {
state,
reloadSilent,
formatInteger,
formatNumber,
buyPrestigeUpgrade,
enableNotifications,
@@ -187,7 +188,7 @@ const PrestigePanel = (): JSX.Element => {
type="button"
>
{"🔮 Runestone Shop ("}
{formatNumber(prestigeData.runestones)}
{formatInteger(prestigeData.runestones)}
{" stones)"}
</button>
</div>
@@ -198,7 +199,7 @@ const PrestigePanel = (): JSX.Element => {
{"Prestige resets your progress but grants "}
<strong>{"Runestones"}</strong>
{"— permanent currency used for powerful upgrades."}
{" Each prestige multiplies your global production by ×1.15"}
{" Each prestige multiplies your global production by ×1.3"}
{" (compounding each run)."}
</p>
@@ -231,14 +232,14 @@ const PrestigePanel = (): JSX.Element => {
</p>
<p>
{"Runestones: "}
<strong>{formatNumber(prestigeData.runestones)}</strong>
<strong>{formatInteger(prestigeData.runestones)}</strong>
</p>
{isEligible
? <p className="runestone-preview">
{"Runestones on prestige: "}
<strong>
{"+"}
{formatNumber(runestonePreview)}
{formatInteger(runestonePreview)}
</strong>
</p>
: null}
@@ -268,7 +269,7 @@ const PrestigePanel = (): JSX.Element => {
>
{isPending
? "Ascending..."
: `✨ Ascend (+${formatNumber(runestonePreview)} Runestones)`}
: `✨ Ascend (+${formatInteger(runestonePreview)} Runestones)`}
</button>
{prestigeError === null
? null
@@ -280,12 +281,12 @@ const PrestigePanel = (): JSX.Element => {
{"Ascended to Prestige "}
{result.count}
{"! Earned "}
{formatNumber(result.runestones)}
{formatInteger(result.runestones)}
{" Runestones."}
{result.milestoneRunestones > 0
&& <>
{" 🎉 Milestone bonus: +"}
{formatNumber(result.milestoneRunestones)}
{formatInteger(result.milestoneRunestones)}
{" Runestones!"}
</>
}
@@ -306,7 +307,7 @@ const PrestigePanel = (): JSX.Element => {
<p className="shop-balance">
{"Balance: "}
<strong>
{formatNumber(prestigeData.runestones)}
{formatInteger(prestigeData.runestones)}
{" Runestones"}
</strong>
</p>
@@ -358,7 +359,7 @@ const PrestigePanel = (): JSX.Element => {
<p className="upgrade-cost">
{purchased
? "✅ Purchased"
: `🔮 ${formatNumber(upgrade.runestonesCost)} Runestones`}
: `🔮 ${formatInteger(upgrade.runestonesCost)} Runestones`}
</p>
</div>
{isAutoAdventurerToggle
@@ -121,6 +121,7 @@ const QuestCard = ({
{reward.type === "essence"
&& `${formatNumber(reward.amount ?? 0)}`}
{reward.type === "crystals"
&& (reward.amount ?? 0) > 0
&& `💎 ${formatNumber(reward.amount ?? 0)}`}
{reward.type === "upgrade" && "🔓 Upgrade"}
{reward.type === "adventurer" && "👥 New Adventurer"}
@@ -59,7 +59,7 @@ const StatCard = ({
* @returns The JSX element.
*/
const StatisticsPanel = (): JSX.Element => {
const { state, formatNumber } = useGame();
const { state, formatInteger, formatNumber } = useGame();
if (state === null) {
return (
@@ -152,13 +152,13 @@ const StatisticsPanel = (): JSX.Element => {
<StatCard
icon="💎"
label="Crystals"
value={formatNumber(resources.crystals)}
value={formatInteger(resources.crystals)}
/>
<StatCard
icon="🔮"
label="Runestones"
sub="permanent currency"
value={formatNumber(prestige.runestones)}
value={formatInteger(prestige.runestones)}
/>
</div>
@@ -50,7 +50,7 @@ const categoryOrder: Array<TranscendenceUpgradeCategory> = [
* @returns The JSX element.
*/
const TranscendencePanel = (): JSX.Element => {
const { state, formatNumber, transcend, buyEchoUpgrade } = useGame();
const { state, formatInteger, transcend, buyEchoUpgrade } = useGame();
const [ isPending, setIsPending ] = useState(false);
const [ result, setResult ] = useState<{
echoes: number;
@@ -152,7 +152,7 @@ const TranscendencePanel = (): JSX.Element => {
type="button"
>
{"✨ Echo Shop ("}
{formatNumber(currentEchoes)}
{formatInteger(currentEchoes)}
{" echoes)"}
</button>
</div>
@@ -184,7 +184,7 @@ const TranscendencePanel = (): JSX.Element => {
}
<p>
{"Current Echoes: "}
<strong>{formatNumber(currentEchoes)}</strong>
<strong>{formatInteger(currentEchoes)}</strong>
</p>
<p>
{"Current prestige count: "}
@@ -195,7 +195,7 @@ const TranscendencePanel = (): JSX.Element => {
{"Echoes on transcendence: "}
<strong>
{"+"}
{formatNumber(echoPreview)}
{formatInteger(echoPreview)}
</strong>
{echoMetaMultiplier > 1
&& <span className="echo-meta-bonus">
@@ -238,7 +238,7 @@ const TranscendencePanel = (): JSX.Element => {
>
{isPending
? "Transcending..."
: `🌌 Transcend (+${formatNumber(echoPreview)} Echoes)`}
: `🌌 Transcend (+${formatInteger(echoPreview)} Echoes)`}
</button>
{error === null
? null
@@ -248,7 +248,7 @@ const TranscendencePanel = (): JSX.Element => {
: <p className="success">
{"Transcended! Earned "}
<strong>
{formatNumber(result.echoes)}
{formatInteger(result.echoes)}
{" Echoes"}
</strong>
{". This is Transcendence "}
@@ -266,7 +266,7 @@ const TranscendencePanel = (): JSX.Element => {
<p className="shop-balance">
{"Balance: "}
<strong>
{formatNumber(currentEchoes)}
{formatInteger(currentEchoes)}
{" Echoes"}
</strong>
</p>
@@ -314,7 +314,7 @@ const TranscendencePanel = (): JSX.Element => {
<p className="upgrade-cost">
{purchased
? "✅ Purchased"
: `${formatNumber(upgrade.cost)} Echoes`}
: `${formatInteger(upgrade.cost)} Echoes`}
</p>
</div>
{purchased
+4 -4
View File
@@ -82,7 +82,7 @@ const ResourceBar = ({
isSyncing,
onForceSync,
}: ResourceBarProperties): JSX.Element => {
const { formatNumber, syncError, state } = useGame();
const { formatInteger, formatNumber, syncError, state } = useGame();
const [ isProfileOpen, setIsProfileOpen ] = useState(false);
const [ isResourcesOpen, setIsResourcesOpen ] = useState(false);
@@ -218,7 +218,7 @@ const ResourceBar = ({
: ""}`}>
<span className="resource-icon">{"💎"}</span>
<span className="resource-value">
{formatNumber(crystals)}
{formatInteger(crystals)}
</span>
<span className="resource-label">{"Crystals"}</span>
{crystalsFull
@@ -233,14 +233,14 @@ const ResourceBar = ({
<div className="resource">
<span className="resource-icon">{"🔮"}</span>
<span className="resource-value">
{formatNumber(runestones)}
{formatInteger(runestones)}
</span>
<span className="resource-label">{"Runestones"}</span>
</div>
<div className="resource">
<span className="resource-icon">{"⭐"}</span>
<span className="resource-value">
{`+${formatNumber(projectedRunestones)}`}
{`+${formatInteger(projectedRunestones)}`}
</span>
<span className="resource-label">{"On Prestige"}</span>
</div>
+18 -1
View File
@@ -62,7 +62,10 @@ import {
computePartyCombatPower,
} from "../engine/tick.js";
import { updateChallengeProgress } from "../utils/dailyChallenges.js";
import { formatNumber as formatNumberUtil } from "../utils/format.js";
import {
formatInteger as formatIntegerUtil,
formatNumber as formatNumberUtil,
} from "../utils/format.js";
import { logError } from "../utils/logError.js";
import { sendNotification } from "../utils/notification.js";
import { playSound } from "../utils/sound.js";
@@ -461,6 +464,11 @@ interface GameContextValue {
*/
formatNumber: (value: number)=> string;
/**
* Format a whole-number value without decimal places.
*/
formatInteger: (value: number)=> string;
/**
* Buy a prestige upgrade from the runestone shop.
*/
@@ -2359,6 +2367,13 @@ export const GameProvider = ({
[ numberFormat ],
);
const formatInteger = useCallback(
(value: number) => {
return formatIntegerUtil(value);
},
[],
);
const contextValue = useMemo<GameContextValue>(() => {
return {
apotheosis,
@@ -2397,6 +2412,7 @@ export const GameProvider = ({
flushBossLoreToasts,
forceSync,
forceUnlocks,
formatInteger,
formatNumber,
handleClick,
inGuild,
@@ -2443,6 +2459,7 @@ export const GameProvider = ({
bossError,
completedQuestToasts,
failedQuestToasts,
formatInteger,
formatNumber,
buyAdventurer,
buyEchoUpgrade,
+72 -72
View File
@@ -20,7 +20,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"Rolling fields of wildflowers at the edge of the guild's territory. Travellers pass through often, and occasionally leave things behind.",
durationSeconds: 3600,
durationSeconds: 300,
id: "verdant_meadow",
name: "The Verdant Meadow",
zoneId: "verdant_vale",
@@ -28,7 +28,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"Ancient trees whose canopy blocks out most of the light. The forest whispers things your scouts swear they understand, just not when they try to remember later.",
durationSeconds: 7200,
durationSeconds: 600,
id: "whispering_forest",
name: "The Whispering Forest",
zoneId: "verdant_vale",
@@ -36,7 +36,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A circle of trees so old they predate the kingdom. Druids once held ceremonies here. The trees remember, and their bark holds echoes of old power.",
durationSeconds: 10_800,
durationSeconds: 900,
id: "ancient_grove",
name: "The Ancient Grove",
zoneId: "verdant_vale",
@@ -44,7 +44,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A clearing the locals will not enter after dark. Something about the bark of the trees here is different. Your scouts feel watched the entire time.",
durationSeconds: 14_400,
durationSeconds: 1200,
id: "forbidden_glen",
name: "The Forbidden Glen",
zoneId: "verdant_vale",
@@ -54,7 +54,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"What was once a military garrison, now half-buried in rubble and wild growth. The previous occupants left in a hurry and did not take everything.",
durationSeconds: 7200,
durationSeconds: 600,
id: "collapsed_outpost",
name: "The Collapsed Outpost",
zoneId: "shattered_ruins",
@@ -62,7 +62,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The water here reflects things that aren't there. Something is at the bottom that doesn't want to be found, which means your scouts want very much to find it.",
durationSeconds: 14_400,
durationSeconds: 1200,
id: "cursed_lake",
name: "The Cursed Lake",
zoneId: "shattered_ruins",
@@ -70,7 +70,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"Buried walls covered in script no living scholar can read. The knowledge is lost but the enchantments remain, faded but still murmuring in the stone.",
durationSeconds: 21_600,
durationSeconds: 1800,
id: "runic_archive",
name: "The Runic Archive",
zoneId: "shattered_ruins",
@@ -78,7 +78,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The chamber the elder dragon called his own before your guild deposed him. He won't be back soon. Probably. The heat of his presence lingers in the stone.",
durationSeconds: 28_800,
durationSeconds: 2400,
id: "dragon_throne",
name: "The Dragon's Throne",
zoneId: "shattered_ruins",
@@ -88,7 +88,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A cave carved by a glacier over thousands of years. The ice walls are so clear you can see things preserved within them from before the kingdom existed.",
durationSeconds: 10_800,
durationSeconds: 900,
id: "glacial_cave",
name: "The Glacial Cave",
zoneId: "frozen_peaks",
@@ -96,7 +96,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"Flat, white, and vast. The tundra looks featureless until you know what to look for. Under the ice, there are things that were buried with intent.",
durationSeconds: 21_600,
durationSeconds: 1800,
id: "frozen_tundra",
name: "The Frozen Tundra",
zoneId: "frozen_peaks",
@@ -104,7 +104,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A tear in reality that appeared after the Void Titan's defeat, miles above the world. Something leaks through it constantly. Mostly harmless. Mostly.",
durationSeconds: 32_400,
durationSeconds: 2700,
id: "void_rift",
name: "The Void Rift",
zoneId: "frozen_peaks",
@@ -112,7 +112,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"At the absolute peak, a shrine nobody remembers building. The prayers still tied to its poles are in a language no scholar has identified. Offerings remain.",
durationSeconds: 43_200,
durationSeconds: 3600,
id: "summit_shrine",
name: "The Summit Shrine",
zoneId: "frozen_peaks",
@@ -122,7 +122,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A depression in the marsh where the fog never fully lifts. Sound behaves differently here. Your scouts can hear things they probably should not.",
durationSeconds: 18_000,
durationSeconds: 1500,
id: "fog_hollow",
name: "The Fog Hollow",
zoneId: "shadow_marshes",
@@ -130,7 +130,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A cave system beneath the marsh floor. The water drips through the ceiling in patterns that look deliberate. Nothing down here needs eyes to find you.",
durationSeconds: 36_000,
durationSeconds: 3000,
id: "dark_grotto",
name: "The Dark Grotto",
zoneId: "shadow_marshes",
@@ -138,7 +138,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A burial mound. Something was interred here that should not have been — or perhaps something interred itself, which is a different and more troubling problem.",
durationSeconds: 54_000,
durationSeconds: 5400,
id: "cursed_barrow",
name: "The Cursed Barrow",
zoneId: "shadow_marshes",
@@ -146,7 +146,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The bottommost point of the Shadow Marshes, where the water is perfectly still and perfectly black. Your scouts can see the bottom. The bottom is very far down.",
durationSeconds: 72_000,
durationSeconds: 5400,
id: "marsh_depths",
name: "The Marsh Depths",
zoneId: "shadow_marshes",
@@ -156,7 +156,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A natural tunnel cut by ancient lava flows. Still warm. The walls glow faintly orange in some sections, which is either residual heat or something else.",
durationSeconds: 25_200,
durationSeconds: 2100,
id: "magma_tunnel",
name: "The Magma Tunnel",
zoneId: "volcanic_depths",
@@ -164,7 +164,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"An ancient workshop space, built into the volcano by whoever the fire elementals served before they served no one. The fires here never went out.",
durationSeconds: 50_400,
durationSeconds: 3600,
id: "forge_chamber",
name: "The Forge Chamber",
zoneId: "volcanic_depths",
@@ -172,7 +172,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A place of worship for entities that have never met a god but found the general idea appealing and decided to be worshipped instead. The fire elementals receive visitors here.",
durationSeconds: 75_600,
durationSeconds: 7200,
id: "fire_temple",
name: "The Fire Temple",
zoneId: "volcanic_depths",
@@ -180,7 +180,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The lowest point your guild can reach — close enough to the planet's core that the rocks bleed metal and the air shimmers with heat haze that never quite resolves into anything.",
durationSeconds: 100_800,
durationSeconds: 9000,
id: "core_descent",
name: "The Core Descent",
zoneId: "volcanic_depths",
@@ -190,7 +190,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"Open void between reality and whatever lies beyond it. Stars in various states of life and death drift past. Your scouts learn very quickly not to touch them.",
durationSeconds: 36_000,
durationSeconds: 3000,
id: "star_field",
name: "The Star Field",
zoneId: "astral_void",
@@ -198,7 +198,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A region where every possible outcome is equally real and they jostle each other for space. Your scouts exist in several states simultaneously here and find it disorienting.",
durationSeconds: 72_000,
durationSeconds: 5400,
id: "probability_sea",
name: "The Probability Sea",
zoneId: "astral_void",
@@ -206,7 +206,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A river of nothing flowing through the void. It carries things from everywhere to nowhere. Some of those things are valuable, if you know how to fish from a river of nothing.",
durationSeconds: 108_000,
durationSeconds: 9000,
id: "void_current",
name: "The Void Current",
zoneId: "astral_void",
@@ -214,7 +214,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The highest point of the astral void, where nothing exists so thoroughly that it becomes a kind of substance. Your scouts feel, for a moment, what it is like to be absolutely alone in all of existence.",
durationSeconds: 144_000,
durationSeconds: 12_600,
id: "null_zenith",
name: "The Null Zenith",
zoneId: "astral_void",
@@ -224,7 +224,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A tower of compressed light older than the concept of architecture. The celestial host uses it as a marker. Your guild uses it as a starting point.",
durationSeconds: 43_200,
durationSeconds: 3600,
id: "light_spire",
name: "The Light Spire",
zoneId: "celestial_reaches",
@@ -232,7 +232,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"Where the celestial choir rehearses, continuously, for a performance that has been ongoing since before your world had an audience. The harmonics do things to objects in the vicinity.",
durationSeconds: 86_400,
durationSeconds: 7200,
id: "choir_hall",
name: "The Choir Hall",
zoneId: "celestial_reaches",
@@ -240,7 +240,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"Where the celestial host adjudicates disputes that have been ongoing since before your sun was lit. The proceedings are extremely formal. Interrupting them is inadvisable.",
durationSeconds: 129_600,
durationSeconds: 10_800,
id: "divine_court",
name: "The Divine Court",
zoneId: "celestial_reaches",
@@ -248,7 +248,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"Where the celestial host stores things they consider too valuable to use and too important to discard. Your guild has different ideas about what 'valuable' means.",
durationSeconds: 172_800,
durationSeconds: 14_400,
id: "celestial_vault",
name: "The Celestial Vault",
zoneId: "celestial_reaches",
@@ -258,7 +258,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The lip of the trench, where the shelf drops away into depths that swallow light entirely. Your scouts can hear something breathing, very slowly, from far below.",
durationSeconds: 50_400,
durationSeconds: 3600,
id: "trench_entrance",
name: "The Trench Entrance",
zoneId: "abyssal_trench",
@@ -266,7 +266,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"An underwater river at a depth that should be impossible to survive. Your scouts have learned, by necessity, to survive it anyway.",
durationSeconds: 100_800,
durationSeconds: 9000,
id: "deep_current",
name: "The Deep Current",
zoneId: "abyssal_trench",
@@ -274,7 +274,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A space at the bottom of the trench so far from light that light has no meaning here. Something has been in this chamber for so long it no longer needs to breathe.",
durationSeconds: 151_200,
durationSeconds: 12_600,
id: "sunless_chamber",
name: "The Sunless Chamber",
zoneId: "abyssal_trench",
@@ -282,7 +282,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The absolute bottom of the trench. Something is here. It has been here since before your world was made. It is, today, patient. Your scouts are not sure this is always the case.",
durationSeconds: 201_600,
durationSeconds: 16_200,
id: "the_waiting_place",
name: "The Waiting Place",
zoneId: "abyssal_trench",
@@ -292,7 +292,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"An open-air market in the court's outer districts. The vendors sell things that were not legally obtained, in exchange for things that should not legally exist.",
durationSeconds: 57_600,
durationSeconds: 5400,
id: "demon_market",
name: "The Demon Market",
zoneId: "infernal_court",
@@ -300,7 +300,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"Where the court processes those who lost their cases. Your scouts move through it quickly and look at nothing. They still hear everything.",
durationSeconds: 115_200,
durationSeconds: 9000,
id: "torment_hall",
name: "The Torment Hall",
zoneId: "infernal_court",
@@ -308,7 +308,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The court's industrial district, where deals are processed and the residue of completed contracts is extracted. The machinery runs on something the court considers renewable.",
durationSeconds: 172_800,
durationSeconds: 14_400,
id: "soul_forge",
name: "The Soul Forge",
zoneId: "infernal_court",
@@ -316,7 +316,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The inner sanctum of the infernal court, where the demon lords make decisions that echo across aeons. Your guild should not be here. Your guild is here anyway.",
durationSeconds: 230_400,
durationSeconds: 19_800,
id: "lords_chamber",
name: "The Lords' Chamber",
zoneId: "infernal_court",
@@ -326,7 +326,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The outer surface of the spire, where thousands of crystal facets reflect realities that are not the one you arrived in. Your scouts learn to focus on the ground in front of them.",
durationSeconds: 64_800,
durationSeconds: 5400,
id: "facet_approach",
name: "The Facet Approach",
zoneId: "crystalline_spire",
@@ -334,7 +334,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A room inside the spire where the intelligence runs its oldest and most complex calculations. The numbers on the walls change too fast to read. The calculations are always correct.",
durationSeconds: 129_600,
durationSeconds: 10_800,
id: "calculation_chamber",
name: "The Calculation Chamber",
zoneId: "crystalline_spire",
@@ -342,7 +342,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A corridor of perfect mirrors that show not reflections but what might have been. Your scouts avoid eye contact with their alternates. The alternates do not always extend the same courtesy.",
durationSeconds: 194_400,
durationSeconds: 16_200,
id: "mirror_hall",
name: "The Mirror Hall",
zoneId: "crystalline_spire",
@@ -350,7 +350,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The deepest point of the spire, where the intelligence's primary substrate runs continuously. The hum of calculation is felt in the bones. Numbers that have never been numbers drift past.",
durationSeconds: 259_200,
durationSeconds: 21_600,
id: "core_access",
name: "The Core Access",
zoneId: "crystalline_spire",
@@ -360,7 +360,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The entrance to the void sanctum, where the rules of existence become suggestions. Your scouts describe the crossing as like stepping sideways and arriving somewhere that was always there.",
durationSeconds: 72_000,
durationSeconds: 5400,
id: "threshold",
name: "The Threshold",
zoneId: "void_sanctum",
@@ -368,7 +368,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A place inside the sanctum where everything is perfectly quiet because nothing exists to make noise. Your scouts can hear their own thoughts very clearly here. Some of them find this unsettling.",
durationSeconds: 144_000,
durationSeconds: 12_600,
id: "inner_silence",
name: "The Inner Silence",
zoneId: "void_sanctum",
@@ -376,7 +376,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A space inside the sanctum where something is calling out, continuously, to something that has not yet answered. The call is beautiful and deeply wrong.",
durationSeconds: 216_000,
durationSeconds: 18_000,
id: "resonance_chamber",
name: "The Resonance Chamber",
zoneId: "void_sanctum",
@@ -384,7 +384,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The source of the call. Something here has been reaching out for so long it no longer remembers what it is reaching toward. Your guild's arrival is, perhaps, an answer.",
durationSeconds: 288_000,
durationSeconds: 25_200,
id: "sanctum_heart",
name: "The Sanctum Heart",
zoneId: "void_sanctum",
@@ -394,7 +394,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The long road to the eternal throne. Countless beings have walked it, seeking audience, seeking power, seeking something the throne has always already decided about them.",
durationSeconds: 79_200,
durationSeconds: 7200,
id: "throne_approach",
name: "The Throne Approach",
zoneId: "eternal_throne",
@@ -402,7 +402,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The ante-chamber of absolute power. Records are kept here of everything that has ever been ruled and everything that has ever been lost. The records go back further than memory.",
durationSeconds: 158_400,
durationSeconds: 12_600,
id: "dominion_hall",
name: "The Dominion Hall",
zoneId: "eternal_throne",
@@ -410,7 +410,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"Where things are stored that have nowhere else to go. Objects of power that cannot be used, secrets that cannot be shared, and wealth that belongs to entities that stopped existing before your world was born.",
durationSeconds: 237_600,
durationSeconds: 19_800,
id: "eternity_vault",
name: "The Eternity Vault",
zoneId: "eternal_throne",
@@ -418,7 +418,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The eternal throne itself. Whoever sits here has sat here since the beginning. They observe your guild's presence with neither surprise nor emotion. They have been expecting you. They have been expecting everyone.",
durationSeconds: 316_800,
durationSeconds: 25_200,
id: "the_seat",
name: "The Seat",
zoneId: "eternal_throne",
@@ -428,7 +428,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A permanent storm at the edge of the chaos zone where things are constantly being made and unmade simultaneously. Your scouts move through it quickly and try not to look at what they might become.",
durationSeconds: 86_400,
durationSeconds: 7200,
id: "creation_storm",
name: "The Creation Storm",
zoneId: "primordial_chaos",
@@ -436,7 +436,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A vast ocean of something that is exactly the opposite of matter. Your scouts cross it by not thinking too hard about what they are standing on.",
durationSeconds: 172_800,
durationSeconds: 14_400,
id: "unmaking_sea",
name: "The Unmaking Sea",
zoneId: "primordial_chaos",
@@ -444,7 +444,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A space where all possible outcomes already happened and none of them mattered. Your scouts find this philosophically challenging and practically navigable.",
durationSeconds: 259_200,
durationSeconds: 21_600,
id: "probability_void",
name: "The Probability Void",
zoneId: "primordial_chaos",
@@ -452,7 +452,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The centre of all primordial chaos. Everything is here and nothing is here and both statements are entirely accurate. Your scouts report the experience as indescribable, then describe it for three hours.",
durationSeconds: 345_600,
durationSeconds: 28_800,
id: "chaos_core",
name: "The Chaos Core",
zoneId: "primordial_chaos",
@@ -462,7 +462,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The first horizon you reach in the infinite expanse, which looks exactly like the starting point from behind but is provably, mathematically, somewhere else. Your scouts are sceptical but cannot argue with the math.",
durationSeconds: 93_600,
durationSeconds: 7200,
id: "first_horizon",
name: "The First Horizon",
zoneId: "infinite_expanse",
@@ -470,7 +470,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"There is no centre of the infinite expanse. This is the centre of the infinite expanse. Both things are true. Your scouts have stopped asking questions and started collecting samples.",
durationSeconds: 187_200,
durationSeconds: 16_200,
id: "middle_nowhere",
name: "The Middle of Nowhere",
zoneId: "infinite_expanse",
@@ -478,7 +478,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The road toward the edge that the expanse does not have. Your scouts know it does not exist. They are getting closer to it anyway.",
durationSeconds: 280_800,
durationSeconds: 25_200,
id: "edge_approach",
name: "The Edge Approach",
zoneId: "infinite_expanse",
@@ -486,7 +486,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"As far as any being has ever gone in the infinite expanse. Your scouts hold this record now. They are not entirely sure whether to be proud or frightened.",
durationSeconds: 374_400,
durationSeconds: 32_400,
id: "the_furthest",
name: "The Furthest",
zoneId: "infinite_expanse",
@@ -496,7 +496,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The outer area of the reality forge, where the overflow of unrealised realities pools and cools. Things that never quite existed are everywhere here, and some of them are extremely useful.",
durationSeconds: 100_800,
durationSeconds: 9000,
id: "workshop_entrance",
name: "The Workshop Entrance",
zoneId: "reality_forge",
@@ -504,7 +504,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"Where realities are assembled from the raw components of existence. The work here is continuous and has been going on since before your universe was queued.",
durationSeconds: 201_600,
durationSeconds: 16_200,
id: "creation_floor",
name: "The Creation Floor",
zoneId: "reality_forge",
@@ -512,7 +512,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The primary forging station, where major realities are hammered into their final shape. The hammers are larger than planets. The anvil has never been named because no one has ever successfully described it.",
durationSeconds: 302_400,
durationSeconds: 25_200,
id: "master_forge",
name: "The Master Forge",
zoneId: "reality_forge",
@@ -520,7 +520,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The energy source that powers the entire reality forge. It has been running since before time was a meaningful concept. What powers it is not a question that has been answered by anyone who came here to ask it.",
durationSeconds: 403_200,
durationSeconds: 32_400,
id: "forge_core",
name: "The Forge Core",
zoneId: "reality_forge",
@@ -530,7 +530,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The outermost spiral of the cosmic maelstrom, where the forces are at their most navigable — which still means they routinely shatter planets that wander too close.",
durationSeconds: 108_000,
durationSeconds: 9000,
id: "outer_current",
name: "The Outer Current",
zoneId: "cosmic_maelstrom",
@@ -538,7 +538,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The accumulated wreckage of everything the maelstrom has consumed, compressed into a navigable (mostly) field. Your scouts move through it quickly. Things in debris fields become part of the debris field.",
durationSeconds: 216_000,
durationSeconds: 18_000,
id: "debris_field",
name: "The Debris Field",
zoneId: "cosmic_maelstrom",
@@ -546,7 +546,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"Where the fundamental forces of the cosmos intersect inside the maelstrom. Gravity and electromagnetism and things that do not have names yet jostle each other here with consequences that exceed polite description.",
durationSeconds: 324_000,
durationSeconds: 28_800,
id: "force_confluence",
name: "The Force Confluence",
zoneId: "cosmic_maelstrom",
@@ -554,7 +554,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The path to the maelstrom's impossible centre — the one point of absolute calm surrounded by forces that make galaxies look fragile. Your scouts have never been so far in. They are doing this anyway.",
durationSeconds: 432_000,
durationSeconds: 36_000,
id: "eye_approach",
name: "The Eye Approach",
zoneId: "cosmic_maelstrom",
@@ -564,7 +564,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The entrance to the oldest place. The floor here was walked before walking was invented, which is philosophically impossible and physically evident.",
durationSeconds: 115_200,
durationSeconds: 9000,
id: "first_steps",
name: "The First Steps",
zoneId: "primeval_sanctum",
@@ -572,7 +572,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"A collection of records that predate the concept of records. The information stored here concerns things that no longer exist, but the records persist because the sanctum will not let them stop.",
durationSeconds: 230_400,
durationSeconds: 19_800,
id: "ancient_archive",
name: "The Ancient Archive",
zoneId: "primeval_sanctum",
@@ -580,7 +580,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"Where the sanctum stores the memory of the first moment of existence. The memory is perfect, complete, and overwhelming. Your scouts spend the minimum time here and speak little for some time after.",
durationSeconds: 345_600,
durationSeconds: 28_800,
id: "memory_chamber",
name: "The Memory Chamber",
zoneId: "primeval_sanctum",
@@ -588,7 +588,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"There is nothing older than this. The sanctum's deepest point, where the very first thing that ever was still is, unchanged, because nothing in the universe has had long enough to change it.",
durationSeconds: 460_800,
durationSeconds: 39_600,
id: "the_oldest_place",
name: "The Oldest Place",
zoneId: "primeval_sanctum",
@@ -598,7 +598,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The boundary between existence and non-existence. On one side: everything there is. On the other: everything there isn't. The view from here is indescribable and has been described by your scouts at length.",
durationSeconds: 129_600,
durationSeconds: 10_800,
id: "edge_of_everything",
name: "The Edge of Everything",
zoneId: "the_absolute",
@@ -606,7 +606,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The road to the final truth, which your guild has been walking toward since the first step in the Verdant Vale. It looks like every other road your guild has walked. It feels different.",
durationSeconds: 259_200,
durationSeconds: 21_600,
id: "truth_approach",
name: "The Truth Approach",
zoneId: "the_absolute",
@@ -614,7 +614,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"One step from the absolute. The door ahead is the last door. Your guild has opened every other door. This one opens when you are ready, which is something only the absolute can determine.",
durationSeconds: 388_800,
durationSeconds: 32_400,
id: "final_antechamber",
name: "The Final Antechamber",
zoneId: "the_absolute",
@@ -622,7 +622,7 @@ export const EXPLORATION_AREAS: Array<ExplorationAreaSummary> = [
{
description:
"The final truth, at the end of all things. There is nothing beyond this. Your guild stands here, at the end, and finds that the end is not empty. It has been waiting for you specifically.",
durationSeconds: 518_400,
durationSeconds: 43_200,
id: "the_absolute_heart",
name: "The Absolute Heart",
zoneId: "the_absolute",
+4 -1
View File
@@ -462,7 +462,10 @@ const maxBaseRunestones = 200;
*/
export const computeProjectedRunestones = (state: GameState): number => {
const { count, purchasedUpgradeIds } = state.prestige;
const threshold = basePrestigeThreshold * Math.pow(count + 1, 2);
const thresholdMult: number
= state.transcendence?.echoPrestigeThresholdMultiplier ?? 1;
const threshold
= basePrestigeThreshold * Math.pow(count + 1, 2) * thresholdMult;
const base = Math.min(
Math.floor(Math.cbrt(state.player.totalGoldEarned / threshold))
* runestonesPerPrestigeLevelClient,
+32 -1
View File
@@ -108,6 +108,35 @@ const formatEngineering = (value: number): string => {
return `${mantissa.toFixed(2)}E${String(engExp)}`;
};
/**
* Formats a whole-number value for display without decimal places.
* Uses the same suffix/letter logic as formatNumber but rounds to integers.
* @param value - The integer value to format.
* @returns The formatted string with no decimal places.
*/
const formatInteger = (value: number): string => {
if (!Number.isFinite(value) || Number.isNaN(value)) {
return "0";
}
if (value < 0) {
return `-${formatInteger(-value)}`;
}
if (value >= Math.pow(10, letterBaseExp)) {
const exp = Math.floor(Math.log10(value));
const stepsAboveBase = Math.floor((exp - letterBaseExp) / 3);
const steps = stepsAboveBase * 3;
const divisorExp = letterBaseExp + steps;
const divisor = Math.pow(10, divisorExp);
return `${String(Math.floor(value / divisor))}${getLetterSuffix(stepsAboveBase)}`;
}
for (const { threshold, suffix } of namedSuffixes) {
if (value >= threshold) {
return `${String(Math.floor(value / threshold))}${suffix}`;
}
}
return String(Math.floor(value));
};
/**
* Formats a number for display using the player's chosen notation style.
* Negative values are formatted with a leading minus sign.
@@ -115,7 +144,7 @@ const formatEngineering = (value: number): string => {
* @param format - The notation style to use.
* @returns The formatted number string.
*/
export const formatNumber = (
const formatNumber = (
value: number,
format: NumberFormat = "suffix",
): string => {
@@ -139,3 +168,5 @@ export const formatNumber = (
}
}
};
export { formatInteger, formatNumber };