package BaseStatusEffect
using RTDB, Prereqs

Knockdown : DebuffStatusEffect
{
	statusEffectType = "BaseStatusEffectTypes.Knockdown";
	bool replicated = true;
	fk< StatusEffectFX >[] VFX = 
	[
		{
			name = "status_knockdown";
		}
	];
	fk< StatusEffectFX >[] SFX = 
	[
		{
			name = "status_knockdown";
		}
	];
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 2.5f;
			} : ConstantStatModifier
		];
	};
	bool canReapply = true;
	fk< StatusEffectAIData > AIData = 
	{
		fk< IPrereq >[] activationPrereqs = 
		[
			{
				invert = true;
				fk< StatusEffect > statusEffect = "BaseStatusEffect.BossNoInterrupt";
			} : StatusEffectPrereq, 
			{
				invert = true;
				fk< StatusEffect > statusEffect = "AdamSmasher.Phase1";
			} : StatusEffectPrereq, 
			{
				invert = true;
				fk< StatusEffect > statusEffect = "AdamSmasher.Phase2";
			} : StatusEffectPrereq, 
			{
				invert = true;
				fk< StatusEffect > statusEffect = "AdamSmasher.Phase3";
			} : StatusEffectPrereq, 
			{
				statType = "KnockdownImmunity";
				valueToCheck = 1;
				comparisonType = "NotEqual";
			} : StatPrereq
		];
		float priority = 8.5f;
		fk< StatusEffectAIBehaviorFlag > behaviorEventFlag = "StatusEffectAIBehaviorFlag.InterruptsSamePriorityTask";
		fk< StatusEffectAIBehaviorType > behaviorType = "StatusEffectAIBehaviorType.Unstoppable";
	};
	fk< Stat >[] immunityStats = 
	[
		"BaseStats.KnockdownImmunity"
	];
	fk< StatusEffectPlayerData > playerData = 
	{
		statusEffectVariation = "StatusEffectVariation.Default";
		bool forceUnequipWeapon = true;
		float impulseDistance = 2.f;
		float startupAnimDuration = 0.6f;
		float landAnimDuration = 0.533f;
		float recoveryAnimDuration = 1.5f;
		float airRecoveryAnimDuration = 0.3f;
		bool rotateToSource = true;
	};
	uiData = 
	{
		string displayName = "LocKey#40947";
		description = "LocKey#77836";
		string iconPath = "knockdown_icon";
		priority = -8.0f;
	};
}

HitReactionKnockdown : DebuffStatusEffect
{
	statusEffectType = "BaseStatusEffectTypes.Knockdown";
	bool replicated = true;
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 3.5f;
			} : ConstantStatModifier
		];
	};
	bool canReapply = true;
}

KnockdownInfinite : Knockdown
{
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = -1.f;
			} : ConstantStatModifier
		];
	};
}

BikeKnockdown : Knockdown
{
	fk< Stat >[] immunityStats = [];
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 1.7;
			} : ConstantStatModifier
		];
	};
	fk< StatusEffectPlayerData > playerData = 
	{
		statusEffectVariation = "StatusEffectVariation.Bike";
		bool forceUnequipWeapon = true;
		bool blockMovement = true;
		float impulseDistance = 0.f;
		float startupAnimDuration = 0.3333f;
		float startupAnimInterruptPoint = 0.1333f;
		float landAnimDuration = 0.833f;
		float recoveryAnimDuration = 1.3f;
		float airRecoveryAnimDuration = 0.3f;
		bool rotateToSource = false;
	};
}

VehicleKnockdown : Knockdown
{
	statusEffectType = "BaseStatusEffectTypes.VehicleKnockdown";
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 4.1;
			} : ConstantStatModifier
		];
	};
	fk< Stat >[] immunityStats = 
	[
		"BaseStats.KnockdownImmunity"
	];
	fk< StatusEffectPlayerData > playerData = 
	{
		statusEffectVariation = "StatusEffectVariation.Vehicle";
		bool forceUnequipWeapon = true;
		float impulseDistance = 0.005f;
		float startupAnimDuration = 4.1f;
		bool rotateToSource = true;
		bool scaleImpulseDistance = true;
	};
}

ClimbingKnockdown : Knockdown
{
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 4.1;
			} : ConstantStatModifier
		];
	};
	fk< Stat >[] immunityStats = [];
	fk< StatusEffectPlayerData > playerData = 
	{
		statusEffectVariation = "StatusEffectVariation.Vehicle";
		bool forceUnequipWeapon = true;
		bool blockMovement = true;
		float startupAnimDuration = 4.1f;
		startupAnimInterruptPoint = 0.f;
		float impulseDistance = 0.f;
		float landAnimDuration = 0.f;
		float recoveryAnimDuration = 0.f;
		float airRecoveryAnimDuration = 0.3f;
	};
}

SmokeBomb : Knockdown
{
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 5;
			} : ConstantStatModifier
		];
	};
	fk< StatusEffectFX >[] VFX = 
	[
		{
			name = "status_smoke_bomb";
		}
	];
	fk< StatusEffectFX >[] SFX = 
	[
		{
			name = "status_smoke_bomb";
		}
	];
}

SecondaryKnockdown : Knockdown
{
	fk< StatusEffectPlayerData > playerData = 
	{
		statusEffectVariation = "StatusEffectVariation.Default";
		bool forceUnequipWeapon = true;
		float impulseDistance = 0.5f;
		float startupAnimDuration = 0.6f;
		float landAnimDuration = 0.533f;
		float recoveryAnimDuration = 1.5f;
		float airRecoveryAnimDuration = 0.3f;
		bool rotateToSource = true;
	};
}

BarbedWireKnockdown : StatusEffect
{
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 0.1f;
			} : ConstantStatModifier
		];
	};
	packages = 
	[
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						float minStateTime = 0.25;
						bool invert = true;
					} : IgnoreBarbedWirePrereq;
					statusEffect = "BaseStatusEffect.Knockdown";
				} : ApplyStatusEffectEffector
			];
		}
	];
}

KurtTakedownKnockdown : Knockdown
{
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 10.f;
			} : ConstantStatModifier
		];
	};
	fk< StatusEffectPlayerData > playerData = 
	{
		statusEffectVariation = "StatusEffectVariation.Default";
		bool forceUnequipWeapon = true;
		float impulseDistance = 0.5f;
		float startupAnimDuration = 0.6f;
		float landAnimDuration = 0.533f;
		float recoveryAnimDuration = 1.5f;
		float airRecoveryAnimDuration = 0.3f;
		bool rotateToSource = true;
	};
}

