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

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Alien_Mantis"]/statBases/MeleeDodgeChance</xpath>
		<value>
			<MeleeDodgeChance>1.05</MeleeDodgeChance>
			<MeleeCritChance>1.05</MeleeCritChance>
			<MeleeParryChance>1.05</MeleeParryChance>
			<Suppressability>1</Suppressability>
			<SmokeSensitivity>1</SmokeSensitivity>
			<ReloadSpeed>0.85</ReloadSpeed>
			<AimingAccuracy>0.9</AimingAccuracy>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Alien_Mantis"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>3</power>
					<cooldownTime>1.33</cooldownTime>
					<linkedBodyPartsGroup>LeftHand</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>14</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>					
					<armorPenetrationBlunt>0.175</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>3</power>
					<cooldownTime>1.33</cooldownTime>
					<linkedBodyPartsGroup>RightHand</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>14</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationBlunt>0.175</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>left claw</label>
					<capacities>
						<li>Cut</li>
					</capacities>
					<power>9</power>
					<cooldownTime>1.33</cooldownTime>
					<linkedBodyPartsGroup>LeftHandClawsGroup</linkedBodyPartsGroup>
					<armorPenetrationSharp>6.85</armorPenetrationSharp>
					<armorPenetrationBlunt>10.35</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right claw</label>
					<capacities>
						<li>Cut</li>
					</capacities>
					<power>9</power>
					<cooldownTime>1.33</cooldownTime>
					<linkedBodyPartsGroup>RightHandClawsGroup</linkedBodyPartsGroup>
					<armorPenetrationSharp>6.85</armorPenetrationSharp>
					<armorPenetrationBlunt>10.35</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>teeth</label>
					<capacities>
						<li>Bite</li>
					</capacities>
					<power>6</power>
					<cooldownTime>1.5</cooldownTime>
					<linkedBodyPartsGroup>Teeth</linkedBodyPartsGroup>
					<armorPenetrationSharp>0.24</armorPenetrationSharp>
					<armorPenetrationBlunt>0.5</armorPenetrationBlunt>
				</li>						
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2.8</power>
					<cooldownTime>4.49</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<chanceFactor>0.2</chanceFactor>
					<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>					
					<armorPenetrationBlunt>0.95</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Alien_Mantis"]/alienRace/raceRestriction</xpath>
		<value>
			<blackApparelList>
				<li>CE_Apparel_BallisticShield</li>
				<li>CE_Apparel_MeleeShield</li>
			</blackApparelList>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/AlienRace.ThingDef_AlienRace[defName="Alien_Mantis"]/comps</xpath>
		<value>
			<li>
				<compClass>CombatExtended.CompPawnGizmo</compClass>
			</li>
			<li Class="CombatExtended.CompProperties_ArmorDurability">
				<Durability>500</Durability> <!-- 250 * (body size + HP scale) -->
				<Regenerates>true</Regenerates>
				<RegenInterval>600</RegenInterval>
				<RegenValue>5</RegenValue>
				<MinArmorPct>0.5</MinArmorPct>
			</li>
			<li Class="CombatExtended.CompProperties_Suppressable" />
			<li>
				<compClass>CombatExtended.CompAmmoGiver</compClass>
			</li>
		</value>
	</Operation>

</Patch>