feat: 서포트 스킬(힐/보호막/버프) 위협 생성 시스템 추가
- ThreatUtility: 공통 위협 생성 유틸리티 (OverlapSphere 기반 반경 내 적 탐색) - OverlapSphereNonAlloc 버퍼 32→256 확장으로 씬 콜라이더 누락 수정 - 위협 배율 체인: SkillGem × ThreatController × Passive - HealEffect: flatThreat + (actualHeal × threatPercent) 공식 적용 - ShieldEffect: flatThreat + (actualShield × threatPercent) 공식 적용 - AbnormalityEffect: flatThreat 고정 위협 생성 - EditMode 유닛 테스트 9/9 통과 (SupportThreatTests) - 테스트 씬 UI 레이아웃 수정 사항 포함
This commit is contained in:
@@ -1,11 +1,15 @@
|
||||
using UnityEngine;
|
||||
|
||||
using Colosseum.Abnormalities;
|
||||
using Colosseum.Combat;
|
||||
using Colosseum.Skills;
|
||||
|
||||
namespace Colosseum.Skills.Effects
|
||||
{
|
||||
/// <summary>
|
||||
/// 이상 상태 효과
|
||||
/// AbnormalityManager를 통해 대상에게 이상 상태를 적용합니다.
|
||||
/// 이상 상태 효과.
|
||||
/// AbnormalityManager를 통해 대상에게 이상 상태를 적용하며,
|
||||
/// 버프 적용 시 적에게 위협을 생성할 수 있습니다.
|
||||
/// </summary>
|
||||
[CreateAssetMenu(fileName = "AbnormalityEffect", menuName = "Colosseum/Skills/Effects/Abnormality")]
|
||||
public class AbnormalityEffect : SkillEffect
|
||||
@@ -14,6 +18,12 @@ namespace Colosseum.Skills.Effects
|
||||
[Tooltip("적용할 이상 상태 데이터")]
|
||||
[SerializeField] private AbnormalityData abnormalityData;
|
||||
|
||||
[Header("Threat")]
|
||||
[Tooltip("버프 적용 시 생성할 고정 위협 수치")]
|
||||
[Min(0f)] [SerializeField] private float flatThreatAmount = 5f;
|
||||
[Tooltip("위협을 생성할 반경 (시전자 기준)")]
|
||||
[Min(0f)] [SerializeField] private float threatRadius = 50f;
|
||||
|
||||
protected override void ApplyEffect(GameObject caster, GameObject target)
|
||||
{
|
||||
if (target == null) return;
|
||||
@@ -24,6 +34,12 @@ namespace Colosseum.Skills.Effects
|
||||
if (abnormalityManager == null) return;
|
||||
|
||||
abnormalityManager.ApplyAbnormality(abnormalityData, caster);
|
||||
|
||||
// 위협 생성: 고정 수치
|
||||
if (flatThreatAmount > 0f)
|
||||
{
|
||||
ThreatUtility.GenerateThreatOnNearbyEnemies(caster, flatThreatAmount, threatRadius);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user