This commit is contained in:
wjsjwr 2025-12-04 22:31:58 +08:00
parent 8c064b3e6f
commit e2d7427892
2 changed files with 81 additions and 0 deletions

31
AGENTS.md Normal file
View File

@ -0,0 +1,31 @@
# Repository Guidelines
## Project Structure & Module Organization
- Godot 4.5 C# project (`导师模拟器.csproj`, `project.godot`) targeting .NET 8; main scene is `scenes/logo_scene.tscn`.
- Gameplay scripts live in `scripts/`; AI task assets in `ai/` (`ai/tasks` for logic, `.tres` for definitions).
- Scenes sit in `scenes/`; shared art/audio in `resources/` and placeholder art in `temp_res/`; shaders in `shaders/`; plugins in `addons/`; animation clips in `Animation/`.
- Add new scenes under `scenes/` and attach scripts there; keep reusable utilities in `scripts/Helpers*` or a new `scripts/common/` subfolder.
## Build, Test, and Development Commands
- `godot4 --headless --build-solutions` (or the Godot 4.5.1 Windows exe) regenerates C# bindings after adding scripts.
- `dotnet build` compiles the game code against Godot assemblies.
- `godot4 .` runs the game with the configured main scene; `godot4 --editor` opens the project for level/content work.
- Optional: `dotnet format` to auto-format C# before committing.
## Coding Style & Naming Conventions
- Match existing style: tabs for indentation, partial classes inheriting from Godot nodes, PascalCase for classes/methods, camelCase for fields, ALL_CAPS for constants.
- Keep resource paths lowercase with underscores (`scenes/logo_scene.tscn`, `resources/...`). Avoid absolute OS paths; prefer `res://`.
- When exporting variables, prefer `[Export] public` properties/fields with descriptive names.
## Testing Guidelines
- No automated tests are present yet; prefer lightweight Godot script tests or `dotnet test` once a `tests/` project is added.
- Aim to cover input handling, drag/drop, and scene transitions (`SceneTransit`, `GameManager`) when adding tests. Document new test commands in PRs.
## Commit & Pull Request Guidelines
- Use short, imperative commit titles similar to existing history (e.g., "Cube drag and drop", "Watch mobile phone"); add a scope tag when helpful (`[scripts] Fix drag`). English is preferred; bilingual is acceptable.
- PRs should state the behavior change, files/scenes touched, test commands run, and include screenshots or GIFs for visual changes. Link related issues/tasks and keep PRs focused/small.
## Asset & Configuration Tips
- Commit Godot import metadata (`*.import`, `.godot/`) alongside assets to avoid reimport churn.
- Keep reusable assets in `resources/`; stash throwaway or WIP art in `temp_res/` and clean before release.
- Modify project settings through the Godot editor rather than hand-editing `project.godot`; update `run/main_scene` if the entry scene moves.

50
docs/design.md Normal file
View File

@ -0,0 +1,50 @@
# 最强导师:核心设计文档(头脑风暴稿)
## 核心循环(每回合=1学年
1) 任务:根据回合数和人物属性发布任务。
2) 决策:分配导师/学生任务(课程、研究、论文、拉经费、竞赛、休养)。
3) 自走:棋子按属性和任务行动,插入事件,产出论文/项目/专利/声望/资金,累积压力与心情变化。
4) 招募:根据声望、项目、论文等级生成候选学生,受上限限制可买入或替换。
5) 年终:结算资源、晋升/降级、设施升级检查健康与资金满30回合或失败条件触发结束。
## 棋盘与设施(校园式布局)
- 棋盘为校园平面:实验楼、教学楼、图书馆、机房、会议中心、宿舍、咖啡厅、行政楼、体育馆等分区组成;任务会指派棋子移动到对应地点执行,自走阶段沿最短路径行走,可触发途中事件(偶遇合作、临检、停电等)。
- 设施格提供位置加成:服务器(算力)、实验台(实践成功率)、会议区(写作/答辩效率)、休闲区(减压)。核心分区可升级,如机房算力、图书馆资料、咖啡厅减压、会议中心声望曝光。
- 位置策略:把高算力任务靠近机房;写作/答辩靠会议中心或图书馆;高压学生多路过休闲区/咖啡厅;会议中心邻近行政楼有申请项目概率加成。
## 棋子与属性
- 导师(唯一):学术、管理、写作、筹资、魅力、体力/压力上限、洞察;流派特质:严师、佛系、卷王、关系户、工业党等。
- 学生模板:理论学霸、工程猛人、卷王写手、摆烂摸鱼、社交达人、跨界艺术生……
- 核心数值:学术、实践、写作、筹资、心情、压力、忠诚、时间槽;羁绊标签(同宿舍/同届/竞赛队友)提供组队增益或冲突。
## 任务卡池(决策阶段)
- 课程助教、顶会论文、项目申请、横向合作、竞赛/挑战、产学合作、专利、开源贡献、组会、心理辅导、休假、打工外包。
- 任务有属性阈值与deadline强度多人协作可提高成功率但分摊收益。
## 事件系统(自走阶段)
- 日常:审稿结果、小修大修、设备宕机、被拉去开会。
- 机遇校内基金、企业赞助、Workshop 名额、竞赛直邀。
- 风险:学术不端举报、数据丢失、师生冲突、学生出国/转组。
- 23 选项决策,影响资源、压力、忠诚和声望。
## 毕业与延毕规则
- 硕士入队后第3回合末自动毕业离场博士第6回合末毕业。计时不暂停界面需显示“剩余年限”。
- 延毕:仅毕业当年的决策阶段可触发;寿命+1回合并立刻触发特殊事件正负随机。代价导师时间槽+1/回合,学生压力基线+10%,忠诚随事件波动;每学生限一次。
## 棋子上限
- 基础上限4上限增长 = floor(声望/30) + floor(项目数/2)硬上限10。延毕占用名额超限时需毕业/解雇后再招。
## 成长与进阶
- 学生升年级获取专长(如 Reviewer 视角、代码洁癖);毕业可转博后/助教或成为校友被动。
- 导师路线:学术流/工程流/关系流/养生流,对应技能(无损熬夜、写作冲刺、谈判加成、压力减免)。
## 资源与胜负
- 资源资金、声望、项目数、论文等级B/C/A/S、专利、合作度、健康/压力。
- 失败压力爆表猝倒、资金断裂、声望归零被调岗胜利坚持30回合以科研分+传承分+生活分综合评分。
## UI/UX 提示
- 年度看板:资金/压力曲线、论文管线甘特图;棋子 tooltip 雷达图+压力条事件log可回看提供有限“后悔药”。
## 技术与数据
- Godot 4.5 C#;数据驱动表(任务、事件、棋子模板、设施升级);随机可复盘(种子化)。
- 建议周末小游戏(写作冲刺/答辩辩经)影响当年论文结果,强化操作感。