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

<!-- Patch stats -->
<Operation Class="PatchOperationReplace">
	<xpath>Defs/ThingDef[contains(defName, "ATM_MeleeWeapon_Spacer")]/costStuffCount</xpath>
	<value>
		<costStuffCount>200</costStuffCount>
	</value>
</Operation>

<Operation Class="PatchOperationReplace">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerGladius"]/tools</xpath>
	<value>
		<tools>
			<li Class="CombatExtended.ToolCE">
				<label>handle</label>
				<capacities>
					<li>Poke</li>
				</capacities>
				<power>6</power>
				<chanceFactor>0.33</chanceFactor>
				<cooldownTime>1.0</cooldownTime>
				<armorPenetrationBlunt>1.2</armorPenetrationBlunt>
				<linkedBodyPartsGroup>Handle</linkedBodyPartsGroup>
			</li>
			<li Class="CombatExtended.ToolCE">
				<label>point</label>
				<capacities>
					<li>Stab</li>
				</capacities>
				<power>70</power>
				<cooldownTime>1.0</cooldownTime>
				<armorPenetrationBlunt>1.2</armorPenetrationBlunt>
				<armorPenetrationSharp>1.2</armorPenetrationSharp>
				<linkedBodyPartsGroup>Point</linkedBodyPartsGroup>
			</li>
			<li Class="CombatExtended.ToolCE">
				<label>edge</label>
				<capacities>
					<li>Cut</li>
				</capacities>
				<power>50</power>
				<cooldownTime>0.95</cooldownTime>
				<armorPenetrationBlunt>2.2</armorPenetrationBlunt>
				<armorPenetrationSharp>1.2</armorPenetrationSharp>
				<linkedBodyPartsGroup>Edge</linkedBodyPartsGroup>
			</li>
		</tools>
	</value>
</Operation>

<Operation Class="PatchOperationAdd">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerGladius"]/statBases</xpath>
	<value>
		<Bulk>2</Bulk>
		<MeleeCounterParryBonus>0.9</MeleeCounterParryBonus>
	</value>
</Operation>

<Operation Class="PatchOperationAdd">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerGladius"]</xpath>
	<value>
		<equippedStatOffsets>
			<MeleeCritChance>0.6</MeleeCritChance>
			<MeleeParryChance>1.1</MeleeParryChance>
			<MeleeDodgeChance>0.6</MeleeDodgeChance>
		</equippedStatOffsets>
	</value>
</Operation>

<!-- Add tags -->

<Operation Class="PatchOperationConditional">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerGladius"]/weaponTags</xpath>
	<nomatch Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerGladius"]</xpath>
		<value>
			<weaponTags/>
		</value>
	</nomatch>
</Operation>

<Operation Class="PatchOperationAdd">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerGladius"]/weaponTags</xpath>
	<value>
		<li>CE_Sidearm_Melee</li>
		<li>CE_OneHandedWeapon</li>
	</value>
</Operation>

<!-- ========== Hammer ========== -->

<!-- Patch stats -->

<Operation Class="PatchOperationReplace">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerHammer"]/tools</xpath>
	<value>
		<tools>
			<li Class="CombatExtended.ToolCE">
				<label>handle</label>
				<capacities>
					<li>Poke</li>
				</capacities>
				<power>10</power>
				<chanceFactor>0.33</chanceFactor>
				<cooldownTime>1.0</cooldownTime>
				<armorPenetrationBlunt>5</armorPenetrationBlunt>
				<linkedBodyPartsGroup>Handle</linkedBodyPartsGroup>
			</li>
			<li Class="CombatExtended.ToolCE">
				<label>head</label>
				<capacities>
					<li>Blunt</li>
				</capacities>
				<power>30</power>
				<cooldownTime>3.0</cooldownTime>
				<armorPenetrationBlunt>12</armorPenetrationBlunt>
				<linkedBodyPartsGroup>Head</linkedBodyPartsGroup>
			</li>
		</tools>
	</value>
</Operation>

<Operation Class="PatchOperationAdd">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerHammer"]/statBases</xpath>
	<value>
		<Bulk>3</Bulk>
		<MeleeCounterParryBonus>0.5</MeleeCounterParryBonus>
	</value>
</Operation>

<Operation Class="PatchOperationAdd">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerHammer"]</xpath>
	<value>
		<equippedStatOffsets>
			<MeleeCritChance>1.5</MeleeCritChance>
			<MeleeParryChance>0.5</MeleeParryChance>
			<MeleeDodgeChance>0.6</MeleeDodgeChance>
		</equippedStatOffsets>
	</value>
</Operation>

<!-- Add tags -->

<Operation Class="PatchOperationConditional">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerHammer"]/weaponTags</xpath>
	<nomatch Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerHammer"]</xpath>
		<value>
			<weaponTags/>
		</value>
	</nomatch>
</Operation>

<Operation Class="PatchOperationAdd">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerHammer"]/weaponTags</xpath>
	<value>
		<li>CE_Sidearm_Tribal</li>
		<li>CE_OneHandedWeapon</li>
	</value>
</Operation>

<!-- ========== SledgeHammer ========== -->

<!-- Patch stats -->

<Operation Class="PatchOperationReplace">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerSledgehammer"]/tools</xpath>
	<value>
		<tools>
			<li Class="CombatExtended.ToolCE">
				<label>handle</label>
				<capacities>
					<li>Poke</li>
				</capacities>
				<power>4</power>
				<chanceFactor>0.33</chanceFactor>
				<cooldownTime>1.33</cooldownTime>
				<armorPenetrationBlunt>3</armorPenetrationBlunt>
				<linkedBodyPartsGroup>Handle</linkedBodyPartsGroup>
			</li>
			<li Class="CombatExtended.ToolCE">
				<label>head</label>
				<capacities>
					<li>Blunt</li>
				</capacities>
				<power>40</power>
				<cooldownTime>1.5</cooldownTime>
				<armorPenetrationBlunt>18</armorPenetrationBlunt>
				<linkedBodyPartsGroup>Head</linkedBodyPartsGroup>
			</li>
		</tools>
	</value>
</Operation>

<Operation Class="PatchOperationAdd">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerSledgehammer"]/statBases</xpath>
	<value>
		<Bulk>3.0</Bulk>
		<MeleeCounterParryBonus>0.6</MeleeCounterParryBonus>
	</value>
</Operation>

<Operation Class="PatchOperationAdd">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerSledgehammer"]</xpath>
	<value>
		<equippedStatOffsets>
			<MeleeCritChance>1.04</MeleeCritChance>
			<MeleeParryChance>0.64</MeleeParryChance>
			<MeleeDodgeChance>0.6</MeleeDodgeChance>
		</equippedStatOffsets>
	</value>
</Operation>

<!-- ========== Spear ========== -->

<!-- Patch stats -->

<Operation Class="PatchOperationReplace">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerSpear"]/tools</xpath>
	<value>
		<tools>
			<li Class="CombatExtended.ToolCE">
				<label>shaft</label>
				<capacities>
					<li>Blunt</li>
				</capacities>
				<power>18</power>
				<cooldownTime>1.15</cooldownTime>
				<chanceFactor>0.15</chanceFactor>
				<armorPenetrationBlunt>8</armorPenetrationBlunt>
				<linkedBodyPartsGroup>Shaft</linkedBodyPartsGroup>
			</li>
			<li Class="CombatExtended.ToolCE">
				<label>shaft</label>
				<capacities>
					<li>Poke</li>
				</capacities>
				<power>10</power>
				<cooldownTime>3.6</cooldownTime>
				<chanceFactor>0.05</chanceFactor>
				<armorPenetrationBlunt>6</armorPenetrationBlunt>
				<linkedBodyPartsGroup>Point</linkedBodyPartsGroup>
			</li>
			<li Class="CombatExtended.ToolCE">
				<label>head</label>
				<capacities>
					<li>Stab</li>
				</capacities>
				<power>50</power>
				<cooldownTime>1.19</cooldownTime>
				<armorPenetrationBlunt>10</armorPenetrationBlunt>
				<armorPenetrationSharp>10</armorPenetrationSharp>
				<linkedBodyPartsGroup>Head</linkedBodyPartsGroup>
			</li>
		</tools>
	</value>
</Operation>

<Operation Class="PatchOperationAdd">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerSpear"]/statBases</xpath>
	<value>
		<Bulk>6</Bulk>
		<MeleeCounterParryBonus>3.76</MeleeCounterParryBonus>
	</value>
</Operation>

<Operation Class="PatchOperationAdd">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerSpear"]</xpath>
	<value>
		<equippedStatOffsets>
			<MeleeCritChance>0.5</MeleeCritChance>
			<MeleeParryChance>3.32</MeleeParryChance>
			<MeleeDodgeChance>2.4</MeleeDodgeChance>
		</equippedStatOffsets>
	</value>
</Operation>

<!-- ========== Longsword ========== -->

<!-- Patch stats -->

<Operation Class="PatchOperationReplace">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerLongsword"]/tools</xpath>
	<value>
		<tools>
			<li Class="CombatExtended.ToolCE">
				<label>handle</label>
				<capacities>
					<li>Poke</li>
				</capacities>
				<power>12</power>
				<cooldownTime>3.56</cooldownTime>
				<chanceFactor>0.10</chanceFactor>
				<armorPenetrationBlunt>5.0</armorPenetrationBlunt>
				<linkedBodyPartsGroup>Handle</linkedBodyPartsGroup>
			</li>
			<li Class="CombatExtended.ToolCE">
				<label>point</label>
				<capacities>
					<li>Stab</li>
				</capacities>
				<power>48</power>
				<cooldownTime>3.76</cooldownTime>
				<armorPenetrationBlunt>5.0</armorPenetrationBlunt>
				<armorPenetrationSharp>9.0</armorPenetrationSharp>
				<linkedBodyPartsGroup>Point</linkedBodyPartsGroup>
			</li>
			<li Class="CombatExtended.ToolCE">
				<label>edge</label>
				<capacities>
					<li>Cut</li>
				</capacities>
				<power>100</power>
				<cooldownTime>3.28</cooldownTime>
				<armorPenetrationBlunt>11</armorPenetrationBlunt>
				<armorPenetrationSharp>4</armorPenetrationSharp>
				<linkedBodyPartsGroup>Edge</linkedBodyPartsGroup>
			</li>
		</tools>
	</value>
</Operation>

<Operation Class="PatchOperationAdd">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerLongsword"]/statBases</xpath>
	<value>
		<Bulk>6</Bulk>
		<MeleeCounterParryBonus>2.0</MeleeCounterParryBonus>
	</value>
</Operation>

<Operation Class="PatchOperationAdd">
	<xpath>Defs/ThingDef[defName="ATM_MeleeWeapon_SpacerLongsword"]</xpath>
	<value>
		<equippedStatOffsets>
			<MeleeCritChance>1.3</MeleeCritChance>
			<MeleeParryChance>1.4</MeleeParryChance>
			<MeleeDodgeChance>1.0</MeleeDodgeChance>
		</equippedStatOffsets>
	</value>
</Operation>

</Patch>