package Prereqs
using RTDB

FactValuePrereq : IPrereq
{
	prereqClassName = "FactValuePrereq";
	CName fact = "";
	int value = 0;
	CName comparisonType = "";
	bool repeated = false;
}

SampleStatPoolPrereq : StatPoolPrereq
{
	valueToCheck = [];
	statPoolType = "";
	comparisonType = "";
}

SampleStatPrereq : StatPrereq
{
	float valueToCheck = 0;
	CName statType = "";
	CName comparisonType = "";
}

SampleStatusEffectPrereq : StatusEffectPrereq
{
	fk< StatusEffect > statusEffect = "";
}

CharacterDataPrereq : IPrereq
{
	prereqClassName = "CharacterDataPrereq";
	string characterRecord = "";
}

StatusEffectAbsentPrereq : StatusEffectPrereq
{
	invert = true;
}

ICEBreakerAbsentActionPrereq : ObjectActionPrereq
{
	failureConditionPrereq = 
	[
		{
			statusEffect = "MinigameAction.ICEBrokenMinigameMinor";
		} : StatusEffectAbsentPrereq, 
		{
			statusEffect = "MinigameAction.ICEBrokenMinigameMedium";
		} : StatusEffectAbsentPrereq, 
		{
			statusEffect = "MinigameAction.ICEBrokenMinigameMajor";
		} : StatusEffectAbsentPrereq
	];
	failureExplanation = "LocKey#46578";
}

SampleStatusEffectRemovePrereq : StatusEffectPrereq
{
	fk< StatusEffect > statusEffect = "";
}

SampleHitTriggeredPrereq : IPrereq
{
	prereqClassName = "HitTriggeredPrereq";
	bool isSynchronous = false;
	string callbackType = "HitTriggered";
	string pipelineStage = "Process";
	string pipelineType = "Damage";
}

SampleTargetKilledPrereq : IPrereq
{
	prereqClassName = "TargetKilledPrereq";
}

SampleHitFlagPrereq : IPrereq
{
	prereqClassName = "HitFlagPrereq";
	bool isSynchronous = false;
	string callbackType = "HitTriggered";
	string pipelineStage = "PostProcess";
	string hitFlag = "";
}

SampleAmmoStatePrereq : IPrereq
{
	prereqClassName = "AmmoStateHitTriggeredPrereq";
	string ammoState = "";
	float ratioToCompare = 0.0f;
	string comparisonType = "";
}

SampleWeaponShootPrereq : IPrereq
{
	prereqClassName = "WeaponShootPrereq";
	int howManyShots = 0;
}

SampleWeaponFirstReloadStatePrereq : IPrereq
{
	prereqClassName = "WeaponFirstReloadStatePrereq";
}

SampleHitStatusEffectPresentPrereq : IPrereq
{
	prereqClassName = "HitStatusEffectPresentPrereq";
	string statusEffect = "Burning";
	fk< CheckType > checkType = "CheckType.Type";
}

HitIsMovingPrereq : IPrereq
{
	prereqClassName = "HitIsMovingPrereq";
	bool isMoving = true;
	string object = "";
}

HitAttackTypePrereq : IPrereq
{
	prereqClassName = "GenericHitPrereq";
	string pipelineStage = "PreProcess";
	string attackType = "Melee";
	bool isSynchronous = true;
	bool ignoreSelfInflictedPressureWave = true;
}

HitAttackSubtypePrereq : IPrereq
{
	prereqClassName = "HitAttackSubtypePrereq";
	string pipelineStage = "PreProcess";
	string attackSubtype = "";
	bool isSynchronous = true;
}

DismembermentTriggeredPrereq : IPrereq
{
	prereqClassName = "DismembermentTriggeredPrereq";
}

WoundedTriggeredPrereq : IPrereq
{
	prereqClassName = "WoundedTriggeredPrereq";
}

ColdBloodStatusPrereq : StatusEffectPrereq
{
	statusEffect = "BaseStatusEffect.ColdBlood";
}

ColdBloodWeaponPrereq : MultiPrereq
{
	nestedPrereqs = 
	[
		"Prereqs.ColdBloodStatusPrereq", "Prereqs.AnyWeaponHeldPrereq"
	];
}

ColdBloodRangedPrereq : MultiPrereq
{
	nestedPrereqs = 
	[
		"Prereqs.ColdBloodStatusPrereq", "Prereqs.RangedWeaponHeldPrereq"
	];
}

ColdBloodMeleePrereq : MultiPrereq
{
	nestedPrereqs = 
	[
		"Prereqs.ColdBloodStatusPrereq", "Prereqs.MeleeWeaponHeldPrereq"
	];
}

ColdBloodDoTReceived : MultiPrereq
{
	nestedPrereqs = 
	[
		"Prereqs.ColdBloodStatusPrereq", "Prereqs.HitAttackTypePrereq"
	];
}

ItemQualityPrereq : ItemCreationPrereq
{
	valueToCheck = 0;
	statType = "Quality";
	comparisonType = "GreaterOrEqual";
}

ItemIconicPrereq : ItemCreationPrereq
{
	valueToCheck = 0;
	statType = "IsItemIconic";
	comparisonType = "Greater";
}

ItemQualityEqualPrereq : ItemQualityPrereq
{
	comparisonType = "Equal";
}

ReflexesPrereq : StatPrereq
{
	valueToCheck = 0;
	statType = "Reflexes";
	comparisonType = "GreaterOrEqual";
}

BodyPrereq : StatPrereq
{
	valueToCheck = 0;
	statType = "Strength";
	comparisonType = "GreaterOrEqual";
}

IntelligencePrereq : StatPrereq
{
	valueToCheck = 0;
	statType = "Intelligence";
	comparisonType = "GreaterOrEqual";
}

CoolPrereq : StatPrereq
{
	valueToCheck = 0;
	statType = "Cool";
	comparisonType = "GreaterOrEqual";
}

TechnicalAbilityPrereq : StatPrereq
{
	valueToCheck = 0;
	statType = "TechnicalAbility";
	comparisonType = "GreaterOrEqual";
}

PuppetMortalPrereq : IPrereq
{
	prereqClassName = "PuppetMortalPrereq";
	bool invert = false;
}

ReflexesAllocationPrereq : StatPrereq
{
	valueToCheck = 0;
	statType = "ReflexesAvailable";
	comparisonType = "GreaterOrEqual";
}

BodyAllocationPrereq : StatPrereq
{
	valueToCheck = 0;
	statType = "StrengthAvailable";
	comparisonType = "GreaterOrEqual";
}

IntelligenceAllocationPrereq : StatPrereq
{
	valueToCheck = 0;
	statType = "IntelligenceAvailable";
	comparisonType = "GreaterOrEqual";
}

CoolAllocationPrereq : StatPrereq
{
	valueToCheck = 0;
	statType = "CoolAvailable";
	comparisonType = "GreaterOrEqual";
}

TechnicalAbilityAllocationPrereq : StatPrereq
{
	valueToCheck = 0;
	statType = "TechnicalAbilityAvailable";
	comparisonType = "GreaterOrEqual";
}

HumanityAllocationPrereq : StatPrereq
{
	valueToCheck = 0;
	statType = "HumanityAvailable";
	comparisonType = "GreaterOrEqual";
}

AnyTakedown : MultiPrereq
{
	aggregationType = "OR";
	nestedPrereqs = 
	[
		{
			stateName = "Lethal";
			isInState = true;
		} : Prereqs.BodyDisposalPSMPrereq, 
		{
			stateName = "NonLethal";
			isInState = true;
		} : Prereqs.BodyDisposalPSMPrereq, 
		{
			stateName = "Takedown";
			isInState = true;
		} : Prereqs.TakedownPSMPrereq
	];
}

AnyTakedownOrKill : AnyTakedown
{
	nestedPrereqs += 
	[
		{
			isSynchronous = false;
			conditions = 
			[
				{
					onlyOncePerShot = true;
				} : TargetKilledHitPrereqCondition, 
				{
					invert = true;
					statusEffect = "Defeated";
					checkType = "CheckType.Type";
				} : StatusEffectPresentHitPrereqCondition
			];
		} : PostProcessHitTriggered, 
		{
			conditions = 
			[
				{
					hitFlag = "FinisherTriggered";
				} : HitFlagHitPrereqCondition
			];
		} : PostProcessHitTriggered
	];
}

AnyNonCivilianTakedownOrKill : AnyTakedown
{
	nestedPrereqs += 
	[
		{
			isSynchronous = false;
			conditions = 
			[
				{
					onlyOncePerShot = true;
				} : TargetKilledHitPrereqCondition, 
				{
					invert = true;
					statusEffect = "Defeated";
					checkType = "CheckType.Type";
				} : StatusEffectPresentHitPrereqCondition, 
				{
					invert = true;
					reactionPreset = "Civilian";
				} : ReactionPresetHitPrereqCondition
			];
		} : PostProcessHitTriggered, 
		{
			conditions = 
			[
				{
					hitFlag = "FinisherTriggered";
				} : HitFlagHitPrereqCondition
			];
		} : PostProcessHitTriggered
	];
}

AnyTakedownOrKillOnBleedingTarget : AnyTakedown
{
	nestedPrereqs += 
	[
		{
			isSynchronous = false;
			conditions = 
			[
				{
					onlyOncePerShot = true;
				} : TargetKilledHitPrereqCondition, 
				{
					invert = true;
					statusEffect = "Defeated";
					checkType = "CheckType.Type";
				} : StatusEffectPresentHitPrereqCondition, 
				{
					statusEffect = "Bleeding";
					checkType = "CheckType.Type";
					objectToCheck = "Target";
				} : StatusEffectPresentHitPrereqCondition
			];
		} : PostProcessHitTriggered, 
		{
			conditions = 
			[
				{
					hitFlag = "FinisherTriggered";
				} : HitFlagHitPrereqCondition, 
				{
					statusEffect = "Bleeding";
					checkType = "CheckType.Type";
					objectToCheck = "Target";
				} : StatusEffectPresentHitPrereqCondition
			];
		} : PostProcessHitTriggered
	];
}

IsNewPerkBoughtPrereq : IPrereq
{
	CName prereqClassName = "IsNewPerkBoughtPrereq";
	int level = 0;
	bool intert = false;
	string perkType = "";
}

StatPoolChangeOverTimePrereq : IPrereq
{
	prereqClassName = "StatPoolChangeOverTimePrereq";
	CName statPoolType = "";
	float valueToCheck = 0.0f;
	float timeFrame = 0.0f;
	bool comparePercentage = true;
	bool checkGain = false;
}

HealthLostOverTimePrereq : StatPoolChangeOverTimePrereq
{
	statPoolType = "Health";
}

ChargedItemsPrereq : IPrereq
{
	CName prereqClassName = "ChargedItemsPrereq";
	string howManyCharges = "";
	string typeOfItem = "";
}

EntitiesWithStatusEffectPrereq : IPrereq
{
	prereqClassName = "gameEntitiesWithStatusEffectPrereq";
	fk< StatusEffect > statusEffect = "";
	fk< CheckType > checkType = "";
	CName tagToCheck = "";
	CName comparisonType = "";
	int count = 0;
	float range = 0.0f;
}

IsPlayerControlsDevicePrereq : IPrereq
{
	prereqClassName = "IsPlayerControlsDevicePrereq";
}

UsedHealingItemOrCyberwarePrereq : IPrereq
{
	prereqClassName = "UsedHealingItemOrCyberwarePrereq";
}

StartedUsingHealingItemOrCyberwarePrereq : IPrereq
{
	prereqClassName = "StartedUsingHealingItemOrCyberwarePrereq";
}

