package Loot
using RTDB

NPCGenericMechanical : LootTable
{
	minItemsToLoot = 0;
	maxItemsToLoot = 1;
	queries = 
	[
		{
			dropChance = 0.2;
			query = "Query.GenericRangedModsQuery";
		}
	];
}

NPCGenericWeaponInject : LootTable
{
	queries = 
	[
		{
			playerPrereqID = "LootPrereqs.WeaponTier1InjectPrereq";
			query = "Query.InjectWeapons_Tier1_Query";
			statModifiers = 
			[
				{
					statType = "BaseStats.PowerLevel";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier
			];
		}, 
		{
			playerPrereqID = "LootPrereqs.WeaponTier2InjectPrereq";
			query = "Query.InjectWeapons_Tier2_Query";
			statModifiers = 
			[
				{
					statType = "BaseStats.PowerLevel";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier
			];
		}, 
		{
			playerPrereqID = "LootPrereqs.WeaponTier3InjectPrereq";
			query = "Query.InjectWeapons_Tier3_Query";
			statModifiers = 
			[
				{
					statType = "BaseStats.PowerLevel";
					modifierType = "Multiplier";
					value = 0;
				} : ConstantStatModifier
			];
		}
	];
}

CyberpsychoWeapon_LootItem : LootItem
{
	statModifiers += 
	[
		{
			statType = "BaseStats.PowerLevel";
			modifierType = "Multiplier";
			value = 0;
		} : ConstantStatModifier, 
		"Quality.NPCWeaponDropRandomizerNullifier"
	];
}

IconicWeapon_LootItem : LootItem
{
	statModifiers += 
	[
		{
			statType = "BaseStats.PowerLevel";
			modifierType = "Multiplier";
			value = 0;
		} : ConstantStatModifier, 
		"Quality.NPCWeaponDropRandomizerNullifier"
	];
}

RewardWeapon_LootItem : LootItem
{
	statModifiers += 
	[
		{
			statType = "BaseStats.PowerLevel";
			modifierType = "Multiplier";
			value = 0;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.Quality";
			modifierType = "Additive";
			refStat = "BaseStats.LootLevel";
			id = "quality_curves";
			column = "guaranteed_tier5_reward_on_tier5";
		} : CurveStatModifier, 
		{
			statType = "BaseStats.RandomCurveInput";
			modifierType = "Multiplier";
			refStat = "BaseStats.LootLevel";
			id = "quality_curves";
			column = "rci_nullifier_for_tier5_reward_on_tier5";
		} : CurveStatModifier, 
		"Quality.NPCWeaponDropRandomizerNullifier", {
			statType = "BaseStats.RollForPlusOnMaxQuality";
			modifierType = "Multiplier";
			value = 0;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.RollForPlusBelowMaxQuality";
			modifierType = "Multiplier";
			value = 0;
		} : ConstantStatModifier
	];
}

RewardWeapon_QueryItem : ItemQueryElement
{
	statModifiers += 
	[
		{
			statType = "BaseStats.PowerLevel";
			modifierType = "Multiplier";
			value = 0;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.Quality";
			modifierType = "Additive";
			refStat = "BaseStats.LootLevel";
			id = "quality_curves";
			column = "guaranteed_tier5_reward_on_tier5";
		} : CurveStatModifier, 
		{
			statType = "BaseStats.RandomCurveInput";
			modifierType = "Multiplier";
			refStat = "BaseStats.LootLevel";
			id = "quality_curves";
			column = "rci_nullifier_for_tier5_reward_on_tier5";
		} : CurveStatModifier, 
		"Quality.NPCWeaponDropRandomizerNullifier", {
			statType = "BaseStats.RollForPlusOnMaxQuality";
			modifierType = "Multiplier";
			value = 0;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.RollForPlusBelowMaxQuality";
			modifierType = "Multiplier";
			value = 0;
		} : ConstantStatModifier
	];
}

SecondaryRewardWeapon_QueryItem : ItemQueryElement
{
	statModifiers += 
	[
		{
			statType = "BaseStats.PowerLevel";
			modifierType = "Multiplier";
			value = 0;
		} : ConstantStatModifier, 
		{
			statType = "BaseStats.Quality";
			modifierType = "Additive";
			refStat = "BaseStats.LootLevel";
			id = "quality_curves";
			column = "guaranteed_tier5_reward_on_tier5";
		} : CurveStatModifier, 
		{
			statType = "BaseStats.RandomCurveInput";
			modifierType = "Multiplier";
			refStat = "BaseStats.LootLevel";
			id = "quality_curves";
			column = "rci_nullifier_for_tier5_reward_on_tier5";
		} : CurveStatModifier, 
		"Quality.NPCWeaponDropRandomizerNullifier"
	];
}

AirDrop_CW_LootItem : LootItem
{
	dropChance = 0.25;
	statModifiers += 
	[
		{
			statType = "BaseStats.Airdropped";
			modifierType = "Additive";
			value = 1;
		} : ConstantStatModifier
	];
}

AirDrop_AmazonIconic_LootItem : IconicWeapon_LootItem
{
	dropChance = 0.05;
	statModifiers += 
	[
		{
			statType = "BaseStats.Airdropped";
			modifierType = "Additive";
			value = 1;
		} : ConstantStatModifier
	];
	quantityModifiers = 
	[
		{
			statType = "BaseStats.Quantity";
			modifierType = "Additive";
			min = 0.2;
			max = 1.2;
		} : RandomStatModifier
	];
}

AirDrop_AmazonIconic_LootItem_Early : AirDrop_AmazonIconic_LootItem
{
	dropChance = 0.15;
	quantityModifiers += 
	[
		{
			statType = "BaseStats.Quantity";
			modifierType = "Additive";
			value = 0.5;
		} : ConstantStatModifier
	];
}

AirDrop_AmazonIconic_LootItem_Late : AirDrop_AmazonIconic_LootItem
{
	dropChance = 0.001;
	quantityModifiers += 
	[
		{
			statType = "BaseStats.Quantity";
			modifierType = "Additive";
			value = -0.12;
		} : ConstantStatModifier
	];
}

TreasureChest_CW_QueryItem : ItemQueryElement
{
	quantityModifiers += 
	[
		{
			statType = "BaseStats.Quantity";
			modifierType = "Additive";
			refObject = "Player";
			refStat = "BaseStats.Level";
			id = "cyberware_curves";
			column = "level_to_cw_quantity_in_treasure_chest";
		} : CurveStatModifier, 
		{
			statType = "BaseStats.Quantity";
			modifierType = "Additive";
			refObject = "Player";
			refStat = "BaseStats.IconicCWFromTreasureChestLooted";
			opSymbol = "*";
			value = 1.0f;
		} : CombinedStatModifier
	];
}

TreasureChest_IconicCW_QueryItem : ItemQueryElement
{
	dropChance = 1000;
	statModifiers += 
	[
		{
			statType = "BaseStats.IconicCWFromTreasureChestLooted";
			modifierType = "Additive";
			value = 1;
		} : ConstantStatModifier
	];
}

