Compare commits

...

4 Commits

Author SHA1 Message Date
0c7c7b0c12 feat: 플레이어 탱킹 및 지원 스킬 1차 구현
- 도발, 방어 태세, 철벽 스킬과 위협 생성 배율 시스템을 추가

- 치유, 광역 치유, 보호막 스킬과 관련 이상상태/이펙트 자산을 구성

- 보호막 흡수 로직과 체력 HUD 보너스 표시를 PlayerNetworkController, PlayerHUD, StatBar에 반영

- 플레이어 프리팹 슬롯과 디버그 메뉴를 확장해 탱킹·지원 스킬 검증 경로를 추가

- Unity 컴파일과 런타임 테스트에서 도발, 치유, 광역 치유, 보호막 발동 및 보호막 수치 적용을 확인
2026-03-24 19:17:16 +09:00
c4209855ab chore: 드로그 명칭 반영용 TMP 폰트 아틀라스 갱신
- 투기장의 집행자 드로그 등 신규 한글 표기에 필요한 글리프가 TMP 아틀라스에 반영됨

- 폰트 설정 변경이 아니라 TMP_SuseongBatang 아틀라스 텍스처 데이터 갱신만 포함

- 보스명 UI 한글 표기 변경 이후 생성된 Unity 재임포트 결과를 별도 커밋으로 정리
2026-03-24 18:22:22 +09:00
0610099a62 feat: 드로그 투척 패턴 및 보스명 UI 정리
- 공통 보스 BT 프레임워크에 utility 패턴 역할과 준비/실행 브랜치를 추가

- 드로그 투척 패턴, 스킬, 투사체 이펙트를 연결하고 1인 플레이에서도 주 대상 fallback으로 발동되게 조정

- 투척 스폰 회전 계산을 보강해 zero vector 경고를 제거

- EnemyData와 VictoryUI 보스명을 투기장의 집행자 드로그 기준으로 정리

- Unity 플레이 검증으로 1인 호스트에서 투척 실행과 후속 전투 루프를 확인
2026-03-24 18:20:22 +09:00
2d77bcea91 chore: 커밋 메시지 규칙에 chore 접두사 추가
- AGENTS.md에 feat, fix와 함께 chore 접두사를 공식 커밋 타입으로 명시
- 씬/프리팹 정리, 에셋 재구성, 기타 유지보수성 작업에 chore를 사용하는 기준을 추가
- 큰 변경의 경우 한국어 bullet 본문을 함께 작성하는 커밋 메시지 규칙을 유지하도록 정리
2026-03-24 16:54:37 +09:00
73 changed files with 3030 additions and 1895 deletions

View File

@@ -330,7 +330,9 @@ public class NetworkedComponent : NetworkBehaviour
- After Unity-related edits, refresh or compile as needed and check the Unity console before proceeding.
- For networked play tests, prefer a temporary non-conflicting test port when needed and restore the default port after validation.
- The user has a strong project preference that play mode must be stopped before edits because network ports can remain occupied otherwise.
- Commit messages should follow the recent project history style: use a type prefix such as `feat:` or `fix:` and describe the actual gameplay/UI/system change in Korean with enough detail to understand the scope from the log alone.
- Commit messages should follow the recent project history style: use a type prefix such as `feat:`, `fix:`, or `chore:` and write the subject in Korean so the gameplay/UI/system change is clear from the log alone.
- When the change is substantial, include a blank line after the subject and add Korean bullet points that summarize the work by feature/purpose, similar to commit `0889bb0` (`feat: 드로그 집행 개시 패턴 및 낙인 디버프 추가`).
- Prefer the format `type: 한글 요약` for the subject, then `- 변경 사항` bullet lines for the body. Use `feat:` for feature work, `fix:` for bug fixes, and `chore:` for non-feature maintenance such as scene/prefab cleanup, asset reorganization, or other miscellaneous upkeep. The body should mention key implementation scope, affected systems/assets, and validation or rollback notes when relevant.
- All code comments and documentation should be in Korean
- Use `[Min()]` attribute for numeric minimums in Inspector
- Use `[TextArea]` for multi-line string fields

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,25 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6170bac0d8f253349adf49e3f2a39c3f, type: 3}
m_Name: Data_Abnormality_Player_방어태세
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Abnormalities.AbnormalityData
abnormalityName: 방어 태세
icon: {fileID: 0}
duration: 4
level: 1
isDebuff: 0
statModifiers: []
periodicInterval: 0
periodicValue: 0
controlType: 0
slowMultiplier: 0.5
incomingDamageMultiplier: 0.65

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 125cb0e546495694c8d1d99ff0e15057
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,25 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6170bac0d8f253349adf49e3f2a39c3f, type: 3}
m_Name: Data_Abnormality_Player_철벽
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Abnormalities.AbnormalityData
abnormalityName: 철벽
icon: {fileID: 0}
duration: 1.5
level: 1
isDebuff: 0
statModifiers: []
periodicInterval: 0
periodicValue: 0
controlType: 4
slowMultiplier: 0.5
incomingDamageMultiplier: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3d0f7370ef4e6e64a96ae38b4c266af5
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -12,7 +12,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1ecdc2379b078b246a0bd5c0fb58e346, type: 3}
m_Name: Data_Enemy_Drog
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Enemy.EnemyData
enemyName: Boss The Test
enemyName: "\uD22C\uAE30\uC7A5\uC758 \uC9D1\uD589\uC790 \uB4DC\uB85C\uADF8"
description:
icon: {fileID: 21300000, guid: 452012ebe6d33bc4bbb53a355f77ce63, type: 3}
baseStrength: 10

View File

@@ -0,0 +1,20 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 0ce956e0878565343974c31b8111c0c6, type: 3}
m_Name: "Data_Pattern_Drog_\uD22C\uCC99"
m_EditorClassIdentifier: Colosseum.Game::Colosseum.AI.BossPatternData
patternName: "\uD22C\uCC99"
steps:
- Type: 0
Skill: {fileID: 11400000, guid: 4fb4fa3d50c14824a4ab981e4d73eac3, type: 2}
Duration: 0
cooldown: 6

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 9f7ab8078af64fd9a6ff4c9ce6aa9d3a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,30 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 94f0a76cebcac2f4fb5daf1b675fd79f, type: 3}
m_Name: "Data_Skill_Drog_\uD22C\uCC99"
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Skills.SkillData
skillName: "\uD22C\uCC99"
description: "\uB4DC\uB85C\uADF8\uAC00 \uC8FC \uB300\uC0C1 \uBC16\uC758 \uC6D0\uAC70\uB9AC \uD50C\uB808\uC774\uC5B4\uB97C \uACAC\uC81C\uD558\uB294 \uD22C\uC0AC\uCCB4 \uACF5\uACA9\uC785\uB2C8\uB2E4."
icon: {fileID: 0}
skillClip: {fileID: -7717634560727564301, guid: 4005a77aa7d531742b1de1bec27001b1, type: 3}
endClip: {fileID: -8265974341663887746, guid: d3e4690f866332b43b86ee7005291cd0, type: 3}
animationSpeed: 1
useRootMotion: 0
ignoreRootMotionY: 1
jumpToTarget: 0
blockMovementWhileCasting: 1
blockJumpWhileCasting: 1
blockOtherSkillsWhileCasting: 1
cooldown: 0
manaCost: 0
effects:
- {fileID: 11400000, guid: 7cb93b3b54be4e59b40f2f1f6dcf2c63, type: 2}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 4fb4fa3d50c14824a4ab981e4d73eac3
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,30 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 94f0a76cebcac2f4fb5daf1b675fd79f, type: 3}
m_Name: Data_Skill_Player_광역치유
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Skills.SkillData
skillName: 광역 치유
description: 주변 아군과 자신의 체력을 함께 회복한다.
icon: {fileID: 0}
skillClip: {fileID: -8689311932429934276, guid: ac0adc4c7f982fe4d82eac9c2267f0c6, type: 3}
endClip: {fileID: 0}
animationSpeed: 1
useRootMotion: 0
ignoreRootMotionY: 1
jumpToTarget: 0
blockMovementWhileCasting: 1
blockJumpWhileCasting: 1
blockOtherSkillsWhileCasting: 1
cooldown: 16
manaCost: 30
effects:
- {fileID: 11400000, guid: d33ec3ec97ad8084e81bb5a60f1e0eca, type: 2}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7a245d40a0d21b248b942033d4ec4309
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,30 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 94f0a76cebcac2f4fb5daf1b675fd79f, type: 3}
m_Name: Data_Skill_Player_도발
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Skills.SkillData
skillName: 도발
description: 주변 적의 위협 수치를 크게 높이고 짧은 시간 동안 위협 생성량을 증가시킨다.
icon: {fileID: 0}
skillClip: {fileID: -8689311932429934276, guid: ac0adc4c7f982fe4d82eac9c2267f0c6, type: 3}
endClip: {fileID: 0}
animationSpeed: 1
useRootMotion: 0
ignoreRootMotionY: 1
jumpToTarget: 0
blockMovementWhileCasting: 1
blockJumpWhileCasting: 1
blockOtherSkillsWhileCasting: 1
cooldown: 8
manaCost: 10
effects:
- {fileID: 11400000, guid: f0aaa98426be3d44082a386c00ea9aea, type: 2}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1020083ab98b8214f918fa2ab7c1a3a1
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,30 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 94f0a76cebcac2f4fb5daf1b675fd79f, type: 3}
m_Name: Data_Skill_Player_방어태세
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Skills.SkillData
skillName: 방어 태세
description: 짧은 시간 동안 받는 피해를 줄이고 위협 생성량을 높인다.
icon: {fileID: 0}
skillClip: {fileID: -8689311932429934276, guid: ac0adc4c7f982fe4d82eac9c2267f0c6, type: 3}
endClip: {fileID: 0}
animationSpeed: 1
useRootMotion: 0
ignoreRootMotionY: 1
jumpToTarget: 0
blockMovementWhileCasting: 1
blockJumpWhileCasting: 1
blockOtherSkillsWhileCasting: 1
cooldown: 10
manaCost: 12
effects:
- {fileID: 11400000, guid: a7024f38a9ce6c94ba466164604bde3b, type: 2}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a822c7e8c7cee5546ad594b582208e53
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,30 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 94f0a76cebcac2f4fb5daf1b675fd79f, type: 3}
m_Name: Data_Skill_Player_보호막
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Skills.SkillData
skillName: 보호막
description: 주변 아군과 자신에게 피해를 흡수하는 보호막을 부여한다.
icon: {fileID: 0}
skillClip: {fileID: -8689311932429934276, guid: ac0adc4c7f982fe4d82eac9c2267f0c6, type: 3}
endClip: {fileID: 0}
animationSpeed: 1
useRootMotion: 0
ignoreRootMotionY: 1
jumpToTarget: 0
blockMovementWhileCasting: 1
blockJumpWhileCasting: 1
blockOtherSkillsWhileCasting: 1
cooldown: 18
manaCost: 24
effects:
- {fileID: 11400000, guid: 65ed1eabc2fb73d43b86230317222608, type: 2}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b78d2eb76cdfbe248b65bafe6e1dc231
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,30 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 94f0a76cebcac2f4fb5daf1b675fd79f, type: 3}
m_Name: Data_Skill_Player_철벽
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Skills.SkillData
skillName: 철벽
description: 짧은 시간 동안 무적이 되며 위협 생성량이 약간 증가한다.
icon: {fileID: 0}
skillClip: {fileID: -8689311932429934276, guid: ac0adc4c7f982fe4d82eac9c2267f0c6, type: 3}
endClip: {fileID: 0}
animationSpeed: 1
useRootMotion: 0
ignoreRootMotionY: 1
jumpToTarget: 0
blockMovementWhileCasting: 1
blockJumpWhileCasting: 1
blockOtherSkillsWhileCasting: 1
cooldown: 18
manaCost: 20
effects:
- {fileID: 11400000, guid: bc418a5bb985ee34395994d50918086b, type: 2}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 29e1ce0656471b54f84b18a773032a99
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,30 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 94f0a76cebcac2f4fb5daf1b675fd79f, type: 3}
m_Name: Data_Skill_Player_치유
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Skills.SkillData
skillName: 치유
description: 자신의 체력을 빠르게 회복한다.
icon: {fileID: 0}
skillClip: {fileID: -8689311932429934276, guid: ac0adc4c7f982fe4d82eac9c2267f0c6, type: 3}
endClip: {fileID: 0}
animationSpeed: 1
useRootMotion: 0
ignoreRootMotionY: 1
jumpToTarget: 0
blockMovementWhileCasting: 1
blockJumpWhileCasting: 1
blockOtherSkillsWhileCasting: 1
cooldown: 8
manaCost: 18
effects:
- {fileID: 11400000, guid: fa5f619fe89f93f4293a0d5edcfe9592, type: 2}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 21598931a138aa44c86d85d67f6c534a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,32 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a3139ddf07cfe324fa692a88cd565e24, type: 3}
m_Name: "Data_SkillEffect_Drog_\uD22C\uCC99_0_\uD22C\uC0AC\uCCB4"
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Skills.Effects.SpawnEffect
targetType: 0
targetTeam: 0
areaCenter: 0
areaShape: 0
targetLayers:
serializedVersion: 2
m_Bits: 4294967295
areaRadius: 3
fanOriginDistance: 1
fanRadius: 3
fanHalfAngle: 45
prefab: {fileID: 7991191450305394598, guid: b8e3d022f0a2ce84da42fe4afd4a1b13, type: 3}
spawnLocation: 1
spawnOffset: {x: 0, y: 1.2, z: 0}
parentToCaster: 0
autoDestroyTime: 5
useCombatContextTarget: 1
hitEffect: {fileID: 11400000, guid: 6f8d2c2d2c744b7f8e23fe4b4fd2a991, type: 2}

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 7cb93b3b54be4e59b40f2f1f6dcf2c63
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,28 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 58efb3c775496fa40b801b21127a011e, type: 3}
m_Name: "Data_SkillEffect_Drog_\uD22C\uCC99\uD22C\uC0AC\uCCB4_0_\uB370\uBBF8\uC9C0"
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Skills.Effects.DamageEffect
targetType: 1
targetTeam: 0
areaCenter: 0
areaShape: 0
targetLayers:
serializedVersion: 2
m_Bits: 4294967295
areaRadius: 1
fanOriginDistance: 0
fanRadius: 3
fanHalfAngle: 45
baseDamage: 1
damageType: 2
statScaling: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 6f8d2c2d2c744b7f8e23fe4b4fd2a991
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,28 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: abc224c01f587d447bc8df723ef522ba, type: 3}
m_Name: Data_SkillEffect_Player_광역치유_0_회복
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Skills.Effects.HealEffect
targetType: 1
targetTeam: 1
areaCenter: 0
areaShape: 0
targetLayers:
serializedVersion: 2
m_Bits: 4294967295
includeCasterInArea: 1
areaRadius: 6
fanOriginDistance: 1
fanRadius: 3
fanHalfAngle: 45
baseHeal: 18
healScaling: 0.75

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: d33ec3ec97ad8084e81bb5a60f1e0eca
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,29 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: bd72562b167fced4191f12bd3a86d341, type: 3}
m_Name: Data_SkillEffect_Player_도발_0_도발
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Skills.Effects.TauntEffect
targetType: 0
targetTeam: 0
areaCenter: 0
areaShape: 0
targetLayers:
serializedVersion: 2
m_Bits: 4294967295
areaRadius: 5
fanOriginDistance: 1
fanRadius: 3
fanHalfAngle: 45
flatThreatAmount: 60
threatLeadBonus: 20
selfThreatMultiplier: 1.75
selfThreatMultiplierDuration: 5

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: f0aaa98426be3d44082a386c00ea9aea
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,28 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 639a0e2e83c292b4aaf5bc4b1532f099, type: 3}
m_Name: Data_SkillEffect_Player_방어태세_0_강화
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Skills.Effects.CombatBuffEffect
targetType: 0
targetTeam: 0
areaCenter: 0
areaShape: 0
targetLayers:
serializedVersion: 2
m_Bits: 0
areaRadius: 3
fanOriginDistance: 1
fanRadius: 3
fanHalfAngle: 45
abnormalityData: {fileID: 11400000, guid: 125cb0e546495694c8d1d99ff0e15057, type: 2}
threatMultiplier: 1.35
threatMultiplierDuration: 4

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a7024f38a9ce6c94ba466164604bde3b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,29 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6598d3be8b5522b4494d1f60cbc1986c, type: 3}
m_Name: Data_SkillEffect_Player_보호막_0_보호막
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Skills.Effects.ShieldEffect
targetType: 1
targetTeam: 1
areaCenter: 0
areaShape: 0
targetLayers:
serializedVersion: 2
m_Bits: 4294967295
includeCasterInArea: 1
areaRadius: 6
fanOriginDistance: 1
fanRadius: 3
fanHalfAngle: 45
baseShield: 28
shieldScaling: 0.8
duration: 5

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 65ed1eabc2fb73d43b86230317222608
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,28 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 639a0e2e83c292b4aaf5bc4b1532f099, type: 3}
m_Name: Data_SkillEffect_Player_철벽_0_강화
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Skills.Effects.CombatBuffEffect
targetType: 0
targetTeam: 0
areaCenter: 0
areaShape: 0
targetLayers:
serializedVersion: 2
m_Bits: 0
areaRadius: 3
fanOriginDistance: 1
fanRadius: 3
fanHalfAngle: 45
abnormalityData: {fileID: 11400000, guid: 3d0f7370ef4e6e64a96ae38b4c266af5, type: 2}
threatMultiplier: 1.2
threatMultiplierDuration: 1.5

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: bc418a5bb985ee34395994d50918086b
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,28 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: abc224c01f587d447bc8df723ef522ba, type: 3}
m_Name: Data_SkillEffect_Player_치유_0_회복
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Skills.Effects.HealEffect
targetType: 0
targetTeam: 1
areaCenter: 0
areaShape: 0
targetLayers:
serializedVersion: 2
m_Bits: 4294967295
includeCasterInArea: 0
areaRadius: 3
fanOriginDistance: 1
fanRadius: 3
fanHalfAngle: 45
baseHeal: 30
healScaling: 1

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: fa5f619fe89f93f4293a0d5edcfe9592
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 0
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because one or more lines are too long

View File

@@ -2189,6 +2189,7 @@ MonoBehaviour:
mainPattern: {fileID: 11400000, guid: 5efd8123be76bf844875d386d9d5f73d, type: 2}
slamPattern: {fileID: 11400000, guid: 4a52d59d590b4eaa9ef92b7984eb08c7, type: 2}
leapPattern: {fileID: 11400000, guid: 88e6cc7cab28baf4c8f8a742247000ec, type: 2}
utilityPattern: {fileID: 11400000, guid: 9f7ab8078af64fd9a6ff4c9ce6aa9d3a, type: 2}
downPunishPattern: {fileID: 11400000, guid: fe5100f855d14c0faac44b6d4f2c771e, type: 2}
signaturePattern: {fileID: 11400000, guid: 5e732b41722c45288bb6234f3e3fa638, type: 2}
phase2HealthThreshold: 0.75
@@ -2196,6 +2197,7 @@ MonoBehaviour:
targetRefreshInterval: 0.2
leapDistanceThreshold: 8
downPunishSearchRadius: 6
utilityTriggerDistance: 5
phase1SlamInterval: 3
phase2SlamInterval: 2
phase3SlamInterval: 2

View File

@@ -329,12 +329,12 @@ MonoBehaviour:
m_EditorClassIdentifier: Colosseum.Game::Colosseum.Player.PlayerSkillInput
ShowTopMostFoldoutHeaderGroup: 1
skillSlots:
- {fileID: 11400000, guid: b7f09e0e899c8fc4bb2cc9204cc6eb4a, type: 2}
- {fileID: 11400000, guid: b8c86399865e91144a3d6fcfddc04fd9, type: 2}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 0}
- {fileID: 11400000, guid: b7f09e0e899c8fc4bb2cc9204cc6eb4a, type: 2}
- {fileID: 11400000, guid: b8c86399865e91144a3d6fcfddc04fd9, type: 2}
- {fileID: 11400000, guid: 1020083ab98b8214f918fa2ab7c1a3a1, type: 2}
- {fileID: 11400000, guid: a822c7e8c7cee5546ad594b582208e53, type: 2}
- {fileID: 11400000, guid: 29e1ce0656471b54f84b18a773032a99, type: 2}
- {fileID: 0}
- {fileID: 11400000, guid: 2ed15dca92a165046b6df17b28f64874, type: 2}
skillController: {fileID: 6912018896034183004}
networkController: {fileID: 0}

View File

@@ -0,0 +1,18 @@
using System;
using Colosseum.Enemy;
using Unity.Behavior;
using Unity.Properties;
using Action = Unity.Behavior.Action;
/// <summary>
/// 공통 원거리 견제 패턴의 준비 여부를 확인합니다.
/// </summary>
[Serializable, GeneratePropertyBag]
[NodeDescription(name: "Check Utility Pattern Ready", story: "원거리 견제 패턴 준비 완료", category: "Action", id: "e3a3f4bd4f214efc873109631e5195db")]
public partial class CheckUtilityPatternReadyAction : CheckPatternReadyActionBase
{
protected override BossCombatPatternRole PatternRole => BossCombatPatternRole.Utility;
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 15de0eb23ee195a42a07c23c18f9fa9a

View File

@@ -0,0 +1,98 @@
using System;
using System.Collections.Generic;
using Colosseum;
using Colosseum.Combat;
using Colosseum.Enemy;
using Colosseum.Player;
using Unity.Behavior;
using Unity.Properties;
using UnityEngine;
using Action = Unity.Behavior.Action;
/// <summary>
/// 현재 주 대상이 아닌 다른 원거리 대상을 선택합니다.
/// </summary>
[Serializable, GeneratePropertyBag]
[NodeDescription(
name: "Select Alternate Target By Distance",
story: "주 대상이 아닌 원거리 대상 선택",
category: "Action",
id: "1fe74f607036406c8857c1a23f42c8a2")]
public partial class SelectAlternateTargetByDistanceAction : Action
{
[SerializeReference]
public BlackboardVariable<GameObject> Target;
[SerializeReference]
public BlackboardVariable<float> MinRange = new BlackboardVariable<float>(0f);
[SerializeReference]
public BlackboardVariable<float> MaxRange = new BlackboardVariable<float>(0f);
protected override Status OnStart()
{
BossCombatBehaviorContext context = GameObject.GetComponent<BossCombatBehaviorContext>();
if (context == null)
return Status.Failure;
float minRange = MinRange.Value > 0f ? MinRange.Value : context.UtilityTriggerDistance;
float maxRange = MaxRange.Value > 0f
? MaxRange.Value
: (context.EnemyBase != null && context.EnemyBase.Data != null ? context.EnemyBase.Data.AggroRange : 20f);
GameObject selectedTarget = SelectTarget(context, minRange, maxRange);
if (selectedTarget == null)
return Status.Failure;
Target.Value = selectedTarget;
return Status.Success;
}
private GameObject SelectTarget(BossCombatBehaviorContext context, float minRange, float maxRange)
{
PlayerNetworkController[] players = UnityEngine.Object.FindObjectsByType<PlayerNetworkController>(FindObjectsSortMode.None);
if (players == null || players.Length == 0)
return null;
GameObject primaryTarget = context.ResolvePrimaryTarget();
List<GameObject> validTargets = new List<GameObject>();
for (int i = 0; i < players.Length; i++)
{
PlayerNetworkController player = players[i];
if (player == null || player.IsDead || !player.gameObject.activeInHierarchy)
continue;
GameObject candidate = player.gameObject;
if (candidate == primaryTarget)
continue;
if (!context.IsValidHostileTarget(candidate))
continue;
float distance = Vector3.Distance(GameObject.transform.position, candidate.transform.position);
if (distance < minRange || distance > maxRange)
continue;
validTargets.Add(candidate);
}
if (validTargets.Count == 0)
{
if (primaryTarget != null && context.IsValidHostileTarget(primaryTarget))
{
float primaryDistance = Vector3.Distance(GameObject.transform.position, primaryTarget.transform.position);
if (primaryDistance >= minRange && primaryDistance <= maxRange)
return primaryTarget;
}
return null;
}
int randomIndex = UnityEngine.Random.Range(0, validTargets.Count);
return validTargets[randomIndex];
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 5bc0da0fc1e1b81428d64c0c8b31a402

View File

@@ -33,6 +33,9 @@ public abstract partial class UsePatternRoleActionBase : BossPatternActionBase
if (target == null && PatternRole == BossCombatPatternRole.Mobility)
target = context != null ? context.FindMobilityTarget() : null;
if (target == null && PatternRole == BossCombatPatternRole.Utility)
target = context != null ? context.FindUtilityTarget() : null;
if (target == null)
return false;
@@ -52,6 +55,13 @@ public abstract partial class UsePatternRoleActionBase : BossPatternActionBase
: context.FindMobilityTarget();
}
if (PatternRole == BossCombatPatternRole.Utility && context != null)
{
return context.IsValidUtilityTarget(fallbackTarget)
? fallbackTarget
: context.FindUtilityTarget();
}
return base.ResolveStepTarget(fallbackTarget);
}
}

View File

@@ -0,0 +1,16 @@
using System;
using Colosseum.Enemy;
using Unity.Behavior;
using Unity.Properties;
/// <summary>
/// 공통 원거리 견제 패턴을 실행합니다.
/// </summary>
[Serializable, GeneratePropertyBag]
[NodeDescription(name: "Use Utility Pattern", story: "원거리 견제 패턴 실행", category: "Action", id: "f29d4556f2d04f6bb80418f9f9fe2c68")]
public partial class UseUtilityPatternAction : UsePatternRoleActionBase
{
protected override BossCombatPatternRole PatternRole => BossCombatPatternRole.Utility;
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 36c98678f964a7447bede88fedc04561

View File

@@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: aa83afc530053564abc8d7100f96194c
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,111 @@
using System;
using System.Collections.Generic;
using UnityEngine;
namespace Colosseum.Combat
{
/// <summary>
/// 전투 중 생성하는 위협 배율을 관리합니다.
/// 탱커 스킬이 짧은 시간 동안 위협 생성량을 높이는 데 사용합니다.
/// </summary>
[DisallowMultipleComponent]
public class ThreatController : MonoBehaviour
{
[Serializable]
private class TimedThreatModifier
{
[Min(0f)] public float multiplier = 1f;
[Min(0f)] public float endTime;
}
[Header("Threat")]
[Tooltip("기본 위협 생성 배율")]
[Min(0f)] [SerializeField] private float baseThreatMultiplier = 1f;
[Tooltip("디버그 로그 출력 여부")]
[SerializeField] private bool debugMode = false;
[Header("Debug")]
[Tooltip("현재 적용 중인 위협 생성 배율")]
[Min(0f)] [SerializeField] private float currentThreatMultiplier = 1f;
private readonly List<TimedThreatModifier> activeModifiers = new List<TimedThreatModifier>();
/// <summary>
/// 현재 적용 중인 위협 생성 배율
/// </summary>
public float CurrentThreatMultiplier => currentThreatMultiplier;
private void Awake()
{
RecalculateThreatMultiplier();
}
private void Update()
{
if (activeModifiers.Count == 0)
return;
bool changed = false;
for (int i = activeModifiers.Count - 1; i >= 0; i--)
{
if (Time.time < activeModifiers[i].endTime)
continue;
activeModifiers.RemoveAt(i);
changed = true;
}
if (changed)
{
RecalculateThreatMultiplier();
}
}
/// <summary>
/// 일정 시간 동안 위협 생성 배율을 추가합니다.
/// </summary>
public void ApplyThreatMultiplier(float multiplier, float duration)
{
if (multiplier <= 0f || duration <= 0f)
return;
activeModifiers.Add(new TimedThreatModifier
{
multiplier = multiplier,
endTime = Time.time + duration,
});
RecalculateThreatMultiplier();
if (debugMode)
{
Debug.Log($"[Threat] {gameObject.name} 위협 배율 적용: x{multiplier:F2} / {duration:F2}s");
}
}
/// <summary>
/// 모든 임시 위협 배율을 제거합니다.
/// </summary>
public void ClearThreatModifiers()
{
if (activeModifiers.Count == 0)
return;
activeModifiers.Clear();
RecalculateThreatMultiplier();
}
private void RecalculateThreatMultiplier()
{
float nextMultiplier = Mathf.Max(0f, baseThreatMultiplier);
for (int i = 0; i < activeModifiers.Count; i++)
{
nextMultiplier *= Mathf.Max(0f, activeModifiers[i].multiplier);
}
currentThreatMultiplier = nextMultiplier;
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 28ce8e804d41f534e887036d4f43c3e3

View File

@@ -0,0 +1,200 @@
using System.Text;
using Colosseum.Enemy;
using Colosseum.Player;
using Colosseum.Skills;
using UnityEditor;
using UnityEngine;
namespace Colosseum.Editor
{
/// <summary>
/// 플레이 모드에서 로컬 플레이어 스킬과 보스 위협 상태를 빠르게 검증하는 디버그 메뉴입니다.
/// </summary>
public static class PlayerSkillDebugMenu
{
private const int TemporaryDebugSlotIndex = 5;
private const string HealSkillPath = "Assets/_Game/Data/Skills/Data_Skill_Player_치유.asset";
private const string AreaHealSkillPath = "Assets/_Game/Data/Skills/Data_Skill_Player_광역치유.asset";
private const string ShieldSkillPath = "Assets/_Game/Data/Skills/Data_Skill_Player_보호막.asset";
[MenuItem("Tools/Colosseum/Debug/Cast Local Skill 3")]
private static void CastLocalSkill3()
{
CastLocalSkill(2);
}
[MenuItem("Tools/Colosseum/Debug/Cast Local Skill 4")]
private static void CastLocalSkill4()
{
CastLocalSkill(3);
}
[MenuItem("Tools/Colosseum/Debug/Cast Local Skill 5")]
private static void CastLocalSkill5()
{
CastLocalSkill(4);
}
[MenuItem("Tools/Colosseum/Debug/Cast Local Heal")]
private static void CastLocalHeal()
{
CastLocalSkillAsset(HealSkillPath);
}
[MenuItem("Tools/Colosseum/Debug/Cast Local Area Heal")]
private static void CastLocalAreaHeal()
{
CastLocalSkillAsset(AreaHealSkillPath);
}
[MenuItem("Tools/Colosseum/Debug/Cast Local Shield")]
private static void CastLocalShield()
{
CastLocalSkillAsset(ShieldSkillPath);
}
[MenuItem("Tools/Colosseum/Debug/Damage Local Player 30")]
private static void DamageLocalPlayer30()
{
if (!EditorApplication.isPlaying)
{
Debug.LogWarning("[Debug] 플레이 모드에서만 사용할 수 있습니다.");
return;
}
PlayerNetworkController localNetworkController = FindLocalNetworkController();
if (localNetworkController == null)
{
Debug.LogWarning("[Debug] 로컬 PlayerNetworkController를 찾지 못했습니다.");
return;
}
localNetworkController.TakeDamageRpc(30f);
}
[MenuItem("Tools/Colosseum/Debug/Log Local Player Status")]
private static void LogLocalPlayerStatus()
{
if (!EditorApplication.isPlaying)
{
Debug.LogWarning("[Debug] 플레이 모드에서만 사용할 수 있습니다.");
return;
}
PlayerNetworkController localNetworkController = FindLocalNetworkController();
if (localNetworkController == null)
{
Debug.LogWarning("[Debug] 로컬 PlayerNetworkController를 찾지 못했습니다.");
return;
}
Debug.Log(
$"[Debug] 로컬 플레이어 상태 | HP {localNetworkController.Health:F1}/{localNetworkController.MaxHealth:F1} | " +
$"MP {localNetworkController.Mana:F1}/{localNetworkController.MaxMana:F1} | Shield {localNetworkController.Shield:F1}");
}
[MenuItem("Tools/Colosseum/Debug/Log Boss Threat Summary")]
private static void LogBossThreatSummary()
{
if (!EditorApplication.isPlaying)
{
Debug.LogWarning("[Debug] 플레이 모드에서만 사용할 수 있습니다.");
return;
}
EnemyBase[] enemies = Object.FindObjectsByType<EnemyBase>(FindObjectsInactive.Exclude, FindObjectsSortMode.None);
if (enemies == null || enemies.Length == 0)
{
Debug.LogWarning("[Debug] 활성 EnemyBase가 없습니다.");
return;
}
StringBuilder builder = new StringBuilder();
for (int i = 0; i < enemies.Length; i++)
{
EnemyBase enemy = enemies[i];
if (enemy == null)
continue;
if (builder.Length > 0)
builder.AppendLine().AppendLine();
builder.Append(enemy.name);
builder.Append(" : ");
builder.Append(enemy.GetThreatDebugSummary().Replace("\r\n", " | ").Replace("\n", " | "));
}
Debug.Log($"[Debug] 보스 위협 요약\n{builder}");
}
private static PlayerSkillInput FindLocalSkillInput()
{
PlayerSkillInput[] skillInputs = Object.FindObjectsByType<PlayerSkillInput>(FindObjectsInactive.Exclude, FindObjectsSortMode.None);
for (int i = 0; i < skillInputs.Length; i++)
{
if (skillInputs[i] != null && skillInputs[i].IsOwner)
return skillInputs[i];
}
return null;
}
private static PlayerNetworkController FindLocalNetworkController()
{
PlayerNetworkController[] networkControllers = Object.FindObjectsByType<PlayerNetworkController>(FindObjectsInactive.Exclude, FindObjectsSortMode.None);
for (int i = 0; i < networkControllers.Length; i++)
{
if (networkControllers[i] != null && networkControllers[i].IsOwner)
return networkControllers[i];
}
return null;
}
private static void CastLocalSkill(int slotIndex)
{
if (!EditorApplication.isPlaying)
{
Debug.LogWarning("[Debug] 플레이 모드에서만 사용할 수 있습니다.");
return;
}
PlayerSkillInput localSkillInput = FindLocalSkillInput();
if (localSkillInput == null)
{
Debug.LogWarning("[Debug] 로컬 PlayerSkillInput을 찾지 못했습니다.");
return;
}
localSkillInput.DebugCastSkill(slotIndex);
}
private static void CastLocalSkillAsset(string assetPath)
{
if (!EditorApplication.isPlaying)
{
Debug.LogWarning("[Debug] 플레이 모드에서만 사용할 수 있습니다.");
return;
}
PlayerSkillInput localSkillInput = FindLocalSkillInput();
if (localSkillInput == null)
{
Debug.LogWarning("[Debug] 로컬 PlayerSkillInput을 찾지 못했습니다.");
return;
}
SkillData skill = AssetDatabase.LoadAssetAtPath<SkillData>(assetPath);
if (skill == null)
{
Debug.LogWarning($"[Debug] 스킬 에셋을 찾지 못했습니다: {assetPath}");
return;
}
localSkillInput.SetSkill(TemporaryDebugSlotIndex, skill);
localSkillInput.DebugCastSkill(TemporaryDebugSlotIndex);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 024b92839f405134e8824931db2091a6

View File

@@ -68,12 +68,13 @@ namespace Colosseum.Editor
object selectorNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, runtimeAssembly.GetType("Unity.Behavior.SelectorComposite", true), new Vector2(420f, -280f));
object signatureSequence = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, runtimeAssembly.GetType("Unity.Behavior.SequenceComposite", true), new Vector2(-1020f, -40f));
object downSequence = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, runtimeAssembly.GetType("Unity.Behavior.SequenceComposite", true), new Vector2(-620f, -40f));
object leapSequence = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, runtimeAssembly.GetType("Unity.Behavior.SequenceComposite", true), new Vector2(-220f, -40f));
object slamSequence = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, runtimeAssembly.GetType("Unity.Behavior.SequenceComposite", true), new Vector2(180f, -40f));
object mainSequence = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, runtimeAssembly.GetType("Unity.Behavior.SequenceComposite", true), new Vector2(580f, -40f));
object slamFallbackSequence = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, runtimeAssembly.GetType("Unity.Behavior.SequenceComposite", true), new Vector2(980f, -40f));
object chaseSequence = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, runtimeAssembly.GetType("Unity.Behavior.SequenceComposite", true), new Vector2(1380f, -40f));
object downSequence = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, runtimeAssembly.GetType("Unity.Behavior.SequenceComposite", true), new Vector2(-780f, -40f));
object utilitySequence = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, runtimeAssembly.GetType("Unity.Behavior.SequenceComposite", true), new Vector2(-380f, -40f));
object leapSequence = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, runtimeAssembly.GetType("Unity.Behavior.SequenceComposite", true), new Vector2(20f, -40f));
object slamSequence = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, runtimeAssembly.GetType("Unity.Behavior.SequenceComposite", true), new Vector2(420f, -40f));
object mainSequence = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, runtimeAssembly.GetType("Unity.Behavior.SequenceComposite", true), new Vector2(820f, -40f));
object slamFallbackSequence = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, runtimeAssembly.GetType("Unity.Behavior.SequenceComposite", true), new Vector2(1220f, -40f));
object chaseSequence = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, runtimeAssembly.GetType("Unity.Behavior.SequenceComposite", true), new Vector2(1620f, -40f));
object signatureRefreshNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(RefreshPrimaryTargetAction), new Vector2(-1140f, 240f));
object signatureHasTargetNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ValidateTargetAction), new Vector2(-1020f, 240f));
@@ -84,39 +85,44 @@ namespace Colosseum.Editor
object downReadyNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckPunishPatternReadyAction), new Vector2(-620f, 240f));
object downUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UsePunishPatternAction), new Vector2(-500f, 240f));
object leapSelectNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(SelectTargetByDistanceAction), new Vector2(-340f, 240f));
object leapReadyNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckMobilityPatternReadyAction), new Vector2(-220f, 240f));
object leapUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UseMobilityPatternAction), new Vector2(-100f, 240f));
object utilitySelectNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(SelectAlternateTargetByDistanceAction), new Vector2(-500f, 240f));
object utilityReadyNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckUtilityPatternReadyAction), new Vector2(-380f, 240f));
object utilityUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UseUtilityPatternAction), new Vector2(-260f, 240f));
object slamRefreshNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(RefreshPrimaryTargetAction), new Vector2(0f, 240f));
object slamHasTargetNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ValidateTargetAction), new Vector2(120f, 240f));
object slamRangeNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckTargetInAttackRangeAction), new Vector2(240f, 240f));
object slamTurnNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckSecondaryPatternTurnAction), new Vector2(360f, 240f));
object slamReadyNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckSecondaryPatternReadyAction), new Vector2(480f, 240f));
object slamUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UseSecondaryPatternAction), new Vector2(600f, 240f));
object leapSelectNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(SelectTargetByDistanceAction), new Vector2(-100f, 240f));
object leapReadyNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckMobilityPatternReadyAction), new Vector2(20f, 240f));
object leapUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UseMobilityPatternAction), new Vector2(140f, 240f));
object mainRefreshNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(RefreshPrimaryTargetAction), new Vector2(520f, 240f));
object mainHasTargetNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ValidateTargetAction), new Vector2(640f, 240f));
object mainRangeNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckTargetInAttackRangeAction), new Vector2(760f, 240f));
object mainReadyNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckPrimaryPatternReadyAction), new Vector2(880f, 240f));
object mainUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UsePrimaryPatternAction), new Vector2(1000f, 240f));
object slamRefreshNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(RefreshPrimaryTargetAction), new Vector2(240f, 240f));
object slamHasTargetNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ValidateTargetAction), new Vector2(360f, 240f));
object slamRangeNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckTargetInAttackRangeAction), new Vector2(480f, 240f));
object slamTurnNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckSecondaryPatternTurnAction), new Vector2(600f, 240f));
object slamReadyNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckSecondaryPatternReadyAction), new Vector2(720f, 240f));
object slamUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UseSecondaryPatternAction), new Vector2(840f, 240f));
object fallbackRefreshNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(RefreshPrimaryTargetAction), new Vector2(920f, 240f));
object fallbackHasTargetNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ValidateTargetAction), new Vector2(1040f, 240f));
object fallbackRangeNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckTargetInAttackRangeAction), new Vector2(1160f, 240f));
object fallbackReadyNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckSecondaryPatternReadyAction), new Vector2(1280f, 240f));
object fallbackUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UseSecondaryPatternAction), new Vector2(1400f, 240f));
object mainRefreshNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(RefreshPrimaryTargetAction), new Vector2(760f, 240f));
object mainHasTargetNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ValidateTargetAction), new Vector2(880f, 240f));
object mainRangeNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckTargetInAttackRangeAction), new Vector2(1000f, 240f));
object mainReadyNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckPrimaryPatternReadyAction), new Vector2(1120f, 240f));
object mainUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UsePrimaryPatternAction), new Vector2(1240f, 240f));
object chaseRefreshNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(RefreshPrimaryTargetAction), new Vector2(1320f, 240f));
object chaseHasTargetNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ValidateTargetAction), new Vector2(1440f, 240f));
object chaseUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ChaseTargetAction), new Vector2(1560f, 240f));
object fallbackRefreshNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(RefreshPrimaryTargetAction), new Vector2(1160f, 240f));
object fallbackHasTargetNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ValidateTargetAction), new Vector2(1280f, 240f));
object fallbackRangeNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckTargetInAttackRangeAction), new Vector2(1400f, 240f));
object fallbackReadyNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(CheckSecondaryPatternReadyAction), new Vector2(1520f, 240f));
object fallbackUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UseSecondaryPatternAction), new Vector2(1640f, 240f));
object chaseRefreshNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(RefreshPrimaryTargetAction), new Vector2(1560f, 240f));
object chaseHasTargetNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ValidateTargetAction), new Vector2(1680f, 240f));
object chaseUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ChaseTargetAction), new Vector2(1800f, 240f));
Connect(graphAsset, connectEdgeMethod, GetDefaultOutputPort(startNode), GetDefaultInputPort(repeatNode));
Connect(graphAsset, connectEdgeMethod, GetDefaultOutputPort(repeatNode), GetDefaultInputPort(selectorNode));
ConnectChildren(graphAsset, connectEdgeMethod, selectorNode, signatureSequence, downSequence, leapSequence, slamSequence, mainSequence, slamFallbackSequence, chaseSequence);
ConnectChildren(graphAsset, connectEdgeMethod, selectorNode, signatureSequence, downSequence, utilitySequence, leapSequence, slamSequence, mainSequence, slamFallbackSequence, chaseSequence);
ConnectChildren(graphAsset, connectEdgeMethod, signatureSequence, signatureRefreshNode, signatureHasTargetNode, signatureReadyNode, signatureUseNode);
ConnectChildren(graphAsset, connectEdgeMethod, downSequence, downSelectNode, downReadyNode, downUseNode);
ConnectChildren(graphAsset, connectEdgeMethod, utilitySequence, utilitySelectNode, utilityReadyNode, utilityUseNode);
ConnectChildren(graphAsset, connectEdgeMethod, leapSequence, leapSelectNode, leapReadyNode, leapUseNode);
ConnectChildren(graphAsset, connectEdgeMethod, slamSequence, slamRefreshNode, slamHasTargetNode, slamRangeNode, slamTurnNode, slamReadyNode, slamUseNode);
ConnectChildren(graphAsset, connectEdgeMethod, mainSequence, mainRefreshNode, mainHasTargetNode, mainRangeNode, mainReadyNode, mainUseNode);
@@ -128,6 +134,8 @@ namespace Colosseum.Editor
LinkTarget(signatureUseNode, targetVariable);
LinkTarget(downSelectNode, targetVariable);
LinkTarget(downUseNode, targetVariable);
LinkTarget(utilitySelectNode, targetVariable);
LinkTarget(utilityUseNode, targetVariable);
LinkTarget(leapSelectNode, targetVariable);
LinkTarget(leapUseNode, targetVariable);
LinkTarget(slamRefreshNode, targetVariable);

View File

@@ -43,6 +43,9 @@ namespace Colosseum.Enemy
[FormerlySerializedAs("leapPattern")]
[SerializeField] protected BossPatternData mobilityPattern;
[Tooltip("비주 대상 원거리 견제 패턴")]
[SerializeField] protected BossPatternData utilityPattern;
[Tooltip("특정 상황에서 우선 발동하는 징벌 패턴")]
[FormerlySerializedAs("downPunishPattern")]
[SerializeField] protected BossPatternData punishPattern;
@@ -70,6 +73,9 @@ namespace Colosseum.Enemy
[FormerlySerializedAs("downPunishSearchRadius")]
[Min(0f)] [SerializeField] protected float punishSearchRadius = 6f;
[Tooltip("원거리 견제 패턴을 고려하기 시작하는 최소 거리")]
[Min(0f)] [SerializeField] protected float utilityTriggerDistance = 5f;
[Header("Pattern Cadence")]
[Tooltip("1페이즈에서 몇 번의 근접 패턴마다 보조 패턴을 섞을지")]
[FormerlySerializedAs("phase1SlamInterval")]
@@ -141,11 +147,41 @@ namespace Colosseum.Enemy
/// </summary>
public float MobilityTriggerDistance => mobilityTriggerDistance;
/// <summary>
/// 원거리 견제 패턴을 고려하는 최소 거리
/// </summary>
public float UtilityTriggerDistance => utilityTriggerDistance;
/// <summary>
/// 징벌 패턴을 고려하는 최대 반경
/// </summary>
public float PunishSearchRadius => punishSearchRadius;
/// <summary>
/// 현재 전투 대상
/// </summary>
public GameObject CurrentTarget => currentTarget;
/// <summary>
/// EnemyBase 접근자
/// </summary>
public EnemyBase EnemyBase => enemyBase;
/// <summary>
/// 현재 전투 기준이 되는 주 대상을 반환합니다.
/// </summary>
public GameObject ResolvePrimaryTarget()
{
if (IsValidHostileTarget(currentTarget))
return currentTarget;
GameObject highestThreatTarget = enemyBase != null
? enemyBase.GetHighestThreatTarget(currentTarget, null, enemyBase.Data != null ? enemyBase.Data.AggroRange : Mathf.Infinity)
: null;
return highestThreatTarget != null ? highestThreatTarget : FindNearestLivingTarget();
}
/// <summary>
/// 시그니처 패턴 진행 여부
/// </summary>
@@ -214,6 +250,9 @@ namespace Colosseum.Enemy
if (TryStartMobilityPattern())
return;
if (TryStartUtilityPattern())
return;
TryStartPrimaryLoopPattern();
}
@@ -227,6 +266,7 @@ namespace Colosseum.Enemy
BossCombatPatternRole.Primary => primaryPattern,
BossCombatPatternRole.Secondary => secondaryPattern,
BossCombatPatternRole.Mobility => mobilityPattern,
BossCombatPatternRole.Utility => utilityPattern,
BossCombatPatternRole.Punish => punishPattern,
BossCombatPatternRole.Signature => signaturePattern,
_ => null,
@@ -324,6 +364,61 @@ namespace Colosseum.Enemy
return farthestTarget;
}
/// <summary>
/// 원거리 견제 패턴 대상으로 유효한지 확인합니다.
/// </summary>
public bool IsValidUtilityTarget(GameObject candidate)
{
if (!IsValidHostileTarget(candidate))
return false;
if (candidate == ResolvePrimaryTarget())
return false;
float maxDistance = enemyBase != null && enemyBase.Data != null ? enemyBase.Data.AggroRange : 20f;
float distance = Vector3.Distance(transform.position, candidate.transform.position);
return distance >= utilityTriggerDistance && distance <= maxDistance;
}
/// <summary>
/// 현재 주 대상이 아닌 원거리 견제 대상을 찾습니다.
/// </summary>
public GameObject FindUtilityTarget()
{
PlayerNetworkController[] players = FindObjectsByType<PlayerNetworkController>(FindObjectsSortMode.None);
List<GameObject> validTargets = new List<GameObject>();
GameObject primaryTarget = ResolvePrimaryTarget();
for (int i = 0; i < players.Length; i++)
{
PlayerNetworkController player = players[i];
if (player == null || player.IsDead || !player.gameObject.activeInHierarchy)
continue;
GameObject candidate = player.gameObject;
if (!IsValidUtilityTarget(candidate))
continue;
validTargets.Add(candidate);
}
if (validTargets.Count == 0)
{
if (IsValidHostileTarget(primaryTarget))
{
float maxDistance = enemyBase != null && enemyBase.Data != null ? enemyBase.Data.AggroRange : 20f;
float distance = Vector3.Distance(transform.position, primaryTarget.transform.position);
if (distance >= utilityTriggerDistance && distance <= maxDistance)
return primaryTarget;
}
return null;
}
int randomIndex = UnityEngine.Random.Range(0, validTargets.Count);
return validTargets[randomIndex];
}
/// <summary>
/// 가장 가까운 생존 플레이어를 찾습니다.
/// </summary>
@@ -432,6 +527,21 @@ namespace Colosseum.Enemy
return true;
}
protected virtual bool TryStartUtilityPattern()
{
BossPatternData pattern = GetPattern(BossCombatPatternRole.Utility);
if (!IsPatternReady(pattern))
return false;
GameObject target = FindUtilityTarget();
if (target == null)
return false;
currentTarget = target;
StartPattern(pattern, target);
return true;
}
protected virtual BossPatternData SelectPrimaryLoopPattern()
{
BossPatternData primary = GetPattern(BossCombatPatternRole.Primary);
@@ -466,6 +576,7 @@ namespace Colosseum.Enemy
if (pattern == null || activePatternCoroutine != null)
return;
currentTarget = target;
LogDebug(GetType().Name, $"패턴 시작: {pattern.PatternName} / Target={(target != null ? target.name : "None")} / Phase={CurrentPatternPhase}");
activePatternCoroutine = StartCoroutine(RunPatternCoroutine(pattern, target));
}

View File

@@ -10,6 +10,7 @@ namespace Colosseum.Enemy
Mobility = 2,
Punish = 3,
Signature = 4,
Utility = 5,
}
/// <summary>

View File

@@ -562,7 +562,7 @@ namespace Colosseum.Enemy
if (sourceObject == null)
return;
AddThreat(sourceObject, damage * damageThreatMultiplier);
AddThreat(sourceObject, damage * damageThreatMultiplier * GetThreatSourceMultiplier(sourceObject));
}
/// <summary>
@@ -672,5 +672,17 @@ namespace Colosseum.Enemy
_ => null,
};
}
/// <summary>
/// 공격자가 가진 현재 위협 생성 배율을 반환합니다.
/// </summary>
private static float GetThreatSourceMultiplier(GameObject sourceObject)
{
if (sourceObject == null)
return 1f;
ThreatController threatController = sourceObject.GetComponent<ThreatController>();
return threatController != null ? Mathf.Max(0f, threatController.CurrentThreatMultiplier) : 1f;
}
}
}

View File

@@ -25,9 +25,11 @@ namespace Colosseum.Player
private NetworkVariable<float> currentHealth = new NetworkVariable<float>(100f);
private NetworkVariable<float> currentMana = new NetworkVariable<float>(50f);
private NetworkVariable<bool> isDead = new NetworkVariable<bool>(false);
private NetworkVariable<float> currentShield = new NetworkVariable<float>(0f);
public float Health => currentHealth.Value;
public float Mana => currentMana.Value;
public float Shield => currentShield.Value;
public float MaxHealth => characterStats != null ? characterStats.MaxHealth : 100f;
public float MaxMana => characterStats != null ? characterStats.MaxMana : 50f;
public CharacterStats Stats => characterStats;
@@ -35,6 +37,7 @@ namespace Colosseum.Player
// 체력/마나 변경 이벤트
public event Action<float, float> OnHealthChanged; // (oldValue, newValue)
public event Action<float, float> OnManaChanged; // (oldValue, newValue)
public event Action<float, float> OnShieldChanged; // (oldValue, newValue)
// 사망 이벤트
public event Action<PlayerNetworkController> OnDeath;
@@ -61,6 +64,7 @@ namespace Colosseum.Player
// 네트워크 변수 변경 콜백 등록
currentHealth.OnValueChanged += HandleHealthChanged;
currentMana.OnValueChanged += HandleManaChanged;
currentShield.OnValueChanged += HandleShieldChanged;
isDead.OnValueChanged += HandleDeathStateChanged;
// 초기화
@@ -68,6 +72,7 @@ namespace Colosseum.Player
{
currentHealth.Value = MaxHealth;
currentMana.Value = MaxMana;
currentShield.Value = 0f;
isDead.Value = false;
}
}
@@ -77,6 +82,7 @@ namespace Colosseum.Player
// 콜백 해제
currentHealth.OnValueChanged -= HandleHealthChanged;
currentMana.OnValueChanged -= HandleManaChanged;
currentShield.OnValueChanged -= HandleShieldChanged;
isDead.OnValueChanged -= HandleDeathStateChanged;
}
@@ -90,6 +96,11 @@ namespace Colosseum.Player
OnManaChanged?.Invoke(oldValue, newValue);
}
private void HandleShieldChanged(float oldValue, float newValue)
{
OnShieldChanged?.Invoke(oldValue, newValue);
}
private void HandleDeathStateChanged(bool oldValue, bool newValue)
{
OnDeathStateChanged?.Invoke(newValue);
@@ -104,7 +115,8 @@ namespace Colosseum.Player
if (isDead.Value || IsDamageImmune()) return;
float finalDamage = damage * GetIncomingDamageMultiplier();
float actualDamage = Mathf.Min(finalDamage, currentHealth.Value);
float mitigatedDamage = ConsumeShield(finalDamage);
float actualDamage = Mathf.Min(mitigatedDamage, currentHealth.Value);
currentHealth.Value = Mathf.Max(0f, currentHealth.Value - actualDamage);
if (currentHealth.Value <= 0f)
@@ -167,6 +179,7 @@ namespace Colosseum.Player
if (isDead.Value) return;
isDead.Value = true;
currentShield.Value = 0f;
// 사망 시 활성 이상 상태를 정리해 리스폰 시 잔존하지 않게 합니다.
if (abnormalityManager != null)
@@ -188,6 +201,12 @@ namespace Colosseum.Player
hitReactionController.ClearHitReactionState();
}
var threatController = GetComponent<ThreatController>();
if (threatController != null)
{
threatController.ClearThreatModifiers();
}
// 스킬 입력 비활성화
var skillInput = GetComponent<PlayerSkillInput>();
if (skillInput != null)
@@ -226,6 +245,7 @@ namespace Colosseum.Player
isDead.Value = false;
currentHealth.Value = MaxHealth;
currentMana.Value = MaxMana;
currentShield.Value = 0f;
// 이동 재활성화
var movement = GetComponent<PlayerMovement>();
@@ -241,6 +261,12 @@ namespace Colosseum.Player
hitReactionController.ClearHitReactionState();
}
var threatController = GetComponent<ThreatController>();
if (threatController != null)
{
threatController.ClearThreatModifiers();
}
// 스킬 입력 재활성화
var skillInput = GetComponent<PlayerSkillInput>();
if (skillInput != null)
@@ -275,7 +301,8 @@ namespace Colosseum.Player
if (!IsServer || isDead.Value || IsDamageImmune()) return 0f;
float finalDamage = damage * GetIncomingDamageMultiplier();
float actualDamage = Mathf.Min(finalDamage, currentHealth.Value);
float mitigatedDamage = ConsumeShield(finalDamage);
float actualDamage = Mathf.Min(mitigatedDamage, currentHealth.Value);
currentHealth.Value = Mathf.Max(0f, currentHealth.Value - actualDamage);
if (currentHealth.Value <= 0f)
@@ -299,6 +326,23 @@ namespace Colosseum.Player
return actualHeal;
}
/// <summary>
/// 보호막을 적용합니다.
/// </summary>
public void ApplyShield(float amount, float duration)
{
if (!IsServer || isDead.Value || amount <= 0f)
return;
currentShield.Value = Mathf.Max(currentShield.Value, amount);
if (duration > 0f)
{
CancelInvoke(nameof(ClearShield));
Invoke(nameof(ClearShield), duration);
}
}
private bool IsDamageImmune()
{
return abnormalityManager != null && abnormalityManager.IsInvincible;
@@ -311,6 +355,24 @@ namespace Colosseum.Player
return Mathf.Max(0f, abnormalityManager.IncomingDamageMultiplier);
}
private float ConsumeShield(float incomingDamage)
{
if (incomingDamage <= 0f || currentShield.Value <= 0f)
return incomingDamage;
float shieldAbsorb = Mathf.Min(currentShield.Value, incomingDamage);
currentShield.Value = Mathf.Max(0f, currentShield.Value - shieldAbsorb);
return Mathf.Max(0f, incomingDamage - shieldAbsorb);
}
private void ClearShield()
{
if (!IsServer)
return;
currentShield.Value = 0f;
}
#endregion
}
}

View File

@@ -268,6 +268,18 @@ namespace Colosseum.Player
return !skillController.IsOnCooldown(skill) && !skillController.IsExecutingSkill;
}
/// <summary>
/// 디버그용 스킬 시전 진입점입니다.
/// 로컬 플레이어 검증 시 지정한 슬롯의 스킬을 즉시 요청합니다.
/// </summary>
public void DebugCastSkill(int slotIndex)
{
if (!IsOwner)
return;
OnSkillInput(slotIndex);
}
private void OnSkill1Performed(InputAction.CallbackContext context) => OnSkillInput(0);
private void OnSkill2Performed(InputAction.CallbackContext context) => OnSkillInput(1);

View File

@@ -0,0 +1,60 @@
using UnityEngine;
using Colosseum.Abnormalities;
using Colosseum.Combat;
namespace Colosseum.Skills.Effects
{
/// <summary>
/// 이상상태와 위협 생성 배율을 함께 적용하는 자기 강화 효과입니다.
/// 탱킹 스킬의 방어/위협 유지 용도로 사용합니다.
/// </summary>
[CreateAssetMenu(fileName = "CombatBuffEffect", menuName = "Colosseum/Skills/Effects/Combat Buff")]
public class CombatBuffEffect : SkillEffect
{
[Header("Buff")]
[Tooltip("적용할 이상상태 데이터")]
[SerializeField] private AbnormalityData abnormalityData;
[Tooltip("함께 적용할 위협 생성 배율")]
[Min(0f)] [SerializeField] private float threatMultiplier = 1f;
[Tooltip("위협 생성 배율 지속 시간")]
[Min(0f)] [SerializeField] private float threatMultiplierDuration = 0f;
protected override void ApplyEffect(GameObject caster, GameObject target)
{
if (target == null)
return;
ApplyAbnormality(target, caster);
ApplyThreatMultiplier(target);
}
private void ApplyAbnormality(GameObject target, GameObject caster)
{
if (abnormalityData == null)
return;
AbnormalityManager abnormalityManager = target.GetComponent<AbnormalityManager>();
if (abnormalityManager == null)
return;
abnormalityManager.ApplyAbnormality(abnormalityData, caster);
}
private void ApplyThreatMultiplier(GameObject target)
{
if (threatMultiplier <= 0f || threatMultiplierDuration <= 0f)
return;
ThreatController threatController = target.GetComponent<ThreatController>();
if (threatController == null)
{
threatController = target.AddComponent<ThreatController>();
}
threatController.ApplyThreatMultiplier(threatMultiplier, threatMultiplierDuration);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 639a0e2e83c292b4aaf5bc4b1532f099

View File

@@ -0,0 +1,47 @@
using UnityEngine;
using Colosseum.Player;
using Colosseum.Stats;
namespace Colosseum.Skills.Effects
{
/// <summary>
/// 보호막 효과입니다.
/// 대상에게 일정 시간 동안 피해를 흡수하는 보호막을 부여합니다.
/// </summary>
[CreateAssetMenu(fileName = "ShieldEffect", menuName = "Colosseum/Skills/Effects/Shield")]
public class ShieldEffect : SkillEffect
{
[Header("Shield")]
[Tooltip("기본 보호막 수치")]
[Min(0f)] [SerializeField] private float baseShield = 100f;
[Tooltip("회복력 계수")]
[Min(0f)] [SerializeField] private float shieldScaling = 0.5f;
[Tooltip("보호막 지속 시간")]
[Min(0f)] [SerializeField] private float duration = 5f;
protected override void ApplyEffect(GameObject caster, GameObject target)
{
if (target == null)
return;
PlayerNetworkController networkController = target.GetComponent<PlayerNetworkController>();
if (networkController == null)
return;
float totalShield = CalculateShield(caster);
networkController.ApplyShield(totalShield, duration);
}
private float CalculateShield(GameObject caster)
{
CharacterStats stats = caster != null ? caster.GetComponent<CharacterStats>() : null;
if (stats == null)
return baseShield;
return baseShield + (stats.HealPower * shieldScaling);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: 6598d3be8b5522b4494d1f60cbc1986c

View File

@@ -1,6 +1,8 @@
using UnityEngine;
using Unity.Netcode;
using Colosseum.Enemy;
namespace Colosseum.Skills.Effects
{
/// <summary>
@@ -15,6 +17,8 @@ namespace Colosseum.Skills.Effects
[SerializeField] private Vector3 spawnOffset = Vector3.zero;
[SerializeField] private bool parentToCaster = false;
[Min(0f)] [SerializeField] private float autoDestroyTime = 3f;
[Tooltip("전투 컨텍스트의 현재 타겟을 스폰 방향 계산에 사용할지 여부")]
[SerializeField] private bool useCombatContextTarget = false;
[Header("Hit Settings")]
[Tooltip("투사체가 대상에 명중했을 때 적용할 효과. 미설정 시 명중 효과 없음.")]
@@ -24,8 +28,9 @@ namespace Colosseum.Skills.Effects
{
if (prefab == null || caster == null) return;
Vector3 spawnPos = GetSpawnPosition(caster, target) + spawnOffset;
Quaternion spawnRot = GetSpawnRotation(caster, target);
GameObject resolvedTarget = ResolveTarget(caster, target);
Vector3 spawnPos = GetSpawnPosition(caster, resolvedTarget) + spawnOffset;
Quaternion spawnRot = GetSpawnRotation(caster, resolvedTarget);
var networkObject = prefab.GetComponent<NetworkObject>();
if (networkObject != null)
@@ -55,6 +60,20 @@ namespace Colosseum.Skills.Effects
}
}
private GameObject ResolveTarget(GameObject caster, GameObject target)
{
if (!useCombatContextTarget)
return target;
if (target != null && target != caster)
return target;
BossCombatBehaviorContext context = caster.GetComponent<BossCombatBehaviorContext>();
return context != null && context.CurrentTarget != null
? context.CurrentTarget
: target;
}
private Vector3 GetSpawnPosition(GameObject caster, GameObject target)
{
return spawnLocation switch
@@ -68,10 +87,13 @@ namespace Colosseum.Skills.Effects
private Quaternion GetSpawnRotation(GameObject caster, GameObject target)
{
if (spawnLocation == SpawnLocation.Target && target != null)
if (target != null && (spawnLocation == SpawnLocation.Target || spawnLocation == SpawnLocation.CasterForward))
{
return Quaternion.LookRotation(target.transform.position - caster.transform.position);
Vector3 lookDirection = target.transform.position - caster.transform.position;
if (lookDirection.sqrMagnitude > 0.0001f)
return Quaternion.LookRotation(lookDirection);
}
return caster.transform.rotation;
}
}

View File

@@ -0,0 +1,87 @@
using System.Collections.Generic;
using UnityEngine;
using Colosseum.Combat;
using Colosseum.Enemy;
namespace Colosseum.Skills.Effects
{
/// <summary>
/// 주변 적의 위협 수치를 높여 주 대상을 자신에게 돌리는 도발 효과입니다.
/// 필요 시 시전자에게 임시 위협 생성 배율도 함께 부여합니다.
/// </summary>
[CreateAssetMenu(fileName = "TauntEffect", menuName = "Colosseum/Skills/Effects/Taunt")]
public class TauntEffect : SkillEffect
{
[Header("Taunt Settings")]
[Tooltip("도발 시 추가할 기본 위협 수치")]
[Min(0f)] [SerializeField] private float flatThreatAmount = 50f;
[Tooltip("현재 최고 위협보다 이 값만큼 더 높게 설정합니다.")]
[Min(0f)] [SerializeField] private float threatLeadBonus = 10f;
[Tooltip("도발과 함께 시전자에게 부여할 위협 생성 배율")]
[Min(0f)] [SerializeField] private float selfThreatMultiplier = 1.5f;
[Tooltip("위협 생성 배율 지속 시간")]
[Min(0f)] [SerializeField] private float selfThreatMultiplierDuration = 5f;
private readonly Collider[] overlapBuffer = new Collider[16];
private readonly HashSet<EnemyBase> processedEnemies = new HashSet<EnemyBase>();
protected override void ApplyEffect(GameObject caster, GameObject target)
{
if (caster == null)
return;
ApplySelfThreatMultiplier(caster);
processedEnemies.Clear();
int hitCount = Physics.OverlapSphereNonAlloc(caster.transform.position, areaRadius, overlapBuffer, targetLayers);
for (int i = 0; i < hitCount; i++)
{
Collider hit = overlapBuffer[i];
if (hit == null)
continue;
EnemyBase enemy = hit.GetComponentInParent<EnemyBase>();
if (enemy == null || processedEnemies.Contains(enemy))
continue;
if (!IsValidTarget(caster, enemy.gameObject))
continue;
processedEnemies.Add(enemy);
ApplyTauntThreat(enemy, caster);
}
}
private void ApplySelfThreatMultiplier(GameObject caster)
{
if (selfThreatMultiplier <= 0f || selfThreatMultiplierDuration <= 0f)
return;
ThreatController threatController = caster.GetComponent<ThreatController>();
if (threatController == null)
{
threatController = caster.AddComponent<ThreatController>();
}
threatController.ApplyThreatMultiplier(selfThreatMultiplier, selfThreatMultiplierDuration);
}
private void ApplyTauntThreat(EnemyBase enemy, GameObject caster)
{
if (enemy == null || caster == null || !enemy.UseThreatSystem)
return;
GameObject highestThreatTarget = enemy.GetHighestThreatTarget();
float highestThreat = highestThreatTarget != null ? enemy.GetThreat(highestThreatTarget) : 0f;
float currentCasterThreat = enemy.GetThreat(caster);
float desiredThreat = Mathf.Max(currentCasterThreat + flatThreatAmount, highestThreat + threatLeadBonus + flatThreatAmount);
enemy.SetThreat(caster, desiredThreat);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: bd72562b167fced4191f12bd3a86d341

View File

@@ -0,0 +1,34 @@
using UnityEngine;
using Colosseum.Combat;
namespace Colosseum.Skills.Effects
{
/// <summary>
/// 시전자 또는 대상의 위협 생성 배율을 일정 시간 증가시킵니다.
/// </summary>
[CreateAssetMenu(fileName = "ThreatModifierEffect", menuName = "Colosseum/Skills/Effects/Threat Modifier")]
public class ThreatModifierEffect : SkillEffect
{
[Header("Threat Modifier")]
[Tooltip("적용할 위협 생성 배율")]
[Min(0f)] [SerializeField] private float threatMultiplier = 1.5f;
[Tooltip("배율 지속 시간")]
[Min(0f)] [SerializeField] private float duration = 5f;
protected override void ApplyEffect(GameObject caster, GameObject target)
{
if (target == null || threatMultiplier <= 0f || duration <= 0f)
return;
ThreatController threatController = target.GetComponent<ThreatController>();
if (threatController == null)
{
threatController = target.AddComponent<ThreatController>();
}
threatController.ApplyThreatMultiplier(threatMultiplier, duration);
}
}
}

View File

@@ -0,0 +1,2 @@
fileFormatVersion: 2
guid: ae36db0b9307b554bae67c8825a36b99

View File

@@ -22,6 +22,8 @@ namespace Colosseum.Skills
[SerializeField] protected AreaCenterType areaCenter = AreaCenterType.Caster;
[SerializeField] protected AreaShapeType areaShape = AreaShapeType.Sphere;
[SerializeField] protected LayerMask targetLayers;
[Tooltip("Area 범위 효과일 때 시전자 본인 포함 여부")]
[SerializeField] protected bool includeCasterInArea = false;
[Header("Sphere Settings")]
[Min(0.1f)] [SerializeField] protected float areaRadius = 3f;
@@ -42,6 +44,7 @@ namespace Colosseum.Skills
public float FanOriginDistance => fanOriginDistance;
public float FanRadius => fanRadius;
public float FanHalfAngle => fanHalfAngle;
public bool IncludeCasterInArea => includeCasterInArea;
/// <summary>
/// 스킬 시전 시 호출
@@ -115,7 +118,7 @@ namespace Colosseum.Skills
HashSet<GameObject> processedTargets = new HashSet<GameObject>();
foreach (var hit in hits)
{
if (hit.gameObject == caster) continue;
if (!includeCasterInArea && hit.gameObject == caster) continue;
if (!IsCorrectTeam(caster, hit.gameObject)) continue;
if (processedTargets.Contains(hit.gameObject)) continue;
// 부채꼴 판정

View File

@@ -77,6 +77,7 @@ namespace Colosseum.UI
targetPlayer.OnHealthChanged += HandleHealthChanged;
targetPlayer.OnManaChanged += HandleManaChanged;
targetPlayer.OnShieldChanged += HandleShieldChanged;
}
private void UnsubscribeFromEvents()
@@ -85,13 +86,14 @@ namespace Colosseum.UI
targetPlayer.OnHealthChanged -= HandleHealthChanged;
targetPlayer.OnManaChanged -= HandleManaChanged;
targetPlayer.OnShieldChanged -= HandleShieldChanged;
}
private void HandleHealthChanged(float oldValue, float newValue)
{
if (healthBar != null && targetPlayer != null)
{
healthBar.SetValue(newValue, targetPlayer.MaxHealth);
healthBar.SetValue(newValue, targetPlayer.MaxHealth, targetPlayer.Shield);
}
}
@@ -103,13 +105,21 @@ namespace Colosseum.UI
}
}
private void HandleShieldChanged(float oldValue, float newValue)
{
if (healthBar != null && targetPlayer != null)
{
healthBar.SetValue(targetPlayer.Health, targetPlayer.MaxHealth, newValue);
}
}
private void UpdateStatBars()
{
if (targetPlayer == null) return;
if (healthBar != null)
{
healthBar.SetValue(targetPlayer.Health, targetPlayer.MaxHealth);
healthBar.SetValue(targetPlayer.Health, targetPlayer.MaxHealth, targetPlayer.Shield);
}
if (manaBar != null)

View File

@@ -32,14 +32,24 @@ namespace Colosseum.UI
private float currentValue;
private float maxValue;
private float displayValue;
private float bonusValue;
/// <summary>
/// 바 값 설정
/// </summary>
public void SetValue(float current, float max)
{
SetValue(current, max, 0f);
}
/// <summary>
/// 바 값과 보너스 수치를 함께 설정합니다.
/// </summary>
public void SetValue(float current, float max, float bonus)
{
currentValue = current;
maxValue = max;
bonusValue = Mathf.Max(0f, bonus);
if (!smoothTransition)
{
@@ -102,7 +112,14 @@ namespace Colosseum.UI
// 텍스트
if (valueText != null)
{
valueText.text = $"{Mathf.CeilToInt(displayValue)} / {Mathf.CeilToInt(maxValue)}";
if (bonusValue > 0f)
{
valueText.text = $"{Mathf.CeilToInt(displayValue)} / {Mathf.CeilToInt(maxValue)} (+{Mathf.CeilToInt(bonusValue)})";
}
else
{
valueText.text = $"{Mathf.CeilToInt(displayValue)} / {Mathf.CeilToInt(maxValue)}";
}
}
}

View File

@@ -1,6 +1,7 @@
using UnityEngine;
using UnityEngine.UI;
using TMPro;
using Colosseum.Enemy;
namespace Colosseum.UI
@@ -42,7 +43,7 @@ namespace Colosseum.UI
// 보스 이름 표시
if (bossNameText != null && BossEnemy.ActiveBoss != null)
{
bossNameText.text = $"{BossEnemy.ActiveBoss.name} Defeated!";
bossNameText.text = BuildBossVictoryText(BossEnemy.ActiveBoss);
}
// 애니메이션 재생
@@ -51,5 +52,20 @@ namespace Colosseum.UI
animator.SetTrigger("Show");
}
}
/// <summary>
/// 승리 UI에 표시할 보스 이름 문구를 생성합니다.
/// </summary>
private static string BuildBossVictoryText(BossEnemy boss)
{
if (boss == null)
return string.Empty;
string bossName = boss.Data != null && !string.IsNullOrWhiteSpace(boss.Data.EnemyName)
? boss.Data.EnemyName
: boss.name;
return $"{bossName} 격파";
}
}
}