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

	<!-- === Stuff Category === -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
			defName="TSFApparel_NinjaMask" or
			defName="TSFApparel_AshigaruArmor" or
			defName="TSFApparel_AshigaruHelmet" or
			defName="TSFApparel_SamuraiArmor" or
			defName="TSFApparel_DaimyoArmor" or
			defName="TSFApparel_SamuraiHelmet" or
			defName="TSFApparel_DaimyoHelmet"]/stuffCategories</xpath>
		<value>
			<stuffCategories>
				<li>Steeled</li>
			</stuffCategories>
		</value>
	</Operation>

	<!--Utility-->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_SmokeBomb"]/costList</xpath>
		<value>
			<costList>
				<Steel>5</Steel>
			</costList>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="TSFApparel_SashimonoBanner"]/equippedStatOffsets</xpath>
		<value>
			<Suppressability>-0.25</Suppressability>
		</value>
	</Operation>

	<!--Clothes-->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_StrawCoat" or defName="TSFApparel_StrawHat"]/statBases/ArmorRating_Sharp</xpath>
		<value>
			<ArmorRating_Sharp>0.10</ArmorRating_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_NinjaMask" or defName="TSFApparel_StrawCoat"]/equippedStatOffsets/MeleeDodgeChance</xpath>
		<value>
			<MeleeDodgeChance>0.3</MeleeDodgeChance>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_NinjaMask"]/statBases/StuffEffectMultiplierArmor</xpath>
		<value>
			<StuffEffectMultiplierArmor>1.5</StuffEffectMultiplierArmor>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_Gi" or defName="TSFApparel_Kimono"]/statBases/StuffEffectMultiplierArmor</xpath>
		<value>
			<StuffEffectMultiplierArmor>2</StuffEffectMultiplierArmor>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_Gi" or defName="TSFApparel_Kimono"]/statBases/Mass</xpath>
		<value>
			<Mass>1.2</Mass>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_Yukata" or defName="TSFApparel_HaoriJacket"]/statBases/StuffEffectMultiplierArmor</xpath>
		<value>
			<StuffEffectMultiplierArmor>1</StuffEffectMultiplierArmor>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_HaoriJacket" or defName="TSFApparel_Yukata"]/costStuffCount</xpath>
		<value>
			<costStuffCount>60</costStuffCount>
		</value>
	</Operation>

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

	<!-- ======= Armor ======= -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_AshigaruArmor" or defName="TSFApparel_SamuraiArmor" or defName="TSFApparel_DaimyoArmor"]/apparel/layers</xpath>
		<value>
			<layers>
				<li>Shell</li>
			</layers>
		</value>
	</Operation>

	<!-- === Ashigaru === -->
	<!-- == Armor == -->
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="TSFApparel_AshigaruArmor"]/statBases</xpath>
		<value>
			<Bulk>40</Bulk>
			<WornBulk>10</WornBulk>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_AshigaruArmor"]/statBases/StuffEffectMultiplierArmor</xpath>
		<value>
			<StuffEffectMultiplierArmor>1.6</StuffEffectMultiplierArmor>
		</value>
	</Operation>

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

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

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

	<!-- == Helmet == -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_AshigaruHelmet"]/statBases/StuffEffectMultiplierArmor</xpath>
		<value>
			<StuffEffectMultiplierArmor>1.8</StuffEffectMultiplierArmor>
		</value>
	</Operation>

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

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

	<!-- === Samurai/Daimyo === -->
	<!-- == Armor == -->
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="TSFApparel_SamuraiArmor" or defName="TSFApparel_DaimyoArmor"]/statBases</xpath>
		<value>
			<Bulk>60</Bulk>
			<WornBulk>10</WornBulk>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_SamuraiArmor" or defName="TSFApparel_DaimyoArmor"]/costStuffCount</xpath>
		<value>
			<costStuffCount>160</costStuffCount>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_SamuraiArmor" or defName="TSFApparel_DaimyoArmor"]/statBases/StuffEffectMultiplierArmor</xpath>
		<value>
			<StuffEffectMultiplierArmor>2.00</StuffEffectMultiplierArmor>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_SamuraiArmor" or defName="TSFApparel_DaimyoArmor"]/statBases/Mass</xpath>
		<value>
			<Mass>13</Mass>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_SamuraiArmor"]/equippedStatOffsets</xpath>
		<value>
			<equippedStatOffsets>
				<MeleeDodgeChance>-0.10</MeleeDodgeChance>
				<Suppressability>-0.20</Suppressability>
			</equippedStatOffsets>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_DaimyoArmor"]/equippedStatOffsets/MoveSpeed</xpath>
		<value>
			<MeleeDodgeChance>-0.10</MeleeDodgeChance>
			<Suppressability>-0.20</Suppressability>
		</value>
	</Operation>

	<!-- == Helmet == -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_SamuraiHelmet" or defName="TSFApparel_DaimyoHelmet"]/statBases/StuffEffectMultiplierArmor</xpath>
		<value>
			<StuffEffectMultiplierArmor>2.5</StuffEffectMultiplierArmor>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="TSFApparel_SamuraiHelmet" or defName="TSFApparel_DaimyoHelmet"]/statBases</xpath>
		<value>
			<Bulk>8</Bulk>
			<WornBulk>1</WornBulk>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="TSFApparel_SamuraiHelmet" or defName="TSFApparel_DaimyoHelmet"]/equippedStatOffsets</xpath>
		<value>
			<Suppressability>-0.10</Suppressability>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_SamuraiHelmet" or defName="TSFApparel_DaimyoHelmet"]/apparel/bodyPartGroups</xpath>
		<value>
			<bodyPartGroups>
				<li>UpperHead</li>
			</bodyPartGroups>
		</value>
	</Operation>

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

	<!-- === Oni Gear Armor === -->
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="TSFApparel_OniHelmet"]/apparel/layers</xpath>
		<value>
			<li>OnHead</li>
			<li>StrappedHead</li>
		</value>
	</Operation>

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

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

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

	<!-- == Helmet == -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_OniHelmet"]/statBases/MaxHitPoints</xpath>
		<value>
			<Bulk>5</Bulk>
			<WornBulk>1</WornBulk>
			<MaxHitPoints>240</MaxHitPoints>
		</value>
	</Operation>

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

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

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

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

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

	<!-- == Armor == -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="TSFApparel_OniArmor"]/statBases/MaxHitPoints</xpath>
		<value>
			<Bulk>100</Bulk>
			<WornBulk>15</WornBulk>
			<MaxHitPoints>500</MaxHitPoints>
		</value>
	</Operation>

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

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

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

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

</Patch>