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

	<!-- ======= Swords ======= -->

	<!-- ===== One-Handed Swords ===== -->

	<!-- === Sword: Falchion (sword without Stab and more slash dmg) === -->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_MeleeWeapon_Falchion"]/statBases</xpath>
		<value>
			<Bulk>5</Bulk>
			<MeleeCounterParryBonus>0.25</MeleeCounterParryBonus>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_MeleeWeapon_Falchion"]</xpath>
		<value>
			<equippedStatOffsets>
				<MeleeCritChance>0.15</MeleeCritChance>
				<MeleeParryChance>0.30</MeleeParryChance>
				<MeleeDodgeChance>0.30</MeleeDodgeChance>
			</equippedStatOffsets>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_MeleeWeapon_Falchion"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>handle</label>
					<capacities>
						<li>Poke</li>
					</capacities>
					<power>3</power>
					<cooldownTime>1.69</cooldownTime>
					<chanceFactor>0.05</chanceFactor>
					<armorPenetrationBlunt>0.8</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Handle</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>edge</label>
					<capacities>
						<li>Cut</li>
					</capacities>
					<power>25</power>
					<cooldownTime>1.36</cooldownTime>
					<chanceFactor>0.95</chanceFactor>
					<armorPenetrationBlunt>0.95</armorPenetrationBlunt>
					<armorPenetrationSharp>0.58</armorPenetrationSharp>
					<linkedBodyPartsGroup>Edge</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- === Sword: Arming Sword === -->

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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_MeleeWeapon_ArmingSword"]</xpath>
		<value>
			<equippedStatOffsets>
				<MeleeCritChance>0.40</MeleeCritChance>
				<MeleeParryChance>0.60</MeleeParryChance>
				<MeleeDodgeChance>0.30</MeleeDodgeChance>
			</equippedStatOffsets>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_MeleeWeapon_ArmingSword"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>handle</label>
					<capacities>
						<li>Poke</li>
					</capacities>
					<power>3</power>
					<cooldownTime>1.59</cooldownTime>
					<chanceFactor>0.05</chanceFactor>
					<armorPenetrationBlunt>0.8</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Handle</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>point</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>20</power>
					<cooldownTime>1.46</cooldownTime>
					<chanceFactor>0.50</chanceFactor>
					<armorPenetrationBlunt>0.55</armorPenetrationBlunt>
					<armorPenetrationSharp>1.40</armorPenetrationSharp>
					<linkedBodyPartsGroup>Point</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>edge</label>
					<capacities>
						<li>Cut</li>
					</capacities>
					<power>22</power>
					<cooldownTime>1.59</cooldownTime>
					<chanceFactor>0.45</chanceFactor>
					<armorPenetrationBlunt>1</armorPenetrationBlunt>
					<armorPenetrationSharp>0.58</armorPenetrationSharp>
					<linkedBodyPartsGroup>Edge</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- === Sword: Noble Sword (Arming sword with more dmg) === -->

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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_MeleeWeapon_NobleSword"]</xpath>
		<value>
			<equippedStatOffsets>
				<MeleeCritChance>0.40</MeleeCritChance>
				<MeleeParryChance>0.60</MeleeParryChance>
				<MeleeDodgeChance>0.30</MeleeDodgeChance>
			</equippedStatOffsets>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_MeleeWeapon_NobleSword"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>handle</label>
					<capacities>
						<li>Poke</li>
					</capacities>
					<power>3</power>
					<cooldownTime>1.59</cooldownTime>
					<chanceFactor>0.05</chanceFactor>
					<armorPenetrationBlunt>0.8</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Handle</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>point</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>22</power>
					<cooldownTime>1.46</cooldownTime>
					<chanceFactor>0.50</chanceFactor>
					<armorPenetrationBlunt>0.6</armorPenetrationBlunt>
					<armorPenetrationSharp>1.40</armorPenetrationSharp>
					<linkedBodyPartsGroup>Point</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>edge</label>
					<capacities>
						<li>Cut</li>
					</capacities>
					<power>25</power>
					<cooldownTime>1.59</cooldownTime>
					<chanceFactor>0.45</chanceFactor>
					<armorPenetrationBlunt>1.1</armorPenetrationBlunt>
					<armorPenetrationSharp>0.58</armorPenetrationSharp>
					<linkedBodyPartsGroup>Edge</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- === Sword: Fencing Sword (low slash dmg & chances, low cd, hight crit and parry, high Stab chances and counter parry) === -->

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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_MeleeWeapon_FencingSword"]</xpath>
		<value>
			<equippedStatOffsets>
				<MeleeCritChance>0.83</MeleeCritChance>
				<MeleeParryChance>0.4</MeleeParryChance>
				<MeleeDodgeChance>0.5</MeleeDodgeChance>
			</equippedStatOffsets>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_MeleeWeapon_FencingSword"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>handle</label>
					<capacities>
						<li>Poke</li>
					</capacities>
					<power>3</power>
					<cooldownTime>1.29</cooldownTime>
					<chanceFactor>0.05</chanceFactor>
					<armorPenetrationBlunt>0.8</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Handle</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>point</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>18</power>
					<cooldownTime>1.25</cooldownTime>
					<chanceFactor>0.85</chanceFactor>
					<armorPenetrationBlunt>2.25</armorPenetrationBlunt>
					<armorPenetrationSharp>2.4</armorPenetrationSharp>
					<linkedBodyPartsGroup>Point</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>edge</label>
					<capacities>
						<li>Cut</li>
					</capacities>
					<power>16</power>
					<cooldownTime>1.46</cooldownTime>
					<chanceFactor>0.10</chanceFactor>
					<armorPenetrationBlunt>1.3</armorPenetrationBlunt>
					<armorPenetrationSharp>0.58</armorPenetrationSharp>
					<linkedBodyPartsGroup>Edge</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- ===== Two-Handed Swords ===== -->

	<!-- === Sword: Long Sword === -->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_MeleeWeapon_Longsword"]/statBases</xpath>
		<value>
			<Bulk>8</Bulk>
			<MeleeCounterParryBonus>0.8</MeleeCounterParryBonus>
		</value>
	</Operation>

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

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_MeleeWeapon_Longsword"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>handle</label>
					<capacities>
						<li>Poke</li>
					</capacities>
					<power>4</power>
					<cooldownTime>1.78</cooldownTime>
					<chanceFactor>0.05</chanceFactor>
					<armorPenetrationBlunt>1.0</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Handle</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>point</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>18</power>
					<cooldownTime>1.78</cooldownTime>
					<chanceFactor>0.60</chanceFactor>
					<armorPenetrationBlunt>1.0</armorPenetrationBlunt>
					<armorPenetrationSharp>2.0</armorPenetrationSharp>
					<linkedBodyPartsGroup>Point</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>edge</label>
					<capacities>
						<li>Cut</li>
					</capacities>
					<power>40</power>
					<cooldownTime>1.64</cooldownTime>
					<chanceFactor>0.35</chanceFactor>
					<armorPenetrationBlunt>3.24</armorPenetrationBlunt>
					<armorPenetrationSharp>0.72</armorPenetrationSharp>
					<linkedBodyPartsGroup>Edge</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- === Sword: Greatsword === -->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_MeleeWeapon_Greatsword"]/statBases</xpath>
		<value>
			<Bulk>12</Bulk>
			<MeleeCounterParryBonus>0.70</MeleeCounterParryBonus>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="DankPyon_MeleeWeapon_Greatsword"]</xpath>
		<value>
			<equippedStatOffsets>
				<MeleeCritChance>0.30</MeleeCritChance>
				<MeleeParryChance>1.20</MeleeParryChance>
				<MeleeDodgeChance>0.50</MeleeDodgeChance>
			</equippedStatOffsets>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="DankPyon_MeleeWeapon_Greatsword"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>handle</label>
					<capacities>
						<li>Poke</li>
					</capacities>
					<power>5</power>
					<cooldownTime>1.69</cooldownTime>
					<chanceFactor>0.05</chanceFactor>
					<armorPenetrationBlunt>0.8</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Handle</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>point</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>24</power>
					<cooldownTime>1.98</cooldownTime>
					<chanceFactor>0.50</chanceFactor>
					<armorPenetrationBlunt>0.8</armorPenetrationBlunt>
					<armorPenetrationSharp>1.90</armorPenetrationSharp>
					<linkedBodyPartsGroup>Point</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>edge</label>
					<capacities>
						<li>Cut</li>
					</capacities>
					<power>48</power>
					<cooldownTime>2.86</cooldownTime>
					<chanceFactor>0.45</chanceFactor>
					<armorPenetrationBlunt>3.592</armorPenetrationBlunt>
					<armorPenetrationSharp>0.58</armorPenetrationSharp>
					<linkedBodyPartsGroup>Edge</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

</Patch>