using UnityEngine; using Colosseum.Combat; using Colosseum.Skills; namespace Colosseum.Skills.Effects { /// /// 시전자 또는 대상의 위협 생성 배율을 일정 시간 증가시킵니다. /// [CreateAssetMenu(fileName = "ThreatModifierEffect", menuName = "Colosseum/Skills/Effects/Threat Modifier")] public class ThreatModifierEffect : SkillEffect { [Header("Threat Modifier")] [Tooltip("적용할 위협 생성 배율")] [Min(0f)] [SerializeField] private float threatMultiplier = 1.5f; [Tooltip("배율 지속 시간")] [Min(0f)] [SerializeField] private float duration = 5f; protected override void ApplyEffect(GameObject caster, GameObject target) { if (target == null || threatMultiplier <= 0f || duration <= 0f) return; ThreatController threatController = target.GetComponent(); if (threatController == null) { threatController = target.AddComponent(); } float resolvedThreatMultiplier = SkillRuntimeModifierUtility.GetThreatMultiplier(caster); threatController.ApplyThreatMultiplier(threatMultiplier * resolvedThreatMultiplier, duration); } } }