refactor: 집행개시 시그니처 전용 경로를 BT 일반 패턴 스텝으로 통합
- PatternStepType.ChargeWait 및 ChargeStepData 도입으로 충전/차단 판정을 일반 패턴 스텝으로 표현 - UsePatternByRoleAction에서 IsSignature 분기 완전 제거, 일반 패턴 경로로 통합 - BossCombatBehaviorContext에서 시그니처 전용 메서드 10개 이상 제거 - BossStaggerAction(신규): 충전 차단 성공 시 보스 경직 처리 - SignatureFailureEffectsAction(신규): 차단 실패 시 범위 피해/넉백/다운 적용 - RebuildDrogBehaviorAuthoringGraph에 시그니처 Sequence + outcomeBranch 구조 추가 - 집행개시 에셋 스텝 구성을 ChargeWait(3초) → Skill으로 변경 - BossHealthBarUI 시그니처 UI 비활성화, PlayerSkillDebugMenu 디버그 메서드 제거
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -13,12 +13,19 @@ MonoBehaviour:
|
|||||||
m_Name: "Data_Pattern_Drog_\uC9D1\uD589\uAC1C\uC2DC"
|
m_Name: "Data_Pattern_Drog_\uC9D1\uD589\uAC1C\uC2DC"
|
||||||
m_EditorClassIdentifier: Colosseum.Game::Colosseum.AI.BossPatternData
|
m_EditorClassIdentifier: Colosseum.Game::Colosseum.AI.BossPatternData
|
||||||
patternName: "\uC9D1\uD589\uAC1C\uC2DC"
|
patternName: "\uC9D1\uD589\uAC1C\uC2DC"
|
||||||
|
category: 1
|
||||||
|
isSignature: 1
|
||||||
steps:
|
steps:
|
||||||
|
- Type: 2
|
||||||
|
Skill: {fileID: 0}
|
||||||
|
Duration: 3
|
||||||
|
ChargeData:
|
||||||
|
requiredDamageRatio: 0.1
|
||||||
|
telegraphAbnormality: {fileID: 0}
|
||||||
|
staggerDuration: 2
|
||||||
- Type: 0
|
- Type: 0
|
||||||
Skill: {fileID: 11400000, guid: 99de24df2cb0464d9d4f633efde8dbdb, type: 2}
|
Skill: {fileID: 11400000, guid: 99de24df2cb0464d9d4f633efde8dbdb, type: 2}
|
||||||
Duration: 0
|
Duration: 0
|
||||||
- Type: 1
|
ChargeData: {fileID: 0}
|
||||||
Skill: {fileID: 0}
|
|
||||||
Duration: 0
|
|
||||||
cooldown: 45
|
cooldown: 45
|
||||||
minPhase: 3
|
minPhase: 3
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
using System;
|
using System;
|
||||||
|
|
||||||
using Colosseum;
|
using Colosseum.Abnormalities;
|
||||||
using Colosseum.AI;
|
using Colosseum.AI;
|
||||||
using Colosseum.Combat;
|
using Colosseum.Combat;
|
||||||
using Colosseum.Enemy;
|
using Colosseum.Enemy;
|
||||||
@@ -27,6 +27,7 @@ public abstract partial class BossPatternActionBase : Action
|
|||||||
protected SkillController skillController;
|
protected SkillController skillController;
|
||||||
protected BossCombatBehaviorContext combatBehaviorContext;
|
protected BossCombatBehaviorContext combatBehaviorContext;
|
||||||
protected UnityEngine.AI.NavMeshAgent navMeshAgent;
|
protected UnityEngine.AI.NavMeshAgent navMeshAgent;
|
||||||
|
protected AbnormalityManager abnormalityManager;
|
||||||
|
|
||||||
private BossPatternData activePattern;
|
private BossPatternData activePattern;
|
||||||
private GameObject activeTarget;
|
private GameObject activeTarget;
|
||||||
@@ -34,6 +35,13 @@ public abstract partial class BossPatternActionBase : Action
|
|||||||
private bool isWaiting;
|
private bool isWaiting;
|
||||||
private float waitEndTime;
|
private float waitEndTime;
|
||||||
|
|
||||||
|
private bool isChargeWaiting;
|
||||||
|
private float chargeEndTime;
|
||||||
|
private float chargeAccumulatedDamage;
|
||||||
|
private float chargeRequiredDamage;
|
||||||
|
private ChargeStepData activeChargeData;
|
||||||
|
private bool chargeTelegraphApplied;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 액션 시작 시 실제로 실행할 패턴과 대상을 결정합니다.
|
/// 액션 시작 시 실제로 실행할 패턴과 대상을 결정합니다.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -86,7 +94,23 @@ public abstract partial class BossPatternActionBase : Action
|
|||||||
if (bossEnemy.IsDead || bossEnemy.IsTransitioning)
|
if (bossEnemy.IsDead || bossEnemy.IsTransitioning)
|
||||||
return Status.Failure;
|
return Status.Failure;
|
||||||
|
|
||||||
if (isWaiting)
|
if (isChargeWaiting)
|
||||||
|
{
|
||||||
|
if (chargeAccumulatedDamage >= chargeRequiredDamage)
|
||||||
|
{
|
||||||
|
EndChargeWait(broken: true);
|
||||||
|
skillController?.CancelSkill(SkillCancelReason.Interrupt);
|
||||||
|
LogDebug($"충전 차단 성공: 누적 {chargeAccumulatedDamage:F1} / 필요 {chargeRequiredDamage:F1}");
|
||||||
|
CombatBalanceTracker.RecordBossEvent("집행 개시 차단 성공");
|
||||||
|
return Status.Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (Time.time < chargeEndTime)
|
||||||
|
return Status.Running;
|
||||||
|
|
||||||
|
EndChargeWait(broken: false);
|
||||||
|
}
|
||||||
|
else if (isWaiting)
|
||||||
{
|
{
|
||||||
if (Time.time < waitEndTime)
|
if (Time.time < waitEndTime)
|
||||||
return Status.Running;
|
return Status.Running;
|
||||||
@@ -132,8 +156,6 @@ public abstract partial class BossPatternActionBase : Action
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
GameObject candidate = player.gameObject;
|
GameObject candidate = player.gameObject;
|
||||||
if (Team.IsSameTeam(GameObject, candidate))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
float distance = Vector3.Distance(GameObject.transform.position, candidate.transform.position);
|
float distance = Vector3.Distance(GameObject.transform.position, candidate.transform.position);
|
||||||
if (distance > maxDistance || distance >= nearestDistance)
|
if (distance > maxDistance || distance >= nearestDistance)
|
||||||
@@ -164,7 +186,8 @@ public abstract partial class BossPatternActionBase : Action
|
|||||||
if (candidate == null || !candidate.activeInHierarchy)
|
if (candidate == null || !candidate.activeInHierarchy)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (Team.IsSameTeam(GameObject, candidate))
|
// 보스는 항상 적 팀이므로, 플레이어만 적대 대상으로 간주
|
||||||
|
if (candidate.GetComponent<PlayerNetworkController>() == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
IDamageable damageable = candidate.GetComponent<IDamageable>();
|
IDamageable damageable = candidate.GetComponent<IDamageable>();
|
||||||
@@ -198,6 +221,12 @@ public abstract partial class BossPatternActionBase : Action
|
|||||||
return Status.Running;
|
return Status.Running;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (step.Type == PatternStepType.ChargeWait)
|
||||||
|
{
|
||||||
|
StartChargeWait(step);
|
||||||
|
return Status.Running;
|
||||||
|
}
|
||||||
|
|
||||||
if (step.Skill == null)
|
if (step.Skill == null)
|
||||||
{
|
{
|
||||||
Debug.LogWarning($"[{GetType().Name}] 스킬이 비어 있는 패턴 스텝입니다: {activePattern.PatternName} / Step={currentStepIndex}");
|
Debug.LogWarning($"[{GetType().Name}] 스킬이 비어 있는 패턴 스텝입니다: {activePattern.PatternName} / Step={currentStepIndex}");
|
||||||
@@ -234,6 +263,68 @@ public abstract partial class BossPatternActionBase : Action
|
|||||||
return Status.Running;
|
return Status.Running;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 충전 대기를 시작합니다. 전조 이상상태를 부여하고 데미지 추적을 시작합니다.
|
||||||
|
/// </summary>
|
||||||
|
private void StartChargeWait(PatternStep step)
|
||||||
|
{
|
||||||
|
isChargeWaiting = true;
|
||||||
|
activeChargeData = step.ChargeData;
|
||||||
|
chargeEndTime = Time.time + step.Duration;
|
||||||
|
chargeAccumulatedDamage = 0f;
|
||||||
|
|
||||||
|
float damageRatio = activeChargeData != null ? activeChargeData.RequiredDamageRatio : 0.1f;
|
||||||
|
chargeRequiredDamage = bossEnemy.MaxHealth * damageRatio;
|
||||||
|
chargeTelegraphApplied = false;
|
||||||
|
|
||||||
|
if (enemyBase != null)
|
||||||
|
enemyBase.OnDamageTaken += OnChargeDamageTaken;
|
||||||
|
|
||||||
|
if (activeChargeData != null && activeChargeData.TelegraphAbnormality != null && abnormalityManager != null)
|
||||||
|
{
|
||||||
|
abnormalityManager.ApplyAbnormality(activeChargeData.TelegraphAbnormality, GameObject);
|
||||||
|
chargeTelegraphApplied = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
LogDebug($"충전 대기 시작: 필요 피해={chargeRequiredDamage:F1} / 대기={step.Duration:F1}s");
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 충전 대기를 종료합니다. 전조 이상상태를 제거하고 데미지 추적을 해제합니다.
|
||||||
|
/// </summary>
|
||||||
|
private void EndChargeWait(bool broken)
|
||||||
|
{
|
||||||
|
isChargeWaiting = false;
|
||||||
|
|
||||||
|
if (enemyBase != null)
|
||||||
|
enemyBase.OnDamageTaken -= OnChargeDamageTaken;
|
||||||
|
|
||||||
|
if (chargeTelegraphApplied && abnormalityManager != null && activeChargeData != null
|
||||||
|
&& activeChargeData.TelegraphAbnormality != null)
|
||||||
|
{
|
||||||
|
abnormalityManager.RemoveAbnormality(activeChargeData.TelegraphAbnormality);
|
||||||
|
chargeTelegraphApplied = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (broken && activeChargeData != null)
|
||||||
|
{
|
||||||
|
combatBehaviorContext.LastChargeStaggerDuration = activeChargeData.StaggerDuration;
|
||||||
|
}
|
||||||
|
|
||||||
|
activeChargeData = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 충전 중 보스가 받은 피해를 누적합니다.
|
||||||
|
/// </summary>
|
||||||
|
private void OnChargeDamageTaken(float damage)
|
||||||
|
{
|
||||||
|
if (!isChargeWaiting || damage <= 0f)
|
||||||
|
return;
|
||||||
|
|
||||||
|
chargeAccumulatedDamage += damage;
|
||||||
|
}
|
||||||
|
|
||||||
private bool IsReady()
|
private bool IsReady()
|
||||||
{
|
{
|
||||||
return bossEnemy != null && enemyBase != null && skillController != null && combatBehaviorContext != null;
|
return bossEnemy != null && enemyBase != null && skillController != null && combatBehaviorContext != null;
|
||||||
@@ -255,10 +346,16 @@ public abstract partial class BossPatternActionBase : Action
|
|||||||
|
|
||||||
if (navMeshAgent == null)
|
if (navMeshAgent == null)
|
||||||
navMeshAgent = GameObject.GetComponent<UnityEngine.AI.NavMeshAgent>();
|
navMeshAgent = GameObject.GetComponent<UnityEngine.AI.NavMeshAgent>();
|
||||||
|
|
||||||
|
if (abnormalityManager == null)
|
||||||
|
abnormalityManager = GameObject.GetComponent<AbnormalityManager>();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void ClearRuntimeState()
|
private void ClearRuntimeState()
|
||||||
{
|
{
|
||||||
|
if (isChargeWaiting)
|
||||||
|
EndChargeWait(broken: false);
|
||||||
|
|
||||||
activePattern = null;
|
activePattern = null;
|
||||||
activeTarget = null;
|
activeTarget = null;
|
||||||
currentStepIndex = 0;
|
currentStepIndex = 0;
|
||||||
|
|||||||
@@ -0,0 +1,87 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
using Colosseum.Enemy;
|
||||||
|
|
||||||
|
using Unity.Behavior;
|
||||||
|
using Unity.Properties;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
using Action = Unity.Behavior.Action;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 보스를 경직시키는 BT 액션입니다.
|
||||||
|
/// 충전 차단 성공 등의 상황에서 사용됩니다.
|
||||||
|
/// 경직 시간은 BossCombatBehaviorContext.LastChargeStaggerDuration에서 읽습니다.
|
||||||
|
/// </summary>
|
||||||
|
[Serializable, GeneratePropertyBag]
|
||||||
|
[NodeDescription(
|
||||||
|
name: "Boss Stagger",
|
||||||
|
story: "보스 경직",
|
||||||
|
category: "Action",
|
||||||
|
id: "d4e5f6a7-1111-2222-3333-888899990000")]
|
||||||
|
public partial class BossStaggerAction : Action
|
||||||
|
{
|
||||||
|
private BossCombatBehaviorContext combatBehaviorContext;
|
||||||
|
private BossEnemy bossEnemy;
|
||||||
|
private EnemyBase enemyBase;
|
||||||
|
private float staggerEndTime;
|
||||||
|
|
||||||
|
protected override Status OnStart()
|
||||||
|
{
|
||||||
|
combatBehaviorContext = GameObject.GetComponent<BossCombatBehaviorContext>();
|
||||||
|
bossEnemy = GameObject.GetComponent<BossEnemy>();
|
||||||
|
enemyBase = GameObject.GetComponent<EnemyBase>();
|
||||||
|
|
||||||
|
if (combatBehaviorContext == null || bossEnemy == null)
|
||||||
|
return Status.Failure;
|
||||||
|
|
||||||
|
float staggerDuration = combatBehaviorContext.LastChargeStaggerDuration;
|
||||||
|
if (staggerDuration <= 0f)
|
||||||
|
return Status.Success;
|
||||||
|
|
||||||
|
UnityEngine.AI.NavMeshAgent navMeshAgent = GameObject.GetComponent<UnityEngine.AI.NavMeshAgent>();
|
||||||
|
if (navMeshAgent != null && navMeshAgent.enabled)
|
||||||
|
{
|
||||||
|
navMeshAgent.isStopped = true;
|
||||||
|
navMeshAgent.ResetPath();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (enemyBase != null && enemyBase.Animator != null)
|
||||||
|
{
|
||||||
|
if (HasAnimatorParameter(enemyBase.Animator, "Hit"))
|
||||||
|
enemyBase.Animator.SetTrigger("Hit");
|
||||||
|
}
|
||||||
|
|
||||||
|
staggerEndTime = Time.time + staggerDuration;
|
||||||
|
return Status.Running;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override Status OnUpdate()
|
||||||
|
{
|
||||||
|
if (Time.time < staggerEndTime)
|
||||||
|
return Status.Running;
|
||||||
|
|
||||||
|
return Status.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void OnEnd()
|
||||||
|
{
|
||||||
|
staggerEndTime = 0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
private static bool HasAnimatorParameter(Animator animator, string parameterName)
|
||||||
|
{
|
||||||
|
if (animator == null || string.IsNullOrEmpty(parameterName))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
AnimatorControllerParameter[] parameters = animator.parameters;
|
||||||
|
for (int i = 0; i < parameters.Length; i++)
|
||||||
|
{
|
||||||
|
AnimatorControllerParameter parameter = parameters[i];
|
||||||
|
if (parameter.type == AnimatorControllerParameterType.Trigger && parameter.name == parameterName)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 062f28443a925e44388bea4cab192d47
|
||||||
@@ -0,0 +1,97 @@
|
|||||||
|
using System;
|
||||||
|
|
||||||
|
using Colosseum.Abnormalities;
|
||||||
|
using Colosseum.AI;
|
||||||
|
using Colosseum.Combat;
|
||||||
|
using Colosseum.Enemy;
|
||||||
|
using Colosseum.Player;
|
||||||
|
|
||||||
|
using Unity.Behavior;
|
||||||
|
using Unity.Properties;
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
using Action = Unity.Behavior.Action;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 충전 차단에 실패하여 패턴이 완료되었을 때, 전체 플레이어에게 범위 효과를 적용합니다.
|
||||||
|
/// 기존 BossCombatBehaviorContext.ExecuteSignatureFailure()의 BT 노드 이관 버전입니다.
|
||||||
|
/// </summary>
|
||||||
|
[Serializable, GeneratePropertyBag]
|
||||||
|
[NodeDescription(
|
||||||
|
name: "Signature Failure Effects",
|
||||||
|
story: "패턴 완료 범위 효과 적용",
|
||||||
|
category: "Action",
|
||||||
|
id: "c3d4e5f6-1111-2222-3333-777788889999")]
|
||||||
|
public partial class SignatureFailureEffectsAction : Action
|
||||||
|
{
|
||||||
|
private BossCombatBehaviorContext combatBehaviorContext;
|
||||||
|
|
||||||
|
protected override Status OnStart()
|
||||||
|
{
|
||||||
|
combatBehaviorContext = GameObject.GetComponent<BossCombatBehaviorContext>();
|
||||||
|
if (combatBehaviorContext == null)
|
||||||
|
{
|
||||||
|
Debug.LogWarning("[SignatureFailureEffects] BossCombatBehaviorContext를 찾을 수 없습니다.");
|
||||||
|
return Status.Failure;
|
||||||
|
}
|
||||||
|
|
||||||
|
ApplyFailureEffects();
|
||||||
|
return Status.Success;
|
||||||
|
}
|
||||||
|
|
||||||
|
private void ApplyFailureEffects()
|
||||||
|
{
|
||||||
|
float failureDamage = combatBehaviorContext.SignatureFailureDamage;
|
||||||
|
AbnormalityData failureAbnormality = combatBehaviorContext.SignatureFailureAbnormality;
|
||||||
|
float knockbackRadius = combatBehaviorContext.SignatureFailureKnockbackRadius;
|
||||||
|
float downRadius = combatBehaviorContext.SignatureFailureDownRadius;
|
||||||
|
float knockbackSpeed = combatBehaviorContext.SignatureFailureKnockbackSpeed;
|
||||||
|
float knockbackDuration = combatBehaviorContext.SignatureFailureKnockbackDuration;
|
||||||
|
float downDuration = combatBehaviorContext.SignatureFailureDownDuration;
|
||||||
|
|
||||||
|
PlayerNetworkController[] players = UnityEngine.Object.FindObjectsByType<PlayerNetworkController>(FindObjectsSortMode.None);
|
||||||
|
for (int i = 0; i < players.Length; i++)
|
||||||
|
{
|
||||||
|
PlayerNetworkController player = players[i];
|
||||||
|
if (player == null || player.IsDead || !player.gameObject.activeInHierarchy)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
GameObject target = player.gameObject;
|
||||||
|
if (!combatBehaviorContext.IsValidHostileTarget(target))
|
||||||
|
continue;
|
||||||
|
|
||||||
|
player.TakeDamage(failureDamage, GameObject);
|
||||||
|
|
||||||
|
if (failureAbnormality != null)
|
||||||
|
{
|
||||||
|
AbnormalityManager targetAbnormalityManager = target.GetComponent<AbnormalityManager>();
|
||||||
|
targetAbnormalityManager?.ApplyAbnormality(failureAbnormality, GameObject);
|
||||||
|
}
|
||||||
|
|
||||||
|
HitReactionController hitReactionController = target.GetComponent<HitReactionController>();
|
||||||
|
if (hitReactionController == null)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
float distance = Vector3.Distance(GameObject.transform.position, target.transform.position);
|
||||||
|
if (distance <= downRadius)
|
||||||
|
{
|
||||||
|
hitReactionController.ApplyDown(downDuration);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (distance > knockbackRadius)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
Vector3 knockbackDirection = target.transform.position - GameObject.transform.position;
|
||||||
|
knockbackDirection.y = 0f;
|
||||||
|
if (knockbackDirection.sqrMagnitude < 0.0001f)
|
||||||
|
{
|
||||||
|
knockbackDirection = GameObject.transform.forward;
|
||||||
|
}
|
||||||
|
|
||||||
|
hitReactionController.ApplyKnockback(knockbackDirection.normalized * knockbackSpeed, knockbackDuration);
|
||||||
|
}
|
||||||
|
|
||||||
|
CombatBalanceTracker.RecordBossEvent("집행 개시 실패");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,2 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: f7265ab9f84aaa546849b4e74c7bc669
|
||||||
@@ -11,7 +11,8 @@ using UnityEngine;
|
|||||||
/// 지정된 패턴을 실행하는 범용 액션 노드입니다.
|
/// 지정된 패턴을 실행하는 범용 액션 노드입니다.
|
||||||
/// Pattern 필드에 BossPatternData 에셋을 직접 할당합니다.
|
/// Pattern 필드에 BossPatternData 에셋을 직접 할당합니다.
|
||||||
/// 타겟 해석과 등록은 Condition에서 처리되므로, 이 액션은 순수하게 패턴만 실행합니다.
|
/// 타겟 해석과 등록은 Condition에서 처리되므로, 이 액션은 순수하게 패턴만 실행합니다.
|
||||||
/// 시그니처 패턴은 내부적으로 TryStartSignaturePattern 경로를 사용합니다.
|
/// 시그니처 패턴도 일반 패턴과 동일하게 BossPatternActionBase의 스텝 루프로 실행됩니다.
|
||||||
|
/// ChargeWait 스텝이 차단/완료 판정을 담당합니다.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Serializable, GeneratePropertyBag]
|
[Serializable, GeneratePropertyBag]
|
||||||
[NodeDescription(
|
[NodeDescription(
|
||||||
@@ -25,20 +26,12 @@ public partial class UsePatternByRoleAction : BossPatternActionBase
|
|||||||
[Tooltip("실행할 패턴")]
|
[Tooltip("실행할 패턴")]
|
||||||
public BlackboardVariable<BossPatternData> Pattern;
|
public BlackboardVariable<BossPatternData> Pattern;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 시그니처 패턴 실행 상태 추적
|
|
||||||
/// </summary>
|
|
||||||
private bool signatureStarted;
|
|
||||||
|
|
||||||
protected override Status OnStart()
|
protected override Status OnStart()
|
||||||
{
|
{
|
||||||
BossPatternData pattern = Pattern?.Value;
|
BossPatternData pattern = Pattern?.Value;
|
||||||
if (pattern == null)
|
if (pattern == null)
|
||||||
return Status.Failure;
|
return Status.Failure;
|
||||||
|
|
||||||
if (pattern.IsSignature)
|
|
||||||
return StartSignaturePattern();
|
|
||||||
|
|
||||||
// 타겟 해석은 ResolveStepTarget에서 처리됨
|
// 타겟 해석은 ResolveStepTarget에서 처리됨
|
||||||
// 여기서는 RegisterPatternUse만 호출 (근접 패턴 전용)
|
// 여기서는 RegisterPatternUse만 호출 (근접 패턴 전용)
|
||||||
if (pattern.IsMelee)
|
if (pattern.IsMelee)
|
||||||
@@ -53,58 +46,14 @@ public partial class UsePatternByRoleAction : BossPatternActionBase
|
|||||||
|
|
||||||
protected override Status OnUpdate()
|
protected override Status OnUpdate()
|
||||||
{
|
{
|
||||||
BossPatternData pattern = Pattern?.Value;
|
|
||||||
if (pattern == null)
|
|
||||||
return Status.Failure;
|
|
||||||
|
|
||||||
if (pattern.IsSignature)
|
|
||||||
return UpdateSignaturePattern();
|
|
||||||
|
|
||||||
return base.OnUpdate();
|
return base.OnUpdate();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void OnEnd()
|
protected override void OnEnd()
|
||||||
{
|
{
|
||||||
if (signatureStarted)
|
|
||||||
{
|
|
||||||
signatureStarted = false;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
base.OnEnd();
|
base.OnEnd();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 시그니처 패턴 시작
|
|
||||||
/// </summary>
|
|
||||||
private Status StartSignaturePattern()
|
|
||||||
{
|
|
||||||
BossCombatBehaviorContext context = GameObject.GetComponent<BossCombatBehaviorContext>();
|
|
||||||
if (context == null)
|
|
||||||
return Status.Failure;
|
|
||||||
|
|
||||||
GameObject target = Target != null ? Target.Value : null;
|
|
||||||
signatureStarted = context.TryStartSignaturePattern(target);
|
|
||||||
return signatureStarted ? Status.Running : Status.Failure;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 시그니처 패턴 업데이트
|
|
||||||
/// </summary>
|
|
||||||
private Status UpdateSignaturePattern()
|
|
||||||
{
|
|
||||||
if (!signatureStarted)
|
|
||||||
return Status.Failure;
|
|
||||||
|
|
||||||
BossCombatBehaviorContext context = GameObject.GetComponent<BossCombatBehaviorContext>();
|
|
||||||
if (context == null)
|
|
||||||
return Status.Failure;
|
|
||||||
|
|
||||||
return context.IsSignaturePatternActive
|
|
||||||
? Status.Running
|
|
||||||
: Status.Success;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// BossPatternActionBase.TryResolvePattern 구현.
|
/// BossPatternActionBase.TryResolvePattern 구현.
|
||||||
/// Condition에서 이미 타겟을 해석했으므로, Target.Value를 그대로 사용합니다.
|
/// Condition에서 이미 타겟을 해석했으므로, Target.Value를 그대로 사용합니다.
|
||||||
|
|||||||
@@ -19,9 +19,6 @@ namespace Colosseum.AI.BehaviorActions.Conditions
|
|||||||
if (pattern == null)
|
if (pattern == null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (pattern.IsSignature)
|
|
||||||
return IsSignatureReady(gameObject);
|
|
||||||
|
|
||||||
BossCombatBehaviorContext context = gameObject.GetComponent<BossCombatBehaviorContext>();
|
BossCombatBehaviorContext context = gameObject.GetComponent<BossCombatBehaviorContext>();
|
||||||
if (context == null)
|
if (context == null)
|
||||||
return false;
|
return false;
|
||||||
@@ -37,17 +34,5 @@ namespace Colosseum.AI.BehaviorActions.Conditions
|
|||||||
|
|
||||||
return UsePatternAction.IsPatternReady(gameObject, pattern);
|
return UsePatternAction.IsPatternReady(gameObject, pattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 시그니처 패턴 전용 준비 여부 확인.
|
|
||||||
/// </summary>
|
|
||||||
private static bool IsSignatureReady(GameObject gameObject)
|
|
||||||
{
|
|
||||||
BossCombatBehaviorContext context = gameObject.GetComponent<BossCombatBehaviorContext>();
|
|
||||||
if (context == null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return context.IsSignaturePatternReady();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,7 @@
|
|||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
using Colosseum.Abnormalities;
|
||||||
using Colosseum.Skills;
|
using Colosseum.Skills;
|
||||||
|
|
||||||
namespace Colosseum.AI
|
namespace Colosseum.AI
|
||||||
@@ -32,7 +34,33 @@ namespace Colosseum.AI
|
|||||||
Utility,
|
Utility,
|
||||||
}
|
}
|
||||||
|
|
||||||
public enum PatternStepType { Skill, Wait }
|
public enum PatternStepType { Skill, Wait, ChargeWait }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// ChargeWait 스텝의 차단 관련 설정 데이터입니다.
|
||||||
|
/// 충전 대기 중 플레이어가 누적 피해를 충족하면 차단 성공으로 처리됩니다.
|
||||||
|
/// </summary>
|
||||||
|
[System.Serializable]
|
||||||
|
public class ChargeStepData
|
||||||
|
{
|
||||||
|
[Header("차단 조건")]
|
||||||
|
[Tooltip("차단에 필요한 누적 피해 비율 (보스 최대 체력 기준)")]
|
||||||
|
[Range(0f, 1f)]
|
||||||
|
[SerializeField] private float requiredDamageRatio = 0.1f;
|
||||||
|
|
||||||
|
[Header("전조 효과")]
|
||||||
|
[Tooltip("충전 중 부여할 전조 이상상태 (루핑 VFX 등)")]
|
||||||
|
[SerializeField] private AbnormalityData telegraphAbnormality;
|
||||||
|
|
||||||
|
[Header("차단 성공 효과")]
|
||||||
|
[Tooltip("차단 성공 시 보스 경직 시간")]
|
||||||
|
[Min(0f)]
|
||||||
|
[SerializeField] private float staggerDuration = 2f;
|
||||||
|
|
||||||
|
public float RequiredDamageRatio => requiredDamageRatio;
|
||||||
|
public AbnormalityData TelegraphAbnormality => telegraphAbnormality;
|
||||||
|
public float StaggerDuration => staggerDuration;
|
||||||
|
}
|
||||||
|
|
||||||
[System.Serializable]
|
[System.Serializable]
|
||||||
public class PatternStep
|
public class PatternStep
|
||||||
@@ -40,6 +68,9 @@ namespace Colosseum.AI
|
|||||||
public PatternStepType Type = PatternStepType.Skill;
|
public PatternStepType Type = PatternStepType.Skill;
|
||||||
public SkillData Skill;
|
public SkillData Skill;
|
||||||
[Min(0f)] public float Duration = 0.5f;
|
[Min(0f)] public float Duration = 0.5f;
|
||||||
|
|
||||||
|
[Tooltip("ChargeWait 타입 전용 차단 설정")]
|
||||||
|
public ChargeStepData ChargeData;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -54,7 +85,7 @@ namespace Colosseum.AI
|
|||||||
[Header("패턴 특성")]
|
[Header("패턴 특성")]
|
||||||
[Tooltip("패턴 분류 — grace period 판단에 사용")]
|
[Tooltip("패턴 분류 — grace period 판단에 사용")]
|
||||||
[SerializeField] private PatternCategory category = PatternCategory.Basic;
|
[SerializeField] private PatternCategory category = PatternCategory.Basic;
|
||||||
[Tooltip("시그니처 패턴 여부 — 전용 실행 경로 사용")]
|
[Tooltip("시그니처 패턴 여부 — 현재 사용되지 않음 (ChargeWait 스텝으로 대체)")]
|
||||||
[SerializeField] private bool isSignature;
|
[SerializeField] private bool isSignature;
|
||||||
[Tooltip("근접 패턴 여부 — meleePatternCounter 갱신")]
|
[Tooltip("근접 패턴 여부 — meleePatternCounter 갱신")]
|
||||||
[SerializeField] private bool isMelee;
|
[SerializeField] private bool isMelee;
|
||||||
|
|||||||
@@ -522,56 +522,6 @@ namespace Colosseum.Editor
|
|||||||
Debug.Log($"[Debug] 보스를 Phase 2로 강제 전환했습니다. | Target={bossEnemy.name}");
|
Debug.Log($"[Debug] 보스를 Phase 2로 강제 전환했습니다. | Target={bossEnemy.name}");
|
||||||
}
|
}
|
||||||
|
|
||||||
[MenuItem("Tools/Colosseum/Debug/Force Boss Signature")]
|
|
||||||
private static void ForceBossSignature()
|
|
||||||
{
|
|
||||||
if (!EditorApplication.isPlaying)
|
|
||||||
{
|
|
||||||
Debug.LogWarning("[Debug] 플레이 모드에서만 사용할 수 있습니다.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
BossCombatBehaviorContext context = FindBossCombatContext();
|
|
||||||
if (context == null)
|
|
||||||
{
|
|
||||||
Debug.LogWarning("[Debug] 보스 전투 컨텍스트를 찾지 못했습니다.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!context.ForceStartSignaturePattern())
|
|
||||||
{
|
|
||||||
Debug.LogWarning("[Debug] 집행 개시를 강제로 시작하지 못했습니다. 이미 실행 중이거나 패턴이 비어 있을 수 있습니다.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.Log($"[Debug] 집행 개시를 강제로 시작했습니다. | Target={context.gameObject.name}");
|
|
||||||
}
|
|
||||||
|
|
||||||
[MenuItem("Tools/Colosseum/Debug/Preview Boss Signature Telegraph")]
|
|
||||||
private static void PreviewBossSignatureTelegraph()
|
|
||||||
{
|
|
||||||
if (!EditorApplication.isPlaying)
|
|
||||||
{
|
|
||||||
Debug.LogWarning("[Debug] 플레이 모드에서만 사용할 수 있습니다.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
BossCombatBehaviorContext context = FindBossCombatContext();
|
|
||||||
if (context == null)
|
|
||||||
{
|
|
||||||
Debug.LogWarning("[Debug] 보스 전투 컨텍스트를 찾지 못했습니다.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!context.PreviewSignatureTelegraph())
|
|
||||||
{
|
|
||||||
Debug.LogWarning("[Debug] 집행 개시 전조 프리뷰를 시작하지 못했습니다. 이미 다른 스킬이 재생 중일 수 있습니다.");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
Debug.Log($"[Debug] 집행 개시 전조 프리뷰를 재생했습니다. | Target={context.gameObject.name}");
|
|
||||||
}
|
|
||||||
|
|
||||||
private static void ApplyBossShieldWithType(string assetPath, float amount, float duration)
|
private static void ApplyBossShieldWithType(string assetPath, float amount, float duration)
|
||||||
{
|
{
|
||||||
if (!EditorApplication.isPlaying)
|
if (!EditorApplication.isPlaying)
|
||||||
|
|||||||
@@ -259,15 +259,45 @@ namespace Colosseum.Editor
|
|||||||
SetNodeFieldValue(leapUseNode, "Pattern", mobilityPattern, setFieldValueMethod);
|
SetNodeFieldValue(leapUseNode, "Pattern", mobilityPattern, setFieldValueMethod);
|
||||||
LinkTarget(leapUseNode, targetVariable);
|
LinkTarget(leapUseNode, targetVariable);
|
||||||
|
|
||||||
// #3 Signature — 집행 개시
|
// #3 Signature — 집행 개시 (Sequence: 패턴 실행 → 결과 분기)
|
||||||
|
// signatureBranch.True → Sequence:
|
||||||
|
// Child 1: 집행개시 패턴 실행 (ChargeWait 포함)
|
||||||
|
// Child 2: Branch(패턴 성공? = 차단 안 됨) → 범위 효과 또는 보스 경직
|
||||||
|
// 패턴이 Failure 반환(차단 성공) → Sequence Failure → signatureBranch False → 다음 우선순위
|
||||||
object signatureBranch = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, branchCompositeType, new Vector2(branchX, startY + stepY * 2));
|
object signatureBranch = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, branchCompositeType, new Vector2(branchX, startY + stepY * 2));
|
||||||
AttachPatternReadyCondition(signatureBranch, signaturePattern, authoringAssembly);
|
AttachPatternReadyCondition(signatureBranch, signaturePattern, authoringAssembly);
|
||||||
AttachPhaseConditionIfNeeded(signatureBranch, signaturePattern, authoringAssembly);
|
AttachPhaseConditionIfNeeded(signatureBranch, signaturePattern, authoringAssembly);
|
||||||
SetBranchRequiresAll(signatureBranch, true);
|
SetBranchRequiresAll(signatureBranch, true);
|
||||||
object signatureUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UsePatternByRoleAction), new Vector2(branchX + actionOffsetX, startY + stepY * 2 + actionOffsetY));
|
|
||||||
|
// Sequence: 패턴 실행 → 결과 분기
|
||||||
|
object signatureSequence = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod,
|
||||||
|
runtimeAssembly.GetType("Unity.Behavior.SequenceComposite", true),
|
||||||
|
new Vector2(branchX + 220f, startY + stepY * 2));
|
||||||
|
|
||||||
|
// Child 1: 집행개시 패턴 실행
|
||||||
|
object signatureUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UsePatternByRoleAction), new Vector2(branchX + 400f, startY + stepY * 2));
|
||||||
SetNodeFieldValue(signatureUseNode, "Pattern", signaturePattern, setFieldValueMethod);
|
SetNodeFieldValue(signatureUseNode, "Pattern", signaturePattern, setFieldValueMethod);
|
||||||
LinkTarget(signatureUseNode, targetVariable);
|
LinkTarget(signatureUseNode, targetVariable);
|
||||||
|
|
||||||
|
// Child 2: 패턴 완료 시 결과 분기
|
||||||
|
// 패턴이 Success 반환(차단 안 됨 = 충전 완료) → True → 실패 효과 적용
|
||||||
|
// 패턴이 Failure 반환(차단 성공) → False → 보스 경직
|
||||||
|
object outcomeBranch = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, branchCompositeType, new Vector2(branchX + 220f, startY + stepY * 2 + 180f));
|
||||||
|
|
||||||
|
object failureEffectsNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(SignatureFailureEffectsAction), new Vector2(branchX + 400f, startY + stepY * 2 + 180f));
|
||||||
|
object staggerNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(BossStaggerAction), new Vector2(branchX + 400f, startY + stepY * 2 + 360f));
|
||||||
|
|
||||||
|
// outcomeBranch True → 실패 효과 (충전 완료 = 플레이어들이 차단 실패)
|
||||||
|
ConnectBranch(graphAsset, connectEdgeMethod, outcomeBranch, "True", failureEffectsNode);
|
||||||
|
// outcomeBranch False → 보스 경직 (차단 성공)
|
||||||
|
ConnectBranch(graphAsset, connectEdgeMethod, outcomeBranch, "False", staggerNode);
|
||||||
|
|
||||||
|
// Sequence에 자식 연결
|
||||||
|
ConnectChildren(graphAsset, connectEdgeMethod, signatureSequence, signatureUseNode, outcomeBranch);
|
||||||
|
|
||||||
|
// 메인 체인: signatureBranch.True → Sequence
|
||||||
|
ConnectBranch(graphAsset, connectEdgeMethod, signatureBranch, "True", signatureSequence);
|
||||||
|
|
||||||
// #4 Combo — 콤보 패턴 + 조건부 도약 (Sequence)
|
// #4 Combo — 콤보 패턴 + 조건부 도약 (Sequence)
|
||||||
// comboBranch.True → Sequence:
|
// comboBranch.True → Sequence:
|
||||||
// Child 1: 연타2-강타 실행
|
// Child 1: 연타2-강타 실행
|
||||||
@@ -339,7 +369,7 @@ namespace Colosseum.Editor
|
|||||||
// ── FloatingPortNodeModel 생성 + 위치 보정 ──
|
// ── FloatingPortNodeModel 생성 + 위치 보정 ──
|
||||||
// Branch 노드의 NamedPort(True/False)에 대해 FloatingPortNodeModel을 생성합니다.
|
// Branch 노드의 NamedPort(True/False)에 대해 FloatingPortNodeModel을 생성합니다.
|
||||||
// CreateNodePortsForNode는 기본 위치(Branch + 200px Y)를 사용하므로, 생성 후 사용자 조정 기준 위치로 이동합니다.
|
// CreateNodePortsForNode는 기본 위치(Branch + 200px Y)를 사용하므로, 생성 후 사용자 조정 기준 위치로 이동합니다.
|
||||||
var allBranches = new List<object> { downBranch, leapBranch, signatureBranch };
|
var allBranches = new List<object> { downBranch, leapBranch, signatureBranch, outcomeBranch };
|
||||||
if (comboBranch != null) allBranches.Add(comboBranch);
|
if (comboBranch != null) allBranches.Add(comboBranch);
|
||||||
allBranches.AddRange(new[] { primaryBranch, utilityBranch });
|
allBranches.AddRange(new[] { primaryBranch, utilityBranch });
|
||||||
foreach (object branch in allBranches)
|
foreach (object branch in allBranches)
|
||||||
@@ -366,10 +396,10 @@ namespace Colosseum.Editor
|
|||||||
Connect(graphAsset, connectEdgeMethod, GetDefaultOutputPort(startNode), GetDefaultInputPort(repeatNode));
|
Connect(graphAsset, connectEdgeMethod, GetDefaultOutputPort(startNode), GetDefaultInputPort(repeatNode));
|
||||||
Connect(graphAsset, connectEdgeMethod, GetDefaultOutputPort(repeatNode), GetDefaultInputPort(downBranch));
|
Connect(graphAsset, connectEdgeMethod, GetDefaultOutputPort(repeatNode), GetDefaultInputPort(downBranch));
|
||||||
|
|
||||||
// 각 Branch의 True FloatingPort → Action (combo는 내부에서 Sequence로 연결됨)
|
// 각 Branch의 True FloatingPort → Action (combo, signature는 내부에서 Sequence로 연결됨)
|
||||||
ConnectBranch(graphAsset, connectEdgeMethod, downBranch, "True", downUseNode);
|
ConnectBranch(graphAsset, connectEdgeMethod, downBranch, "True", downUseNode);
|
||||||
ConnectBranch(graphAsset, connectEdgeMethod, leapBranch, "True", leapUseNode);
|
ConnectBranch(graphAsset, connectEdgeMethod, leapBranch, "True", leapUseNode);
|
||||||
ConnectBranch(graphAsset, connectEdgeMethod, signatureBranch, "True", signatureUseNode);
|
// signatureBranch.True는 signatureSequence에 이미 연결됨
|
||||||
ConnectBranch(graphAsset, connectEdgeMethod, primaryBranch, "True", primaryUseNode);
|
ConnectBranch(graphAsset, connectEdgeMethod, primaryBranch, "True", primaryUseNode);
|
||||||
ConnectBranch(graphAsset, connectEdgeMethod, utilityBranch, "True", utilityUseNode);
|
ConnectBranch(graphAsset, connectEdgeMethod, utilityBranch, "True", utilityUseNode);
|
||||||
|
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ namespace Colosseum.Enemy
|
|||||||
[Tooltip("대형 패턴(시그니처/기동/조합) 직후 기본 패턴 최소 순환 횟수")]
|
[Tooltip("대형 패턴(시그니처/기동/조합) 직후 기본 패턴 최소 순환 횟수")]
|
||||||
[Min(0)] [SerializeField] protected int basicLoopMinCountAfterBigPattern = 2;
|
[Min(0)] [SerializeField] protected int basicLoopMinCountAfterBigPattern = 2;
|
||||||
|
|
||||||
[Header("Signature Pattern")]
|
[Header("시그니처 효과 설정")]
|
||||||
[Tooltip("시그니처 패턴 차단에 필요한 누적 피해 비율")]
|
[Tooltip("시그니처 패턴 차단에 필요한 누적 피해 비율")]
|
||||||
[Range(0f, 1f)] [SerializeField] protected float signatureRequiredDamageRatio = 0.1f;
|
[Range(0f, 1f)] [SerializeField] protected float signatureRequiredDamageRatio = 0.1f;
|
||||||
|
|
||||||
@@ -124,12 +124,6 @@ namespace Colosseum.Enemy
|
|||||||
protected GameObject currentTarget;
|
protected GameObject currentTarget;
|
||||||
protected float nextTargetRefreshTime;
|
protected float nextTargetRefreshTime;
|
||||||
protected int meleePatternCounter;
|
protected int meleePatternCounter;
|
||||||
protected bool isSignaturePatternActive;
|
|
||||||
protected bool isPreviewingSignatureTelegraph;
|
|
||||||
protected float signatureAccumulatedDamage;
|
|
||||||
protected float signatureRequiredDamage;
|
|
||||||
protected float signatureElapsedTime;
|
|
||||||
protected float signatureTotalDuration;
|
|
||||||
protected int basicLoopCountSinceLastBigPattern;
|
protected int basicLoopCountSinceLastBigPattern;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -177,28 +171,55 @@ namespace Colosseum.Enemy
|
|||||||
return highestThreatTarget != null ? highestThreatTarget : FindNearestLivingTarget();
|
return highestThreatTarget != null ? highestThreatTarget : FindNearestLivingTarget();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 시그니처 패턴 진행 여부
|
|
||||||
/// </summary>
|
|
||||||
public bool IsSignaturePatternActive => isSignaturePatternActive;
|
|
||||||
public string SignaturePatternName => isSignaturePatternActive && signaturePattern != null ? signaturePattern.PatternName : string.Empty;
|
|
||||||
public float SignatureAccumulatedDamage => signatureAccumulatedDamage;
|
|
||||||
public float SignatureRequiredDamage => signatureRequiredDamage;
|
|
||||||
public float SignatureBreakProgressNormalized => signatureRequiredDamage > 0f ? Mathf.Clamp01(signatureAccumulatedDamage / signatureRequiredDamage) : 0f;
|
|
||||||
public float SignatureElapsedTime => signatureElapsedTime;
|
|
||||||
public float SignatureTotalDuration => signatureTotalDuration;
|
|
||||||
public float SignatureCastProgressNormalized => signatureTotalDuration > 0f ? Mathf.Clamp01(signatureElapsedTime / signatureTotalDuration) : 0f;
|
|
||||||
public float SignatureRemainingTime => Mathf.Max(0f, signatureTotalDuration - signatureElapsedTime);
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 디버그 로그 출력 여부
|
/// 디버그 로그 출력 여부
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool DebugModeEnabled => debugMode;
|
public bool DebugModeEnabled => debugMode;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 시그니처 실패 시 모든 플레이어에게 주는 기본 피해
|
||||||
|
/// </summary>
|
||||||
|
public float SignatureFailureDamage => signatureFailureDamage;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 시그니처 실패 시 모든 플레이어에게 적용할 디버프
|
||||||
|
/// </summary>
|
||||||
|
public AbnormalityData SignatureFailureAbnormality => signatureFailureAbnormality;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 시그니처 실패 시 넉백이 적용되는 반경
|
||||||
|
/// </summary>
|
||||||
|
public float SignatureFailureKnockbackRadius => signatureFailureKnockbackRadius;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 시그니처 실패 시 다운이 적용되는 반경
|
||||||
|
/// </summary>
|
||||||
|
public float SignatureFailureDownRadius => signatureFailureDownRadius;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 시그니처 실패 시 넉백 속도
|
||||||
|
/// </summary>
|
||||||
|
public float SignatureFailureKnockbackSpeed => signatureFailureKnockbackSpeed;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 시그니처 실패 시 넉백 지속 시간
|
||||||
|
/// </summary>
|
||||||
|
public float SignatureFailureKnockbackDuration => signatureFailureKnockbackDuration;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 시그니처 실패 시 다운 지속 시간
|
||||||
|
/// </summary>
|
||||||
|
public float SignatureFailureDownDuration => signatureFailureDownDuration;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 마지막 충전 차단 시 설정된 경직 시간 (BossPatternActionBase가 설정)
|
||||||
|
/// </summary>
|
||||||
|
public float LastChargeStaggerDuration { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 기절 등으로 인해 보스 전투 로직을 진행할 수 없는 상태인지 여부
|
/// 기절 등으로 인해 보스 전투 로직을 진행할 수 없는 상태인지 여부
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public bool IsBehaviorSuppressed => isPreviewingSignatureTelegraph || (abnormalityManager != null && abnormalityManager.IsStunned);
|
public bool IsBehaviorSuppressed => abnormalityManager != null && abnormalityManager.IsStunned;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 현재 보스 패턴 페이즈
|
/// 현재 보스 패턴 페이즈
|
||||||
@@ -265,11 +286,7 @@ namespace Colosseum.Enemy
|
|||||||
if (TryStartPunishPattern())
|
if (TryStartPunishPattern())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// 2. 집행 개시 (Phase 3 시그니처)
|
// 2. 조합 패턴 (Phase 3, 드물게)
|
||||||
if (TryStartSignaturePatternInLoop())
|
|
||||||
return;
|
|
||||||
|
|
||||||
// 3. 조합 패턴 (Phase 3, 드물게)
|
|
||||||
if (TryStartComboPattern())
|
if (TryStartComboPattern())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@@ -458,28 +475,6 @@ namespace Colosseum.Enemy
|
|||||||
Debug.Log($"[{source}] {message}");
|
Debug.Log($"[{source}] {message}");
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 시그니처 패턴 사용 가능 여부를 반환합니다.
|
|
||||||
/// </summary>
|
|
||||||
public bool IsSignaturePatternReady()
|
|
||||||
{
|
|
||||||
if (!IsServer || bossEnemy == null || skillController == null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (IsBehaviorSuppressed)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (activePatternCoroutine != null || isSignaturePatternActive)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (bossEnemy.IsDead || bossEnemy.IsTransitioning || skillController.IsPlayingAnimation)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (!IsPatternGracePeriodAllowed(signaturePattern))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
return IsPatternReady(signaturePattern);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 지정 패턴이 grace period를 통과했는지 반환합니다.
|
/// 지정 패턴이 grace period를 통과했는지 반환합니다.
|
||||||
@@ -510,7 +505,7 @@ namespace Colosseum.Enemy
|
|||||||
if (IsBehaviorSuppressed)
|
if (IsBehaviorSuppressed)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (activePatternCoroutine != null || isSignaturePatternActive)
|
if (activePatternCoroutine != null)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
if (bossEnemy.IsDead || bossEnemy.IsTransitioning || skillController.IsPlayingAnimation)
|
if (bossEnemy.IsDead || bossEnemy.IsTransitioning || skillController.IsPlayingAnimation)
|
||||||
@@ -522,49 +517,6 @@ namespace Colosseum.Enemy
|
|||||||
return IsPatternReady(comboPattern);
|
return IsPatternReady(comboPattern);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 시그니처 패턴을 시작합니다.
|
|
||||||
/// </summary>
|
|
||||||
public bool TryStartSignaturePattern(GameObject target)
|
|
||||||
{
|
|
||||||
if (!IsSignaturePatternReady())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
GameObject resolvedTarget = IsValidHostileTarget(target) ? target : FindNearestLivingTarget();
|
|
||||||
currentTarget = resolvedTarget;
|
|
||||||
activePatternCoroutine = StartCoroutine(RunSignaturePatternCoroutine(signaturePattern, resolvedTarget));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 디버그 또는 특수 연출에서 시그니처 패턴을 강제로 시작합니다.
|
|
||||||
/// </summary>
|
|
||||||
public bool ForceStartSignaturePattern(GameObject target = null)
|
|
||||||
{
|
|
||||||
if (!IsServer || signaturePattern == null || activePatternCoroutine != null || isSignaturePatternActive)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
GameObject resolvedTarget = IsValidHostileTarget(target) ? target : ResolvePrimaryTarget();
|
|
||||||
activePatternCoroutine = StartCoroutine(RunSignaturePatternCoroutine(signaturePattern, resolvedTarget));
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 네트워크 상태와 무관하게 시그니처 전조 모션만 미리보기로 재생합니다.
|
|
||||||
/// 전조 연출 확인용 디버그 경로입니다.
|
|
||||||
/// </summary>
|
|
||||||
public bool PreviewSignatureTelegraph()
|
|
||||||
{
|
|
||||||
if (signaturePattern == null || skillController == null)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (activePatternCoroutine != null || isSignaturePatternActive || isPreviewingSignatureTelegraph)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
StartCoroutine(PreviewSignatureTelegraphCoroutine());
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected virtual bool TryStartPrimaryLoopPattern()
|
protected virtual bool TryStartPrimaryLoopPattern()
|
||||||
{
|
{
|
||||||
if (currentTarget == null)
|
if (currentTarget == null)
|
||||||
@@ -659,22 +611,6 @@ namespace Colosseum.Enemy
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// 시그니처 패턴을 context 루프에서 발동합니다.
|
|
||||||
/// grace period와 Phase 제한을 적용합니다.
|
|
||||||
/// </summary>
|
|
||||||
protected virtual bool TryStartSignaturePatternInLoop()
|
|
||||||
{
|
|
||||||
if (!IsSignaturePatternReady())
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (!IsPatternGracePeriodAllowed(signaturePattern))
|
|
||||||
return false;
|
|
||||||
|
|
||||||
GameObject target = ResolvePrimaryTarget();
|
|
||||||
return TryStartSignaturePattern(target);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Phase 3 조합 패턴을 발동합니다.
|
/// Phase 3 조합 패턴을 발동합니다.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
@@ -864,298 +800,13 @@ namespace Colosseum.Enemy
|
|||||||
|
|
||||||
if (behaviorGraphAgent == null)
|
if (behaviorGraphAgent == null)
|
||||||
behaviorGraphAgent = GetComponent<BehaviorGraphAgent>();
|
behaviorGraphAgent = GetComponent<BehaviorGraphAgent>();
|
||||||
|
|
||||||
if (enemyBase != null)
|
|
||||||
{
|
|
||||||
enemyBase.OnDamageTaken -= HandleBossDamageTaken;
|
|
||||||
enemyBase.OnDamageTaken += HandleBossDamageTaken;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void OnNetworkDespawn()
|
public override void OnNetworkDespawn()
|
||||||
{
|
{
|
||||||
if (enemyBase != null)
|
|
||||||
{
|
|
||||||
enemyBase.OnDamageTaken -= HandleBossDamageTaken;
|
|
||||||
}
|
|
||||||
|
|
||||||
base.OnNetworkDespawn();
|
base.OnNetworkDespawn();
|
||||||
}
|
}
|
||||||
|
|
||||||
private IEnumerator RunSignaturePatternCoroutine(BossPatternData pattern, GameObject target)
|
|
||||||
{
|
|
||||||
StopMovement();
|
|
||||||
|
|
||||||
isSignaturePatternActive = true;
|
|
||||||
signatureAccumulatedDamage = 0f;
|
|
||||||
signatureRequiredDamage = bossEnemy.MaxHealth * signatureRequiredDamageRatio;
|
|
||||||
signatureElapsedTime = 0f;
|
|
||||||
signatureTotalDuration = CalculatePatternDuration(pattern);
|
|
||||||
|
|
||||||
bool interrupted = false;
|
|
||||||
bool completed = true;
|
|
||||||
|
|
||||||
for (int i = 0; i < pattern.Steps.Count; i++)
|
|
||||||
{
|
|
||||||
if (HasMetSignatureBreakThreshold())
|
|
||||||
{
|
|
||||||
interrupted = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
PatternStep step = pattern.Steps[i];
|
|
||||||
if (step.Type == PatternStepType.Wait)
|
|
||||||
{
|
|
||||||
float remaining = step.Duration;
|
|
||||||
while (remaining > 0f)
|
|
||||||
{
|
|
||||||
if (HasMetSignatureBreakThreshold())
|
|
||||||
{
|
|
||||||
interrupted = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bossEnemy == null || bossEnemy.IsDead)
|
|
||||||
{
|
|
||||||
completed = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
signatureElapsedTime += Time.deltaTime;
|
|
||||||
remaining -= Time.deltaTime;
|
|
||||||
yield return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (interrupted || !completed)
|
|
||||||
break;
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (step.Skill == null)
|
|
||||||
{
|
|
||||||
completed = false;
|
|
||||||
Debug.LogWarning($"[{GetType().Name}] 시그니처 패턴 스텝 스킬이 비어 있습니다. Pattern={pattern.PatternName}, Index={i}");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!skillController.ExecuteSkill(step.Skill))
|
|
||||||
{
|
|
||||||
completed = false;
|
|
||||||
LogDebug(GetType().Name, $"시그니처 스킬 실행 실패: {step.Skill.SkillName}");
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
while (skillController != null && skillController.IsPlayingAnimation)
|
|
||||||
{
|
|
||||||
if (HasMetSignatureBreakThreshold())
|
|
||||||
{
|
|
||||||
interrupted = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bossEnemy == null || bossEnemy.IsDead)
|
|
||||||
{
|
|
||||||
completed = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
signatureElapsedTime += Time.deltaTime;
|
|
||||||
yield return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (interrupted || !completed)
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (interrupted)
|
|
||||||
{
|
|
||||||
skillController?.CancelSkill(SkillCancelReason.Interrupt);
|
|
||||||
UsePatternAction.MarkPatternUsed(gameObject, pattern);
|
|
||||||
LogDebug(GetType().Name, $"시그니처 차단 성공: 누적 피해 {signatureAccumulatedDamage:F1} / 필요 {signatureRequiredDamage:F1}");
|
|
||||||
CombatBalanceTracker.RecordBossEvent("집행 개시 차단 성공");
|
|
||||||
|
|
||||||
if (signatureSuccessStaggerDuration > 0f)
|
|
||||||
{
|
|
||||||
if (enemyBase != null && enemyBase.Animator != null &&
|
|
||||||
HasAnimatorParameter(enemyBase.Animator, "Hit", AnimatorControllerParameterType.Trigger))
|
|
||||||
{
|
|
||||||
enemyBase.Animator.SetTrigger("Hit");
|
|
||||||
}
|
|
||||||
|
|
||||||
float endTime = Time.time + signatureSuccessStaggerDuration;
|
|
||||||
while (Time.time < endTime && bossEnemy != null && !bossEnemy.IsDead)
|
|
||||||
{
|
|
||||||
StopMovement();
|
|
||||||
yield return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else if (completed)
|
|
||||||
{
|
|
||||||
UsePatternAction.MarkPatternUsed(gameObject, pattern);
|
|
||||||
LogDebug(GetType().Name, $"시그니처 실패: 누적 피해 {signatureAccumulatedDamage:F1} / 필요 {signatureRequiredDamage:F1}");
|
|
||||||
CombatBalanceTracker.RecordBossEvent("집행 개시 실패");
|
|
||||||
ExecuteSignatureFailure();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (abnormalityManager != null && signatureTelegraphAbnormality != null)
|
|
||||||
{
|
|
||||||
abnormalityManager.RemoveAbnormality(signatureTelegraphAbnormality);
|
|
||||||
}
|
|
||||||
|
|
||||||
isSignaturePatternActive = false;
|
|
||||||
signatureAccumulatedDamage = 0f;
|
|
||||||
signatureRequiredDamage = 0f;
|
|
||||||
signatureElapsedTime = 0f;
|
|
||||||
signatureTotalDuration = 0f;
|
|
||||||
activePatternCoroutine = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private IEnumerator PreviewSignatureTelegraphCoroutine()
|
|
||||||
{
|
|
||||||
bool restoreBehaviorGraph = behaviorGraphAgent != null && behaviorGraphAgent.enabled;
|
|
||||||
isPreviewingSignatureTelegraph = true;
|
|
||||||
|
|
||||||
if (restoreBehaviorGraph)
|
|
||||||
{
|
|
||||||
behaviorGraphAgent.enabled = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
StopMovement();
|
|
||||||
|
|
||||||
if (skillController != null && skillController.IsPlayingAnimation)
|
|
||||||
{
|
|
||||||
skillController.CancelSkill(SkillCancelReason.Interrupt);
|
|
||||||
yield return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool executed = false;
|
|
||||||
for (int i = 0; i < signaturePattern.Steps.Count; i++)
|
|
||||||
{
|
|
||||||
PatternStep step = signaturePattern.Steps[i];
|
|
||||||
if (step == null || step.Type != PatternStepType.Skill || step.Skill == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
executed = skillController.ExecuteSkill(step.Skill);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (executed)
|
|
||||||
{
|
|
||||||
while (skillController != null && skillController.IsPlayingAnimation)
|
|
||||||
{
|
|
||||||
yield return null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (abnormalityManager != null && signatureTelegraphAbnormality != null)
|
|
||||||
{
|
|
||||||
abnormalityManager.RemoveAbnormality(signatureTelegraphAbnormality);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (restoreBehaviorGraph && behaviorGraphAgent != null)
|
|
||||||
{
|
|
||||||
behaviorGraphAgent.enabled = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
isPreviewingSignatureTelegraph = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static float CalculatePatternDuration(BossPatternData pattern)
|
|
||||||
{
|
|
||||||
if (pattern == null || pattern.Steps == null)
|
|
||||||
return 0f;
|
|
||||||
|
|
||||||
float totalDuration = 0f;
|
|
||||||
for (int i = 0; i < pattern.Steps.Count; i++)
|
|
||||||
{
|
|
||||||
PatternStep step = pattern.Steps[i];
|
|
||||||
if (step == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (step.Type == PatternStepType.Wait)
|
|
||||||
{
|
|
||||||
totalDuration += Mathf.Max(0f, step.Duration);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (step.Skill == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
AnimationClip skillClip = step.Skill.SkillClip;
|
|
||||||
if (skillClip != null)
|
|
||||||
{
|
|
||||||
float animationSpeed = Mathf.Max(0.01f, step.Skill.AnimationSpeed);
|
|
||||||
totalDuration += skillClip.length / animationSpeed;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (step.Skill.EndClip != null)
|
|
||||||
{
|
|
||||||
totalDuration += step.Skill.EndClip.length;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return totalDuration;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ExecuteSignatureFailure()
|
|
||||||
{
|
|
||||||
PlayerNetworkController[] players = FindObjectsByType<PlayerNetworkController>(FindObjectsSortMode.None);
|
|
||||||
for (int i = 0; i < players.Length; i++)
|
|
||||||
{
|
|
||||||
PlayerNetworkController player = players[i];
|
|
||||||
if (player == null || player.IsDead || !player.gameObject.activeInHierarchy)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
GameObject target = player.gameObject;
|
|
||||||
if (!IsValidHostileTarget(target))
|
|
||||||
continue;
|
|
||||||
|
|
||||||
player.TakeDamage(signatureFailureDamage, gameObject);
|
|
||||||
|
|
||||||
AbnormalityManager abnormalityManager = target.GetComponent<AbnormalityManager>();
|
|
||||||
if (abnormalityManager != null && signatureFailureAbnormality != null)
|
|
||||||
{
|
|
||||||
abnormalityManager.ApplyAbnormality(signatureFailureAbnormality, gameObject);
|
|
||||||
}
|
|
||||||
|
|
||||||
HitReactionController hitReactionController = target.GetComponent<HitReactionController>();
|
|
||||||
if (hitReactionController == null)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
float distance = Vector3.Distance(transform.position, target.transform.position);
|
|
||||||
if (distance <= signatureFailureDownRadius)
|
|
||||||
{
|
|
||||||
hitReactionController.ApplyDown(signatureFailureDownDuration);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (distance > signatureFailureKnockbackRadius)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
Vector3 knockbackDirection = target.transform.position - transform.position;
|
|
||||||
knockbackDirection.y = 0f;
|
|
||||||
if (knockbackDirection.sqrMagnitude < 0.0001f)
|
|
||||||
{
|
|
||||||
knockbackDirection = transform.forward;
|
|
||||||
}
|
|
||||||
|
|
||||||
hitReactionController.ApplyKnockback(knockbackDirection.normalized * signatureFailureKnockbackSpeed, signatureFailureKnockbackDuration);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool HasMetSignatureBreakThreshold()
|
|
||||||
{
|
|
||||||
if (!isSignaturePatternActive)
|
|
||||||
return false;
|
|
||||||
|
|
||||||
if (signatureRequiredDamage <= 0f)
|
|
||||||
return true;
|
|
||||||
|
|
||||||
return signatureAccumulatedDamage >= signatureRequiredDamage;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static bool HasAnimatorParameter(Animator animator, string parameterName, AnimatorControllerParameterType parameterType)
|
private static bool HasAnimatorParameter(Animator animator, string parameterName, AnimatorControllerParameterType parameterType)
|
||||||
{
|
{
|
||||||
if (animator == null || string.IsNullOrEmpty(parameterName))
|
if (animator == null || string.IsNullOrEmpty(parameterName))
|
||||||
@@ -1171,13 +822,5 @@ namespace Colosseum.Enemy
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void HandleBossDamageTaken(float damage)
|
|
||||||
{
|
|
||||||
if (!IsServer || !isSignaturePatternActive || damage <= 0f)
|
|
||||||
return;
|
|
||||||
|
|
||||||
signatureAccumulatedDamage += damage;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -377,50 +377,12 @@ namespace Colosseum.UI
|
|||||||
|
|
||||||
private void UpdateSignatureUi()
|
private void UpdateSignatureUi()
|
||||||
{
|
{
|
||||||
if (!showSignatureUi)
|
// 시그니처 패턴은 이제 BT의 ChargeWait 스텝으로 처리됩니다.
|
||||||
{
|
// 시그니처 전용 UI 업데이트는 비활성화합니다.
|
||||||
SetSignatureVisible(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (signatureRoot == null)
|
if (signatureRoot == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (targetBoss == null)
|
SetSignatureVisible(false);
|
||||||
{
|
|
||||||
SetSignatureVisible(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (bossCombatContext == null)
|
|
||||||
bossCombatContext = targetBoss.GetComponent<BossCombatBehaviorContext>();
|
|
||||||
|
|
||||||
if (bossCombatContext == null || !bossCombatContext.IsSignaturePatternActive)
|
|
||||||
{
|
|
||||||
SetSignatureVisible(false);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
SetSignatureVisible(true);
|
|
||||||
|
|
||||||
if (signatureNameText != null)
|
|
||||||
{
|
|
||||||
signatureNameText.text = string.IsNullOrEmpty(bossCombatContext.SignaturePatternName)
|
|
||||||
? "시그니처"
|
|
||||||
: bossCombatContext.SignaturePatternName;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (signatureDetailText != null)
|
|
||||||
{
|
|
||||||
signatureDetailText.text =
|
|
||||||
$"차단 {Mathf.CeilToInt(bossCombatContext.SignatureAccumulatedDamage)} / {Mathf.CeilToInt(bossCombatContext.SignatureRequiredDamage)}" +
|
|
||||||
$" | {bossCombatContext.SignatureRemainingTime:0.0}s";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (signatureFillImage != null)
|
|
||||||
{
|
|
||||||
signatureFillImage.fillAmount = 1f - bossCombatContext.SignatureCastProgressNormalized;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void EnsureSignatureUi()
|
private void EnsureSignatureUi()
|
||||||
|
|||||||
Reference in New Issue
Block a user