From 0057cfeaaaa9f1348125c40bb2678180d1eea3b2 Mon Sep 17 00:00:00 2001 From: Hikari Date: Thu, 19 Mar 2026 17:57:17 -0700 Subject: [PATCH] feat: communicate quest failure mechanics in the UI (#82) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Addresses recurring community confusion about quests failing — multiple players asked whether it was a bug or intended behaviour with no in-game explanation. - **Exports `zoneFailureChance`** from `tick.ts` so the quest panel can read it - **Quest cards** now show a `🎲 X% failure chance` note on all available quests, with a brief explanation that a failure resets the quest with no rewards - **"Last attempt failed" hint** now reads `"⚠️ Last attempt failed — no rewards were granted."` so players understand the consequence immediately - **About panel** updated to document the failure mechanic, including the 10%–40% range across zones Closes #80 ✨ This PR was created with help from Hikari~ 🌸 Reviewed-on: https://git.nhcarrigan.com/nhcarrigan/elysium/pulls/82 Co-authored-by: Hikari Co-committed-by: Hikari --- apps/web/src/components/game/aboutPanel.tsx | 6 +++++- apps/web/src/components/game/questPanel.tsx | 13 ++++++++++++- apps/web/src/engine/tick.ts | 2 +- 3 files changed, 18 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/game/aboutPanel.tsx b/apps/web/src/components/game/aboutPanel.tsx index 1c5caf1..3164466 100644 --- a/apps/web/src/components/game/aboutPanel.tsx +++ b/apps/web/src/components/game/aboutPanel.tsx @@ -44,7 +44,11 @@ const howToPlay = [ body: "Send your guild on quests that complete over time and reward gold," + " essence, crystals, equipment, and upgrades. Multiple quests can run" - + " simultaneously. Completing quests also unlocks new zones.", + + " simultaneously. Completing quests also unlocks new zones." + + " Each quest has a failure chance that increases in later zones" + + " (from 10% in the starting zone up to 40% in the hardest zones)." + + " If a quest fails, no rewards are granted and the quest resets —" + + " your party must be sent again to retry it.", title: "📜 Quests", }, { diff --git a/apps/web/src/components/game/questPanel.tsx b/apps/web/src/components/game/questPanel.tsx index 213f541..b81c2dc 100644 --- a/apps/web/src/components/game/questPanel.tsx +++ b/apps/web/src/components/game/questPanel.tsx @@ -10,6 +10,7 @@ /* eslint-disable max-statements -- Many local variables needed for quest state */ import { useState, type JSX } from "react"; import { useGame } from "../../context/gameContext.js"; +import { zoneFailureChance } from "../../engine/tick.js"; import { cdnImage } from "../../utils/cdn.js"; import { LockToggle } from "../ui/lockToggle.js"; import { ZoneSelector } from "./zoneSelector.js"; @@ -143,8 +144,18 @@ const QuestCard = ({ : null} } + {quest.status === "available" + &&

+ {"🎲 "} + {String(Math.round((zoneFailureChance[quest.zoneId] ?? 0) * 100))} + {"% failure chance — if failed, the quest resets"} + {" and must be retried."} +

+ } {quest.status === "available" && quest.lastFailedAt !== undefined - &&

{"⚠️ Last attempt failed"}

+ &&

+ {"⚠️ Last attempt failed — no rewards were granted."} +

} {quest.status === "available" &&