package BaseStatusEffect
using RTDB, Effectors, Prereqs, BaseStats, Perks

BaseEMP : DebuffStatusEffect
{
	statusEffectType = "BaseStatusEffectTypes.EMP";
	fk< StatusEffectFX >[] VFX = 
	[
		{
			name = "status_emp";
		}
	];
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 5;
			} : ConstantStatModifier, 
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "AdditiveMultiplier";
				refObject = "Player";
				refStat = "BaseStats.DurationBonusElectrified";
				opSymbol = "*";
				value = 1;
			} : CombinedStatModifier
		];
	};
	fk< Stat >[] immunityStats = 
	[
		"BaseStats.EMPImmunity"
	];
	packages += 
	[
		{
			stats = 
			[
				{
					statType = "BaseStats.HasGlowingTattoos";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier
			];
			effectors = 
			[
				"BaseStatusEffect.DeactivateCloakedtatusEffects", "BaseStatusEffect.DeactivateCloakedOdatatusEffects", "BaseStatusEffect.EmpSFX", {
					fk< StatModifierGroup > statGroup = 
					{
						statModifiers = 
						[
							{
								statType = "BaseStats.HasDodgeAir";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasChargeJump";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasDoubleJump";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasAirHover";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier
						];
					} : StatModifierGroup;
				} : ApplyStatGroupEffector, 
				{
					fk< IPrereq > prereqRecord = 
					{
						allowedTypes = 
						[
							"NPCType.Drone"
						];
					} : NPCTypePrereq;
					CName effectorClassName = "ApplyStatGroupEffector";
					fk< StatModifierGroup > statGroup = 
					{
						statModifiers = 
						[
							{
								statType = "BaseStats.HasDodge";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.CanSprint";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier
						];
					} : StatModifierGroup;
				} : ApplyStatGroupEffector, 
				{
					fk< IPrereq > prereqRecord = 
					{
						allowedTypes = 
						[
							"NPCType.Drone"
						];
					} : NPCTypePrereq;
					CName effectorClassName = "ApplyStatGroupEffector";
					fk< StatModifierGroup > statGroup = 
					{
						statModifiers = 
						[
							{
								statType = "BaseStats.CycleTime";
								modifierType = "Multiplier";
								value = 1.5f;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.CycleTime_Burst";
								modifierType = "Multiplier";
								value = 1.5f;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.SmartGunNPCShootProjectilesOnlyStraight";
								modifierType = "Additive";
								value = 1;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.SmartGunNPCTrajectoryCurvatureMultiplier";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.SmartGunHitProbability";
								modifierType = "Multiplier";
								value = 0.1f;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.SmartGunNPCProjectileStartingOrientationAngleOffset";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.SmartGunAddSpiralTrajectory";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.SmartGunNPCSpreadMultiplier";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.SmartGunNPCTrajectoryCurvatureMultiplier";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier
						];
					} : StatModifierGroup;
					applicationTarget = "Weapon";
				} : ApplyStatGroupEffector
			];
		}
	];
	fk< StatusEffectAIData > AIData = 
	{
		float priority = 6.f;
		fk< IPrereq >[] activationPrereqs = 
		[
			{
				invert = true;
				stateName = "Combat";
			} : CurrentHighLevelNPCStatePrereq, 
			{
				statType = "IsExo";
				valueToCheck = 1;
				comparisonType = "Less";
			} : StatPrereq
		];
		fk< StatusEffectAIBehaviorFlag > behaviorEventFlag = "StatusEffectAIBehaviorFlag.InterruptsSamePriorityTask";
		fk< StatusEffectAIBehaviorType > behaviorType = "StatusEffectAIBehaviorType.Unstoppable";
		fk< Stim >[] stimulis = 
		[
			"stims.ScreamStimuli"
		];
		fk< StatModifier >[] behaviorSignalResendDelay = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 10;
			} : ConstantStatModifier
		];
		shouldDelayStatusEffectApplication = true;
	};
	uiData = "BaseStatusEffect.BaseEMPUI";
}

BaseEMPUI : StatusEffectUIData
{
	string displayName = "LocKey#40946";
	description = "LocKey#77831";
	string iconPath = "EMP";
	priority = 5f;
}

EMP : BaseEMP
{
	gameplayTags += 
	[
		"DoT"
	];
	packages += 
	[
		{
			effectors = 
			[
				{
					CName effectorClassName = "TriggerContinuousAttackEffector";
					delayTime = 0.5f;
					attackRecord = "Attacks.ElectricDamageOverTime";
				} : ContinuousAttackEffector
			];
		}
	];
}

EmpVeryLowDamage : BaseEMP
{
	packages += 
	[
		{
			effectors = 
			[
				{
					CName effectorClassName = "TriggerContinuousAttackEffector";
					delayTime = 0.5f;
					attackRecord = "Attacks.VeryLowElectricDamageOverTime";
				} : ContinuousAttackEffector
			];
		}
	];
}

EmpVeryLowDamageQuickhack : BaseEMP
{
	gameplayTags += 
	[
		"DoT"
	];
	packages += 
	[
		{
			effectors = 
			[
				{
					CName effectorClassName = "TriggerContinuousAttackEffector";
					delayTime = 0.5f;
					attackRecord = "Attacks.VeryLowQuickhackElectricDamageOverTime";
				} : ContinuousAttackEffector
			];
		}
	];
}

EmpLowDamage : BaseEMP
{
	packages += 
	[
		{
			effectors = 
			[
				{
					CName effectorClassName = "TriggerContinuousAttackEffector";
					delayTime = 0.5f;
					attackRecord = "Attacks.LowElectricDamageOverTime";
				} : ContinuousAttackEffector
			];
		}
	];
}

EmpHighDamage : BaseEMP
{
	packages += 
	[
		{
			effectors = 
			[
				{
					CName effectorClassName = "TriggerContinuousAttackEffector";
					delayTime = 0.5f;
					attackRecord = "Attacks.HighElectricDamageOverTime";
				} : ContinuousAttackEffector
			];
		}
	];
}

EmpVeryHighDamage : BaseEMP
{
	packages += 
	[
		{
			effectors = 
			[
				{
					CName effectorClassName = "TriggerContinuousAttackEffector";
					delayTime = 0.5f;
					attackRecord = "Attacks.VeryHighElectricDamageOverTime";
				} : ContinuousAttackEffector
			];
		}
	];
}

EnemyNetrunnerEmpHighDamage : BaseEMP
{
	packages += 
	[
		{
			effectors = 
			[
				{
					CName effectorClassName = "TriggerContinuousAttackEffector";
					delayTime = 0.5f;
					attackRecord = "Attacks.EnemyNetrunnerHighElectricDamageOverTime";
				} : ContinuousAttackEffector
			];
		}
	];
}

BaseEmpGrenade : BaseEMP
{
	duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 5f;
			} : ConstantStatModifier
		];
	};
	gameplayTags += 
	[
		"GrenadeStatusEffect", "EMP"
	];
	packages = 
	[
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						prereqClassName = "IsPlayerPrereq";
					} : IPrereq;
					CName effectorClassName = "TriggerContinuousAttackEffector";
					delayTime = 0.5f;
					attackRecord = "Attacks.PlayerEMPGrenadeDoT";
				} : ContinuousAttackEffector
			];
		}
	];
}

CommonEmpGrenade : BaseEmpGrenade
{
	packages += 
	[
		{
			effectors += 
			[
				{
					prereqRecord = 
					{
						nestedPrereqs = 
						[
							{
								nestedPrereqs = 
								[
									"Prereqs.NPCIsMechanical", {
										statType = "IsNetrunnerArchetype";
										valueToCheck = 1;
										comparisonType = "Equal";
									} : StatPrereq, 
									{
										statType = "IsExo";
										valueToCheck = 1;
										comparisonType = "Equal";
									} : StatPrereq
								];
							} : Prereqs.ORPrereq, 
							{
								prereqClassName = "IsPlayerPrereq";
								bool invert = true;
							} : IPrereq
						];
					} : Prereqs.ANDPrereq;
					attackRecord = "Attacks.EmpGrenadeCommonAdditional";
					playerAsInstigator = true;
					attackPositionSlotName = "Chest";
				} : Effectors.TriggerAttackOnOwnerEffect, 
				{
					prereqRecord = 
					{
						nestedPrereqs = 
						[
							"Prereqs.NPCIsHuman", {
								prereqClassName = "IsPlayerPrereq";
								bool invert = true;
							} : IPrereq
						];
					} : Prereqs.ANDPrereq;
					CName effectorClassName = "TriggerContinuousAttackEffector";
					delayTime = 0.62f;
					attackRecord = "Attacks.LowGrenadeElectricDamageOverTime";
				} : ContinuousAttackEffector
			];
		} : GameplayLogicPackage
	];
}

UncommonEmpGrenade : BaseEmpGrenade
{
	packages += 
	[
		{
			effectors += 
			[
				{
					prereqRecord = 
					{
						nestedPrereqs = 
						[
							{
								nestedPrereqs = 
								[
									"Prereqs.NPCIsMechanical", {
										statType = "IsNetrunnerArchetype";
										valueToCheck = 1;
										comparisonType = "Equal";
									} : StatPrereq, 
									{
										statType = "IsExo";
										valueToCheck = 1;
										comparisonType = "Equal";
									} : StatPrereq
								];
							} : Prereqs.ORPrereq, 
							{
								prereqClassName = "IsPlayerPrereq";
								bool invert = true;
							} : IPrereq
						];
					} : Prereqs.ANDPrereq;
					attackRecord = "Attacks.EmpGrenadeUncommonAdditional";
					playerAsInstigator = true;
					attackPositionSlotName = "Chest";
				} : Effectors.TriggerAttackOnOwnerEffect, 
				{
					prereqRecord = 
					{
						nestedPrereqs = 
						[
							"Prereqs.NPCIsHuman", {
								prereqClassName = "IsPlayerPrereq";
								bool invert = true;
							} : IPrereq
						];
					} : Prereqs.ANDPrereq;
					CName effectorClassName = "TriggerContinuousAttackEffector";
					delayTime = 0.52f;
					attackRecord = "Attacks.LowGrenadeElectricDamageOverTime";
				} : ContinuousAttackEffector, 
				{
					prereqRecord = 
					{
						nestedPrereqs = 
						[
							{
								prereqClassName = "IsPlayerPrereq";
								bool invert = true;
							} : IPrereq, 
							{
								rarity = "Boss";
								invert = true;
							} : NPCRarityPrereq, 
							{
								rarity = "MaxTac";
								invert = true;
							} : NPCRarityPrereq
						];
					} : ANDPrereq;
					statusEffect = "BaseStatusEffect.EmpCyberwareTurnedOff";
				} : ApplyStatusEffectEffector
			];
		} : GameplayLogicPackage
	];
}

RareEmpGrenade : BaseEmpGrenade
{
	packages += 
	[
		{
			effectors += 
			[
				{
					prereqRecord = 
					{
						nestedPrereqs = 
						[
							{
								nestedPrereqs = 
								[
									"Prereqs.NPCIsMechanical", {
										statType = "IsNetrunnerArchetype";
										valueToCheck = 1;
										comparisonType = "Equal";
									} : StatPrereq, 
									{
										statType = "IsExo";
										valueToCheck = 1;
										comparisonType = "Equal";
									} : StatPrereq
								];
							} : Prereqs.ORPrereq, 
							{
								prereqClassName = "IsPlayerPrereq";
								bool invert = true;
							} : IPrereq
						];
					} : Prereqs.ANDPrereq;
					attackRecord = "Attacks.EmpGrenadeRareAdditional";
					playerAsInstigator = true;
					attackPositionSlotName = "Chest";
				} : Effectors.TriggerAttackOnOwnerEffect, 
				{
					prereqRecord = 
					{
						nestedPrereqs = 
						[
							"Prereqs.NPCIsHuman", {
								prereqClassName = "IsPlayerPrereq";
								bool invert = true;
							} : IPrereq
						];
					} : Prereqs.ANDPrereq;
					CName effectorClassName = "TriggerContinuousAttackEffector";
					delayTime = 0.47f;
					attackRecord = "Attacks.LowGrenadeElectricDamageOverTime";
				} : ContinuousAttackEffector, 
				{
					prereqRecord = 
					{
						nestedPrereqs = 
						[
							{
								prereqClassName = "IsPlayerPrereq";
								bool invert = true;
							} : IPrereq, 
							{
								rarity = "Boss";
								invert = true;
							} : NPCRarityPrereq, 
							{
								rarity = "MaxTac";
								invert = true;
							} : NPCRarityPrereq
						];
					} : ANDPrereq;
					statusEffect = "BaseStatusEffect.EmpCyberwareTurnedOff";
				} : ApplyStatusEffectEffector
			];
		} : GameplayLogicPackage
	];
}

EpicEmpGrenade : BaseEmpGrenade
{
	packages += 
	[
		{
			effectors += 
			[
				{
					prereqRecord = 
					{
						nestedPrereqs = 
						[
							{
								nestedPrereqs = 
								[
									"Prereqs.NPCIsMechanical", {
										statType = "IsNetrunnerArchetype";
										valueToCheck = 1;
										comparisonType = "Equal";
									} : StatPrereq, 
									{
										statType = "IsExo";
										valueToCheck = 1;
										comparisonType = "Equal";
									} : StatPrereq
								];
							} : Prereqs.ORPrereq, 
							{
								prereqClassName = "IsPlayerPrereq";
								bool invert = true;
							} : IPrereq
						];
					} : Prereqs.ANDPrereq;
					attackRecord = "Attacks.EmpGrenadeEpicAdditional";
					playerAsInstigator = true;
					attackPositionSlotName = "Chest";
				} : Effectors.TriggerAttackOnOwnerEffect, 
				{
					prereqRecord = 
					{
						nestedPrereqs = 
						[
							"Prereqs.NPCIsHuman", {
								prereqClassName = "IsPlayerPrereq";
								bool invert = true;
							} : IPrereq
						];
					} : Prereqs.ANDPrereq;
					CName effectorClassName = "TriggerContinuousAttackEffector";
					delayTime = 0.35f;
					attackRecord = "Attacks.LowGrenadeElectricDamageOverTime";
				} : ContinuousAttackEffector, 
				{
					prereqRecord = 
					{
						nestedPrereqs = 
						[
							{
								prereqClassName = "IsPlayerPrereq";
								bool invert = true;
							} : IPrereq, 
							{
								rarity = "Boss";
								invert = true;
							} : NPCRarityPrereq, 
							{
								rarity = "MaxTac";
								invert = true;
							} : NPCRarityPrereq
						];
					} : ANDPrereq;
					statusEffect = "BaseStatusEffect.LongEmpCyberwareTurnedOff";
				} : ApplyStatusEffectEffector
			];
		} : GameplayLogicPackage
	];
}

LegendaryEmpGrenade : BaseEmpGrenade
{
	packages += 
	[
		{
			effectors += 
			[
				{
					prereqRecord = 
					{
						nestedPrereqs = 
						[
							{
								nestedPrereqs = 
								[
									"Prereqs.NPCIsMechanical", {
										statType = "IsNetrunnerArchetype";
										valueToCheck = 1;
										comparisonType = "Equal";
									} : StatPrereq, 
									{
										statType = "IsExo";
										valueToCheck = 1;
										comparisonType = "Equal";
									} : StatPrereq
								];
							} : Prereqs.ORPrereq, 
							{
								prereqClassName = "IsPlayerPrereq";
								bool invert = true;
							} : IPrereq
						];
					} : Prereqs.ANDPrereq;
					attackRecord = "Attacks.EmpGrenadeLegendaryAdditional";
					playerAsInstigator = true;
					attackPositionSlotName = "Chest";
				} : Effectors.TriggerAttackOnOwnerEffect, 
				{
					prereqRecord = 
					{
						nestedPrereqs = 
						[
							"Prereqs.NPCIsHuman", {
								prereqClassName = "IsPlayerPrereq";
								bool invert = true;
							} : IPrereq
						];
					} : Prereqs.ANDPrereq;
					CName effectorClassName = "TriggerContinuousAttackEffector";
					delayTime = 0.30f;
					attackRecord = "Attacks.GrenadeElectricDamageOverTime";
				} : ContinuousAttackEffector, 
				{
					prereqRecord = 
					{
						nestedPrereqs = 
						[
							{
								prereqClassName = "IsPlayerPrereq";
								bool invert = true;
							} : IPrereq, 
							{
								rarity = "Boss";
								invert = true;
							} : NPCRarityPrereq, 
							{
								rarity = "MaxTac";
								invert = true;
							} : NPCRarityPrereq
						];
					} : ANDPrereq;
					statusEffect = "BaseStatusEffect.LongEmpCyberwareTurnedOff";
				} : ApplyStatusEffectEffector
			];
		} : GameplayLogicPackage
	];
}

EmpCyberwareTurnedOff : DebuffStatusEffect
{
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 10;
			} : ConstantStatModifier
		];
	};
	packages = 
	[
		{
			effectors = 
			[
				"BaseStatusEffect.DeactivateCloakedtatusEffects", "BaseStatusEffect.DeactivateCloakedOdatatusEffects", "BaseStatusEffect.EmpSFX", {
					prereqRecord = "Prereqs.AlwaysTruePrereq";
					effectorClassName = "RemoveStatusEffectsEffector";
					string[] statusEffects = 
					[
						"BaseStatusEffect.SandevistanBuff", "AIQuickHackStatusEffect.BuffCamo", "AIQuickHackStatusEffect.BuffSturdiness", "BaseStatusEffect.CamoEffector"
					];
				} : Effector, 
				{
					fk< StatModifierGroup > statGroup = 
					{
						statModifiers = 
						[
							{
								statType = "BaseStats.HasSandevistan";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasSandevistanTier2";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.CanSprintHarass";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.SandevistanDashShoot";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasKerenzikov";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasKerenzikovSlide";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasSuperheroFall";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasBerserk";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.CanUseStrongArms";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.CanUseOpticalCamo";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.CanUseTerrainCamo";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.CanUseOverclock";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasCybereye";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.CanQuickhack";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasCyberdeck";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasAirHover";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasDoubleJump";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasChargeJump";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.CanUseCoolingSystem";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasGlowingTattoos";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasThermovision";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasInfravision";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasSpiderBotControl";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasSelfHealingSkin";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.HasHealthMonitorBomb";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.CanUseRetractableShield";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.IsAggressive";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier, 
							{
								statType = "BaseStats.IsReckless";
								modifierType = "Multiplier";
								value = 0;
							} : ConstantStatModifier
						];
					} : StatModifierGroup;
				} : ApplyStatGroupEffector
			];
		}
	];
}

LongEmpCyberwareTurnedOff : EmpCyberwareTurnedOff
{
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 20;
			} : ConstantStatModifier
		];
	};
}

EmpJamWeaponChance : EMP
{
	duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 7;
			} : ConstantStatModifier
		];
	};
	packages += 
	[
		{
			effectors = 
			[
				{
					statusEffect = "BaseStatusEffect.WeaponMalfunction";
					effectorChance = 
					[
						{
							value = 0.8f;
						} : EffectorChanceModifier
					];
				} : ApplyStatusEffectByChanceEffector
			];
		}
	];
}

EmpJamWeaponAccuracyDebuff : EMP
{
	duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 7;
			} : ConstantStatModifier
		];
	};
	packages += 
	[
		{
			effectors = 
			[
				{
					statusEffect = "BaseStatusEffect.WeaponMalfunction";
					effectorChance = 
					[
						{
							value = 0.8f;
						} : EffectorChanceModifier
					];
				} : ApplyStatusEffectByChanceEffector
			];
		}
	];
}

EmpSFX : Effector
{
	CName effectorClassName = "PlaySFXEffector";
	CName activationSFXName = "nme_fx_emp_start";
	CName deactivationSFXName = "nme_fx_emp_stop";
	bool unique = true;
}

EMPReed : DebuffStatusEffect
{
	fk< StatusEffectFX >[] VFX = 
	[
		{
			name = "status_emp";
		}
	];
	packages += 
	[
		{
			stats = 
			[
				{
					statType = "BaseStats.DamageReductionExplosion";
					modifierType = "Additive";
					value = -0.7f;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.DamageReductionBulletExplosion";
					modifierType = "Multiplier";
					value = 0.f;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.BlockCyberwareBreaches";
					modifierType = "Multiplier";
					value = 0.f;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.HasMeleeHitReactionAndTakedownResistance";
					modifierType = "Additive";
					value = 1;
				} : ConstantStatModifier
			];
		} : GameplayLogicPackage, 
		{
			effectors += 
			[
				{
					prereqRecord = "Prereqs.AlwaysTruePrereq";
					CName vfxName = "status_electrocuted";
				} : PlayVFXEffector, 
				{
					prereqRecord = "Prereqs.NPCIsNotHuman";
					activationSFXName = "status_emp";
				} : PlaySFXEffector, 
				{
					prereqRecord = "Prereqs.NPCIsHuman";
					activationSFXName = "quickhack_shortcircuit";
				} : PlaySFXEffector, 
				{
					prereqRecord = "Prereqs.NPCIsHuman";
					activationSFXName = "hacks_cyberware_malfunction";
				} : PlaySFXEffector, 
				{
					prereqRecord = "Prereqs.NPCIsHuman";
					activationSFXName = "status_disabled_comms";
				} : PlaySFXEffector, 
				{
					prereqRecord = "Prereqs.NPCIsNotHuman";
					activationSFXName = "status_emp";
				} : PlaySFXEffector
			];
		} : GameplayLogicPackage
	];
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = -1;
			} : ConstantStatModifier
		];
	};
	gameplayTags += 
	[
		"AutoTag", "DoT"
	];
}

SecurityTurretTurnedOff : DebuffStatusEffect
{
	uiData = 
	{
		string displayName = "LocKey#40946";
		description = "LocKey#77831";
		string iconPath = "cyberware_disabled_icon";
		priority = 1f;
	};
}

