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

	<!-- ==================== Devourer ==================== -->

	<!-- ========== Add groups entry if it doesn't exist already ========== -->

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/BodyDef[defName="Devourer"]/corePart/groups</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/BodyDef[defName="Devourer"]/corePart</xpath>
			<value>
				<groups />
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/BodyDef[defName="Devourer"]/corePart/parts/li[def="Neck"]/groups</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/BodyDef[defName="Devourer"]/corePart/parts/li[def="Neck"]</xpath>
			<value>
				<groups />
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/BodyDef[defName="Devourer"]/corePart/parts/li[def="Fin"]/groups</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/BodyDef[defName="Devourer"]/corePart/parts/li[def="Fin"]</xpath>
			<value>
				<groups />
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/BodyDef[defName="Devourer"]/corePart/parts/li[def="Neck"]/parts/li[def="Head"]/groups</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/BodyDef[defName="Devourer"]/corePart/parts/li[def="Neck"]/parts/li[def="Head"]</xpath>
			<value>
				<groups />
			</value>
		</nomatch>
	</Operation>

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/BodyDef[defName="Devourer"]/corePart/parts/li[def="Neck"]/parts/li[def="Head"]/parts/li[def="Ear"]/groups</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/BodyDef[defName="Devourer"]/corePart/parts/li[def="Neck"]/parts/li[def="Head"]/parts/li[def="Ear"]</xpath>
			<value>
				<groups />
			</value>
		</nomatch>
	</Operation>

	<!-- ========== Add armor coverage ========== -->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/BodyDef[defName="Devourer"]/corePart/groups</xpath>
		<value>
			<li>CoveredByNaturalArmor</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/BodyDef[defName="Devourer"]/corePart/parts/li[def="Neck"]/groups</xpath>
		<value>
			<li>CoveredByNaturalArmor</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/BodyDef[defName="Devourer"]/corePart/parts/li[def="Fin"]/groups</xpath>
		<value>
			<li>CoveredByNaturalArmor</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/BodyDef[defName="Devourer"]/corePart/parts/li[def="Neck"]/parts/li[def="Head"]/groups</xpath>
		<value>
			<li>CoveredByNaturalArmor</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/BodyDef[defName="Devourer"]/corePart/parts/li[def="Neck"]/parts/li[def="Head"]/parts/li[def="Ear"]/groups</xpath>
		<value>
			<li>CoveredByNaturalArmor</li>
		</value>
	</Operation>

</Patch>