package TutorialMeleeGuardBreak
using RTDB, MeleeActions

Map : ActionMap
{
	defaultMap = 
	{
		map = 
		[
			{
				node = "MeleeActions.SimpleMeleeCombatComboSelector";
				isOverriddenBy = "Corpo_Fists.CustomSimpleMeleeCombatComboSelector";
			}, 
			{
				node = "DashAndDodgeActions.KerenzikovDodgeCompositeSelectorDefinition";
				isOverriddenBy = "Corpo_Fists.KerenzikovDodgeCompositeSelectorDefinition";
			}, 
			{
				node = "DashAndDodgeActions.DodgeAfterHitReactionCompositeSelectorDefinition";
				isOverriddenBy = "Corpo_Fists.DodgeAfterHitReactionCompositeSelectorDefinition";
			}, 
			{
				node = "DashAndDodgeActions.DodgeMeleeCompositeSelectorDefinition";
				isOverriddenBy = "Corpo_Fists.DodgeMeleeCompositeSelectorDefinition";
			}, 
			{
				node = "DashAndDodgeActions.DodgeForParryMeleeCompositeSelectorDefinition";
				isOverriddenBy = "Corpo_Fists.DodgeForParryMeleeCompositeSelectorDefinition";
			}, 
			{
				node = "MeleeActions.MeleeParry01Selector";
				isOverriddenBy = "Corpo_Fists.MeleeParry01Selector";
			}, 
			{
				node = "MeleeActions.MeleeBlock01Selector";
				isOverriddenBy = "Corpo_Fists.MeleeBlock01Selector";
			}, 
			{
				node = "MeleeActions.MeleeKerenzikovDodge01Selector";
				isOverriddenBy = "Corpo_Fists.MeleeKerenzikovDodge01Selector";
			}, 
			{
				node = "MeleeActions.MeleeBlockDodge01Selector";
				isOverriddenBy = "Corpo_Fists.MeleeBlockDodge01Selector";
			}, 
			{
				node = "MeleeActions.MeleeBlockDodgeToParry01Selector";
				isOverriddenBy = "Corpo_Fists.MeleeBlockDodgeToParry01Selector";
			}, 
			{
				node = "MeleeActions.MeleePushAttack01Selector";
				isOverriddenBy = "Corpo_Fists.MeleePushAttack01Selector";
			}, 
			{
				node = "MeleeActions.MeleeLightCloseSingleLeft01Selector";
				isOverriddenBy = "Corpo_Fists.MeleeLightCloseSingleLeft01Selector";
			}, 
			{
				node = "MeleeActions.MeleeLightCloseSingleRight01Selector";
				isOverriddenBy = "Corpo_Fists.MeleeLightCloseSingleRight01Selector";
			}, 
			{
				node = "MeleeActions.MeleeLightCloseSingleBack01Selector";
				isOverriddenBy = "Corpo_Fists.MeleeLightCloseSingleBack01Selector";
			}, 
			{
				node = "MeleeActions.MeleeLightCloseCombo01Selector";
				isOverriddenBy = "Corpo_Fists.MeleeLightCloseCombo01Selector";
			}, 
			{
				node = "MeleeActions.MeleeLightCloseCombo02Selector";
				isOverriddenBy = "Corpo_Fists.MeleeLightCloseCombo02Selector";
			}, 
			{
				node = "MeleeActions.MeleeLightCombo01Selector";
				isOverriddenBy = "Corpo_Fists.MeleeLightCombo01Selector";
			}, 
			{
				node = "MeleeActions.MeleeLightCombo02Selector";
				isOverriddenBy = "Corpo_Fists.MeleeLightCombo02Selector";
			}, 
			{
				node = "MeleeActions.MeleeLightCombo03Selector";
				isOverriddenBy = "Corpo_Fists.MeleeLightCombo03Selector";
			}, 
			{
				node = "MeleeActions.MeleeStrongSingle01Selector";
				isOverriddenBy = "Corpo_Fists.MeleeStrongSingle01Selector";
			}, 
			{
				node = "MeleeActions.MeleeStrongSingle02Selector";
				isOverriddenBy = "Corpo_Fists.MeleeStrongSingle02Selector";
			}, 
			{
				node = "MeleeActions.MeleeChargeSingle01Selector";
				isOverriddenBy = "Corpo_Fists.MeleeChargeSingle01Selector";
			}, 
			{
				node = "MeleeActions.MeleeChargeSingle02Selector";
				isOverriddenBy = "Corpo_Fists.MeleeChargeSingle02Selector";
			}, 
			{
				node = "MeleeActions.MeleeChargeJump01Selector";
				isOverriddenBy = "Corpo_Fists.MeleeChargeJump01Selector";
			}, 
			{
				node = "MeleeActions.MeleeChargeJump02Selector";
				isOverriddenBy = "Corpo_Fists.MeleeChargeJump02Selector";
			}, 
			{
				node = "GenericArchetype.MeleePushAttack01Condition";
				isOverriddenBy = "TutorialMeleeGuardBreak.TutorialMeleePushAttack01Condition";
			}, 
			{
				node = "GenericArchetype.MeleeCloseAttackLight01Condition";
				isOverriddenBy = "";
			}, 
			{
				node = "GenericArchetype.MeleeCloseAttackLight02Condition";
				isOverriddenBy = "";
			}, 
			{
				node = "GenericArchetype.MeleeAttackLight01Condition";
				isOverriddenBy = "";
			}, 
			{
				node = "GenericArchetype.MeleeAttackLight02Condition";
				isOverriddenBy = "";
			}, 
			{
				node = "GenericArchetype.MeleeAttackLight03Condition";
				isOverriddenBy = "";
			}, 
			{
				node = "GenericArchetype.MeleeStrongSingle01Condition";
				isOverriddenBy = "";
			}, 
			{
				node = "GenericArchetype.MeleeStrongSingle02Condition";
				isOverriddenBy = "";
			}, 
			{
				node = "GenericArchetype.MeleeChargeSingle01Condition";
				isOverriddenBy = "";
			}, 
			{
				node = "GenericArchetype.MeleeChargeSingle02Condition";
				isOverriddenBy = "";
			}, 
			{
				node = "GenericArchetype.MeleeChargeSingle03Condition";
				isOverriddenBy = "";
			}, 
			{
				node = "GenericArchetype.MeleeChargeJump01Condition";
				isOverriddenBy = "";
			}, 
			{
				node = "GenericArchetype.MeleeChargeJump02Condition";
				isOverriddenBy = "";
			}, 
			{
				node = "GenericArchetype.MeleeBlockState";
				isOverriddenBy = "";
			}, 
			{
				node = "GenericArchetype.MeleeParryState";
				isOverriddenBy = "";
			}, 
			{
				node = "CombatDecorator.MeleeCombatCloseDistanceDecorator";
				isOverriddenBy = "TutorialMeleeGuardBreak.TutorialMeleeCombatCloseDistanceDecorator";
			}, 
			{
				node = "CombatDecorator.MeleeCombatSafeDistanceDecorator";
				isOverriddenBy = "";
			}, 
			{
				node = "CombatDecorator.MeleeTicketDecorator";
				isOverriddenBy = "TutorialMeleeGuardBreak.TutorialMeleeTicketDecorator";
			}, 
			{
				node = "CombatDecorator.MeleeTicketNoRequestCondition";
				isOverriddenBy = "";
			}, 
			{
				node = "MeleeActions.MeleeBlockDodge01ConditionDefinition";
				isOverriddenBy = "";
			}, 
			{
				node = "DashAndDodgeActions.DodgeMeleeContactSelectorConditionDefinition";
				isOverriddenBy = "TutorialMeleeGuardBreak.TutorialDodgeMeleeContactSelectorConditionDefinition";
			}, 
			{
				node = "MovementActions.MeleeMoveToCombatContact";
				isOverriddenBy = "TutorialMeleeGuardBreak.TutorialMeleeMoveToCombatContact";
			}, 
			{
				node = "CombatDecorator.MeleeApproachTicketDecorator";
				isOverriddenBy = "TutorialMeleeGuardBreak.TutorialMeleeApproachTicketDecorator";
			}, 
			{
				node = "MeleeActions.MeleeTauntSupportAreaSelector";
				isOverriddenBy = "TutorialMeleeGuardBreak.MeleeTauntSupportAreaSelector";
			}, 
			{
				node = "MeleeActions.MeleeTauntCombatAreaSelector";
				isOverriddenBy = "TutorialMeleeGuardBreak.MeleeTauntCombatAreaSelector";
			}, 
			{
				node = "MeleeActions.SimpleMeleeTauntCombatAreaSelector";
				isOverriddenBy = "TutorialMeleeGuardBreak.SimpleMeleeTauntCombatAreaSelector";
			}, 
			{
				node = "MeleeActions.MeleeTauntContactAreaSelector";
				isOverriddenBy = "TutorialMeleeGuardBreak.MeleeTauntContactAreaSelector";
			}, 
			{
				node = "MeleeActions.MeleeTauntHitReactionSelector";
				isOverriddenBy = "TutorialMeleeGuardBreak.MeleeTauntHitReactionSelector";
			}, 
			{
				node = "MeleeActions.MeleeTauntPreAttackSelector";
				isOverriddenBy = "TutorialMeleeGuardBreak.MeleeTauntPreAttackSelector";
			}
		];
	};
}

TutorialDodgeMeleeContactSelectorConditionDefinition : AIAction
{
	cooldowns = 
	[
		{
			name = "DodgeMeleeContactCooldown";
			duration = 2.f;
		}
	];
	activationCondition = "TutorialMeleeGuardBreak.TutorialGenericMeleeDodgeConditionDefinition";
	loop = 
	{
	};
	subActions = 
	[
		{
			delay = 0.1f;
			cooldowns = 
			[
				{
					name = "DodgeMeleeContactCooldown";
					duration = 2.f;
				}
			];
		} : AISubActionStartCooldown
	];
}

TutorialGenericMeleeDodgeConditionDefinition : AIActionCondition
{
	condition = 
	{
		AND = 
		[
			"Condition.AbilityHasDodge", "Condition.AbilityCanUseLegs", "Condition.NotMeleeStatesConditions", "Condition.NotWounded", "Condition.NotStatusEffectExhausted", "Condition.NotStatusEffectDefeated", "Condition.NotIsUsingOffMeshLink", "Condition.TargetBelow90deg", "Condition.TargetBelow10deg"
		];
	} : AIActionAND;
}

TutorialMeleePushAttack01Condition : AIAction
{
	activationCondition = 
	{
		condition = 
		{
			AND = 
			[
				"Condition.HasAnyWeapon", "Condition.AbilityCanUseLegs", "Condition.AbilityCanUseLeftHand", "Condition.AbilityCanUseRightHand", "Condition.AbilityCanGuardBreak", "Condition.TargetInStatesBlock", "Condition.CalculatePathStraightToTarget", "Condition.PushAttackCooldown"
			];
		} : AIActionAND;
	};
}

TutorialMeleeCombatCloseDistanceDecorator : AIAction
{
	activationCondition = 
	{
		condition = 
		{
			OR = 
			[
				"Condition.NotPushAttackCooldown", "Condition.NotTargetInStatesBlock", "Condition.NotCalculatePathStraightToTarget"
			];
		} : AIActionOR;
	};
	loop = 
	{
		changeNPCState = 
		{
			locomotionMode = "Moving";
		};
		toNextPhaseConditionCheckInterval = 0.1f;
		toNextPhaseCondition = 
		[
			{
				condition = 
				{
					AND = 
					[
						"Condition.TargetInStatesBlock", "Condition.CalculatePathStraightToTarget", "Condition.PushAttackCooldown"
					];
				} : AIActionAND;
			}
		];
	};
}

TutorialMeleeTicketDecorator : AIAction
{
	tickets = 
	[
		"AITicketType.Melee"
	];
	revokingTicketCompletesAction = false;
	activationCondition = 
	{
		condition = 
		{
			AND = 
			[
				"Condition.TargetInStatesBlock", "Condition.CalculatePathStraightToTarget", "Condition.PushAttackCooldown"
			];
		} : AIActionAND;
	};
	loop = 
	{
	};
}

TutorialMeleeApproachTicketDecorator : AIAction
{
	loop = 
	{
	};
}

TutorialMeleeMoveToCombatContact : AIAction
{
	loop = 
	{
		movePolicy = 
		{
			target = "AIActionTarget.CombatTarget";
			strafingTarget = "AIActionTarget.CombatTarget";
			movementType = "Walk";
			tolerance = 1.f;
			distance = 2.f;
			avoidThreatRange = 0.f;
			avoidThreatCost = 0.f;
		};
	};
}

MeleeTauntSupportAreaSelector : MeleeActions.MeleeTauntSupportAreaSelector
{
	actions = 
	[
		"MeleeFistActions.MeleeTauntSupportAreaDefinition"
	];
	defaultAction = "GenericArchetype.Success";
}

MeleeTauntCombatAreaSelector : MeleeActions.MeleeTauntCombatAreaSelector
{
	actions = 
	[
		"MeleeFistActions.MeleeTauntCombatAreaDefinition"
	];
	defaultAction = "GenericArchetype.Success";
}

SimpleMeleeTauntCombatAreaSelector : AIActionSelector
{
	actions = 
	[
		"MeleeFistActions.SimpleMeleeTauntCombatAreaDefinition"
	];
	defaultAction = "GenericArchetype.Success";
}

MeleeTauntContactAreaSelector : MeleeActions.MeleeTauntContactAreaSelector
{
	actions = 
	[
		"MeleeFistActions.MeleeTauntContactAreaDefinition"
	];
	defaultAction = "GenericArchetype.Success";
}

MeleeTauntHitReactionSelector : MeleeActions.MeleeTauntHitReactionSelector
{
	actions = 
	[
		"MeleeFistActions.MeleeTauntHitReactionDefinition"
	];
	defaultAction = "GenericArchetype.Success";
}

MeleeTauntPreAttackSelector : MeleeActions.MeleeTauntPreAttackSelector
{
	actions = 
	[
		"MeleeFistActions.MeleeTauntPreAttackDefinition"
	];
	defaultAction = "GenericArchetype.Success";
}

