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

	<Operation Class="PatchOperationFindMod">
		<mods>
			<li>Vanilla Psycasts Expanded</li>
		</mods>

		<match Class="PatchOperationSequence">
			<operations>

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

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

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AA_BlackScarab_Temporary"]/statBases/ArmorRating_Blunt</xpath>
					<value>
						<ArmorRating_Blunt>2.85</ArmorRating_Blunt>
					</value>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AA_BlackScarab_Temporary"]/statBases/ArmorRating_Sharp</xpath>
					<value>
						<ArmorRating_Sharp>0.75</ArmorRating_Sharp>
					</value>
				</li>

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

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

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AA_BlackScarab_Temporary"]/tools</xpath>
					<value>
						<tools>
							<li Class="CombatExtended.ToolCE">
								<label>mandibles</label>
								<capacities>
									<li>Bite</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>
				</li>

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

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

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

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

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

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

				<li Class="PatchOperationAdd">
					<xpath>Defs/ThingDef[defName="AA_BlackSpelopede_Temporary"]/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>
				</li>

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

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AA_BlackSpelopede_Temporary"]/tools</xpath>
					<value>
						<tools>
							<li Class="CombatExtended.ToolCE">
								<label>head claw</label>
								<capacities>
									<li>Cut</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>
				</li>

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

				<li Class="PatchOperationAdd">
					<xpath>Defs/ThingDef[defName="AA_BlackSpelopede_Temporary"]/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>
				</li>

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

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

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

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

				<li Class="PatchOperationAdd">
					<xpath>Defs/ThingDef[defName="AA_BlackSpider_Temporary"]/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>
				</li>

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

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AA_BlackSpider_Temporary"]/tools</xpath>
					<value>
						<tools>
							<li Class="CombatExtended.ToolCE">
								<label>head claw</label>
								<capacities>
									<li>Cut</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>
				</li>

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

				<li Class="PatchOperationAdd">
					<xpath>Defs/ThingDef[defName="AA_BlackSpider_Temporary"]/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>
				</li>

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

				<li Class="PatchOperationReplace">
					<xpath>Defs/PawnKindDef[defName="AA_MammothWorm_Temporary"]/combatPower</xpath>
					<value>
						<combatPower>250</combatPower>
					</value>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AA_MammothWorm_Temporary"]/statBases/ArmorRating_Blunt</xpath>
					<value>
						<ArmorRating_Blunt>24</ArmorRating_Blunt>
					</value>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AA_MammothWorm_Temporary"]/statBases/ArmorRating_Sharp</xpath>
					<value>
						<ArmorRating_Sharp>10</ArmorRating_Sharp>
					</value>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AA_MammothWorm_Temporary"]/statBases/MoveSpeed</xpath>
					<value>
						<MoveSpeed>2.7</MoveSpeed>
						<MeleeDodgeChance>0.08</MeleeDodgeChance>
						<MeleeCritChance>0.8</MeleeCritChance>
						<MeleeParryChance>0.23</MeleeParryChance>
					</value>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AA_MammothWorm_Temporary"]/tools</xpath>
					<value>
						<tools>
							<li Class="CombatExtended.ToolCE">
								<label>body</label>
								<capacities>
									<li>AA_SiegeBlunt</li>
								</capacities>
								<power>43</power>
								<cooldownTime>2.48</cooldownTime>
								<surpriseAttack>
									<extraMeleeDamages>
										<li>
											<def>Stun</def>
											<amount>21</amount>
										</li>
									</extraMeleeDamages>
								</surpriseAttack>
								<armorPenetrationBlunt>50</armorPenetrationBlunt>
							</li>
							<li Class="CombatExtended.ToolCE">
								<capacities>
									<li>Stab</li>
								</capacities>
								<power>48</power>
								<cooldownTime>2.68</cooldownTime>
								<linkedBodyPartsGroup>TuskAttackTool</linkedBodyPartsGroup>
								<armorPenetrationSharp>20</armorPenetrationSharp>
								<armorPenetrationBlunt>50</armorPenetrationBlunt>
							</li>
						</tools>
					</value>
				</li>

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

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

			</operations>
		</match>
	</Operation>

</Patch>