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

	<Operation Class="PatchOperationFindMod">
		<mods>
			<li>Biotech</li>
		</mods>

		<match Class="PatchOperationSequence">
			<operations>

				<!-- Orbital Hellsphere -->

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_Gun_HellsphereOrbital"]/tools</xpath>
					<value>
						<tools>
							<li Class="CombatExtended.ToolCE">
								<label>barrel</label>
								<capacities>
									<li>Blunt</li>
								</capacities>
								<power>10</power>
								<cooldownTime>3.0</cooldownTime>
								<armorPenetrationBlunt>3.5</armorPenetrationBlunt>
								<linkedBodyPartsGroup>Barrel</linkedBodyPartsGroup>
							</li>
						</tools>
					</value>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_Gun_CoilLance"]/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>
				</li>

				<li Class="CombatExtended.PatchOperationMakeGunCECompatible">
					<defName>AM_Gun_CoilLance</defName>
					<statBases>
						<Mass>10.0</Mass>
						<Bulk>10.0</Bulk>
						<SwayFactor>2.0</SwayFactor>
						<ShotSpread>0.1</ShotSpread>
						<SightsEfficiency>1</SightsEfficiency>
						<RangedWeapon_Cooldown>0.86</RangedWeapon_Cooldown>
					</statBases>
					<Properties>
						<recoilAmount>2.0</recoilAmount>
						<verbClass>CombatExtended.Verb_ShootCE</verbClass>
						<hasStandardCommand>True</hasStandardCommand>
						<defaultProjectile>Bullet_CoilLance</defaultProjectile>
						<warmupTime>2.4</warmupTime>
						<range>62</range>
						<soundCast>AM_Gauss</soundCast>
						<soundCastTail>GunTail_Medium</soundCastTail>
						<muzzleFlashScale>9</muzzleFlashScale>
						<targetParams>
							<canTargetLocations>true</canTargetLocations>
							<canTargetPawns>true</canTargetPawns>
							<canTargetBuildings>true</canTargetBuildings>
						</targetParams>
					</Properties>
					<AmmoUser>
						<magazineSize>10</magazineSize>
						<reloadTime>5.2</reloadTime>
						<ammoSet>AmmoSet_CoilLance</ammoSet>
					</AmmoUser>
					<FireModes>
						<aiAimMode>AimedShot</aiAimMode>
					</FireModes>
					<weaponTags>
						<li>NoSwitch</li>
					</weaponTags>
				</li>

				<li Class="CombatExtended.PatchOperationMakeGunCECompatible">
					<defName>AM_Gun_SuperHeavyChargeBlaster</defName>
					<statBases>
						<Mass>40.00</Mass>
						<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
						<SightsEfficiency>1</SightsEfficiency>
						<ShotSpread>0.01</ShotSpread>
						<SwayFactor>1.5</SwayFactor>
						<Bulk>15.00</Bulk>
					</statBases>
					<Properties>
						<recoilAmount>1.2</recoilAmount>
						<verbClass>CombatExtended.Verb_ShootCE</verbClass>
						<hasStandardCommand>true</hasStandardCommand>
						<defaultProjectile>Bullet_12x64mmHyper</defaultProjectile>
						<warmupTime>1.3</warmupTime>
						<range>75</range>
						<ticksBetweenBurstShots>6</ticksBetweenBurstShots>
						<burstShotCount>15</burstShotCount>
						<soundCast>AM_Shot_ChargeBlaster_Red</soundCast>
						<soundCastTail>GunTail_Heavy</soundCastTail>
						<muzzleFlashScale>9</muzzleFlashScale>
					</Properties>
					<AmmoUser>
						<magazineSize>150</magazineSize>
						<reloadTime>9.2</reloadTime>
						<ammoSet>AmmoSet_12x64mmHyper</ammoSet>
					</AmmoUser>
					<FireModes>
						<aiAimMode>AimedShot</aiAimMode>
						<aimedBurstShotCount>10</aimedBurstShotCount>
					</FireModes>
					<weaponTags>
						<li>CE_AI_Suppressive</li>
						<li>NoSwitch</li>
					</weaponTags>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_Gun_SuperHeavyChargeBlaster"]/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>
				</li>

				<li Class="CombatExtended.PatchOperationMakeGunCECompatible">
					<defName>AM_Gun_AcidSpewer</defName>
					<statBases>
						<RangedWeapon_Cooldown>0.38</RangedWeapon_Cooldown>
						<SightsEfficiency>1</SightsEfficiency>
						<ShotSpread>0.01</ShotSpread>
						<SwayFactor>0.81</SwayFactor>
						<Bulk>15.00</Bulk>
					</statBases>
					<Properties>
						<recoilAmount>1.8</recoilAmount>
						<verbClass>CombatExtended.Verb_ShootCE</verbClass>
						<hasStandardCommand>true</hasStandardCommand>
						<defaultProjectile>Bullet_5x50mmCaseless_Acidic</defaultProjectile>
						<warmupTime>1.3</warmupTime>
						<range>55</range>
						<ticksBetweenBurstShots>6</ticksBetweenBurstShots>
						<burstShotCount>4</burstShotCount>
						<soundCast>AM_PoisonBreath</soundCast>
						<soundCastTail>GunTail_Heavy</soundCastTail>
						<muzzleFlashScale>9</muzzleFlashScale>
					</Properties>
					<AmmoUser>
						<magazineSize>30</magazineSize>
						<reloadTime>4</reloadTime>
						<ammoSet>AmmoSet_5x50mmCaselessAcidic</ammoSet>
					</AmmoUser>
					<FireModes>
						<aiAimMode>AimedShot</aiAimMode>
						<aimedBurstShotCount>2</aimedBurstShotCount>
					</FireModes>
					<weaponTags>
						<li>CE_AI_Rifle</li>
						<li>NoSwitch</li>
					</weaponTags>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_Gun_AcidSpewer"]/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>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_Gun_HeavyLaser"]/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>
				</li>

				<li Class="PatchOperationRemove">
					<xpath>Defs/ThingDef[defName="AM_Gun_HeavyLaser"]/comps/li[@Class="VEF.Weapons.CompProperties_LaserCapacitor"]</xpath>
				</li>

				<li Class="CombatExtended.PatchOperationMakeGunCECompatible">
					<defName>AM_Gun_HeavyLaser</defName>
					<statBases>
						<Mass>3.50</Mass>
						<Bulk>10.00</Bulk>
						<SwayFactor>1.35</SwayFactor>
						<ShotSpread>0.05</ShotSpread>
						<SightsEfficiency>1.10</SightsEfficiency>
						<RangedWeapon_Cooldown>0.35</RangedWeapon_Cooldown>
					</statBases>
					<Properties>
						<recoilAmount>0.01</recoilAmount>
						<verbClass>CombatExtended.Verb_ShootCE</verbClass>
						<hasStandardCommand>True</hasStandardCommand>
						<defaultProjectile>Bullet_HeavyLaser</defaultProjectile>
						<warmupTime>1</warmupTime>
						<range>62</range>
						<burstShotCount>3</burstShotCount>
						<ticksBetweenBurstShots>4</ticksBetweenBurstShots>
						<soundCast>AM_HeavyLaser</soundCast>
						<soundCastTail>GunTail_Heavy</soundCastTail>
						<muzzleFlashScale>14</muzzleFlashScale>
						<targetParams>
							<canTargetLocations>true</canTargetLocations>
						</targetParams>
					</Properties>
					<AmmoUser>
						<magazineSize>60</magazineSize>
						<reloadTime>4</reloadTime>
						<ammoSet>AmmoSet_HeavyLaser</ammoSet>
					</AmmoUser>
					<FireModes>
						<aiAimMode>AimedShot</aiAimMode>
						<aiUseBurstMode>True</aiUseBurstMode>
						<aimedBurstShotCount>2</aimedBurstShotCount>
					</FireModes>
					<weaponTags>
						<li>NoSwitch</li>
					</weaponTags>
				</li>

				<!-- Siegemelter Flamethrower -->

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_SiegemelterTurret"]/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>
				</li>

				<li Class="CombatExtended.PatchOperationMakeGunCECompatible">
					<defName>AM_SiegemelterTurret</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>25</range>
						<minRange>3.9</minRange>
						<ticksBetweenBurstShots>4</ticksBetweenBurstShots>
						<burstShotCount>10</burstShotCount>
						<soundCast>AM_PoisonBreath</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>
						<aimedBurstShotCount>5</aimedBurstShotCount>
					</FireModes>
					<weaponTags>
						<li>NoSwitch</li>
					</weaponTags>
				</li>

				<!-- Tesla Gun -->

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_TeslaGun"]/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>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_TeslaGun"]/verbs/li/range</xpath>
					<value>
						<range>31</range>
					</value>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_Bullet_Tesla"]/projectile/damageAmountBase</xpath>
					<value>
						<damageAmountBase>1</damageAmountBase>
					</value>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_Bullet_Tesla"]/modExtensions/li[@Class="VEF.Weapons.TeslaChainingProps"]/damageDef</xpath>
					<value>
						<damageDef>Smoke</damageDef>
					</value>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_Bullet_Tesla"]/modExtensions/li[@Class="VEF.Weapons.TeslaChainingProps"]/maxLifetime</xpath>
					<value>
						<maxLifetime>15</maxLifetime>
					</value>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_Bullet_Tesla"]/modExtensions/li[@Class="VEF.Weapons.TeslaChainingProps"]/maxBounceCount</xpath>
					<value>
						<maxBounceCount>2</maxBounceCount>
					</value>
				</li>

				<!-- Starfire Cannon -->

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_StarfireTurret"]/verbs/li/range</xpath>
					<value>
						<range>75</range>
					</value>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_StarfireTurret"]/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>
				</li>

				<!-- Tactical Shotgun -->

				<li Class="CombatExtended.PatchOperationMakeGunCECompatible">
					<defName>AM_Gun_TacticalShotgun</defName>
					<statBases>
						<RangedWeapon_Cooldown>0.4</RangedWeapon_Cooldown>
						<SightsEfficiency>1</SightsEfficiency>
						<ShotSpread>0.15</ShotSpread>
						<SwayFactor>0.65</SwayFactor>
						<Bulk>8.00</Bulk>
					</statBases>
					<Properties>
						<recoilAmount>2.42</recoilAmount>
						<verbClass>CombatExtended.Verb_ShootCE</verbClass>
						<hasStandardCommand>true</hasStandardCommand>
						<defaultProjectile>Bullet_410Bore_Buck</defaultProjectile>
						<warmupTime>0.8</warmupTime>
						<range>16</range>
						<burstShotCount>3</burstShotCount>
						<ticksBetweenBurstShots>9</ticksBetweenBurstShots>
						<soundCast>Shot_Shotgun_NoRack</soundCast>
						<soundCastTail>GunTail_Medium</soundCastTail>
						<muzzleFlashScale>6</muzzleFlashScale>
					</Properties>
					<AmmoUser>
						<magazineSize>18</magazineSize>
						<reloadTime>4.9</reloadTime>
						<ammoSet>AmmoSet_410Bore</ammoSet>
					</AmmoUser>
					<FireModes>
						<aiAimMode>Snapshot</aiAimMode>
						<aimedBurstShotCount>2</aimedBurstShotCount>
					</FireModes>
					<weaponTags>
						<li>NoSwitch</li>
					</weaponTags>
				</li>

				<!-- Beam Graser Cannon -->

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_BeamGraserCannon"]/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>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_BeamGraserCannon"]/statBases/RangedWeapon_Cooldown</xpath>
					<value>
						<RangedWeapon_Cooldown>1.0</RangedWeapon_Cooldown>
					</value>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_BeamGraserCannon"]/verbs/li/warmupTime</xpath>
					<value>
						<warmupTime>2.0</warmupTime>
					</value>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_BeamGraserCannon"]/verbs/li/range</xpath>
					<value>
						<range>68</range>
					</value>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_BeamGraserCannon"]/verbs/li/burstShotCount</xpath>
					<value>
						<burstShotCount>20</burstShotCount>
					</value>
				</li>

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_BeamGraserCannon"]/verbs/li/ticksBetweenBurstShots</xpath>
					<value>
						<ticksBetweenBurstShots>10</ticksBetweenBurstShots>
					</value>
				</li>

				<!-- Change the base away from the needle gun to prevent it inheriting incorrect mag size. -->
				<li Class="PatchOperationAttributeSet">
					<xpath>Defs/ThingDef[defName="AM_MechanoidGunRotaryNeedle"]</xpath>
					<attribute>ParentName</attribute>
					<value>BaseWeapon</value>
				</li>

				<!-- Add back the important stuff it still needed. Clunky, but it works. -->
				<li Class="PatchOperationAdd">
					<xpath>Defs/ThingDef[defName="AM_MechanoidGunRotaryNeedle"]</xpath>
					<value>
						<techLevel>Spacer</techLevel>
						<tradeability>None</tradeability>
						<destroyOnDrop>true</destroyOnDrop>
						<relicChance>0</relicChance>
						<weaponClasses>
							<li>RangedHeavy</li>
							<li>LongShots</li>
						</weaponClasses>
					</value>
				</li>

				<li Class="PatchOperationAdd">
					<xpath>Defs/ThingDef[defName="AM_MechanoidGunRotaryNeedle"]/graphicData</xpath>
					<value>
						<graphicClass>Graphic_Single</graphicClass>
					</value>
				</li>

				<li Class="CombatExtended.PatchOperationMakeGunCECompatible">
					<defName>AM_MechanoidGunRotaryNeedle</defName>
					<statBases>
						<Mass>5.00</Mass>
						<RangedWeapon_Cooldown>0.35</RangedWeapon_Cooldown>
						<SightsEfficiency>1</SightsEfficiency>
						<ShotSpread>0.05</ShotSpread>
						<SwayFactor>1.0</SwayFactor>
						<Bulk>10</Bulk>
						<MarketValue>1400</MarketValue>
					</statBases>
					<Properties>
						<recoilAmount>1.17</recoilAmount>
						<verbClass>CombatExtended.Verb_ShootCE</verbClass>
						<hasStandardCommand>true</hasStandardCommand>
						<defaultProjectile>Bullet_5x50mmCaseless_Sabot_LV</defaultProjectile>
						<warmupTime>2.1</warmupTime>
						<range>55</range>
						<burstShotCount>20</burstShotCount>
						<ticksBetweenBurstShots>6</ticksBetweenBurstShots>
						<soundCast>AM_NeedleShot</soundCast>
						<soundCastTail>GunTail_Heavy</soundCastTail>
						<muzzleFlashScale>9</muzzleFlashScale>
					</Properties>
					<weaponTags>
						<li>NoSwitch</li>
						<li>MechanoidGunLongRange</li>
					</weaponTags>
					<AmmoUser>
						<magazineSize>100</magazineSize>
						<reloadTime>9.2</reloadTime>
						<ammoSet>AmmoSet_5x50mmCaseless_LV</ammoSet>
					</AmmoUser>
					<FireModes>
						<aiAimMode>Snapshot</aiAimMode>
						<aimedBurstShotCount>10</aimedBurstShotCount>
					</FireModes>
				</li>

				<li Class="PatchOperationAdd">
					<xpath>Defs/ThingDef[defName="AM_MechanoidGunRotaryNeedle"]</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>
				</li>

				<!-- Mini Needle Gun -->

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_Gun_MiniNeedle"]/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>
				</li>

				<li Class="CombatExtended.PatchOperationMakeGunCECompatible">
					<defName>AM_Gun_MiniNeedle</defName>
					<statBases>
						<RangedWeapon_Cooldown>0.38</RangedWeapon_Cooldown>
						<SightsEfficiency>2.06</SightsEfficiency>
						<ShotSpread>0.05</ShotSpread>
						<SwayFactor>0.6</SwayFactor>
						<Bulk>7.00</Bulk>
					</statBases>
					<Properties>
						<recoilAmount>1.4</recoilAmount>
						<verbClass>CombatExtended.Verb_ShootCE</verbClass>
						<hasStandardCommand>true</hasStandardCommand>
						<defaultProjectile>Bullet_5x50mmCaseless_Sabot_LV</defaultProjectile>
						<warmupTime>1.35</warmupTime>
						<range>75</range>
						<soundCast>Shot_NeedleGun</soundCast>
						<soundCastTail>GunTail_Heavy</soundCastTail>
						<muzzleFlashScale>9</muzzleFlashScale>
					</Properties>
					<AmmoUser>
						<magazineSize>5</magazineSize>
						<AmmoGenPerMagOverride>10</AmmoGenPerMagOverride>
						<reloadTime>4</reloadTime>
						<ammoSet>AmmoSet_5x50mmCaseless_LV</ammoSet>
					</AmmoUser>
					<FireModes>
						<aiAimMode>AimedShot</aiAimMode>
					</FireModes>
					<weaponTags>
						<li>NoSwitch</li>
					</weaponTags>
				</li>

				<!-- Mortar -->

				<li Class="PatchOperationReplace">
					<xpath>Defs/ThingDef[defName="AM_MechanoidMortar"]/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>muzzle</label>
								<capacities>
									<li>Poke</li>
								</capacities>
								<power>8</power>
								<cooldownTime>1.55</cooldownTime>
								<armorPenetrationBlunt>2.755</armorPenetrationBlunt>
								<linkedBodyPartsGroup>Muzzle</linkedBodyPartsGroup>
							</li>
						</tools>
					</value>
				</li>

				<li Class="CombatExtended.PatchOperationMakeGunCECompatible">
					<defName>AM_MechanoidMortar</defName>
					<statBases>
						<Mass>3.0</Mass>
						<Bulk>6.0</Bulk>
						<SwayFactor>1.0</SwayFactor>
						<ShotSpread>0.16</ShotSpread>
						<SightsEfficiency>1.0</SightsEfficiency>
						<RangedWeapon_Cooldown>2.0</RangedWeapon_Cooldown>
					</statBases>
					<Properties>
						<verbClass>CombatExtended.Verb_ShootMortarCE</verbClass>
						<forceNormalTimeSpeed>false</forceNormalTimeSpeed>
						<hasStandardCommand>true</hasStandardCommand>
						<defaultProjectile>Bullet_66mmThermalBolt_Incendiary</defaultProjectile>
						<warmupTime>3</warmupTime>
						<minRange>10</minRange>
						<range>55</range>
						<soundCast>Mortar_LaunchA</soundCast>
						<muzzleFlashScale>16</muzzleFlashScale>
						<circularError>3</circularError>
						<indirectFirePenalty>0.3</indirectFirePenalty>
						<ai_IsBuildingDestroyer>True</ai_IsBuildingDestroyer>
						<ignorePartialLoSBlocker>True</ignorePartialLoSBlocker>
						<targetParams>
							<canTargetLocations>True</canTargetLocations>
						</targetParams>
					</Properties>
					<AmmoUser>
						<magazineSize>1</magazineSize>
						<AmmoGenPerMagOverride>2</AmmoGenPerMagOverride>
						<reloadTime>1.6</reloadTime>
						<ammoSet>AmmoSet_66mmThermalBolt</ammoSet>
					</AmmoUser>
					<FireModes>
						<aiAimMode>Snapshot</aiAimMode>
					</FireModes>
					<weaponTags>
						<li>NoSwitch</li>
					</weaponTags>
				</li>

				<li Class="PatchOperationAdd">
					<xpath>Defs/ThingDef[defName="AM_MechanoidMortar"]/comps</xpath>
					<value>
						<li Class="CombatExtended.CompProperties_Charges">
							<chargeSpeeds>
								<li>30</li>
								<li>50</li>
								<li>70</li>
								<li>90</li>
							</chargeSpeeds>
						</li>
					</value>
				</li>

			</operations>
		</match>
	</Operation>

</Patch>