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

Preset_Crusher_Default : Base_Crusher
{
	CName appearanceResourceName = "Preset_Crusher_Default";
	CName[] visualTags = 
	[
		"Default"
	];
	fk< SlotItemPartPreset >[] slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_revolver__militech_crusher__rcv1";
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< Item > itemPartPreset = "Items.w_revolver__militech_crusher__base1";
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< Item > itemPartPreset = "Items.w_revolver__militech_crusher__mag_std";
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< Item > itemPartPreset = "Items.w_revolver__militech_crusher__mag_stdr";
		}, 
		"Items.HandgunAndRevolverScopesPartList", {
			slot = "AttachmentSlots.Power_Shotgun_WeaponMod1";
		} : Power_Shotgun_ModList_Slot1, 
		{
			slot = "AttachmentSlots.Power_Shotgun_WeaponMod2";
		} : Power_Shotgun_ModList_Slot2
	];
}

Preset_Crusher_Pimp : Preset_Crusher_Default
{
	CName[] visualTags = 
	[
		"Pimp"
	];
	tags += 
	[
		"Pimp", "Courier_RareFind"
	];
}

Preset_Crusher_Neon : Preset_Crusher_Default
{
	CName[] visualTags = 
	[
		"Neon"
	];
	tags += 
	[
		"Neon"
	];
}

Preset_Crusher_Military : Preset_Crusher_Default
{
	CName[] visualTags = 
	[
		"Military"
	];
	tags += 
	[
		"Military"
	];
}

[ EP1 ]
Preset_Crusher_Krausser : Preset_Crusher_Default
{
	CName[] visualTags = 
	[
		"Krausser"
	];
	tags += 
	[
		"Krausser", "PowerOfThePack", "IllegalItem"
	];
	statModifierGroups = 
	[
		"Items.QualityRandomization", "Items.ItemPlusRandomizer_MaxQuality", "Items.ItemPlusRandomizer_Below_MaxQuality", "Items.WeaponModsWeights_On_Tier2Plus", "Items.WeaponModsWeights_On_Tier3Plus", "Items.WeaponModsWeights_On_Tier4Plus", "Items.WeaponModsWeights_On_Tier5Plus", "Items.WeaponModsWeights_On_Tier5PlusPlus", "Items.Base_Crusher_Krausser_Technical_Stats", "Items.Base_Crusher_Handling_Stats", "Items.Base_Crusher_Krausser_Recoil_Stats", "Items.Base_Crusher_Krausser_Spread_Stats", "Items.Base_Crusher_Aim_Stats", "Items.Base_Crusher_Krausser_Constant_Stats", "Items.KrausserBonusStats", "Items.Base_Crusher_Damage_Stats", "Items.Base_Power_Stats", "Items.Base_Power_Shotgun_Mult_Stats", "Items.Base_Power_Shotgun_Stats", "Items.Base_Shotgun_RPG_Stats", "Items.Base_Shotgun_Misc_Stats", "Items.Base_Shotgun_Sway_Stats", "Items.Base_PlayerState_Spread_Stats", "Items.Base_Shotgun_DeadReckoning_Stats", "Items.Base_Weapon_Damage_Type_Min_Max", "Items.Base_Weapon_Damage_Type_Physical"
	];
}

Base_Crusher_Krausser_Technical_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			value = 1.f;
		} : NumShotsToFireModifier, 
		{
			value = 0.4f;
		} : CycleTimeModifier, 
		{
			value = 8.f;
		} : MagazineCapacityModifier, 
		{
			value = 3.f;
		} : ProjectilesPerShotModifier, 
		"BaseStats.ProjectilesPerShotCombinedModifier"
	];
}

Base_Crusher_Krausser_Recoil_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			value = 350.f;
		} : RecoilDirModifier, 
		{
			value = 40.f;
		} : RecoilAngleModifier, 
		{
			value = 3.0f;
		} : RecoilKickMinModifier, 
		{
			value = 4.0f;
		} : RecoilKickMaxModifier, 
		{
			value = 0.0f;
		} : RecoilHoldDurationModifier, 
		{
			value = 0.1f;
		} : RecoilTimeModifier, 
		{
			value = 0.03f;
		} : RecoilDelayModifier, 
		{
			value = 0.2f;
		} : RecoilRecoveryTimeModifier, 
		{
			value = 1.f;
		} : RecoilEnableLinearXModifier, 
		{
			value = 1.f;
		} : RecoilEnableLinearYModifier, 
		{
			value = 1.f;
		} : RecoilEnableLinearXADSModifier, 
		{
			value = 1.f;
		} : RecoilEnableLinearYADSModifier
	];
}

Base_Crusher_Krausser_Spread_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			value = 1.0f;
		} : SpreadDefaultXModifier, 
		{
			value = 0.325f;
		} : SpreadDefaultYModifier, 
		{
			value = 0.f;
		} : SpreadMinXModifier, 
		{
			value = 0.f;
		} : SpreadMinYModifier, 
		{
			value = 1.0f;
		} : SpreadMaxXModifier, 
		{
			value = 0.325f;
		} : SpreadMaxYModifier, 
		{
			value = 0.0f;
		} : SpreadChangePerShotModifier, 
		{
			value = 1.f;
		} : SpreadUseInAdsModifier, 
		{
			value = 0.5f;
		} : SpreadAdsDefaultXModifier, 
		{
			value = 0.125f;
		} : SpreadAdsDefaultYModifier, 
		{
			value = 0.f;
		} : SpreadAdsMinXModifier, 
		{
			value = 0.f;
		} : SpreadAdsMinYModifier, 
		{
			value = 0.5f;
		} : SpreadAdsMaxXModifier, 
		{
			value = 0.125f;
		} : SpreadAdsMaxYModifier, 
		{
			value = 0.0f;
		} : SpreadAdsChangePerShotModifier, 
		{
			value = 1.5f;
		} : SpreadResetSpeedModifier, 
		{
			value = 0.2f;
		} : SpreadResetTimeThresholdModifier, 
		{
			value = 0.f;
		} : SpreadRandomizeOriginPointModifier, 
		{
			value = 1.f;
		} : SpreadUseCircularSpreadModifier, 
		{
			value = 1.f;
		} : SpreadUseEvenDistributionModifier, 
		{
			value = 1.f;
		} : SpreadEvenDistributionRowCountModifier, 
		{
			value = 0.1f;
		} : SpreadEvenDistributionJitterSizeModifier
	];
}

Base_Crusher_Krausser_Constant_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			statType = "BaseStats.FirePower";
			modifierType = "Multiplier";
			value = 1.0459f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.HeadshotDamageMultiplier";
			modifierType = "Additive";
			value = 0.65f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.EffectiveDPS";
			modifierType = "Multiplier";
			value = 0.833f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.DamagePerHit";
			modifierType = "Multiplier";
			value = 0.9049;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.EffectiveRange";
			modifierType = "Multiplier";
			value = 1.334f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.WeaponVehicleDamagePercentBonus";
			modifierType = "Multiplier";
			value = 0.25f;
		} : ConstantStatModifier
	];
}

[ notQueryable ]
Preset_Crusher_Default_Left_Hand : Preset_Crusher_Default
{
	quality = "Quality.Common";
	tags += 
	[
		"Left_Hand", "HideInUI", "HideAtVendor", "DiscardOnEmpty", "IgnoreInventory"
	];
	statModifiers += 
	[
		"Quality.BrokenItem", {
			statType = "BaseStats.Weight";
			modifierType = "Multiplier";
			value = 0;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.NumShotsToFire";
			modifierType = "Additive";
			refStat = "BaseStats.MagazineCapacity";
			opSymbol = "*";
			value = 1.0f;
		} : CombinedStatModifier
	];
	npcRPGData = 
	{
		statModifierGroups += 
		[
			"Items.Base_Crusher_NPC_Technical_Stats"
		];
	} : Broken_Power_Shotgun_NPC_Data;
	OnLooted = 
	[
		{
			effectors = 
			[
				{
					itemsToAdd = 
					[
						{
							item = "Items.Preset_Crusher_Default_Retrofix";
						}
					];
				} : AddItemsEffector
			];
		}
	];
}

[ notQueryable ]
Preset_Crusher_Pimp_Left_Hand : Preset_Crusher_Default_Left_Hand
{
	CName[] visualTags = 
	[
		"Pimp"
	];
	tags += 
	[
		"Pimp"
	];
	OnLooted = 
	[
		{
			effectors = 
			[
				{
					itemsToAdd = 
					[
						{
							item = "Items.Preset_Crusher_Pimp_Retrofix";
						}
					];
				} : AddItemsEffector
			];
		}
	];
}

[ notQueryable ]
Preset_Crusher_Neon_Left_Hand : Preset_Crusher_Default_Left_Hand
{
	CName[] visualTags = 
	[
		"Neon"
	];
	tags += 
	[
		"Neon"
	];
	OnLooted = 
	[
		{
			effectors = 
			[
				{
					itemsToAdd = 
					[
						{
							item = "Items.Preset_Crusher_Neon_Retrofix";
						}
					];
				} : AddItemsEffector
			];
		}
	];
}

[ notQueryable ]
Preset_Crusher_Military_Left_Hand : Preset_Crusher_Default_Left_Hand
{
	CName[] visualTags = 
	[
		"Military"
	];
	tags += 
	[
		"Military"
	];
	OnLooted = 
	[
		{
			effectors = 
			[
				{
					itemsToAdd = 
					[
						{
							item = "Items.Preset_Crusher_Military_Retrofix";
						}
					];
				} : AddItemsEffector
			];
		}
	];
}

[ notQueryable ]
Preset_Crusher_Default_Retrofix : Preset_Crusher_Default
{
	fk< ItemBlueprint > blueprint = "Items.Retrofix_Firearm_NoMuzzle_Blueprint";
	tags += 
	[
		"SkipActivityLog", "Left_Hand_Retrofix"
	];
	bool scaleToPlayer = true;
	bool scaleToPlayerInStash = true;
	statModifiers += 
	[
		"Character.ScaleToPlayerLevel"
	];
	slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_revolver__militech_crusher__rcv1";
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< Item > itemPartPreset = "Items.w_revolver__militech_crusher__base1";
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< Item > itemPartPreset = "Items.w_revolver__militech_crusher__mag_std";
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< Item > itemPartPreset = "Items.w_revolver__militech_crusher__mag_stdr";
		}
	];
}

[ notQueryable ]
Preset_Crusher_Pimp_Retrofix : Preset_Crusher_Default_Retrofix
{
	CName[] visualTags = 
	[
		"Pimp"
	];
	tags += 
	[
		"Pimp"
	];
}

[ notQueryable ]
Preset_Crusher_Neon_Retrofix : Preset_Crusher_Default_Retrofix
{
	CName[] visualTags = 
	[
		"Neon"
	];
	tags += 
	[
		"Neon"
	];
}

[ notQueryable ]
Preset_Crusher_Military_Retrofix : Preset_Crusher_Default_Retrofix
{
	CName[] visualTags = 
	[
		"Military"
	];
	tags += 
	[
		"Military"
	];
}

[ notQueryable ]
Craftable_Common_Crusher : Preset_Crusher_Default
{
	quality = "Quality.Common";
	slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_revolver__militech_crusher__rcv1";
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< Item > itemPartPreset = "Items.w_revolver__militech_crusher__base1";
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< Item > itemPartPreset = "Items.w_revolver__militech_crusher__mag_std";
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< Item > itemPartPreset = "Items.w_revolver__militech_crusher__mag_stdr";
		}
	];
	CraftingData = "Items.Big_Common_Crafting_Materials_Weapon";
}

[ notQueryable ]
Craftable_Uncommon_Crusher : Craftable_Common_Crusher
{
	quality = "Quality.Uncommon";
	CraftingData = "Items.Big_Uncommon_Crafting_Materials_Weapon";
}

[ notQueryable ]
Craftable_Rare_Crusher : Craftable_Uncommon_Crusher
{
	quality = "Quality.Rare";
	CraftingData = "Items.Big_Rare_Crafting_Materials_Weapon";
}

[ notQueryable ]
Craftable_Epic_Crusher : Craftable_Uncommon_Crusher
{
	quality = "Quality.Epic";
	CraftingData = "Items.Big_Epic_Crafting_Materials_Weapon";
}

[ notQueryable ]
Craftable_Legendary_Crusher : Craftable_Uncommon_Crusher
{
	quality = "Quality.Legendary";
	CraftingData = "Items.Big_Legendary_Crafting_Materials_Weapon";
}

[ EP1 ]
[ notQueryable ]
Preset_Crusher_Amazon : Preset_Crusher_Default
{
	fk< ItemBlueprint > blueprint = "Items.Iconic_Ranged_Weapon_NoMuzzle_Blueprint";
	CName[] visualTags = 
	[
		"Amazon"
	];
	displayName = "LocKey#94460";
	localizedDescription = "LocKey#94466";
	quality = "Quality.Random";
	tags += 
	[
		"IconicWeapon", "PowerOfThePack", "StashScaling_Iconic", "IllegalItem"
	];
	statModifiers += 
	[
		"Quality.IconicItem", "Character.ScaleToPlayerLevel"
	];
	npcRPGData = 
	{
		statModifiers += 
		[
			"Quality.IconicItem"
		];
	} : Base_Crusher_NPC_Data;
	slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_revolver__militech_crusher__rcv1";
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< Item > itemPartPreset = "Items.w_revolver__militech_crusher__base1";
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< Item > itemPartPreset = "Items.w_revolver__militech_crusher__mag_std";
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< Item > itemPartPreset = "Items.w_revolver__militech_crusher__mag_stdr";
		}, 
		{
			slot = "AttachmentSlots.IconicWeaponModLegendary";
			itemPartPreset = "Items.PowerOfThePackMod";
		}
	];
	bool scaleToPlayer = true;
	bool scaleToPlayerInStash = true;
	enableNpcRPGData = false;
	OnLooted += 
	[
		{
			effectors = 
			[
				{
					fact = "crusher_amazon_owned";
					value = 1;
				} : SetFactEffector, 
				{
					prereqRecord = 
					{
						statusEffect = "BaseStatusEffect.JustLootedAmazonIconicFromAirdrop";
					} : StatusEffectPrereq;
					fact = "crusher_amazon_airdropped";
					value = 1;
				} : SetFactEffector
			];
		}
	];
	statModifierGroups = 
	[
		"Items.IconicQualityRandomization", "Items.Base_Crusher_Krausser_Technical_Stats", "Items.Base_Crusher_Handling_Stats", "Items.Base_Crusher_Krausser_Recoil_Stats", "Items.Base_Crusher_Krausser_Spread_Stats", "Items.Base_Crusher_Aim_Stats", "Items.Base_Crusher_Krausser_Constant_Stats", "Items.KrausserBonusStats", "Items.Base_Crusher_Damage_Stats", "Items.Base_Power_Stats", "Items.Base_Power_Shotgun_Mult_Stats", "Items.Base_Power_Shotgun_Stats", "Items.Base_Shotgun_RPG_Stats", "Items.Base_Shotgun_Misc_Stats", "Items.Base_Shotgun_Sway_Stats", "Items.Base_PlayerState_Spread_Stats", "Items.Base_Shotgun_DeadReckoning_Stats", "Items.Base_Weapon_Damage_Type_Min_Max", "Items.Base_Weapon_Damage_Type_Physical"
	];
}

