package NPCAttacks
using RTDB, MeleeActions

SpecialGrabCerberus : AIAction
{
	activationCondition = 
	{
		condition = 
		{
			AND = 
			[
				"Condition.TargetPOVBelow180deg", "Condition.CalculatePathStraightToTarget"
			];
		} : AIActionAND;
	};
	loop = 
	{
		duration = 1f;
		changeNPCState = 
		{
			upperBodyState = "Taunt";
			hitReactionMode = "Unstoppable";
		};
	};
	loopSubActions = 
	[
		{
			name = "Grab";
		} : AISubActionPlayVoiceOver, 
		{
			weaponSlots = 
			[
				"AttachmentSlots.WeaponRight"
			];
			attackName = "SpecialGrabAttack";
			attackTime = 0.1f;
			attackDuration = 0.1f;
			attack = "NPCAttacks.CerberusGrabAttack01";
			attackRange = 6.0f;
		} : AISubActionAttackWithWeapon, 
		{
			statusEffects = 
			[
				"BaseStatusEffect.Invulnerable"
			];
			remove = false;
		} : AISubActionStatusEffect, 
		{
			name = "cerberus_killVO";
			resetValue = true;
		} : AISubActionAddFact
	];
	subActions = 
	[
		{
			name = "stop_eye_flare_yellow";
		} : AISubActionQueueAIEvent, 
		{
			name = "eye_flare_red";
		} : AISubActionQueueAIEvent
	];
}

CerberusGrabAttack01 : GrabAttack
{
	effectName = "melee";
	effectTag = "cerberus_grab_01";
	fk< StatusEffectAttackData >[] statusEffects = 
	[
		{
			statusEffect = "BaseStatusEffect.CerberusGrabAttackEffect01";
			applyImmediately = true;
		}, 
		{
			statusEffect = "BaseStatusEffect.TakedownsUnequipWeapons";
			applyImmediately = true;
		}
	];
	blockCostFactor = 100.0f;
}

SpecialGrabCerberusWhenCannotReach1 : AIAction
{
	activationCondition = 
	{
		condition = 
		{
			AND = 
			[
				"Condition.TargetPOVBelow180deg", "Condition.TargetAbove5m", "Condition.CalculatePathStraightToTarget"
			];
		} : AIActionAND;
	};
	loop = 
	{
		duration = 1f;
		changeNPCState = 
		{
			upperBodyState = "Taunt";
			hitReactionMode = "Unstoppable";
		};
	};
	loopSubActions = 
	[
		{
			name = "Grab";
		} : AISubActionPlayVoiceOver, 
		{
			weaponSlots = 
			[
				"AttachmentSlots.WeaponRight"
			];
			attackName = "SpecialGrabAttack";
			attackTime = 0.1f;
			attackDuration = 0.1f;
			attack = "NPCAttacks.CerberusGrabAttack01";
			attackRange = 8.f;
		} : AISubActionAttackWithWeapon, 
		{
			statusEffects = 
			[
				"BaseStatusEffect.Invulnerable"
			];
			remove = false;
		} : AISubActionStatusEffect, 
		{
			name = "cerberus_killVO";
			resetValue = true;
		} : AISubActionAddFact
	];
	subActions = 
	[
		{
			name = "stop_eye_flare_yellow";
		} : AISubActionQueueAIEvent, 
		{
			name = "eye_flare_red";
		} : AISubActionQueueAIEvent
	];
}

SpecialGrabCerberusBack : AIAction
{
	activationCondition = 
	{
		condition = 
		{
			AND = 
			[
				"Condition.TargetPOVAbove180deg"
			];
		} : AIActionAND;
	};
	loop = 
	{
		duration = 1f;
		changeNPCState = 
		{
			upperBodyState = "Taunt";
			hitReactionMode = "Unstoppable";
		};
	};
	loopSubActions = 
	[
		{
			name = "Grab";
		} : AISubActionPlayVoiceOver, 
		{
			weaponSlots = 
			[
				"AttachmentSlots.WeaponRight"
			];
			attackName = "SpecialGrabAttack";
			attackTime = 0.1f;
			attackDuration = 0.1f;
			attack = "NPCAttacks.CerberusGrabAttackBack";
			attackRange = 3.f;
			colliderBoxSize = ( 10.f, 5.f, 10.f );
		} : AISubActionAttackWithWeapon, 
		{
			statusEffects = 
			[
				"BaseStatusEffect.Invulnerable"
			];
			remove = false;
		} : AISubActionStatusEffect, 
		{
			name = "cerberus_killVO";
			resetValue = true;
		} : AISubActionAddFact
	];
	subActions = 
	[
		{
			name = "stop_eye_flare_yellow";
		} : AISubActionQueueAIEvent, 
		{
			name = "eye_flare_red";
		} : AISubActionQueueAIEvent
	];
}

SpecialGrabCerberusBackWhenCannotReach : AIAction
{
	activationCondition = 
	{
		condition = 
		{
			AND = 
			[
				"Condition.TargetPOVAbove180deg"
			];
		} : AIActionAND;
	};
	loop = 
	{
		duration = 1f;
		changeNPCState = 
		{
			upperBodyState = "Taunt";
			hitReactionMode = "Unstoppable";
		};
	};
	loopSubActions = 
	[
		{
			name = "Grab";
		} : AISubActionPlayVoiceOver, 
		{
			weaponSlots = 
			[
				"AttachmentSlots.WeaponRight"
			];
			attackName = "SpecialGrabAttack";
			attackTime = 0.1f;
			attackDuration = 0.1f;
			attack = "NPCAttacks.CerberusGrabAttackBack";
			attackRange = 6.f;
			colliderBoxSize = ( 10.f, 5.f, 10.f );
		} : AISubActionAttackWithWeapon, 
		{
			statusEffects = 
			[
				"BaseStatusEffect.Invulnerable"
			];
			remove = false;
		} : AISubActionStatusEffect, 
		{
			name = "cerberus_killVO";
			resetValue = true;
		} : AISubActionAddFact
	];
	subActions = 
	[
		{
			name = "stop_eye_flare_yellow";
		} : AISubActionQueueAIEvent, 
		{
			name = "eye_flare_red";
		} : AISubActionQueueAIEvent
	];
}

CerberusGrabAttackBack : GrabAttack
{
	effectName = "melee";
	effectTag = "cerberus_grab_back";
	fk< StatusEffectAttackData >[] statusEffects = 
	[
		{
			statusEffect = "BaseStatusEffect.CerberusGrabAttackEffectBack";
			applyImmediately = true;
		}, 
		{
			statusEffect = "BaseStatusEffect.TakedownsUnequipWeapons";
			applyImmediately = true;
		}
	];
	blockCostFactor = 100.0f;
}

CerberusGrabSelector : AIActionSelector
{
	actions = 
	[
		"NPCAttacks.SpecialGrabCerberus", "NPCAttacks.SpecialGrabCerberusBack"
	];
}

KurtTakedown02Sequence : AIActionSequence
{
	actions = 
	[
		"NPCAttacks.KurtzTakedown02", "NPCAttacks.KurtzTakedown02MissDefinition", "MeleeActions.SingleMeleeAttackCharge01RecoverHitDefinition"
	];
}

KurtzTakedown02 : MeleeActions.SingleMeleeAttackCharge01Definition
{
	loop = 
	{
		duration = 1f;
		changeNPCState = 
		{
			upperBodyState = "Taunt";
			hitReactionMode = "Unstoppable";
		};
	};
	loopSubActions = 
	[
		{
			name = "KnifeOff";
		} : AISubActionQueueAIEvent, 
		{
			name = "Grab";
		} : AISubActionPlayVoiceOver, 
		{
		} : KurtzTakedown02AttackData
	];
}

KurtzTakedown02MissDefinition : MeleeActions.SingleMeleeAttackCharge01RecoverMissDefinition
{
}

KurtzTakedown02AttackData : MeleeChargeSingle01AttackData
{
	weaponSlots = 
	[
		"AttachmentSlots.WeaponRight", "AttachmentSlots.WeaponLeft"
	];
	attackRange = 2.5f;
	colliderBoxSize = ( 0.5f, 0.3f, 2.f );
	attack = "NPCAttacks.KurtTakedownAttack02";
}

KurtTakedown01 : AIAction
{
	loop = 
	{
		duration = 1f;
		changeNPCState = 
		{
			upperBodyState = "Taunt";
			hitReactionMode = "Unstoppable";
		};
	};
	loopSubActions = 
	[
		{
			name = "Grab";
		} : AISubActionPlayVoiceOver, 
		{
			statusEffects = 
			[
				"BaseStatusEffect.Invulnerable"
			];
			remove = false;
		} : AISubActionStatusEffect, 
		{
			weaponSlots = 
			[
				"AttachmentSlots.WeaponRight"
			];
			attackName = "SpecialGrabAttack";
			attackTime = 0.1f;
			attackDuration = 0.1f;
			attack = "NPCAttacks.KurtTakedownAttack01";
			attackRange = 30.f;
			colliderBoxSize = ( 1000.f, 500.f, 1000.f );
		} : AISubActionAttackWithWeapon
	];
}

KurtTakedown_Far_02 : AIAction
{
	loop = 
	{
		duration = 1.f;
		changeNPCState = 
		{
			upperBodyState = "Taunt";
			hitReactionMode = "Unstoppable";
		};
	};
	loopSubActions = 
	[
		{
			name = "Grab";
		} : AISubActionPlayVoiceOver, 
		{
			weaponSlots = 
			[
				"AttachmentSlots.WeaponRight"
			];
			attackName = "SpecialGrabAttack";
			attackTime = 0.0f;
			attackDuration = 5.f;
			attack = "NPCAttacks.KurtTakedownAttackFar02";
			attackRange = 30.f;
			colliderBoxSize = ( 1500.f, 1000.f, 1500.f );
		} : AISubActionAttackWithWeapon, 
		{
			statusEffects = 
			[
				"BaseStatusEffect.Invulnerable"
			];
			remove = false;
		} : AISubActionStatusEffect
	];
}

