From 674775be0e10e206dd9b55c278a4193080552b3a Mon Sep 17 00:00:00 2001 From: Super_Z <1401203083@qq.com> Date: Tue, 23 Jun 2026 13:04:15 +0000 Subject: [PATCH] 6f5491c0-6c94-4f8e-8ad3-136d04ab862f --- docs/repo | 2 +- src/app/page.tsx | 41 ++- src/components/game/ExpeditionPanel.tsx | 352 ++++++++++++++++++++++ src/lib/game/config.ts | 15 +- src/lib/game/engine.ts | 10 +- src/lib/game/expedition.ts | 369 ++++++++++++++++++++++++ src/lib/game/types.ts | 85 ++++++ src/store/gameStore.ts | 141 ++++++++- worklog.md | 18 +- 9 files changed, 1007 insertions(+), 26 deletions(-) create mode 100644 src/components/game/ExpeditionPanel.tsx create mode 100644 src/lib/game/expedition.ts diff --git a/docs/repo b/docs/repo index 5eb303c38..84749c218 160000 --- a/docs/repo +++ b/docs/repo @@ -1 +1 @@ -Subproject commit 5eb303c3890aa66b54edb39e1464725994295f29 +Subproject commit 84749c218ac777a3beb6706b37d2c2d25d689cd0 diff --git a/src/app/page.tsx b/src/app/page.tsx index ff05c217b..cbcadcb0e 100644 --- a/src/app/page.tsx +++ b/src/app/page.tsx @@ -9,6 +9,7 @@ import { TechTree } from "@/components/game/TechTree"; import { Codex } from "@/components/game/Codex"; import { PrestigeDialog } from "@/components/game/PrestigeDialog"; import { SettingsDialog } from "@/components/game/SettingsDialog"; +import { ExpeditionPanel } from "@/components/game/ExpeditionPanel"; import { useGameLoop } from "@/hooks/useGameLoop"; import { useGameStore } from "@/store/gameStore"; import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs"; @@ -20,6 +21,7 @@ import { Cpu, BookOpen, BarChart3, + Rocket, Github, } from "lucide-react"; import { TECH_TREE, FRAGMENTS, formatNum } from "@/lib/game/config"; @@ -37,6 +39,9 @@ export default function Page() { const ownedTech = useGameStore((s) => s.tech); const ownedFragments = useGameStore((s) => s.fragments); const crystals = useGameStore((s) => s.crystals); + const crystalCap = useGameStore((s) => s.crystalCap); + const energy = useGameStore((s) => s.energy); + const hasActiveExpedition = useGameStore((s) => !!s.activeExpedition && !s.activeExpedition.finished); // 挂载检测:避免持久化 store 在 SSR/CSR 间产生 hydration 不一致 useEffect(() => { @@ -57,6 +62,9 @@ export default function Page() { const ownedFragCount = Object.values(ownedFragments).filter(Boolean).length; const canPrestige = contact >= 100; + // 仓库满仓警告 + const warehouseFull = crystals >= crystalCap * 0.98; + // 目标提示 let goal = "点击中央晶体发起脉冲,累积记忆晶体"; if (totalDecoded === 0 && crystals >= 5) { @@ -66,6 +74,12 @@ export default function Page() { } else if (totalDecoded > 0 && ownedFragCount < FRAGMENTS.length) { goal = `继续解码,拼凑记忆图谱(${ownedFragCount}/${FRAGMENTS.length})`; } + if (energy >= 1 && totalDecoded >= 3) { + goal = "「探险」标签可深入遗迹,获取丰厚奖励"; + } + if (warehouseFull) { + goal = "⚠ 仓库已满,产能浪费中!请解码晶体或升级仓库"; + } if (canPrestige) goal = "✦ 接触进度已满,可发起飞升进入新周目"; return ( @@ -133,10 +147,20 @@ export default function Page() {
- {/* 标签面板:技术 / 图谱 / 统计 */} -
- - + {/* 标签面板:探险 / 技术 / 图谱 / 统计 */} +
+ + + + + 探险 + {energy >= 1 && !hasActiveExpedition && ( + + )} + {hasActiveExpedition && ( + + )} + 技术 @@ -150,6 +174,9 @@ export default function Page() { 统计 + + + @@ -167,9 +194,9 @@ export default function Page() { {/* 底部 Footer */}