feat: 무기 배율 시스템 통합
- DamageEffect: 무기 데미지 배율 적용 (GetDamageMultiplier) - PlayerSkillInput: 무기 마나 소모 배율 적용 (GetActualManaCost) - SkillEffect: 무기 사거리 배율 적용 (가상 메서드로 구현) Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -2,6 +2,7 @@ using UnityEngine;
|
||||
|
||||
using Colosseum.Stats;
|
||||
using Colosseum.Combat;
|
||||
using Colosseum.Weapons;
|
||||
|
||||
namespace Colosseum.Skills.Effects
|
||||
{
|
||||
@@ -68,7 +69,24 @@ namespace Colosseum.Skills.Effects
|
||||
_ => 0f,
|
||||
};
|
||||
|
||||
return baseDamage + (statDamage * statScaling);
|
||||
float baseTotal = baseDamage + (statDamage * statScaling);
|
||||
|
||||
// 무기 데미지 배율 적용
|
||||
float damageMultiplier = GetDamageMultiplier(caster);
|
||||
return baseTotal * damageMultiplier;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 시전자의 무기 데미지 배율 조회
|
||||
/// </summary>
|
||||
private float GetDamageMultiplier(GameObject caster)
|
||||
{
|
||||
var weaponEquipment = caster.GetComponent<WeaponEquipment>();
|
||||
if (weaponEquipment != null)
|
||||
{
|
||||
return weaponEquipment.DamageMultiplier;
|
||||
}
|
||||
return 1f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using Colosseum;
|
||||
using Colosseum.Weapons;
|
||||
|
||||
namespace Colosseum.Skills
|
||||
{
|
||||
@@ -106,12 +108,13 @@ namespace Colosseum.Skills
|
||||
{
|
||||
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 (hit.gameObject == caster) continue;
|
||||
if (!IsCorrectTeam(caster, hit.gameObject)) continue;
|
||||
|
||||
if (processedTargets.Contains(hit.gameObject)) continue;
|
||||
// 부채꼴 판정
|
||||
if (areaShape == AreaShapeType.Fan)
|
||||
{
|
||||
@@ -119,6 +122,7 @@ namespace Colosseum.Skills
|
||||
continue;
|
||||
}
|
||||
|
||||
processedTargets.Add(hit.gameObject);
|
||||
ApplyEffect(caster, hit.gameObject);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user