feat: 드로그 기본 루프 게이트를 BT로 이관
- big pattern grace period 판정을 런타임 헬퍼에서 제거하고 BT 조건/액션 노드로 명시 - Increment/Reset Basic Loop Count 노드 추가 및 BT_Drog 재빌드 반영 - Signature Failure Effects 수치를 BT 노드가 직접 보관하도록 정리
This commit is contained in:
@@ -7,6 +7,7 @@ using System.Reflection;
|
||||
using Colosseum.AI;
|
||||
using Colosseum.AI.BehaviorActions.Actions;
|
||||
using Colosseum.AI.BehaviorActions.Conditions;
|
||||
using Colosseum.Abnormalities;
|
||||
using Colosseum.Enemy;
|
||||
using Colosseum.Skills;
|
||||
|
||||
@@ -33,6 +34,7 @@ namespace Colosseum.Editor
|
||||
private const string DefaultPressurePatternPath = "Assets/_Game/Data/Patterns/Data_Pattern_Drog_콤보-발구르기.asset";
|
||||
private const string DefaultUtilityPatternPath = "Assets/_Game/Data/Patterns/Data_Pattern_Drog_투척.asset";
|
||||
private const string DefaultPhase3TransitionSkillPath = "Assets/_Game/Data/Skills/Data_Skill_Drog_포효.asset";
|
||||
private const string DefaultSignatureFailureAbnormalityPath = "Assets/_Game/Data/Abnormalities/Data_Abnormality_Player_집행자의낙인.asset";
|
||||
|
||||
private const float DefaultDownedTargetSearchRadius = 6f;
|
||||
private const float DefaultLeapTargetMinDistance = 8f;
|
||||
@@ -45,11 +47,18 @@ namespace Colosseum.Editor
|
||||
private const float DefaultGroundShakeInterval = 12f;
|
||||
private const float DefaultPhase2EnterHealthPercent = 75f;
|
||||
private const float DefaultPhase3EnterHealthPercent = 40f;
|
||||
private const int DefaultBasicLoopRequirementBeforeBigPattern = 2;
|
||||
private const float DefaultComboPatternWeight = 26f;
|
||||
private const float DefaultPressurePatternWeight = 24f;
|
||||
private const float DefaultPrimaryPatternWeight = 22f;
|
||||
private const float DefaultSecondaryPatternWeight = 16f;
|
||||
private const float DefaultTertiaryPatternWeight = 12f;
|
||||
private const float DefaultSignatureFailureDamage = 40f;
|
||||
private const float DefaultSignatureFailureKnockbackRadius = 8f;
|
||||
private const float DefaultSignatureFailureDownRadius = 3f;
|
||||
private const float DefaultSignatureFailureKnockbackSpeed = 12f;
|
||||
private const float DefaultSignatureFailureKnockbackDuration = 0.35f;
|
||||
private const float DefaultSignatureFailureDownDuration = 2f;
|
||||
|
||||
[MenuItem("Tools/Colosseum/Rebuild Drog Behavior Authoring Graph")]
|
||||
private static void Rebuild()
|
||||
@@ -243,6 +252,7 @@ namespace Colosseum.Editor
|
||||
BossPatternData pressurePattern = LoadRequiredAsset<BossPatternData>(DefaultPressurePatternPath, "콤보-발구르기 패턴");
|
||||
BossPatternData utilityPattern = LoadRequiredAsset<BossPatternData>(DefaultUtilityPatternPath, "투척 패턴");
|
||||
SkillData phase3TransitionSkill = LoadRequiredAsset<SkillData>(DefaultPhase3TransitionSkillPath, "포효 스킬");
|
||||
AbnormalityData signatureFailureAbnormality = LoadRequiredAsset<AbnormalityData>(DefaultSignatureFailureAbnormalityPath, "집행 실패 디버프");
|
||||
|
||||
if (punishPattern == null
|
||||
|| signaturePattern == null
|
||||
@@ -315,6 +325,7 @@ namespace Colosseum.Editor
|
||||
object phase3RefreshNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(RefreshPrimaryTargetAction), new Vector2(actionX4, startY + stepY));
|
||||
SetNodeFieldValue(phase3RefreshNode, "SearchRange", DefaultTargetSearchRange, setFieldValueMethod);
|
||||
object phase3ValidateNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ValidateTargetAction), new Vector2(actionX5, startY + stepY));
|
||||
object phase3SignatureResetLoopNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ResetBasicLoopCountAction), new Vector2(actionX6 - 200f, startY + stepY));
|
||||
object phase3UseSignatureNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UsePatternByRoleAction), new Vector2(actionX6, startY + stepY));
|
||||
SetNodeFieldValue(phase3UseSignatureNode, "Pattern", signaturePattern, setFieldValueMethod);
|
||||
SetNodeFieldValue(phase3UseSignatureNode, "ContinueOnResolvedFailure", true, setFieldValueMethod);
|
||||
@@ -323,6 +334,7 @@ namespace Colosseum.Editor
|
||||
SetBranchRequiresAll(phase3SignatureResultBranch, true);
|
||||
object phase3SignatureStaggerNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(BossStaggerAction), new Vector2(actionX6 + 820f, startY + stepY - 120f));
|
||||
object phase3SignatureFailureNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(SignatureFailureEffectsAction), new Vector2(actionX6 + 820f, startY + stepY + 120f));
|
||||
ConfigureSignatureFailureNode(phase3SignatureFailureNode, signatureFailureAbnormality, setFieldValueMethod);
|
||||
object phase3SignatureTimerResetNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(SetBossPhaseAction), new Vector2(actionX6 + 1220f, startY + stepY));
|
||||
SetNodeFieldValue(phase3SignatureTimerResetNode, "TargetPhase", 3, setFieldValueMethod);
|
||||
SetNodeFieldValue(phase3SignatureTimerResetNode, "ResetTimer", true, setFieldValueMethod);
|
||||
@@ -335,6 +347,7 @@ namespace Colosseum.Editor
|
||||
phase3SetPhaseNode,
|
||||
phase3RefreshNode,
|
||||
phase3ValidateNode,
|
||||
phase3SignatureResetLoopNode,
|
||||
phase3UseSignatureNode,
|
||||
phase3SignatureResultBranch,
|
||||
phase3SignatureTimerResetNode);
|
||||
@@ -357,12 +370,14 @@ namespace Colosseum.Editor
|
||||
SetNodeFieldValue(punishSelectNode, "SearchRadius", DefaultDownedTargetSearchRadius, setFieldValueMethod);
|
||||
object punishUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UsePatternByRoleAction), new Vector2(actionX2, startY + stepY * 2f));
|
||||
SetNodeFieldValue(punishUseNode, "Pattern", punishPattern, setFieldValueMethod);
|
||||
ConnectChildren(graphAsset, connectEdgeMethod, punishSequence, punishSelectNode, punishUseNode);
|
||||
object punishResetLoopNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ResetBasicLoopCountAction), new Vector2(actionX3, startY + stepY * 2f));
|
||||
ConnectChildren(graphAsset, connectEdgeMethod, punishSequence, punishSelectNode, punishUseNode, punishResetLoopNode);
|
||||
|
||||
object signatureBranch = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, branchCompositeType, new Vector2(branchX, startY + stepY * 3f));
|
||||
AttachConditionWithValue(signatureBranch, typeof(IsCurrentPhaseCondition), "Phase", 3, authoringAssembly);
|
||||
AttachConditionWithValue(signatureBranch, typeof(IsPhaseElapsedTimeAboveCondition), "Seconds", DefaultSignatureRepeatInterval, authoringAssembly);
|
||||
AttachPatternReadyCondition(signatureBranch, signaturePattern, authoringAssembly);
|
||||
AttachConditionWithValue(signatureBranch, typeof(IsBasicLoopCountAtLeastCondition), "Count", DefaultBasicLoopRequirementBeforeBigPattern, authoringAssembly);
|
||||
SetBranchRequiresAll(signatureBranch, true);
|
||||
|
||||
object signatureSequence = CreateNode(
|
||||
@@ -377,11 +392,13 @@ namespace Colosseum.Editor
|
||||
object signatureUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UsePatternByRoleAction), new Vector2(actionX3, startY + stepY * 3f));
|
||||
SetNodeFieldValue(signatureUseNode, "Pattern", signaturePattern, setFieldValueMethod);
|
||||
SetNodeFieldValue(signatureUseNode, "ContinueOnResolvedFailure", true, setFieldValueMethod);
|
||||
object signatureResetLoopNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ResetBasicLoopCountAction), new Vector2(actionX3 + 220f, startY + stepY * 3f));
|
||||
object signatureResultBranch = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, branchCompositeType, new Vector2(actionX4, startY + stepY * 3f));
|
||||
AttachConditionWithValue(signatureResultBranch, typeof(IsPatternExecutionResultCondition), "Result", BossPatternExecutionResult.Failed, authoringAssembly);
|
||||
SetBranchRequiresAll(signatureResultBranch, true);
|
||||
object signatureStaggerNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(BossStaggerAction), new Vector2(actionX4 + 420f, startY + stepY * 3f - 120f));
|
||||
object signatureFailureNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(SignatureFailureEffectsAction), new Vector2(actionX4 + 420f, startY + stepY * 3f + 120f));
|
||||
ConfigureSignatureFailureNode(signatureFailureNode, signatureFailureAbnormality, setFieldValueMethod);
|
||||
object signatureTimerResetNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(SetBossPhaseAction), new Vector2(actionX5, startY + stepY * 3f));
|
||||
SetNodeFieldValue(signatureTimerResetNode, "TargetPhase", 3, setFieldValueMethod);
|
||||
SetNodeFieldValue(signatureTimerResetNode, "ResetTimer", true, setFieldValueMethod);
|
||||
@@ -392,6 +409,7 @@ namespace Colosseum.Editor
|
||||
signatureRefreshNode,
|
||||
signatureValidateNode,
|
||||
signatureUseNode,
|
||||
signatureResetLoopNode,
|
||||
signatureResultBranch,
|
||||
signatureTimerResetNode);
|
||||
|
||||
@@ -417,6 +435,7 @@ namespace Colosseum.Editor
|
||||
object leapBranch = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, branchCompositeType, new Vector2(branchX, startY + stepY * 5f));
|
||||
AttachPatternReadyCondition(leapBranch, mobilityPattern, authoringAssembly);
|
||||
AttachConditionWithValue(leapBranch, typeof(IsTargetBeyondDistanceCondition), "MinDistance", DefaultLeapTargetMinDistance, authoringAssembly);
|
||||
AttachConditionWithValue(leapBranch, typeof(IsBasicLoopCountAtLeastCondition), "Count", DefaultBasicLoopRequirementBeforeBigPattern, authoringAssembly);
|
||||
SetBranchRequiresAll(leapBranch, true);
|
||||
|
||||
object leapSequence = CreateNode(
|
||||
@@ -432,12 +451,14 @@ namespace Colosseum.Editor
|
||||
object leapValidateNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ValidateTargetAction), new Vector2(actionX2, startY + stepY * 5f));
|
||||
object leapUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UsePatternByRoleAction), new Vector2(actionX3, startY + stepY * 5f));
|
||||
SetNodeFieldValue(leapUseNode, "Pattern", mobilityPattern, setFieldValueMethod);
|
||||
ConnectChildren(graphAsset, connectEdgeMethod, leapSequence, leapSelectNode, leapValidateNode, leapUseNode);
|
||||
object leapResetLoopNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ResetBasicLoopCountAction), new Vector2(actionX4, startY + stepY * 5f));
|
||||
ConnectChildren(graphAsset, connectEdgeMethod, leapSequence, leapSelectNode, leapValidateNode, leapUseNode, leapResetLoopNode);
|
||||
|
||||
object groundShakeBranch = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, branchCompositeType, new Vector2(branchX, startY + stepY * 6f));
|
||||
AttachConditionWithValue(groundShakeBranch, typeof(IsCurrentPhaseCondition), "Phase", 2, authoringAssembly);
|
||||
AttachConditionWithValue(groundShakeBranch, typeof(IsPhaseElapsedTimeAboveCondition), "Seconds", DefaultGroundShakeInterval, authoringAssembly);
|
||||
AttachPatternReadyCondition(groundShakeBranch, groundShakePattern, authoringAssembly);
|
||||
AttachConditionWithValue(groundShakeBranch, typeof(IsBasicLoopCountAtLeastCondition), "Count", DefaultBasicLoopRequirementBeforeBigPattern, authoringAssembly);
|
||||
SetBranchRequiresAll(groundShakeBranch, true);
|
||||
|
||||
object groundShakeSequence = CreateNode(
|
||||
@@ -451,10 +472,11 @@ namespace Colosseum.Editor
|
||||
object groundShakeValidateNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ValidateTargetAction), new Vector2(actionX2, startY + stepY * 6f));
|
||||
object groundShakeUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UsePatternByRoleAction), new Vector2(actionX3, startY + stepY * 6f));
|
||||
SetNodeFieldValue(groundShakeUseNode, "Pattern", groundShakePattern, setFieldValueMethod);
|
||||
object groundShakeResetLoopNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ResetBasicLoopCountAction), new Vector2(actionX4 - 180f, startY + stepY * 6f));
|
||||
object groundShakeTimerResetNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(SetBossPhaseAction), new Vector2(actionX4, startY + stepY * 6f));
|
||||
SetNodeFieldValue(groundShakeTimerResetNode, "TargetPhase", 2, setFieldValueMethod);
|
||||
SetNodeFieldValue(groundShakeTimerResetNode, "ResetTimer", true, setFieldValueMethod);
|
||||
ConnectChildren(graphAsset, connectEdgeMethod, groundShakeSequence, groundShakeRefreshNode, groundShakeValidateNode, groundShakeUseNode, groundShakeTimerResetNode);
|
||||
ConnectChildren(graphAsset, connectEdgeMethod, groundShakeSequence, groundShakeRefreshNode, groundShakeValidateNode, groundShakeUseNode, groundShakeResetLoopNode, groundShakeTimerResetNode);
|
||||
|
||||
object meleeBranch = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, branchCompositeType, new Vector2(branchX, startY + stepY * 7f));
|
||||
object meleeRangeCondModel = AttachCondition(meleeBranch, typeof(IsTargetInAttackRangeCondition), authoringAssembly);
|
||||
@@ -475,7 +497,9 @@ namespace Colosseum.Editor
|
||||
object meleeValidateNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(ValidateTargetAction), new Vector2(actionX1, startY + stepY * 7f));
|
||||
object meleeUseNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(UseWeightedReadyPatternAction), new Vector2(actionX2, startY + stepY * 7f));
|
||||
SetWeightedPatternFields(meleeUseNode, setFieldValueMethod, comboPattern, DefaultComboPatternWeight, pressurePattern, DefaultPressurePatternWeight, primaryPattern, DefaultPrimaryPatternWeight, secondaryPattern, DefaultSecondaryPatternWeight, tertiaryPattern, DefaultTertiaryPatternWeight);
|
||||
ConnectChildren(graphAsset, connectEdgeMethod, meleeSequence, meleeValidateNode, meleeUseNode);
|
||||
object meleeIncrementLoopNode = CreateNode(graphAsset, createNodeMethod, getNodeInfoMethod, typeof(IncrementBasicLoopCountAction), new Vector2(actionX3, startY + stepY * 7f));
|
||||
SetNodeFieldValue(meleeIncrementLoopNode, "Count", 1, setFieldValueMethod);
|
||||
ConnectChildren(graphAsset, connectEdgeMethod, meleeSequence, meleeValidateNode, meleeUseNode, meleeIncrementLoopNode);
|
||||
|
||||
object chaseSequence = CreateNode(
|
||||
graphAsset,
|
||||
@@ -819,6 +843,17 @@ namespace Colosseum.Editor
|
||||
}
|
||||
}
|
||||
|
||||
private static void ConfigureSignatureFailureNode(object nodeModel, AbnormalityData failureAbnormality, MethodInfo setFieldValueMethod)
|
||||
{
|
||||
SetNodeFieldValue(nodeModel, "FailureDamage", DefaultSignatureFailureDamage, setFieldValueMethod);
|
||||
SetNodeFieldValue(nodeModel, "FailureAbnormality", failureAbnormality, setFieldValueMethod);
|
||||
SetNodeFieldValue(nodeModel, "KnockbackRadius", DefaultSignatureFailureKnockbackRadius, setFieldValueMethod);
|
||||
SetNodeFieldValue(nodeModel, "DownRadius", DefaultSignatureFailureDownRadius, setFieldValueMethod);
|
||||
SetNodeFieldValue(nodeModel, "KnockbackSpeed", DefaultSignatureFailureKnockbackSpeed, setFieldValueMethod);
|
||||
SetNodeFieldValue(nodeModel, "KnockbackDuration", DefaultSignatureFailureKnockbackDuration, setFieldValueMethod);
|
||||
SetNodeFieldValue(nodeModel, "DownDuration", DefaultSignatureFailureDownDuration, setFieldValueMethod);
|
||||
}
|
||||
|
||||
private static object CreateNode(UnityEngine.Object graphAsset, MethodInfo createNodeMethod, MethodInfo getNodeInfoMethod, Type runtimeType, Vector2 position)
|
||||
{
|
||||
if (runtimeType == null)
|
||||
|
||||
Reference in New Issue
Block a user