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

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="Feral_ScatterCannon" or
			defName="Feral_RivetCannon" or
			defName="Feral_DMG"
			] </xpath>
		<value>
			<tools Inherit="False">
				<li Class="CombatExtended.ToolCE">
					<label>stock</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>13</power>
					<cooldownTime>4</cooldownTime>
					<chanceFactor>1.33</chanceFactor>
					<armorPenetrationBlunt>5</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Stock</linkedBodyPartsGroup>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>barrel</label>
					<capacities>
						<li>Poke</li>
					</capacities>
					<power>21</power>
					<cooldownTime>1.55</cooldownTime>
					<armorPenetrationBlunt>8.45</armorPenetrationBlunt>
					<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- ==========  Mutant DMG =========== -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Feral_DMG</defName>
		<statBases>
			<Mass>10</Mass>
			<RangedWeapon_Cooldown>0.56</RangedWeapon_Cooldown>
			<SightsEfficiency>0.8</SightsEfficiency>
			<ShotSpread>0.8</ShotSpread>
			<SwayFactor>1.72</SwayFactor>
			<Bulk>12</Bulk>
		</statBases>
		<Properties>
			<recoilAmount>1.1</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_303British_FMJ</defaultProjectile>
			<warmupTime>1.4</warmupTime>
			<range>60</range>
			<ticksBetweenBurstShots>8</ticksBetweenBurstShots>
			<burstShotCount>10</burstShotCount>
			<soundCast>ShotCrucifier</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>14</muzzleFlashScale>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
			<recoilPattern>Mounted</recoilPattern>
		</Properties>
		<AmmoUser>
			<magazineSize>200</magazineSize>
			<reloadTime>20</reloadTime>
			<ammoSet>AmmoSet_303British</ammoSet>
		</AmmoUser>
		<FireModes>
			<aimedBurstShotCount>20</aimedBurstShotCount>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>SuppressFire</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>Hellmaker</li>
		</weaponTags>
	</Operation>

	<!-- ========== Scatterstick Shotgun ========== -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Feral_ScatterCannon</defName>
		<statBases>
			<Mass>8</Mass>
			<RangedWeapon_Cooldown>0.39</RangedWeapon_Cooldown>
			<ShotSpread>0.25</ShotSpread>
			<SwayFactor>1.26</SwayFactor>
			<Bulk>10</Bulk>
			<SightsEfficiency>0.8</SightsEfficiency>
		</statBases>
		<Properties>
			<recoilAmount>1.74</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_Feral_Scrap</defaultProjectile>
			<warmupTime>0.6</warmupTime>
			<range>18</range>
			<soundCast>ShotScatterStick</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>12</muzzleFlashScale>
			<ticksBetweenBurstShots>1</ticksBetweenBurstShots>
			<ammoConsumedPerShotCount>5</ammoConsumedPerShotCount>
		</Properties>
		<AmmoUser>
			<magazineSize>20</magazineSize>
			<reloadTime>3.5</reloadTime>
			<ammoSet>AmmoSet_Feral_Scrap</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>SuppressFire</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>Ogrenaut</li>
		</weaponTags>
	</Operation>

	<!-- ========== Rivet Gun ========== -->
	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Feral_RivetCannon</defName>
		<statBases>
			<Mass>8</Mass>
			<RangedWeapon_Cooldown>0.38</RangedWeapon_Cooldown>
			<SightsEfficiency>0.89</SightsEfficiency>
			<ShotSpread>0.17</ShotSpread>
			<SwayFactor>1.26</SwayFactor>
			<Bulk>11.03</Bulk>
		</statBases>
		<Properties>
			<recoilAmount>0.92</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_Feral_Rivet</defaultProjectile>
			<warmupTime>1.1</warmupTime>
			<range>48</range>
			<burstShotCount>8</burstShotCount>
			<ticksBetweenBurstShots>2</ticksBetweenBurstShots>
			<soundCast>ShotCrucifier</soundCast>
			<soundCastTail>GunTail_Medium</soundCastTail>
			<muzzleFlashScale>12</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>80</magazineSize>
			<reloadTime>6.7</reloadTime>
			<ammoSet>AmmoSet_Feral_Rivet</ammoSet>
		</AmmoUser>
		<FireModes>
			<aimedBurstShotCount>8</aimedBurstShotCount>
			<aiUseBurstMode>TRUE</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>Ogrenaut</li>
		</weaponTags>
	</Operation>

	<!-- ==========  Smoke Spore =========== -->
	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Bullet_SporeSmoker"]/thingClass</xpath>
		<value>
			<thingClass>CombatExtended.ProjectileCE_Explosive</thingClass>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="Bullet_SporeSmoker"]/projectile</xpath>
		<value>
			<projectile Class="CombatExtended.ProjectilePropertiesCE">
				<damageDef>Spore</damageDef>
				<damageAmountBase>5</damageAmountBase>
				<explosionRadius>3.2</explosionRadius>
				<speed>54</speed>
				<postExplosionGasType>BlindSmoke</postExplosionGasType>
			</projectile>
		</value>
	</Operation>

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>Feral_SporeSmoker</defName>
		<statBases>
			<Mass>1</Mass>
			<RangedWeapon_Cooldown>6.5</RangedWeapon_Cooldown>
			<SightsEfficiency>1</SightsEfficiency>
			<ShotSpread>0.8</ShotSpread>
			<SwayFactor>1.53</SwayFactor>
			<Bulk>1</Bulk>
		</statBases>
		<Properties>
			<recoilAmount>1</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_SporeSmoker</defaultProjectile>
			<warmupTime>2</warmupTime>
			<range>36</range>
			<ticksBetweenBurstShots>8</ticksBetweenBurstShots>
			<burstShotCount>1</burstShotCount>
			<soundCast>Shriker</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>0</muzzleFlashScale>
		</Properties>
		<FireModes>
			<aiUseBurstMode>FALSE</aiUseBurstMode>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>SmokeSpore</li>
		</weaponTags>
	</Operation>
</Patch>
