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

	<ThingCategoryDef>
		<defName>Ammo70mmAPKWS</defName>
		<label>70mm APKWS rocket</label>
		<parent>AmmoRockets</parent>
		<iconPath>UI/Icons/ThingCategories/CaliberRocket</iconPath>
	</ThingCategoryDef>

	<!-- ==================== AmmoSet ========================== -->

	<CombatExtended.AmmoSetDef>
		<defName>AmmoSet_70mmAPKWS</defName>
		<label>70mm APKWS Rockets</label>
		<ammoTypes>
			<Ammo_70mmAPKWS_HEAT>Bullet_70mmAPKWS_HEAT</Ammo_70mmAPKWS_HEAT>
		</ammoTypes>
	</CombatExtended.AmmoSetDef>

	<!-- ==================== Ammo ========================== -->

	<ThingDef Class="CombatExtended.AmmoDef" Name="70mmAPKWSBase" ParentName="MediumAmmoBase" Abstract="True">
		<description>70mm laser-guided munition known as the Advanced Precision Kill Weapon System (APKWS), based on Hydra 70 unguided rockets.</description>
		<statBases>
			<MaxHitPoints>150</MaxHitPoints>
		</statBases>
		<tradeTags>
			<li>CE_AutoEnableTrade</li>
			<li>CE_AutoEnableCrafting_TableMachining</li>
		</tradeTags>
		<thingCategories>
			<li>Ammo70mmAPKWS</li>
		</thingCategories>
		<stackLimit>25</stackLimit>
		<cookOffFlashScale>40</cookOffFlashScale>
		<cookOffSound>MortarBomb_Explode</cookOffSound>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="70mmAPKWSBase">
		<defName>Ammo_70mmAPKWS_HEAT</defName>
		<label>70mm APKWS Rocket (HEAT)</label>
		<graphicData>
			<texPath>Things/Ammo/Rocket/70mmAPKWS</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<statBases>
			<Mass>15</Mass>
			<Bulk>21.59</Bulk>
		</statBases>
		<ammoClass>RocketHEAT</ammoClass>
		<detonateProjectile>Bullet_70mmAPKWS_HEAT</detonateProjectile>
	</ThingDef>

	<!-- ================== Projectiles ================== -->

	<ThingDef Name="Base70mmAPKWS" ParentName="BaseExplosiveBullet" Abstract="true">
		<graphicData>
			<shaderType>TransparentPostLight</shaderType>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<speed>173</speed>
			<soundHitThickRoof>Artillery_HitThickRoof</soundHitThickRoof>
			<soundExplode>MortarBomb_Explode</soundExplode>
			<soundImpactAnticipate>MortarRound_PreImpact</soundImpactAnticipate>
			<soundAmbient>MortarRound_Ambient</soundAmbient>
			<flyOverhead>true</flyOverhead>
			<dropsCasings>false</dropsCasings>
			<casingMoteDefname>Fleck_BigShell</casingMoteDefname>
			<casingFilthDefname>Filth_CannonAmmoCasings</casingFilthDefname>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_ProjectileFleck">
				<FleckDatas>
					<li>
						<fleck>Fleck_CERocketFlame</fleck>
						<emissionsPerTick>14</emissionsPerTick>
						<flecksPerEmission>3</flecksPerEmission>
						<scale>1</scale>
						<cutoffTickRange>25~35</cutoffTickRange>
						<originOffset>0.1</originOffset>
					</li>
					<li>
						<fleck>Fleck_CERocketSmokeTrail</fleck>
						<emissionsPerTick>2</emissionsPerTick>
						<rotation>0~360</rotation>
						<flecksPerEmission>1</flecksPerEmission>
					</li>
					<li>
						<fleck>Fleck_CERocketSmoke</fleck>
						<emissionsPerTick>5</emissionsPerTick>
						<rotation>0~360</rotation>
						<flecksPerEmission>2</flecksPerEmission>
						<cutoffTickRange>25~60</cutoffTickRange>
					</li>
				</FleckDatas>
			</li>
		</comps>
	</ThingDef>

	<ThingDef ParentName="Base70mmAPKWS">
		<defName>Bullet_70mmAPKWS_HEAT</defName>
		<thingClass>CombatExtended.ProjectileCE_Explosive</thingClass>
		<label>70mm APKWS Rocket (HEAT)</label>
		<graphicData>
			<texPath>Things/Projectile/Rocket/70mmAPKWS</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bullet</damageDef>
			<damageAmountBase>248</damageAmountBase>
			<armorPenetrationSharp>300</armorPenetrationSharp>
			<armorPenetrationBlunt>44.285</armorPenetrationBlunt>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_ExplosiveCE">
				<damageAmountBase>148</damageAmountBase>
				<explosiveDamageType>Bomb</explosiveDamageType>
				<explosiveRadius>1.5</explosiveRadius>
				<explosionSound>MortarBomb_Explode</explosionSound>
				<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
			</li>
			<li Class="CombatExtended.CompProperties_Fragments">
				<fragments>
					<Fragment_Large>26</Fragment_Large>
					<Fragment_Small>12</Fragment_Small>
				</fragments>
			</li>
		</comps>
	</ThingDef>

	<!-- ==================== Recipes ========================== -->

	<RecipeDef ParentName="LauncherAmmoRecipeBase">
		<defName>MakeAmmo_70mmAPKWS_HEAT</defName>
		<label>make 70mm APKWS (HEAT) rockets x5</label>
		<description>Craft 70mm APKWS (HEAT) rockets.</description>
		<jobString>Making 70mm APKWS (HEAT) rockets.</jobString>
		<workAmount>21400</workAmount>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>150</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>10</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>4</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>FSX</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_70mmAPKWS_HEAT>5</Ammo_70mmAPKWS_HEAT>
		</products>
	</RecipeDef>

</Defs>