feat: 스킬 시스템 사망 상태 처리
사망 상태에서 스킬 사용 및 이펙트 발동 방지 Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-opencode) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -104,6 +104,14 @@ namespace Colosseum.Skills
|
||||
return false;
|
||||
}
|
||||
|
||||
// 사망 상태면 스킬 사용 불가
|
||||
var damageable = GetComponent<Colosseum.Combat.IDamageable>();
|
||||
if (damageable != null && damageable.IsDead)
|
||||
{
|
||||
if (debugMode) Debug.Log($"[Skill] Cannot execute skill - owner is dead");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (IsExecutingSkill)
|
||||
{
|
||||
if (debugMode) Debug.Log($"Already executing skill: {currentSkill.SkillName}");
|
||||
@@ -204,6 +212,14 @@ namespace Colosseum.Skills
|
||||
return;
|
||||
}
|
||||
|
||||
// 사망 상태면 효과 발동 중단
|
||||
var damageable = GetComponent<Colosseum.Combat.IDamageable>();
|
||||
if (damageable != null && damageable.IsDead)
|
||||
{
|
||||
if (debugMode) Debug.Log($"[Effect] Cancelled - owner is dead");
|
||||
return;
|
||||
}
|
||||
|
||||
var effects = currentSkill.Effects;
|
||||
if (index < 0 || index >= effects.Count)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user