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

	<!-- ========== Tagmaton =========== -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="BaseMechanoidTagma"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>16</ArmorRating_Sharp>
			<CarryWeight>60</CarryWeight>
			<CarryBulk>30</CarryBulk>
			<AimingAccuracy>1.3</AimingAccuracy>
			<ShootingAccuracyPawn>1.25</ShootingAccuracyPawn>
			<MeleeDodgeChance>0.15</MeleeDodgeChance>
			<MeleeCritChance>0.20</MeleeCritChance>
			<MeleeParryChance>0.50</MeleeParryChance>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="BaseMechanoidTagma"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>40</ArmorRating_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Mech_Tagmaton"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>7</power>
					<cooldownTime>1.11</cooldownTime>
					<linkedBodyPartsGroup>LeftHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>1.75</armorPenetrationBlunt>
					<chanceFactor>0.1</chanceFactor>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>7</power>
					<cooldownTime>1.11</cooldownTime>
					<linkedBodyPartsGroup>RightHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>1.75</armorPenetrationBlunt>
					<chanceFactor>0.1</chanceFactor>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>6</power>
					<cooldownTime>1.85</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<chanceFactor>0.1</chanceFactor>
					<armorPenetrationBlunt>0.7</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[@Name="BaseMechanoidTagma"]</xpath>
		<value>
			<comps>
				<li Class="CombatExtended.CompProperties_ArmorDurability">
					<Durability>1100</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.50</MinArmorPct>
				</li>
			</comps>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/PawnKindDef[defName="Mech_Tagmaton"]</xpath>
		<value>
			<li Class="CombatExtended.LoadoutPropertiesExtension">
				<primaryMagazineCount>
					<min>4</min>
					<max>6</max>
				</primaryMagazineCount>
			</li>
		</value>
	</Operation>

	<!-- ========== Skutaton =========== -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Mech_Skutaton"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>18</ArmorRating_Sharp>
			<MeleeDodgeChance>0.15</MeleeDodgeChance>
			<MeleeCritChance>0.40</MeleeCritChance>
			<MeleeParryChance>0.70</MeleeParryChance>
			<MeleeHitChance>6</MeleeHitChance>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Mech_Skutaton"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left hammer fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>19</power>
					<cooldownTime>1.50</cooldownTime>
					<linkedBodyPartsGroup>LeftHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>22</armorPenetrationBlunt>
					<chanceFactor>3</chanceFactor>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right hammer fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>19</power>
					<cooldownTime>1.50</cooldownTime>
					<linkedBodyPartsGroup>RightHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>22</armorPenetrationBlunt>
					<chanceFactor>3</chanceFactor>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>6</power>
					<cooldownTime>1.85</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<chanceFactor>0.1</chanceFactor>
					<armorPenetrationBlunt>0.7</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- ========== Omniservant =========== -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="RSMechanoid"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>2</ArmorRating_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="RSMechanoid"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>4</ArmorRating_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="RSMechanoid"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>4</power>
					<cooldownTime>1.11</cooldownTime>
					<linkedBodyPartsGroup>LeftHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>1.25</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>4</power>
					<cooldownTime>1.11</cooldownTime>
					<linkedBodyPartsGroup>RightHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>1.25</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>3</power>
					<cooldownTime>1.85</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<chanceFactor>0.1</chanceFactor>
					<armorPenetrationBlunt>0.5</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[@Name="RSMechanoid"]</xpath>
		<value>
			<comps>
				<li Class="CombatExtended.CompProperties_ArmorDurability">
					<Durability>860</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>
			</comps>
		</value>
	</Operation>

	<!-- ========== Borer =========== -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Mech_Borer"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>drill</label>
					<capacities>
						<li>Blunt</li>
						<li>Stab</li>
					</capacities>
					<power>12</power>
					<cooldownTime>2.5</cooldownTime>
					<armorPenetrationSharp>0.85</armorPenetrationSharp>
					<armorPenetrationBlunt>2.25</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- ========== Psiloid =========== -->

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

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

</Patch>