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

	<!-- Jellyfish Base -->
	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[@Name="pphhyy_LightlessEmpyrean_JellyfishBase"]</xpath>
		<value>
			<li Class="CombatExtended.RacePropertiesExtensionCE">
				<bodyShape>Humanoid</bodyShape>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[@Name="pphhyy_LightlessEmpyrean_JellyfishBase"]/statBases</xpath>
		<value>
			<MeleeCritChance>0.05</MeleeCritChance>
			<MeleeParryChance>0.02</MeleeParryChance>
			<MeleeDodgeChance>0.18</MeleeDodgeChance>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="pphhyy_LightlessEmpyrean_JellyfishBase"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>tentacle</label>
					<capacities>
						<li>ScratchToxic</li>
					</capacities>
					<power>4</power>
					<cooldownTime>1.26</cooldownTime>
					<linkedBodyPartsGroup>pphhyy_LightlessEmpyrean_TentacleAttackTool</linkedBodyPartsGroup>
					<armorPenetrationBlunt>0.450</armorPenetrationBlunt>
					<armorPenetrationSharp>0.25</armorPenetrationSharp>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>3</power>
					<cooldownTime>3.49</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<chanceFactor>0.2</chanceFactor>
					<armorPenetrationBlunt>0.625</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="pphhyy_LightlessEmpyrean_Sirius"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>tentacle</label>
					<capacities>
						<li>ScratchToxic</li>
					</capacities>
					<power>10</power>
					<cooldownTime>1.26</cooldownTime>
					<linkedBodyPartsGroup>pphhyy_LightlessEmpyrean_TentacleAttackTool</linkedBodyPartsGroup>
					<armorPenetrationBlunt>1.25</armorPenetrationBlunt>
					<armorPenetrationSharp>0.85</armorPenetrationSharp>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>8</power>
					<cooldownTime>3.49</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<chanceFactor>0.2</chanceFactor>
					<armorPenetrationBlunt>1.25</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="pphhyy_LightlessEmpyrean_Gaster"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>mandibles</label>
					<capacities>
						<li>Bite</li>
					</capacities>
					<power>11</power>
					<cooldownTime>1.5</cooldownTime>
					<linkedBodyPartsGroup>Mouth</linkedBodyPartsGroup>
					<armorPenetrationSharp>0.64</armorPenetrationSharp>
					<armorPenetrationBlunt>1.02</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>5</power>
					<cooldownTime>1.26</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<chanceFactor>0.2</chanceFactor>
					<armorPenetrationBlunt>1.250</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="pphhyy_LightlessEmpyrean_Gaster"]/statBases</xpath>
		<value>
			<MeleeDodgeChance>0.18</MeleeDodgeChance>
			<MeleeCritChance>0.05</MeleeCritChance>
			<MeleeParryChance>0.04</MeleeParryChance>
		</value>
	</Operation>

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

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

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

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

	<!-- Lemures -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="pphhyy_LightlessEmpyrean_Lemures"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>12.5</power>
					<cooldownTime>1.66</cooldownTime>
					<linkedBodyPartsGroup>LeftHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>6</armorPenetrationBlunt>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>14</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>12.5</power>
					<cooldownTime>1.66</cooldownTime>
					<linkedBodyPartsGroup>RightHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>6</armorPenetrationBlunt>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>14</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>teeth</label>
					<capacities>
						<li>Bite</li>
					</capacities>
					<power>10</power>
					<cooldownTime>2</cooldownTime>
					<linkedBodyPartsGroup>Teeth</linkedBodyPartsGroup>
					<soundMeleeHit>Pawn_Melee_HumanBite_Hit</soundMeleeHit>
					<soundMeleeMiss>Pawn_Melee_HumanBite_Miss</soundMeleeMiss>
					<armorPenetrationSharp>1.25</armorPenetrationSharp>
					<armorPenetrationBlunt>4.25</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>8</power>
					<cooldownTime>4.49</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<chanceFactor>0.2</chanceFactor>
					<armorPenetrationBlunt>4</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="pphhyy_LightlessEmpyrean_Lemures"]/statBases</xpath>
		<value>
			<MeleeDodgeChance>0.24</MeleeDodgeChance>
			<MeleeCritChance>0.09</MeleeCritChance>
			<MeleeParryChance>0.14</MeleeParryChance>
		</value>
	</Operation>

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

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

	<!-- Shades -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="pphhyy_LightlessEmpyrean_Shade"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>left fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>12.5</power>
					<cooldownTime>1.66</cooldownTime>
					<linkedBodyPartsGroup>LeftHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>6</armorPenetrationBlunt>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>14</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>right fist</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>12.5</power>
					<cooldownTime>1.66</cooldownTime>
					<linkedBodyPartsGroup>RightHand</linkedBodyPartsGroup>
					<armorPenetrationBlunt>6</armorPenetrationBlunt>
					<surpriseAttack>
						<extraMeleeDamages>
							<li>
								<def>Stun</def>
								<amount>14</amount>
							</li>
						</extraMeleeDamages>
					</surpriseAttack>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>teeth</label>
					<capacities>
						<li>Bite</li>
					</capacities>
					<power>10</power>
					<cooldownTime>2</cooldownTime>
					<linkedBodyPartsGroup>Teeth</linkedBodyPartsGroup>
					<soundMeleeHit>Pawn_Melee_HumanBite_Hit</soundMeleeHit>
					<soundMeleeMiss>Pawn_Melee_HumanBite_Miss</soundMeleeMiss>
					<armorPenetrationSharp>1.25</armorPenetrationSharp>
					<armorPenetrationBlunt>4.25</armorPenetrationBlunt>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>head</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>8</power>
					<cooldownTime>4.49</cooldownTime>
					<linkedBodyPartsGroup>HeadAttackTool</linkedBodyPartsGroup>
					<chanceFactor>0.2</chanceFactor>
					<armorPenetrationBlunt>4</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

</Patch>