package BaseStatusEffect
using RTDB, Prereqs, Effectors

PlayerMovementLocked : StatusEffect
{
	fk< StatModifierGroup > duration = "BaseStats.InfiniteDuration";
	fk< GameplayLogicPackage >[] packages = 
	[
		{
			fk< StatModifier >[] stats = 
			[
				{
					statType = "BaseStats.MaxSpeed";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.JumpHeight";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier
			];
		} : GameplayLogicPackage
	];
}

BlockBodyDisposal : StatusEffect
{
	fk< StatusEffectType > statusEffectType = "BaseStatusEffectTypes.PassiveDebuff";
	fk< StatModifierGroup > duration = "BaseStats.InfiniteDuration";
}

BlockTargetingPlayerAutoRemove : BlockTargetingPlayer
{
	packages = 
	[
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						nestedPrereqs = 
						[
							{
								nestedPrereqs = 
								[
									{
										stateName = "Combat";
										previousState = true;
										isInState = false;
									} : Prereqs.HighLevelNPCStatePrereq, 
									{
										stateName = "Alerted";
										isInState = false;
									} : Prereqs.HighLevelNPCStatePrereq
								];
							} : Prereqs.ANDPrereq, 
							{
								stateName = "InCombat";
								previousState = true;
							} : Prereqs.CombatPSMPrereq
						];
					} : Prereqs.ORPrereq;
					effectorClassName = "ApplyStatusEffectEffector";
					fk< StatusEffect > statusEffect = "BaseStatusEffect.BlockTargetingPlayerAutoRemove";
					removeWithEffector = true;
				} : ApplyStatusEffectEffector
			];
		}
	];
}

BlockTargetingPlayer : StatusEffect
{
	fk< StatusEffectType > statusEffectType = "BaseStatusEffectTypes.BlockTargetingPlayer";
	fk< StatModifierGroup > duration = "BaseStats.InfiniteDuration";
}

VehicleTrunkBodyPickup : StatusEffect
{
	fk< StatusEffectType > statusEffectType = "BaseStatusEffectTypes.Misc";
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 1;
			} : ConstantStatModifier
		];
	};
}

VehicleVisualModCooldown : StatusEffect
{
	fk< StatusEffectType > statusEffectType = "BaseStatusEffectTypes.Misc";
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 3.2f;
			} : ConstantStatModifier
		];
	};
	gameplayTags += 
	[
		"VehicleVisualModCooldown", "NoTimeSkip", "NoPhone", "VehicleSummoning"
	];
}

VehicleVisualModCooldownInstant : StatusEffect
{
	fk< StatusEffectType > statusEffectType = "BaseStatusEffectTypes.Misc";
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 0.1f;
			} : ConstantStatModifier
		];
	};
	gameplayTags += 
	[
		"VehicleVisualModCooldown", "NoTimeSkip", "NoPhone", "VehicleSummoning"
	];
}

VehicleVisualModDeescalationCooldown : StatusEffect
{
	fk< StatusEffectType > statusEffectType = "BaseStatusEffectTypes.Misc";
	fk< StatModifierGroup > duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 240.0f;
			} : ConstantStatModifier
		];
	};
	gameplayTags += 
	[
		"VehicleVisualModDeescalationCooldown"
	];
}

TogglePlayerFlashlight : StatusEffect
{
	fk< StatModifierGroup > duration = "BaseStats.InfiniteDuration";
	packages = 
	[
		{
			effectors = 
			[
				{
					prereqRecord = "Prereqs.AlwaysTruePrereq";
					effectorClassName = "TogglePlayerFlashlightEffector";
				}
			];
		}
	];
}

StaminaRatioCalculator : StatusEffect
{
	savable = false;
	maxStacks = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxStacks";
				modifierType = "Additive";
				value = -1;
			} : ConstantStatModifier
		];
	};
	duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = -1;
			} : ConstantStatModifier
		];
	};
	fk< GameplayLogicPackage >[] packages = 
	[
		{
			stackable = true;
			stats = 
			[
				{
					statType = "BaseStats.StaminaRatio";
					modifierType = "Additive";
					value = 0.01f;
				} : ConstantStatModifier
			];
		} : GameplayLogicPackage
	];
}

WeaponChargeRatioCalculator : StatusEffect
{
	savable = false;
	maxStacks = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxStacks";
				modifierType = "Additive";
				value = 20;
			} : ConstantStatModifier
		];
	};
	duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = -1;
			} : ConstantStatModifier
		];
	};
	fk< GameplayLogicPackage >[] packages = 
	[
		{
			stackable = true;
			stats = 
			[
				{
					statType = "BaseStats.SEApplicationRateBasedOnWeaponCharge";
					modifierType = "Additive";
					value = 1.5f;
				} : ConstantStatModifier
			];
		} : GameplayLogicPackage
	];
}

NoCover : StatusEffect
{
	duration = "BaseStats.InfiniteDuration";
	packages = 
	[
		{
			stats = 
			[
				{
					statType = "BaseStats.CanUseCovers";
					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
			];
		} : GameplayLogicPackage
	];
}

[ EP1 ]
Haunted_Weapon_Kill_Human : StatusEffect
{
	duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 0.1;
			} : ConstantStatModifier
		];
	};
}

[ EP1 ]
Haunted_Weapon_Kill_Mechanical : Haunted_Weapon_Kill_Human
{
}

[ EP1 ]
Haunted_Deck_Equipped : StatusEffect
{
	duration = "BaseStats.InfiniteDuration";
}

NoShoot : StatusEffect
{
	statusEffectType = "BaseStatusEffectTypes.Blind";
	gameplayTags += 
	[
		"Blind", "ResetSquadSync"
	];
	duration = "BaseStats.InfiniteDuration";
	replicated = true;
	fk< GameplayLogicPackage >[] packages = 
	[
		{
			stats = 
			[
				{
					statType = "BaseStats.CanShootWhileMoving";
					modifierType = "Multiplier";
					value = 0f;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanPreciseShoot";
					modifierType = "Multiplier";
					value = 0f;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanChargedShoot";
					modifierType = "Multiplier";
					value = 0f;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanSmartShoot";
					modifierType = "Multiplier";
					value = 0f;
				} : ConstantStatModifier, 
				{
					statType = "BaseStats.CanUseCovers";
					modifierType = "Multiplier";
					value = 0f;
				} : ConstantStatModifier
			];
		} : GameplayLogicPackage
	];
	AIData = 
	{
		float priority = 9.f;
		fk< StatusEffectAIBehaviorFlag > behaviorEventFlag = "StatusEffectAIBehaviorFlag.InterruptsSamePriorityTask";
		fk< StatusEffectAIBehaviorType > behaviorType = "StatusEffectAIBehaviorType.Unstoppable";
	};
}

[ EP1 ]
UnstoppableBennett : StatusEffect
{
	fk< StatModifierGroup > duration = "BaseStats.InfiniteDuration";
	fk< GameplayLogicPackage >[] packages = 
	[
		{
			effectors = 
			[
				"HitReactionThresholdModifiers.ForceUnstoppableEffector"
			];
		} : GameplayLogicPackage
	];
}

BasePermaStatusEffect : StatusEffect
{
	duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 0.1;
			} : ConstantStatModifier
		];
	};
	maxStacks = "BaseStats.InfiniteStacks";
}

CWCapacity_Tier2_PermaBonus : BasePermaStatusEffect
{
	gameplayTags += 
	[
		"CWshard_Tier2"
	];
}

CWCapacity_Tier3_PermaBonus : BasePermaStatusEffect
{
	gameplayTags += 
	[
		"CWshard_Tier3"
	];
}

CWCapacity_Tier4_PermaBonus : BasePermaStatusEffect
{
	gameplayTags += 
	[
		"CWshard_Tier4"
	];
}

CWCapacity_Tier5_PermaBonus : BasePermaStatusEffect
{
	gameplayTags += 
	[
		"CWshard_Tier5"
	];
}

CWCapacity_DEBUGbuild_lvl20_PermaBonus : BasePermaStatusEffect
{
	gameplayTags += 
	[
		"CWshard_debug_lvl20"
	];
}

CWCapacity_DEBUGbuild_lvl30_PermaBonus : BasePermaStatusEffect
{
	gameplayTags += 
	[
		"CWshard_debug_lvl30"
	];
}

CarryCapacityPermaBonus : BasePermaStatusEffect
{
	gameplayTags += 
	[
		"CarryShard"
	];
}

BlackwallHack_FactHelper : StatusEffect
{
	duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 0.1;
			} : ConstantStatModifier
		];
	};
}

MaxTacAlone : StatusEffect
{
}

MainBossSE : StatusEffect
{
}

BlockNPCGrenadeBark : StatusEffect
{
	fk< StatModifierGroup > duration = "BaseStats.InfiniteDuration";
}

CheckStatusEffect : StatusEffect
{
	duration = 
	{
		statModifiers = 
		[
			{
				statType = "BaseStats.MaxDuration";
				modifierType = "Additive";
				value = 0.1;
			} : ConstantStatModifier
		];
	};
}

JustLootedIconicCWFromAirdrop : CheckStatusEffect
{
}

JustLootedAmazonIconicFromAirdrop : CheckStatusEffect
{
}

JustLootedIconicCWFromTreasureChest : CheckStatusEffect
{
	gameplayTags += 
	[
		"VanillaIconicOSLooted"
	];
}

AllIconicCWFromTreasureChestPurchased : CheckStatusEffect
{
	gameplayTags += 
	[
		"AllVanillaIconicOSPurchased"
	];
	fk< GameplayLogicPackage >[] packages = 
	[
		{
			effectors = 
			[
				{
					fact = "iconic_os_cw_looted_from_treasure_chest";
					value = 1;
				} : SetFactEffector, 
				{
					fact = "all_iconic_os_cw_purchased";
					value = 1;
				} : SetFactEffector
			];
		} : GameplayLogicPackage
	];
}

JustPurchasedSkillBookAtShankVendorBase : CheckStatusEffect
{
	isAffectedByTimeDilationPlayer = false;
	isAffectedByTimeDilationNPC = false;
}

JustPurchasedBodySkillBookAtShankVendor : JustPurchasedSkillBookAtShankVendorBase
{
	gameplayTags += 
	[
		"Body_Reward_Skillbook_Bought"
	];
}

JustPurchasedRefSkillBookAtShankVendor : JustPurchasedSkillBookAtShankVendorBase
{
	gameplayTags += 
	[
		"Ref_Reward_Skillbook_Bought"
	];
}

JustPurchasedIntSkillBookAtShankVendor : JustPurchasedSkillBookAtShankVendorBase
{
	gameplayTags += 
	[
		"Int_Reward_Skillbook_Bought"
	];
}

JustPurchasedTechSkillBookAtShankVendor : JustPurchasedSkillBookAtShankVendorBase
{
	gameplayTags += 
	[
		"Tech_Reward_Skillbook_Bought"
	];
}

JustPurchasedCoolSkillBookAtShankVendor : JustPurchasedSkillBookAtShankVendorBase
{
	gameplayTags += 
	[
		"Cool_Reward_Skillbook_Bought"
	];
}

JustPurchasedNueJackieAtBM : CheckStatusEffect
{
}

PanamRestoreDefaultHealth : StatusEffect
{
	fk< GameplayLogicPackage >[] packages = 
	[
		{
			stats = 
			[
				{
					statType = "BaseStats.Health";
					modifierType = "Multiplier";
					value = 0.04f;
				} : ConstantStatModifier
			];
		} : GameplayLogicPackage
	];
}

FollowerDamage : StatusEffect
{
	fk< GameplayLogicPackage >[] packages = 
	[
		{
			stats = 
			[
				{
					statType = "BaseStats.NPCDamage";
					modifierType = "AdditiveMultiplier";
					id = "follower_values";
					column = "follower_dps_mult";
					refStat = "BaseStats.PowerLevel";
				} : CurveStatModifier
			];
		} : GameplayLogicPackage, 
		{
			effectors = 
			[
				{
					prereqRecord = "Prereqs.AnyWeaponHeldPrereq";
					CName effectorClassName = "ApplyStatGroupEffector";
					fk< StatModifierGroup > statGroup = 
					{
						statModifiers = 
						[
							{
								statType = "BaseStats.CycleTime";
								modifierType = "AdditiveMultiplier";
								id = "follower_values";
								column = "follower_ctb_mult";
								refStat = "BaseStats.PowerLevel";
							} : CurveStatModifier
						];
					} : StatModifierGroup;
					applicationTarget = "Weapon";
				} : ApplyStatGroupEffector
			];
		}
	];
}

