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

	<!-- === Comps === -->

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ChjSpacerDroid"]/comps</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ChjSpacerDroid"]</xpath>
			<value>
				<comps/>
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ChjSpacerBattleDroid"]/comps</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ChjSpacerBattleDroid"]</xpath>
			<value>
				<comps/>
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ChjSpacerDroid" or defName="ChjSpacerBattleDroid"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>Humanoid</bodyShape>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ChjSpacerDroid" or defName="ChjSpacerBattleDroid"]/comps</xpath>
		<value>
			<li>
				<compClass>CombatExtended.CompPawnGizmo</compClass>
			</li>
		</value>
	</Operation>

	<!-- === Worker Droid === -->
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ChjSpacerDroid"]/statBases</xpath>
		<value>
			<MeleeDodgeChance>1</MeleeDodgeChance>
			<MeleeCritChance>1</MeleeCritChance>
			<MeleeParryChance>1</MeleeParryChance>
			<SmokeSensitivity>0</SmokeSensitivity>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ChjSpacerDroid"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>4</ArmorRating_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ChjSpacerDroid"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>6</ArmorRating_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ChjSpacerDroid"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>5</power>
					<cooldownTime>1.11</cooldownTime>
					<linkedBodyPartsGroup>LeftHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>1.688</armorPenetrationBlunt>
				</li>

				<li Class="CombatExtended.ToolCE">
					<label>right fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>5</power>
					<cooldownTime>1.11</cooldownTime>
					<linkedBodyPartsGroup>RightHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>1.688</armorPenetrationBlunt>
				</li>

				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>4.49</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<armorPenetrationBlunt>0.625</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- === Battle Droid === -->
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ChjSpacerBattleDroid"]/statBases</xpath>
		<value>
			<MeleeCritChance>1.4</MeleeCritChance>
			<MeleeParryChance>1.5</MeleeParryChance>
			<SmokeSensitivity>0</SmokeSensitivity>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ChjSpacerBattleDroid"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>16</ArmorRating_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ChjSpacerBattleDroid"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>36</ArmorRating_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ChjSpacerBattleDroid"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left razor-fist</label>
					<capacities>
						<li>Cut</li>
						<li>Stab</li>
						<li>Blunt</li>
					</capacities>
					<power>27</power>
					<cooldownTime>1.76</cooldownTime>
					<linkedBodyPartsGroup>LeftDroidHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>60</armorPenetrationBlunt>
					<armorPenetrationSharp>24</armorPenetrationSharp>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right razor-fist</label>
					<capacities>
						<li>Cut</li>
						<li>Stab</li>
						<li>Blunt</li>
					</capacities>
					<power>27</power>
					<cooldownTime>1.76</cooldownTime>
					<linkedBodyPartsGroup>RightDroidHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>60</armorPenetrationBlunt>
					<armorPenetrationSharp>24</armorPenetrationSharp>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>lower left razor-fist</label>
					<capacities>
						<li>Cut</li>
						<li>Stab</li>
						<li>Blunt</li>
					</capacities>
					<power>27</power>
					<cooldownTime>1.76</cooldownTime>
					<linkedBodyPartsGroup>LeftDroidHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>60</armorPenetrationBlunt>
					<armorPenetrationSharp>24</armorPenetrationSharp>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>lower right razor-fist</label>
					<capacities>
						<li>Cut</li>
						<li>Stab</li>
						<li>Blunt</li>
					</capacities>
					<power>27</power>
					<cooldownTime>1.76</cooldownTime>
					<linkedBodyPartsGroup>LowerRightDroidHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>60</armorPenetrationBlunt>
					<armorPenetrationSharp>24</armorPenetrationSharp>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>11</power>
					<chanceFactor>0.33</chanceFactor>
					<cooldownTime>2.52</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<armorPenetrationBlunt>4</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

</Patch>