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

	<!--========= Vest =========-->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Kijin_FlakVest"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<Bulk>5</Bulk>
			<WornBulk>3</WornBulk>
			<StuffEffectMultiplierArmor>3</StuffEffectMultiplierArmor>
			<ArmorRating_Sharp>6</ArmorRating_Sharp>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Kijin_FlakVest"]/costStuffCount</xpath>
		<value>
			<costStuffCount>50</costStuffCount>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Kijin_FlakVest"]/costList/Steel</xpath>
		<value>
			<Steel>70</Steel>
		</value>
	</Operation>

	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="Kijin_FlakVest"]</xpath>
		<value>
			<li Class="CombatExtended.PartialArmorExt">
				<stats>
					<li>
						<ArmorRating_Sharp>0.60</ArmorRating_Sharp>
						<parts>
							<li>Neck</li>
							<li>Shoulder</li>
						</parts>
					</li>
					<li>
						<ArmorRating_Blunt>0.60</ArmorRating_Blunt>
						<parts>
							<li>Neck</li>
							<li>Shoulder</li>
						</parts>
					</li>
				</stats>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="Kijin_FlakVest"]/equippedStatOffsets/MoveSpeed</xpath>
	</Operation>

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="Kijin_FlakVest"]/statBases/ArmorRating_Heat</xpath>
	</Operation>

	<!--========= Inferno Armor =========-->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Kijin_EpicArmor"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<Bulk>120</Bulk>
			<WornBulk>15</WornBulk>
			<ArmorRating_Sharp>14</ArmorRating_Sharp>
		</value>
	</Operation>

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

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

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

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Kijin_EpicHelm"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<Bulk>10</Bulk>
			<WornBulk>3</WornBulk>
			<ArmorRating_Sharp>12</ArmorRating_Sharp>
		</value>
	</Operation>

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

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

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

	<!--========= Dark Power Armor =========-->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_PowerArmorDK"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<Bulk>100</Bulk>
			<WornBulk>15</WornBulk>
			<ArmorRating_Sharp>20</ArmorRating_Sharp>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_PowerArmorDK"]/statBases/MaxHitPoints</xpath>
		<value>
			<MaxHitPoints>500</MaxHitPoints>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Apparel_PowerArmorDK"]/costList</xpath>
		<value>
			<DevilstrandCloth>50</DevilstrandCloth>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Apparel_PowerArmorDK"]/equippedStatOffsets</xpath>
		<value>
			<CarryWeight>80</CarryWeight>
			<CarryBulk>10</CarryBulk>
			<ShootingAccuracyPawn>0.15</ShootingAccuracyPawn>
			<ToxicEnvironmentResistance>0.50</ToxicEnvironmentResistance>
		</value>
	</Operation>

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="Apparel_PowerArmorDK"]/equippedStatOffsets/MoveSpeed</xpath>
	</Operation>

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

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_PowerArmorHelmetDK"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<Bulk>5</Bulk>
			<WornBulk>1</WornBulk>
			<ArmorRating_Sharp>16</ArmorRating_Sharp>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_PowerArmorHelmetDK"]/statBases/MaxHitPoints</xpath>
		<value>
			<MaxHitPoints>240</MaxHitPoints>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Apparel_PowerArmorHelmetDK"]/costList/Plasteel</xpath>
		<value>
			<Plasteel>45</Plasteel>
			<DevilstrandCloth>20</DevilstrandCloth>
		</value>
	</Operation>

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

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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Apparel_PowerArmorHelmetDK"]</xpath>
		<value>
			<equippedStatOffsets>
				<AimingAccuracy>0.15</AimingAccuracy>
				<ToxicEnvironmentResistance>0.50</ToxicEnvironmentResistance>
				<SmokeSensitivity>-1</SmokeSensitivity>
			</equippedStatOffsets>
		</value>
	</Operation>

	<!-- Add bulk and token armor values to prevent errors -->
	<Operation Class="PatchOperationAdd">
	<xpath>Defs/ThingDef[defName="Kijin_FirewardCharm" or defName="Kijin_SmokeBombBelt"]/statBases</xpath>
		<value>
			<Bulk>1</Bulk>
			<WornBulk>1</WornBulk>
			<ArmorRating_Sharp>0.01</ArmorRating_Sharp>
			<ArmorRating_Blunt>0.01</ArmorRating_Blunt>
		</value>
	</Operation>

</Patch>