package BaseStatusEffect
using RTDB, Prereqs, Effectors

DontShootAtMe : StatusEffect
{
	statusEffectType = "BaseStatusEffectTypes.Misc";
	fk< StatModifierGroup > duration = "BaseStats.InfiniteDuration";
	gameplayTags += 
	[
		"Cheat"
	];
}

Madness : StatusEffect
{
	statusEffectType = "BaseStatusEffectTypes.Madness";
	CName[] gameplayTags += 
	[
		"Debuff", "Quickhack", "Madness"
	];
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 20.0;
			} : ConstantStatModifier
		];
	};
	bool canReapply = false;
	SFX = 
	[
		{
			name = "quickhack_cyberpsychosis";
		} : StatusEffectFX
	];
	fk< GameplayLogicPackage >[] packages = 
	[
		{
			stats = 
			[
				{
					statType = "BaseStats.CanUseCovers";
					modifierType = "Multiplier";
					value = 0.f;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanCallReinforcements";
					modifierType = "Multiplier";
					value = 0.f;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseMediumRing";
					modifierType = "Multiplier";
					value = 0.f;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseFarRing";
					modifierType = "Multiplier";
					value = 0.f;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseExtremeRing";
					modifierType = "Multiplier";
					value = 0.f;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseGrenades";
					modifierType = "Multiplier";
					value = 0.f;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanQuickhack";
					modifierType = "Multiplier";
					value = 0.f;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseCloseRing";
					modifierType = "Additive";
					value = 1.f;
				} : ConstantStatModifier
			];
			effectors = 
			[
				{
					fk< IPrereq > prereqRecord = 
					{
						duration = 3.3f;
					} : Prereqs.DurationPrereq;
					CName effectorClassName = "MadnessEffector";
				} : Effector, 
				{
					statusEffect = "BaseStatusEffect.DontShootAtMe";
				} : ApplyStatusEffectEffector, 
				{
					fk< IPrereq > prereqRecord = 
					{
						duration = 8.3f;
					} : Prereqs.DurationPrereq;
					statusEffect = "BaseStatusEffect.DontShootAtMe";
					inverted = true;
				} : ApplyStatusEffectEffector, 
				{
					statusEffect = "BaseStatusEffect.SuicideWithWeapon";
					inverted = true;
				} : ApplyStatusEffectEffector, 
				{
					prereqRecord = 
					{
						CName prereqClassName = "gameMultiPrereq";
						CName aggregationType = "AND";
						nestedPrereqs = 
						[
							{
								duration = 10.0f;
							} : Prereqs.DurationPrereq, 
							{
								stateName = "Combat";
								isInState = false;
							} : Prereqs.HighLevelNPCStatePrereq
						];
					} : MultiPrereq;
					statusEffect = "BaseStatusEffect.SuicideWithWeapon";
					removeWithEffector = false;
				} : ApplyStatusEffectEffector
			];
		} : GameplayLogicPackage
	];
	fk< StatusEffectAIData > AIData = 
	{
		fk< IPrereq >[] activationPrereqs = 
		[
			{
				invert = true;
				fk< StatusEffect > statusEffect = "BaseStatusEffect.BossNoInterrupt";
			} : StatusEffectPrereq
		];
		float priority = 6.f;
	};
	uiData = 
	{
		string displayName = "LocKey#27958";
		string iconPath = "qh_cyberpsychosis";
		priority = 1.0f;
	};
}

ChimeraMadness : StatusEffect
{
	statusEffectType = "BaseStatusEffectTypes.Madness";
	CName[] gameplayTags += 
	[
		"Debuff", "Quickhack", "Madness"
	];
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 12.5f;
			} : ConstantStatModifier
		];
	};
	bool canReapply = false;
	SFX = 
	[
		{
			name = "quickhack_cyberpsychosis";
		} : StatusEffectFX
	];
	fk< GameplayLogicPackage >[] packages = 
	[
		{
			stats = 
			[
				{
					statType = "BaseStats.NPCDamage";
					modifierType = "AdditiveMultiplier";
					refStat = "BaseStats.QuickHackEffectsApplied";
					opSymbol = "*";
					value = 0.25f;
				} : CombinedStatModifier
			];
		} : GameplayLogicPackage
	];
	fk< StatusEffectAIData > AIData = 
	{
		fk< IPrereq >[] activationPrereqs = 
		[
			{
				invert = true;
				fk< StatusEffect > statusEffect = "BaseStatusEffect.BossNoInterrupt";
			} : StatusEffectPrereq
		];
		float priority = 6.f;
	};
	uiData = 
	{
		string displayName = "LocKey#27958";
		string iconPath = "qh_cyberpsychosis";
		priority = 1.0f;
	};
}

BossMadness : StatusEffect
{
	statusEffectType = "BaseStatusEffectTypes.Madness";
	CName[] gameplayTags += 
	[
		"Debuff", "Quickhack", "Madness"
	];
	fk< StatusEffectFX >[] VFX = 
	[
		{
			name = "eye_glow_red";
		}
	];
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 30.0;
			} : ConstantStatModifier
		];
	};
	bool canReapply = false;
	SFX = 
	[
		{
			name = "quickhack_cyberpsychosis";
		} : StatusEffectFX
	];
	fk< GameplayLogicPackage >[] packages = 
	[
		{
			stats = 
			[
				{
					statType = "BaseStats.NPCDamage";
					modifierType = "AdditiveMultiplier";
					refStat = "BaseStats.QuickHackEffectsApplied";
					opSymbol = "*";
					value = 0.25f;
				} : CombinedStatModifier
			];
			effectors = 
			[
				{
					CName effectorClassName = "MadnessEffector";
				} : Effector
			];
		} : GameplayLogicPackage
	];
	fk< StatusEffectAIData > AIData = 
	{
		fk< IPrereq >[] activationPrereqs = 
		[
			{
				invert = true;
				fk< StatusEffect > statusEffect = "BaseStatusEffect.BossNoInterrupt";
			} : StatusEffectPrereq
		];
		float priority = 6.f;
	};
	uiData = 
	{
		string displayName = "LocKey#27958";
		string iconPath = "qh_cyberpsychosis";
		priority = 1.0f;
	};
}

MandessLevel4 : Madness
{
	duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 60.0;
			} : ConstantStatModifier
		];
	};
	fk< GameplayLogicPackage >[] packages += 
	[
		{
			stats = 
			[
				{
					statType = "BaseStats.NPCDamage";
					modifierType = "AdditiveMultiplier";
					refStat = "BaseStats.QuickHackEffectsApplied";
					opSymbol = "*";
					value = 0.25f;
				} : CombinedStatModifier
			];
			effectors = 
			[
				{
					prereqRecord = 
					{
						statType = "QuickHackEffectsApplied";
						comparisonType = "Greater";
						notifyOnAnyChange = true;
						valueToCheck = 1;
						notifyOnlyOnStateFulfilled = true;
					} : StatPrereq;
					gameplayTags = 
					[
						"Madness"
					];
					change = 125f;
					isPercentage = true;
					listenConstantly = false;
				} : ModifyStatusEffectDurationEffector
			];
		}
	];
}

MandessLevel4PlusPlus : Madness
{
	duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 60.0;
			} : ConstantStatModifier
		];
	};
	fk< GameplayLogicPackage >[] packages += 
	[
		{
			stats = 
			[
				{
					statType = "BaseStats.NPCDamage";
					modifierType = "AdditiveMultiplier";
					refStat = "BaseStats.QuickHackEffectsApplied";
					opSymbol = "*";
					value = 0.40f;
				} : CombinedStatModifier
			];
			effectors = 
			[
				{
					prereqRecord = 
					{
						statType = "QuickHackEffectsApplied";
						comparisonType = "Greater";
						notifyOnAnyChange = true;
						valueToCheck = 1;
						notifyOnlyOnStateFulfilled = true;
					} : StatPrereq;
					gameplayTags = 
					[
						"Madness"
					];
					change = 140f;
					isPercentage = true;
					listenConstantly = false;
				} : ModifyStatusEffectDurationEffector
			];
		}
	];
}

DoNotBlockShootingOnFriendlyFire : StatusEffect
{
	statusEffectType = "BaseStatusEffectTypes.Misc";
	CName[] gameplayTags += 
	[
		"Debuff"
	];
	fk< StatModifierGroup > duration = "BaseStats.InfiniteDuration";
	bool canReapply = false;
}

