<?xml version="1.0" encoding="utf-8"?>
<Patch>

	<!-- === Replace conflicting apparel layer === -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/PawnKindDef[@Name="DankPyon_Cultist_HighPristBase"]/apparelRequired</xpath>
		<value>
			<apparelRequired Inherit="False">
				<li>DankPyon_Headgear_CultistHood</li>
				<li>Dankpyon_Apparel_Gambeson</li>
				<li>DankPyon_Apparel_Trousers</li>
				<li>DankPyon_Footwear_BootsLeather</li>
				<li>DankPyon_Handwear_GlovesLeather</li>
				<li>DankPyon_Apparel_Heavy_Hauberk</li>
				<li>DankPyon_Apparel_ChaussesPadded</li>
			</apparelRequired>
		</value>
	</Operation>

	<!-- === Give backpack to melee pawn with shield chance === -->
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/PawnKindDef[
			@Name="DankPyon_CultistAcolyteBase" or
			@Name="DankPyon_CultistAdeptBase" or
			@Name="DankPyon_Cultist_HighPristBase"
			]/apparelRequired</xpath>
		<value>
			<li>CE_Apparel_TribalBackpack</li>
		</value>
	</Operation>

	<!-- === Give Shields to Tier 2+ Melee === -->
	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/PawnKindDef[defName="DanyPyon_Cultist_Acolyte_Melee"]</xpath>
		<value>
			<li Class="CombatExtended.LoadoutPropertiesExtension">
				<shieldMoney>100~350</shieldMoney>
				<shieldTags>
					<li>DankPyon_Shield</li>
					<li>DankPyon_ShieldKite</li>
					<li>DankPyon_ShieldHeater</li>
				</shieldTags>
				<shieldChance>0.15</shieldChance>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/PawnKindDef[defName="DanyPyon_Cultist_Adept_Melee"]</xpath>
		<value>
			<li Class="CombatExtended.LoadoutPropertiesExtension">
				<shieldMoney>100~350</shieldMoney>
				<shieldTags>
					<li>DankPyon_Shield</li>
					<li>DankPyon_ShieldKite</li>
					<li>DankPyon_ShieldHeater</li>
				</shieldTags>
				<shieldChance>0.35</shieldChance>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/PawnKindDef[defName="DanyPyon_Cultist_HighPriest_Melee"]</xpath>
		<value>
			<li Class="CombatExtended.LoadoutPropertiesExtension">
				<shieldMoney>200~600</shieldMoney>
				<shieldTags>
					<li>DankPyon_ShieldKite</li>
					<li>DankPyon_ShieldHeater</li>
				</shieldTags>
				<shieldChance>0.65</shieldChance>
			</li>
		</value>
	</Operation>

	<!-- === Ranged Cultists === -->
	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/PawnKindDef[defName="DanyPyon_Cultist_Acolyte_Ranged"]</xpath>
		<value>
			<li Class="CombatExtended.LoadoutPropertiesExtension">
				<primaryMagazineCount>15~30</primaryMagazineCount>
				<forcedSidearm>
					<sidearmMoney>
						<min>50</min>
						<max>150</max>
					</sidearmMoney>
					<weaponTags>
						<li>NeolithicMeleeBasic</li>
						<li>MedievalMeleeDecent</li>
					</weaponTags>
				</forcedSidearm>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/PawnKindDef[defName="DanyPyon_Cultist_Adept_Ranged"]</xpath>
		<value>
			<li Class="CombatExtended.LoadoutPropertiesExtension">
				<primaryMagazineCount>12~20</primaryMagazineCount>
				<forcedSidearm>
					<sidearmMoney>
						<min>100</min>
						<max>200</max>
					</sidearmMoney>
					<weaponTags>
						<li>NeolithicMeleeBasic</li>
						<li>MedievalMeleeDecent</li>
					</weaponTags>
				</forcedSidearm>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/PawnKindDef[defName="DanyPyon_Cultist_HighPriest_Ranged"]</xpath>
		<value>
			<li Class="CombatExtended.LoadoutPropertiesExtension">
				<primaryMagazineCount>15~20</primaryMagazineCount>
				<forcedSidearm>
					<sidearmMoney>
						<min>100</min>
						<max>1200</max>
					</sidearmMoney>
					<weaponTags>
						<li>MedievalMeleeDecent</li>
					</weaponTags>
				</forcedSidearm>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/PawnKindDef[
			defName="DanyPyon_Cultist_Acolyte_Ranged" or
			defName="DanyPyon_Cultist_Adept_Ranged" or
			defName="DanyPyon_Cultist_HighPriest_Ranged"
			]</xpath>
		<value>
			<apparelRequired>
				<li>DankPyon_Apparel_Quiver</li>
			</apparelRequired>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/PawnKindDef[
			defName="DanyPyon_Cultist_Adept_Ranged" or defName="DanyPyon_Cultist_HighPriest_Ranged"
			]/weaponTags</xpath>
		<value>
			<li>CE_XBow</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/PawnKindDef[defName="DanyPyon_Cultist_Acolyte_Ranged"]/weaponTags</xpath>
		<value>
			<li>CE_Bow</li>
		</value>
	</Operation>

</Patch>