using System.Collections.Generic; namespace Models; /// /// 运行时全局状态(GameState) /// 设计说明: /// 1) 将“局内状态”集中在一个聚合对象中,便于存档与调试快照。 /// 2) 具体子状态按职责拆分:回合/经济/人员/任务/库存/羁绊。 /// 3) Controller/System 只依赖这份数据,不直接操作 View。 /// 注意事项: /// - 这是运行时数据,不是配置数据;配置请看 *Definition 类。 /// - 禁止在这里引用 Godot Node,保持纯数据。 /// 未来扩展: /// - 可加入“存档版本号”和“迁移器”,支持版本升级。 /// - 可加入“局外 Roguelite 状态”,与局内共享接口。 /// public sealed class GameState { /// /// 回合状态 /// public TurnState Turn { get; } = new(); /// /// 经济状态 /// public EconomyState Economy { get; } = new(); /// /// 人员状态 /// public RosterState Roster { get; } = new(); /// /// 任务状态 /// public TaskState Tasks { get; } = new(); /// /// 库存状态 /// public InventoryState Inventory { get; } = new(); /// /// 协同状态 /// public SynergyState Synergy { get; } = new(); /// /// 肉鸽状态 /// public RogueliteState Roguelite { get; } = new(); } /// /// 游戏阶段 /// public enum GamePhase { Planning, // 筹备阶段 Execution, // 执行阶段 Review // 结算阶段 } /// /// 回合状态数据 /// public sealed class TurnState { /// /// 当前回合 /// public int CurrentTurn { get; set; } = 1; /// /// 最大回合 /// public int MaxTurns { get; set; } = 30; /// /// 当前阶段 /// public GamePhase Phase { get; set; } = GamePhase.Planning; } /// /// 经济状态数据 /// public sealed class EconomyState { /// /// 资金 /// public int Money { get; set; } = 50000; /// /// 声望 /// public int Reputation { get; set; } /// /// 科研点数 /// public int ResearchPoints { get; set; } /// /// 利率 /// public float InterestRate { get; set; } = 0.0f; } /// /// 人员状态数据 /// public sealed class RosterState { /// /// 导师模型 /// public MentorModel Mentor { get; set; } = new("Player"); /// /// 学生列表 /// public List Students { get; } = new(); /// /// 职工列表 /// public List Staffs { get; } = new(); } /// /// 任务状态数据 /// public sealed class TaskState { /// /// 活动任务列表 /// public List ActiveTasks { get; } = new(); /// /// 已完成任务列表 /// public List CompletedTasks { get; } = new(); /// /// 失败任务列表 /// public List FailedTasks { get; } = new(); } /// /// 库存状态数据 /// public sealed class InventoryState { /// /// 物品计数 /// public Dictionary ItemCounts { get; } = new(); /// /// 论文计数 /// public Dictionary PaperCounts { get; } = new(); } /// /// 协同状态数据 /// public sealed class SynergyState { /// /// 原型堆叠数 /// public Dictionary ArchetypeStacks { get; } = new(); /// /// 角色堆叠数 /// public Dictionary RoleStacks { get; } = new(); /// /// 激活的协同ID列表 /// public List ActiveSynergyIds { get; } = new(); /// /// 激活的修正包 /// public ModifierBundle ActiveModifiers { get; } = new(); } /// /// 肉鸽状态数据 /// public sealed class RogueliteState { /// /// 校友卡ID列表 /// public List AlumniCardIds { get; } = new(); /// /// 遗产解锁ID列表 /// public List LegacyUnlockIds { get; } = new(); /// /// 头衔保留等级 /// public int TitleRetentionLevel { get; set; } }