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

	<!-- Cleaver -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="CGM_cleaver"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>handle</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>2</power>
					<cooldownTime>0.9</cooldownTime>
					<armorPenetrationBlunt>0.425</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Handle</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>blade</label>
					<capacities>
						<li>Cut</li>
					</capacities>
					<power>9</power>
					<cooldownTime>0.8</cooldownTime>
					<armorPenetrationBlunt>0.32</armorPenetrationBlunt>
					<armorPenetrationSharp>0.5</armorPenetrationSharp>
					<linkedBodyPartsGroup>Edge</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>
	
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="CGM_cleaver"]/statBases</xpath>
		<value>
			<Bulk>1.8</Bulk>
			<MeleeCounterParryBonus>0.15</MeleeCounterParryBonus>
		</value>
	</Operation>
	
	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="CGM_cleaver"]/equippedStatOffsets</xpath>
		<value>
			<MeleeCritChance>0.5</MeleeCritChance>
			<MeleeParryChance>0.15</MeleeParryChance>
			<MeleeDodgeChance>0.15</MeleeDodgeChance>
		</value>
	</Operation>

	<!-- Mini-SMG -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>CGM_MiniSMG</defName>
		<statBases>
			<RangedWeapon_Cooldown>0.35</RangedWeapon_Cooldown>
			<SightsEfficiency>1</SightsEfficiency>
			<ShotSpread>0.15</ShotSpread>
			<SwayFactor>0.53</SwayFactor>
			<Bulk>7.00</Bulk>
		</statBases>
		<Properties>
			<recoilAmount>0.95</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_45ACP_FMJ</defaultProjectile>
			<warmupTime>0.6</warmupTime>
			<range>15</range>
			<ticksBetweenBurstShots>3</ticksBetweenBurstShots>
			<burstShotCount>5</burstShotCount>
			<soundCast>Shot_Spiner</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>25</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_45ACP</ammoSet>
		</AmmoUser>
		<FireModes>
			<aimedBurstShotCount>3</aimedBurstShotCount>
			<aiAimMode>Snapshot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>CE_SMG</li>
			<li>CE_AI_BROOM</li>
			<li>NoSwitch</li>
		</weaponTags>
	</Operation>

	<!-- Charge Rifle -->	
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>CGM_ChargeRifle</defName>
		<statBases>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>2.24</SightsEfficiency>
			<ShotSpread>0.01</ShotSpread>
			<SwayFactor>0.88</SwayFactor>
			<Bulk>13.00</Bulk>
		</statBases>
		<Properties>
			<recoilAmount>0.92</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_5x35mmCharged_CGM</defaultProjectile>
			<warmupTime>1.6</warmupTime>
			<range>55</range>
			<ticksBetweenBurstShots>12</ticksBetweenBurstShots>
			<burstShotCount>5</burstShotCount>
			<soundCast>Shot_ChargeRifle</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>20</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_5x35mmCharged_CGM</ammoSet>
		</AmmoUser>
		<FireModes>
			<aimedBurstShotCount>3</aimedBurstShotCount>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>CE_AI_Rifle</li>
			<li>NoSwitch</li>
		</weaponTags>
	</Operation>
	
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="CGM_ChargeRifle"]/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>