I will list the files in the project to understand its structure and prepare for building the "羽扇谋略局" Three Kingdoms strategy web application.
I will read package.json to see existing dependencies and check if we need icons like lucide-react, framer-motion, or canvas-confetti.
I will install lucide-react and canvas-confetti (with its types) to enhance our Three Kingdoms strategy UI with icons and celebration effects when a stratagem succeeds.
I will check index.html to update the title to "羽扇谋略局 - 三国互动沉浸沙盘" and ensure proper fonts and meta tags.
I will now update index.html to set the title to "羽扇谋略局 | 三国主题沉浸谋略沙盘" and add elegant Chinese serif/calligraphy font styling from Google Fonts.
I will read src/index.css to inspect current styles.
I will update src/index.css to add custom Chinese calligraphy fonts, candlelight animations, shadow puppetry silhouette effects, golden-emperor borders, and ancient parchment styles.
I will create src/types/index.ts to define data models for stratagem cards, battle zones, shadow puppet animation scenes, desk items, factions, and campaign progression.
I will create src/data/factions.ts containing the Four Factions (Shu Han, Cao Wei, Sun Wu, Warlords) with their banners, colors, and tactical advantages.
I will create src/data/stratagems.ts containing our stratagems with their quotes, stats, historical backgrounds, and target battlefield bindings.
I will create src/data/battleZones.ts defining the geographical map zones (Chibi, Jieting, Xinye, Guandu, Fancheng, Hulaoguan) with their coordinates on our ancient ink sand-table map.
I will create src/data/puppetScenes.ts defining the shadow puppetry dramatic acts, classical narration, dialogue sequences, and environmental particle effects for each stratagem.
I will create src/data/deskData.ts to define the 7 interactive desk items (feather fan, bamboo scroll, war chess, secret letter, seal, candle, battle flag), intelligence spy dispatches, and strategist treatises.
I will create src/data/campaigns.ts defining the strategy campaigns ("赤壁破曹 · 烈火千帆", "西城街亭 · 卧龙妙算", "博望新野 · 烈火焚营", "官渡奇袭 · 乌巢夜火", and "自由沙盘").
I will create src/utils/soundEffects.ts using the browser's Web Audio API to generate authentic acoustic simulations (guqin string plucks, war drums, fire crackling, arrow swishing, and wind howling) without relying on external mp3 files.
I will create src/components/modals/BambooScrollModal.tsx allowing users to unfold an ancient bamboo scroll to read Sun Tzu's Art of War and biographies of legendary strategists (Zhuge Liang, Zhou Yu, Sima Yi, Guo Jia, etc.).
I will create src/components/modals/SecretLetterModal.tsx for inspecting spy dispatches, featuring a wax-seal breaking effect and a secret UV ink reveal under dim candle lighting.
I will create src/components/modals/SealStampModal.tsx allowing users to stamp imperial seals like "天下归心" (All Hearts Under Heaven Return) and "奇谋定霸" (Miraculous Strategems Decide Dominance) onto their military orders.
I will remove the unused Award import from src/components/modals/SealStampModal.tsx.
I will create src/components/modals/ChronicleModal.tsx allowing users to view their achievement titles, view campaign milestones, and replay any unlocked Three Kingdoms shadow puppetry theatrical animations.
I will create src/components/modals/WarChessModal.tsx allowing users to deploy bronze war-chess pieces representing Shu, Wei, and Wu forces on tactical waypoints.
I will create src/components/Navbar.tsx featuring the ancient military tent canopy banner, campaign selector, faction theme indicator, sound toggle, and achievement chronicle launcher.
I will remove the unused imports and variables in src/components/Navbar.tsx.
I will create src/components/DeskItemsBar.tsx to render the 7 interactive scholar-strategist objects on the desk with rich tooltip descriptions and action handlers.
I will create src/components/StratagemDeck.tsx to display the stratagem card hand with categorization tabs, detailed military lore, and selection/drag handlers for deploying onto the battle map.
I will remove the unused TacticCategory import from src/components/StratagemDeck.tsx.
I will create src/components/AncientMapSandbox.tsx representing the ancient strategist's sand-table map with rivers, mountains, military garrisons, drag-and-drop targets for stratagem cards, and invisible ink secrets revealed by candlelight.
I will clean up the unused imports and variable names in src/components/AncientMapSandbox.tsx.
I will remove idx from the map iterations in src/components/AncientMapSandbox.tsx.
I will create src/components/ShadowPuppetTheater.tsx to render authentic Chinese shadow puppetry (皮影戏) short animations with silhouette characters, synchronized sound simulation, candle-lit parchment screens, particle effects (flames, arrows, chains, fog), and dramatic storytelling frames.
I will remove the unused imports in src/components/ShadowPuppetTheater.tsx.
I will create src/components/MilitaryTentDesk.tsx which integrates the scholar's desk, sand-table map, stratagem card deck, desk objects, and shadow puppetry theater.
I will check src/App.tsx.
I will update src/App.tsx to render our MilitaryTentDesk Three Kingdoms interactive tabletop sandbox.
I will run build_project to confirm that all TypeScript types, Tailwind classes, canvas-confetti imports, and components compile without errors.
我已为您完成 “羽扇谋略局”——三国主题沉浸式互动谋略沙盘 的总体设计与全栈代码开发!项目已构建成功并可通过浏览器进行沉浸式体验。
⛩️ 视觉与主题调性:军帐案桌 · 墨色山河 · 皮影剪影
网页采用 黑金 (#121110, #d4af37)、赤红 (#8a1c14)、竹青 (#2b4c3f) 与暖黄/烛光 (#ffb703) 为主要调色板,融合中国书法字体(Google Fonts 《马善政》、《至尊行草》与宋体衬线),重现了一座运筹帷幄的古代军事智囊军帐:
- 军帐案桌背景:厚重木纹与暗黄纸张纹理,顶部悬挂古典垂幔饰边与战火摇曳的光影。
- 动态声光交互:内建 Web Audio API 古风音效引擎,无需外部文件即可模拟古琴拨弦、战鼓擂响、江风呼啸、烈火噼啪与箭矢笃笃破空声!
🪶 案桌百宝阁(7 大古代谋士核心交互物件)
在屏幕顶部的“百宝阁”工具栏中,摆放着 7 件可点选操作的案头物件,每一件均带有丰富的历史交互设计:
- 🪶 鹤氅羽扇:点击挥动羽扇,掀起清风并随机卜算一条《诸葛卧龙 · 军师箴言与锦囊妙计》。
- 📜 谋略竹简:展开仿古竹简长卷,可批阅《孙子兵法 · 谋攻/虚实/火攻篇》,或查阅诸葛亮、周瑜、司马懿、郭嘉、庞统、贾诩等千古奇人的【军师雷达能力图谱与传记】。
- ♟️ 青铜兵棋:打开沙盘兵棋库,可调动“蜀·白羽前锋营”、“魏·虎豹骑”、“吴·解烦水师”等重装部队直接部署至案桌地图驻扎!
- ✉️ 密探谍报:查看江东与汉中细作快马送达的朱红封泥急函。点击破开红漆朱印,阅览敌营内部粮草与将帅失和的机密!
- 🔏 军事玺印:手持墨玉军印,在《中军都统决胜功劳券》上亲手按盖**【天下归心】、【奇谋定霸】、【天命在蜀】**等朱红色大印,按盖瞬间伴随金砂飞舞!
- 🕯️ 帐前烛火(特色暗光显影机制):点击切换帐中光线(明亮 / 幽微 / 摇曳 / 熄灭)。当烛火调至“幽微暗调”或“熄灭”时,沙盘地图和谍函上用夜光朱砂隐藏的“诸葛丞相绝密手谕与计谋批示”会神奇地浮现出来!
- 🚩 中军战旗:点击切换当前阵营归属(蜀汉·红 / 曹魏·蓝 / 孙吴·金 / 群雄·绿),实装专属阵营配色光环与统帅兵家特权。
🗺️ 核心沙盘与卡牌推演系统:拖拽卡牌 · 指点江山
在屏幕中央的是古代墨色山河大地图,标记了长江、黄河、秦岭天险,并设立了 7 大历史战略战区:赤壁·长江天堑、西城·街亭要隘、博望·新野密林、官渡·乌巢粮仓、襄樊·汉水要塞、当阳·长坂桥头、虎牢关·洛阳要冲。
而在屏幕下方,整齐排列着 9张精美的谋略手牌:
- 空城计(心理奇谋) · 草船借箭(天象借力) · 连环计(连环奇计) · 赤壁火攻(烈火攻势) · 密林伏兵(山谷设伏) · 离间计(攻心离间) · 借东风(天象奇术) · 苦肉计 · 水淹七军
推演交互方式:
- 用户可点击卡牌查看详细智谋/杀伤/奇效指数、兵书出处与历史渊源;
- 将任意谋略卡片【按住并拖动 (Drag & Drop)】(或点击右下角立即推演)至地图上发光的战略关卡处,即可瞬时触发对应战场的【皮影戏式短动画】!
🎭 核心亮点:皮影戏式短动画剧场(Shadow Puppetry Theater)
当谋略在沙盘中奏效,屏幕将降下传统中国皮影戏幕布,上演声光戏剧:
- 🪕 空城计 · 卧龙抚琴:诸葛亮鹤氅纶巾登城楼抚琴,香炉袅袅;城外司马懿与魏国大军在漫天风沙与战鼓中惊疑止步、下令后撤十五里!
- 🏹 草船借箭 · 谈笑乘雾:长江四更雾垂天际,草捆小船队乘雾前行;曹营一万弓弩手射出的神箭如雨下般刺入草把!
- ⛓️ 连环计 · 铁索锁江:战舰排布,庞统献策,伴随铿锵铁锁轰鸣,八十万北军战舟被巨锁连环扣为一体!
- 🔥 赤壁火攻 · 烈焰连天:风助火势!黄盖火船冲入连环船阵,霎时猩红火舌飙升,吞噬大江,战鼓齐鸣!
- 🐎 密林伏兵 · 剪影惊雷:博望狭道火起,赵云诱敌深入,关羽、张飞黑金剪影从悬崖密林中犹如神将杀出!
- 🌪️ 借东风 · 七星唤雨:诸葛亮于南屏山七星台仗剑罡步,东南狂风在屏幕中呼啸飙起!
- 💌 离间反间 · 伪书借刀:周瑜群英会佯醉,蒋干于月夜盗取伪造密书,借枭雄之手斩水军巨将!
每幕皮影戏均配有沉浸式古风剧本旁白、人物文言对白、声效合奏,演出结束时伴随全屏幕金色礼花与**【决胜功臣嘉奖】**,记录进用户的《谋略图鉴与战绩锦囊》!
🧭 四大历史剧本与自由沙盘模式
通过顶部的推演剧本选择器,您既可以体验引导式的经典战役关卡(如《赤壁破曹 · 烈火千帆》、《西城街亭 · 卧龙妙算》、《博望新野 · 烈火焚营》、《官渡奇袭 · 乌巢夜火》),也可以选择**《群雄争霸 · 自由谋略沙盘》**,自由实验九大计谋卡与全地图关卡的奇妙反应!
Files built: index.html, src/index.css, src/types/index.ts, src/data/factions.ts, src/data/stratagems.ts, src/data/battleZones.ts, src/data/puppetScenes.ts, src/data/deskData.ts, src/data/campaigns.ts, src/utils/soundEffects.ts, src/components/modals/BambooScrollModal.tsx, src/components/modals/SecretLetterModal.tsx, src/components/modals/SealStampModal.tsx, src/components/modals/ChronicleModal.tsx, src/components/modals/WarChessModal.tsx, src/components/Navbar.tsx, src/components/DeskItemsBar.tsx, src/components/StratagemDeck.tsx, src/components/AncientMapSandbox.tsx, src/components/ShadowPuppetTheater.tsx, src/components/MilitaryTentDesk.tsx, src/App.tsx