🎮ArcadeLab

洪武:集权之路

by AtomicWizard88
61 lines3.3 KB
▶ Play
<!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:"微软雅黑",宋体;}
        body{max-width:700px;margin:30px auto;padding:20px;background:#f6f3ec;}
        .box{background:#fff;padding:30px;border-radius:12px;box-shadow:0 2px 12px #ddd;}
        h2{color:#8b3828;margin-bottom:20px;}
        #story{font-size:17px;line-height:1.8;margin-bottom:30px;min-height:120px;}
        .btn-box{display:flex;flex-direction:column;gap:12px;}
        button{padding:12px;border:none;border-radius:8px;background:#992e22;color:#fff;font-size:16px;cursor:pointer;}
        .knowledge{display:none;margin-top:25px;padding:20px;background:#fff8e6;border:1px solid #ffdd99;border-radius:8px;}
        .knowledge h4{color:#b35000;margin-bottom:10px;}
    </style>
</head>
<body>
<div class="box">
    <h2>第一章:猜忌的种子|场景1:饥荒中的少年</h2>
    <div id="story">
元末,濠州钟离,一个破败的村庄。
你出生在一户贫苦农家。那一年大旱,庄稼颗粒无收。你的父亲、母亲、大哥,都在饥荒中接连饿死。
你站在亲人的坟前,身无分文。村里能吃的树皮都扒光了,能跑的邻居都跑光了。你跪在坟前磕了三个头,然后站起来,需要做一个决定。
    </div>
    <div class="btn-box">
        <button onclick="choose('A')">A. 去皇觉寺当和尚,至少有口饭吃。</button>
        <button onclick="choose('B')">B. 去投奔起义军,拿命换饭吃。</button>
        <button onclick="choose('C')">C. 继续守着这片地,祈祷明年能下雨。</button>
    </div>
    <!--知识点弹窗,选择后自动出现-->
    <div class="knowledge" id="kd">
        <h4>知识点:朱元璋的出身与性格</h4>
        <p>明太祖朱元璋,出身贫苦,曾为僧侣、乞丐。这段经历深刻影响了他的性格——猜忌多疑、权力欲极强。从一无所有到掌控天下,他的底层生存经历让他对任何人都不信任。<br>笔记原文:“出身贫苦,曾为僧侣、乞丐,养成猜忌多疑、权力欲极强的性格。”</p>
    </div>
</div>

<script>
// 【在这里替换你的剧情和知识点,只改引号里文字即可】
function choose(opt){
    let resText = "";
    //A选项剧情
    if(opt=="A"){
        resText = "你在皇觉寺敲了八年木鱼。但饥荒还是来了,寺庙也养不起这么多张嘴。住持把年轻和尚都赶出了寺门,你端着一个破碗,沿街乞讨。你蹲在墙角,一个老乞丐分了你半个馊馒头:世上除了自己,谁都靠不住。当夜你投奔郭子兴起义军。";
    }
    //B选项剧情
    else if(opt=="B"){
        resText = "你扔掉锄头加入起义军,底层军旅生涯里,见识战友为粮食反目、将领视士兵为炮灰,乱世教会你:信任会引来杀身之祸。";
    }
    //C选项剧情
    else if(opt=="C"){
        resText = "你死守田地,次年饥荒更烈,邻里尽数饿死,认清乱世不争必死,弃农从军。";
    }
    //更新剧情、弹出知识点
    document.getElementById("story").innerText = resText;
    document.getElementById("kd").style.display = "block";
}
</script>
</body>
</html>

Game Source: 洪武:集权之路

Creator: AtomicWizard88

Libraries: none

Complexity: moderate (61 lines, 3.3 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" to link back to the original. Then publish at arcadelab.ai/publish.