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

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

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/ThingDef[@Name="KTDryadAnimalThingBase"]/comps</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/ThingDef[@Name="KTDryadAnimalThingBase"]</xpath>
			<value>
				<comps/>
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[@Name="KTDryadAnimalThingBase"]/comps</xpath>
		<value>
			<li>
				<compClass>CombatExtended.CompPawnGizmo</compClass>
			</li>
			<li Class="CombatExtended.CompProperties_Suppressable"/>
		</value>
	</Operation>

	<!-- Dryad -->

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Alien_Dryad" or defName="Alien_DryadWild"]/comps</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Alien_Dryad" or defName="Alien_DryadWild"]</xpath>
			<value>
				<comps/>
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Alien_Dryad" or defName="Alien_DryadWild"]/comps</xpath>
		<value>
			<li>
				<compClass>CombatExtended.CompPawnGizmo</compClass>
			</li>
			<li Class="CombatExtended.CompProperties_Suppressable"/>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Alien_Dryad" or defName="Alien_DryadWild"]/statBases/MeleeDodgeChance</xpath>
		<value>
			<NightVisionEfficiency>0.4</NightVisionEfficiency>
			<MeleeDodgeChance>1.1</MeleeDodgeChance>
			<MeleeCritChance>0.8</MeleeCritChance>
			<MeleeParryChance>0.85</MeleeParryChance>
			<CarryWeight>35</CarryWeight>
			<CarryBulk>20</CarryBulk>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Alien_Dryad" or defName="Alien_DryadWild"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>0.35</ArmorRating_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Alien_Dryad" or defName="Alien_DryadWild"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>1</ArmorRating_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Alien_Dryad" or defName="Alien_DryadWild"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left branch</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>1</power>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>5</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<cooldownTime>1.26</cooldownTime>
					<linkedBodyPartsGroup>DryadLeftBranchG</linkedBodyPartsGroup>
					<armorPenetrationBlunt>0.250</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right branch</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>1</power>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>5</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<cooldownTime>1.26</cooldownTime>
					<linkedBodyPartsGroup>DryadRightBranchG</linkedBodyPartsGroup>
					<armorPenetrationBlunt>0.250</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>4.49</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<chanceFactor>0.2</chanceFactor>
					<armorPenetrationBlunt>0.625</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>teeth</label>
					<capacities>
						<li>Bite</li>
					</capacities>
					<power>4</power>
					<cooldownTime>1.37</cooldownTime>
					<linkedBodyPartsGroup>Teeth</linkedBodyPartsGroup>
					<armorPenetrationSharp>0.02</armorPenetrationSharp>
					<armorPenetrationBlunt>0.923</armorPenetrationBlunt>
					<chanceFactor>0.2</chanceFactor>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- Willow Aspect -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DryadWillowAspect"]/statBases/MeleeDodgeChance</xpath>
		<value>
			<NightVisionEfficiency>0.4</NightVisionEfficiency>
			<MeleeDodgeChance>1.6</MeleeDodgeChance>
			<MeleeCritChance>0.75</MeleeCritChance>
			<MeleeParryChance>0.80</MeleeParryChance>
			<CarryWeight>35</CarryWeight>
			<CarryBulk>20</CarryBulk>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DryadWillowAspect"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>0.35</ArmorRating_Sharp>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DryadWillowAspect"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left branch</label>
					<capacities>
						<li>Scratch</li>
						<li>Blunt</li>
					</capacities>
					<power>5</power>
					<cooldownTime>1.15</cooldownTime>
					<linkedBodyPartsGroup>DryadLeftBranchG</linkedBodyPartsGroup>
					<armorPenetrationSharp>0.1</armorPenetrationSharp>
					<armorPenetrationBlunt>0.462</armorPenetrationBlunt>
					<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right branch</label>
					<capacities>
						<li>Scratch</li>
						<li>Blunt</li>
					</capacities>
					<power>5</power>
					<cooldownTime>1.15</cooldownTime>
					<linkedBodyPartsGroup>DryadRightBranchG</linkedBodyPartsGroup>
					<armorPenetrationSharp>0.1</armorPenetrationSharp>
					<armorPenetrationBlunt>0.462</armorPenetrationBlunt>
					<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- Oak Aspect -->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DryadOakAspect"]/statBases</xpath>
		<value>
			<NightVisionEfficiency>0.4</NightVisionEfficiency>
			<MeleeDodgeChance>0.8</MeleeDodgeChance>
			<MeleeCritChance>0.80</MeleeCritChance>
			<MeleeParryChance>0.85</MeleeParryChance>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DryadOakAspect"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>2.35</ArmorRating_Sharp>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DryadOakAspect"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left branch</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>10</power>
					<cooldownTime>1.85</cooldownTime>
					<linkedBodyPartsGroup>DryadLeftBranchG</linkedBodyPartsGroup>
					<armorPenetrationBlunt>3</armorPenetrationBlunt>
					<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right branch</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>10</power>
					<cooldownTime>1.85</cooldownTime>
					<linkedBodyPartsGroup>DryadRightBranchG</linkedBodyPartsGroup>
					<armorPenetrationBlunt>3</armorPenetrationBlunt>
					<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
				</li>
			</tools>
		</value>
	</Operation>

</Patch>