using SepCore.Definition;
namespace SepCore.Battle
{
///
/// 一次效果对单个目标的一层行动记录。
/// 表达行动者、行动、目标以及数值或状态变化;
/// StatusType 为 None 时表示没有状态变化。
///
public sealed class BattleEvent
{
///
/// 行动者。
///
public readonly int ActorUnitId;
///
/// 指令类型,对应配表 BattleActionType。
///
public readonly BattleActionType CommandType;
///
/// 攻击或技能配置 ID;逃跑为 0。
///
public readonly int ActionConfigId;
///
/// 效果结算的目标单位。
///
public readonly int TargetUnitId;
///
/// 效果结算前的 HP。
///
public readonly int BeforeHp;
///
/// 效果结算后的 HP。
///
public readonly int AfterHp;
///
/// 效果结算前的 MP。
///
public readonly int BeforeMp;
///
/// 效果结算后的 MP。
///
public readonly int AfterMp;
///
/// 施加或刷新的状态类型;无状态变化时为 None。
///
public readonly BattleStatusType StatusType;
///
/// 变化后的剩余持续次数(行动机会);状态被移除时为 0。
///
public readonly int StatusRemainingRounds;
public BattleEvent(int actorUnitId, BattleActionType commandType, int actionConfigId,
int targetUnitId, int beforeHp, int afterHp, int beforeMp, int afterMp,
BattleStatusType statusType, int statusRemainingRounds)
{
ActorUnitId = actorUnitId;
CommandType = commandType;
ActionConfigId = actionConfigId;
TargetUnitId = targetUnitId;
BeforeHp = beforeHp;
AfterHp = afterHp;
BeforeMp = beforeMp;
AfterMp = afterMp;
StatusType = statusType;
StatusRemainingRounds = statusRemainingRounds;
}
}
}