package Perks
using RTDB, Prereqs, Effectors

KenjutsuProficiencyPrereq : StatPrereq
{
	float valueToCheck = 0;
	CName statType = "Reflexes";
	CName comparisonType = "GreaterOrEqual";
}

KenjutsuMasteryPrereq : StatPrereq
{
	float valueToCheck = 0;
	CName statType = "Kenjutsu";
	CName comparisonType = "GreaterOrEqual";
}

Kenjutsu_Area_01 : PerkArea
{
	enumName = "Kenjutsu_Area_01";
	requirement = 
	{
		valueToCheck = 0;
	} : KenjutsuProficiencyPrereq;
	masteryLevel = 
	{
		valueToCheck = 0;
	} : KenjutsuMasteryPrereq;
	perks = 
	[
		"Perks.Kenjutsu_Area_01_Perk_1", "Perks.Kenjutsu_Area_01_Perk_2"
	];
	maxLevel = 3;
}

Kenjutsu_Area_02 : PerkArea
{
	enumName = "Kenjutsu_Area_02";
	requirement = 
	{
		valueToCheck = 4;
	} : KenjutsuProficiencyPrereq;
	masteryLevel = 
	{
		valueToCheck = 0;
	} : KenjutsuMasteryPrereq;
	perks = 
	[
		"Perks.Kenjutsu_Area_02_Perk_1", "Perks.Kenjutsu_Area_02_Perk_2"
	];
	maxLevel = 2;
}

Kenjutsu_Area_03 : PerkArea
{
	enumName = "Kenjutsu_Area_03";
	requirement = 
	{
		valueToCheck = 6;
	} : KenjutsuProficiencyPrereq;
	masteryLevel = 
	{
		valueToCheck = 0;
	} : KenjutsuMasteryPrereq;
	perks = 
	[
		"Perks.Kenjutsu_Area_03_Perk_1", "Perks.Kenjutsu_Area_03_Perk_2"
	];
	maxLevel = 2;
}

Kenjutsu_Area_04 : PerkArea
{
	enumName = "Kenjutsu_Area_04";
	requirement = 
	{
		valueToCheck = 8;
	} : KenjutsuProficiencyPrereq;
	masteryLevel = 
	{
		valueToCheck = 0;
	} : KenjutsuMasteryPrereq;
	perks = 
	[
		"Perks.Kenjutsu_Area_04_Perk_1", "Perks.Kenjutsu_Area_04_Perk_2"
	];
	maxLevel = 3;
}

Kenjutsu_Area_05 : PerkArea
{
	enumName = "Kenjutsu_Area_05";
	requirement = 
	{
		valueToCheck = 10;
	} : KenjutsuProficiencyPrereq;
	masteryLevel = 
	{
		valueToCheck = 0;
	} : KenjutsuMasteryPrereq;
	perks = 
	[
		"Perks.Kenjutsu_Area_05_Perk_1", "Perks.Kenjutsu_Area_05_Perk_2"
	];
	maxLevel = 1;
}

Kenjutsu_Area_06 : PerkArea
{
	enumName = "Kenjutsu_Area_06";
	requirement = 
	{
		valueToCheck = 12;
	} : KenjutsuProficiencyPrereq;
	masteryLevel = 
	{
		valueToCheck = 0;
	} : KenjutsuMasteryPrereq;
	perks = 
	[
		"Perks.Kenjutsu_Area_06_Perk_1", "Perks.Kenjutsu_Area_06_Perk_2"
	];
	maxLevel = 2;
}

Kenjutsu_Area_07 : PerkArea
{
	enumName = "Kenjutsu_Area_07";
	requirement = 
	{
		valueToCheck = 15;
	} : KenjutsuProficiencyPrereq;
	masteryLevel = 
	{
		valueToCheck = 0;
	} : KenjutsuMasteryPrereq;
	perks = 
	[
		"Perks.Kenjutsu_Area_07_Perk_1", "Perks.Kenjutsu_Area_07_Perk_2"
	];
	maxLevel = 3;
}

Kenjutsu_Area_08 : PerkArea
{
	enumName = "Kenjutsu_Area_08";
	requirement = 
	{
		valueToCheck = 18;
	} : KenjutsuProficiencyPrereq;
	masteryLevel = 
	{
		valueToCheck = 0;
	} : KenjutsuMasteryPrereq;
	perks = 
	[
		"Perks.Kenjutsu_Area_08_Perk_1", "Perks.Kenjutsu_Area_08_Perk_2"
	];
	maxLevel = 1;
}

Kenjutsu_Area_01_Perk_1 : KenjutsuPerk
{
	loc_name_key = "LocKey#53973";
	loc_desc_key = "LocKey#53972";
	perkIcon = "UIIcon.Kenjutsu_Area_01_Perk_1";
	enumName = "Kenjutsu_Area_01_Perk_1";
	levels = [];
}

Kenjutsu_Area_01_Perk_2 : KenjutsuPerk
{
	loc_name_key = "LocKey#53975";
	loc_desc_key = "LocKey#53974";
	perkIcon = "UIIcon.Kenjutsu_Area_01_Perk_2";
	enumName = "Kenjutsu_Area_01_Perk_2";
	levels = [];
}

Kenjutsu_Area_02_Perk_1 : KenjutsuPerk
{
	loc_name_key = "LocKey#53977";
	loc_desc_key = "LocKey#53976";
	perkIcon = "UIIcon.Kenjutsu_Area_02_Perk_1";
	utility = "Perks.PassiveUtility";
	enumName = "Kenjutsu_Area_02_Perk_1";
	levels = [];
}

Kenjutsu_Area_02_Perk_1_Effector : AddStatusEffectToAttackEffector
{
}

Kenjutsu_Area_02_Perk_2 : KenjutsuPerk
{
	loc_name_key = "LocKey#53979";
	loc_desc_key = "LocKey#53978";
	perkIcon = "UIIcon.Kenjutsu_Area_02_Perk_2";
	enumName = "Kenjutsu_Area_02_Perk_2";
	levels = [];
}

Kenjutsu_Area_03_Perk_1 : KenjutsuPerk
{
	loc_name_key = "LocKey#53981";
	loc_desc_key = "LocKey#53980";
	perkIcon = "UIIcon.Kenjutsu_Area_03_Perk_1";
	enumName = "Kenjutsu_Area_03_Perk_1";
	levels = [];
}

Kenjutsu_Area_03_Perk_2 : KenjutsuPerk
{
	loc_name_key = "LocKey#53983";
	loc_desc_key = "LocKey#53982";
	perkIcon = "UIIcon.Kenjutsu_Area_03_Perk_2";
	utility = "Perks.PassiveUtility";
	enumName = "Kenjutsu_Area_03_Perk_2";
	levels = [];
}

Kenjutsu_Area_04_Perk_1 : KenjutsuPerk
{
	loc_name_key = "LocKey#53985";
	loc_desc_key = "LocKey#53984";
	perkIcon = "UIIcon.Kenjutsu_Area_04_Perk_1";
	enumName = "Kenjutsu_Area_04_Perk_1";
	levels = [];
}

Kenjutsu_Area_04_Perk_2 : KenjutsuPerk
{
	loc_name_key = "LocKey#53987";
	loc_desc_key = "LocKey#53986";
	perkIcon = "UIIcon.Kenjutsu_Area_04_Perk_2";
	enumName = "Kenjutsu_Area_04_Perk_2";
	levels = [];
}

Kenjutsu_Area_05_Perk_1 : KenjutsuPerk
{
	loc_name_key = "LocKey#53989";
	loc_desc_key = "LocKey#53988";
	perkIcon = "UIIcon.Kenjutsu_Area_05_Perk_1";
	enumName = "Kenjutsu_Area_05_Perk_1";
	levels = [];
}

Kenjutsu_Area_05_Perk_2 : KenjutsuPerk
{
	loc_name_key = "LocKey#53991";
	loc_desc_key = "LocKey#53990";
	perkIcon = "UIIcon.Kenjutsu_Area_05_Perk_2";
	enumName = "Kenjutsu_Area_05_Perk_2";
	levels = [];
}

Kenjutsu_Area_06_Perk_1 : KenjutsuPerk
{
	loc_name_key = "LocKey#53993";
	loc_desc_key = "LocKey#53992";
	perkIcon = "UIIcon.Kenjutsu_Area_06_Perk_1";
	utility = "Perks.TriggeredUtility";
	enumName = "Kenjutsu_Area_06_Perk_1";
	levels = [];
}

Kenjutsu_Area_06_Perk_2 : KenjutsuPerk
{
	loc_name_key = "LocKey#53995";
	loc_desc_key = "LocKey#53994";
	perkIcon = "UIIcon.Kenjutsu_Area_06_Perk_2";
	utility = "Perks.TriggeredUtility";
	enumName = "Kenjutsu_Area_06_Perk_2";
	levels = [];
}

Kenjutsu_Area_07_Perk_1 : KenjutsuPerk
{
	loc_name_key = "LocKey#53997";
	loc_desc_key = "LocKey#53996";
	perkIcon = "UIIcon.Kenjutsu_Area_07_Perk_1";
	enumName = "Kenjutsu_Area_07_Perk_1";
	levels = [];
}

Kenjutsu_Area_07_Perk_2 : KenjutsuPerk
{
	loc_name_key = "LocKey#53999";
	loc_desc_key = "LocKey#53998";
	perkIcon = "UIIcon.Kenjutsu_Area_07_Perk_2";
	enumName = "Kenjutsu_Area_07_Perk_2";
	levels = [];
}

Kenjutsu_Area_08_Perk_1 : KenjutsuPerk
{
	loc_name_key = "LocKey#54001";
	loc_desc_key = "LocKey#54000";
	perkIcon = "UIIcon.Kenjutsu_Area_08_Perk_1";
	enumName = "Kenjutsu_Area_08_Perk_1";
	levels = [];
}

Kenjutsu_Area_08_Perk_2 : KenjutsuPerk
{
	loc_name_key = "LocKey#54003";
	loc_desc_key = "LocKey#54002";
	perkIcon = "UIIcon.Kenjutsu_Area_08_Perk_2";
	utility = "Perks.TriggeredUtility";
	enumName = "Kenjutsu_Area_08_Perk_2";
	levels = [];
}

ProgressiveBladesPerkPrereq : Prereqs.ORPrereq
{
	fk< IPrereq >[] nestedPrereqs = 
	[
		{
			itemType = "ItemType.Wea_Katana";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Wea_Sword";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Cyb_MantisBlades";
		} : Prereqs.WeaponHeldByTypePrereq
	];
}

NonProgressiveBladesPerkPrereq : Prereqs.ORPrereq
{
	fk< IPrereq >[] nestedPrereqs = 
	[
		{
			itemType = "ItemType.Wea_LongBlade";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Wea_Axe";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Wea_Machete";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Wea_Chainsword";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Wea_ShortBlade";
		} : Prereqs.WeaponHeldByTypePrereq
	];
}

KatanaExcludedBladesPerkPrereq : Prereqs.ORPrereq
{
	fk< IPrereq >[] nestedPrereqs = 
	[
		{
			itemType = "ItemType.Cyb_MantisBlades";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Wea_LongBlade";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Wea_Axe";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Wea_Machete";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Wea_Chainsword";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Wea_ShortBlade";
		} : Prereqs.WeaponHeldByTypePrereq
	];
}

KenjutsuPerkPrereq : Prereqs.ORPrereq
{
	fk< IPrereq >[] nestedPrereqs = 
	[
		{
			itemType = "ItemType.Wea_Katana";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Wea_Sword";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Wea_LongBlade";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Wea_ShortBlade";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Cyb_MantisBlades";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Wea_Knife";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Cyb_NanoWires";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Wea_Axe";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Wea_Machete";
		} : Prereqs.WeaponHeldByTypePrereq, 
		{
			itemType = "ItemType.Wea_Chainsword";
		} : Prereqs.WeaponHeldByTypePrereq
	];
}

SaburoIconicsExcludedPrereq : ANDPrereq
{
	nestedPrereqs = 
	[
		{
			CName itemTag = "Saburo_Katana_Bleed";
			inverted = true;
		} : WeaponHeldByTagPrereq, 
		{
			CName itemTag = "Saburo_Tanto_Bleed";
			inverted = true;
		} : WeaponHeldByTagPrereq
	];
}

SaburoKatanaPrereq : WeaponHeldByTagPrereq
{
	CName itemTag = "Saburo_Katana_Bleed";
}

SaburoTantoPrereq : WeaponHeldByTagPrereq
{
	CName itemTag = "Saburo_Tanto_Bleed";
}

IsHitTargetBleedingAndAlive : PostProcessHitTriggered
{
	isSynchronous = false;
	conditions = 
	[
		{
			statusEffect = "Bleeding";
			checkType = "CheckType.Type";
		} : StatusEffectPresentHitPrereqCondition, 
		{
			statusEffect = "Defeated";
			checkType = "CheckType.Type";
			invert = true;
		} : StatusEffectPresentHitPrereqCondition, 
		{
			statusEffect = "Unconscious";
			checkType = "CheckType.Type";
			invert = true;
		} : StatusEffectPresentHitPrereqCondition
	];
}

