<?xml version="1.0" encoding="utf-8"?>
<Patch>
	<!-- ========== Tools ========== -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
			defName="KIT_Gun_Arquebus" or
			defName="KIT_Gun_Blunderbuss" or
			defName="KIT_Gun_HandMortar"
			]/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>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="KIT_Gun_BayonetMusket"]/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>Stab</li>
					</capacities>
					<power>18</power>
					<cooldownTime>1.49</cooldownTime>
					<armorPenetrationBlunt>2.16</armorPenetrationBlunt>
					<armorPenetrationSharp>1.44</armorPenetrationSharp>
					<linkedBodyPartsGroup>Muzzle</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

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

	<!-- ========== Guns ========== -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>KIT_Gun_Arquebus</defName>
		<statBases>
			<Mass>5</Mass>
			<Bulk>14</Bulk>
			<SwayFactor>1.90</SwayFactor>
			<ShotSpread>0.18</ShotSpread>
			<SightsEfficiency>0.80</SightsEfficiency>
			<RangedWeapon_Cooldown>0.85</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>True</hasStandardCommand>
			<defaultProjectile>Bullet_FastMusketBall</defaultProjectile>
			<warmupTime>2</warmupTime>
			<range>34</range>
			<soundCast>KIT_Arquebus</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>12</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>1</magazineSize>
			<AmmoGenPerMagOverride>5</AmmoGenPerMagOverride>
			<reloadTime>8</reloadTime>
			<ammoSet>AmmoSet_FastMusketBall</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
	</Operation>

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>KIT_Gun_BayonetMusket</defName>
		<statBases>
			<Mass>5.2</Mass>
			<Bulk>15</Bulk>
			<SwayFactor>2.02</SwayFactor>
			<ShotSpread>0.10</ShotSpread>
			<SightsEfficiency>0.80</SightsEfficiency>
			<RangedWeapon_Cooldown>0.85</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>True</hasStandardCommand>
			<defaultProjectile>Bullet_FastMusketBall</defaultProjectile>
			<warmupTime>1.3</warmupTime>
			<range>40</range>
			<soundCast>KIT_BayonetMusket</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>12</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>1</magazineSize>
			<AmmoGenPerMagOverride>5</AmmoGenPerMagOverride>
			<reloadTime>8</reloadTime>
			<ammoSet>AmmoSet_FastMusketBall</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
	</Operation>

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>KIT_Gun_Blunderbuss</defName>
		<statBases>
			<Mass>4.8</Mass>
			<Bulk>14.9</Bulk>
			<SwayFactor>1.20</SwayFactor>
			<ShotSpread>0.24</ShotSpread>
			<SightsEfficiency>0.80</SightsEfficiency>
			<RangedWeapon_Cooldown>1.35</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>True</hasStandardCommand>
			<defaultProjectile>Bullet_BlunderShot_Ball</defaultProjectile>
			<warmupTime>1.1</warmupTime>
			<range>16</range>
			<soundCast>Shot_Shotgun_NoRack</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>12</muzzleFlashScale>
			<ammoConsumedPerShotCount>7</ammoConsumedPerShotCount>
		</Properties>
		<AmmoUser>
			<magazineSize>7</magazineSize>
			<reloadTime>7</reloadTime>
			<ammoSet>AmmoSet_BlunderShot</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
	</Operation>

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>KIT_Gun_HandMortar</defName>
		<statBases>
			<Mass>4.8</Mass>
			<Bulk>14.9</Bulk>
			<SwayFactor>1.92</SwayFactor>
			<ShotSpread>0.30</ShotSpread>
			<SightsEfficiency>0.85</SightsEfficiency>
			<RangedWeapon_Cooldown>1.35</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>True</hasStandardCommand>
			<defaultProjectile>Bullet_MortarGrenade</defaultProjectile>
			<warmupTime>1.2</warmupTime>
			<range>20</range>
			<soundCast>KIT_HandMortar</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>12</muzzleFlashScale>
			<targetParams>
				<canTargetLocations>True</canTargetLocations>
			</targetParams>
		</Properties>
		<AmmoUser>
			<magazineSize>1</magazineSize>
			<reloadTime>8</reloadTime>
			<ammoSet>AmmoSet_MortarGrenade</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
	</Operation>
</Patch>