supervisor-simulator/scripts/Models/TaskDefinitions.cs
2026-01-18 20:05:23 +08:00

90 lines
2.8 KiB
C#
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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();
}