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

	<!-- ========== Advanced Tunneler ========== -->
	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="Mech_AdvancedTunneler"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>QuadrupedLow</bodyShape>
			</li>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Mech_AdvancedTunneler"]/statBases</xpath>
		<value>
			<ArmorRating_Heat>0.5</ArmorRating_Heat>
			<MeleeDodgeChance>0.06</MeleeDodgeChance>
			<MeleeCritChance>0.35</MeleeCritChance>
			<MeleeParryChance>0.72</MeleeParryChance>
			<MaxHitPoints>500</MaxHitPoints>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Mech_AdvancedTunneler"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left power claw</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>49</power>
					<cooldownTime>2.6</cooldownTime>
					<linkedBodyPartsGroup>LeftPowerClaw</linkedBodyPartsGroup>
					<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
					<armorPenetrationBlunt>26</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right power claw</label>
					<capacities>
						<li>Scratch</li>
					</capacities>
					<power>41</power>
					<cooldownTime>2.6</cooldownTime>
					<linkedBodyPartsGroup>RightPowerClaw</linkedBodyPartsGroup>
					<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
					<armorPenetrationSharp>5</armorPenetrationSharp>
					<armorPenetrationBlunt>16</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Mech_AdvancedTunneler"]/comps</xpath>
		<value>
			<li Class="CombatExtended.CompProperties_ArmorDurability">
				<Durability>3250</Durability>
				<Regenerates>true</Regenerates>
				<RegenInterval>1150</RegenInterval>
				<RegenValue>8</RegenValue>
				<Repairable>true</Repairable>
				<RepairIngredients>
					<Steel>5</Steel>
					<Plasteel>5</Plasteel>
				</RepairIngredients>
				<RepairTime>275</RepairTime>
				<RepairValue>200</RepairValue>
				<MinArmorPct>0.75</MinArmorPct>
			</li>
		</value>
	</Operation>

</Patch>