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

	<!-- ===== Textiles ===== -->

	<!-- Linen -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Linen"]/statBases/StuffPower_Armor_Sharp</xpath>
		<value>
			<StuffPower_Armor_Sharp>0.03</StuffPower_Armor_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Linen"]/statBases/StuffPower_Armor_Blunt</xpath>
		<value>
			<StuffPower_Armor_Blunt>0.08</StuffPower_Armor_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Linen"]/statBases/StuffPower_Armor_Heat</xpath>
		<value>
			<StuffPower_Armor_Heat>0.022</StuffPower_Armor_Heat>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_Linen"]/statBases</xpath>
		<value>
			<Bulk>0.05</Bulk>
		</value>
	</Operation>

	<!-- Silk -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Silk"]/statBases/StuffPower_Armor_Sharp</xpath>
		<value>
			<StuffPower_Armor_Sharp>0.12</StuffPower_Armor_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Silk"]/statBases/StuffPower_Armor_Heat</xpath>
		<value>
			<StuffPower_Armor_Heat>0.05</StuffPower_Armor_Heat>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_Silk"]/statBases</xpath>
		<value>
			<Bulk>0.05</Bulk>
		</value>
	</Operation>

	<!-- ===== Leathery ===== -->

	<!-- Rawhide -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Leather_Rawhide"]/statBases/StuffPower_Armor_Sharp</xpath>
		<value>
			<StuffPower_Armor_Sharp>0.08</StuffPower_Armor_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Leather_Rawhide"]/statBases/StuffPower_Armor_Blunt</xpath>
		<value>
			<StuffPower_Armor_Blunt>0.055</StuffPower_Armor_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="DankPyon_Leather_Rawhide"]/statBases/StuffPower_Armor_Heat</xpath>
	</Operation>

	<!-- Unique Leathers -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Leather_DireBoar" or defName="DankPyon_Leather_Direwolf"]/statBases/StuffPower_Armor_Sharp</xpath>
		<value>
			<StuffPower_Armor_Sharp>0.14</StuffPower_Armor_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_Leather_DireBoar" or defName="DankPyon_Leather_Direwolf"]/statBases</xpath>
		<value>
			<StuffPower_Armor_Blunt>0.1</StuffPower_Armor_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Leather_Hyena"]/statBases/StuffPower_Armor_Sharp</xpath>
		<value>
			<StuffPower_Armor_Sharp>0.12</StuffPower_Armor_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_Leather_Hyena"]/statBases</xpath>
		<value>
			<StuffPower_Armor_Blunt>0.08</StuffPower_Armor_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Leather_Troll"]/statBases/StuffPower_Armor_Sharp</xpath>
		<value>
			<StuffPower_Armor_Sharp>0.6</StuffPower_Armor_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_Leather_Troll"]/statBases</xpath>
		<value>
			<StuffPower_Armor_Blunt>0.12</StuffPower_Armor_Blunt>
		</value>
	</Operation>

	<!-- Rare Creatures -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Leather_Rox"]/statBases/StuffPower_Armor_Sharp</xpath>
		<value>
			<StuffPower_Armor_Sharp>0.3</StuffPower_Armor_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Leather_Rox"]/statBases/StuffPower_Armor_Blunt</xpath>
		<value>
			<StuffPower_Armor_Blunt>0.15</StuffPower_Armor_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Leather_Griffon" or defName="DankPyon_Leather_Daer"]/statBases/StuffPower_Armor_Sharp</xpath>
		<value>
			<StuffPower_Armor_Sharp>0.6</StuffPower_Armor_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Leather_Griffon" or defName="DankPyon_Leather_Daer"]/statBases/StuffPower_Armor_Blunt</xpath>
		<value>
			<StuffPower_Armor_Blunt>0.12</StuffPower_Armor_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Leather_Lindwurm"]/statBases/StuffPower_Armor_Sharp</xpath>
		<value>
			<StuffPower_Armor_Sharp>0.9</StuffPower_Armor_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Leather_Lindwurm"]/statBases/StuffPower_Armor_Blunt</xpath>
		<value>
			<StuffPower_Armor_Blunt>0.075</StuffPower_Armor_Blunt>
		</value>
	</Operation>

	<!-- ===== Materials ===== -->

	<!-- Iron -->
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_IronIngot"]/statBases</xpath>
		<value>
			<Bulk>0.03</Bulk>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_IronIngot"]/stuffProps/categories</xpath>
		<value>
			<li>Metallic_Weapon</li>
			<li>Steeled</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_IronIngot"]/statBases/StuffPower_Armor_Sharp</xpath>
		<value>
			<StuffPower_Armor_Sharp>0.85</StuffPower_Armor_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_IronIngot"]/statBases/StuffPower_Armor_Blunt</xpath>
		<value>
			<StuffPower_Armor_Blunt>1.3</StuffPower_Armor_Blunt>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="DankPyon_IronIngot"]/statBases/StuffPower_Armor_Heat</xpath>
	</Operation>

	<!-- Bone -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Bone"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>0.99</cooldownTime>
					<armorPenetrationBlunt>0.288</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_Bone"]</xpath>
		<value>
			<equippedStatOffsets>
				<MeleeCritChance>0.2</MeleeCritChance>
				<MeleeParryChance>1</MeleeParryChance>
				<MeleeDodgeChance>0.13</MeleeDodgeChance>
			</equippedStatOffsets>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_Bone"]/statBases</xpath>
		<value>
			<Bulk>0.07</Bulk>
			<MeleeCounterParryBonus>1.33</MeleeCounterParryBonus>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Bone"]/statBases/StuffPower_Armor_Sharp</xpath>
		<value>
			<StuffPower_Armor_Sharp>0.15</StuffPower_Armor_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Bone"]/statBases/StuffPower_Armor_Blunt</xpath>
		<value>
			<StuffPower_Armor_Blunt>0.3</StuffPower_Armor_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Bone"]/statBases/StuffPower_Armor_Heat</xpath>
		<value>
			<StuffPower_Armor_Heat>0.025</StuffPower_Armor_Heat>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Bone"]/statBases/SharpDamageMultiplier</xpath>
		<value>
			<SharpDamageMultiplier>0.7</SharpDamageMultiplier>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_Bone"]/statBases/BluntDamageMultiplier</xpath>
		<value>
			<BluntDamageMultiplier>0.5</BluntDamageMultiplier>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_Bone"]/stuffProps/statFactors</xpath>
		<value>
			<Mass>0.3</Mass>
			<MeleePenetrationFactor>0.3</MeleePenetrationFactor>
		</value>
	</Operation>

	<!-- Raw Wood -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_RawWood"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>0.99</cooldownTime>
					<armorPenetrationBlunt>0.288</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_RawWood"]</xpath>
		<value>
			<equippedStatOffsets>
				<MeleeCritChance>0.2</MeleeCritChance>
				<MeleeParryChance>1</MeleeParryChance>
				<MeleeDodgeChance>0.13</MeleeDodgeChance>
			</equippedStatOffsets>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_RawWood"]/statBases</xpath>
		<value>
			<Bulk>0.07</Bulk>
			<MeleeCounterParryBonus>1.33</MeleeCounterParryBonus>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_RawWood"]/statBases/StuffPower_Armor_Sharp</xpath>
		<value>
			<StuffPower_Armor_Sharp>0.1</StuffPower_Armor_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_RawWood"]/statBases/StuffPower_Armor_Blunt</xpath>
		<value>
			<StuffPower_Armor_Blunt>0.2</StuffPower_Armor_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_RawWood"]/statBases/StuffPower_Armor_Heat</xpath>
		<value>
			<StuffPower_Armor_Heat>0.025</StuffPower_Armor_Heat>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_RawWood"]/statBases/SharpDamageMultiplier</xpath>
		<value>
			<SharpDamageMultiplier>0.7</SharpDamageMultiplier>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_RawWood"]/statBases/BluntDamageMultiplier</xpath>
		<value>
			<BluntDamageMultiplier>0.5</BluntDamageMultiplier>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_RawWood"]/stuffProps/statFactors</xpath>
		<value>
			<Mass>0.3</Mass>
			<MeleePenetrationFactor>0.3</MeleePenetrationFactor>
		</value>
	</Operation>

	<!-- Raw Dark Wood -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_RawDarkWood"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>0.99</cooldownTime>
					<armorPenetrationBlunt>0.288</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_RawDarkWood"]</xpath>
		<value>
			<equippedStatOffsets>
				<MeleeCritChance>0.2</MeleeCritChance>
				<MeleeParryChance>1</MeleeParryChance>
				<MeleeDodgeChance>0.13</MeleeDodgeChance>
			</equippedStatOffsets>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_RawDarkWood"]/statBases</xpath>
		<value>
			<Bulk>0.07</Bulk>
			<MeleeCounterParryBonus>1.33</MeleeCounterParryBonus>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_RawDarkWood"]/statBases/StuffPower_Armor_Sharp</xpath>
		<value>
			<StuffPower_Armor_Sharp>0.15</StuffPower_Armor_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_RawDarkWood"]/statBases/StuffPower_Armor_Blunt</xpath>
		<value>
			<StuffPower_Armor_Blunt>0.3</StuffPower_Armor_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_RawDarkWood"]/statBases/StuffPower_Armor_Heat</xpath>
		<value>
			<StuffPower_Armor_Heat>0.025</StuffPower_Armor_Heat>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_RawDarkWood"]/statBases/SharpDamageMultiplier</xpath>
		<value>
			<SharpDamageMultiplier>0.7</SharpDamageMultiplier>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_RawDarkWood"]/statBases/BluntDamageMultiplier</xpath>
		<value>
			<BluntDamageMultiplier>0.5</BluntDamageMultiplier>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_RawDarkWood"]/stuffProps/statFactors</xpath>
		<value>
			<Mass>0.3</Mass>
			<MeleePenetrationFactor>0.3</MeleePenetrationFactor>
		</value>
	</Operation>

	<!-- Dark Wood -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_DarkWood"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>0.99</cooldownTime>
					<armorPenetrationBlunt>0.288</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_DarkWood"]</xpath>
		<value>
			<equippedStatOffsets>
				<MeleeCritChance>0.2</MeleeCritChance>
				<MeleeParryChance>1</MeleeParryChance>
				<MeleeDodgeChance>0.13</MeleeDodgeChance>
			</equippedStatOffsets>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_DarkWood"]/statBases</xpath>
		<value>
			<Bulk>0.07</Bulk>
			<MeleeCounterParryBonus>1.33</MeleeCounterParryBonus>
		</value>
	</Operation>

	<!-- A bonus multiplier on top of the base toughness rating of a material -->
	<Operation Class="PatchOperationAddModExtension">
		<xpath>Defs/ThingDef[defName="DankPyon_DarkWood"]</xpath>
		<value>
			<li Class="CombatExtended.StuffToughnessMultiplierExtensionCE">
				<toughnessMultiplier>5</toughnessMultiplier>
			</li>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_DarkWood"]/statBases/StuffPower_Armor_Sharp</xpath>
		<value>
			<StuffPower_Armor_Sharp>0.1</StuffPower_Armor_Sharp>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_DarkWood"]/statBases/StuffPower_Armor_Blunt</xpath>
		<value>
			<StuffPower_Armor_Blunt>0.2</StuffPower_Armor_Blunt>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_DarkWood"]/statBases/StuffPower_Armor_Heat</xpath>
		<value>
			<StuffPower_Armor_Heat>0.025</StuffPower_Armor_Heat>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_DarkWood"]/stuffProps/statFactors</xpath>
		<value>
			<Mass>0.6</Mass>
			<MeleePenetrationFactor>0.5</MeleePenetrationFactor>
		</value>
	</Operation>

	<!-- Dire Boar Tusk -->
	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[defName="DankPyon_DireBoarTusk"]/tools</xpath>
	</Operation>

	<Operation Class="PatchOperationAttributeSet">
		<xpath>Defs/ThingDef[defName="DankPyon_DireBoarTusk"]</xpath>
		<attribute>ParentName</attribute>
		<value>ResourceBase</value>
	</Operation>

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

</Patch>