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(); public List ActiveSynergyIds { get; } = new(); public ModifierBundle ActiveModifiers { get; } = new(); } public sealed class RogueliteState { public List AlumniCardIds { get; } = new(); public List LegacyUnlockIds { get; } = new(); public int TitleRetentionLevel { get; set; } }