- 组合式单位与数值基础重构:scripts/Models/UnitModel.cs, scripts/Models/UnitComponents.cs, scripts/Models/StudentModel.cs, scripts/Models/MentorModel.cs, scripts/Models/StaffModel.cs, scripts/Models/PropertyValue.cs, scripts/Models/StatusValue.cs - 任务与运行时状态骨架:scripts/Models/Task.cs, scripts/Models/TaskDefinitions.cs, scripts/Models/GameState.cs - 配置与规则定义骨架:scripts/Models/DefinitionSupport.cs, scripts/Models/DomainEnums.cs, scripts/Models/Modifiers.cs, scripts/Models/DisciplineDefinitions.cs, scripts/Models/SynergyDefinitions.cs, scripts/Models/ItemDefinitions.cs, scripts/Models/PaperDefinitions.cs, scripts/Models/RogueliteDefinitions.cs, scripts/Models/GameContentDatabase.cs, scripts/Models/CoreIds.cs - MVC/会话/系统/i18n/Mod 支撑:scripts/Core/GameSession.cs, scripts/Core/GameSystems.cs, scripts/Core/GameController.cs, scripts/Core/Mvc.cs, scripts/Core/LocalizationService.cs, scripts/Core/ContentRegistry.cs, scripts/Core/ModManifest.cs, scripts/Core/EventBus.cs - 主控流程衔接:scripts/GameManager.cs
102 lines
2.7 KiB
C#
102 lines
2.7 KiB
C#
using System.Collections.Generic;
|
||
|
||
namespace Models;
|
||
|
||
/// <summary>
|
||
/// 任务定义与枚举(配置层)
|
||
/// 设计说明:
|
||
/// 1) Definition 描述“任务是什么”,TaskModel 描述“任务正在发生什么”。
|
||
/// 2) 任务类别与难度与设计文档一致,方便 UI/系统层做分流。
|
||
/// 3) Requirements/Rewards 以组合结构表示,便于 Mod 追加新条件。
|
||
/// 注意事项:
|
||
/// - 不在此处写具体数值表,仅提供结构骨架。
|
||
/// - 业务系统应优先读取 Definition,而不是硬编码逻辑。
|
||
/// 未来扩展:
|
||
/// - 可加入“阶段式任务”与“事件触发任务”字段。
|
||
/// - 可加入“动态难度曲线”,用于 Roguelite 调整强度。
|
||
/// </summary>
|
||
public enum TaskTrack
|
||
{
|
||
Tenure, // 生涯考核
|
||
LabProject // 实验室项目
|
||
}
|
||
|
||
public enum TaskKind
|
||
{
|
||
AcademicExploration, // 学术探索:产出论文
|
||
GrantVertical, // 纵向基金:强制门票
|
||
GrantHorizontal, // 横向项目:搞钱
|
||
Administrative, // 行政事务:干扰项
|
||
Milestone, // 目标型考核
|
||
Conference // 会议大招
|
||
}
|
||
|
||
public enum TaskDifficulty
|
||
{
|
||
Water,
|
||
Standard,
|
||
Hardcore,
|
||
BlackBox
|
||
}
|
||
|
||
public enum PaperRank
|
||
{
|
||
C,
|
||
B,
|
||
A,
|
||
S,
|
||
SPlus
|
||
}
|
||
|
||
public sealed class TaskDefinition
|
||
{
|
||
public DefinitionHeader Header { get; set; } = new();
|
||
public TaskTrack Track { get; set; }
|
||
public TaskKind Kind { get; set; }
|
||
public TaskDifficulty Difficulty { get; set; }
|
||
public TaskRuntimeConfig Runtime { get; set; } = new();
|
||
public TaskRequirements Requirements { get; set; } = new();
|
||
public TaskRewards Rewards { get; set; } = new();
|
||
|
||
public List<string> AllowedDisciplineIds { get; } = new();
|
||
public List<string> RecommendedRoleIds { get; } = new();
|
||
public List<string> RecommendedArchetypeIds { get; } = new();
|
||
}
|
||
|
||
public sealed class TaskRuntimeConfig
|
||
{
|
||
public float Workload { get; set; }
|
||
public int DeadlineTurns { get; set; }
|
||
public float DifficultyScale { get; set; } = 1.0f;
|
||
public int MaxAssignedSlots { get; set; } = 3;
|
||
}
|
||
|
||
public sealed class TaskRequirements
|
||
{
|
||
public List<PaperRequirement> PaperTickets { get; } = new();
|
||
public List<AttributeRequirement> AttributeChecks { get; } = new();
|
||
public List<string> RequiredRoleIds { get; } = new();
|
||
}
|
||
|
||
public sealed class PaperRequirement
|
||
{
|
||
public PaperRank Rank { get; set; }
|
||
public int Count { get; set; }
|
||
}
|
||
|
||
public sealed class AttributeRequirement
|
||
{
|
||
public AttributeType Type { get; set; }
|
||
public int MinValue { get; set; }
|
||
}
|
||
|
||
public sealed class TaskRewards
|
||
{
|
||
public int Money { get; set; }
|
||
public int Reputation { get; set; }
|
||
public List<string> PaperIds { get; } = new();
|
||
public List<string> ItemIds { get; } = new();
|
||
public List<string> BuffIds { get; } = new();
|
||
}
|
||
|