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

	<!-- ========== Remove Vanilla Verbs ========== -->

	<Operation Class="PatchOperationRemove">
		<xpath>Defs/ThingDef[
			@Name="WW2ServiceRevolver" or
			@Name="WW2ServicePistol" or
			@Name="WW2ServiceSemiAutomaticPistol" or
			@Name="WW2ServiceRifle" or
			@Name="WW2ServiceSemiAutomaticRifle" or
			@Name="WW2ServiceCarbine" or
			@Name="WW2ServiceShotgun" or
			@Name="WW2ServiceSMG" or
			@Name="WW2ServiceLMG" or
			@Name="WW2ServiceAutomaticRifle" or
			@Name="WW2ServiceSniperRifle" or
			@Name="WW2ServiceSemiAutomaticSniperRifle" or
			@Name="WW2ServiceAntiTankRifle"
			]/verbs</xpath>
	</Operation>

	<!-- ========== One-handed Weapons ========== -->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[
			@Name="WW2ServiceRevolver" or
			@Name="WW2SingleShotPistol" or
			@Name="WW2ServicePistol" or
			@Name="WW2ServiceSemiAutomaticPistol"
			]</xpath>
		<value>
			<weaponTags>
				<li>CE_OneHandedWeapon</li>
			</weaponTags>
		</value>
	</Operation>

	<!-- ========== Melee Tools ========== -->

	<!-- Handguns -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
			@Name="WW2ServiceRevolver" or
			@Name="WW2SingleShotPistol" or
			@Name="WW2ServicePistol" or
			@Name="WW2ServiceSemiAutomaticPistol"
			]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>grip</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>1.54</cooldownTime>
					<chanceFactor>1.5</chanceFactor>
					<armorPenetrationBlunt>0.555</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Grip</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>muzzle</label>
					<capacities>
						<li>Poke</li>
					</capacities>
					<power>2</power>
					<cooldownTime>1.54</cooldownTime>
					<armorPenetrationBlunt>0.555</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Muzzle</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- Rifles -->

	<Operation Class="PatchOperationReplace">
		<xpath>
			Defs/ThingDef[
			@Name="WW2ServiceRifle" or
			@Name="WW2ServiceSemiAutomaticRifle" or
			@Name="WW2ServiceSMG" or
			@Name="WW2ServiceLMG" or
			@Name="WW2ServiceCarbine" or
			@Name="WW2ServiceShotgun" or
			@Name="WW2ServiceAutomaticRifle" or
			@Name="WW2ServiceSniperRifle" or
			@Name="WW2ServiceSemiAutomaticSniperRifle"
			]/tools
		</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>stock</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>8</power>
					<cooldownTime>1.55</cooldownTime>
					<chanceFactor>1.5</chanceFactor>
					<armorPenetrationBlunt>2.755</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Stock</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>barrel</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>5</power>
					<cooldownTime>2.02</cooldownTime>
					<armorPenetrationBlunt>1.630</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>muzzle</label>
					<capacities>
						<li>Poke</li>
					</capacities>
					<power>8</power>
					<cooldownTime>1.55</cooldownTime>
					<armorPenetrationBlunt>2.755</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Muzzle</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- Rifles (Bayonet)-->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
			@Name="WW2ServiceRifleBayonet" or
			@Name="WW2ServiceSemiAutomaticRifleBayonet" or
			@Name="WW2ServiceShotgunBayonet"
			]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>stock</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>8</power>
					<cooldownTime>1.55</cooldownTime>
					<chanceFactor>1.5</chanceFactor>
					<armorPenetrationBlunt>2.755</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Stock</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>bayonet</label>
					<capacities>
						<li>Cut</li>
					</capacities>
					<power>17</power>
					<cooldownTime>2.14</cooldownTime>
					<armorPenetrationBlunt>1.688</armorPenetrationBlunt>
					<armorPenetrationSharp>0.5</armorPenetrationSharp>
					<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>bayonet</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>6</power>
					<cooldownTime>1.49</cooldownTime>
					<armorPenetrationBlunt>2.16</armorPenetrationBlunt>
					<armorPenetrationSharp>1.44</armorPenetrationSharp>
					<linkedBodyPartsGroup>Muzzle</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- Heavy Weapons -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="WW2ServiceAntiTankRifle"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>barrel</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>10</power>
					<cooldownTime>2.44</cooldownTime>
					<armorPenetrationBlunt>3.5</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

</Patch>