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

	<!-- Melee Attacks -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[
			@Name="AM_FlamethrowerBase" or
			defName="AM_Gun_GoliathChargeBlaster" or
			defName="AM_Gun_GoliathNeedle" or
			@Name="AM_SiegeTurretBase" or
			@Name="AM_CryogenicGunBase"
			]/tools </xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>barrel</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>11.7</power>
					<cooldownTime>2.6</cooldownTime>
					<armorPenetrationBlunt>2.4</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[@Name="AM_DemolisherChargeBase"]</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>barrel</label>
					<capacities>
						<li>Blunt</li>
					</capacities>
					<power>11.7</power>
					<cooldownTime>2.6</cooldownTime>
					<armorPenetrationBlunt>2.4</armorPenetrationBlunt>
				</li>
			</tools>
		</value>
	</Operation>

	<!-- Flamethrower -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[@Name="AM_FlamethrowerBase"]/description</xpath>
		<value>
			<description>A prometheum jelly flamethrower. Short range, but it will cause uncontrollable fires if you let the fireworms come near.</description>
		</value>
	</Operation>

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>AM_Flamethrower</defName>
		<statBases>
			<Mass>20</Mass>
			<RangedWeapon_Cooldown>0.39</RangedWeapon_Cooldown>
			<SightsEfficiency>1.0</SightsEfficiency>
			<ShotSpread>4.0</ShotSpread>
			<SwayFactor>1.33</SwayFactor>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_Flamethrower_Prometheum</defaultProjectile>
			<warmupTime>1.3</warmupTime>
			<range>12</range>
			<minRange>2.9</minRange>
			<ticksBetweenBurstShots>4</ticksBetweenBurstShots>
			<burstShotCount>5</burstShotCount>
			<soundCast>HissFlamethrower</soundCast>
			<muzzleFlashScale>2</muzzleFlashScale>
			<ai_AvoidFriendlyFireRadius>5</ai_AvoidFriendlyFireRadius>
		</Properties>
		<AmmoUser>
			<magazineSize>100</magazineSize>
			<reloadTime>8</reloadTime>
			<ammoSet>AmmoSet_Flamethrower</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>NoSwitch</li>
		</weaponTags>
	</Operation>

	<!-- ========== Goliath HCB ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>AM_Gun_GoliathChargeBlaster</defName>
		<statBases>
			<Mass>35.00</Mass>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
			<SightsEfficiency>1</SightsEfficiency>
			<ShotSpread>0.01</ShotSpread>
			<SwayFactor>1.33</SwayFactor>
			<Bulk>13.00</Bulk>
		</statBases>
		<Properties>
			<recoilAmount>1.08</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_12x64mmCharged</defaultProjectile>
			<warmupTime>1.3</warmupTime>
			<range>75</range>
			<ticksBetweenBurstShots>6</ticksBetweenBurstShots>
			<burstShotCount>10</burstShotCount>
			<soundCast>Shot_ChargeBlaster</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>100</magazineSize>
			<reloadTime>9.2</reloadTime>
			<ammoSet>AmmoSet_12x64mmCharged</ammoSet>
		</AmmoUser>
		<FireModes>
			<aimedBurstShotCount>5</aimedBurstShotCount>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>CE_AI_Suppressive</li>
			<li>NoSwitch</li>
		</weaponTags>
	</Operation>

	<!-- ========== Goliath Needle Gun ========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>AM_Gun_GoliathNeedle</defName>
		<statBases>
			<RangedWeapon_Cooldown>0.38</RangedWeapon_Cooldown>
			<SightsEfficiency>2.36</SightsEfficiency>
			<ShotSpread>0.01</ShotSpread>
			<SwayFactor>0.87</SwayFactor>
			<Bulk>15.00</Bulk>
		</statBases>
		<Properties>
			<recoilAmount>1.80</recoilAmount>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_5x50mmCaseless_Sabot_HV</defaultProjectile>
			<warmupTime>1.6</warmupTime>
			<range>86</range>
			<ticksBetweenBurstShots>6</ticksBetweenBurstShots>
			<burstShotCount>4</burstShotCount>
			<soundCast>Shot_NeedleGun</soundCast>
			<soundCastTail>GunTail_Heavy</soundCastTail>
			<muzzleFlashScale>9</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>20</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_5x50mmCaseless_HV</ammoSet>
		</AmmoUser>
		<FireModes>
			<aimedBurstShotCount>2</aimedBurstShotCount>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>CE_AI_Rifle</li>
			<li>NoSwitch</li>
		</weaponTags>
	</Operation>

	<!-- Cryogenic Gun -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>AM_CryogenicGun</defName>
		<statBases>
			<Mass>20</Mass>
			<RangedWeapon_Cooldown>1.0</RangedWeapon_Cooldown>
			<SightsEfficiency>1.0</SightsEfficiency>
			<ShotSpread>1.0</ShotSpread>
			<SwayFactor>1.33</SwayFactor>
			<Bulk>1.00</Bulk>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>AM_CryoBulletCE</defaultProjectile>
			<warmupTime>1.5</warmupTime>
			<range>15</range>
			<ticksBetweenBurstShots>5</ticksBetweenBurstShots>
			<burstShotCount>3</burstShotCount>
			<soundCast>AM_Cryogun</soundCast>
			<muzzleFlashScale>2</muzzleFlashScale>
		</Properties>
		<AmmoUser>
			<magazineSize>80</magazineSize>
			<reloadTime>4</reloadTime>
		</AmmoUser>
		<FireModes>
			<aiAimMode>Snapshot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>NoSwitch</li>
		</weaponTags>
	</Operation>

	<!-- Siege Turret -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>AM_SiegebreakerTurret</defName>
		<statBases>
			<Mass>50.00</Mass>
			<RangedWeapon_Cooldown>2</RangedWeapon_Cooldown>
			<SightsEfficiency>2.5</SightsEfficiency>
			<ShotSpread>0.01</ShotSpread>
			<SwayFactor>1.33</SwayFactor>
			<Bulk>1.00</Bulk>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_90mmCannonShell_HE</defaultProjectile>
			<warmupTime>4.5</warmupTime>
			<range>92</range>
			<minRange>8</minRange>
			<soundCast>120mm</soundCast>
			<muzzleFlashScale>2</muzzleFlashScale>
			<ai_IsBuildingDestroyer>true</ai_IsBuildingDestroyer>
		</Properties>
		<AmmoUser>
			<magazineSize>1</magazineSize>
			<AmmoGenPerMagOverride>2</AmmoGenPerMagOverride>
			<reloadTime>1.6</reloadTime>
			<ammoSet>AmmoSet_90mmCannonShell</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>NoSwitch</li>
		</weaponTags>
	</Operation>

	<!-- Demolisher Charge Gun -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>AM_DemolisherChargeBase</defName>
		<statBases>
			<Mass>20</Mass>
			<RangedWeapon_Cooldown>2.13</RangedWeapon_Cooldown>
			<SightsEfficiency>1</SightsEfficiency>
			<ShotSpread>0.01</ShotSpread>
			<SwayFactor>1.0</SwayFactor>
			<Bulk>1.00</Bulk>
		</statBases>
		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_164x284mmDemo</defaultProjectile>
			<warmupTime>2.0</warmupTime>
			<range>8</range>
			<minRange>4</minRange>
			<soundCast>AM_DemolisherCharge</soundCast>
			<muzzleFlashScale>14</muzzleFlashScale>
			<ai_IsBuildingDestroyer>true</ai_IsBuildingDestroyer>
		</Properties>
		<AmmoUser>
			<magazineSize>2</magazineSize>
			<reloadTime>4</reloadTime>
			<ammoSet>AmmoSet_164x284mmDemo</ammoSet>
		</AmmoUser>
		<FireModes>
			<aiAimMode>AimedShot</aiAimMode>
		</FireModes>
		<weaponTags>
			<li>NoSwitch</li>
		</weaponTags>
	</Operation>

</Patch>