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

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/PawnKindDef[defName="AA_MammothWorm"]/combatPower</xpath>
		<value>
			<combatPower>250</combatPower>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AA_MammothWorm"]/statBases/MoveSpeed</xpath>
		<value>
			<MoveSpeed>2.7</MoveSpeed>
			<MeleeDodgeChance>0.08</MeleeDodgeChance>
			<MeleeCritChance>0.8</MeleeCritChance>
			<MeleeParryChance>0.23</MeleeParryChance>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AA_MammothWorm"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>body</label>
					<capacities>
						<li>AA_SiegeBlunt</li>
					</capacities>
					<power>43</power>
					<cooldownTime>2.48</cooldownTime>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>21</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationBlunt>50</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<capacities>
						<li>AA_ExtraDamageMechanoidsTusk</li>
					</capacities>
					<power>48</power>
					<cooldownTime>2.68</cooldownTime>
					<linkedBodyPartsGroup>TuskAttackTool</linkedBodyPartsGroup>
					<armorPenetrationSharp>20</armorPenetrationSharp>
					<armorPenetrationBlunt>50</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AA_MammothWorm"]/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>