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

	<!--Test for comps-->
	<Operation Class="PatchOperationConditional">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ATR_Tier1Android"]/comps</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ATR_Tier1Android"]</xpath>
			<value>
				<comps/>
			</value>
		</nomatch>
	</Operation>

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

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

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

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ATR_Tier1Android" or
			defName="ATR_Tier2Android" or
			defName="ATR_Tier3Android" or
			defName="ATR_Tier4Android"
			] </xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>Humanoid</bodyShape>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ATR_Tier1Android" or
			defName="ATR_Tier2Android" or
			defName="ATR_Tier3Android" or
			defName="ATR_Tier4Android"
			]/comps </xpath>
		<value>
			<li>
				<compClass>CombatExtended.CompPawnGizmo</compClass>
			</li>
			<li>
				<compClass>CombatExtended.CompAmmoGiver</compClass>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ATR_Tier2Android" or
			defName="ATR_Tier3Android" or
			defName="ATR_Tier4Android"
			]/comps </xpath>
		<value>
			<li Class="CombatExtended.CompProperties_Suppressable"/>
		</value>
	</Operation>

	<!--T1-->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ATR_Tier1Android"]/statBases</xpath>
		<value>
			<MeleeDodgeChance>0.5</MeleeDodgeChance>
			<MeleeCritChance>0.5</MeleeCritChance>
			<MeleeParryChance>0.5</MeleeParryChance>
			<SmokeSensitivity>0.5</SmokeSensitivity>
			<AimingAccuracy>0.75</AimingAccuracy>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ATR_Tier1Android"]/race/baseBodySize</xpath>
		<value>
			<baseBodySize>0.8</baseBodySize>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ATR_Tier1Android"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>1</power>
					<cooldownTime>2.14</cooldownTime>
					<linkedBodyPartsGroup>LeftHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>0.245</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>1</power>
					<cooldownTime>2.14</cooldownTime>
					<linkedBodyPartsGroup>RightHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>0.245</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>5.61</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<armorPenetrationBlunt>0.40</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<!--T2-->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ATR_Tier2Android"]/statBases</xpath>
		<value>
			<MeleeDodgeChance>0.8</MeleeDodgeChance>
			<MeleeCritChance>0.8</MeleeCritChance>
			<MeleeParryChance>0.8</MeleeParryChance>
			<Suppressability>0.15</Suppressability>
			<AimingAccuracy>0.9</AimingAccuracy>
			<SmokeSensitivity>0.25</SmokeSensitivity>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ATR_Tier2Android"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>1.67</cooldownTime>
					<linkedBodyPartsGroup>LeftHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>1.0</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>1.67</cooldownTime>
					<linkedBodyPartsGroup>RightHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>1.0</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>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ATR_Tier2Android"]/race/baseBodySize</xpath>
		<value>
			<baseBodySize>1</baseBodySize>
		</value>
	</Operation>

	<!--T3-->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ATR_Tier3Android"]/statBases</xpath>
		<value>
			<NightVisionEfficiency>0.25</NightVisionEfficiency>
			<MeleeDodgeChance>1</MeleeDodgeChance>
			<MeleeCritChance>1.1</MeleeCritChance>
			<MeleeParryChance>1.1</MeleeParryChance>
			<Suppressability>0.2</Suppressability>
			<SmokeSensitivity>0</SmokeSensitivity>
			<CarryWeight>45</CarryWeight>
			<CarryBulk>22.5</CarryBulk>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ATR_Tier3Android"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>5</power>
					<cooldownTime>1.45</cooldownTime>
					<linkedBodyPartsGroup>LeftHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>1.44</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>5</power>
					<cooldownTime>1.45</cooldownTime>
					<linkedBodyPartsGroup>RightHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>1.44</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>5</power>
					<cooldownTime>2.8</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<armorPenetrationBlunt>1.6</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<!--T4-->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ATR_Tier4Android"]/statBases</xpath>
		<value>
			<NightVisionEfficiency>0.4</NightVisionEfficiency>
			<AimingAccuracy>1.1</AimingAccuracy>
			<MeleeDodgeChance>1.2</MeleeDodgeChance>
			<MeleeCritChance>1.2</MeleeCritChance>
			<MeleeParryChance>1.2</MeleeParryChance>
			<Suppressability>0.33</Suppressability>
			<SmokeSensitivity>0</SmokeSensitivity>
			<CarryWeight>50</CarryWeight>
			<CarryBulk>25</CarryBulk>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="ATR_Tier4Android"]/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.68</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.68</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>6</power>
					<cooldownTime>2.49</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<armorPenetrationBlunt>2.025</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

</Patch>