关键词触发:明史回忆录
by AtomicWizard881030 lines60.1 KB
你说得对,我重新看了你的笔记,发现集权原因这部分原文有一个清晰的逻辑顺序:
1. 个人性格与经历(出身 → 性格 → 猜忌功臣)
2. 借鉴前朝历史教训(唐、元、宋三朝分析 → 取长补短策略)
3. 维持长期统治(太子早逝 → 朱允炆仁弱 → 扫清障碍)
我之前的关键词顺序是乱的。现在按照笔记原文的叙述顺序重新排列了所有八个领域的关键词,这样练习时的节奏就和你阅读笔记时的逻辑完全一致了。
以下是修复后的完整代码,主要是调整了每个领域内 keywords 数组的顺序:
```html
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>关键词触发:明史回忆录</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: "微软雅黑", "PingFang SC", 宋体, sans-serif;
}
body {
max-width: 750px;
margin: 0 auto;
padding: 20px;
background: #f6f3ec;
min-height: 100vh;
}
.box {
background: #fff;
padding: 30px;
border-radius: 12px;
box-shadow: 0 2px 16px rgba(0, 0, 0, 0.08);
margin-bottom: 20px;
}
.game-title {
text-align: center;
margin-bottom: 20px;
}
.game-title h1 {
color: #8b3828;
font-size: 24px;
letter-spacing: 2px;
margin-bottom: 4px;
}
.game-title .subtitle {
color: #b35000;
font-size: 13px;
letter-spacing: 4px;
}
.home-page .section-title {
color: #8b3828;
font-size: 16px;
margin-bottom: 14px;
border-left: 3px solid #992e22;
padding-left: 12px;
}
.category-grid {
display: flex;
flex-direction: column;
gap: 10px;
margin-bottom: 24px;
}
.category-card {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px 18px;
background: #fdf8f0;
border: 2px solid #e8d5a3;
border-radius: 10px;
cursor: pointer;
transition: all 0.2s;
}
.category-card:hover {
background: #fdf3d6;
border-color: #c9a96e;
transform: translateY(-1px);
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}
.category-card .cat-name {
font-size: 16px;
font-weight: bold;
color: #8b3828;
}
.category-card .cat-stats {
font-size: 12px;
color: #999;
margin-top: 4px;
}
.category-card .cat-badge {
background: #992e22;
color: #fff;
padding: 6px 14px;
border-radius: 20px;
font-size: 13px;
white-space: nowrap;
}
.quick-actions {
display: flex;
gap: 10px;
margin-top: 16px;
}
.quick-actions button {
flex: 1;
padding: 12px;
background: #992e22;
color: #fff;
border: none;
border-radius: 8px;
font-size: 14px;
cursor: pointer;
letter-spacing: 1px;
transition: background 0.2s;
}
.quick-actions button:hover {
background: #b53a2d;
}
.quick-actions button.outline {
background: #fff;
color: #992e22;
border: 2px solid #992e22;
}
.quick-actions button.outline:hover {
background: #fdf3d6;
}
.game-page {
display: none;
}
.game-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
flex-wrap: wrap;
gap: 10px;
}
.back-btn {
padding: 8px 16px;
background: #fff;
color: #992e22;
border: 2px solid #992e22;
border-radius: 20px;
font-size: 13px;
cursor: pointer;
transition: all 0.2s;
}
.back-btn:hover {
background: #fdf3d6;
}
.game-progress {
font-size: 13px;
color: #999;
}
.game-progress span {
color: #992e22;
font-weight: bold;
}
.keyword-card {
text-align: center;
padding: 40px 20px;
background: #fdf8f0;
border: 2px solid #e8d5a3;
border-radius: 12px;
margin-bottom: 20px;
}
.keyword-card .label {
font-size: 12px;
color: #b35000;
letter-spacing: 3px;
margin-bottom: 12px;
}
.keyword-card .keyword {
font-size: 36px;
font-weight: bold;
color: #8b3828;
letter-spacing: 3px;
margin-bottom: 16px;
}
.keyword-card .hint {
font-size: 14px;
color: #999;
line-height: 1.8;
}
.answer-area {
display: none;
margin-top: 20px;
padding: 0;
background: #fffdf7;
border: 2px solid #e8d5a3;
border-radius: 12px;
animation: fadeIn 0.4s ease-in;
overflow: hidden;
}
@keyframes fadeIn {
from {
opacity: 0;
transform: translateY(10px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.answer-header {
background: #fdf3d6;
padding: 14px 20px;
border-bottom: 1px solid #e8d5a3;
display: flex;
align-items: center;
gap: 8px;
}
.answer-header .icon {
font-size: 22px;
}
.answer-header h4 {
color: #8b3828;
font-size: 16px;
margin: 0;
}
.answer-body {
padding: 20px;
}
.answer-body .kd-block {
margin-bottom: 16px;
}
.answer-body .kd-block:last-child {
margin-bottom: 0;
}
.answer-body .kd-label {
display: inline-block;
background: #fdf3d6;
color: #8b3828;
font-weight: bold;
font-size: 12px;
padding: 4px 12px;
border-radius: 20px;
margin-bottom: 8px;
letter-spacing: 1px;
}
.answer-body .kd-list {
list-style: none;
padding: 0;
margin: 4px 0 0 0;
}
.answer-body .kd-list li {
padding: 5px 0 5px 20px;
position: relative;
line-height: 1.8;
color: #555;
font-size: 15px;
}
.answer-body .kd-list li::before {
content: "•";
position: absolute;
left: 3px;
color: #992e22;
font-weight: bold;
}
.answer-body .kd-text {
line-height: 1.9;
color: #555;
font-size: 15px;
}
.answer-body .kd-note {
margin-top: 12px;
padding: 12px 16px;
background: #fff9ed;
border-left: 4px solid #e0a800;
border-radius: 6px;
font-style: italic;
color: #8b6914;
font-size: 14px;
line-height: 1.8;
}
.answer-body .kd-note .note-label {
font-style: normal;
font-weight: bold;
color: #b35000;
font-size: 11px;
letter-spacing: 2px;
display: block;
margin-bottom: 4px;
}
.self-eval {
display: none;
margin-top: 18px;
}
.self-eval .eval-title {
font-size: 14px;
color: #555;
margin-bottom: 10px;
text-align: center;
}
.eval-btns {
display: flex;
gap: 10px;
}
.eval-btns button {
flex: 1;
padding: 12px;
border: none;
border-radius: 8px;
font-size: 14px;
cursor: pointer;
letter-spacing: 1px;
transition: all 0.2s;
}
.eval-btns .btn-full {
background: #2e7d32;
color: #fff;
}
.eval-btns .btn-full:hover {
background: #388e3c;
}
.eval-btns .btn-partial {
background: #e8a800;
color: #fff;
}
.eval-btns .btn-partial:hover {
background: #f0b800;
}
.eval-btns .btn-forgot {
background: #992e22;
color: #fff;
}
.eval-btns .btn-forgot:hover {
background: #b53a2d;
}
.stats-overlay {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 100;
justify-content: center;
align-items: center;
}
.stats-overlay.show {
display: flex;
}
.stats-box {
background: #fff;
padding: 30px;
border-radius: 12px;
max-width: 500px;
width: 90%;
max-height: 80vh;
overflow-y: auto;
}
.stats-box h3 {
color: #8b3828;
margin-bottom: 16px;
text-align: center;
}
.stats-box .stat-row {
display: flex;
justify-content: space-between;
padding: 8px 0;
border-bottom: 1px solid #f0e8d8;
font-size: 14px;
}
.stats-box .stat-row .stat-name {
color: #555;
}
.stats-box .stat-row .stat-val {
color: #992e22;
font-weight: bold;
}
.stats-box button {
margin-top: 16px;
width: 100%;
padding: 12px;
background: #992e22;
color: #fff;
border: none;
border-radius: 8px;
font-size: 14px;
cursor: pointer;
}
.mastery-dots {
display: flex;
gap: 4px;
margin-top: 6px;
}
.mastery-dots .dot {
width: 8px;
height: 8px;
border-radius: 50%;
background: #ddd;
}
.mastery-dots .dot.filled {
background: #2e7d32;
}
.mastery-dots .dot.partial {
background: #e8a800;
}
.dot-legend {
display: flex;
gap: 16px;
font-size: 11px;
color: #999;
margin-top: 8px;
align-items: center;
}
.dot-legend span {
display: flex;
align-items: center;
gap: 4px;
}
.dot-legend .dot {
width: 8px;
height: 8px;
border-radius: 50%;
}
.dot-legend .dot.green {
background: #2e7d32;
}
.dot-legend .dot.yellow {
background: #e8a800;
}
.dot-legend .dot.gray {
background: #ddd;
}
</style>
</head>
<body>
<div class="box" id="game-box">
<div class="home-page" id="home-page">
<div class="game-title">
<h1>关键词触发:明史回忆录</h1>
<div class="subtitle">主动回忆 · 间隔重复 · 八个领域</div>
</div>
<div class="section-title">📂 选择一个领域开始练习</div>
<div class="category-grid" id="category-grid"></div>
<div class="dot-legend">
<span><div class="dot green"></div> 掌握</span>
<span><div class="dot yellow"></div> 部分</span>
<span><div class="dot gray"></div> 未学</span>
</div>
<div class="quick-actions">
<button onclick="startRandom()">🎲 随机领域</button>
<button onclick="startWeakest()">🎯 弱项优先</button>
<button class="outline" onclick="showStats()">📊 掌握统计</button>
</div>
</div>
<div class="game-page" id="game-page">
<div class="game-header">
<button class="back-btn" onclick="goHome()">← 返回主页</button>
<div class="game-progress" id="game-progress"></div>
</div>
<div class="keyword-card" id="keyword-card">
<div class="label" id="kw-label"></div>
<div class="keyword" id="kw-keyword"></div>
<div class="hint" id="kw-hint"></div>
<button id="reveal-btn" onclick="revealAnswer()" style="margin-top:20px;padding:12px 30px;background:#992e22;color:#fff;border:none;border-radius:8px;font-size:15px;cursor:pointer;letter-spacing:1px;">📜 揭晓答案</button>
</div>
<div class="answer-area" id="answer-area">
<div class="answer-header"><span class="icon">📜</span><h4 id="answer-title"></h4></div>
<div class="answer-body" id="answer-body"></div>
</div>
<div class="self-eval" id="self-eval">
<div class="eval-title">你记得多少?</div>
<div class="eval-btns">
<button class="btn-full" onclick="selfEval('full')">✅ 完全记得</button>
<button class="btn-partial" onclick="selfEval('partial')">⚠ 部分记得</button>
<button class="btn-forgot" onclick="selfEval('forgot')">❌ 基本忘了</button>
</div>
</div>
</div>
</div>
<div class="stats-overlay" id="stats-overlay"><div class="stats-box" id="stats-box"></div></div>
<script>
// ==================== 关键词库(严格按笔记顺序) ====================
const categories = [{
id: "cause",
name: "一、集权原因",
icon: "🧠",
keywords: [
// 笔记顺序:1.个人性格与经历 → 2.借鉴前朝教训 → 3.维持长期统治
{
keyword: "朱元璋出身",
hint: "他的早年经历是什么?这段经历如何影响他的性格?",
answerHTML: `
<div class="kd-block"><span class="kd-label">出身与经历</span>
<ul class="kd-list"><li>出身贫苦农家</li><li>曾为<strong>僧侣</strong>(皇觉寺出家)</li><li>曾为<strong>乞丐</strong>(沿街讨饭)</li></ul></div>
<div class="kd-block"><span class="kd-label">性格影响</span>
<ul class="kd-list"><li><strong>猜忌多疑</strong>——底层生存经历让他不信任任何人</li><li><strong>权力欲极强</strong>——从一无所有到掌控一切</li></ul></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>出身贫苦,曾为僧侣、乞丐,养成猜忌多疑、权力欲极强的性格。</div>`
}, {
keyword: "即位后的猜忌",
hint: "他猜忌哪些开国功臣?为什么?",
answerHTML: `
<div class="kd-block"><span class="kd-label">猜忌对象</span>
<ul class="kd-list"><li><strong>刘基(刘伯温)</strong>——谋士,神机妙算</li><li><strong>徐达</strong>——武将之首,军中威望极高</li><li><strong>李善长</strong>——文臣之首,门生遍布</li></ul></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>即位后猜忌刘基、徐达、李善长等开国功臣。</div>`
}, {
keyword: "前朝历史教训",
hint: "他从唐、元、宋三朝各吸取了什么教训?他决定怎么做?",
answerHTML: `
<div class="kd-block"><span class="kd-label">三大教训</span>
<ul class="kd-list"><li><strong>唐代</strong>——地方权力过大导致藩镇割据</li><li><strong>元代</strong>——权臣可废立皇帝</li><li><strong>宋代</strong>——过分集权但对外积弱</li></ul></div>
<div class="kd-block"><span class="kd-label">朱元璋的策略</span>
<p class="kd-text">取宋朝集权之长(皇权稳固),避其积弱之短,用自己方法集权。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>唐代地方权力过大导致藩镇割据。元代权臣可废立皇帝。宋代过分集权但对外积弱。太祖取宋朝集权之长,避其积弱之短,用自己方法集权。</div>`
}, {
keyword: "为子孙计",
hint: "太子朱标死后,朱元璋为什么大开杀戒?",
answerHTML: `
<div class="kd-block"><span class="kd-label">触发原因</span>
<ul class="kd-list"><li>太子<strong>朱标</strong>早逝</li><li>皇太孙<strong>朱允炆</strong>(建文帝)仁弱</li><li>顾虑子孙驾驭不了群臣</li></ul></div>
<div class="kd-block"><span class="kd-label">动机</span>
<p class="kd-text">扫清障碍,集权中央,确保朱家江山永固。这是理解"洪武四大案"的关键心理动机。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>顾虑子孙(如明惠帝朱允炆)未必能驾驭群臣,故扫清障碍,集权中央,确保朱家江山永固。</div>`
}
]
}, {
id: "central",
name: "二、中央政治措施",
icon: "🏛️",
keywords: [
// 笔记顺序:1.废中书省与宰相制度 → 2.提高六部地位 → 3.设四辅官、殿阁大学士 → 4.设通政使司 → 5.设三法司
{
keyword: "胡惟庸案",
hint: "哪一年?罪名有哪些?导火索是什么?牵连多少人?",
answerHTML: `
<div class="kd-block"><span class="kd-label">基本信息</span>
<ul class="kd-list"><li>时间:<strong>洪武十三年</strong>(1380年)</li><li>对象:左丞相胡惟庸</li></ul></div>
<div class="kd-block"><span class="kd-label">罪名</span>
<ul class="kd-list"><li>毒杀<strong>刘基</strong>(刘伯温)</li><li>勾结<strong>日本与蒙古</strong></li><li>图谋不轨</li></ul></div>
<div class="kd-block"><span class="kd-label">导火索</span>
<p class="kd-text"><strong>占城国入贡事件</strong>——胡惟庸未报告太祖便自行处理,太祖认为宰相"瞒着他理事"。</p></div>
<div class="kd-block"><span class="kd-label">结果</span>
<ul class="kd-list"><li>诛杀胡惟庸</li><li>废除中书省及丞相一职</li><li>牵连被杀者约<strong>三万余人</strong></li></ul></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>洪武十三年,太祖借胡惟庸案发难。罪名包括毒杀刘基、勾结日本与蒙古、图谋不轨。诛杀胡惟庸,废除中书省及丞相一职。占城国入贡事件为导火索。</div>`
}, {
keyword: "废中书省与丞相",
hint: "废相后六部如何变化?长官品级有什么变动?",
answerHTML: `
<div class="kd-block"><span class="kd-label">制度变革</span>
<ul class="kd-list"><li>废除中书省及丞相一职</li><li><strong>六部</strong>(吏户礼兵刑工)直接由皇帝管辖</li><li>六部长官由<strong>正三品升为正二品</strong></li><li>六部<strong>互不统属</strong>,直接向皇帝负责</li><li>皇帝亲理国政,不再设宰相</li></ul></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>废除中书省及丞相一职。六部直接由皇帝管辖。六部长官由正三品升为正二品。六部互不统属,直接向皇帝负责。皇帝亲理国政,不再设宰相。</div>`
}, {
keyword: "四辅官",
hint: "什么品级?有什么权力?设立背景是什么?",
answerHTML: `
<div class="kd-block"><span class="kd-label">基本信息</span>
<ul class="kd-list"><li>品级:<strong>正三品</strong></li><li>职能:仅作<strong>咨询顾问</strong></li><li>无实际决策权</li><li>直接对皇帝负责</li></ul></div>
<div class="kd-block"><span class="kd-label">设立背景</span>
<p class="kd-text">废相后政务繁忙,太祖曾<strong>8天批阅奏章1600余件,处理政事3000多件</strong>。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>设四辅官(正三品),仅作咨询顾问,无实际决策权,直接对皇帝负责。</div>`
}, {
keyword: "殿阁大学士",
hint: "什么品级?和四辅官有什么区别?这是后来什么制度的雏形?",
answerHTML: `
<div class="kd-block"><span class="kd-label">基本信息</span>
<ul class="kd-list"><li>品级:<strong>正五品</strong></li><li>职能:仅作<strong>咨询顾问</strong></li><li>无实际决策权</li><li>直接对皇帝负责</li></ul></div>
<div class="kd-block"><span class="kd-label">与四辅官的区别</span>
<p class="kd-text">四辅官正三品,殿阁大学士正五品。品级更低,但职能相同——有辅政之名,无辅政之实。这是后来<strong>"内阁"的雏形</strong>。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>设殿阁大学士(正五品),仅作咨询顾问,无实际决策权,直接对皇帝负责。</div>`
}, {
keyword: "通政使司",
hint: "它的职责是什么?为什么设立?成效如何?",
answerHTML: `
<div class="kd-block"><span class="kd-label">设立背景</span>
<p class="kd-text">废除中书省后,希望更直接管控全国奏章。</p></div>
<div class="kd-block"><span class="kd-label">职责</span>
<ul class="kd-list"><li><strong>掌理内外奏疏</strong>(内:中央官员;外:地方官员)</li><li><strong>上奏臣民言论、控诉议政</strong>等事</li></ul></div>
<div class="kd-block"><span class="kd-label">成效</span>
<p class="kd-text">确保全国信息直达皇帝,通达下情。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>设通政使司。掌理内外奏疏。上奏臣民言论、控诉议政等事。确保全国信息直达皇帝,通达下情。</div>`
}, {
keyword: "三法司",
hint: "哪三个机构?各自的职能是什么?最终判决权归谁?",
answerHTML: `
<div class="kd-block"><span class="kd-label">三法司组成</span>
<ul class="kd-list"><li><strong>刑部</strong>——审理案件</li><li><strong>大理寺</strong>——复核判决</li><li><strong>都察院</strong>——监察审理过程</li></ul></div>
<div class="kd-block"><span class="kd-label">运作机制</span>
<ul class="kd-list"><li>重要案件<strong>三司会审</strong></li><li>死刑等最终判决<strong>须由皇帝批准</strong></li></ul></div>
<div class="kd-block"><span class="kd-label">成效</span>
<p class="kd-text">三法司互相牵制,司法权归于天子。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>刑部审理,大理寺复核,都察院监察。重要案件三司会审。死刑等最终判决须由皇帝批准。三法司互相牵制,司法权归于天子。</div>`
}
]
}, {
id: "surveillance",
name: "三、监视大臣方面",
icon: "👁️",
keywords: [
// 笔记顺序:1.中央都察院 → 2.十三道监察御史 → 3.六科给事中 → 4.巡按御史 → 5.锦衣卫
{
keyword: "都察院",
hint: "它的前身是什么?权威如何?监察哪些对象?",
answerHTML: `
<div class="kd-block"><span class="kd-label">基本信息</span>
<ul class="kd-list"><li>前身:<strong>御史台</strong></li><li>权威:与<strong>六部相等</strong></li><li>职能:监察百官——包括六部尚书、吏部考核、刑部审案等</li></ul></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>中央都察院,前身为御史台,权威与六部相等,负责监察百官。</div>`
}, {
keyword: "十三道监察御史",
hint: "他们监察谁?有什么特殊之处?",
answerHTML: `
<div class="kd-block"><span class="kd-label">职能与特点</span>
<ul class="kd-list"><li>职能:监察<strong>地方官员</strong>及纠察吏治</li><li>特殊之处:<strong>不受都察院限制</strong>,直接向皇帝负责</li></ul></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>十三道监察御史监察地方官员及纠察吏治,不受都察院限制,直接向皇帝负责。</div>`
}, {
keyword: "六科给事中",
hint: "他们对应什么部门?有什么特点?目的是什么?",
answerHTML: `
<div class="kd-block"><span class="kd-label">制度设计</span>
<ul class="kd-list"><li>对应<strong>六部</strong>,每科设给事中</li><li>专门监察对应部门的政务执行情况</li><li>特点:<strong>职位低但权责重</strong></li><li>目的:防止六部越权</li></ul></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>六科给事中对应六部,每科设给事中,专门监察对应部门,职位低但权责重,防止六部越权。</div>`
}, {
keyword: "巡按御史",
hint: "他们的职能是什么?",
answerHTML: `
<div class="kd-block"><span class="kd-label">职能</span>
<ul class="kd-list"><li><strong>纠察地方吏治</strong></li><li><strong>巡察地方政务执行情况</strong></li></ul></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>巡按御史纠察地方吏治,巡察地方政务执行情况。</div>`
}, {
keyword: "锦衣卫",
hint: "它的职能是什么?内部两个部门叫什么?有什么特殊权力?",
answerHTML: `
<div class="kd-block"><span class="kd-label">性质演变</span><p class="kd-text">皇帝私人亲军(执掌仪仗)→ 特务机构</p></div>
<div class="kd-block"><span class="kd-label">职能</span>
<ul class="kd-list"><li>侦缉监控臣民言行</li><li>有逮捕叛逆之权</li><li>可直接逮捕、审讯、用刑</li><li><strong>不受一般司法程序约束</strong></li></ul></div>
<div class="kd-block"><span class="kd-label">内部结构</span>
<ul class="kd-list"><li><strong>南镇抚司</strong>——负责锦衣卫内部法纪</li><li><strong>北镇抚司</strong>——审理皇帝钦定案件,设有专门监狱和法庭</li></ul></div>
<div class="kd-block"><span class="kd-label">典型案例与转折</span>
<ul class="kd-list"><li>蓝玉案中非法凌虐,株连诛杀极多</li><li>洪武二十年,太祖焚毁刑具,命重归三法司审理</li></ul></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>锦衣卫原为皇帝私人亲军,执掌仪仗。职能:侦缉监控臣民言行,有逮捕之权,不受司法约束。南镇抚司管内部法纪,北镇抚司审理钦定案件。洪武二十年焚毁刑具。</div>`
}
]
}, {
id: "humiliation",
name: "四、凌辱大臣方面",
icon: "⚔️",
keywords: [
// 笔记顺序:1.发动四大案 → 2.修订法律与整肃吏治 → 3.钳制士人(八股+文字狱) → 4.折辱大臣(跪对+廷杖)
{
keyword: "洪武四大案",
hint: "哪四大案?各牵连多少人?总共多少?动机是什么?",
answerHTML: `
<div class="kd-block"><span class="kd-label">动机</span>
<p class="kd-text">因朱允炆仁弱,太祖虑其无法驾驭群臣,故大开杀戒。</p></div>
<div class="kd-block"><span class="kd-label">四大案</span>
<ul class="kd-list"><li><strong>胡惟庸案</strong>——牵连被杀约<strong>三万余人</strong></li><li><strong>蓝玉案</strong>——牵连被杀约<strong>一万五千人</strong></li><li><strong>空印案</strong></li><li><strong>郭桓案</strong></li></ul></div>
<div class="kd-block"><span class="kd-label">总计</span>
<p class="kd-text">前后铲除<strong>四万余人</strong>,几乎将开国元勋及能干官员诛杀殆尽。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>因朱允炆仁弱,太祖大开杀戒。胡惟庸案牵连约三万余人,蓝玉案约一万五千人。四案合称"洪武四大案",前后铲除四万余人。</div>`
}, {
keyword: "大明律与大诰",
hint: "针对贪官污吏有什么酷刑?贪污多少两会被处死?",
answerHTML: `
<div class="kd-block"><span class="kd-label">法律措施</span>
<ul class="kd-list"><li>在前朝律法基础上制定<strong>《大明律》</strong></li><li>针对贪官污吏颁布<strong>《大诰》</strong>,极尽严酷</li></ul></div>
<div class="kd-block"><span class="kd-label">酷刑</span>
<ul class="kd-list"><li>贪污满<strong>60两白银</strong>——处以<strong>剥皮实草</strong>之刑</li><li>贪赃60两以上——<strong>枭首示众</strong></li><li>若涉谋反——<strong>凌迟、族诛</strong>等酷刑</li></ul></div>
<div class="kd-block"><span class="kd-label">影响</span>
<p class="kd-text">政风因而为之肃然,但也使人人自危。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>制定《大明律》,颁布《大诰》。规定官员贪污满60两白银,处以剥皮实草之刑。贪赃60两以上,枭首示众。</div>`
}, {
keyword: "八股取士",
hint: "考试内容限定什么?格式有什么要求?有何影响?",
answerHTML: `
<div class="kd-block"><span class="kd-label">制度内容</span>
<ul class="kd-list"><li>限定以<strong>四书五经</strong>为题</li><li>须按<strong>八股文格式</strong>作答</li><li><strong>不许发挥己见</strong></li></ul></div>
<div class="kd-block"><span class="kd-label">影响</span><p class="kd-text">士风趋于守旧。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>科举考试限定以四书五经为题,须按八股文格式作答,不许发挥己见。使士风趋于守旧。</div>`
}, {
keyword: "文字狱",
hint: "哪几个字犯忌讳?为什么?有什么后果?",
answerHTML: `
<div class="kd-block"><span class="kd-label">禁忌字及原因</span>
<ul class="kd-list"><li><strong>"生"</strong>——与"僧"同音,暗指太祖曾为僧</li><li><strong>"光"</strong>——联想秃头,犯忌讳</li><li>"则"(贼)、"道"(盗)、"法"(发)等</li></ul></div>
<div class="kd-block"><span class="kd-label">后果</span><p class="kd-text">士人不敢直言,奏章内容空洞。因此处死士人。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>借口官员奏章字眼含讽刺意味,大兴文字狱。"生"与"僧"同音,"光"字联想秃头,因此处死士人。</div>`
}, {
keyword: "跪对奏事",
hint: "宋以前、宋代、明代各是什么礼仪?",
answerHTML: `
<div class="kd-block"><span class="kd-label">礼仪降级史</span>
<ul class="kd-list"><li><strong>宋代以前</strong>——大臣可<strong>坐</strong>而论道</li><li><strong>宋代</strong>——改为<strong>站立</strong>议事</li><li><strong>明太祖</strong>——更降为<strong>跪地</strong>奏事</li></ul></div>
<div class="kd-block"><span class="kd-label">后果</span><p class="kd-text">彻底减杀大臣尊严。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>宋代以前大臣可坐而论道,宋代改为站立议事,明太祖更降为跪地奏事,彻底减杀大臣尊严。</div>`
}, {
keyword: "廷杖制度",
hint: "打多少棍?多少人换一次?有什么影响?",
answerHTML: `
<div class="kd-block"><span class="kd-label">廷杖细节</span>
<ul class="kd-list"><li>奏对不合意者当廷施以廷杖</li><li>每次打<strong>八十棍</strong></li><li><strong>每五棍换一人</strong>行刑</li><li>不少大臣被当场杖死</li></ul></div>
<div class="kd-block"><span class="kd-label">影响</span>
<p class="kd-text">京官每旦入朝,必与妻子诀别,朝不保夕。政风因循苟且,朝臣但求明哲保身。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>廷杖每次打八十棍,每五棍换一人。不少大臣被当场杖死。京官每旦入朝,必与妻子诀别。</div>`
}
]
}, {
id: "local",
name: "五、地方政策方面",
icon: "🏘️",
keywords: [
// 笔记顺序:1.复行封建,分封藩王 → 2.设三司制 → 3.行里甲制
{
keyword: "复行封建",
hint: "分封了多少人?封在哪里?有什么权力?为什么这么做?",
answerHTML: `
<div class="kd-block"><span class="kd-label">背景</span>
<ul class="kd-list"><li>有见宋、元<strong>皇室孤立而亡</strong></li><li>需<strong>防御北方蒙古</strong>势力</li></ul></div>
<div class="kd-block"><span class="kd-label">分封措施</span>
<ul class="kd-list"><li>将<strong>24名儿子及1名侄孙</strong>分封至各地都城及边疆重镇</li><li>封燕王朱棣于<strong>北平</strong>,宁王朱权于<strong>大宁</strong></li><li>诸王可拥有<strong>三千至数万人</strong>军队</li><li>遇朝廷有事,便可<strong>勤王</strong></li></ul></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>将24名儿子及1名侄孙分封至各地都城及边疆重镇。封燕王朱棣于北平。诸王可拥有三千至数万人军队,遇朝廷有事便可勤王。</div>`
}, {
keyword: "三司制",
hint: "哪三司?各自管什么?为什么这样设计?",
answerHTML: `
<div class="kd-block"><span class="kd-label">背景</span><p class="kd-text">元代行省总领军、民、财政,权力过大。</p></div>
<div class="kd-block"><span class="kd-label">三司分工</span>
<ul class="kd-list"><li><strong>承宣布政使司</strong>——掌一省民政、财政</li><li><strong>提刑按察使司</strong>——掌一省之刑狱</li><li><strong>都指挥使司</strong>——掌一省之军事</li></ul></div>
<div class="kd-block"><span class="kd-label">关键设计</span>
<p class="kd-text">三司<strong>互不统属</strong>,各自直属中央。地方政权一分为三,无法形成割据势力。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>承宣布政使司掌一省民政、财政。提刑按察使司掌刑狱。都指挥使司掌军事。三司互不统属,各自直属中央,地方政权一分为三。</div>`
}, {
keyword: "里甲制",
hint: "多少户为一里?里长怎么选?多少户为一甲?职能是什么?",
answerHTML: `
<div class="kd-block"><span class="kd-label">制度设计</span>
<ul class="kd-list"><li>以<strong>110户为一里</strong>,推粮多者为<strong>里长</strong></li><li>每<strong>10户为一甲</strong>,长官为<strong>甲首</strong></li></ul></div>
<div class="kd-block"><span class="kd-label">职能</span>
<ul class="kd-list"><li>协助官府管理地方土地、户口与征税</li><li>协助地方治安</li></ul></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>以110户为一里,推粮多者为里长。每10户为一甲,长官为甲首。协助官府管理土地、户口与征税,并协助地方治安。</div>`
}
]
}, {
id: "military",
name: "六、军事方面",
icon: "⚡",
keywords: [
// 笔记顺序:1.设五军都督府 → 2.推行卫所制
{
keyword: "五军都督府",
hint: "为什么拆分大都督府?兵部和都督府各自有什么权?效果是什么?",
answerHTML: `
<div class="kd-block"><span class="kd-label">背景</span>
<p class="kd-text">明初置枢密院掌理中外军事,后改为<strong>大都督府</strong>统领全国军事。太祖认为权力过大。</p></div>
<div class="kd-block"><span class="kd-label">改革</span>
<ul class="kd-list"><li>分为<strong>左、右、前、后、中</strong>五军都督府</li></ul></div>
<div class="kd-block"><span class="kd-label">制衡设计</span>
<ul class="kd-list"><li><strong>兵部</strong>——有调兵权,无统兵权</li><li><strong>五军都督府</strong>——有统兵权,无调兵权</li></ul></div>
<div class="kd-block"><span class="kd-label">成效</span>
<p class="kd-text">两者互相牵制,不能专兵。军权牢牢掌握在皇帝手中。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>太祖认为大都督府权力过大,将其分为五军都督府。兵部有调兵权无统兵权,五军都督府有统兵权无调兵权。两者互相牵制,军权归皇帝。</div>`
}, {
keyword: "卫所制",
hint: "平时做什么?战时做什么?有什么好处?",
answerHTML: `
<div class="kd-block"><span class="kd-label">制度内容</span>
<ul class="kd-list"><li>平时军人<strong>屯田</strong>,自给自足</li><li>战时<strong>应征打仗</strong></li></ul></div>
<div class="kd-block"><span class="kd-label">成效</span>
<p class="kd-text">兵农合一,节省军费。太祖言:"吾养兵百万,不费百姓一粒米"。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>卫所制兵农合一,平时屯田自给自足,战时应征打仗。太祖言:"吾养兵百万,不费百姓一粒米"。</div>`
}
]
}, {
id: "yongle",
name: "七、明成祖朱棣集权",
icon: "👑",
keywords: [
// 笔记顺序:集权原因 → 1.削藩 → 2.杀戮建文旧臣 → 3.创立内阁 → 4.设东厂 → 5.宠信宦官
{
keyword: "靖难之变",
hint: "朱棣以什么名义起兵?得位之后他有什么特殊心态?",
answerHTML: `
<div class="kd-block"><span class="kd-label">基本信息</span>
<ul class="kd-list"><li>太祖死后,惠帝朱允炆继位</li><li>朱棣本为<strong>燕王</strong></li><li>以<strong>"清君侧、靖内难"</strong>为名起兵</li><li>推翻<strong>建文帝朱允炆</strong></li></ul></div>
<div class="kd-block"><span class="kd-label">集权原因</span>
<p class="kd-text"><strong>得位不正</strong>——武力夺位,正统性先天不足。<strong>深知藩王之害</strong>——本身以藩王武力夺权,太清楚藩王拥兵自重的危险。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>成祖本为燕王,以"清君侧、靖内难"为名发动靖难之变,推翻惠帝。得位不正,且本身以藩王武力夺权,深知藩王拥兵自重之害。</div>`
}, {
keyword: "朱棣削藩",
hint: "哪三步措施?为什么他削藩比建文帝更彻底?",
answerHTML: `
<div class="kd-block"><span class="kd-label">背景</span>
<p class="kd-text">太祖赋予藩王多项权力(军队、封地、管辖权)。成祖深谙其弊,因为他自己就是靠这些权力起兵的。</p></div>
<div class="kd-block"><span class="kd-label">削藩三步</span>
<ul class="kd-list"><li><strong>迁封</strong>——将守边藩王迁往内地,脱离军事实力范围</li><li><strong>削夺兵权</strong>——削减护卫军,严禁干预地方民政</li><li><strong>废封</strong>——对有嫌疑者直接废除封爵</li></ul></div>
<div class="kd-block"><span class="kd-label">成效</span><p class="kd-text">解决明初以来藩王尾大不掉的问题,中央对地方控制力大增。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>迁封:将拥重兵守边的藩王迁往内地。削夺兵权:削减护卫军。废封:对有嫌疑者废除封爵。解决藩王尾大不掉的问题。</div>`
}, {
keyword: "杀戮建文旧臣",
hint: "最有名的例子是谁?被怎么处置的?还任用了哪些人?",
answerHTML: `
<div class="kd-block"><span class="kd-label">典型案例</span>
<ul class="kd-list"><li><strong>方孝孺</strong>——拒绝起草即位诏书</li><li>被<strong>诛十族</strong></li></ul></div>
<div class="kd-block"><span class="kd-label">任用酷吏</span>
<ul class="kd-list"><li><strong>陈瑛、纪纲</strong>等</li></ul></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>诛杀建文朝大臣。方孝孺拒绝起草即位诏书,被诛十族。任用酷吏如陈瑛、纪纲等。</div>`
}, {
keyword: "内阁制度",
hint: "票拟是什么?批红是什么?内阁有什么权力?与宰相有何区别?",
answerHTML: `
<div class="kd-block"><span class="kd-label">设立背景</span>
<p class="kd-text">太祖废相后政务压力全在皇帝一人,成祖为减轻负担。</p></div>
<div class="kd-block"><span class="kd-label">制度内容</span>
<ul class="kd-list"><li>选拔翰林院官员入职<strong>文渊阁</strong></li><li><strong>票拟</strong>——大学士在奏章上贴纸条提初步建议</li><li><strong>批红</strong>——皇帝用红笔最终批示</li><li>官阶仅<strong>正五品</strong>,属宫内编制</li></ul></div>
<div class="kd-block"><span class="kd-label">与宰相区别</span>
<p class="kd-text">宰相是外廷首长,位高权重,有决策权及统率百官之权。内阁无实权,只可票拟。日后实权渐落入宦官手中。</p></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>内阁大学士官阶仅正五品,属宫内编制,仅为皇帝私人顾问。只可票拟,不具备行政执行权。日后实权落入宦官手中。</div>`
}, {
keyword: "东厂",
hint: "由谁掌管?权力比锦衣卫如何?为什么设立?",
answerHTML: `
<div class="kd-block"><span class="kd-label">设立背景</span>
<p class="kd-text">宦官有助成祖夺位,成祖对宦官深为宠幸。在锦衣卫外增设东厂以加强监控。</p></div>
<div class="kd-block"><span class="kd-label">基本信息</span>
<ul class="kd-list"><li>由皇帝亲信<strong>宦官</strong>掌管</li><li>权力<strong>凌驾于锦衣卫之上</strong></li><li>可直接逮捕臣民,<strong>秘密审讯</strong></li><li>合称<strong>"厂卫"</strong></li></ul></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>东厂由皇帝亲信宦官担任,权力凌驾于锦衣卫之上。合称"厂卫",为皇帝巩固君权。</div>`
}, {
keyword: "宠信宦官",
hint: "朱棣为什么宠信宦官?他让宦官做什么?后果是什么?",
answerHTML: `
<div class="kd-block"><span class="kd-label">原因</span>
<ul class="kd-list"><li>宦官助朱棣夺位——靠宦官通风报信才成功</li><li>打破太祖<strong>"内臣不得干预政事"</strong>禁令</li></ul></div>
<div class="kd-block"><span class="kd-label">宦官的任务</span>
<ul class="kd-list"><li>统兵、监军</li><li>出使外国(如<strong>郑和下西洋</strong>)</li></ul></div>
<div class="kd-block"><span class="kd-label">后果</span>
<ul class="kd-list"><li>废相后无大臣能抗衡宦官</li><li>后来:<strong>刘瑾</strong>(立皇帝)、<strong>魏忠贤</strong>(九千岁)</li><li>开启明代宦官乱政祸根</li></ul></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>成祖靠宦官通风报信才成功夺位。打破"内臣不得干预政事"禁令。开启明代宦官乱政祸根。刘瑾、魏忠贤等宦官干政愈演愈烈。</div>`
}
]
}, {
id: "impact",
name: "八、中央集权的影响",
icon: "📋",
keywords: [{
keyword: "六条影响",
hint: "明代中央集权的六大后果分别是什么?",
answerHTML: `
<div class="kd-block"><span class="kd-label">六大影响</span>
<ol class="kd-list" style="list-style:none;padding:0;">
<li style="padding:6px 0 6px 20px;position:relative;"><strong style="position:absolute;left:0;color:#992e22;">1.</strong><strong>君主独裁政治</strong>——废相后无人辅弼,内阁只是顾问</li>
<li style="padding:6px 0 6px 20px;position:relative;"><strong style="position:absolute;left:0;color:#992e22;">2.</strong><strong>特务政治祸根</strong>——厂卫使臣民人人自危</li>
<li style="padding:6px 0 6px 20px;position:relative;"><strong style="position:absolute;left:0;color:#992e22;">3.</strong><strong>士风不正</strong>——因循苟且,明哲保身,不敢直言</li>
<li style="padding:6px 0 6px 20px;position:relative;"><strong style="position:absolute;left:0;color:#992e22;">4.</strong><strong>宗室相残</strong>——靖难之变、高煦之乱</li>
<li style="padding:6px 0 6px 20px;position:relative;"><strong style="position:absolute;left:0;color:#992e22;">5.</strong><strong>行政效率低</strong>——各部门互相牵制,推诿扯皮</li>
<li style="padding:6px 0 6px 20px;position:relative;"><strong style="position:absolute;left:0;color:#992e22;">6.</strong><strong>宦官为患</strong>——刘瑾、魏忠贤干政,开启英宗后宦官乱政</li></ol></div>
<div class="kd-note"><span class="note-label">📝 笔记原文</span>形成君主独裁政治。埋下特务政治祸根。士风不正。开启宗室相残风气。行政效率低。埋下英宗后宦官为患的祸根。</div>`
}]
}];
// ==================== 状态管理 ====================
let currentCategory = null;
let currentKeywordIndex = 0;
let keywordQueue = [];
let evalRecord = {};
try { evalRecord = JSON.parse(localStorage.getItem('mingEvalRecord') || '{}'); } catch (e) { evalRecord = {}; }
function saveRecord() { try { localStorage.setItem('mingEvalRecord', JSON.stringify(evalRecord)); } catch (e) {} }
function getRecordKey(catId, kwIdx) { return catId + '_' + kwIdx; }
// ==================== 主页 ====================
function renderHome() {
const grid = document.getElementById('category-grid');
grid.innerHTML = '';
categories.forEach(cat => {
let mastered = 0,
partial = 0;
cat.keywords.forEach((kw, i) => {
const k = getRecordKey(cat.id, i);
if (evalRecord[k] === 'full') mastered++;
if (evalRecord[k] === 'partial') partial++;
});
const total = cat.keywords.length;
const unlearned = total - mastered - partial;
const card = document.createElement('div');
card.className = 'category-card';
card.onclick = function() { startCategory(cat.id); };
card.innerHTML = `
<div>
<div class="cat-name">${cat.icon} ${cat.name}</div>
<div class="cat-stats">${total}个关键词 | 已掌握:${mastered} | 部分:${partial} | 未学:${unlearned}</div>
<div class="mastery-dots">
${cat.keywords.map((kw,i)=>{
const k=getRecordKey(cat.id,i);
if(evalRecord[k]==='full') return '<div class="dot filled"></div>';
if(evalRecord[k]==='partial') return '<div class="dot partial"></div>';
return '<div class="dot"></div>';
}).join('')}
</div>
</div>
<div class="cat-badge">${unlearned > 0 ? '开始练习 →' : '✅ 全部掌握'}</div>`;
grid.appendChild(card);
});
}
function startCategory(catId) {
currentCategory = categories.find(c => c.id === catId);
if (!currentCategory || currentCategory.keywords.length === 0) { alert('该领域无关键词数据'); return; }
const forgotPartial = [],
unlearned = [],
mastered = [];
currentCategory.keywords.forEach((kw, i) => {
const k = getRecordKey(catId, i);
if (evalRecord[k] === 'forgot' || evalRecord[k] === 'partial') forgotPartial.push(i);
else if (evalRecord[k] === 'full') mastered.push(i);
else unlearned.push(i);
});
shuffle(forgotPartial);
shuffle(unlearned);
shuffle(mastered);
keywordQueue = [...forgotPartial, ...unlearned, ...mastered];
if (keywordQueue.length === 0) { alert('🎉 该领域所有关键词已全部掌握!'); return; }
currentKeywordIndex = 0;
document.getElementById('home-page').style.display = 'none';
document.getElementById('game-page').style.display = 'block';
showKeyword();
}
function startRandom() { startCategory(categories[Math.floor(Math.random() * categories.length)].id); }
function startWeakest() {
let weakest = null,
lowestRate = 1;
categories.forEach(cat => {
let mastered = 0;
cat.keywords.forEach((kw, i) => { if (evalRecord[getRecordKey(cat.id, i)] === 'full') mastered++; });
const rate = cat.keywords.length > 0 ? mastered / cat.keywords.length : 0;
if (rate < lowestRate) { lowestRate = rate;
weakest = cat; }
});
if (weakest && lowestRate < 1) startCategory(weakest.id);
else startRandom();
}
function shuffle(arr) { for (let i = arr.length - 1; i > 0; i--) { const j = Math.floor(Math.random() * (i + 1));
[arr[i], arr[j]] = [arr[j], arr[i]]; } }
// ==================== 游戏页 ====================
function showKeyword() {
if (currentKeywordIndex >= keywordQueue.length) { alert('🎉 本轮练习结束!');
goHome(); return; }
const kwIdx = keywordQueue[currentKeywordIndex];
const kw = currentCategory.keywords[kwIdx];
document.getElementById('kw-label').textContent = currentCategory.icon + ' ' + currentCategory.name;
document.getElementById('kw-keyword').textContent = kw.keyword;
document.getElementById('kw-hint').textContent = '💡 提示:' + kw.hint;
document.getElementById('answer-area').style.display = 'none';
document.getElementById('self-eval').style.display = 'none';
document.getElementById('reveal-btn').style.display = 'inline-block';
document.getElementById('game-progress').innerHTML = '进度:<span>' + (currentKeywordIndex + 1) + '</span> / ' +
keywordQueue.length;
window.scrollTo({ top: 0, behavior: 'smooth' });
}
function revealAnswer() {
const kwIdx = keywordQueue[currentKeywordIndex];
const kw = currentCategory.keywords[kwIdx];
document.getElementById('reveal-btn').style.display = 'none';
document.getElementById('answer-title').textContent = '📜 ' + kw.keyword + ' · 完整笔记';
document.getElementById('answer-body').innerHTML = kw.answerHTML;
document.getElementById('answer-area').style.display = 'block';
document.getElementById('self-eval').style.display = 'block';
document.getElementById('answer-area').scrollIntoView({ behavior: 'smooth', block: 'center' });
}
function selfEval(level) {
const kwIdx = keywordQueue[currentKeywordIndex];
evalRecord[getRecordKey(currentCategory.id, kwIdx)] = level;
saveRecord();
currentKeywordIndex++;
showKeyword();
}
function goHome() {
currentCategory = null;
currentKeywordIndex = 0;
keywordQueue = [];
document.getElementById('home-page').style.display = 'block';
document.getElementById('game-page').style.display = 'none';
renderHome();
window.scrollTo({ top: 0, behavior: 'smooth' });
}
// ==================== 统计弹窗 ====================
function showStats() {
const overlay = document.getElementById('stats-overlay');
const box = document.getElementById('stats-box');
let totalK = 0,
totalF = 0,
totalP = 0;
let html = '<h3>📊 掌握统计</h3>';
categories.forEach(cat => {
let m = 0,
p = 0;
cat.keywords.forEach((kw, i) => {
totalK++;
if (evalRecord[getRecordKey(cat.id, i)] === 'full') { m++;
totalF++; }
if (evalRecord[getRecordKey(cat.id, i)] === 'partial') { p++;
totalP++; }
});
const rate = cat.keywords.length > 0 ? Math.round(m / cat.keywords.length * 100) : 0;
html +=
`<div class="stat-row"><span class="stat-name">${cat.icon} ${cat.name}</span><span class="stat-val">${rate}% (${m}/${cat.keywords.length})</span></div>`;
});
const totalRate = totalK > 0 ? Math.round(totalF / totalK * 100) : 0;
html +=
`<div class="stat-row" style="font-weight:bold;border-top:2px solid #992e22;margin-top:8px;padding-top:12px;"><span>📝 总掌握率</span><span>${totalRate}% (${totalF}/${totalK})</span></div>`;
html += `<div class="stat-row"><span>⚠ 部分记得</span><span>${totalP}</span></div>`;
html += '<button onclick="closeStats()">关闭</button>';
box.innerHTML = html;
overlay.classList.add('show');
}
function closeStats() { document.getElementById('stats-overlay').classList.remove('show'); }
document.getElementById('stats-overlay').addEventListener('click', function(e) { if (e.target === this)
closeStats(); });
// ==================== 初始化 ====================
renderHome();
</script>
</body>
</html>
```Game Source: 关键词触发:明史回忆录
Creator: AtomicWizard88
Libraries: none
Complexity: complex (1030 lines, 60.1 KB)
The full source code is displayed above on this page.
Remix Instructions
To remix this game, copy the source code above and modify it. Add a ARCADELAB header at the top with "remix_of: -atomicwizard88-mpz4b6a8" to link back to the original. Then publish at arcadelab.ai/publish.