package Prereqs
using RTDB, Perks

PRSRMod2_Prereq : IsTargetKilled
{
	conditions += 
	[
		{
			hitFlag = "Headshot";
			invert = false;
			onlyOncePerShot = true;
		} : HitFlagHitPrereqCondition, 
		{
			weaponType = "Ranged";
		} : WeaponTypeHitPrereqCondition, 
		{
			attackType = "QuickMelee";
			invert = true;
		} : AttackTypeHitPrereqCondition
	];
}

PRSRMod2_PopupPrereq : ANDPrereq
{
	nestedPrereqs = 
	[
		{
			fact = "PRSRMod2_Fact";
			value = 1;
			comparisonType = "GreaterOrEqual";
		} : FactValuePrereq
	];
}

ChimeraMeleeMod_Prereq : IsWeaponMelee
{
	conditions += 
	[
		{
			rarity = "Boss";
			invert = true;
		} : TargetNPCRarityHitPrereqCondition, 
		{
			rarity = "MaxTac";
			invert = true;
		} : TargetNPCRarityHitPrereqCondition, 
		{
			valueToCheck = 50f;
			objectToCheck = "Target";
			statPoolToCompare = "Health";
			comparisonType = "LessOrEqual";
		} : StatPoolHitPrereqCondition
	];
}

ChimeraSmartMod_Prereq : IsHitTargetAlive
{
	conditions += 
	[
		{
			attackType = "Ranged";
		} : AttackTypeHitPrereqCondition, 
		{
			weaponType = "Ranged";
		} : WeaponTypeHitPrereqCondition, 
		{
			valueToCheck = 1f;
			objectToCheck = "Target";
			statPoolToCompare = "QuickHackUpload";
			comparisonType = "Less";
		} : StatPoolHitPrereqCondition
	];
}

ChimeraSmartMod_Target_Is_RegularEnemy_Prereq : ChimeraSmartMod_Prereq
{
	conditions += 
	[
		{
			statusEffect = "MainBossSE";
			checkType = "CheckType.Record";
			invert = true;
		} : StatusEffectPresentHitPrereqCondition
	];
}

ChimeraSmartMod_Target_Is_MainBoss_Prereq : ChimeraSmartMod_Prereq
{
	conditions += 
	[
		{
			npcType = "Chimera";
			invert = true;
		} : TargetNPCTypeHitPrereqCondition, 
		{
			statusEffect = "MainBossSE";
			checkType = "CheckType.Record";
		} : StatusEffectPresentHitPrereqCondition
	];
}

ChimeraSmartMod_Target_Is_Chimera_Prereq : ChimeraSmartMod_Prereq
{
	conditions += 
	[
		{
			npcType = "Chimera";
		} : TargetNPCTypeHitPrereqCondition
	];
}

MetelKurtMod_Prereq : IsTargetKilled
{
	conditions += 
	[
		{
			rarity = "Boss";
			invert = true;
		} : TargetNPCRarityHitPrereqCondition, 
		{
			rarity = "MaxTac";
			invert = true;
		} : TargetNPCRarityHitPrereqCondition, 
		{
			weaponType = "Ranged";
		} : WeaponTypeHitPrereqCondition
	];
}

IsWeaponUsingStandardBullets : WeaponHeldByTagPrereq
{
	CName itemTag = "ExplosivePowerWeapon";
	inverted = true;
}

AirDropWeaponPrereq : WeaponHeldByTagPrereq
{
	CName itemTag = "AirDropWeapon";
}

ChimeraModInstalledPrereq : StatPrereq
{
	statType = "ChimeraModInstalled";
	valueToCheck = 1;
	comparisonType = "GreaterOrEqual";
}

KurtKnifeThrowPrereq : IsAttackThrownType
{
	isSynchronous = false;
	conditions += 
	[
		{
			checkType = "CheckType.Tag";
			tagToCheck = "Kurt_Knife_Cripple";
			invert = true;
		} : StatusEffectPresentHitPrereqCondition, 
		{
			invert = true;
		} : TargetKilledHitPrereqCondition, 
		{
			invert = true;
			rarity = "Boss";
		} : TargetNPCRarityHitPrereqCondition, 
		{
			invert = true;
			rarity = "MaxTac";
		} : TargetNPCRarityHitPrereqCondition, 
		{
			npcType = "Human";
			invert = false;
		} : TargetNPCTypeHitPrereqCondition
	];
}

