package TutorialMeleeDeflect
using RTDB

Map : ActionMap
{
	defaultMap = 
	{
		map = 
		[
			{
				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 = "TutorialMeleeDeflect.TutorialMeleeParryState";
			}, 
			{
				node = "CombatDecorator.MeleeCombatCloseDistanceDecorator";
				isOverriddenBy = "TutorialMeleeDeflect.TutorialMeleeCombatCloseDistanceDecorator";
			}, 
			{
				node = "CombatDecorator.MeleeCombatSafeDistanceDecorator";
				isOverriddenBy = "";
			}, 
			{
				node = "CombatDecorator.MeleeTicketDecorator";
				isOverriddenBy = "";
			}, 
			{
				node = "CombatDecorator.MeleeTicketNoRequestCondition";
				isOverriddenBy = "";
			}, 
			{
				node = "MeleeActions.MeleeBlockDodge01ConditionDefinition";
				isOverriddenBy = "";
			}, 
			{
				node = "DashAndDodgeActions.DodgeMeleeCompositeSelectorDefinition";
				isOverriddenBy = "";
			}, 
			{
				node = "MovementActions.MeleeMoveToCombatContact";
				isOverriddenBy = "TutorialMeleeDeflect.TutorialMeleeMoveToCombatContact";
			}, 
			{
				node = "CombatDecorator.MeleeApproachTicketDecorator";
				isOverriddenBy = "TutorialMeleeDeflect.TutorialMeleeApproachTicketDecorator";
			}
		];
	};
}

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;
		};
	};
}

TutorialMeleeCombatCloseDistanceDecorator : AIAction
{
	loop = 
	{
	};
}

TutorialMeleeParryState : AIAction
{
	activationCondition = 
	{
		condition = 
		{
			AND = 
			[
				"Condition.TargetBelow3dot8m", "Condition.TargetBelow45deg", "Condition.NotTicketEquip", "Condition.NotInStatesTaunt"
			];
		} : AIActionAND;
	};
	loop = 
	{
		changeNPCState = 
		{
			upperBodyState = "Parry";
		};
		toNextPhaseConditionCheckInterval = 0.5f;
		toNextPhaseCondition = 
		[
			{
				condition = 
				{
					OR = 
					[
						"Condition.TargetAbove4dot5m", "Condition.TargetAbove90deg", "Condition.NotInStatesParry"
					];
				} : AIActionOR;
			}
		];
	};
	subActions = 
	[
		{
			delay = 0.f;
			cooldowns = 
			[
				{
					name = "ParryStateCooldown";
					duration = 3.f;
				}
			];
		} : AISubActionStartCooldown
	];
	animData = 
	{
		animFeature = "ParryIdle";
		animSlot = 
		{
		};
	};
}

