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

	<!-- ========== Forsaken Hood and Cloak ========== -->

	<!-- Note: Forsaken fabric apparel are only craftable from Synthread -->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AG_Forsaken_Hood" or defName="AG_Forsaken_Hood_Child"]/statBases</xpath>
		<value>
			<Bulk>1</Bulk>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
			defName="AG_Forsaken_Hood"or
			defName="AG_Forsaken_Hood_Child" or
			defName="AG_ForsakenCloak" or
			defName="AG_ForsakenCloak_Child"
			]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<!-- Equvalent to vanilla Synthread duster at normal quality -->
			<ArmorRating_Sharp>1.25</ArmorRating_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
			defName="AG_Forsaken_Hood"or
			defName="AG_Forsaken_Hood_Child" or
			defName="AG_ForsakenCloak" or
			defName="AG_ForsakenCloak_Child"
			]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<!-- Equvalent to vanilla Synthread duster at normal quality -->
			<ArmorRating_Blunt>0.35</ArmorRating_Blunt>
		</value>
	</Operation>

	<!-- ========== Forsaken Helmet ========== -->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AG_ForsakenMarineHelmet" or defName="AG_ForsakenMarineHelmetPsy"]/statBases</xpath>
		<value>
			<Bulk>6</Bulk>
			<WornBulk>1.5</WornBulk> <!-- No night vision stats as Forsakens already have night vision. -->
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AG_ForsakenMarineHelmet" or defName="AG_ForsakenMarineHelmetPsy"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>16</ArmorRating_Sharp> <!-- Equvalent to vanilla Power armor helmet at normal quality -->
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AG_ForsakenMarineHelmet" or defName="AG_ForsakenMarineHelmetPsy"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>36</ArmorRating_Blunt> <!-- Equvalent to vanilla Power armor helmet at normal quality -->
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AG_ForsakenMarineHelmet" or defName="AG_ForsakenMarineHelmetPsy"]/equippedStatOffsets</xpath>
		<value>
			<ToxicEnvironmentResistance>0.50</ToxicEnvironmentResistance>
			<SmokeSensitivity>-1</SmokeSensitivity>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AG_ForsakenMarineHelmet" or defName="AG_ForsakenMarineHelmetPsy"]/statBases</xpath>
		<value>
			<Flammability>0</Flammability>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AG_ForsakenMarineHelmet" or defName="AG_ForsakenMarineHelmetPsy"]/statBases/MaxHitPoints</xpath>
		<value>
			<MaxHitPoints>250</MaxHitPoints>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AG_ForsakenMarineHelmet" or defName="AG_ForsakenMarineHelmetPsy"]/apparel/layers</xpath>
		<value>
			<li>OnHead</li>
			<li>StrappedHead</li>
		</value>
	</Operation>

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

	<!-- ========== Forsaken Armor ========== -->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AG_ForsakenMarineArmor"]/statBases</xpath>
		<value>
			<Bulk>100</Bulk>
			<WornBulk>15</WornBulk>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AG_ForsakenMarineArmor"]/equippedStatOffsets</xpath>
		<value>
			<CarryBulk>20</CarryBulk>
			<CarryWeight>80</CarryWeight>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AG_ForsakenMarineArmor"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>20</ArmorRating_Sharp> <!-- Equvalent to vanilla Power armor at normal quality -->
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AG_ForsakenMarineArmor"]/statBases/ArmorRating_Blunt</xpath>
		<value>
			<ArmorRating_Blunt>45</ArmorRating_Blunt> <!-- Equvalent to vanilla Power armor at normal quality -->
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AG_ForsakenMarineArmor"]/statBases/Mass</xpath>
		<value>
			<Mass>40</Mass>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AG_ForsakenMarineArmor"]/apparel/bodyPartGroups</xpath>
		<value>
			<li>Hands</li>
			<li>Feet</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="AG_ForsakenMarineArmor"]</xpath>
		<value>
			<li Class="CombatExtended.PartialArmorExt">
				<stats>
					<li>
						<ArmorRating_Sharp>0.80</ArmorRating_Sharp>
						<parts>
							<li>Neck</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Blunt>0.80</ArmorRating_Blunt>
						<parts>
							<li>Neck</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Sharp>0.90</ArmorRating_Sharp>
						<parts>
							<li>Arm</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Blunt>0.90</ArmorRating_Blunt>
						<parts>
							<li>Arm</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Sharp>0.70</ArmorRating_Sharp>
						<parts>
							<li>Hand</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Blunt>0.70</ArmorRating_Blunt>
						<parts>
							<li>Hand</li>
						</parts>
					</li>
				</stats>
			</li>
		</value>
	</Operation>

</Patch>