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

	<!-- ==================== Categories ========================== -->

	<ThingCategoryDef>
		<defName>AmmoMortarShellHeavy</defName>
		<label>artillery shell</label>
		<parent>AmmoShells</parent>
		<iconPath>UI/Icons/ThingCategories/CaliberCannon</iconPath>
	</ThingCategoryDef>

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

	<CombatExtended.AmmoSetDef>
		<defName>AmmoSet_ArtilleryShell</defName>
		<label>artillery shell</label>
		<ammoTypes>
			<Ammo_ArtilleryShell_HE>Bullet_155mmHowitzerShell_HE</Ammo_ArtilleryShell_HE>
			<Ammo_ArtilleryShell_HE_HFuzed>Bullet_155mmHowitzerShell_HE_HFuzed</Ammo_ArtilleryShell_HE_HFuzed>
			<Ammo_ArtilleryShell_Incendiary>Bullet_155mmHowitzerShell_Incendiary</Ammo_ArtilleryShell_Incendiary>
			<Ammo_ArtilleryShell_EMP>Bullet_155mmHowitzerShell_EMP</Ammo_ArtilleryShell_EMP>
			<Ammo_ArtilleryShell_Smoke>Bullet_155mmHowitzerShell_Smoke</Ammo_ArtilleryShell_Smoke>
			<Ammo_ArtilleryShell_Anti>Bullet_155mmHowitzerShell_Anti</Ammo_ArtilleryShell_Anti>
		</ammoTypes>
		<isMortarAmmoSet>true</isMortarAmmoSet>
	</CombatExtended.AmmoSetDef>

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

	<ThingDef Class="CombatExtended.AmmoDef" Name="HeavyMortarShellBase" ParentName="HeavyAmmoBase" Abstract="True">
		<description>Large cannon shell used by howitzers.</description>
		<thingCategories>
			<li>AmmoMortarShellHeavy</li>
		</thingCategories>
		<stackLimit>25</stackLimit>
		<tradeTags>
			<li>CE_AutoEnableTrade</li>
			<li>CE_AutoEnableCrafting_TableMachining</li>
		</tradeTags>
		<statBases>
			<MaxHitPoints>300</MaxHitPoints>
			<Mass>46.7</Mass>
			<Bulk>47.67</Bulk>
		</statBases>
		<cookOffFlashScale>40</cookOffFlashScale>
		<cookOffSound>MortarBomb_Explode</cookOffSound>
		<isMortarAmmo>true</isMortarAmmo>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="HeavyMortarShellBase">
		<defName>Ammo_ArtilleryShell_HE</defName>
		<label>artillery shell (HE)</label>
		<graphicData>
			<texPath>Things/Ammo/Cannon/Howitzer/HE</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>GrenadeHE</ammoClass>
		<detonateProjectile>Bullet_155mmHowitzerShell_HE</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="HeavyMortarShellBase">
		<defName>Ammo_ArtilleryShell_HE_HFuzed</defName>
		<label>artillery shell (Airburst)</label>
		<graphicData>
			<texPath>Things/Ammo/Cannon/Howitzer/AB</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>GrenadeHETF</ammoClass>
		<detonateProjectile>Bullet_155mmHowitzerShell_HE</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="HeavyMortarShellBase">
		<defName>Ammo_ArtilleryShell_Incendiary</defName>
		<label>artillery shell (Incendiary)</label>
		<graphicData>
			<texPath>Things/Ammo/Cannon/Howitzer/INC</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>GrenadeIncendiary</ammoClass>
		<detonateProjectile>Bullet_155mmHowitzerShell_Incendiary</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="HeavyMortarShellBase">
		<defName>Ammo_ArtilleryShell_EMP</defName>
		<label>artillery shell (EMP)</label>
		<graphicData>
			<texPath>Things/Ammo/Cannon/Howitzer/EMP</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>GrenadeEMP</ammoClass>
		<detonateProjectile>Bullet_155mmHowitzerShell_EMP</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="HeavyMortarShellBase">
		<defName>Ammo_ArtilleryShell_Smoke</defName>
		<label>artillery shell (Smoke)</label>
		<graphicData>
			<texPath>Things/Ammo/Cannon/Howitzer/SMK</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>Smoke</ammoClass>
		<spawnAsSiegeAmmo>false</spawnAsSiegeAmmo>
		<detonateProjectile>Bullet_155mmHowitzerShell_Smoke</detonateProjectile>
	</ThingDef>
	
	<ThingDef Class="CombatExtended.AmmoDef" ParentName="HeavyMortarShellBase">
		<defName>Ammo_ArtilleryShell_Anti</defName>
		<label>artillery shell (Anti)</label>
		<description>An ultra-tech artillery warhead packed with two grains of antimatter.</description>
		<graphicData>
			<texPath>Things/Ammo/Cannon/Howitzer/ANTI</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<statBases>
			<MarketValue>2100</MarketValue>
			<Mass>24</Mass>
			<Bulk>31.8</Bulk>
		</statBases>
		<thingSetMakerTags>
			<li>RewardStandardCore</li>
		</thingSetMakerTags>
		<tradeTags>
			<li>CE_AutoEnableTrade_Sellable</li>
		</tradeTags>
		<ammoClass>Antigrain</ammoClass>
		<comps>
			<li Class="CompProperties_Explosive">
				<explosiveRadius>18.9</explosiveRadius>
				<!-- One thirds of its projectile damage for cook-off -->
				<damageAmountBase>436</damageAmountBase>
				<explosiveDamageType>BombSuper</explosiveDamageType>
				<startWickHitPointsPercent>0.7</startWickHitPointsPercent>
				<chanceToStartFire>0.22</chanceToStartFire>
				<damageFalloff>true</damageFalloff>
				<explosionEffect>GiantExplosion</explosionEffect>
				<explosionSound>Explosion_GiantBomb</explosionSound>
				<preExplosionSpawnSingleThingDef>CraterMedium</preExplosionSpawnSingleThingDef>
				<wickTicks>60~120</wickTicks>
				<explodeOnKilled>True</explodeOnKilled>
				<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
			</li>
		</comps>
	</ThingDef>

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

	<RecipeDef ParentName="ArtilleryAmmoRecipeBase">
		<defName>MakeAmmo_ArtilleryShell_HE</defName>
		<label>make artillery shells (HE) x2</label>
		<description>Craft 2 artillery shells (HE).</description>
		<jobString>Making artillery shells (HE).</jobString>
		<researchPrerequisite Inherit="False" />
		<researchPrerequisites>
			<li>Mortars</li>
			<li>CE_TurretHeavyWeapons</li>
		</researchPrerequisites>
		<workAmount>17400</workAmount>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>94</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>2</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>17</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>ComponentIndustrial</li>
				<li>FSX</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_ArtilleryShell_HE>2</Ammo_ArtilleryShell_HE>
		</products>
	</RecipeDef>

	<RecipeDef ParentName="ArtilleryAmmoRecipeBase">
		<defName>MakeAmmo_ArtilleryShell_HE_HFuzed</defName>
		<label>make artillery shells (Airburst) x2</label>
		<description>Craft 2 155mm (Airburst) artillery shells.</description>
		<jobString>Making 155mm (Airburst) artillery shells.</jobString>
		<researchPrerequisite Inherit="False" />
		<researchPrerequisites>
			<li>Mortars</li>
			<li>CE_TurretHeavyWeapons</li>
		</researchPrerequisites>
		<workAmount>18600</workAmount>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>94</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>4</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>17</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>ComponentIndustrial</li>
				<li>FSX</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_ArtilleryShell_HE_HFuzed>2</Ammo_ArtilleryShell_HE_HFuzed>
		</products>
		<skillRequirements>
			<Crafting>5</Crafting>
		</skillRequirements>
	</RecipeDef>

	<RecipeDef ParentName="ArtilleryAmmoRecipeBase">
		<defName>MakeAmmo_ArtilleryShell_Incendiary</defName>
		<label>make artillery shells (Incendiary) x2</label>
		<description>Craft 2 artillery shells (Incendiary).</description>
		<jobString>Making artillery shell (Incendiary).</jobString>
		<researchPrerequisite Inherit="False" />
		<researchPrerequisites>
			<li>Mortars</li>
			<li>CE_TurretHeavyWeapons</li>
		</researchPrerequisites>
		<workAmount>12600</workAmount>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>94</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>2</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Prometheum</li>
					</thingDefs>
				</filter>
				<count>5</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>ComponentIndustrial</li>
				<li>Prometheum</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_ArtilleryShell_Incendiary>2</Ammo_ArtilleryShell_Incendiary>
		</products>
	</RecipeDef>

	<RecipeDef ParentName="ArtilleryAmmoRecipeBase">
		<defName>MakeAmmo_ArtilleryShell_EMP</defName>
		<label>make artillery shells (EMP) x2</label>
		<description>Craft 2 artillery shells (EMP).</description>
		<jobString>Making artillery shells (EMP).</jobString>
		<researchPrerequisite Inherit="False" />
		<researchPrerequisites>
			<li>Mortars</li>
			<li>CE_TurretHeavyWeapons</li>
			<li>MicroelectronicsBasics</li>
		</researchPrerequisites>
		<workAmount>18400</workAmount>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>94</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>15</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_ArtilleryShell_EMP>2</Ammo_ArtilleryShell_EMP>
		</products>
	</RecipeDef>

	<RecipeDef ParentName="ArtilleryAmmoRecipeBase">
		<defName>MakeAmmo_ArtilleryShell_Smoke</defName>
		<label>make artillery shells (Smoke) x2</label>
		<description>Craft 2 artillery shells (Smoke).</description>
		<jobString>Making artillery shells (Smoke).</jobString>
		<researchPrerequisite Inherit="False" />
		<researchPrerequisites>
			<li>Mortars</li>
			<li>CE_TurretHeavyWeapons</li>
		</researchPrerequisites>
		<workAmount>11400</workAmount>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>90</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>2</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Prometheum</li>
					</thingDefs>
				</filter>
				<count>3</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>Prometheum</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_ArtilleryShell_Smoke>2</Ammo_ArtilleryShell_Smoke>
		</products>
	</RecipeDef>

</Defs>