<?xml version="1.0" encoding="utf-8"?>
<Patch>
	
	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="DA_BlackScribe"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>QuadrupedLow</bodyShape>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="DA_BlackScribe"]</xpath>
		<value>
			<li Class="CombatExtended.PartialArmorExt">
				<stats>
					<li>
						<ArmorRating_Sharp>0.25</ArmorRating_Sharp>
						<parts>
							<li>InsectLeg</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Blunt>0.25</ArmorRating_Blunt>
						<parts>
							<li>InsectLeg</li>
						</parts>
					</li>
				</stats>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DA_BlackScribe"]/statBases</xpath>
		<value>
			<MeleeDodgeChance>0.07</MeleeDodgeChance>
			<MeleeCritChance>0.31</MeleeCritChance>
			<MeleeParryChance>0.17</MeleeParryChance>
		</value>
	</Operation>
	
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DA_BlackScribe"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>10</ArmorRating_Blunt>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DA_BlackScribe"]/tools</xpath>
		<value>
			<tools Inherit="False">
				<li Class="CombatExtended.ToolCE">
					<label>left pincer</label>
					<capacities>
						<li>Scratch</li>
					</capacities>
					<power>14</power>
					<cooldownTime>1.5</cooldownTime>
					<linkedBodyPartsGroup>DA_PincerPinch</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>8</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationSharp>1.75</armorPenetrationSharp>
					<armorPenetrationBlunt>14</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right pincer</label>
					<capacities>
						<li>Scratch</li>
					</capacities>
					<power>14</power>
					<cooldownTime>1.5</cooldownTime>
					<linkedBodyPartsGroup>DA_PincerPinch</linkedBodyPartsGroup>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>8</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
					<armorPenetrationSharp>1.8</armorPenetrationSharp>
					<armorPenetrationBlunt>14</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<capacities>
						<li>DA_Quillsting</li>
					</capacities>
					<power>22</power>
					<cooldownTime>2</cooldownTime>
					<linkedBodyPartsGroup>DA_Sting</linkedBodyPartsGroup>
					<armorPenetrationSharp>6</armorPenetrationSharp>
					<armorPenetrationBlunt>20</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>11</power>
					<cooldownTime>2</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<armorPenetrationBlunt>8</armorPenetrationBlunt>
					<chanceFactor>0.2</chanceFactor>
				</li>
			</tools>
		</value>
	</Operation>

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

</Patch>