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

	<!-- === Flakhelm === -->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="BP_Flakhelm"]/statBases</xpath>
		<value>
			<Bulk>4</Bulk>
			<WornBulk>1</WornBulk>
		</value>
	</Operation>

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

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

	<!-- === Flakhelm - Gas Mask === -->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="BP_Flakghelm"]/statBases</xpath>
		<value>
			<Bulk>5</Bulk>
			<WornBulk>2</WornBulk>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="BP_Flakghelm"]</xpath>
		<value>
			<li Class="CombatExtended.ApparelHediffExtension">
				<hediff>WearingGasMask</hediff>
			</li>
			<li Class="CombatExtended.ApperalRenderingExtension">
				<HideHair>true</HideHair>
				<HideBeard>true</HideBeard>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="BP_Flakghelm"]/equippedStatOffsets</xpath>
		<value>
			<SmokeSensitivity>-1</SmokeSensitivity>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="BP_Flakghelm"] </xpath>
		<value>
			<li Class="CombatExtended.PartialArmorExt">
				<stats>
					<li>
						<ArmorRating_Sharp>0.20</ArmorRating_Sharp>
						<parts>
							<li>Eye</li>
							<li>Nose</li>
							<li>Jaw</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Blunt>0.20</ArmorRating_Blunt>
						<parts>
							<li>Eye</li>
							<li>Nose</li>
							<li>Jaw</li>
						</parts>
					</li>
				</stats>
			</li>
		</value>
	</Operation>

	<!-- === Grotesque Mask Helmets === -->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[
		defName="BP_SirdarMaskA" or
		defName="BP_SirdarMaskB" or
		defName="BP_DBmaskA" or
		defName="BP_DBmaskB"
		]/statBases</xpath>
		<value>
			<Bulk>5</Bulk>
			<WornBulk>1</WornBulk>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
		defName="BP_SirdarMaskA" or
		defName="BP_SirdarMaskB" or
		defName="BP_DBmaskA" or
		defName="BP_DBmaskB"
		]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>9</ArmorRating_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
		defName="BP_SirdarMaskA" or
		defName="BP_SirdarMaskB" or
		defName="BP_DBmaskA" or
		defName="BP_DBmaskB"
		]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>16</ArmorRating_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[
		defName="BP_SirdarMaskA" or
		defName="BP_SirdarMaskB" or
		defName="BP_DBmaskA" or
		defName="BP_DBmaskB"
		]</xpath>
		<value>
			<li Class="CombatExtended.PartialArmorExt">
				<stats>
					<li>
						<ArmorRating_Sharp>0.60</ArmorRating_Sharp>
						<parts>
							<li>Eye</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Blunt>0.60</ArmorRating_Blunt>
						<parts>
							<li>Eye</li>
						</parts>
					</li>
				</stats>
			</li>
		</value>
	</Operation>

	<!-- === Arnogaur Helmet === -->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="BP_Arnogaurmask"]/statBases</xpath>
		<value>
			<Bulk>5</Bulk>
			<WornBulk>1</WornBulk>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="BP_Arnogaurmask"]</xpath>
		<value>
			<li Class="CombatExtended.PartialArmorExt">
				<stats>
					<li>
						<ArmorRating_Sharp>0.80</ArmorRating_Sharp>
						<parts>
							<li>Eye</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Blunt>0.80</ArmorRating_Blunt>
						<parts>
							<li>Eye</li>
						</parts>
					</li>
				</stats>
			</li>
		</value>
	</Operation>

	<!-- === Khornate Helmet === -->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="BP_KhornemarineH"]/statBases</xpath>
		<value>
			<Bulk>10</Bulk>
			<WornBulk>5</WornBulk>
			<NightVisionEfficiency_Apparel>0.6</NightVisionEfficiency_Apparel>
		</value>
	</Operation>

	<Operation Class="PatchOperationConditional">
		<xpath>Defs/ThingDef[defName="BP_KhornemarineH"]/apparel/immuneToToxGasExposure</xpath>
		<nomatch Class="PatchOperationAdd">
			<xpath>Defs/ThingDef[defName="BP_KhornemarineH"]/apparel</xpath>
			<value>
				<immuneToToxGasExposure>true</immuneToToxGasExposure>
			</value>
		</nomatch>
	</Operation>

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="BP_KhornemarineH"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>30</ArmorRating_Blunt>
		</value>
	</Operation>
	
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="BP_KhornemarineH"]/statBases/Flammability</xpath>
		<value>
			<Flammability>0</Flammability>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="BP_KhornemarineH"]/equippedStatOffsets</xpath>
		<value>
			<SmokeSensitivity>-1</SmokeSensitivity>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="BP_KhornemarineH"]</xpath>
		<value>
			<li Class="CombatExtended.PartialArmorExt">
				<stats>
					<li>
						<ArmorRating_Sharp>0.80</ArmorRating_Sharp>
						<parts>
							<li>Eye</li>

						</parts>
					</li>
					<li>
						<ArmorRating_Blunt>0.80</ArmorRating_Blunt>
						<parts>
							<li>Eye</li>
						</parts>
					</li>
				</stats>
			</li>
		</value>
	</Operation>

</Patch>