<?xml version="1.0" encoding="utf-8"?>
<Patch>
	<!-- ========== Shadark ========== -->
	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="Mutant_Shadark"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>Humanoid</bodyShape>
				<canParry>true</canParry>
				<maxParry>3</maxParry>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Mutant_Shadark"]/statBases</xpath>
		<value>
			<ArmorRating_Blunt>4</ArmorRating_Blunt>
			<ArmorRating_Sharp>0.35</ArmorRating_Sharp>
			<MeleeDodgeChance>0.5</MeleeDodgeChance>
			<MeleeCritChance>1</MeleeCritChance>
			<MeleeParryChance>1</MeleeParryChance>
			<SmokeSensitivity>0</SmokeSensitivity>
		</value>
	</Operation>

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/ThingDef[defName="Mutant_Shadark"]/comps</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/ThingDef[defName="Mutant_Shadark"]</xpath>
			<value>
				<comps />
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Mutant_Shadark"]/comps</xpath>
		<value>
			<li Class="CombatExtended.CompProperties_ArmorDurability">
				<Durability>650</Durability>
				<Regenerates>true</Regenerates>
				<RegenInterval>600</RegenInterval>
				<RegenValue>5</RegenValue>
				<MinArmorPct>0.25</MinArmorPct>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Mutant_Shadark"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left claw</label>
					<capacities>
						<li>Cut</li>
					</capacities>
					<power>6</power>
					<cooldownTime>0.8</cooldownTime>
					<linkedBodyPartsGroup>LeftHand</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>5</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationBlunt>0.45</armorPenetrationBlunt>
					<armorPenetrationSharp>0.09</armorPenetrationSharp>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right claw</label>
					<capacities>
						<li>Cut</li>
					</capacities>
					<power>6</power>
					<cooldownTime>0.8</cooldownTime>
					<linkedBodyPartsGroup>RightHand</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>5</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationBlunt>0.45</armorPenetrationBlunt>
					<armorPenetrationSharp>0.09</armorPenetrationSharp>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>5</power>
					<cooldownTime>4.49</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<chanceFactor>0.2</chanceFactor>
					<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
					<armorPenetrationBlunt>0.625</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

</Patch>