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

Preset_Liberty_Default : Base_Liberty
{
	CName appearanceResourceName = "Preset_Liberty_Rogue";
	CName[] visualTags = 
	[
		"Default"
	];
	fk< SlotItemPartPreset >[] slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__rcv1";
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__base1";
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__mag_std";
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__mag_stdr";
		}, 
		"Items.HandgunAndRevolverScopesPartList", {
			slot = "AttachmentSlots.Power_Handgun_WeaponMod1";
		} : Power_Handgun_ModList_Slot1, 
		{
			slot = "AttachmentSlots.Power_Handgun_WeaponMod2";
		} : Power_Handgun_ModList_Slot2
	];
}

Preset_Liberty_Pimp : Preset_Liberty_Default
{
	CName[] visualTags = 
	[
		"Pimp"
	];
	tags += 
	[
		"Pimp"
	];
}

Preset_Liberty_Neon : Preset_Liberty_Default
{
	CName[] visualTags = 
	[
		"Neon"
	];
	tags += 
	[
		"Neon"
	];
}

Preset_Liberty_Military : Preset_Liberty_Default
{
	CName[] visualTags = 
	[
		"Military"
	];
	tags += 
	[
		"Military"
	];
}

[ notQueryable ]
Preset_Liberty_Default_Left_Hand : Preset_Liberty_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_Liberty_Technical_Stats"
		];
	} : Broken_Power_Handgun_NPC_Data;
	OnLooted = 
	[
		{
			effectors = 
			[
				{
					itemsToAdd = 
					[
						{
							item = "Items.Preset_Liberty_Default_Retrofix";
						}
					];
				} : AddItemsEffector
			];
		}
	];
}

[ notQueryable ]
Preset_Liberty_Pimp_Left_Hand : Preset_Liberty_Default_Left_Hand
{
	CName[] visualTags = 
	[
		"Pimp"
	];
	tags += 
	[
		"Pimp"
	];
	OnLooted = 
	[
		{
			effectors = 
			[
				{
					itemsToAdd = 
					[
						{
							item = "Items.Preset_Liberty_Pimp_Retrofix";
						}
					];
				} : AddItemsEffector
			];
		}
	];
}

[ notQueryable ]
Preset_Liberty_Neon_Left_Hand : Preset_Liberty_Default_Left_Hand
{
	CName[] visualTags = 
	[
		"Neon"
	];
	tags += 
	[
		"Neon"
	];
	OnLooted = 
	[
		{
			effectors = 
			[
				{
					itemsToAdd = 
					[
						{
							item = "Items.Preset_Liberty_Neon_Retrofix";
						}
					];
				} : AddItemsEffector
			];
		}
	];
}

[ notQueryable ]
Preset_Liberty_Military_Left_Hand : Preset_Liberty_Default_Left_Hand
{
	CName[] visualTags = 
	[
		"Military"
	];
	tags += 
	[
		"Military"
	];
	OnLooted = 
	[
		{
			effectors = 
			[
				{
					itemsToAdd = 
					[
						{
							item = "Items.Preset_Liberty_Military_Retrofix";
						}
					];
				} : AddItemsEffector
			];
		}
	];
}

[ notQueryable ]
Preset_Liberty_Default_Retrofix : Preset_Liberty_Default
{
	fk< ItemBlueprint > blueprint = "Items.Retrofix_Firearm_Blueprint";
	tags += 
	[
		"SkipActivityLog", "Left_Hand_Retrofix"
	];
	bool scaleToPlayer = true;
	bool scaleToPlayerInStash = true;
	statModifiers += 
	[
		"Character.ScaleToPlayerLevel"
	];
	slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__rcv1";
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__base1";
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__mag_std";
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__mag_stdr";
		}
	];
}

[ notQueryable ]
Preset_Liberty_Pimp_Retrofix : Preset_Liberty_Default_Retrofix
{
	CName[] visualTags = 
	[
		"Pimp"
	];
	tags += 
	[
		"Pimp"
	];
}

[ notQueryable ]
Preset_Liberty_Neon_Retrofix : Preset_Liberty_Default_Retrofix
{
	CName[] visualTags = 
	[
		"Neon"
	];
	tags += 
	[
		"Neon"
	];
}

[ notQueryable ]
Preset_Liberty_Military_Retrofix : Preset_Liberty_Default_Retrofix
{
	CName[] visualTags = 
	[
		"Military"
	];
	tags += 
	[
		"Military"
	];
}

[ notQueryable ]
Craftable_Common_Liberty : Preset_Liberty_Default
{
	quality = "Quality.Common";
	fk< SlotItemPartPreset >[] slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__rcv1";
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__base1";
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__mag_std";
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__mag_stdr";
		}
	];
	CraftingData = "Items.Small_Common_Crafting_Materials_Weapon";
}

[ notQueryable ]
Craftable_Uncommon_Liberty : Craftable_Common_Liberty
{
	quality = "Quality.Uncommon";
	CraftingData = "Items.Small_Uncommon_Crafting_Materials_Weapon";
}

[ notQueryable ]
Craftable_Rare_Liberty : Craftable_Uncommon_Liberty
{
	quality = "Quality.Rare";
	CraftingData = "Items.Small_Rare_Crafting_Materials_Weapon";
}

[ notQueryable ]
Craftable_Epic_Liberty : Craftable_Uncommon_Liberty
{
	quality = "Quality.Epic";
	CraftingData = "Items.Small_Epic_Crafting_Materials_Weapon";
}

[ notQueryable ]
Craftable_Legendary_Liberty : Craftable_Uncommon_Liberty
{
	quality = "Quality.Legendary";
	CraftingData = "Items.Small_Legendary_Crafting_Materials_Weapon";
}

[ notQueryable ]
Preset_Liberty_Rogue : Preset_Liberty_Default
{
	fk< ItemBlueprint > blueprint = "Items.Iconic_Ranged_Weapon_Blueprint";
	displayName = "LocKey#40551";
	visualTags = 
	[
		"Rogue_Liberty"
	];
	quality = "Quality.Random";
	tags += 
	[
		"IconicWeapon"
	];
	statModifiers += 
	[
		"Quality.IconicItem"
	];
	localizedDescription = "LocKey#40552";
	npcRPGData = 
	{
		statModifiers += 
		[
			"Quality.IconicItem"
		];
	} : Items.Base_Liberty_NPC_Data;
	slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__rcv1";
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__base1";
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__mag_std";
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__mag_stdr";
		}, 
		{
			slot = "AttachmentSlots.IconicWeaponModLegendary";
			itemPartPreset = "Items.RogueLibertyWeaponMod";
		}
	];
	statModifierGroups = 
	[
		"Items.IconicQualityRandomization", "Items.Base_Liberty_Rogue_Technical_Stats", "Items.Base_Liberty_Handling_Stats", "Items.Base_Liberty_Recoil_Stats", "Items.Base_Liberty_Spread_Stats", "Items.Base_Liberty_Aim_Stats", "Items.Base_Liberty_Rogue_Constant_Stats", "Items.Base_Liberty_Damage_Stats", "Items.Base_Power_Stats", "Items.Base_Power_Handgun_Mult_Stats", "Items.Base_Power_Handgun_Stats", "Items.Base_Handgun_RPG_Stats", "Items.Base_Handgun_Misc_Stats", "Items.Base_Handgun_Sway_Stats", "Items.Base_PlayerState_Spread_Stats", "Items.Base_Handgun_DeadReckoning_Stats", "Items.Base_Weapon_Damage_Type_Min_Max", "Items.Base_Weapon_Damage_Type_Physical"
	];
	bool scaleToPlayer = true;
}

Base_Liberty_Rogue_Technical_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			value = 1.f;
		} : NumShotsToFireModifier, 
		{
			value = 0.3f;
		} : CycleTimeModifier, 
		{
			value = 10.f;
		} : MagazineCapacityModifier, 
		{
			value = 1.f;
		} : ProjectilesPerShotModifier, 
		"BaseStats.ProjectilesPerShotCombinedModifier"
	];
}

Base_Liberty_Rogue_Constant_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			statType = "BaseStats.SpreadDefaultX";
			modifierType = "Additive";
			value = 0.6f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.SpreadAdsDefaultX";
			modifierType = "Additive";
			value = 0.1f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.SpreadMaxX";
			modifierType = "Additive";
			value = 2.4f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.SpreadAdsMaxX";
			modifierType = "Additive";
			value = 0.4f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.SpreadChangePerShot";
			modifierType = "Additive";
			value = 0.0f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.SpreadAdsChangePerShot";
			modifierType = "Additive";
			value = 0.0f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.RecoilKickMin";
			modifierType = "Additive";
			value = 1.5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.RecoilKickMax";
			modifierType = "Additive";
			value = 2.0f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.DamagePerHit";
			modifierType = "Multiplier";
			value = 1.2f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.FirePower";
			modifierType = "Multiplier";
			value = 1.417f;
		} : ConstantStatModifier
	];
}

[ notQueryable ]
Preset_Liberty_Rogue_Stash : Preset_Liberty_Rogue
{
	tags += 
	[
		"StashScaling_Iconic"
	];
	statModifiers += 
	[
		"Character.ScaleToPlayerLevel"
	];
	OnLooted += 
	[
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						fact = "endgame_reward_liberty_rogue_owned";
						value = 0;
						comparisonType = "Equal";
					} : FactValuePrereq;
					fact = "endgame_reward_liberty_rogue_owned";
					value = 1;
				} : SetFactEffector
			];
		}
	];
	bool scaleToPlayerInStash = true;
	enableNpcRPGData = false;
}

[ notQueryable ]
Preset_Liberty_Yorinobu : Preset_Liberty_Default
{
	OnLooted += 
	[
		{
			effectors = 
			[
				{
					fact = "liberty_yorinobu_owned";
					value = 1;
				} : SetFactEffector
			];
		}
	];
	fk< ItemBlueprint > blueprint = "Items.Iconic_Ranged_Weapon_Blueprint";
	displayName = "LocKey#40553";
	visualTags = 
	[
		"Yorinobu_Liberty"
	];
	tags += 
	[
		"IconicWeapon"
	];
	statModifiers += 
	[
		"Quality.IconicItem"
	];
	quality = "Quality.Random";
	localizedDescription = "LocKey#40554";
	npcRPGData = 
	{
		statModifiers += 
		[
			"Quality.IconicItem"
		];
	} : Items.Base_Liberty_NPC_Data;
	previewEffectName = "weaponPreview";
	previewEffectTag = "ricochet";
	slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__rcv1";
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__base1";
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__mag_std";
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__mag_stdr";
		}, 
		{
			slot = "AttachmentSlots.IconicWeaponModLegendary";
			itemPartPreset = "Items.YorinobuLibertyWeaponMod";
		}
	];
	statModifierGroups = 
	[
		"Items.IconicQualityRandomization", "Items.Base_Liberty_Technical_Stats", "Items.Base_Liberty_Handling_Stats", "Items.Base_Liberty_Recoil_Stats", "Items.Base_Liberty_Spread_Stats", "Items.Base_Liberty_Aim_Stats", "Items.Base_Liberty_Constant_Stats", "Items.Base_Liberty_Damage_Stats", "Items.Base_Power_Stats", "Items.Base_Power_Handgun_Mult_Stats", "Items.Base_Power_Handgun_Stats", "Items.Base_Handgun_DeadReckoning_Stats", "Items.Base_Handgun_RPG_Stats", "Items.Base_Handgun_Misc_Stats", "Items.Base_Handgun_Sway_Stats", "Items.Base_PlayerState_Spread_Stats", "Items.Base_Weapon_Damage_Type_Min_Max", "Items.Base_Weapon_Damage_Type_Physical"
	];
}

[ notQueryable ]
Preset_Liberty_Dex : Preset_Liberty_Default
{
	buyPrice += 
	[
		"Price.Dex", "Price.MediumManufactureQuality"
	];
	sellPrice += 
	[
		"Price.Dex", "Price.MediumManufactureQuality"
	];
	OnLooted += 
	[
		{
			effectors = 
			[
				{
					fact = "liberty_dex_owned";
					value = 1;
				} : SetFactEffector
			];
		}
	];
	fk< ItemBlueprint > blueprint = "Items.Iconic_Ranged_Weapon_Blueprint";
	displayName = "LocKey#40556";
	visualTags = 
	[
		"Dex_Liberty"
	];
	CName audioName = "wea_set_liberty_dex";
	tags += 
	[
		"IconicWeapon"
	];
	statModifiers += 
	[
		"Quality.IconicItem"
	];
	quality = "Quality.Random";
	localizedDescription = "LocKey#40555";
	npcRPGData = 
	{
		statModifiers += 
		[
			"Quality.IconicItem"
		];
	} : Items.Base_Liberty_NPC_Data;
	ammo = "Items.money";
	slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__rcv1";
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__base1";
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__mag_std";
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__mag_stdr";
		}, 
		{
			slot = "AttachmentSlots.IconicWeaponModLegendary";
			itemPartPreset = "Items.DexLibertyWeaponMod";
		}
	];
	statModifierGroups = 
	[
		"Items.IconicQualityRandomization", "Items.Base_Liberty_Dex_Technical_Stats", "Items.Base_Liberty_Handling_Stats", "Items.Base_Liberty_Recoil_Stats", "Items.Base_Liberty_Spread_Stats", "Items.Base_Liberty_Aim_Stats", "Items.Base_Liberty_Constant_Stats", "Items.Base_Liberty_Damage_Stats", "Items.Base_Power_Stats", "Items.Base_Power_Handgun_Mult_Stats", "Items.Base_Power_Handgun_Stats", "Items.Base_Handgun_RPG_Stats", "Items.Base_Handgun_Misc_Stats", "Items.Base_Handgun_Sway_Stats", "Items.Base_PlayerState_Spread_Stats", "Items.Base_Handgun_DeadReckoning_Stats", "Items.Base_Weapon_Status_Effect_Application_Stats", "Items.Base_Weapon_Damage_Type_Min_Max", "Items.Base_Weapon_Damage_Type_Physical"
	];
}

Base_Liberty_Dex_Technical_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			value = 1.f;
		} : NumShotsToFireModifier, 
		{
			value = 0.2f;
		} : CycleTimeModifier, 
		{
			value = 20.f;
		} : MagazineCapacityModifier, 
		{
			value = 1.f;
		} : ProjectilesPerShotModifier, 
		"BaseStats.ProjectilesPerShotCombinedModifier"
	];
}

[ notQueryable ]
Preset_Liberty_Padre : Preset_Liberty_Default
{
	OnLooted += 
	[
		{
			effectors = 
			[
				{
					fact = "liberty_padre_owned";
					value = 1;
				} : SetFactEffector
			];
		}
	];
	fk< ItemBlueprint > blueprint = "Items.Iconic_Ranged_Weapon_Blueprint";
	displayName = "LocKey#79840";
	visualTags = 
	[
		"Padre_Pistol"
	];
	quality = "Quality.Random";
	tags += 
	[
		"Padre_Burn", "IconicWeapon", "Liberty_Padre"
	];
	statModifiers += 
	[
		"Quality.IconicItem"
	];
	localizedDescription = "LocKey#79841";
	gameplayDescription = "LocKey#92678";
	rangedAttacks = "Attacks.PhysicalExplosiveBulletPackage";
	npcRPGData = 
	{
		statModifiers += 
		[
			"Quality.IconicItem"
		];
	} : Items.Base_Liberty_NPC_Data;
	slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__rcv1";
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__base1";
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__mag_std";
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< Item > itemPartPreset = "Items.w_handgun__constitutional_liberty__mag_stdr";
		}, 
		{
			slot = "AttachmentSlots.IconicWeaponModLegendary";
			itemPartPreset = "Items.PadreLibertyWeaponMod";
		}
	];
	statModifierGroups = 
	[
		"Items.IconicQualityRandomization", "Items.Base_Liberty_Technical_Stats", "Items.Base_Liberty_Handling_Stats", "Items.Base_Liberty_Recoil_Stats", "Items.Base_Liberty_Spread_Stats", "Items.Base_Liberty_Aim_Stats", "Items.Base_Liberty_Constant_Stats", "Items.Base_Liberty_Damage_Stats", "Items.Base_Power_Stats", "Items.Base_Power_Handgun_Mult_Stats", "Items.Base_Power_Handgun_Stats", "Items.Base_Handgun_RPG_Stats", "Items.Base_Handgun_Misc_Stats", "Items.Base_Handgun_Sway_Stats", "Items.Base_PlayerState_Spread_Stats", "Items.Base_Handgun_DeadReckoning_Stats", "Items.Base_Weapon_Damage_Type_Min_Max", "Items.Base_Weapon_Damage_Type_Thermal", "Items.Padre_Status_Effect_Application_Stats"
	];
	bool scaleToPlayer = true;
}

Padre_Status_Effect_Application_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			statType = "BaseStats.BleedingApplicationRate";
			modifierType = "Multiplier";
			value = 0f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.PoisonedApplicationRate";
			modifierType = "Multiplier";
			value = 0f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.ElectrocutedApplicationRate";
			modifierType = "Multiplier";
			value = 0f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.BurningApplicationRate";
			modifierType = "Additive";
			refStat = "BaseStats.SimpleWeaponMod04";
			opSymbol = "*";
			value = -5f;
		} : CombinedStatModifier, 
		{
			statType = "BaseStats.BurningApplicationRate";
			modifierType = "Additive";
			refStat = "BaseStats.Liberty_Padre_BurningApplicationRate";
			refObject = "Player";
			opSymbol = "*";
			value = 1f;
		} : CombinedStatModifier
	];
}

