원클릭으로
goose-adventure-game
《尼尔斯骑鹅旅行记》文字冒险游戏引擎。创建一个基于Python的互动文字游戏,包含完整的剧情系统、状态管理、存档功能和成就系统。当用户需要:创建文字冒险游戏、开发互动故事系统、构建游戏引擎、实现存档管理、设计分支剧情时使用此skill。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
《尼尔斯骑鹅旅行记》文字冒险游戏引擎。创建一个基于Python的互动文字游戏,包含完整的剧情系统、状态管理、存档功能和成就系统。当用户需要:创建文字冒险游戏、开发互动故事系统、构建游戏引擎、实现存档管理、设计分支剧情时使用此skill。
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
Review any business decision, plan, or strategy through the minimalist entrepreneur lens. Use when someone wants a gut-check on a business decision, wants to simplify their approach, or needs to decide between options.
Help define company values and culture for a minimalist business. Use when someone is setting up their company culture, preparing to hire, or wanting to codify what their company stands for.
Help identify and evaluate communities to build a minimalist business around. Use when someone is looking for a business idea, trying to find their community, or wondering where to start as an entrepreneur.
Search and retrieve content from Twitter/X. Get user info, tweets, replies, followers, communities, spaces, and trends via twitterapi.io. Use when user mentions Twitter, X, or tweets.
Update Excel files with latest stock market data including open, high, low, close prices, volume, and price changes. Supports multiple data sources (Yahoo Finance, AkShare) and automatically matches stocks by code or name. Use when users need to: (1) Update stock prices in Excel spreadsheets, (2) Fetch latest market data for multiple stocks, (3) Add trading data columns to existing stock lists, (4) Work with Chinese A-shares, Hong Kong stocks, or US stocks in Excel format.
Extracts and analyzes competitors' ads from ad libraries (Facebook, LinkedIn, etc.) to understand what messaging, problems, and creative approaches are working. Helps inspire and improve your own ad campaigns.
| name | goose-adventure-game |
| description | 《尼尔斯骑鹅旅行记》文字冒险游戏引擎。创建一个基于Python的互动文字游戏,包含完整的剧情系统、状态管理、存档功能和成就系统。当用户需要:创建文字冒险游戏、开发互动故事系统、构建游戏引擎、实现存档管理、设计分支剧情时使用此skill。 |
这是一个完整的文字冒险游戏引擎,专为《尼尔斯骑鹅旅行记》故事设计。游戏引擎支持:
# 使用 Python 运行游戏引擎
python3 scripts/game_engine.py
# 或使用 pnpm(如果需要)
pnpm run game
goose-adventure-game/
├── scripts/
│ ├── game_engine.py # 游戏引擎主类
│ ├── game_script.json # 游戏剧本数据
│ └── save_manager.py # 存档管理器
├── saves/ # 存档目录(自动创建)
└── SKILL.md # 本文档
from scripts.game_engine import GameEngine, load_script_from_file
# 加载游戏脚本
script = load_script_from_file("scripts/game_script.json")
# 创建游戏引擎
engine = GameEngine(script, save_dir="./saves")
# 渲染当前场景
scene = engine.render_scene()
print(f"{scene['title']}\n{scene['description']}")
# 显示选项
for choice in scene['choices']:
print(f"{choice['index']}: {choice['text']}")
# 玩家做出选择
engine.make_choice(0) # 选择第一个选项
# 保存游戏
engine.save_game("slot1")
游戏状态包含以下属性:
| 属性 | 类型 | 范围 | 说明 |
|---|---|---|---|
hp | int | 0-100 | 生命值 |
morality | int | 0-100 | 道德值(决定结局) |
size | int | 0-100 | 大小值(0=拇指大小,100=正常) |
knowledge | int | 0-1000 | 知识值 |
inventory | list | - | 物品栏 |
achievements | list | - | 成就列表 |
flags | dict | - | 事件标志 |
每个场景包含:
{
"id": "scene_id",
"title": "场景标题",
"description": "场景描述",
"choices": [
{
"text": "选项文本",
"next_scene": "下一场景ID",
"requirements": {
"morality_min": 50,
"has_item": "key"
},
"effects": {
"moral_change": 10,
"add_item": "key",
"set_flag": {"met_npc": true}
}
}
]
}
支持的触发条件:
has_item - 检查物品flag - 检查事件标志morality_min/max - 道德值范围size_min/max - 大小值范围has_achievement - 检查成就支持的效果类型:
add_item / remove_item - 物品管理hp_change - 生命值变化size_change - 大小值变化set_flag - 设置事件标志add_achievement - 添加成就moral_change - 道德值变化knowledge_gain - 获得知识from scripts.save_manager import SaveManager
manager = SaveManager(save_dir="./saves")
# 保存游戏
manager.save_game("slot1", game_data)
# 加载游戏
game_data = manager.load_game("slot1")
# 列出所有存档
saves = manager.list_saves()
# 删除存档
manager.delete_save("slot1")
from scripts.save_manager import AutoSaveManager
auto_save = AutoSaveManager(manager, auto_save_interval=5)
# 每个场景变化后检查
auto_save.on_scene_change("autosave", game_data)
# 强制保存
auto_save.force_save("quicksave", game_data)
在 game_script.json 的 scenes 数组中添加:
{
"id": "my_new_scene",
"chapter": 1,
"title": "新场景标题",
"description": "场景描述...",
"choices": [
{
"text": "选项1",
"next_scene": "scene_a"
},
{
"text": "选项2",
"next_scene": "scene_b",
"requirements": {"morality_min": 50},
"effects": {"moral_change": 10}
}
]
}
在 game_script.json 的 endings 数组中添加:
{
"id": "special_ending",
"title": "特殊结局",
"description": "结局描述...",
"requirements": {
"morality_min": 80,
"flag": ["special_event", true]
}
}
游戏包含以下成就:
在场景的效果中添加:
{
"effects": {
"add_achievement": "🏆 自定义成就"
}
}
state = engine.state
print(f"生命值: {state.hp}")
print(f"道德值: {state.morality}")
print(f"知识值: {state.knowledge}")
print(f"物品: {state.inventory}")
print(f"成就: {state.achievements}")
engine.state.current_scene = "target_scene_id"
engine.state.morality = 80
engine.state.knowledge = 500
engine.state.inventory.append("special_item")
game_script.json 作为模板game_info 中的标题和描述scenes 数组中的场景endings 数组中的结局游戏引擎采用模块化设计,可以轻松扩展:
GameEngine 类中添加新方法GameState 类中添加新属性