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

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="AA_Dunealisk"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>QuadrupedLow</bodyShape>
			</li>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AA_Dunealisk"]/statBases</xpath>
		<value>
			<MeleeDodgeChance>0.13</MeleeDodgeChance>
			<MeleeCritChance>0.15</MeleeCritChance>
			<MeleeParryChance>0.2</MeleeParryChance>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AA_Dunealisk"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left first leg</label>
					<capacities>
						<li>Scratch</li>
					</capacities>
					<power>13</power>
					<cooldownTime>1.2</cooldownTime>
					<linkedBodyPartsGroup>LegAttackTool</linkedBodyPartsGroup>
					<armorPenetrationSharp>0.4</armorPenetrationSharp>
					<armorPenetrationBlunt>3</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right first leg</label>
					<capacities>
						<li>Scratch</li>
					</capacities>
					<power>13</power>
					<cooldownTime>1.2</cooldownTime>
					<linkedBodyPartsGroup>LegAttackTool</linkedBodyPartsGroup>
					<armorPenetrationSharp>0.4</armorPenetrationSharp>
					<armorPenetrationBlunt>3</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<capacities>
						<li>AA_ToxicSting</li>
					</capacities>
					<power>23</power>
					<cooldownTime>1.65</cooldownTime>
					<linkedBodyPartsGroup>Mouth</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>20</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationSharp>3</armorPenetrationSharp>
					<armorPenetrationBlunt>6</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>10</power>
					<cooldownTime>1.65</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<armorPenetrationBlunt>1</armorPenetrationBlunt>
					<chanceFactor>0.2</chanceFactor>
				</li>
			</tools>
		</value>
	</Operation>

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

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

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

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

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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AA_DunealiskClutchMother"]/statBases</xpath>
		<value>
			<MeleeDodgeChance>0.18</MeleeDodgeChance>
			<MeleeCritChance>0.5</MeleeCritChance>
			<MeleeParryChance>0.2</MeleeParryChance>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AA_DunealiskClutchMother"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left first leg</label>
					<capacities>
						<li>Scratch</li>
					</capacities>
					<power>22</power>
					<cooldownTime>1.25</cooldownTime>
					<linkedBodyPartsGroup>LegAttackTool</linkedBodyPartsGroup>
					<armorPenetrationSharp>1.5</armorPenetrationSharp>
					<armorPenetrationBlunt>5</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right first leg</label>
					<capacities>
						<li>Scratch</li>
					</capacities>
					<power>22</power>
					<cooldownTime>1.25</cooldownTime>
					<linkedBodyPartsGroup>LegAttackTool</linkedBodyPartsGroup>
					<armorPenetrationSharp>1.5</armorPenetrationSharp>
					<armorPenetrationBlunt>5</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<capacities>
						<li>AA_ToxicSting</li>
					</capacities>
					<power>40</power>
					<cooldownTime>1.85</cooldownTime>
					<linkedBodyPartsGroup>Mouth</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>20</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationSharp>6</armorPenetrationSharp>
					<armorPenetrationBlunt>10</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>15</power>
					<cooldownTime>1.65</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<armorPenetrationBlunt>3</armorPenetrationBlunt>
					<chanceFactor>0.5</chanceFactor>
				</li>
			</tools>
		</value>
	</Operation>

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

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

</Patch>