Integrate endings rewards consumables and docs#5
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
新版系统整合改动详细说明
本文档记录本次新版整合中已经落地的代码改动,方便负责地图、角色、UI、系统逻辑、后续 C++ 重构的同学理解当前实现边界。
一、版本融合与分支基础
本次开发前先从 GitHub 主仓库拉取了最新
origin/master,并将本地已有改动与远端合并后的版本融合。本次改动基于当前主流程继续开发,没有重新推翻原有架构。主要目标是把轮回、结局、关间奖励、消耗品、饰品掉落等玩法逻辑接入主程序,同时尽量保持模块职责清晰。
二、轮回与家族选择逻辑
相关文件:
systems/run/lineage_director.gdui/character_select.gdui/heir_select_panel.gdapp_entry.gdworld.gd已实现内容:
当前设计边界:
三、结局与存档封存
相关文件:
systems/run/save_manager.gdsystems/run/lineage_director.gdui/save_slot_select.gdui/result_screen.gdworld.gd已实现内容:
ending_type字段。SaveManager.seal_active_ending()封存档案。当前支持的结局类型:
break_crown:打碎王冠,真结局。ember_extinguished:五个火种耗尽,火种熄灭结局。escape:奔向远方,开放结局。crown_bad:三个家族都成为皇帝后仍戴上王冠,坏结局。当前开放结局实现:
四、关间奖励三选一
相关文件:
world.gdui/stage_reward_panel.gd已实现内容:
RunDirector的 pending encounter prep,只在下一张小地图生效。状态稀有度:
当前状态池:
注意:
run_event_panel仍保留,后续商店、教堂、军需库可以继续使用或重构。stage_reward_panel.gd与商店事件解耦,不直接处理金币交易。五、消耗品系统
相关文件:
systems/consumables/consumable_manager.gdui/consumable_bar.gdworld.gdproject.godot已实现内容:
ConsumableManager自动加载单例。ConsumableManager中,世界主流程只调用公开 API。当前消耗品:
bandage_pack:绷带包,恢复 22% 最大生命。healing_vial:急救瓶,恢复 35% 最大生命。medkit:医疗箱,恢复 55% 最大生命。armor_patch:轻甲包,恢复 45% 最大护甲。inspiration_ampoule:守护蜡烛,恢复 45% 最大灵感。edge_oil:磨刀油,使下一场战斗攻击伤害提升 10%。已接入的消耗品素材:
assets/ui/consumable/bandage_pack.pngassets/ui/consumable/first_aid_bottle.pngassets/ui/consumable/medkit.pngassets/ui/consumable/light_armor_pack.pngassets/ui/consumable/protective_candle.pngassets/ui/consumable/sharpening_oil.png六、怪物掉落与地图拾取物
相关文件:
world.gdsystems/pickups/run_pickup.gd已实现内容:
RunPickup支持外部传入icon,可以显示真实 PNG 图标。掉落规则:
七、饰品展示位置
相关文件:
ui/inventory_panel.gdworld.gdsystems/accessories/accessory_manager.gd当前建议与实现方向:
后续如果要做“饰品背包多件持有”,建议不要直接塞进战斗 UI,而是在背包里做独立页签:
八、主流程变化
相关文件:
world.gd旧流程:
新流程:
九、测试更新
相关文件:
tests/smoke_run_flow.gdtests/smoke_accessory_flow.gdtests/smoke_lineage_save.gd已更新内容:
已通过的 smoke 测试:
tests/smoke_run_flow.gdtests/smoke_accessory_flow.gdtests/smoke_lineage_save.gdtests/smoke_story_endings.gdtests/smoke_ui_screens.gd说明:
Godot headless 测试结束时仍会打印 RID/resource 泄漏警告,这是当前项目中已有的 headless 退出警告;本次验证以进程退出码为准,以上测试退出码均为 0。
十、后续建议
ConsumableManager和后续武器升级 API,不要直接改角色字段。