- SkillGemData와 SkillLoadoutEntry를 확장해 자기 강화/적중 이상상태와 피해·회복·보호막·위협 배율을 해석하도록 정리 - SkillController와 SkillEffect 경로를 보강해 cast start 이상상태, on-hit 이상상태, 반복 시전, 출력 보정이 실제 효과에 반영되도록 연결 - 강인함/약화 테스트 젬과 자기강화/적중이상/상태복합 프리셋, 디버그 메뉴를 추가해 젬 조합 검증 경로를 보강 - 런타임에서 약화 디버프 적용, 강인함+약화 동시 적용, 파쇄/수호/도전자 보정값 해석을 확인
63 lines
2.2 KiB
C#
63 lines
2.2 KiB
C#
using UnityEngine;
|
|
|
|
using Colosseum.Abnormalities;
|
|
using Colosseum.Combat;
|
|
using Colosseum.Skills;
|
|
|
|
namespace Colosseum.Skills.Effects
|
|
{
|
|
/// <summary>
|
|
/// 이상상태와 위협 생성 배율을 함께 적용하는 자기 강화 효과입니다.
|
|
/// 탱킹 스킬의 방어/위협 유지 용도로 사용합니다.
|
|
/// </summary>
|
|
[CreateAssetMenu(fileName = "CombatBuffEffect", menuName = "Colosseum/Skills/Effects/Combat Buff")]
|
|
public class CombatBuffEffect : SkillEffect
|
|
{
|
|
[Header("Buff")]
|
|
[Tooltip("적용할 이상상태 데이터")]
|
|
[SerializeField] private AbnormalityData abnormalityData;
|
|
|
|
[Tooltip("함께 적용할 위협 생성 배율")]
|
|
[Min(0f)] [SerializeField] private float threatMultiplier = 1f;
|
|
|
|
[Tooltip("위협 생성 배율 지속 시간")]
|
|
[Min(0f)] [SerializeField] private float threatMultiplierDuration = 0f;
|
|
|
|
protected override void ApplyEffect(GameObject caster, GameObject target)
|
|
{
|
|
if (target == null)
|
|
return;
|
|
|
|
ApplyAbnormality(target, caster);
|
|
ApplyThreatMultiplier(target, caster);
|
|
}
|
|
|
|
private void ApplyAbnormality(GameObject target, GameObject caster)
|
|
{
|
|
if (abnormalityData == null)
|
|
return;
|
|
|
|
AbnormalityManager abnormalityManager = target.GetComponent<AbnormalityManager>();
|
|
if (abnormalityManager == null)
|
|
return;
|
|
|
|
abnormalityManager.ApplyAbnormality(abnormalityData, caster);
|
|
}
|
|
|
|
private void ApplyThreatMultiplier(GameObject target, GameObject caster)
|
|
{
|
|
if (threatMultiplier <= 0f || threatMultiplierDuration <= 0f)
|
|
return;
|
|
|
|
ThreatController threatController = target.GetComponent<ThreatController>();
|
|
if (threatController == null)
|
|
{
|
|
threatController = target.AddComponent<ThreatController>();
|
|
}
|
|
|
|
float resolvedThreatMultiplier = SkillRuntimeModifierUtility.GetThreatMultiplier(caster);
|
|
threatController.ApplyThreatMultiplier(threatMultiplier * resolvedThreatMultiplier, threatMultiplierDuration);
|
|
}
|
|
}
|
|
}
|