package Vendors
using RTDB, Items, Prereqs

QuantityMod : ConstantStatModifier
{
	statType = "BaseStats.Quantity";
	modifierType = "Additive";
	value = 1;
}

RandomQuantity : RandomStatModifier
{
	statType = "BaseStats.Quantity";
	modifierType = "Additive";
}

QuantityScaledMod : CurveStatModifier
{
	statType = "BaseStats.Quantity";
	modifierType = "Multiplier";
	id = "price_curves";
	column = "tier_to_vendor_money_multiplier";
	refStat = "BaseStats.PowerLevel";
	refObject = "Owner";
}

BaseMoney : VendorItem
{
	item = "Items.money";
	quantity = 
	[
		{
			value = 20000;
		} : QuantityMod
	];
}

TierScaledBaseMoney : BaseMoney
{
	item = "Items.money";
	quantity = 
	[
		{
			value = 20000;
		} : QuantityMod, 
		"Vendors.QuantityScaledMod"
	];
}

CasinoCashierBaseMoney : BaseMoney
{
	quantity = 
	[
		{
			min = 200000;
			max = 200000;
		} : RandomQuantity
	];
}

DefaultSellPrice : ConstantStatModifier
{
	statType = "BaseStats.Price";
	modifierType = "Additive";
	value = 25;
}

DefaultBuyPrice : ConstantStatModifier
{
	statType = "BaseStats.Price";
	modifierType = "Additive";
	value = 100;
}

FreeItem : ConstantStatModifier
{
	statType = "BaseStats.Price";
	modifierType = "Additive";
	value = 0;
}

QuantityModifier : RandomStatModifier
{
	statType = "BaseStats.Quantity";
	modifierType = "Additive";
}

VeryRarely_Present : QuantityModifier
{
	min = 0.15;
	max = 1.15;
}

Rarely_Present : QuantityModifier
{
	min = 0.3;
	max = 1.3;
}

Uncommonly_Present : QuantityModifier
{
	min = 0.5;
	max = 1.5;
}

Commonly_Present : QuantityModifier
{
	min = 0.75;
	max = 1.75;
}

Frequently_Present : QuantityModifier
{
	min = 0.9;
	max = 1.9;
}

Always_Present : ConstantStatModifier
{
	value = 1f;
	modifierType = "Additive";
}

MediumQuantity : QuantityModifier
{
	min = 4;
	max = 12;
}

Crafter : Vendor
{
}

CommonMaterialVendorStock : VendorItem
{
	item = "Items.CommonMaterial1";
	quantity = 
	[
		{
			min = 100;
			max = 200;
		} : RandomQuantity
	];
}

UncommonMaterialVendorStock : VendorItem
{
	item = "Items.UncommonMaterial1";
	quantity = 
	[
		{
			min = 100;
			max = 200;
		} : RandomQuantity
	];
}

RareMaterialVendorStock : VendorItem
{
	item = "Items.RareMaterial1";
	quantity = 
	[
		{
			min = 100;
			max = 200;
		} : RandomQuantity
	];
}

RareMaterial2VendorStock : VendorItem
{
	item = "Items.RareMaterial2";
	quantity = 
	[
		{
			min = 100;
			max = 200;
		} : RandomQuantity
	];
}

EpicMaterialVendorStock : VendorItem
{
	item = "Items.EpicMaterial1";
	quantity = 
	[
		{
			min = 100;
			max = 200;
		} : RandomQuantity
	];
}

EpicMaterial2VendorStock : VendorItem
{
	item = "Items.EpicMaterial2";
	quantity = 
	[
		{
			min = 100;
			max = 200;
		} : RandomQuantity
	];
}

LegendaryMaterialVendorStock : VendorItem
{
	item = "Items.LegendaryMaterial1";
	quantity = 
	[
		{
			min = 100;
			max = 200;
		} : RandomQuantity
	];
}

LegendaryMaterial2VendorStock : VendorItem
{
	item = "Items.LegendaryMaterial2";
	quantity = 
	[
		{
			min = 100;
			max = 200;
		} : RandomQuantity
	];
}

QuickhackUncommonMaterialVendorStock : VendorItem
{
	item = "Items.QuickHackUncommonMaterial1";
	quantity = 
	[
		{
			min = 40;
			max = 120;
		} : RandomQuantity
	];
}

QuickhackRareMaterialVendorStock : VendorItem
{
	item = "Items.QuickHackRareMaterial1";
	quantity = 
	[
		{
			min = 40;
			max = 120;
		} : RandomQuantity
	];
}

QuickhackEpicMaterialVendorStock : VendorItem
{
	item = "Items.QuickHackEpicMaterial1";
	quantity = 
	[
		{
			min = 40;
			max = 120;
		} : RandomQuantity
	];
}

QuickhackLegendaryMaterialVendorStock : VendorItem
{
	item = "Items.QuickHackLegendaryMaterial1";
	quantity = 
	[
		{
			min = 40;
			max = 120;
		} : RandomQuantity
	];
}

MidStreetCredItem : VendorItem
{
	generationPrereqs += 
	[
		{
			statType = "StreetCred";
			valueToCheck = 17;
			comparisonType = "Greater";
		} : StatPrereq
	];
}

HighStreetCredItem : VendorItem
{
	generationPrereqs += 
	[
		{
			statType = "StreetCred";
			valueToCheck = 35;
			comparisonType = "Greater";
		} : StatPrereq
	];
}

SuicideLvl3Program : VendorItem
{
	generationPrereqs = 
	[
		{
			statType = "StreetCred";
			valueToCheck = 40;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq
	];
	item = "Items.SuicideLvl3Program";
	quantity = 
	[
		"Vendors.Always_Present"
	];
}

SuicideLvl4Program : VendorItem
{
	generationPrereqs = 
	[
		{
			statType = "StreetCred";
			valueToCheck = 40;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq
	];
	item = "Items.SuicideLvl4Program";
	quantity = 
	[
		"Vendors.Always_Present"
	];
}

GrenadeExplodeLvl3Program : VendorItem
{
	generationPrereqs = 
	[
		{
			statType = "StreetCred";
			valueToCheck = 40;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq
	];
	item = "Items.GrenadeExplodeLvl3Program";
	quantity = 
	[
		"Vendors.Always_Present"
	];
}

GrenadeExplodeLvl4Program : VendorItem
{
	generationPrereqs = 
	[
		{
			statType = "StreetCred";
			valueToCheck = 40;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq
	];
	item = "Items.GrenadeExplodeLvl4Program";
	quantity = 
	[
		"Vendors.Always_Present"
	];
}

MadnessLvl3Program : VendorItem
{
	generationPrereqs = 
	[
		{
			statType = "StreetCred";
			valueToCheck = 40;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq
	];
	item = "Items.MadnessLvl3Program";
	quantity = 
	[
		"Vendors.Always_Present"
	];
}

MadnessLvl4Program : VendorItem
{
	generationPrereqs = 
	[
		{
			statType = "StreetCred";
			valueToCheck = 40;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq
	];
	item = "Items.MadnessLvl4Program";
	quantity = 
	[
		"Vendors.Always_Present"
	];
}

SystemCollapseLvl3Program : VendorItem
{
	generationPrereqs = 
	[
		{
			statType = "StreetCred";
			valueToCheck = 40;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq
	];
	item = "Items.SystemCollapseLvl3Program";
	quantity = 
	[
		"Vendors.Always_Present"
	];
}

SystemCollapseLvl4Program : VendorItem
{
	generationPrereqs = 
	[
		{
			statType = "StreetCred";
			valueToCheck = 40;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq
	];
	item = "Items.SystemCollapseLvl4Program";
	quantity = 
	[
		"Vendors.Always_Present"
	];
}

DisableCyberwareLvl2Program : VendorItem
{
	generationPrereqs = 
	[
		{
			statType = "StreetCred";
			valueToCheck = 40;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq
	];
	item = "Items.DisableCyberwareLvl2Program";
	quantity = 
	[
		"Vendors.Always_Present"
	];
}

PingLvl4Program : VendorItem
{
	generationPrereqs = 
	[
		{
			statType = "StreetCred";
			valueToCheck = 40;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq
	];
	item = "Items.PingLvl4Program";
	quantity = 
	[
		"Vendors.Always_Present"
	];
}

ContagionLvl4Program : VendorItem
{
	generationPrereqs = 
	[
		{
			statType = "StreetCred";
			valueToCheck = 40;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq
	];
	item = "Items.ContagionLvl4Program";
	quantity = 
	[
		"Vendors.Always_Present"
	];
}

StreetCredAvailability : StatPrereq
{
	statType = "StreetCred";
	comparisonType = "GreaterOrEqual";
}

EarlyStartGameCredAvailability : StreetCredAvailability
{
	valueToCheck = 6;
}

EarlyGameCredAvailability : StreetCredAvailability
{
	valueToCheck = 10;
}

EarlyEndGameCredAvailability : StreetCredAvailability
{
	valueToCheck = 12;
}

MidStartGameCredAvailability : StreetCredAvailability
{
	valueToCheck = 14;
}

EarlyMidGameCredAvailability : StreetCredAvailability
{
	valueToCheck = 15;
}

MidEndGameCredAvailability : StreetCredAvailability
{
	valueToCheck = 20;
}

LateStartGameCredAvailability : StreetCredAvailability
{
	valueToCheck = 25;
}

LateGameCredAvailability : StreetCredAvailability
{
	valueToCheck = 30;
}

LateMidGameCredAvailability : StreetCredAvailability
{
	valueToCheck = 35;
}

EndGameCredAvailability : StreetCredAvailability
{
	valueToCheck = 40;
}

LateEndGameCredAvailability : StreetCredAvailability
{
	valueToCheck = 45;
}

NIDCredAvailability : StreetCredAvailability
{
	valueToCheck = 17;
}

KabukiCredAvailability : StreetCredAvailability
{
	valueToCheck = 14;
}

LittleChinaCredAvailability : StreetCredAvailability
{
	valueToCheck = 11;
}

ArasakaWaterfrontCredAvailability : StreetCredAvailability
{
	valueToCheck = 17;
}

DowntownCredAvailability : StreetCredAvailability
{
	valueToCheck = 50;
}

CorpoPlazaCredAvailability : StreetCredAvailability
{
	valueToCheck = 49;
}

WellspringsCredAvailability : StreetCredAvailability
{
	valueToCheck = 49;
}

GlenCredAvailability : StreetCredAvailability
{
	valueToCheck = 47;
}

VistaDelReyCredAvailability : StreetCredAvailability
{
	valueToCheck = 47;
}

JapanTownCredAvailability : StreetCredAvailability
{
	valueToCheck = 27;
}

CharterHillCredAvailability : StreetCredAvailability
{
	valueToCheck = 29;
}

NorthOaksCredAvailability : StreetCredAvailability
{
	valueToCheck = 27;
}

ArroyoCredAvailability : StreetCredAvailability
{
	valueToCheck = 43;
}

RanchoCoronadoCredAvailability : StreetCredAvailability
{
	valueToCheck = 39;
}

CoastViewCredAvailability : StreetCredAvailability
{
	valueToCheck = 37;
}

WWECredAvailability : StreetCredAvailability
{
	valueToCheck = 37;
}

InlandAvenueCredAvailability : StreetCredAvailability
{
	valueToCheck = 43;
}

RareCyberdeckAvailability : StreetCredAvailability
{
	valueToCheck = 12;
}

EpicCyberdeckAvailability : StreetCredAvailability
{
	valueToCheck = 30;
}

LegendaryCyberdeckAvailability : StreetCredAvailability
{
	valueToCheck = 40;
}

EpicHackAvailability : StreetCredAvailability
{
	valueToCheck = 30;
}

LevelAvailability : StatPrereq
{
	statType = "Level";
	comparisonType = "GreaterOrEqual";
}

EarlyGameLevelAvailability : LevelAvailability
{
	valueToCheck = 5;
}

MidGameLevelAvailability : LevelAvailability
{
	valueToCheck = 20;
}

EndGameLevelAvailability : LevelAvailability
{
	valueToCheck = 30;
}

UncommonQuickhackSchematicsAvailability : ORPrereq
{
	nestedPrereqs = 
	[
		{
			statType = "Level";
			valueToCheck = 2;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq, 
		{
			minimumQuality = 2;
		} : RarityOfEquippedCyberdeckPrereq
	];
}

UncommonQuickhackAvailability : ORPrereq
{
	nestedPrereqs = 
	[
		{
			statType = "Level";
			valueToCheck = 7;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq, 
		{
			minimumQuality = 2;
		} : RarityOfEquippedCyberdeckPrereq
	];
}

RareQuickhackSchematicsAvailability : ORPrereq
{
	nestedPrereqs = 
	[
		{
			statType = "Level";
			valueToCheck = 12;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq, 
		{
			minimumQuality = 4;
		} : RarityOfEquippedCyberdeckPrereq
	];
}

RareQuickhackAvailability : ORPrereq
{
	nestedPrereqs = 
	[
		{
			statType = "Level";
			valueToCheck = 15;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq, 
		{
			minimumQuality = 4;
		} : RarityOfEquippedCyberdeckPrereq
	];
}

EpicQuickhackSchematicsAvailability : ORPrereq
{
	nestedPrereqs = 
	[
		{
			statType = "Level";
			valueToCheck = 20;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq, 
		{
			minimumQuality = 6;
		} : RarityOfEquippedCyberdeckPrereq
	];
}

EpicQuickhackAvailability : ORPrereq
{
	nestedPrereqs = 
	[
		{
			statType = "Level";
			valueToCheck = 23;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq, 
		{
			minimumQuality = 6;
		} : RarityOfEquippedCyberdeckPrereq
	];
}

LegendaryQuickhackSchematicsAvailability : ORPrereq
{
	nestedPrereqs = 
	[
		{
			statType = "Level";
			valueToCheck = 30;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq, 
		{
			minimumQuality = 8;
		} : RarityOfEquippedCyberdeckPrereq
	];
}

LegendaryQuickhackAvailability : ORPrereq
{
	nestedPrereqs = 
	[
		{
			statType = "Level";
			valueToCheck = 32;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq, 
		{
			minimumQuality = 8;
		} : RarityOfEquippedCyberdeckPrereq
	];
}

LegendaryPlusPlusQuickhackAvailability : ORPrereq
{
	nestedPrereqs = 
	[
		{
			statType = "Level";
			valueToCheck = 51;
			comparisonType = "GreaterOrEqual";
		} : StatPrereq, 
		{
			minimumQuality = 10;
		} : RarityOfEquippedCyberdeckPrereq
	];
}

