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

	<!-- ===== Weapon Tools ===== -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="RM_Gun_ShardLauncher" or defName="RM_Gun_ShardLance"]/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>barrel</label>
					<capacities>
						<li>Blunt</li>
						<li>Poke</li>
					</capacities>
					<power>2</power>
					<cooldownTime>1.54</cooldownTime>
					<armorPenetrationBlunt>0.555</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>crystal</label>
					<capacities>
						<li>Cut</li>
						<li>Poke</li>
					</capacities>
					<power>12</power>
					<cooldownTime>2.2</cooldownTime>
					<armorPenetrationBlunt>2.380</armorPenetrationBlunt>
					<armorPenetrationSharp>1.32</armorPenetrationSharp>
					<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="RM_Gun_ShardSwarmer"]/tools</xpath>
		<value>
			<tools>
				<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>crystal</label>
					<capacities>
						<li>Cut</li>
						<li>Poke</li>
					</capacities>
					<power>12</power>
					<cooldownTime>2.2</cooldownTime>
					<armorPenetrationBlunt>2.380</armorPenetrationBlunt>
					<armorPenetrationSharp>1.32</armorPenetrationSharp>
					<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- ===== Shard Weaponry ===== -->

	<!-- === Shard Pistol === -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RM_Gun_ShardLauncher</defName>
		<statBases>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>0.8</SightsEfficiency>
			<ShotSpread>0.15</ShotSpread>
			<SwayFactor>1.07</SwayFactor>
			<Mass>1.5</Mass>
			<Bulk>3</Bulk>
		</statBases>
		<Properties>
			<recoilAmount>0.76</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>RM_Bullet_ShardPistol</defaultProjectile>
			<warmupTime>0.5</warmupTime>
			<range>21</range>
			<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
			<burstShotCount>12</burstShotCount>
			<soundCast>RM_Shot_ShardLauncher</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>36</magazineSize>
			<reloadTime>4.5</reloadTime>
			<ammoSet>AmmoSet_ShardPistol</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>MechanoidGunMedium</li>
		</weaponTags>
	</Operation>

	<!-- === Shard Lance === -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RM_Gun_ShardLance</defName>
		<statBases>
			<Mass>6</Mass>
			<Bulk>13</Bulk>
			<SwayFactor>1</SwayFactor>
			<ShotSpread>0.05</ShotSpread>
			<SightsEfficiency>1</SightsEfficiency>
			<RangedWeapon_Cooldown>0.45</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<recoilAmount>1.16</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>RM_Bullet_ShardLance</defaultProjectile>
			<warmupTime>1.3</warmupTime>
			<range>57</range>
			<ticksBetweenBurstShots>10</ticksBetweenBurstShots>
			<burstShotCount>3</burstShotCount>
			<soundCast>RM_Shot_ShardLance</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>12</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>30</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_ShardLance</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>MechanoidGunMedium</li>
		</weaponTags>
	</Operation>

	<!-- === Shard Swarmer === -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RM_Gun_ShardSwarmer</defName>
		<statBases>
			<Mass>12</Mass>
			<Bulk>20</Bulk>
			<SwayFactor>1</SwayFactor>
			<ShotSpread>0.05</ShotSpread>
			<SightsEfficiency>1</SightsEfficiency>
			<RangedWeapon_Cooldown>0.45</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<recoilAmount>1.16</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>RM_Bullet_ShardSwarmer</defaultProjectile>
			<warmupTime>1.3</warmupTime>
			<range>42</range>
			<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
			<burstShotCount>14</burstShotCount>
			<soundCast>RM_Shot_ShardLauncher</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>11</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>70</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_ShardSwarmer</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>MechanoidGunHeavy</li>
		</weaponTags>
	</Operation>

</Patch>