package BaseStatusEffect
using RTDB, Effectors, Prereqs, Perks

Wounded : StatusEffect
{
	duration = "BaseStats.InfiniteDuration";
	gameplayTags = 
	[
		"Wounded"
	];
	statusEffectType = "BaseStatusEffectTypes.Wounded";
	immunityStats = 
	[
		"BaseStats.WoundedImmunity"
	];
	uiData = 
	{
		string displayName = "Wounded";
		string iconPath = "crippled_icon";
	};
	packages += 
	[
		{
			stats = 
			[
				{
					statType = "BaseStats.CanGrab";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseTakedowns";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasSandevistan";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanSprintHarass";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier
			];
		}
	];
}

Crippled : Wounded
{
	gameplayTags += 
	[
		"Crippled"
	];
}

CrippledLeg : Crippled
{
	gameplayTags += 
	[
		"CrippledLeg"
	];
	packages += 
	[
		{
			stats = 
			[
				{
					statType = "BaseStats.CanSprint";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanCrouch";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseGrenades";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseCovers";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasKerenzikov";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasSandevistan";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasDodge";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasChargeJump";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanDash";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanCharge";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseLegs";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanTaunt";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanCloseCombat";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier
			];
		}
	];
}

CrippledLegLeft : CrippledLeg
{
	gameplayTags += 
	[
		"LegLeft"
	];
	VFX = 
	[
		{
			name = "status_wounded_l_leg";
		}
	];
	packages += 
	[
		{
			animationWrapperOverrides = 
			[
				"woundedLocomotion_l_leg"
			];
		}
	];
}

CrippledLegRight : CrippledLeg
{
	gameplayTags += 
	[
		"LegRight"
	];
	VFX = 
	[
		{
			name = "status_wounded_r_leg";
		}
	];
	packages += 
	[
		{
			animationWrapperOverrides = 
			[
				"woundedLocomotion_r_leg"
			];
		}
	];
}

CrippledArm : Crippled
{
	gameplayTags += 
	[
		"CrippledArm"
	];
}

CrippledArmLeft : CrippledArm
{
	gameplayTags += 
	[
		"LeftArm"
	];
	VFX = 
	[
		{
			name = "status_wounded_l_arm";
		}
	];
	packages += 
	[
		{
			animationWrapperOverrides = 
			[
				"woundedLocomotion_l_arm"
			];
			stats = 
			[
				{
					statType = "BaseStats.CanUseLeftHand";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseCovers";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanSwitchWeapon";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseGrenades";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasChargeJump";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanCharge";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanBlock";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanParry";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanTaunt";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanCloseCombat";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier
			];
		}
	];
}

CrippledHandLeft : CrippledArmLeft
{
}

CrippledArmRight : CrippledArm
{
	gameplayTags += 
	[
		"RightArm"
	];
	VFX = 
	[
		{
			name = "status_wounded_r_arm";
		}
	];
	packages += 
	[
		{
			animationWrapperOverrides = 
			[
				"woundedLocomotion_r_arm"
			];
			stats = 
			[
				{
					statType = "BaseStats.CanUseRightHand";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseCovers";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanSwitchWeapon";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseGrenades";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasChargeJump";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanCharge";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanBlock";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanParry";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanTaunt";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanCloseCombat";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier
			];
		}
	];
}

CrippledHandRight : CrippledArmRight
{
}

Dismembered : Wounded
{
	gameplayTags += 
	[
		"Dismembered"
	];
}

DismemberedLeg : Dismembered
{
	gameplayTags += 
	[
		"DismemberedLeg"
	];
	packages += 
	[
		{
			stats = 
			[
				{
					statType = "BaseStats.CanSprint";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanCrouch";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseCovers";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseGrenades";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasKerenzikov";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasSandevistan";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasDodge";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasChargeJump";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanDash";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanCharge";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanBlock";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanParry";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseLegs";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanTaunt";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanCloseCombat";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier
			];
		}
	];
}

DismemberedLegLeft : DismemberedLeg
{
	gameplayTags += 
	[
		"LeftLeg"
	];
	packages += 
	[
		{
			animationWrapperOverrides = 
			[
				"dismemberedLocomotion_l_leg"
			];
		}
	];
}

DismemberedLegRight : DismemberedLeg
{
	gameplayTags += 
	[
		"RightLeg"
	];
	packages += 
	[
		{
			animationWrapperOverrides = 
			[
				"dismemberedLocomotion_r_leg"
			];
		}
	];
}

DismemberedArm : Dismembered
{
	gameplayTags += 
	[
		"DismemberedArm"
	];
}

DismemberedArmLeft : DismemberedArm
{
	gameplayTags += 
	[
		"LeftArm"
	];
	packages += 
	[
		{
			animationWrapperOverrides = 
			[
				"dismemberedLocomotion_l_arm"
			];
			stats = 
			[
				{
					statType = "BaseStats.CanUseLeftHand";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanSwitchWeapon";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseGrenades";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanBlock";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanParry";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseCovers";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier
			];
		}
	];
}

DismemberedHandLeft : DismemberedArmLeft
{
}

DismemberedArmRight : DismemberedArm
{
	gameplayTags += 
	[
		"RightArm"
	];
	packages += 
	[
		{
			animationWrapperOverrides = 
			[
				"dismemberedLocomotion_r_arm"
			];
			stats = 
			[
				{
					statType = "BaseStats.CanUseRightHand";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanSwitchWeapon";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseGrenades";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanBlock";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanParry";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseCovers";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier
			];
		}
	];
}

DismemberedHandRight : DismemberedArmRight
{
}

Kurtz_Knife_Crippled : StatusEffect
{
	duration = "BaseStats.InfiniteDuration";
	gameplayTags = 
	[
		"CrippledLeg", "Kurt_Knife_Cripple"
	];
	statusEffectType = "BaseStatusEffectTypes.Wounded";
	immunityStats = 
	[
		"BaseStats.WoundedImmunity"
	];
	uiData = 
	{
		string displayName = "Wounded";
		string iconPath = "crippled_icon";
	};
	packages += 
	[
		{
			stats = 
			[
				{
					statType = "BaseStats.MaxSpeed";
					modifierType = "Multiplier";
					value = 0.2f;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.JumpHeight";
					modifierType = "Multiplier";
					value = 0.2f;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasDoubleJump";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasSandevistanTier1";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanSprint";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanCrouch";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseGrenades";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseCovers";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasKerenzikov";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasSandevistan";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasDodge";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasChargeJump";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanDash";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanCharge";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanTaunt";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanGrab";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseTakedowns";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanSprintHarass";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier
			];
			effectors += 
			[
				{
					prereqRecord = "Prereqs.RangedWeaponHeldPrereq";
					statGroup = 
					{
						statModifiers = 
						[
							{
								statType = "BaseStats.CanUseLegs";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier
						];
					};
				} : ApplyStatGroupEffector
			];
		} : GameplayLogicPackage
	];
}

Kurtz_Knife_CrippledLegLeft : Kurtz_Knife_Crippled
{
	gameplayTags += 
	[
		"LegLeft"
	];
	VFX = 
	[
		{
			name = "status_wounded_l_leg";
		}
	];
	packages += 
	[
		{
			animationWrapperOverrides = 
			[
				"woundedLocomotion_l_leg"
			];
		}, 
		{
			effectors += 
			[
				{
					statusEffects = 
					[
						"BaseStatusEffect.Kurtz_Knife_CrippledLegRight"
					];
				} : RemoveStatusEffectsEffector
			];
		}
	];
}

Kurtz_Knife_CrippledLegRight : Kurtz_Knife_Crippled
{
	gameplayTags += 
	[
		"LegRight"
	];
	VFX = 
	[
		{
			name = "status_wounded_r_leg";
		}
	];
	packages += 
	[
		{
			animationWrapperOverrides = 
			[
				"woundedLocomotion_r_leg"
			];
		}
	];
}

Kurtz_Metel_DismemberedLegLeft : DismemberedLegLeft
{
	packages += 
	[
		{
			effectors += 
			[
				{
					prereqRecord = "Prereqs.NPCIsHuman";
					string bodyPart = "LEFT_LEG";
					string woundType = "COARSE";
					bool isCritical = true;
					bool shouldKillNPC = true;
					float dismembermentChance = 100f;
				} : ForceDismembermentEffector, 
				{
					statusEffects = 
					[
						"BaseStatusEffect.Kurtz_Knife_CrippledLegLeft"
					];
				} : RemoveStatusEffectsEffector, 
				{
					statusEffect = "BaseStatusEffect.KurtKnifeRemoveCooldownsSE";
				} : ApplyStatusEffectOnPlayer
			];
		}
	];
}

Kurtz_Metel_DismemberedLegRight : DismemberedLegRight
{
	packages += 
	[
		{
			effectors += 
			[
				{
					prereqRecord = "Prereqs.NPCIsHuman";
					string bodyPart = "RIGHT_LEG";
					string woundType = "COARSE";
					bool isCritical = true;
					bool shouldKillNPC = true;
					float dismembermentChance = 100f;
				} : ForceDismembermentEffector, 
				{
					statusEffects = 
					[
						"BaseStatusEffect.Kurtz_Knife_CrippledLegRight"
					];
				} : RemoveStatusEffectsEffector, 
				{
					statusEffect = "BaseStatusEffect.KurtKnifeRemoveCooldownsSE";
				} : ApplyStatusEffectOnPlayer
			];
		}
	];
}

string[] CripplingStatusEffects = 
[
	"BaseStatusEffect.CrippledLegLeft", "BaseStatusEffect.CrippledLegRight", "BaseStatusEffect.CrippledArmLeft", "BaseStatusEffect.CrippledArmRight"
];
