package Items
using RTDB, BaseStats, Prereqs, Perks

[ notQueryable ]
BerserkBase : SystemReplacementModule
{
	string friendlyName = "Berserk";
	displayName = "LocKey#45498";
	localizedDescription = "LocKey#45499";
	entityName = "cyberware_dummy";
	placementSlots = 
	[
		"AttachmentSlots.SystemReplacementCW"
	];
	isCoreCW = true;
	fk< ItemBlueprint > blueprint = "Items.BerserkBlueprint";
	fk< SlotItemPartListElement >[] slotPartList = 
	[
		"Items.GenericRootSlotItem"
	];
	statModifiers += 
	[
		{
			statType = "BaseStats.HasBerserk";
			modifierType = "Additive";
			value = 1f;
		} : ConstantStatModifier
	];
	tags += 
	[
		"Berserk"
	];
	OnEquip += 
	[
		{
			UIData = 
			{
				intValues = 
				[
					50, 100, 100, 20, 60
				];
			} : AdvancedBerserkAbilityUIData;
		} : GameplayLogicPackage
	];
	objectActions += 
	[
		"CyberwareAction.DisableAdvancedBerserk"
	];
	CName cyberwareType = "Berserk";
}

[ notQueryable ]
BerserkBlueprint : ItemBlueprint
{
	fk< ItemBlueprintElement > rootElement = 
	{
		fk< AttachmentSlot > slot = "AttachmentSlots.GenericItemRoot";
	};
}

[ notQueryable ]
BerserkAbilityUIData : GameplayLogicPackageUIData
{
	localizedDescription = "LocKey#43309";
	stats = 
	[
		"BaseStats.BerserkRecoilReduction", "BaseStats.BerserkSwayReduction", "BaseStats.BerserkMeleeDamageBonus", "BaseStats.BerserkArmorBonus", "BaseStats.BerserkDurationBase", "BaseStats.BerserkCooldownBase"
	];
}

[ notQueryable ]
AdvancedBerserkAbilityUIData : GameplayLogicPackageUIData
{
	localizedDescription = "LocKey#91746";
}

[ notQueryable ]
BerserkC1MK1 : BerserkBase
{
	displayName = "LocKey#53651";
	localizedDescription = "LocKey#53661";
	quality = "Quality.Uncommon";
	iconPath = "cw_system_berserkc1";
	statModifiers += 
	[
		{
			statType = "BaseStats.BerserkRecoilReduction";
			modifierType = "Additive";
			value = 10.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkSwayReduction";
			modifierType = "Additive";
			value = 10.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkMeleeDamageBonus";
			modifierType = "Additive";
			value = 10.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkArmorBonus";
			modifierType = "Additive";
			value = 5.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkDurationBase";
			modifierType = "Additive";
			value = 10.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkCooldownBase";
			modifierType = "Additive";
			value = 60.f;
		} : ConstantStatModifier
	];
	equipPrereqs = 
	[
		{
			valueToCheck = 6;
		} : BodyPrereq
	];
	counterpart = "Items.AdvancedBerserkC1MK1";
}

[ notQueryable ]
BerserkC1MK2 : BerserkBase
{
	displayName = "LocKey#53652";
	localizedDescription = "LocKey#53662";
	quality = "Quality.Rare";
	iconPath = "cw_system_berserkc1";
	statModifiers += 
	[
		{
			statType = "BaseStats.BerserkRecoilReduction";
			modifierType = "Additive";
			value = 10.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkSwayReduction";
			modifierType = "Additive";
			value = 10.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkMeleeDamageBonus";
			modifierType = "Additive";
			value = 15f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkArmorBonus";
			modifierType = "Additive";
			value = 5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkDurationBase";
			modifierType = "Additive";
			value = 15f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkCooldownBase";
			modifierType = "Additive";
			value = 60f;
		} : ConstantStatModifier
	];
	equipPrereqs = 
	[
		{
			valueToCheck = 9;
		} : BodyPrereq
	];
	OnEquip += 
	[
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						statusEffect = "BaseStatusEffect.BerserkPlayerBuff";
					} : StatusEffectPrereq;
					fk< StatModifierGroup > statGroup = 
					{
						statModifiers = 
						[
							{
								statType = "BaseStats.Health";
								modifierType = "AdditiveMultiplier";
								value = 0.1;
							} : ConstantStatModifier
						];
					};
				} : ApplyStatGroupEffector
			];
			UIData = 
			{
				localizedDescription = "LocKey#53647";
				intValues = 
				[
					10
				];
			};
		} : GameplayLogicPackage
	];
	counterpart = "Items.AdvancedBerserkC1MK1";
}

[ notQueryable ]
BerserkC1MK3 : BerserkBase
{
	displayName = "LocKey#53653";
	localizedDescription = "LocKey#53663";
	quality = "Quality.Epic";
	iconPath = "cw_system_berserkc1";
	statModifiers += 
	[
		{
			statType = "BaseStats.BerserkRecoilReduction";
			modifierType = "Additive";
			value = 10.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkSwayReduction";
			modifierType = "Additive";
			value = 10.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkMeleeDamageBonus";
			modifierType = "Additive";
			value = 15f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkArmorBonus";
			modifierType = "Additive";
			value = 10f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkDurationBase";
			modifierType = "Additive";
			value = 30f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkCooldownBase";
			modifierType = "Additive";
			value = 60f;
		} : ConstantStatModifier
	];
	equipPrereqs = 
	[
		{
			valueToCheck = 12;
		} : BodyPrereq
	];
	OnEquip += 
	[
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						statusEffect = "BaseStatusEffect.BerserkPlayerBuff";
					} : StatusEffectPrereq;
					effectorToApply = 
					{
						statPoolUpdates = 
						[
							{
								statPoolType = "BaseStatPools.Health";
								statPoolValue = 2f;
							} : StatPoolUpdate
						];
					} : Items.RestoreStatPoolOnKillEffector;
				} : ApplyEffectorOnPlayer
			];
			UIData = 
			{
				localizedDescription = "LocKey#53648";
				floatValues = 
				[
					2
				];
			};
		} : GameplayLogicPackage, 
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						statusEffect = "BaseStatusEffect.BerserkPlayerBuff";
					} : StatusEffectPrereq;
					fk< StatModifierGroup > statGroup = 
					{
						statModifiers = 
						[
							{
								statType = "BaseStats.Health";
								modifierType = "AdditiveMultiplier";
								value = 0.2;
							} : ConstantStatModifier
						];
					};
				} : ApplyStatGroupEffector
			];
			UIData = 
			{
				localizedDescription = "LocKey#53647";
				intValues = 
				[
					20
				];
			};
		} : GameplayLogicPackage
	];
	counterpart = "Items.AdvancedBerserkC1MK1";
}

[ notQueryable ]
BerserkC2MK1 : BerserkBase
{
	displayName = "LocKey#53654";
	localizedDescription = "LocKey#53664";
	quality = "Quality.Uncommon";
	iconPath = "cw_system_berserkc2";
	statModifiers += 
	[
		{
			statType = "BaseStats.BerserkRecoilReduction";
			modifierType = "Additive";
			value = 15.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkSwayReduction";
			modifierType = "Additive";
			value = 15.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkMeleeDamageBonus";
			modifierType = "Additive";
			value = 5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkArmorBonus";
			modifierType = "Additive";
			value = 5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkDurationBase";
			modifierType = "Additive";
			value = 10f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkCooldownBase";
			modifierType = "Additive";
			value = 60f;
		} : ConstantStatModifier
	];
	equipPrereqs = 
	[
		{
			valueToCheck = 6;
		} : BodyPrereq
	];
	counterpart = "Items.AdvancedBerserkC2MK1";
}

[ notQueryable ]
BerserkC2MK2 : BerserkBase
{
	displayName = "LocKey#53655";
	localizedDescription = "LocKey#53665";
	quality = "Quality.Rare";
	iconPath = "cw_system_berserkc2";
	statModifiers += 
	[
		{
			statType = "BaseStats.BerserkRecoilReduction";
			modifierType = "Additive";
			value = 25.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkSwayReduction";
			modifierType = "Additive";
			value = 25.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkMeleeDamageBonus";
			modifierType = "Additive";
			value = 5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkArmorBonus";
			modifierType = "Additive";
			value = 5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkDurationBase";
			modifierType = "Additive";
			value = 15f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkCooldownBase";
			modifierType = "Additive";
			value = 60f;
		} : ConstantStatModifier
	];
	equipPrereqs = 
	[
		{
			valueToCheck = 9;
		} : BodyPrereq
	];
	OnEquip += 
	[
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						statusEffect = "BaseStatusEffect.BerserkPlayerBuff";
					} : StatusEffectPrereq;
					fk< Effector > effectorToApply = 
					{
						prereqRecord = "Perks.IsAttackRanged";
						float value = 1.1f;
					} : MultiplyDamage;
				} : ApplyEffectorOnPlayer
			];
			UIData = 
			{
				localizedDescription = "LocKey#53649";
				intValues = 
				[
					10
				];
			};
		} : GameplayLogicPackage
	];
	counterpart = "Items.AdvancedBerserkC2MK1";
}

[ notQueryable ]
BerserkC2MK3 : BerserkBase
{
	displayName = "LocKey#53656";
	localizedDescription = "LocKey#53666";
	quality = "Quality.Epic";
	iconPath = "cw_system_berserkc2";
	statModifiers += 
	[
		{
			statType = "BaseStats.BerserkRecoilReduction";
			modifierType = "Additive";
			value = 25.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkSwayReduction";
			modifierType = "Additive";
			value = 25.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkMeleeDamageBonus";
			modifierType = "Additive";
			value = 5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkArmorBonus";
			modifierType = "Additive";
			value = 5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkDurationBase";
			modifierType = "Additive";
			value = 30f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkCooldownBase";
			modifierType = "Additive";
			value = 60f;
		} : ConstantStatModifier
	];
	equipPrereqs = 
	[
		{
			valueToCheck = 12;
		} : BodyPrereq
	];
	OnEquip += 
	[
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						statusEffect = "BaseStatusEffect.BerserkPlayerBuff";
					} : StatusEffectPrereq;
					fk< Effector > effectorToApply = 
					{
						prereqRecord = "Perks.IsAttackRanged";
						float value = 1.15f;
					} : MultiplyDamage;
				} : ApplyEffectorOnPlayer
			];
			UIData = 
			{
				localizedDescription = "LocKey#53649";
				intValues = 
				[
					15
				];
			};
		} : GameplayLogicPackage, 
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						statusEffect = "BaseStatusEffect.BerserkPlayerBuff";
					} : StatusEffectPrereq;
					effectorToApply = 
					{
						statPoolUpdates = 
						[
							{
								statPoolType = "BaseStatPools.Health";
								statPoolValue = 3f;
							} : StatPoolUpdate
						];
					} : Items.RestoreStatPoolOnKillEffector;
				} : ApplyEffectorOnPlayer
			];
			UIData = 
			{
				localizedDescription = "LocKey#53648";
				floatValues = 
				[
					3
				];
			};
		} : GameplayLogicPackage
	];
	counterpart = "Items.AdvancedBerserkC2MK1";
}

[ notQueryable ]
BerserkC2MK4 : BerserkBase
{
	displayName = "LocKey#53657";
	localizedDescription = "LocKey#53667";
	quality = "Quality.Legendary";
	iconPath = "cw_system_berserkc2";
	statModifiers += 
	[
		{
			statType = "BaseStats.BerserkRecoilReduction";
			modifierType = "Additive";
			value = 25.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkSwayReduction";
			modifierType = "Additive";
			value = 25.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkMeleeDamageBonus";
			modifierType = "Additive";
			value = 5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkArmorBonus";
			modifierType = "Additive";
			value = 5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkDurationBase";
			modifierType = "Additive";
			value = 30f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkCooldownBase";
			modifierType = "Additive";
			value = 60f;
		} : ConstantStatModifier
	];
	equipPrereqs = 
	[
		{
			valueToCheck = 16;
		} : BodyPrereq
	];
	OnEquip += 
	[
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						statusEffect = "BaseStatusEffect.BerserkPlayerBuff";
					} : StatusEffectPrereq;
					fk< Effector > effectorToApply = 
					{
						prereqRecord = "Perks.IsAttackRanged";
						float value = 1.2f;
					} : MultiplyDamage;
				} : ApplyEffectorOnPlayer
			];
			UIData = 
			{
				localizedDescription = "LocKey#53649";
				intValues = 
				[
					20
				];
			};
		} : GameplayLogicPackage, 
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						statusEffect = "BaseStatusEffect.BerserkPlayerBuff";
					} : StatusEffectPrereq;
					effectorToApply = 
					{
						statPoolUpdates = 
						[
							{
								statPoolType = "BaseStatPools.Health";
								statPoolValue = 4f;
							} : StatPoolUpdate
						];
					} : Items.RestoreStatPoolOnKillEffector;
				} : ApplyEffectorOnPlayer
			];
			UIData = 
			{
				localizedDescription = "LocKey#53648";
				floatValues = 
				[
					4
				];
			};
		} : GameplayLogicPackage
	];
	counterpart = "Items.AdvancedBerserkC2MK1";
}

[ notQueryable ]
BerserkC3MK4 : BerserkBase
{
	displayName = "LocKey#53658";
	localizedDescription = "LocKey#53668";
	quality = "Quality.Legendary";
	iconPath = "cw_system_berserkc3";
	statModifiers += 
	[
		{
			statType = "BaseStats.BerserkRecoilReduction";
			modifierType = "Additive";
			value = 10.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkSwayReduction";
			modifierType = "Additive";
			value = 10.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkMeleeDamageBonus";
			modifierType = "Additive";
			value = 10f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkArmorBonus";
			modifierType = "Additive";
			value = 5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkDurationBase";
			modifierType = "Additive";
			value = 10f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkCooldownBase";
			modifierType = "Additive";
			value = 60f;
		} : ConstantStatModifier
	];
	equipPrereqs = 
	[
		{
			valueToCheck = 16;
		} : BodyPrereq
	];
	OnEquip += 
	[
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						statusEffect = "BaseStatusEffect.BerserkPlayerBuff";
					} : StatusEffectPrereq;
					effectorToApply = 
					{
						statPoolUpdates = 
						[
							{
								statPoolType = "BaseStatPools.Health";
								statPoolValue = 5f;
							} : StatPoolUpdate
						];
					} : Items.RestoreStatPoolOnKillEffector;
				} : ApplyEffectorOnPlayer
			];
			UIData = 
			{
				localizedDescription = "LocKey#53648";
				floatValues = 
				[
					5
				];
			};
		} : GameplayLogicPackage
	];
	counterpart = "Items.AdvancedBerserkC3MK3";
}

[ notQueryable ]
BerserkC3MK5 : BerserkBase
{
	displayName = "LocKey#53659";
	localizedDescription = "LocKey#53669";
	quality = "Quality.Legendary";
	iconPath = "cw_system_berserkc3";
	statModifiers += 
	[
		{
			statType = "BaseStats.BerserkRecoilReduction";
			modifierType = "Additive";
			value = 20.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkSwayReduction";
			modifierType = "Additive";
			value = 20.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkMeleeDamageBonus";
			modifierType = "Additive";
			value = 20f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkArmorBonus";
			modifierType = "Additive";
			value = 10f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkDurationBase";
			modifierType = "Additive";
			value = 30f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkCooldownBase";
			modifierType = "Additive";
			value = 30f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.IsItemIconic";
			modifierType = "Additive";
			value = 1f;
		} : ConstantStatModifier
	];
	equipPrereqs = 
	[
		{
			valueToCheck = 18;
		} : BodyPrereq
	];
	OnEquip += 
	[
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						statusEffect = "BaseStatusEffect.BerserkPlayerBuff";
					} : StatusEffectPrereq;
					effectorToApply = 
					{
						statPoolUpdates = 
						[
							{
								statPoolType = "BaseStatPools.Health";
								statPoolValue = 5f;
							} : StatPoolUpdate
						];
					} : Items.RestoreStatPoolOnKillEffector;
				} : ApplyEffectorOnPlayer
			];
			UIData = 
			{
				localizedDescription = "LocKey#53648";
				floatValues = 
				[
					5
				];
			};
		} : GameplayLogicPackage
	];
	counterpart = "Items.AdvancedBerserkC3MK3";
}

[ notQueryable ]
BerserkC4MK5 : BerserkBase
{
	displayName = "LocKey#53660";
	localizedDescription = "LocKey#53670";
	quality = "Quality.Legendary";
	iconPath = "cw_system_berserkc4";
	statModifiers += 
	[
		{
			statType = "BaseStats.BerserkRecoilReduction";
			modifierType = "Additive";
			value = 15.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkSwayReduction";
			modifierType = "Additive";
			value = 15.f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkMeleeDamageBonus";
			modifierType = "Additive";
			value = 15f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkArmorBonus";
			modifierType = "Additive";
			value = 10f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkDurationBase";
			modifierType = "Additive";
			value = 60f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkCooldownBase";
			modifierType = "Additive";
			value = 60f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.IsItemIconic";
			modifierType = "Additive";
			value = 1f;
		} : ConstantStatModifier
	];
	equipPrereqs = 
	[
		{
			valueToCheck = 18;
		} : BodyPrereq
	];
	OnEquip += 
	[
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						statusEffect = "BaseStatusEffect.BerserkPlayerBuff";
					} : StatusEffectPrereq;
					effectorToApply = 
					{
						statPoolUpdates = 
						[
							{
								statPoolType = "BaseStatPools.Health";
								statPoolValue = 5f;
							} : StatPoolUpdate
						];
					} : Items.RestoreStatPoolOnKillEffector;
				} : ApplyEffectorOnPlayer
			];
			UIData = 
			{
				localizedDescription = "LocKey#53648";
				floatValues = 
				[
					5
				];
			};
		} : GameplayLogicPackage, 
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						statusEffect = "BaseStatusEffect.BerserkPlayerBuff";
					} : StatusEffectPrereq;
					fk< StatModifierGroup > statGroup = 
					{
						statModifiers = 
						[
							{
								statType = "BaseStats.Health";
								modifierType = "AdditiveMultiplier";
								value = 0.4;
							} : ConstantStatModifier
						];
					};
				} : ApplyStatGroupEffector
			];
			UIData = 
			{
				localizedDescription = "LocKey#53647";
				intValues = 
				[
					40
				];
			};
		} : GameplayLogicPackage, 
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						statusEffect = "BaseStatusEffect.BerserkPlayerBuff";
					} : StatusEffectPrereq;
					fk< StatModifierGroup > statGroup = 
					{
						statModifiers = 
						[
							{
								statType = "BaseStats.Stamina";
								modifierType = "AdditiveMultiplier";
								value = 0.4;
							} : ConstantStatModifier
						];
					};
				} : ApplyStatGroupEffector
			];
			UIData = 
			{
				localizedDescription = "LocKey#53650";
				intValues = 
				[
					40
				];
			};
		} : GameplayLogicPackage
	];
	counterpart = "Items.AdvancedBerserkC4MK4";
}

