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

[ notQueryable ]
BerserkFragmentBase : Fragment
{
	quality = "Quality.Random";
	placementSlots = 
	[
		"AttachmentSlots.BerserkSlot1", "AttachmentSlots.BerserkSlot2", "AttachmentSlots.BerserkSlot3"
	];
	CName[] tags += 
	[
		"itemPart", "DummyPart", "SkipActivityLog", "HideInBackpackUI", "HideInUI", "HideAtVendor"
	];
	buyPrice += 
	[
		"Price.BerserkFragment"
	];
	sellPrice += 
	[
		"Price.BerserkFragment"
	];
}

[ notQueryable ]
BerserkFragment1 : BerserkFragmentBase
{
	displayName = "LocKey#43557";
	iconPath = "cwf_berserk1";
	statModifiers += 
	[
		{
			statType = "BaseStats.BerserkDurationBase";
			modifierType = "Additive";
			value = 1f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkDurationBase";
			modifierType = "Additive";
			refStat = "BaseStats.Quality";
			opSymbol = "*";
			value = 1f;
		} : CombinedStatModifier
	];
	OnAttach = 
	[
		{
			UIData = 
			{
				localizedDescription = "LocKey#43558";
				stats = 
				[
					"BaseStats.BerserkDurationBase"
				];
			};
		}
	];
	fk< CraftingPackage > CraftingData = 
	{
		fk< RecipeElement >[] craftingRecipe += 
		[
			{
				ingredient = "Items.CommonMaterial1";
				amount = 12;
			}
		];
	};
}

[ notQueryable ]
BerserkFragment2 : BerserkFragmentBase
{
	displayName = "LocKey#43559";
	iconPath = "cwf_berserk2";
	statModifiers += 
	[
		{
			statType = "BaseStats.BerserkCooldownReduction";
			modifierType = "Additive";
			value = -5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkCooldownReduction";
			modifierType = "Additive";
			refStat = "BaseStats.Quality";
			opSymbol = "*";
			value = -0.5f;
		} : CombinedStatModifier
	];
	OnAttach = 
	[
		{
			UIData = 
			{
				localizedDescription = "LocKey#43560";
				stats = 
				[
					"BaseStats.BerserkCooldownReduction"
				];
			};
		}
	];
	fk< CraftingPackage > CraftingData = 
	{
		fk< RecipeElement >[] craftingRecipe += 
		[
			{
				ingredient = "Items.CommonMaterial1";
				amount = 12;
			}
		];
	};
}

[ notQueryable ]
BerserkFragment3 : BerserkFragmentBase
{
	displayName = "LocKey#43561";
	iconPath = "cwf_berserk3";
	statModifiers += 
	[
		{
			statType = "BaseStats.BerserkArmorBonus";
			modifierType = "Additive";
			value = 5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkArmorBonus";
			modifierType = "Additive";
			refStat = "BaseStats.Quality";
			opSymbol = "*";
			value = 1f;
		} : CombinedStatModifier, 
		{
			statType = "BaseStats.BerserkResistancesBonus";
			modifierType = "Additive";
			value = 5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkResistancesBonus";
			modifierType = "Additive";
			refStat = "BaseStats.Quality";
			opSymbol = "*";
			value = 1f;
		} : CombinedStatModifier
	];
	OnAttach = 
	[
		{
			UIData = 
			{
				localizedDescription = "LocKey#43562";
				stats = 
				[
					"BaseStats.BerserkArmorBonus", "BaseStats.BerserkResistancesBonus"
				];
			};
		}
	];
	fk< CraftingPackage > CraftingData = 
	{
		fk< RecipeElement >[] craftingRecipe += 
		[
			{
				ingredient = "Items.CommonMaterial1";
				amount = 12;
			}
		];
	};
}

[ notQueryable ]
BerserkFragment4 : BerserkFragmentBase
{
	displayName = "LocKey#43563";
	iconPath = "cwf_berserk4";
	statModifiers += 
	[
		{
			statType = "BaseStats.BerserkMeleeDamageBonus";
			modifierType = "Additive";
			value = 10f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkMeleeDamageBonus";
			modifierType = "Additive";
			refStat = "BaseStats.Quality";
			opSymbol = "*";
			value = 3f;
		} : CombinedStatModifier
	];
	OnAttach = 
	[
		{
			UIData = 
			{
				localizedDescription = "LocKey#43564";
				stats = 
				[
					"BaseStats.BerserkMeleeDamageBonus"
				];
			};
		}
	];
	fk< CraftingPackage > CraftingData = 
	{
		fk< RecipeElement >[] craftingRecipe += 
		[
			{
				ingredient = "Items.CommonMaterial1";
				amount = 12;
			}
		];
	};
}

[ notQueryable ]
BerserkFragment5 : BerserkFragmentBase
{
	displayName = "LocKey#43565";
	iconPath = "cwf_berserk5";
	statModifiers += 
	[
		{
			statType = "BaseStats.BerserkRecoilReduction";
			modifierType = "Additive";
			value = 10f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkRecoilReduction";
			modifierType = "Additive";
			refStat = "BaseStats.Quality";
			opSymbol = "*";
			value = 5f;
		} : CombinedStatModifier, 
		{
			statType = "BaseStats.BerserkSwayReduction";
			modifierType = "Additive";
			value = 10f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkSwayReduction";
			modifierType = "Additive";
			refStat = "BaseStats.Quality";
			opSymbol = "*";
			value = 5f;
		} : CombinedStatModifier
	];
	OnAttach = 
	[
		{
			UIData = 
			{
				localizedDescription = "LocKey#43566";
				stats = 
				[
					"BaseStats.BerserkRecoilReduction", "BaseStats.BerserkSwayReduction"
				];
			};
		}
	];
	fk< CraftingPackage > CraftingData = 
	{
		fk< RecipeElement >[] craftingRecipe += 
		[
			{
				ingredient = "Items.CommonMaterial1";
				amount = 12;
			}
		];
	};
}

[ notQueryable ]
BerserkFragment6 : BerserkFragmentBase
{
	displayName = "LocKey#43567";
	iconPath = "cwf_berserk6";
	statModifiers += 
	[
		{
			statType = "BaseStats.BerserkHealthRegenBonus";
			modifierType = "Additive";
			value = 10f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkHealthRegenBonus";
			modifierType = "Additive";
			refStat = "BaseStats.Quality";
			opSymbol = "*";
			value = 3f;
		} : CombinedStatModifier
	];
	OnAttach = 
	[
		{
			UIData = 
			{
				localizedDescription = "LocKey#43568";
				stats = 
				[
					"BaseStats.BerserkHealthRegenBonus"
				];
			};
		}
	];
	fk< CraftingPackage > CraftingData = 
	{
		fk< RecipeElement >[] craftingRecipe += 
		[
			{
				ingredient = "Items.CommonMaterial1";
				amount = 12;
			}
		];
	};
}

[ notQueryable ]
BerserkFragment7 : BerserkFragmentBase
{
	displayName = "LocKey#43569";
	iconPath = "cwf_berserk7";
	quality = "Quality.Rare";
	OnAttach = 
	[
		{
			fk< Effector >[] effectors = 
			[
				{
					prereqRecord = 
					{
						statusEffect = "BaseStatusEffect.BerserkPlayerBuff";
					} : StatusEffectPrereq;
					fk< StatModifierGroup > statGroup = 
					{
						statModifiers = 
						[
							{
								statType = "BaseStats.CritChance";
								modifierType = "Additive";
								value = 15f;
							} : ConstantStatModifier
						];
					};
				} : ApplyStatGroupEffector
			];
			UIData = 
			{
				localizedDescription = "LocKey#43570";
				intValues = 
				[
					15
				];
			};
		}
	];
	fk< CraftingPackage > CraftingData = 
	{
		fk< RecipeElement >[] craftingRecipe += 
		[
			{
				ingredient = "Items.CommonMaterial1";
				amount = 12;
			}, 
			{
				ingredient = "Items.UncommonMaterial1";
				amount = 8;
			}, 
			{
				ingredient = "Items.RareMaterial1";
				amount = 5;
			}
		];
	};
}

[ notQueryable ]
BerserkFragment8 : BerserkFragmentBase
{
	displayName = "LocKey#43571";
	iconPath = "cwf_berserk8";
	quality = "Quality.Rare";
	OnEquip = 
	[
		{
			fk< Effector >[] effectors = 
			[
				{
					prereqRecord = 
					{
						statusEffect = "BaseStatusEffect.BerserkPlayerBuff";
					} : StatusEffectPrereq;
					fk< StatModifierGroup > statGroup = 
					{
						statModifiers = 
						[
							{
								statType = "BaseStats.CritDamage";
								modifierType = "Additive";
								value = 25f;
							} : ConstantStatModifier
						];
					};
				} : ApplyStatGroupEffector
			];
			UIData = 
			{
				localizedDescription = "LocKey#43572";
				intValues = 
				[
					25
				];
			};
		}
	];
	fk< CraftingPackage > CraftingData = 
	{
		fk< RecipeElement >[] craftingRecipe += 
		[
			{
				ingredient = "Items.CommonMaterial1";
				amount = 12;
			}, 
			{
				ingredient = "Items.UncommonMaterial1";
				amount = 8;
			}, 
			{
				ingredient = "Items.RareMaterial1";
				amount = 5;
			}
		];
	};
}

[ notQueryable ]
AnimalsBerserkFragment1 : BerserkFragmentBase
{
	displayName = "LocKey#53671";
	quality = "Quality.Legendary";
	iconPath = "cwf_animalsberserk";
	tags += 
	[
		"FactionItem"
	];
	statModifiers += 
	[
		{
			statType = "BaseStats.BerserkArmorBonus";
			modifierType = "Additive";
			value = 15;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkResistancesBonus";
			modifierType = "Additive";
			value = 15f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BerserkHealthRegenBonus";
			modifierType = "Additive";
			value = 15f;
		} : ConstantStatModifier
	];
	fk< GameplayLogicPackage >[] OnAttach = 
	[
		{
			UIData = 
			{
				localizedDescription = "LocKey#53673";
				intValues = 
				[
					15
				];
			};
		} : GameplayLogicPackage, 
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						statusEffect = "BaseStatusEffect.BerserkPlayerBuff";
					} : StatusEffectPrereq;
					effectorToApply = 
					{
						prereqRecord = "Perks.IsWeaponMelee";
						value = 2f;
					} : MultiplyDamage;
				} : ApplyEffectorOnPlayer
			];
			UIData = 
			{
				localizedDescription = "LocKey#53674";
				intValues = 
				[
					100
				];
			};
		}
	];
	fk< CraftingPackage > CraftingData = 
	{
		fk< RecipeElement >[] craftingRecipe += 
		[
			{
				ingredient = "Items.UncommonMaterial1";
				amount = 8;
			}, 
			{
				ingredient = "Items.RareMaterial1";
				amount = 5;
			}, 
			{
				ingredient = "Items.EpicMaterial1";
				amount = 3;
			}, 
			{
				ingredient = "Items.LegendaryMaterial1";
				amount = 2;
			}
		];
	};
}

