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

	<!-- ========== Cyclops ========== -->

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Mech_Cyclops"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>front left leg</label>
					<labelNoLocation>leg</labelNoLocation>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>13</power>
					<cooldownTime>2.67</cooldownTime>
					<linkedBodyPartsGroup>FrontLeftLeg</linkedBodyPartsGroup>
					<armorPenetrationBlunt>5</armorPenetrationBlunt>
					<alwaysTreatAsWeapon>true</alwaysTreatAsWeapon>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>front right leg</label>
					<labelNoLocation>leg</labelNoLocation>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>13</power>
					<cooldownTime>2.67</cooldownTime>
					<linkedBodyPartsGroup>FrontRightLeg</linkedBodyPartsGroup>
					<armorPenetrationBlunt>5</armorPenetrationBlunt>
					<alwaysTreatAsWeapon>true</alwaysTreatAsWeapon>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>15</power>
					<cooldownTime>3.51</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					 <ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
					<armorPenetrationBlunt>12</armorPenetrationBlunt>
					<alwaysTreatAsWeapon>true</alwaysTreatAsWeapon>
					<chanceFactor>0.2</chanceFactor>
				</li>
			</tools>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Mech_Cyclops"]/comps</xpath>
		<value>
			<li Class="CombatExtended.CompProperties_ArmorDurability">
				<Durability>1000</Durability>
				<Regenerates>true</Regenerates>
				<RegenInterval>1250</RegenInterval>
				<RegenValue>5</RegenValue>
				<Repairable>true</Repairable>
				<RepairIngredients>
					<Steel>5</Steel>
					<Plasteel>5</Plasteel>
				</RepairIngredients>
				<RepairTime>300</RepairTime>
				<RepairValue>200</RepairValue>
				<MinArmorPct>0.5</MinArmorPct>
			</li>
		</value>
	</Operation>

</Patch>