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

	<!-- === Ranged Tools === -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="VFEV_CryptoPistol"]/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>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="VFEV_CryptoRifle" or defName="VFEV_CryptoShotGun"]/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>

	<!-- === Crypto Pistol === -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>VFEV_CryptoPistol</defName>
		<statBases>
			<WorkToMake>17500</WorkToMake>
			<Mass>1.50</Mass>
			<Bulk>2.60</Bulk>
			<SwayFactor>1.07</SwayFactor>
			<ShotSpread>0.15</ShotSpread>
			<SightsEfficiency>0.8</SightsEfficiency>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>True</hasStandardCommand>
			<defaultProjectile>Bullet_CryptoPistol</defaultProjectile>
			<burstShotCount>3</burstShotCount>
			<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
			<warmupTime>0.5</warmupTime>
			<range>20</range>
			<soundCast>VFEV_CryptoPistolShot</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>14</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_CryptoPistol</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>CE_OneHandedWeapon</li>
		</weaponTags>
	</Operation>

	<!-- === Crypto Rifle === -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>VFEV_CryptoRifle</defName>
		<statBases>
			<Mass>3.0</Mass>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>1.10</SightsEfficiency>
			<ShotSpread>0.08</ShotSpread>
			<SwayFactor>1.20</SwayFactor>
			<Bulk>7.00</Bulk>
		</statBases>
		<Properties>
			<recoilAmount>1.51</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_CryptoRifle</defaultProjectile>
			<warmupTime>1.0</warmupTime>
			<range>55</range>
			<ticksBetweenBurstShots>4</ticksBetweenBurstShots>
			<burstShotCount>6</burstShotCount>
			<soundCast>VFEV_CryptoRifleShot</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>20</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_CryptoRifle</ammoSet>
		</AmmoUser>
		<FireModes>
			<aimedBurstShotCount>2</aimedBurstShotCount>
			<aiUseBurstMode>TRUE</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
	</Operation>
	
	<!-- === Crypto Rifle === -->
	
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>VFEV_CryptoShotGun</defName>
		<statBases>
			<Mass>3.5</Mass>
			<RangedWeapon_Cooldown>0.39</RangedWeapon_Cooldown>
			<SightsEfficiency>1.10</SightsEfficiency>
			<ShotSpread>0.14</ShotSpread>
			<SwayFactor>1.05</SwayFactor>
			<Bulk>7.00</Bulk>
		</statBases>
		<Properties>	
			<recoilAmount>2.87</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_CryptoShotgun</defaultProjectile>
			<burstShotCount>2</burstShotCount>
			<ticksBetweenBurstShots>12</ticksBetweenBurstShots>
			<warmupTime>0.5</warmupTime>
			<range>31</range>
			<soundCast>VFEV_CryptoRifleShot</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>8</magazineSize>
			<reloadOneAtATime>true</reloadOneAtATime>
			<reloadTime>0.85</reloadTime>
			<ammoSet>AmmoSet_CryptoShotgun</ammoSet>
		</AmmoUser>
		<FireModes>
			<aimedBurstShotCount>1</aimedBurstShotCount>
			<aiUseBurstMode>false</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
	</Operation>

</Patch>