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

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>AT_hydroheliumion_A</defName>
		<statBases>
			<SightsEfficiency>1</SightsEfficiency>
			<ShotSpread>0.07</ShotSpread>
			<SwayFactor>1.79</SwayFactor>
			<Bulk>10.03</Bulk>
			<RangedWeapon_Cooldown>0.36</RangedWeapon_Cooldown>
		</statBases>

		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_AntyRedAcidLauncher</defaultProjectile>
			<warmupTime>1.2</warmupTime>
			<range>51</range>
			<ammoConsumedPerShotCount>20</ammoConsumedPerShotCount>
			<soundCast>ShotAnty_G</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>8</muzzleFlashScale>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>

		<AmmoUser>
			<magazineSize>120</magazineSize>
			<reloadTime>7.8</reloadTime>
			<ammoSet>AmmoSet_AntyRedAcidLauncher</ammoSet>
		</AmmoUser>
		<FireModes>
		</FireModes>
	</Operation>

	<Operation Class="PatchOperationRemove"> <!-- AT_Proty_spawner can't be CE patched via xml the comp break -->
		<xpath>Defs/ThingDef[defName="AT_Proty_spawner"]/equippedStatOffsets/MoveSpeed </xpath>
	</Operation>

	<!-- ========== Line Rifle =========== -->

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AT_hydroheliumion_B"]</xpath>
		<value>
			<ThingDef ParentName="BaseMakeableGun_Anty">
				<defName>AT_hydroheliumion_B</defName>
				<label>Red Burst Line Rifle</label>
				<description>It is a weapon developed by Anties to deal with targets with thick armor or strong body itself, such as mechanoids.\n\n Unlike conventional acid weapons, it fires Red Burst, a compound of Anty-acid and Refleum, rather than Anty-acid. Exhibits powerful power.</description>
				<graphicData>
					<texPath>Things/Weapons/AT_hydroheliumion_B</texPath>
					<graphicClass>Graphic_Single</graphicClass>
					<shaderType>TransparentPostLight</shaderType>
				</graphicData>
				<soundInteract>hydroheliumion_A</soundInteract>
				<statBases>
					<WorkToMake>90000</WorkToMake>
					<SightsEfficiency>1</SightsEfficiency>
					<ShotSpread>0.14</ShotSpread>
					<SwayFactor>1.51</SwayFactor>
					<Bulk>9.60</Bulk>
					<Mass>5.45</Mass>
					<RangedWeapon_Cooldown>0.38</RangedWeapon_Cooldown>
				</statBases>
				<equippedAngleOffset>45</equippedAngleOffset>
				<weaponTags>
					<li>hydroheliumion_B</li>
				</weaponTags>
				<costList>
					<AntyExoskeleton>80</AntyExoskeleton>
					<Refleum>15</Refleum>
					<Uranium>20</Uranium>
					<ComponentSpacer>4</ComponentSpacer>
					<Anty_Recyclecore>1</Anty_Recyclecore>
				</costList>
				<verbs>
					<li Class="CombatExtended.VerbPropertiesCE">
						<recoilAmount>2.36</recoilAmount>
						<verbClass>CombatExtended.Verb_ShootCE</verbClass>
						<hasStandardCommand>true</hasStandardCommand>
						<defaultProjectile>Bullet_AntyRedAcidLine</defaultProjectile>
						<burstShotCount>3</burstShotCount>
						<ticksBetweenBurstShots>9</ticksBetweenBurstShots>
						<warmupTime>0.6</warmupTime>
						<range>16</range>
						<soundCast>ShotAnty_G</soundCast>
						<soundCastTail>GunTail_Light</soundCastTail>
						<muzzleFlashScale>9</muzzleFlashScale>
					</li>
				</verbs>
				<comps>
					<li Class="CombatExtended.CompProperties_AmmoUser">
						<magazineSize>10</magazineSize>
						<reloadTime>4</reloadTime>
						<ammoSet>AmmoSet_AntyRedAcidLine</ammoSet>
					</li>
					<li Class="CombatExtended.CompProperties_FireModes">
						<aimedBurstShotCount>2</aimedBurstShotCount>
					</li>
				</comps>
				<recipeMaker>
					<skillRequirements>
						<Crafting>10</Crafting>
						<Intellectual>10</Intellectual>
					</skillRequirements>
					<researchPrerequisite>hydroheliumion_B</researchPrerequisite>
				</recipeMaker>
				<tools>
					<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>
						<extraMeleeDamages>
							<li>
								<def>Anty_Poke</def>
								<amount>10</amount>
								<chance>0.35</chance>
							</li>
							<li>
								<def>EMP</def>
								<amount>12</amount>
								<chance>0.25</chance>
							</li>
							<li>
								<def>Stun</def>
								<amount>3</amount>
								<chance>0.15</chance>
							</li>
						</extraMeleeDamages>
					</li>
				</tools>
			</ThingDef>
		</value>
	</Operation>

	<!-- ========== Cluster =========== -->

	<Operation Class="CombatExtended.PatchOperationMakeGunCECompatible">
		<defName>AT_hydroheliumion_C</defName>
		<statBases>
			<SightsEfficiency>1</SightsEfficiency>
			<ShotSpread>0.07</ShotSpread>
			<SwayFactor>1.85</SwayFactor>
			<Bulk>11.03</Bulk>
			<RangedWeapon_Cooldown>1.2</RangedWeapon_Cooldown>
		</statBases>

		<Properties>
			<verbClass>CombatExtended.Verb_ShootCE</verbClass>
			<hasStandardCommand>true</hasStandardCommand>
			<defaultProjectile>Bullet_AntyRedAcidCluster</defaultProjectile>
			<warmupTime>3</warmupTime>
			<range>62</range>
			<ammoConsumedPerShotCount>200</ammoConsumedPerShotCount>
			<soundCast>ShotAnty_G</soundCast>
			<soundCastTail>GunTail_Light</soundCastTail>
			<muzzleFlashScale>8</muzzleFlashScale>
			<targetParams>
				<canTargetLocations>true</canTargetLocations>
			</targetParams>
		</Properties>

		<AmmoUser>
			<magazineSize>200</magazineSize>
			<reloadTime>5.1</reloadTime>
			<ammoSet>AmmoSet_AntyRedAcidCluster</ammoSet>
		</AmmoUser>
		<FireModes>
		</FireModes>
	</Operation>

	<!-- ========== Melee Attacks =========== -->

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

	<!-- ========== Melee Attacks =========== -->

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AT_RedHalberd"]/statBases</xpath>
		<value>
			<MeleeCounterParryBonus>1.08</MeleeCounterParryBonus>
		</value>
	</Operation>

	<Operation Class="PatchOperationAdd">
		<xpath>Defs/ThingDef[defName="AT_RedHalberd"]</xpath>
		<value>
			<equippedStatOffsets>
				<MeleeCritChance>0.22</MeleeCritChance>
				<MeleeParryChance>1.53</MeleeParryChance>
				<MeleeDodgeChance>0.67</MeleeDodgeChance>
			</equippedStatOffsets>
		</value>
	</Operation>

	<Operation Class="PatchOperationReplace">
		<xpath>Defs/ThingDef[defName="AT_RedHalberd"]/tools</xpath>
		<value>
			<tools>
				<li Class="CombatExtended.ToolCE">
					<label>Point</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>12</power>
					<extraMeleeDamages>
						<li>
							<def>Anty_Poke</def>
							<amount>15</amount>
							<chance>1</chance>
						</li>
						<li>
							<def>Anty_Cut</def>
							<amount>15</amount>
							<chance>1</chance>
						</li>
						<li>
							<def>EMP</def>
							<amount>12</amount>
						</li>
						<li>
							<def>Stun</def>
							<amount>10</amount>
							<chance>1</chance>
						</li>
					</extraMeleeDamages>
					<cooldownTime>1.72</cooldownTime>
					<chanceFactor>1</chanceFactor>
					<armorPenetrationBlunt>2.59</armorPenetrationBlunt>
					<armorPenetrationSharp>20.74</armorPenetrationSharp>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>Axe</label>
					<capacities>
						<li>Cut</li>
					</capacities>
					<power>27</power>
					<extraMeleeDamages>
						<li>
							<def>Anty_Cut</def>
							<amount>10</amount>
							<chance>1</chance>
						</li>
						<li>
							<def>EMP</def>
							<amount>2</amount>
						</li>
					</extraMeleeDamages>
					<cooldownTime>1.72</cooldownTime>
					<chanceFactor>1</chanceFactor>
					<armorPenetrationBlunt>2.59</armorPenetrationBlunt>
					<armorPenetrationSharp>9.72</armorPenetrationSharp>
				</li>
				<li Class="CombatExtended.ToolCE">
					<label>Hook</label>
					<capacities>
						<li>Stab</li>
					</capacities>
					<power>12</power>
					<extraMeleeDamages>
						<li>
							<def>Anty_Poke</def>
							<amount>10</amount>
							<chance>1</chance>
						</li>
						<li>
							<def>Stun</def>
							<amount>2</amount>
							<chance>0.8</chance>
						</li>
					</extraMeleeDamages>
					<cooldownTime>1.72</cooldownTime>
					<chanceFactor>1</chanceFactor>
					<armorPenetrationBlunt>2.59</armorPenetrationBlunt>
					<armorPenetrationSharp>12.96</armorPenetrationSharp>
				</li>
			</tools>
		</value>
	</Operation>

</Patch>