feat: 젬 이상상태 및 수치형 보정 확장
- SkillGemData와 SkillLoadoutEntry를 확장해 자기 강화/적중 이상상태와 피해·회복·보호막·위협 배율을 해석하도록 정리 - SkillController와 SkillEffect 경로를 보강해 cast start 이상상태, on-hit 이상상태, 반복 시전, 출력 보정이 실제 효과에 반영되도록 연결 - 강인함/약화 테스트 젬과 자기강화/적중이상/상태복합 프리셋, 디버그 메뉴를 추가해 젬 조합 검증 경로를 보강 - 런타임에서 약화 디버프 적용, 강인함+약화 동시 적용, 파쇄/수호/도전자 보정값 해석을 확인
This commit is contained in:
@@ -51,14 +51,32 @@ namespace Colosseum.Skills
|
||||
/// </summary>
|
||||
public void ExecuteOnCast(GameObject caster)
|
||||
{
|
||||
List<GameObject> targets = new List<GameObject>();
|
||||
CollectTargets(caster, targets);
|
||||
|
||||
for (int i = 0; i < targets.Count; i++)
|
||||
{
|
||||
ApplyEffect(caster, targets[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 현재 효과가 영향을 줄 대상 목록을 수집합니다.
|
||||
/// 젬의 적중 이상상태 적용 등에서 동일한 타겟 해석을 재사용하기 위한 경로입니다.
|
||||
/// </summary>
|
||||
public void CollectTargets(GameObject caster, List<GameObject> destination)
|
||||
{
|
||||
if (caster == null || destination == null)
|
||||
return;
|
||||
|
||||
switch (targetType)
|
||||
{
|
||||
case TargetType.Self:
|
||||
ApplyEffect(caster, caster);
|
||||
AddUniqueTarget(destination, caster);
|
||||
break;
|
||||
|
||||
case TargetType.Area:
|
||||
ExecuteArea(caster);
|
||||
CollectAreaTargets(caster, destination);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -110,17 +128,14 @@ namespace Colosseum.Skills
|
||||
};
|
||||
}
|
||||
|
||||
private void ExecuteArea(GameObject caster)
|
||||
private void CollectAreaTargets(GameObject caster, List<GameObject> destination)
|
||||
{
|
||||
Vector3 center = GetAreaCenter(caster);
|
||||
Collider[] hits = Physics.OverlapSphere(center, Mathf.Max(areaRadius, fanRadius), targetLayers);
|
||||
// 같은 GameObject가 여러 콜라이더를 가질 수 있으므로 중복 제거
|
||||
HashSet<GameObject> processedTargets = new HashSet<GameObject>();
|
||||
foreach (var hit in hits)
|
||||
{
|
||||
if (!includeCasterInArea && hit.gameObject == caster) continue;
|
||||
if (!IsCorrectTeam(caster, hit.gameObject)) continue;
|
||||
if (processedTargets.Contains(hit.gameObject)) continue;
|
||||
// 부채꼴 판정
|
||||
if (areaShape == AreaShapeType.Fan)
|
||||
{
|
||||
@@ -128,11 +143,18 @@ namespace Colosseum.Skills
|
||||
continue;
|
||||
}
|
||||
|
||||
processedTargets.Add(hit.gameObject);
|
||||
ApplyEffect(caster, hit.gameObject);
|
||||
AddUniqueTarget(destination, hit.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
private static void AddUniqueTarget(List<GameObject> destination, GameObject target)
|
||||
{
|
||||
if (target == null || destination.Contains(target))
|
||||
return;
|
||||
|
||||
destination.Add(target);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 타겟이 부채꼴 범위 내에 있는지 확인
|
||||
/// </summary>
|
||||
|
||||
Reference in New Issue
Block a user