<?xml version="1.0" encoding="utf-8"?>
<Patch>
	<!-- ========== UAC Gauss Cannon ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RHEx_DOOM_GAUSSCannon</defName>
		<statBases>
			<Mass>12.50</Mass>
			<RangedWeapon_Cooldown>0.56</RangedWeapon_Cooldown>
			<SightsEfficiency>2.20</SightsEfficiency>
			<ShotSpread>0.04</ShotSpread>
			<SwayFactor>1.78</SwayFactor>
			<Bulk>12</Bulk>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_Doom2016GaussCannonFlechette</defaultProjectile>
			<warmupTime>0.6</warmupTime>
			<ammoConsumedPerShotCount>30</ammoConsumedPerShotCount>
			<range>126</range>
			<soundCast>RHShot_DOOMGAUSS</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<stopBurstWithoutLos>false</stopBurstWithoutLos>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
			<muzzleFlashScale>15</muzzleFlashScale>
		</Properties>

		<AmmoUser>
			<magazineSize>150</magazineSize>
			<reloadTime>4.9</reloadTime>
			<ammoSet>AmmoSet_Doom2016GaussCannon</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
	</Operation>

	<!-- ========== BFG 9000 ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RHEx_DOOM_BFG9000Gun</defName>
		<statBases>
			<Mass>10.00</Mass>
			<RangedWeapon_Cooldown>0.35</RangedWeapon_Cooldown>
			<SightsEfficiency>1.00</SightsEfficiency>
			<ShotSpread>0.01</ShotSpread>
			<SwayFactor>0.88</SwayFactor>
			<Bulk>13.00</Bulk>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_Doom2016Bfg9000Gun</defaultProjectile>
			<warmupTime>1.3</warmupTime>
			<soundAiming>RHGun_DOOMBFGAiming</soundAiming>
			<ai_AvoidFriendlyFireRadius>5</ai_AvoidFriendlyFireRadius>
			<range>62</range>
			<soundCast>RHShot_DOOMBFG</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<onlyManualCast>false</onlyManualCast>
			<muzzleFlashScale>20</muzzleFlashScale>
			<stopBurstWithoutLos>false</stopBurstWithoutLos>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>

		<AmmoUser>
			<magazineSize>3</magazineSize>
			<reloadTime>4.9</reloadTime>
			<ammoSet>AmmoSet_Doom2016Bfg9000Gun</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
	</Operation>

	<!-- ========== UAC Rocket Launcher ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RHEx_DOOM_RocketLauncher</defName>
		<statBases>
			<Mass>8.00</Mass>
			<RangedWeapon_Cooldown>1.50</RangedWeapon_Cooldown>
			<SightsEfficiency>1.00</SightsEfficiency>
			<ShotSpread>0.2</ShotSpread>
			<SwayFactor>1.82</SwayFactor>
			<Bulk>11.20</Bulk>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_Doom2016Rocket_HEAT</defaultProjectile>
			<warmupTime>1.9</warmupTime>
			<ai_AvoidFriendlyFireRadius>5</ai_AvoidFriendlyFireRadius>
			<range>40</range>
			<soundCast>RHShot_DOOMRocketLauncher</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<onlyManualCast>true</onlyManualCast>
			<stopBurstWithoutLos>false</stopBurstWithoutLos>
			<muzzleFlashScale>15</muzzleFlashScale>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>

		<AmmoUser>
			<magazineSize>6</magazineSize>
			<reloadTime>5.1</reloadTime>
			<ammoSet>AmmoSet_Doom2016Rocket</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>

	</Operation>

	<!-- ========== UAC Grenade Launcher ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>RHEx_UACGrenadeLauncher</defName>
		<statBases>
			<Mass>5.30</Mass>
			<RangedWeapon_Cooldown>0.39</RangedWeapon_Cooldown>
			<SightsEfficiency>1.10</SightsEfficiency>
			<ShotSpread>0.18</ShotSpread>
			<SwayFactor>1.31</SwayFactor>
			<Bulk>7.67</Bulk>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_40x46mmGrenade_HE</defaultProjectile>
			<warmupTime>1</warmupTime>
			<range>40</range>
			<soundCast>RHShot_DOOMGrenadeLauncher</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<stopBurstWithoutLos>false</stopBurstWithoutLos>
			<muzzleFlashScale>15</muzzleFlashScale>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>

		<AmmoUser>
			<magazineSize>20</magazineSize>
			<reloadTime>5.1</reloadTime>
			<ammoSet>AmmoSet_40x46mmGrenade</ammoSet>
		</AmmoUser>

		<FireModes>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>SuppressFire</aiAimMode>
		</FireModes>

	</Operation>

	<!-- == Shared patches for firearm melee tools == -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
			defName="RHEx_DOOM_GAUSSCannon" or
			defName="RHEx_UACGrenadeLauncher"
			]/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="RHEx_DOOM_BFG9000Gun" or
			defName="RHEx_DOOM_RocketLauncher"
			]/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>