using System;
using System.Collections.Generic;
namespace Models;
///
/// 学生数据模型 (StudentModel)
/// 包含学生的数值、状态和特质。
/// 与 Godot 的 Node (View) 分离,便于序列化和逻辑处理。
///
public class StudentModel: UnitModel
{
public enum StudentType
{
MasterCandidate,
DoctorCandidate
}
// --- 静态属性 (Property) ---
///
/// 学生类型
///
public StudentType Type { get; private set; }
// --- 动态状态 (Status) ---
///
/// 体力 (Stamina)
/// 范围 0-100。工作消耗体力,休息恢复。体力过低效率下降。
///
public StatusValue Stamina { get; set; }
///
/// 忠诚度 (Loyalty)
/// 范围 0-100。过低可能跳槽或举报。
///
public StatusValue Loyalty { get; set; }
///
/// 年级
///
public StatusValue Grade { get; set; }
///
/// 记录对每个 Task 的贡献量,用于署名分配
///
public Dictionary Contributions { get; set; }
///
/// 特质列表 (如 "DDL战士", "卷王")
///
public List Traits { get; set; } = [];
public StudentModel(string name) : base(name)
{
var random = new Random();
Stamina = new StatusValue(random.Next(100),100, 0);
Loyalty = new StatusValue(80, 100, 0);
Type = random.Next(2) == 0 ? StudentType.MasterCandidate : StudentType.DoctorCandidate;
Grade = new StatusValue(0, Type == StudentType.DoctorCandidate ? 6 : 3);
}
}