<?xml version="1.0" encoding="utf-8"?>
<Patch>
	<!-- Antinium alien race (Ant_AntiniumRace) -->
	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Ant_AntiniumRace"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>Humanoid</bodyShape>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Ant_AntiniumRace"]/comps</xpath>
		<value>
			<li>
				<compClass>CombatExtended.CompPawnGizmo</compClass>
			</li>
			<li Class="CombatExtended.CompProperties_Suppressable"/>
		</value>
	</Operation>
	<!-- Stat bases  -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Ant_AntiniumRace"]/statBases/ShootingAccuracyPawn</xpath>
		<value>
			<AimingAccuracy>0.8</AimingAccuracy>
			<MeleeCritChance>1.17</MeleeCritChance>
			<MeleeParryChance>1.05</MeleeParryChance>
			<ReloadSpeed>1.5</ReloadSpeed><!-- Extra hands means extra speed when reloading -->
			<CarryWeight>60</CarryWeight><!-- Ants can lift more than they weight irl -->
			<Mass>72</Mass><!-- A human weighs 60 kg, but ants have chitin so mass is increased -->
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Ant_AntiniumRace"]/statBases/MeleeDodgeChance</xpath>
		<value>
			<MeleeDodgeChance>0.9</MeleeDodgeChance>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Ant_AntiniumRace"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>2.5</ArmorRating_Blunt>
		</value>
	</Operation>
	<!-- Unarmed attacks -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Ant_AntiniumRace"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>1.09</cooldownTime>
					<linkedBodyPartsGroup>LeftHand</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>14</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationBlunt>0.441</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>1.09</cooldownTime>
					<linkedBodyPartsGroup>RightHand</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>14</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationBlunt>0.441</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>lower left fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>1.09</cooldownTime>
					<linkedBodyPartsGroup>LowerLeftHand</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>14</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationBlunt>0.441</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>lower right fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>1.09</cooldownTime>
					<linkedBodyPartsGroup>LowerRightHand</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>14</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationBlunt>0.441</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>mandibles</label>
					<capacities>
						<li>Bite</li>
					</capacities>
					<power>14</power>
					<cooldownTime>1.95</cooldownTime>
					<linkedBodyPartsGroup>Ant_Mandibles</linkedBodyPartsGroup>
					<chanceFactor>0.1</chanceFactor>
					<armorPenetrationBlunt>1.533</armorPenetrationBlunt>
					<armorPenetrationSharp>0.01</armorPenetrationSharp>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>3</power>
					<cooldownTime>4.64</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
					<chanceFactor>0.2</chanceFactor>
					<armorPenetrationBlunt>0.766</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>
	<!-- Race stats -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Ant_AntiniumRace"]/race/baseHealthScale</xpath>
		<value>
			<baseHealthScale>1.2</baseHealthScale>
		</value>
	</Operation>
</Patch>