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

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="AA_BlackScarab"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>QuadrupedLow</bodyShape>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/PawnKindDef[defName="AA_BlackScarab"]/combatPower</xpath>
		<value>
			<combatPower>60</combatPower>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AA_BlackScarab"]/statBases/MoveSpeed</xpath>
		<value>
			<MoveSpeed>4.9</MoveSpeed>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AA_BlackScarab"]/statBases</xpath>
		<value>
			<MeleeDodgeChance>0.15</MeleeDodgeChance>
			<MeleeCritChance>0.01</MeleeCritChance>
			<MeleeParryChance>0</MeleeParryChance>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AA_BlackScarab"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>mandibles</label>
					<capacities>
						<li>AA_ExtraDamageMechanoidsBite</li>
					</capacities>
					<power>9</power>
					<cooldownTime>1.33</cooldownTime>
					<linkedBodyPartsGroup>Mouth</linkedBodyPartsGroup>
					<armorPenetrationSharp>0.5</armorPenetrationSharp>
					<armorPenetrationBlunt>1.5</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>1</power>
					<cooldownTime>1.26</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
					<armorPenetrationBlunt>0.25</armorPenetrationBlunt>
					<chanceFactor>0.1</chanceFactor>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/ThingDef[defName="AA_BlackScarab"]/comps</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/ThingDef[defName="AA_BlackScarab"]</xpath>
			<value>
				<comps />
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AA_BlackScarab"]/comps</xpath>
		<value>
			<li Class="CombatExtended.CompProperties_ArmorDurability">
				<Durability>150</Durability>
				<Regenerates>true</Regenerates>
				<RegenInterval>600</RegenInterval>
				<RegenValue>5</RegenValue>
				<MinArmorPct>0.25</MinArmorPct>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="AA_BlackSpelopede"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>QuadrupedLow</bodyShape>
			</li>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AA_BlackSpelopede"]/statBases/MoveSpeed</xpath>
		<value>
			<MoveSpeed>4.7</MoveSpeed>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AA_BlackSpelopede"]/statBases</xpath>
		<value>
			<AimingAccuracy>0.75</AimingAccuracy>
			<ShootingAccuracyPawn>0.75</ShootingAccuracyPawn>
			<MeleeDodgeChance>0.08</MeleeDodgeChance>
			<MeleeCritChance>0.18</MeleeCritChance>
			<MeleeParryChance>0.15</MeleeParryChance>
			<Suppressability>0.25</Suppressability>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/PawnKindDef[defName="AA_BlackSpelopede"]/combatPower</xpath>
		<value>
			<combatPower>100</combatPower>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AA_BlackSpelopede"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>head claw</label>
					<capacities>
						<li>AA_ExtraDamageMechanoidsClaws</li>
					</capacities>
					<power>22</power>
					<cooldownTime>1.68</cooldownTime>
					<linkedBodyPartsGroup>HeadClaw</linkedBodyPartsGroup>
					<armorPenetrationSharp>0.75</armorPenetrationSharp>
					<armorPenetrationBlunt>3.75</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head claw</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>15</power>
					<cooldownTime>1.48</cooldownTime>
					<linkedBodyPartsGroup>HeadClaw</linkedBodyPartsGroup>
					<armorPenetrationSharp>6</armorPenetrationSharp>
					<armorPenetrationBlunt>3</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>1.5</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
					<armorPenetrationBlunt>0.5</armorPenetrationBlunt>
					<chanceFactor>0.2</chanceFactor>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/ThingDef[defName="AA_BlackSpelopede"]/comps</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/ThingDef[defName="AA_BlackSpelopede"]</xpath>
			<value>
				<comps />
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AA_BlackSpelopede"]/comps</xpath>
		<value>
			<li Class="CombatExtended.CompProperties_ArmorDurability">
				<Durability>625</Durability>
				<Regenerates>true</Regenerates>
				<RegenInterval>600</RegenInterval>
				<RegenValue>5</RegenValue>
				<MinArmorPct>0.25</MinArmorPct>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="AA_BlackSpider"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>Quadruped</bodyShape>
				<canParry>true</canParry>
				<maxParry>3</maxParry>
			</li>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AA_BlackSpider"]/statBases/MoveSpeed</xpath>
		<value>
			<MoveSpeed>4.6</MoveSpeed>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AA_BlackSpider"]/statBases</xpath>
		<value>
			<AimingAccuracy>0.65</AimingAccuracy>
			<ShootingAccuracyPawn>0.65</ShootingAccuracyPawn>
			<MeleeDodgeChance>0.09</MeleeDodgeChance>
			<MeleeCritChance>0.45</MeleeCritChance>
			<MeleeParryChance>0.25</MeleeParryChance>
			<Suppressability>0.2</Suppressability>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/PawnKindDef[defName="AA_BlackSpider"]/combatPower</xpath>
		<value>
			<combatPower>200</combatPower>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AA_BlackSpider"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>head claw</label>
					<capacities>
						<li>AA_ExtraDamageMechanoidsClaws</li>
					</capacities>
					<power>44</power>
					<cooldownTime>2.0</cooldownTime>
					<linkedBodyPartsGroup>HeadClaw</linkedBodyPartsGroup>
					<armorPenetrationSharp>2.0</armorPenetrationSharp>
					<armorPenetrationBlunt>10</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head claw</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>26</power>
					<cooldownTime>1.33</cooldownTime>
					<linkedBodyPartsGroup>HeadClaw</linkedBodyPartsGroup>
					<armorPenetrationSharp>44</armorPenetrationSharp>
					<armorPenetrationBlunt>22</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>25</power>
					<cooldownTime>1.33</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
					<armorPenetrationBlunt>8.5</armorPenetrationBlunt>
					<chanceFactor>0.2</chanceFactor>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/ThingDef[defName="AA_BlackSpider"]/comps</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/ThingDef[defName="AA_BlackSpider"]</xpath>
			<value>
				<comps />
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AA_BlackSpider"]/comps</xpath>
		<value>
			<li Class="CombatExtended.CompProperties_ArmorDurability">
				<Durability>925</Durability>
				<Regenerates>true</Regenerates>
				<RegenInterval>600</RegenInterval>
				<RegenValue>5</RegenValue>
				<MinArmorPct>0.25</MinArmorPct>
			</li>
		</value>
	</Operation>

</Patch>