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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[@Name="BaseFleshbeast"]/statBases</xpath>
		<value>
			<SmokeSensitivity>0.5</SmokeSensitivity>
			<PainShockThreshold>0.99</PainShockThreshold>
		</value>
	</Operation>

	<!-- ========== Bulbfreak ========== -->
	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="Bulbfreak"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>Quadruped</bodyShape>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Bulbfreak"]/statBases</xpath>
		<value>
			<MeleeDodgeChance>0.05</MeleeDodgeChance>
			<MeleeCritChance>0.74</MeleeCritChance>
			<MeleeParryChance>0.57</MeleeParryChance>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Bulbfreak"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>tentacle</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>9</power>
					<cooldownTime>1.87</cooldownTime>
					<armorPenetrationBlunt>6.2</armorPenetrationBlunt>
					<alwaysTreatAsWeapon>true</alwaysTreatAsWeapon>
					<linkedBodyPartsGroup>FirstTentacle</linkedBodyPartsGroup>
					<soundMeleeHit>Pawn_Fleshbeast_Attack_Blunt</soundMeleeHit>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>tentacle</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>9</power>
					<cooldownTime>1.87</cooldownTime>
					<armorPenetrationBlunt>6.2</armorPenetrationBlunt>
					<alwaysTreatAsWeapon>true</alwaysTreatAsWeapon>
					<linkedBodyPartsGroup>SecondTentacle</linkedBodyPartsGroup>
					<soundMeleeHit>Pawn_Fleshbeast_Attack_Blunt</soundMeleeHit>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>tentacle</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>9</power>
					<cooldownTime>1.87</cooldownTime>
					<armorPenetrationBlunt>6.2</armorPenetrationBlunt>
					<alwaysTreatAsWeapon>true</alwaysTreatAsWeapon>
					<linkedBodyPartsGroup>ThirdTentacle</linkedBodyPartsGroup>
					<soundMeleeHit>Pawn_Fleshbeast_Attack_Blunt</soundMeleeHit>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>tentacle</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>9</power>
					<cooldownTime>1.87</cooldownTime>
					<armorPenetrationBlunt>6.2</armorPenetrationBlunt>
					<alwaysTreatAsWeapon>true</alwaysTreatAsWeapon>
					<linkedBodyPartsGroup>FourthTentacle</linkedBodyPartsGroup>
					<soundMeleeHit>Pawn_Fleshbeast_Attack_Blunt</soundMeleeHit>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>tentacle</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>9</power>
					<cooldownTime>1.87</cooldownTime>
					<armorPenetrationBlunt>6.2</armorPenetrationBlunt>
					<alwaysTreatAsWeapon>true</alwaysTreatAsWeapon>
					<linkedBodyPartsGroup>FifthTentacle</linkedBodyPartsGroup>
					<soundMeleeHit>Pawn_Fleshbeast_Attack_Blunt</soundMeleeHit>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>3</power>
					<cooldownTime>2</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<chanceFactor>0.2</chanceFactor>
					<armorPenetrationBlunt>1.175</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Toughspike"]/statBases</xpath>
		<value>
			<MeleeDodgeChance>0.11</MeleeDodgeChance>
			<MeleeCritChance>0.13</MeleeCritChance>
			<MeleeParryChance>0.1</MeleeParryChance>
			<AimingAccuracy>1.5</AimingAccuracy>
			<ShootingAccuracyPawn>1.25</ShootingAccuracyPawn>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Toughspike"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left spike</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>6.3</power>
					<cooldownTime>1.2</cooldownTime>
					<armorPenetrationBlunt>5</armorPenetrationBlunt>
					<armorPenetrationSharp>10</armorPenetrationSharp>
					<linkedBodyPartsGroup>LeftSpike</linkedBodyPartsGroup>
					<soundMeleeHit>Pawn_Fleshbeast_Attack_Spike</soundMeleeHit>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right spike</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>6.3</power>
					<cooldownTime>1.2</cooldownTime>
					<armorPenetrationBlunt>5</armorPenetrationBlunt>
					<armorPenetrationSharp>10</armorPenetrationSharp>
					<linkedBodyPartsGroup>RightSpike</linkedBodyPartsGroup>
					<soundMeleeHit>Pawn_Fleshbeast_Attack_Spike</soundMeleeHit>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>3</power>
					<cooldownTime>2</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<armorPenetrationBlunt>0.875</armorPenetrationBlunt>
					<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
					<chanceFactor>0.2</chanceFactor>
					<soundMeleeHit>Pawn_Fleshbeast_Attack_Blunt</soundMeleeHit>
				</li>
			</tools>
		</value>
	</Operation>

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

	<!-- ========== Trispike ========== -->
	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="Trispike"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>Quadruped</bodyShape>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Trispike"]/statBases</xpath>
		<value>
			<MeleeDodgeChance>0.14</MeleeDodgeChance>
			<MeleeCritChance>0.09</MeleeCritChance>
			<MeleeParryChance>0.08</MeleeParryChance>
			<AimingAccuracy>1.5</AimingAccuracy>
			<ShootingAccuracyPawn>1.25</ShootingAccuracyPawn>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Trispike"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>top spike</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>6.3</power>
					<cooldownTime>1.2</cooldownTime>
					<armorPenetrationBlunt>4</armorPenetrationBlunt>
					<armorPenetrationSharp>8</armorPenetrationSharp>
					<linkedBodyPartsGroup>MiddleSpike</linkedBodyPartsGroup>
					<soundMeleeHit>Pawn_Fleshbeast_Attack_Spike</soundMeleeHit>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>left spike</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>6.3</power>
					<cooldownTime>1.2</cooldownTime>
					<armorPenetrationBlunt>4</armorPenetrationBlunt>
					<armorPenetrationSharp>8</armorPenetrationSharp>
					<linkedBodyPartsGroup>LeftSpike</linkedBodyPartsGroup>
					<soundMeleeHit>Pawn_Fleshbeast_Attack_Spike</soundMeleeHit>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right spike</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>6.3</power>
					<cooldownTime>1.2</cooldownTime>
					<armorPenetrationBlunt>4</armorPenetrationBlunt>
					<armorPenetrationSharp>8</armorPenetrationSharp>
					<linkedBodyPartsGroup>RightSpike</linkedBodyPartsGroup>
					<soundMeleeHit>Pawn_Fleshbeast_Attack_Spike</soundMeleeHit>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>3</power>
					<cooldownTime>2</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<armorPenetrationBlunt>0.875</armorPenetrationBlunt>
					<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
					<chanceFactor>0.2</chanceFactor>
					<soundMeleeHit>Pawn_Fleshbeast_Attack_Blunt</soundMeleeHit>
				</li>
			</tools>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Fingerspike"]/statBases</xpath>
		<value>
			<MeleeDodgeChance>0.14</MeleeDodgeChance>
			<MeleeCritChance>0.06</MeleeCritChance>
			<MeleeParryChance>0.05</MeleeParryChance>
			<AimingAccuracy>1.5</AimingAccuracy>
			<ShootingAccuracyPawn>1.25</ShootingAccuracyPawn>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Fingerspike"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>spike</label>
					<labelNoLocation>spike</labelNoLocation>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>6.3</power>
					<cooldownTime>1.2</cooldownTime>
					<armorPenetrationBlunt>4</armorPenetrationBlunt>
					<armorPenetrationSharp>8</armorPenetrationSharp>
					<linkedBodyPartsGroup>MiddleSpike</linkedBodyPartsGroup>
					<soundMeleeHit>Pawn_Fleshbeast_Attack_Spike</soundMeleeHit>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>3</power>
					<cooldownTime>2</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<armorPenetrationBlunt>0.875</armorPenetrationBlunt>
					<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
					<chanceFactor>0.2</chanceFactor>
					<soundMeleeHit>Pawn_Fleshbeast_Attack_Blunt</soundMeleeHit>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- ========== Dreadmeld ========== -->
	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="Dreadmeld"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>Quadruped</bodyShape>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Dreadmeld"]/statBases</xpath>
		<value>
			<MeleeDodgeChance>0.02</MeleeDodgeChance>
			<MeleeCritChance>0.16</MeleeCritChance>
			<MeleeParryChance>0.64</MeleeParryChance>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Dreadmeld"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left spike</label>
					<labelNoLocation>spike</labelNoLocation>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>17.2</power>
					<cooldownTime>1.8</cooldownTime>
					<armorPenetrationBlunt>15</armorPenetrationBlunt>
					<armorPenetrationSharp>30</armorPenetrationSharp>
					<linkedBodyPartsGroup>LeftSpike</linkedBodyPartsGroup>
					<soundMeleeHit>Pawn_Dreadmeld_Attack_Spike</soundMeleeHit>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right spike</label>
					<labelNoLocation>spike</labelNoLocation>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>17.2</power>
					<cooldownTime>1.8</cooldownTime>
					<armorPenetrationBlunt>15</armorPenetrationBlunt>
					<armorPenetrationSharp>30</armorPenetrationSharp>
					<linkedBodyPartsGroup>RightSpike</linkedBodyPartsGroup>
					<soundMeleeHit>Pawn_Dreadmeld_Attack_Spike</soundMeleeHit>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>8</power>
					<cooldownTime>2</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<armorPenetrationBlunt>10</armorPenetrationBlunt>
					<ensureLinkedBodyPartsGroupAlwaysUsable>true</ensureLinkedBodyPartsGroupAlwaysUsable>
					<chanceFactor>0.2</chanceFactor>
					<soundMeleeHit>Pawn_Fleshbeast_Attack_Blunt</soundMeleeHit>
				</li>
			</tools>
		</value>
	</Operation>

</Patch>