From 4ce2ce26141ff8693506c963228b22e869f188aa Mon Sep 17 00:00:00 2001 From: gahusb Date: Mon, 4 May 2026 04:25:25 +0900 Subject: [PATCH] docs: sync plan with A-5 polish actually shipped (partiallyKnown filter, opacity split) Final reviewer flagged that the plan still showed the pre-polish RecipeHint shape and tierGroups pipeline. Update the plan code blocks to match HEAD so future implementers see the shipped pattern (partiallyKnown field, .filter(...) drop, undiscoveredDimStyle opacity wrapper, module-scope MAX_UNDISCOVERED_PER_TIER). Co-Authored-By: Claude Opus 4.7 (1M context) --- .../superpowers/plans/2026-05-04-micro-fun-patch.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/docs/superpowers/plans/2026-05-04-micro-fun-patch.md b/docs/superpowers/plans/2026-05-04-micro-fun-patch.md index 0d597c8..357a513 100644 --- a/docs/superpowers/plans/2026-05-04-micro-fun-patch.md +++ b/docs/superpowers/plans/2026-05-04-micro-fun-patch.md @@ -355,6 +355,7 @@ const elementMap = Object.fromEntries(elementsData.map((el) => [el.id, el])); interface RecipeHint { display: string; craftableNow: boolean; + partiallyKnown: boolean; // 적어도 한 재료가 발견된 상태 — `? + ?` 카드 노출 방지용 } function getRecipeHintForElement( @@ -375,6 +376,7 @@ function getRecipeHintForElement( return { display: `${aSym} + ${bSym}`, craftableNow: aDiscovered && bDiscovered && hasA && hasB, + partiallyKnown: aDiscovered || bDiscovered, }; } ``` @@ -477,9 +479,13 @@ interface ElementCardProps { `ElementsScreen` 본문에서 기존 `tierGroups` 정의를 다음으로 교체: -```ts - const MAX_UNDISCOVERED_PER_TIER = 6; +> `MAX_UNDISCOVERED_PER_TIER`는 module 상수 (예: `TIER_LABELS` 옆)에 두는 편을 권장. 게임 디자인 캡이지 런타임 상태가 아님. +```ts +// module scope +const MAX_UNDISCOVERED_PER_TIER = 6; + +// ElementsScreen 함수 본문 const tierGroups = [1, 2, 3, 4, 5].map((tier) => { const tierElements = elementsData.filter((el) => el.tier === tier); const owned = tierElements.filter((el) => discoveredElementIds.includes(el.id)); @@ -487,6 +493,7 @@ interface ElementCardProps { const undiscoveredWithHints = undiscovered .map((el) => ({ el, hint: getRecipeHintForElement(el.id, discoveredElementIds, elements) })) + .filter(({ hint }) => hint?.partiallyKnown ?? false) // `? + ?` 카드 차단 .sort((a, b) => { const aCraftable = a.hint?.craftableNow ? 1 : 0; const bCraftable = b.hint?.craftableNow ? 1 : 0; @@ -505,6 +512,8 @@ interface ElementCardProps { }).filter(({ owned, undiscovered }) => owned.length > 0 || undiscovered.length > 0); ``` +> 미발견 카드의 opacity 처리: 카드 wrapper 전체에 `opacity: 0.4`를 걸면 craftable hint의 파란색이 묻힘. `undiscoveredCardStyle`에서 opacity를 빼고, sprite + `???` name만 별도 wrapper(`undiscoveredDimStyle`, opacity 0.45 + flex-column 정렬)로 dim 처리. 힌트 span은 dim wrapper 바깥에 두어 full-color 유지. + 기존 tierGroups 렌더링 JSX를 다음으로 교체: ```tsx