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

[ notQueryable ]
Preset_Base_Masamune : Base_Masamune
{
	CName appearanceResourceName = "Preset_Base_Masamune";
	CName[] visualTags = 
	[
		"Default"
	];
	tags += 
	[
		"T3_Inject_Weapon", "Masamune"
	];
	fk< SlotItemPartPreset >[] slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_rifle_assault__arasaka_masamune__rvc1";
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< Item > itemPartPreset = "Items.w_rifle_assault__arasaka_masamune__base1";
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< Item > itemPartPreset = "Items.w_rifle_assault__arasaka_masamune__mag_std";
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< Item > itemPartPreset = "Items.w_rifle_assault__arasaka_masamune__mag_stdr";
		}, 
		"Items.RifleScopesPartList", {
			slot = "AttachmentSlots.Power_AR_SMG_LMG_WeaponMod1";
		} : Power_AR_SMG_LMG_ModList_Slot1, 
		{
			slot = "AttachmentSlots.Power_AR_SMG_LMG_WeaponMod2";
		} : Power_AR_SMG_LMG_ModList_Slot2
	];
}

[ notQueryable ]
Preset_Masamune_Arasaka_2020 : Base_Masamune
{
	CName appearanceResourceName = "Preset_Base_Masamune";
	displayName = "LocKey#51340";
	localizedDescription = "LocKey#80922";
	visualTags = 
	[
		"Arasaka_2020"
	];
	tags += 
	[
		"T2_Inject_Weapon", "Masamune_2020"
	];
	fk< SlotItemPartPreset >[] slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_rifle_assault__arasaka_masamune__rvc1";
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< Item > itemPartPreset = "Items.w_rifle_assault__arasaka_masamune__base1";
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< Item > itemPartPreset = "Items.w_rifle_assault__arasaka_masamune__mag_std";
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< Item > itemPartPreset = "Items.w_rifle_assault__arasaka_masamune__mag_stdr";
		}, 
		"Items.RifleScopesPartList", {
			slot = "AttachmentSlots.Power_AR_SMG_LMG_WeaponMod1";
		} : Power_AR_SMG_LMG_ModList_Slot1, 
		{
			slot = "AttachmentSlots.Power_AR_SMG_LMG_WeaponMod2";
		} : Power_AR_SMG_LMG_ModList_Slot2
	];
	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_Masamune_Arasaka_2020_Technical_Stats", "Items.Base_Masamune_Handling_Stats", "Items.Base_Masamune_Arasaka_2020_Recoil_Stats", "Items.Base_Masamune_Spread_Stats", "Items.Base_Masamune_Aim_Stats", "Items.Base_Masamune_Arasaka_2020_Constant_Stats", "Items.Base_Masamune_Damage_Stats", "Items.Base_Power_Stats", "Items.Base_Power_Assault_Rifle_Mult_Stats", "Items.Base_Power_Assault_Rifle_Stats", "Items.Base_Assault_Rifle_RPG_Stats", "Items.Base_Assault_Rifle_Misc_Stats", "Items.Base_Assault_Rifle_Sway_Stats", "Items.Base_PlayerState_Spread_Stats", "Items.Base_Assault_Rifle_DeadReckoning_Stats", "Items.Base_Weapon_Damage_Type_Min_Max", "Items.Base_Weapon_Damage_Type_Physical"
	];
}

Base_Masamune_Arasaka_2020_Technical_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			value = 1.f;
		} : NumShotsToFireModifier, 
		{
			value = 0.25f;
		} : CycleTimeModifier, 
		{
			value = 0.08f;
		} : CycleTime_BurstModifier, 
		{
			value = 3.f;
		} : NumShotsInBurstModifier, 
		{
			value = 21.f;
		} : MagazineCapacityModifier, 
		{
			value = 1.f;
		} : ProjectilesPerShotModifier, 
		"BaseStats.ProjectilesPerShotCombinedModifier"
	];
}

Base_Masamune_Arasaka_2020_Recoil_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			value = 15.f;
		} : RecoilDirModifier, 
		{
			value = 12.5f;
		} : RecoilAngleModifier, 
		{
			value = 0.03f;
		} : RecoilHoldDurationModifier, 
		{
			value = 0.03f;
		} : RecoilTimeModifier, 
		{
			value = 0.25f;
		} : RecoilRecoveryTimeModifier, 
		{
			value = 1.f;
		} : RecoilEnableLinearXModifier, 
		{
			value = 1.f;
		} : RecoilEnableLinearYModifier, 
		{
			value = 1.f;
		} : RecoilEnableLinearXADSModifier, 
		{
			value = 1.f;
		} : RecoilEnableLinearYADSModifier
	];
}

Base_Masamune_Arasaka_2020_Constant_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			statType = "BaseStats.SpreadDefaultX";
			modifierType = "Additive";
			value = 0.9f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.SpreadAdsDefaultX";
			modifierType = "Additive";
			value = 0.1f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.SpreadMaxX";
			modifierType = "Additive";
			value = 3.6f;
		} : 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 = 0.85f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.RecoilKickMax";
			modifierType = "Additive";
			value = 1.1f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.DamagePerHit";
			modifierType = "Multiplier";
			value = 0.8127;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.FirePower";
			modifierType = "Multiplier";
			value = 1.326f;
		} : ConstantStatModifier, 
		"AttackModifier.WeaponArmorPenetrationLow", {
			statType = "BaseStats.HeadshotDamageMultiplier";
			modifierType = "Additive";
			value = 0.50f;
		} : ConstantStatModifier
	];
}

Preset_Masamune_Arasaka_2077 : Preset_Masamune_Arasaka_2020
{
	visualTags = 
	[
		"Arasaka_2077"
	];
}

[ notQueryable ]
Preset_Masamune_Arasaka_2077_Unbreakable : Preset_Masamune_Arasaka_2077
{
	tags += 
	[
		"Unbreakable"
	];
}

Preset_Masamune_Default : Preset_Base_Masamune
{
	CName[] visualTags = 
	[
		"Default"
	];
}

Preset_Masamune_Pimp : Preset_Masamune_Default
{
	CName[] visualTags = 
	[
		"Pimp"
	];
	tags += 
	[
		"Pimp"
	];
}

Preset_Masamune_Neon : Preset_Masamune_Default
{
	CName[] visualTags = 
	[
		"Neon"
	];
	tags += 
	[
		"Neon"
	];
}

Preset_Masamune_Military : Preset_Masamune_Default
{
	CName[] visualTags = 
	[
		"Military"
	];
	tags += 
	[
		"Military"
	];
}

[ notQueryable ]
Preset_Masamune_Military_Unbreakable : Preset_Masamune_Military
{
	tags += 
	[
		"Unbreakable"
	];
}

Preset_Masamune_Trauma : Preset_Masamune_Default
{
	CName[] visualTags = 
	[
		"Trauma"
	];
	tags += 
	[
		"Courier_RareFind"
	];
}

[ notQueryable ]
Preset_Masamune_Flashlight : Preset_Masamune_Default
{
	visualTags = 
	[
		"Masamune_Flashlight"
	];
}

[ notQueryable ]
Preset_Masamune_Flashlight_Shadows : Preset_Masamune_Default
{
	visualTags = 
	[
		"Masamune_Flashlight_Shadows"
	];
}

[ notQueryable ]
Craftable_Common_Masamune : Preset_Masamune_Default
{
	quality = "Quality.Common";
	slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_rifle_assault__arasaka_masamune__rvc1";
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< Item > itemPartPreset = "Items.w_rifle_assault__arasaka_masamune__base1";
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< Item > itemPartPreset = "Items.w_rifle_assault__arasaka_masamune__mag_std";
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< Item > itemPartPreset = "Items.w_rifle_assault__arasaka_masamune__mag_stdr";
		}
	];
	CraftingData = "Items.Big_Common_Crafting_Materials_Weapon";
}

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

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

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

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

[ notQueryable ]
Preset_Masamune_Rogue : Preset_Masamune_Default
{
	fk< ItemBlueprint > blueprint = "Items.Iconic_Ranged_Weapon_Blueprint";
	displayName = "LocKey#40577";
	visualTags = 
	[
		"Rogue_Masamune"
	];
	quality = "Quality.Random";
	localizedDescription = "LocKey#40578";
	tags += 
	[
		"IconicWeapon"
	];
	slotPartListPreset = 
	[
		{
			slot = "AttachmentSlots.Receiver";
			fk< Item > itemPartPreset = "Items.w_rifle_assault__arasaka_masamune__rvc1";
		}, 
		{
			slot = "AttachmentSlots.Barrel";
			fk< Item > itemPartPreset = "Items.w_rifle_assault__arasaka_masamune__base1";
		}, 
		{
			slot = "AttachmentSlots.Magazine";
			fk< Item > itemPartPreset = "Items.w_rifle_assault__arasaka_masamune__mag_std";
		}, 
		{
			slot = "AttachmentSlots.MagazineEmpty";
			fk< Item > itemPartPreset = "Items.w_rifle_assault__arasaka_masamune__mag_stdr";
		}, 
		{
			slot = "AttachmentSlots.IconicWeaponModLegendary";
			itemPartPreset = "Items.RogueMasamuneWeaponMod";
		}
	];
	statModifiers += 
	[
		"Quality.IconicItem", {
			statType = "BaseStats.Level";
			modifierType = "Multiplier";
			value = 0;
		} : ConstantStatModifier
	];
	npcRPGData = 
	{
		statModifiers += 
		[
			"Quality.IconicItem"
		];
	} : Items.Base_Masamune_NPC_Data;
	statModifierGroups = 
	[
		"Items.IconicQualityRandomization", "Items.Base_Masamune_Rogue_Technical_Stats", "Items.Base_Masamune_Handling_Stats", "Items.Base_Masamune_Recoil_Stats", "Items.Base_Masamune_Spread_Stats", "Items.Base_Masamune_Aim_Stats", "Items.Base_Masamune_Rogue_Constant_Stats", "Items.Base_Masamune_Damage_Stats", "Items.Base_Power_Stats", "Items.Base_Power_Assault_Rifle_Mult_Stats", "Items.Base_Power_Assault_Rifle_Stats", "Items.Base_Assault_Rifle_RPG_Stats", "Items.Base_Assault_Rifle_Misc_Stats", "Items.Base_Assault_Rifle_Sway_Stats", "Items.Base_PlayerState_Spread_Stats", "Items.Base_Assault_Rifle_DeadReckoning_Stats", "Items.Base_Weapon_Damage_Type_Min_Max", "Items.Base_Weapon_Damage_Type_Physical"
	];
	bool scaleToPlayer = true;
}

Base_Masamune_Rogue_Technical_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			value = 1.f;
		} : NumShotsToFireModifier, 
		{
			value = 0.25f;
		} : CycleTimeModifier, 
		{
			value = 0.09f;
		} : CycleTime_BurstModifier, 
		{
			value = 3.f;
		} : NumShotsInBurstModifier, 
		{
			value = 18.f;
		} : MagazineCapacityModifier, 
		{
			value = 1.f;
		} : ProjectilesPerShotModifier, 
		"BaseStats.ProjectilesPerShotCombinedModifier"
	];
}

Base_Masamune_Rogue_Constant_Stats : StatModifierGroup
{
	statModifiers = 
	[
		{
			statType = "BaseStats.SpreadDefaultX";
			modifierType = "Additive";
			value = 0.5f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.SpreadAdsDefaultX";
			modifierType = "Additive";
			value = 0.1f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.SpreadMaxX";
			modifierType = "Additive";
			value = 2.0f;
		} : 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 = 0.9f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.RecoilKickMax";
			modifierType = "Additive";
			value = 1.2f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.DamagePerHit";
			modifierType = "Multiplier";
			value = 1.1f;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.FirePower";
			modifierType = "Multiplier";
			value = 1.326f;
		} : ConstantStatModifier, 
		"AttackModifier.WeaponArmorPenetrationLow", {
			statType = "BaseStats.EffectiveRange";
			modifierType = "Multiplier";
			value = 1.1428;
		} : ConstantStatModifier
	];
}

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

