Files
Colosseum/Assets/_Game/Scripts/Combat/Simulation/RotationPolicy.cs
dal4segno 285da31047 feat: 허수아비 계산 시뮬레이터 추가
- 빌드 입력, 룰셋, 회전 정책, 결과/리포트 모델을 포함한 데미지 계산 시뮬레이터 기반을 추가
- 단일 실행 창과 배치 전수 조사 창, 플레이어 데미지 스윕 메뉴를 추가
- DamageEffect 계산값 접근자를 열어 기존 전투 공식을 시뮬레이터에서 재사용하도록 정리
2026-03-28 15:07:09 +09:00

57 lines
2.4 KiB
C#

using UnityEngine;
namespace Colosseum.Combat.Simulation
{
/// <summary>
/// 허수아비 계산 시뮬레이터의 회전 규칙입니다.
/// </summary>
[System.Serializable]
public class RotationPolicy
{
[Header("Label")]
[SerializeField] private string policyName = "기본 우선순위";
[Header("Priority")]
[Tooltip("앞에서부터 우선 적용할 슬롯 순서입니다. 0 기반 인덱스를 사용합니다.")]
[SerializeField] private int[] prioritySlots = new[] { 0, 1, 2, 3, 4, 5 };
[Header("Fallback")]
[SerializeField] private bool useFallbackSlot = true;
[Min(0)] [SerializeField] private int fallbackSlotIndex = 0;
[Header("High Power Skill")]
[SerializeField] private bool delayHighPowerSkillUntilTime;
[Min(0)] [SerializeField] private int highPowerSlotIndex = 5;
[Min(0f)] [SerializeField] private float highPowerFirstUseTime = 0f;
public string PolicyName => string.IsNullOrWhiteSpace(policyName) ? "Rotation" : policyName.Trim();
public int[] PrioritySlots => prioritySlots ?? System.Array.Empty<int>();
public bool UseFallbackSlot => useFallbackSlot;
public int FallbackSlotIndex => Mathf.Max(0, fallbackSlotIndex);
public bool DelayHighPowerSkillUntilTime => delayHighPowerSkillUntilTime;
public int HighPowerSlotIndex => Mathf.Max(0, highPowerSlotIndex);
public float HighPowerFirstUseTime => Mathf.Max(0f, highPowerFirstUseTime);
/// <summary>
/// 회전 정책 값을 한 번에 설정합니다.
/// </summary>
public void Configure(
string policyName,
int[] prioritySlots,
bool useFallbackSlot,
int fallbackSlotIndex,
bool delayHighPowerSkillUntilTime,
int highPowerSlotIndex,
float highPowerFirstUseTime)
{
this.policyName = policyName ?? string.Empty;
this.prioritySlots = prioritySlots ?? System.Array.Empty<int>();
this.useFallbackSlot = useFallbackSlot;
this.fallbackSlotIndex = Mathf.Max(0, fallbackSlotIndex);
this.delayHighPowerSkillUntilTime = delayHighPowerSkillUntilTime;
this.highPowerSlotIndex = Mathf.Max(0, highPowerSlotIndex);
this.highPowerFirstUseTime = Mathf.Max(0f, highPowerFirstUseTime);
}
}
}