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

	<!-- ========== Base Dryad ========== -->

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[@Name="DryadBase"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>Quadruped</bodyShape>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[@Name="DryadBase"]/statBases</xpath>
		<value>
			<MeleeDodgeChance>0.25</MeleeDodgeChance>
			<MeleeCritChance>0.06</MeleeCritChance>
			<MeleeParryChance>0.04</MeleeParryChance>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="DryadBase"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left claw</label>
					<capacities>
						<li>Scratch</li>
					</capacities>
					<power>5</power>
					<cooldownTime>0.99</cooldownTime>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>10</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<linkedBodyPartsGroup>FrontLeftPaw</linkedBodyPartsGroup>
					<armorPenetrationBlunt>0.288</armorPenetrationBlunt>
					<armorPenetrationSharp>0.07</armorPenetrationSharp>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right claw</label>
					<capacities>
						<li>Scratch</li>
					</capacities>
					<power>5</power>
					<cooldownTime>0.99</cooldownTime>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>10</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<linkedBodyPartsGroup>FrontRightPaw</linkedBodyPartsGroup>
					<armorPenetrationBlunt>0.288</armorPenetrationBlunt>
					<armorPenetrationSharp>0.07</armorPenetrationSharp>
				</li>
				<li Class="CombatExtended.ToolCE">
					<capacities>
						<li>Bite</li>
					</capacities>
					<power>12</power>
					<cooldownTime>1.77</cooldownTime>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>10</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<linkedBodyPartsGroup>Teeth</linkedBodyPartsGroup>
					<armorPenetrationBlunt>2.880</armorPenetrationBlunt>
					<armorPenetrationSharp>0.15</armorPenetrationSharp>
					<chanceFactor>0.9</chanceFactor>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>1</power>
					<cooldownTime>1.19</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<armorPenetrationBlunt>0.2</armorPenetrationBlunt>
					<chanceFactor>0.2</chanceFactor>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- ========== Clawer ========== -->

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="Dryad_Clawer"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<canParry>true</canParry>
				<maxParry>2</maxParry>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Dryad_Clawer"]/statBases/MoveSpeed</xpath>
		<value>
			<MoveSpeed>6.4</MoveSpeed>
			<ArmorRating_Blunt>0.15</ArmorRating_Blunt>
			<ArmorRating_Sharp>0.12</ArmorRating_Sharp>
			<MeleeDodgeChance>0.5</MeleeDodgeChance>
			<MeleeCritChance>0.25</MeleeCritChance>
			<MeleeParryChance>0.30</MeleeParryChance>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Dryad_Clawer"]/tools</xpath>
		<value>
			<tools Inherit="False">
				<li Class="CombatExtended.ToolCE">
					<label>left claw</label>
					<capacities>
						<li>Scratch</li>
						<li>Cut</li>
					</capacities>
					<power>18</power>
					<cooldownTime>0.96</cooldownTime>
					<linkedBodyPartsGroup>FrontLeftPaw</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>20</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationBlunt>3.5</armorPenetrationBlunt>
					<armorPenetrationSharp>4</armorPenetrationSharp>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right claw</label>
					<capacities>
						<li>Scratch</li>
						<li>Cut</li>
					</capacities>
					<power>18</power>
					<cooldownTime>0.96</cooldownTime>
					<linkedBodyPartsGroup>FrontRightPaw</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>20</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationBlunt>3.5</armorPenetrationBlunt>
					<armorPenetrationSharp>4</armorPenetrationSharp>
				</li>
				<li Class="CombatExtended.ToolCE">
					<capacities>
						<li>Bite</li>
					</capacities>
					<power>28</power>
					<cooldownTime>1.56</cooldownTime>
					<linkedBodyPartsGroup>Teeth</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>20</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationSharp>6</armorPenetrationSharp>
					<armorPenetrationBlunt>9.163</armorPenetrationBlunt>
					<chanceFactor>0.3</chanceFactor>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>4</power>
					<cooldownTime>3.2</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<armorPenetrationBlunt>1.225</armorPenetrationBlunt>
					<chanceFactor>0.1</chanceFactor>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- ========== Barkskin ========== -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Dryad_Barkskin"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>10</ArmorRating_Sharp>
			<MeleeParryChance>0.2</MeleeParryChance>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Dryad_Barkskin"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>15</ArmorRating_Blunt>
		</value>
	</Operation>

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

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

</Patch>