[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M77NPK48RQK8VS2AGK0F7TSK":3,"skill-same:01M77NPK48RQK8VS2AGK0F7TSK":47},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":16,"categories":17,"keywords":18,"publishedAt":19,"linkOnly":20,"markdownContent":21,"markdownBody":22,"frontMatter":23,"refName":24,"commitSha":25,"skillDirectory":26,"forksCount":27,"repositoryHtmlUrl":28,"repositoryHomepageUrl":29,"ownerHtmlUrl":30,"ownerBlogUrl":6,"ownerDescription":31,"updatedAt":32,"install":33,"resources":46},"01M77NPK48RQK8VS2AGK0F7TSK","mud-adventure",null,"文字冒险型 MUD 游戏创作助手。用于快速搭建文字冒险游戏的世界观、地图、NPC、物品、任务与对话树。当用户说\"做 MUD\"、\"写文字冒险\"、\"创建mud游戏\"、\"搭建mud世界\"时触发。","Lord1Egypt\u002Fawesome-skill-forge","Lord1Egypt","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F99746359?v=4","01M7592YDNT0XK9WJ0T2MQVPDN","Mohamed Mounir Ali AL Keshita","01M75GRFNHC8VZNWEB8DKDE433",3,"MIT","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fm\u002Fmud-adventure\u002FSKILL.md",[],[],"2026-11-15 14:19:17",false,"---\nname: mud-adventure\ndescription: 文字冒险型 MUD 游戏创作助手。用于快速搭建文字冒险游戏的世界观、地图、NPC、物品、任务与对话树。当用户说\"做 MUD\"、\"写文字冒险\"、\"创建mud游戏\"、\"搭建mud世界\"时触发。\n---\n\n# MUD Adventure Skill\n\n文字冒险型 MUD 游戏创作技能包。帮你从零构建可运行的单文件 Python MUD 游戏。\n\n## 快速开始\n\n游戏核心只需一个 Python 文件（`game.py`），运行方式：\n\n```bash\npython game.py\n```\n\n首次使用，按以下流程构建游戏：\n\n```\n世界观设计 → 地图建模 → 人物\u002F物品 → 对话\u002F任务 → 合并到 game.py\n```\n\n详细设计指南见 `references\u002Fworld-design.md`（世界观、故事结构）\n详细系统指南见 `references\u002Fgame-systems.md`（战斗、物品、任务）\n示例代码见 `references\u002Fexamples.md`\n\n## 默认游戏模板\n\n以下模板可直接复制到 `game.py` 运行，内含 3 个房间、1 个 NPC、1 个战斗场景：\n\n```python\nimport random\n\n# ============ 世界设定 ============\nTITLE = \"迷雾森林\"\nAUTHOR = \"石头龙虾二号\"\n\n# ============ 房间定义 ============\nrooms = {\n    \"入口\": {\n        \"name\": \"森林入口\",\n        \"desc\": \"你站在一棵巨大的古橡树下，晨雾弥漫，四周静得只能听见自己的呼吸。\",\n        \"exits\": {\"北\": \"大厅\", \"东\": \"小屋\"},\n        \"items\": [],\n        \"npcs\": [],\n    },\n    \"大厅\": {\n        \"name\": \"迷雾大厅\",\n        \"desc\": \"雾气中隐约可见一座石制大厅，墙壁上刻着模糊的文字。\",\n        \"exits\": {\"南\": \"入口\", \"北\": \"宝藏室\"},\n        \"items\": [\"古老的钥匙\"],\n        \"npcs\": [\"守卫\"],\n    },\n    \"小屋\": {\n        \"name\": \"林间小屋\",\n        \"desc\": \"一间破旧的小木屋，窗户透出微弱的烛光。\",\n        \"exits\": {\"西\": \"入口\"},\n        \"items\": [\"治疗药水\"],\n        \"npcs\": [\"隐士\"],\n    },\n    \"宝藏室\": {\n        \"name\": \"隐藏宝藏室\",\n        \"desc\": \"你推开门，金光闪闪的宝物堆满了整个房间！\",\n        \"exits\": {\"南\": \"大厅\"},\n        \"items\": [\"黄金剑\"],\n        \"npcs\": [],\n        \"locked\": True,\n    },\n}\n\n# ============ NPC 定义 ============\nnpcs = {\n    \"守卫\": {\n        \"name\": \"石甲守卫\",\n        \"desc\": \"一个身披石甲的沉默战士，目光警惕地盯着你。\",\n        \"hp\": 30,\n        \"attack\": 8,\n        \"dialogue\": {\n            \"你好\": \"守卫冷哼一声：'想过去？先证明你的实力！'\",\n            \"挑战\": \"守卫举起巨剑：'那就来吧！'\",\n            \"离开\": \"守卫退回阴影中，不再说话。\",\n        },\n        \"hostile\": True,\n    },\n    \"隐士\": {\n        \"name\": \"森林隐士\",\n        \"desc\": \"一位白发苍苍的老人，正对着烛火沉思。\",\n        \"hp\": 20,\n        \"attack\": 0,\n        \"dialogue\": {\n            \"你好\": \"隐士微微一笑：'旅人，这片森林藏着许多秘密。'\",\n            \"帮助\": \"隐士点点头：'在大厅的墙壁上，有打开宝藏室的提示。'\",\n            \"离开\": \"隐士挥挥手：'愿森林保佑你。'\",\n        },\n        \"hostile\": False,\n    },\n}\n\n# ============ 物品定义 ============\nitems = {\n    \"古老的钥匙\": {\"name\": \"古老的钥匙\", \"desc\": \"一把生锈但依然坚固的钥匙。\", \"effect\": None},\n    \"治疗药水\": {\"name\": \"治疗药水\", \"desc\": \"散发淡蓝色光芒的恢复药剂。\", \"effect\": \"heal\"},\n    \"黄金剑\": {\"name\": \"黄金剑\", \"desc\": \"传说中的宝剑，剑身流淌着金色的光芒。\", \"effect\": \"power\"},\n}\n\n# ============ 玩家状态 ============\nplayer = {\n    \"hp\": 100,\n    \"max_hp\": 100,\n    \"attack\": 10,\n    \"inventory\": [],\n    \"location\": \"入口\",\n    \"flags\": {\"大厅_交谈过\": False, \"击败守卫\": False},\n}\n\n# ============ 核心函数 ============\ndef print_intro():\n    print(f\"\\n{'='*50}\")\n    print(f\"  🎮 {TITLE}\")\n    print(f\"  作者：{AUTHOR}\")\n    print(f\"{'='*50}\\n\")\n    print(\"输入 'help' 查看所有命令。\\n\")\n\ndef show_room():\n    room = rooms[player[\"location\"]]\n    locked_msg = \" [门被锁住了]\" if room.get(\"locked\") and not player[\"flags\"].get(\"有钥匙\") else \"\"\n    print(f\"\\n📍 【{room['name']}】{locked_msg}\")\n    print(f\"  {room['desc']}\")\n    exits = \"、\".join(room[\"exits\"].keys())\n    print(f\"  出口：{exits}\")\n    if room.get(\"items\"):\n        print(f\"  物品：{', '.join(room['items'])}\")\n    if room.get(\"npcs\"):\n        print(f\"  NPC：{', '.join(room['npcs'])}\")\n\ndef show_help():\n    print(\"\"\"\n  help     - 显示此帮助\n  look     - 环顾四周\n  go \u003C方向> - 向指定方向移动（北\u002F南\u002F东\u002F西\u002F前\u002F后）\n  look \u003C物品>- 查看物品\n  take \u003C物品> - 拾取物品\n  inventory - 查看背包\n  use \u003C物品> - 使用物品\n  talk \u003CNPC> - 与NPC交谈\n  attack \u003CNPC>- 攻击敌人\n  status    - 查看角色状态\n  quit      - 退出游戏\n  \"\"\")\n\ndef move(direction):\n    room = rooms[player[\"location\"]]\n    if direction not in room[\"exits\"]:\n        print(\"  你无法往那个方向走。\")\n        return\n    target = room[\"exits\"][direction]\n    if rooms[target].get(\"locked\") and not player[\"flags\"].get(\"有钥匙\"):\n        print(f\"  {rooms[target]['name']}的门是锁着的。你需要找到钥匙。\")\n        return\n    player[\"location\"] = target\n    show_room()\n\ndef take_item(item_name):\n    room = rooms[player[\"location\"]]\n    for i, item in enumerate(room.get(\"items\", [])):\n        if item_name in item or item in item_name:\n            player[\"inventory\"].append(item)\n            room[\"items\"].pop(i)\n            if item == \"古老的钥匙\":\n                player[\"flags\"][\"有钥匙\"] = True\n            print(f\"  你拾取了「{item}」。\")\n            return\n    print(\"  这里没有这个东西。\")\n\ndef use_item(item_name):\n    for i, item in enumerate(player[\"inventory\"]):\n        if item_name in item or item in item_name:\n            if items[item][\"effect\"] == \"heal\":\n                heal = min(30, player[\"max_hp\"] - player[\"hp\"])\n                player[\"hp\"] += heal\n                player[\"inventory\"].pop(i)\n                print(f\"  你喝下了「{item}」，恢复了 {heal} 点生命！\")\n            elif items[item][\"effect\"] == \"power\":\n                player[\"attack\"] += 5\n                player[\"inventory\"].pop(i)\n                print(f\"  你装备了「{item}」，攻击力提升！\")\n            else:\n                print(f\"  你使用了「{item}」。\")\n            return\n    print(\"  你的背包里没有这个东西。\")\n\ndef talk_to(target):\n    room = rooms[player[\"location\"]]\n    if target not in room.get(\"npcs\", []):\n        print(\"  这里没有这个人。\")\n        return\n    npc = npcs[target]\n    print(f\"\\n  👤 {npc['name']}：{npc['desc']}\")\n    print(\"\\n  你想说什么？（输入选项前的关键词）\")\n    for key in npc[\"dialogue\"]:\n        print(f\"    - {key}\")\n    choice = input(\"\\n  > \").strip()\n    if choice in npc[\"dialogue\"]:\n        print(f\"\\n  {npc['dialogue'][choice]}\")\n        if choice == \"帮助\" and target == \"隐士\":\n            player[\"flags\"][\"大厅_交谈过\"] = True\n    else:\n        print(\"  对方没有回应……\")\n\ndef combat(enemy_id):\n    if enemy_id not in npcs:\n        print(\"  这里没有这个敌人。\")\n        return\n    enemy = npcs[enemy_id]\n    print(f\"\\n  ⚔️  你向 {enemy['name']} 发起了战斗！\")\n    while enemy[\"hp\"] > 0 and player[\"hp\"] > 0:\n        dmg_to_enemy = random.randint(max(1, player[\"attack\"]-3), player[\"attack\"]+3)\n        enemy[\"hp\"] -= dmg_to_enemy\n        print(f\"  你造成了 {dmg_to_enemy} 点伤害。\")\n        if enemy[\"hp\"] \u003C= 0:\n            print(f\"\\n  🎉 你击败了 {enemy['name']}！\")\n            player[\"flags\"][\"击败守卫\"] = True\n            rooms[player[\"location\"]][\"npcs\"].remove(enemy_id)\n            if \"守卫\" in enemy_id:\n                rooms[\"宝藏室\"][\"locked\"] = False\n            return\n        dmg_to_player = random.randint(max(1, enemy[\"attack\"]-2), enemy[\"attack\"]+2)\n        player[\"hp\"] -= dmg_to_player\n        print(f\"  {enemy['name']} 对你造成了 {dmg_to_player} 点伤害！\")\n        print(f\"  你的生命值：{player['hp']}\u002F{player['max_hp']}\")\n        if player[\"hp\"] \u003C= 0:\n            print(\"\\n  💀 你倒下了……游戏结束。\")\n            return\n    print(f\"\\n  敌人生命值：{enemy['hp']}\")\n\ndef main():\n    print_intro()\n    show_room()\n    while True:\n        cmd = input(\"\\n> \").strip()\n        if not cmd:\n            continue\n        parts = cmd.split(maxsplit=1)\n        verb = parts[0].lower()\n        arg = parts[1] if len(parts) > 1 else \"\"\n        if verb in (\"q\", \"quit\", \"exit\"):\n            print(\"\\n  再见，旅人！👋\\n\")\n            break\n        elif verb in (\"help\", \"h\", \"?\"):\n            show_help()\n        elif verb in (\"look\", \"l\"):\n            if arg:\n                for item in rooms[player[\"location\"]].get(\"items\", []):\n                    if arg in item:\n                        print(f\"  {items[item]['desc']}\")\n                        break\n                else:\n                    print(\"  你没有看到这个东西。\")\n            else:\n                show_room()\n        elif verb in (\"go\", \"walk\", \"移动\", \"走\"):\n            move(arg)\n        elif verb in (\"n\", \"s\", \"e\", \"w\", \"north\", \"south\", \"east\", \"west\", \"北\", \"南\", \"东\", \"西\"):\n            dir_map = {\"n\":\"北\",\"s\":\"南\",\"e\":\"东\",\"w\":\"西\",\"north\":\"北\",\"south\":\"南\",\"east\":\"东\",\"west\":\"西\"}\n            move(dir_map.get(verb, verb))\n        elif verb in (\"take\", \"get\", \"捡\", \"拿\"):\n            take_item(arg)\n        elif verb in (\"inv\", \"inventory\", \"i\", \"背包\", \"物品\"):\n            if player[\"inventory\"]:\n                print(\"  背包：\" + \"、\".join(player[\"inventory\"]))\n            else:\n                print(\"  背包是空的。\")\n        elif verb in (\"use\", \"use\", \"使用\"):\n            use_item(arg)\n        elif verb in (\"talk\", \"chat\", \"说\", \"谈\"):\n            talk_to(arg if arg else input(\"  和谁交谈？> \").strip())\n        elif verb in (\"attack\", \"kill\", \"打\", \"攻击\", \"fight\"):\n            room_npcs = rooms[player[\"location\"]].get(\"npcs\", [])\n            if not room_npcs:\n                print(\"  这里没有可以攻击的目标。\")\n            elif len(room_npcs) == 1:\n                combat(room_npcs[0])\n            else:\n                combat(arg if arg else input(\"  攻击谁？> \").strip())\n        elif verb in (\"status\", \"sta\", \"状态\"):\n            print(f\"  HP：{player['hp']}\u002F{player['max_hp']} | 攻击：{player['attack']}\")\n\nif __name__ == \"__main__\":\n    main()\n```\n\n## 扩展指南\n\n### 添加新房间\n在 `rooms` 字典中新增键值对，定义 `name`、`desc`、`exits`、`items`、`npcs`。\n\n### 添加新 NPC\n在 `npcs` 字典中定义，设置 `name`、`desc`、`hp`、`attack`、`dialogue`、`hostile`。\n\n### 添加新物品\n在 `items` 字典中定义，设置 `name`、`desc`、`effect`（None\u002Fheal\u002Fpower\u002Fcustom）。\n\n### 添加战斗系统\n参考 `references\u002Fgame-systems.md` 中的战斗系统设计，可扩展：经验值、等级、怪物掉落、魔法技能。\n\n### 添加任务系统\n参考 `references\u002Fgame-systems.md` 中的任务系统，用 `player[\"flags\"]` 跟踪任务进度。\n","# MUD Adventure Skill\n\n文字冒险型 MUD 游戏创作技能包。帮你从零构建可运行的单文件 Python MUD 游戏。\n\n## 快速开始\n\n游戏核心只需一个 Python 文件（`game.py`），运行方式：\n\n```bash\npython game.py\n```\n\n首次使用，按以下流程构建游戏：\n\n```\n世界观设计 → 地图建模 → 人物\u002F物品 → 对话\u002F任务 → 合并到 game.py\n```\n\n详细设计指南见 `references\u002Fworld-design.md`（世界观、故事结构）\n详细系统指南见 `references\u002Fgame-systems.md`（战斗、物品、任务）\n示例代码见 `references\u002Fexamples.md`\n\n## 默认游戏模板\n\n以下模板可直接复制到 `game.py` 运行，内含 3 个房间、1 个 NPC、1 个战斗场景：\n\n```python\nimport random\n\n# ============ 世界设定 ============\nTITLE = \"迷雾森林\"\nAUTHOR = \"石头龙虾二号\"\n\n# ============ 房间定义 ============\nrooms = {\n    \"入口\": {\n        \"name\": \"森林入口\",\n        \"desc\": \"你站在一棵巨大的古橡树下，晨雾弥漫，四周静得只能听见自己的呼吸。\",\n        \"exits\": {\"北\": \"大厅\", \"东\": \"小屋\"},\n        \"items\": [],\n        \"npcs\": [],\n    },\n    \"大厅\": {\n        \"name\": \"迷雾大厅\",\n        \"desc\": \"雾气中隐约可见一座石制大厅，墙壁上刻着模糊的文字。\",\n        \"exits\": {\"南\": \"入口\", \"北\": \"宝藏室\"},\n        \"items\": [\"古老的钥匙\"],\n        \"npcs\": [\"守卫\"],\n    },\n    \"小屋\": {\n        \"name\": \"林间小屋\",\n        \"desc\": \"一间破旧的小木屋，窗户透出微弱的烛光。\",\n        \"exits\": {\"西\": \"入口\"},\n        \"items\": [\"治疗药水\"],\n        \"npcs\": [\"隐士\"],\n    },\n    \"宝藏室\": {\n        \"name\": \"隐藏宝藏室\",\n        \"desc\": \"你推开门，金光闪闪的宝物堆满了整个房间！\",\n        \"exits\": {\"南\": \"大厅\"},\n        \"items\": [\"黄金剑\"],\n        \"npcs\": [],\n        \"locked\": True,\n    },\n}\n\n# ============ NPC 定义 ============\nnpcs = {\n    \"守卫\": {\n        \"name\": \"石甲守卫\",\n        \"desc\": \"一个身披石甲的沉默战士，目光警惕地盯着你。\",\n        \"hp\": 30,\n        \"attack\": 8,\n        \"dialogue\": {\n            \"你好\": \"守卫冷哼一声：'想过去？先证明你的实力！'\",\n            \"挑战\": \"守卫举起巨剑：'那就来吧！'\",\n            \"离开\": \"守卫退回阴影中，不再说话。\",\n        },\n        \"hostile\": True,\n    },\n    \"隐士\": {\n        \"name\": \"森林隐士\",\n        \"desc\": \"一位白发苍苍的老人，正对着烛火沉思。\",\n        \"hp\": 20,\n        \"attack\": 0,\n        \"dialogue\": {\n            \"你好\": \"隐士微微一笑：'旅人，这片森林藏着许多秘密。'\",\n            \"帮助\": \"隐士点点头：'在大厅的墙壁上，有打开宝藏室的提示。'\",\n            \"离开\": \"隐士挥挥手：'愿森林保佑你。'\",\n        },\n        \"hostile\": False,\n    },\n}\n\n# ============ 物品定义 ============\nitems = {\n    \"古老的钥匙\": {\"name\": \"古老的钥匙\", \"desc\": \"一把生锈但依然坚固的钥匙。\", \"effect\": None},\n    \"治疗药水\": {\"name\": \"治疗药水\", \"desc\": \"散发淡蓝色光芒的恢复药剂。\", \"effect\": \"heal\"},\n    \"黄金剑\": {\"name\": \"黄金剑\", \"desc\": \"传说中的宝剑，剑身流淌着金色的光芒。\", \"effect\": \"power\"},\n}\n\n# ============ 玩家状态 ============\nplayer = {\n    \"hp\": 100,\n    \"max_hp\": 100,\n    \"attack\": 10,\n    \"inventory\": [],\n    \"location\": \"入口\",\n    \"flags\": {\"大厅_交谈过\": False, \"击败守卫\": False},\n}\n\n# ============ 核心函数 ============\ndef print_intro():\n    print(f\"\\n{'='*50}\")\n    print(f\"  🎮 {TITLE}\")\n    print(f\"  作者：{AUTHOR}\")\n    print(f\"{'='*50}\\n\")\n    print(\"输入 'help' 查看所有命令。\\n\")\n\ndef show_room():\n    room = rooms[player[\"location\"]]\n    locked_msg = \" [门被锁住了]\" if room.get(\"locked\") and not player[\"flags\"].get(\"有钥匙\") else \"\"\n    print(f\"\\n📍 【{room['name']}】{locked_msg}\")\n    print(f\"  {room['desc']}\")\n    exits = \"、\".join(room[\"exits\"].keys())\n    print(f\"  出口：{exits}\")\n    if room.get(\"items\"):\n        print(f\"  物品：{', '.join(room['items'])}\")\n    if room.get(\"npcs\"):\n        print(f\"  NPC：{', '.join(room['npcs'])}\")\n\ndef show_help():\n    print(\"\"\"\n  help     - 显示此帮助\n  look     - 环顾四周\n  go \u003C方向> - 向指定方向移动（北\u002F南\u002F东\u002F西\u002F前\u002F后）\n  look \u003C物品>- 查看物品\n  take \u003C物品> - 拾取物品\n  inventory - 查看背包\n  use \u003C物品> - 使用物品\n  talk \u003CNPC> - 与NPC交谈\n  attack \u003CNPC>- 攻击敌人\n  status    - 查看角色状态\n  quit      - 退出游戏\n  \"\"\")\n\ndef move(direction):\n    room = rooms[player[\"location\"]]\n    if direction not in room[\"exits\"]:\n        print(\"  你无法往那个方向走。\")\n        return\n    target = room[\"exits\"][direction]\n    if rooms[target].get(\"locked\") and not player[\"flags\"].get(\"有钥匙\"):\n        print(f\"  {rooms[target]['name']}的门是锁着的。你需要找到钥匙。\")\n        return\n    player[\"location\"] = target\n    show_room()\n\ndef take_item(item_name):\n    room = rooms[player[\"location\"]]\n    for i, item in enumerate(room.get(\"items\", [])):\n        if item_name in item or item in item_name:\n            player[\"inventory\"].append(item)\n            room[\"items\"].pop(i)\n            if item == \"古老的钥匙\":\n                player[\"flags\"][\"有钥匙\"] = True\n            print(f\"  你拾取了「{item}」。\")\n            return\n    print(\"  这里没有这个东西。\")\n\ndef use_item(item_name):\n    for i, item in enumerate(player[\"inventory\"]):\n        if item_name in item or item in item_name:\n            if items[item][\"effect\"] == \"heal\":\n                heal = min(30, player[\"max_hp\"] - player[\"hp\"])\n                player[\"hp\"] += heal\n                player[\"inventory\"].pop(i)\n                print(f\"  你喝下了「{item}」，恢复了 {heal} 点生命！\")\n            elif items[item][\"effect\"] == \"power\":\n                player[\"attack\"] += 5\n                player[\"inventory\"].pop(i)\n                print(f\"  你装备了「{item}」，攻击力提升！\")\n            else:\n                print(f\"  你使用了「{item}」。\")\n            return\n    print(\"  你的背包里没有这个东西。\")\n\ndef talk_to(target):\n    room = rooms[player[\"location\"]]\n    if target not in room.get(\"npcs\", []):\n        print(\"  这里没有这个人。\")\n        return\n    npc = npcs[target]\n    print(f\"\\n  👤 {npc['name']}：{npc['desc']}\")\n    print(\"\\n  你想说什么？（输入选项前的关键词）\")\n    for key in npc[\"dialogue\"]:\n        print(f\"    - {key}\")\n    choice = input(\"\\n  > \").strip()\n    if choice in npc[\"dialogue\"]:\n        print(f\"\\n  {npc['dialogue'][choice]}\")\n        if choice == \"帮助\" and target == \"隐士\":\n            player[\"flags\"][\"大厅_交谈过\"] = True\n    else:\n        print(\"  对方没有回应……\")\n\ndef combat(enemy_id):\n    if enemy_id not in npcs:\n        print(\"  这里没有这个敌人。\")\n        return\n    enemy = npcs[enemy_id]\n    print(f\"\\n  ⚔️  你向 {enemy['name']} 发起了战斗！\")\n    while enemy[\"hp\"] > 0 and player[\"hp\"] > 0:\n        dmg_to_enemy = random.randint(max(1, player[\"attack\"]-3), player[\"attack\"]+3)\n        enemy[\"hp\"] -= dmg_to_enemy\n        print(f\"  你造成了 {dmg_to_enemy} 点伤害。\")\n        if enemy[\"hp\"] \u003C= 0:\n            print(f\"\\n  🎉 你击败了 {enemy['name']}！\")\n            player[\"flags\"][\"击败守卫\"] = True\n            rooms[player[\"location\"]][\"npcs\"].remove(enemy_id)\n            if \"守卫\" in enemy_id:\n                rooms[\"宝藏室\"][\"locked\"] = False\n            return\n        dmg_to_player = random.randint(max(1, enemy[\"attack\"]-2), enemy[\"attack\"]+2)\n        player[\"hp\"] -= dmg_to_player\n        print(f\"  {enemy['name']} 对你造成了 {dmg_to_player} 点伤害！\")\n        print(f\"  你的生命值：{player['hp']}\u002F{player['max_hp']}\")\n        if player[\"hp\"] \u003C= 0:\n            print(\"\\n  💀 你倒下了……游戏结束。\")\n            return\n    print(f\"\\n  敌人生命值：{enemy['hp']}\")\n\ndef main():\n    print_intro()\n    show_room()\n    while True:\n        cmd = input(\"\\n> \").strip()\n        if not cmd:\n            continue\n        parts = cmd.split(maxsplit=1)\n        verb = parts[0].lower()\n        arg = parts[1] if len(parts) > 1 else \"\"\n        if verb in (\"q\", \"quit\", \"exit\"):\n            print(\"\\n  再见，旅人！👋\\n\")\n            break\n        elif verb in (\"help\", \"h\", \"?\"):\n            show_help()\n        elif verb in (\"look\", \"l\"):\n            if arg:\n                for item in rooms[player[\"location\"]].get(\"items\", []):\n                    if arg in item:\n                        print(f\"  {items[item]['desc']}\")\n                        break\n                else:\n                    print(\"  你没有看到这个东西。\")\n            else:\n                show_room()\n        elif verb in (\"go\", \"walk\", \"移动\", \"走\"):\n            move(arg)\n        elif verb in (\"n\", \"s\", \"e\", \"w\", \"north\", \"south\", \"east\", \"west\", \"北\", \"南\", \"东\", \"西\"):\n            dir_map = {\"n\":\"北\",\"s\":\"南\",\"e\":\"东\",\"w\":\"西\",\"north\":\"北\",\"south\":\"南\",\"east\":\"东\",\"west\":\"西\"}\n            move(dir_map.get(verb, verb))\n        elif verb in (\"take\", \"get\", \"捡\", \"拿\"):\n            take_item(arg)\n        elif verb in (\"inv\", \"inventory\", \"i\", \"背包\", \"物品\"):\n            if player[\"inventory\"]:\n                print(\"  背包：\" + \"、\".join(player[\"inventory\"]))\n            else:\n                print(\"  背包是空的。\")\n        elif verb in (\"use\", \"use\", \"使用\"):\n            use_item(arg)\n        elif verb in (\"talk\", \"chat\", \"说\", \"谈\"):\n            talk_to(arg if arg else input(\"  和谁交谈？> \").strip())\n        elif verb in (\"attack\", \"kill\", \"打\", \"攻击\", \"fight\"):\n            room_npcs = rooms[player[\"location\"]].get(\"npcs\", [])\n            if not room_npcs:\n                print(\"  这里没有可以攻击的目标。\")\n            elif len(room_npcs) == 1:\n                combat(room_npcs[0])\n            else:\n                combat(arg if arg else input(\"  攻击谁？> \").strip())\n        elif verb in (\"status\", \"sta\", \"状态\"):\n            print(f\"  HP：{player['hp']}\u002F{player['max_hp']} | 攻击：{player['attack']}\")\n\nif __name__ == \"__main__\":\n    main()\n```\n\n## 扩展指南\n\n### 添加新房间\n在 `rooms` 字典中新增键值对，定义 `name`、`desc`、`exits`、`items`、`npcs`。\n\n### 添加新 NPC\n在 `npcs` 字典中定义，设置 `name`、`desc`、`hp`、`attack`、`dialogue`、`hostile`。\n\n### 添加新物品\n在 `items` 字典中定义，设置 `name`、`desc`、`effect`（None\u002Fheal\u002Fpower\u002Fcustom）。\n\n### 添加战斗系统\n参考 `references\u002Fgame-systems.md` 中的战斗系统设计，可扩展：经验值、等级、怪物掉落、魔法技能。\n\n### 添加任务系统\n参考 `references\u002Fgame-systems.md` 中的任务系统，用 `player[\"flags\"]` 跟踪任务进度。\n",{"name":5,"description":7},"master","4aa004da461d820f4ea5499e58eb8d196cf99016","community\u002Fclawhub\u002Fm\u002Fmud-adventure",0,"https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge","https:\u002F\u002Fskill-explorer-rho.vercel.app","https:\u002F\u002Fgithub.com\u002FLord1Egypt","Unbreakable. Unstoppable. Unmatched⚡.\r\n Speaker of machine tongues 🤖  | World-builder of decentralized dreams 🌐 | Defender of the digital realm🛡️.","2026-06-10 08:21:01",{"source":8,"skillName":5,"commands":34,"prompt":44,"zipAvailable":45},[35,38,41],{"tool":36,"command":37},"npx","npx skills add Lord1Egypt\u002Fawesome-skill-forge --skill mud-adventure",{"tool":39,"command":40},"bunx","bunx skills add Lord1Egypt\u002Fawesome-skill-forge --skill mud-adventure",{"tool":42,"command":43},"pnpm","pnpm dlx skills add Lord1Egypt\u002Fawesome-skill-forge --skill mud-adventure","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fcommunity\u002Fclawhub\u002Fm\u002Fmud-adventure\u002FSKILL.md",true,[],[48,55,62,69,76,83],{"skillNo":49,"name":50,"nameZh":6,"description":51,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":52,"categories":53,"keywords":54,"publishedAt":19},"01M785WKJB99G3STR1NF9NRTJW","youtube-content","YouTube transcripts to summaries, threads, blogs.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fyoutube-content\u002FSKILL.md",[],[],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":19},"01M785WEFHB0G2S9YA6EPR3H0E","xurl","X\u002FTwitter via xurl CLI: post, search, DM, media, v2 API.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fxurl\u002FSKILL.md",[],[],{"skillNo":63,"name":64,"nameZh":6,"description":65,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":66,"categories":67,"keywords":68,"publishedAt":19},"01M785W98EDN4EFJXJPMQEHCRC","touchdesigner-mcp","Control a running TouchDesigner instance via twozero MCP — create operators, set parameters, wire connections, execute Python, build real-time visuals. 36 native tools.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftouchdesigner-mcp\u002FSKILL.md",[],[],{"skillNo":70,"name":71,"nameZh":6,"description":72,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":73,"categories":74,"keywords":75,"publishedAt":19},"01M785W5S9FP3QBH2V191E025P","test-driven-development","TDD: enforce RED-GREEN-REFACTOR, tests before code.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Ftest-driven-development\u002FSKILL.md",[],[],{"skillNo":77,"name":78,"nameZh":6,"description":79,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":80,"categories":81,"keywords":82,"publishedAt":19},"01M785W2AS08NSSH9YATCV6FJB","teams-meeting-pipeline","Operate the Teams meeting summary pipeline via Hermes CLI — summarize meetings, inspect pipeline status, replay jobs, manage Microsoft Graph subscriptions.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fteams-meeting-pipeline\u002FSKILL.md",[],[],{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":12,"repositoryNo":13,"starsCount":14,"licenseSpdxId":15,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":19},"01M785VXKW4T34BTP1SCHW1R7F","systematic-debugging","4-phase root cause debugging: understand bugs before fixing.","https:\u002F\u002Fgithub.com\u002FLord1Egypt\u002Fawesome-skill-forge\u002Fblob\u002Fmaster\u002Fskills\u002Fsystematic-debugging\u002FSKILL.md",[],[]]