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

Preset_Metel_Default : Base_Metel
{
	CName appearanceResourceName = "Preset_Metel_Default";
	CName[] visualTags = 
	[
		"Default"
	];
	tags += 
	[
		"ExplosivePowerWeapon"
	];
	fk< SlotItemPartPreset >[] slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_revolver__techtronika_metel__rcv1";
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< Item > itemPartPreset = "Items.w_revolver__techtronika_metel__base1";
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< Item > itemPartPreset = "Items.w_revolver__techtronika_metel__mag_std";
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< Item > itemPartPreset = "Items.w_revolver__techtronika_metel__mag_stdr";
		}, 
		{
			slot = "AttachmentSlots.Power_Handgun_WeaponMod1";
		} : Power_Handgun_ModList_Slot1, 
		{
			slot = "AttachmentSlots.Power_Handgun_WeaponMod2";
		} : Power_Handgun_ModList_Slot2
	];
	statModifiers += 
	[
		{
			statType = "BaseStats.RicochetCount";
			modifierType = "Multiplier";
			value = 0.0f;
		} : ConstantStatModifier
	];
	OnAttach += 
	[
		{
			effectors = 
			[
				"Effectors.ChimeraMod_OnExplosiveWeapon_Effector"
			];
		}
	];
}

Preset_Metel_Pimp : Preset_Metel_Default
{
	CName[] visualTags = 
	[
		"Pimp"
	];
	tags += 
	[
		"Pimp"
	];
}

Preset_Metel_Neon : Preset_Metel_Default
{
	CName[] visualTags = 
	[
		"Neon"
	];
	tags += 
	[
		"Neon", "Courier_RareFind"
	];
}

Preset_Metel_Military : Preset_Metel_Default
{
	CName[] visualTags = 
	[
		"Military"
	];
	tags += 
	[
		"Military"
	];
}

[ notQueryable ]
Preset_Metel_Legendary : Preset_Metel_Default
{
	CName[] visualTags = 
	[
		"Legendary"
	];
	tags += 
	[
		"Legendary"
	];
}

[ notQueryable ]
Preset_Metel_AirDrop : Preset_Metel_Default
{
	OnLooted += 
	[
		{
			effectors = 
			[
				{
					fact = "metel_airdrop_owned";
					value = 1;
				} : SetFactEffector
			];
		}
	];
	fk< ItemBlueprint > blueprint = "Items.Iconic_Ranged_Weapon_NoAttachments_Blueprint";
	CName[] visualTags = 
	[
		"AirDrop_Weapon"
	];
	tags += 
	[
		"AirDrop_Burn", "IconicWeapon", "AirDropWeapon"
	];
	quality = "Quality.Random";
	displayName = "LocKey#93440";
	localizedDescription = "LocKey#93444";
	gameplayDescription = "LocKey#92678";
	slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< ItemPartListElement >[] itemPartList = 
			[
				{
					item = "Items.w_revolver__techtronika_metel__rcv1";
				}
			];
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< ItemPartListElement >[] itemPartList = 
			[
				{
					item = "Items.w_revolver__techtronika_metel__base1";
				}
			];
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< ItemPartListElement >[] itemPartList = 
			[
				{
					item = "Items.w_revolver__techtronika_metel__mag_std";
				}
			];
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< ItemPartListElement >[] itemPartList = 
			[
				{
					item = "Items.w_revolver__techtronika_metel__mag_stdr";
				}
			];
		}, 
		{
			slot = "AttachmentSlots.IconicWeaponModLegendary";
			itemPartPreset = "Items.MetelAirDropWeaponMod";
		}
	];
	rangedAttacks = "Attacks.ExplodingBulletLightPackage";
	attacks += 
	[
		"Attacks.ExplodingBulletLightEffect", "Attacks.ExplodingBulletLightProjectile"
	];
	statModifiers += 
	[
		"Quality.IconicItem"
	];
	npcRPGData = 
	{
		statModifiers += 
		[
			"Quality.IconicItem"
		];
	} : Items.Base_Metel_NPC_Data;
	statModifierGroups = 
	[
		"Items.IconicQualityRandomization", "Items.Base_Metel_AirDrop_Technical_Stats", "Items.Base_Metel_Handling_Stats", "Items.Base_Metel_Recoil_Stats", "Items.Base_Metel_Spread_Stats", "Items.Base_Metel_Aim_Stats", "Items.Base_Metel_AirDrop_Constant_Stats", "Items.Base_Metel_Damage_Stats", "Items.Base_Power_Stats", "Items.Base_Power_Revolver_Mult_Stats", "Items.Base_Power_Revolver_Stats", "Items.Base_Revolver_RPG_Stats", "Items.Base_Revolver_Misc_Stats", "Items.Base_Revolver_Sway_Stats", "Items.Base_PlayerState_Spread_Stats", "Items.Base_Revolver_DeadReckoning_Stats", "Items.AirDrop_Status_Effect_Application_Stats", "Items.Base_Weapon_Damage_Type_Min_Max", "Items.Base_Weapon_Damage_Type_Thermal"
	];
}

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

Base_Metel_AirDrop_Constant_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			statType = "BaseStats.SpreadDefaultX";
			modifierType = "Additive";
			value = 1.4f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.SpreadAdsDefaultX";
			modifierType = "Additive";
			value = 0.22f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.SpreadMaxX";
			modifierType = "Additive";
			value = 5.6f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.SpreadAdsMaxX";
			modifierType = "Additive";
			value = 0.88f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.RecoilKickMin";
			modifierType = "Additive";
			value = 2.66f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.RecoilKickMax";
			modifierType = "Additive";
			value = 3.33f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.KnockdownImpulse";
			modifierType = "Additive";
			value = -5.0f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.HeadshotDamageMultiplier";
			modifierType = "Additive";
			value = -0.25f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.EffectiveRange";
			modifierType = "Multiplier";
			value = 0.7143f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.DamagePerHit";
			modifierType = "Multiplier";
			value = 1.0628f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.FirePower";
			modifierType = "Multiplier";
			value = 1.875f;
		} : ConstantStatModifier, 
		"AttackModifier.WeaponArmorPenetrationMedium", {
			statType = "BaseStats.ReloadTimeBonus";
			modifierType = "Additive";
			value = 0.1f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.RicochetCount";
			modifierType = "Multiplier";
			value = 0.0f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.WeaponVehicleDamagePercentBonus";
			modifierType = "Additive";
			value = 0.5f;
		} : ConstantStatModifier
	];
}

[ notQueryable ]
VHard_50_RefTech_Weapon9 : Preset_Metel_AirDrop
{
	quality = "Quality.Legendary";
	statModifiers += 
	[
		"Quality.PlusPlusModifier"
	];
}

[ notQueryable ]
Craftable_Common_Metel : Preset_Metel_Default
{
	quality = "Quality.Common";
	slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_revolver__techtronika_metel__rcv1";
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< Item > itemPartPreset = "Items.w_revolver__techtronika_metel__base1";
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< Item > itemPartPreset = "Items.w_revolver__techtronika_metel__mag_std";
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< Item > itemPartPreset = "Items.w_revolver__techtronika_metel__mag_stdr";
		}
	];
	CraftingData = "Items.Small_Common_Crafting_Materials_Weapon";
}

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

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

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

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

[ notQueryable ]
VHard_50_TechCool_Weapon9 : Preset_Metel_AirDrop
{
	quality = "Quality.Legendary";
	statModifiers += 
	[
		"Quality.PlusPlusModifier"
	];
}

[ notQueryable ]
VHard_50_BodyCool_Weapon3 : Preset_Metel_Kurt
{
	quality = "Quality.Legendary";
	statModifiers += 
	[
		"Quality.PlusPlusModifier"
	];
}

[ notQueryable ]
Preset_Metel_Kurt : Base_Metel
{
	OnLooted += 
	[
		{
			effectors = 
			[
				{
					prereqRecord = 
					{
						allowedTags = 
						[
							"Replacer"
						];
						invert = true;
					} : GameplayTagsPrereq;
					fact = "metel_kurt_owned";
					value = 1;
				} : SetFactEffector
			];
		}
	];
	fk< ItemBlueprint > blueprint = "Items.Iconic_Ranged_Weapon_NoAttachments_Blueprint";
	displayName = "LocKey#84850";
	CName appearanceResourceName = "Preset_Metel_Default";
	visualTags = 
	[
		"Kurtz_Metel"
	];
	tags += 
	[
		"IconicWeapon"
	];
	quality = "Quality.Random";
	localizedDescription = "LocKey#84851";
	triggerEffectName = "te_wea_trigger_strong_impact";
	npcRPGData = 
	{
		statModifiers += 
		[
			"Quality.IconicItem"
		];
	} : Items.Base_Metel_NPC_Data;
	slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< ItemPartListElement >[] itemPartList = 
			[
				{
					item = "Items.w_revolver__techtronika_metel__rcv1";
				}
			];
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< ItemPartListElement >[] itemPartList = 
			[
				{
					item = "Items.w_revolver__techtronika_metel__base1";
				}
			];
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< ItemPartListElement >[] itemPartList = 
			[
				{
					item = "Items.w_revolver__techtronika_metel__mag_std";
				}
			];
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< ItemPartListElement >[] itemPartList = 
			[
				{
					item = "Items.w_revolver__techtronika_metel__mag_stdr";
				}
			];
		}, 
		{
			slot = "AttachmentSlots.IconicWeaponModLegendary";
			itemPartPreset = "Items.MetelKurtWeaponMod";
		}
	];
	statModifiers += 
	[
		"Quality.IconicItem"
	];
	bool scaleToPlayer = true;
	statModifierGroups = 
	[
		"Items.IconicQualityRandomization", "Items.Base_Metel_Kurt_Technical_Stats", "Items.Base_Metel_Handling_Stats", "Items.Base_Metel_Recoil_Stats", "Items.Base_Metel_Spread_Stats", "Items.Base_Metel_Aim_Stats", "Items.Base_Metel_Kurt_Constant_Stats", "Items.Base_Metel_Damage_Stats", "Items.Base_Power_Stats", "Items.Base_Power_Revolver_Mult_Stats", "Items.Base_Power_Revolver_Stats", "Items.Base_Revolver_RPG_Stats", "Items.Base_Revolver_Misc_Stats", "Items.Base_Revolver_Sway_Stats", "Items.Base_PlayerState_Spread_Stats", "Items.Base_Revolver_DeadReckoning_Stats", "Items.Base_Weapon_Damage_Type_Min_Max", "Items.Base_Weapon_Damage_Type_Physical"
	];
}

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

Base_Metel_Kurt_Constant_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			statType = "BaseStats.SpreadDefaultX";
			modifierType = "Additive";
			value = 1.0f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.SpreadAdsDefaultX";
			modifierType = "Additive";
			value = 0.15f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.SpreadMaxX";
			modifierType = "Additive";
			value = 4.0f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.SpreadAdsMaxX";
			modifierType = "Additive";
			value = 0.6f;
		} : 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 = 2.25f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.RecoilKickMax";
			modifierType = "Additive";
			value = 2.9f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.HeadshotDamageMultiplier";
			modifierType = "Additive";
			value = 0.5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.DamagePerHit";
			modifierType = "Multiplier";
			value = 0.894f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.KnockdownImpulse";
			modifierType = "Additive";
			value = -5.0f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.FirePower";
			modifierType = "Multiplier";
			value = 1.5f;
		} : ConstantStatModifier, 
		"AttackModifier.WeaponArmorPenetrationMedium", {
			statType = "BaseStats.RicochetCount";
			modifierType = "Multiplier";
			value = 0.0f;
		} : ConstantStatModifier
	];
}

