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

	<ThingCategoryDef>
		<defName>Ammo90mmCannonShells</defName>
		<label>90mm cannon shell</label>
		<parent>AmmoShells</parent>
		<iconPath>UI/Icons/ThingCategories/CaliberCannon</iconPath>
	</ThingCategoryDef>

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

	<CombatExtended.AmmoSetDef>
		<defName>AmmoSet_90mmCannonShell</defName>
		<label>90mm cannon shells</label>
		<ammoTypes>
			<Ammo_90mmCannonShell_HEAT>Bullet_90mmCannonShell_HEAT</Ammo_90mmCannonShell_HEAT>
			<Ammo_90mmCannonShell_AP>Bullet_90mmCannonShell_AP</Ammo_90mmCannonShell_AP>
			<Ammo_90mmCannonShell_HE>Bullet_90mmCannonShell_HE</Ammo_90mmCannonShell_HE>
			<Ammo_90mmCannonShell_HE_TFuzed>Bullet_90mmCannonShell_HE_TFuzed</Ammo_90mmCannonShell_HE_TFuzed>
			<Ammo_90mmCannonShell_APCR>Bullet_90mmCannonShell_APCR</Ammo_90mmCannonShell_APCR>
			<Ammo_90mmCannonShell_EMP>Bullet_90mmCannonShell_EMP</Ammo_90mmCannonShell_EMP>
		</ammoTypes>
		<similarTo>AmmoSet_HeavyCannon</similarTo>
	</CombatExtended.AmmoSetDef>

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

	<ThingDef Class="CombatExtended.AmmoDef" Name="90mmCannonShellBase" ParentName="HeavyAmmoBase" Abstract="True">
		<description>Relatively small cannon shell.</description>
		<thingCategories>
			<li>Ammo90mmCannonShells</li>
		</thingCategories>
		<stackLimit>25</stackLimit>
		<tradeTags>
			<li>CE_AutoEnableTrade</li>
			<li>CE_AutoEnableCrafting_TableMachining</li>
		</tradeTags>
		<statBases>
			<MaxHitPoints>200</MaxHitPoints>
			<Mass>18</Mass>
			<Bulk>22.41</Bulk>
		</statBases>
		<cookOffFlashScale>30</cookOffFlashScale>
		<cookOffSound>MortarBomb_Explode</cookOffSound>
		<isMortarAmmo>true</isMortarAmmo>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="90mmCannonShellBase">
		<defName>Ammo_90mmCannonShell_HEAT</defName>
		<label>90mm cannon shell (HEAT)</label>
		<graphicData>
			<texPath>Things/Ammo/Cannon/Tank/HEAT</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<statBases>
			<Mass>19.5</Mass>
		</statBases>
		<ammoClass>RocketHEAT</ammoClass>
		<detonateProjectile>Bullet_90mmCannonShell_HEAT</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="90mmCannonShellBase">
		<defName>Ammo_90mmCannonShell_AP</defName>
		<label>90mm cannon shell (AP)</label>
		<graphicData>
			<texPath>Things/Ammo/Cannon/Tank/AP</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>ArmorPiercing</ammoClass>
		<detonateProjectile>Bullet_90mmCannonShell_AP</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="90mmCannonShellBase">
		<defName>Ammo_90mmCannonShell_HE</defName>
		<label>90mm cannon shell (HE)</label>
		<graphicData>
			<texPath>Things/Ammo/Cannon/Tank/HE</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>GrenadeHE</ammoClass>
		<detonateProjectile>Bullet_90mmCannonShell_HE</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="90mmCannonShellBase">
		<defName>Ammo_90mmCannonShell_HE_TFuzed</defName>
		<label>90mm cannon shell (HE Time-Fuzed)</label>
		<graphicData>
			<texPath>Things/Ammo/Cannon/Tank/HE</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>GrenadeHETF</ammoClass>
		<detonateProjectile>Bullet_90mmCannonShell_HE</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="90mmCannonShellBase">
		<defName>Ammo_90mmCannonShell_APCR</defName>
		<label>90mm cannon shell (APCR)</label>
		<graphicData>
			<texPath>Things/Ammo/Cannon/Tank/APCR</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<statBases>
			<Mass>13.3</Mass>
		</statBases>
		<ammoClass>CompositeRigidAP</ammoClass>
		<detonateProjectile>Bullet_90mmCannonShell_APCR</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="90mmCannonShellBase">
		<defName>Ammo_90mmCannonShell_EMP</defName>
		<label>90mm cannon shell (EMP)</label>
		<graphicData>
			<texPath>Things/Ammo/Cannon/Tank/EMP</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>GrenadeEMP</ammoClass>
		<detonateProjectile>Bullet_90mmCannonShell_EMP</detonateProjectile>
	</ThingDef>

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

	<ThingDef Name="Base90mmCannonShell" ParentName="BaseExplosiveBullet" Abstract="true">
		<graphicData>
			<shaderType>TransparentPostLight</shaderType>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<speed>151</speed>
			<soundExplode>MortarBomb_Explode</soundExplode>
			<flyOverhead>false</flyOverhead>
			<dropsCasings>true</dropsCasings>
			<casingMoteDefname>Fleck_BigShell</casingMoteDefname>
			<casingFilthDefname>Filth_CannonAmmoCasings</casingFilthDefname>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base90mmCannonShell">
		<defName>Bullet_90mmCannonShell_HEAT</defName>
		<label>90mm cannon shell (HEAT)</label>
		<graphicData>
			<texPath>Things/Projectile/Cannon/HEAT</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bullet</damageDef>
			<damageAmountBase>304</damageAmountBase>
			<soundExplode>MortarBomb_Explode</soundExplode>
			<armorPenetrationSharp>500</armorPenetrationSharp>
			<armorPenetrationBlunt>38.005</armorPenetrationBlunt>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_ExplosiveCE">
				<damageAmountBase>127</damageAmountBase>
				<explosiveDamageType>Bomb</explosiveDamageType>
				<explosiveRadius>1</explosiveRadius>
				<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
			</li>
			<li Class="CombatExtended.CompProperties_Fragments">
				<fragments>
					<Fragment_Large>22</Fragment_Large>
					<Fragment_Small>9</Fragment_Small>
				</fragments>
			</li>
		</comps>
	</ThingDef>

	<ThingDef ParentName="Base90mmCannonShell">
		<defName>Bullet_90mmCannonShell_AP</defName>
		<label>90mm cannon shell (AP)</label>
		<graphicData>
			<texPath>Things/Projectile/Cannon/AP</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bullet</damageDef>
			<damageAmountBase>318</damageAmountBase>
			<armorPenetrationSharp>170</armorPenetrationSharp>
			<armorPenetrationBlunt>70400</armorPenetrationBlunt>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base90mmCannonShell">
		<defName>Bullet_90mmCannonShell_HE</defName>
		<label>90mm cannon shell (HE)</label>
		<thingClass>CombatExtended.ProjectileCE_Explosive</thingClass>
		<graphicData>
			<texPath>Things/Projectile/Cannon/HE</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bomb</damageDef>
			<damageAmountBase>152</damageAmountBase>
			<armorPenetrationSharp>0</armorPenetrationSharp>
			<armorPenetrationBlunt>0</armorPenetrationBlunt>
			<explosionRadius>2.5</explosionRadius>
			<soundExplode>MortarBomb_Explode</soundExplode>
			<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
			<preExplosionSpawnSingleThingDef>Filth_BlastMark</preExplosionSpawnSingleThingDef>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_Fragments">
				<fragments>
					<Fragment_Large>40</Fragment_Large>
					<Fragment_Small>24</Fragment_Small>
				</fragments>
			</li>
		</comps>
	</ThingDef>

	<ThingDef ParentName="Base90mmCannonShell">
		<defName>Bullet_90mmCannonShell_HE_TFuzed</defName>
		<label>90mm cannon shell (HE Time-Fuzed)</label>
		<thingClass>CombatExtended.ProjectileCE_Bursting</thingClass>
		<graphicData>
			<texPath>Things/Projectile/Cannon/HE</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bomb</damageDef>
			<damageAmountBase>152</damageAmountBase>
			<armorPenetrationSharp>0</armorPenetrationSharp>
			<armorPenetrationBlunt>0</armorPenetrationBlunt>
			<explosionRadius>2.5</explosionRadius>
			<soundExplode>MortarBomb_Explode</soundExplode>
			<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
			<aimHeightOffset>3</aimHeightOffset>
			<armingDelay>3</armingDelay>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_Fragments">
				<fragments>
					<Fragment_Large>40</Fragment_Large>
					<Fragment_Small>24</Fragment_Small>
				</fragments>
				<fragAngleRange>-89~-10</fragAngleRange>
			</li>
		</comps>
	</ThingDef>

	<ThingDef ParentName="Base90mmCannonShell">
		<defName>Bullet_90mmCannonShell_APCR</defName>
		<label>90mm cannon shell (APCR)</label>
		<graphicData>
			<texPath>Things/Projectile/Cannon/APCR</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bullet</damageDef>
			<damageAmountBase>304</damageAmountBase>
			<armorPenetrationSharp>300</armorPenetrationSharp>
			<armorPenetrationBlunt>90720</armorPenetrationBlunt>
			<speed>204</speed>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base90mmCannonShell">
		<defName>Bullet_90mmCannonShell_EMP</defName>
		<label>90mm cannon shell (EMP)</label>
		<thingClass>CombatExtended.ProjectileCE_Explosive</thingClass>
		<graphicData>
			<texPath>Things/Projectile/Cannon/EMP</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>EMP</damageDef>
			<damageAmountBase>152</damageAmountBase>
			<armorPenetrationSharp>0</armorPenetrationSharp>
			<armorPenetrationBlunt>0</armorPenetrationBlunt>
			<explosionRadius>5</explosionRadius>
		</projectile>
	</ThingDef>

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

	<RecipeDef ParentName="CannonAmmoRecipeBase">
		<defName>MakeAmmo_90mmCannonShell_HEAT</defName>
		<label>make 90mm (HEAT) cannon shells x5</label>
		<description>Craft 5 90mm (HEAT) cannon shells.</description>
		<jobString>Making 90mm (HEAT) cannon shells.</jobString>
		<researchPrerequisite Inherit="False" />
		<researchPrerequisites>
			<li>CE_TurretHeavyWeapons</li>
			<li>CE_Launchers</li>
		</researchPrerequisites>
		<workAmount>24000</workAmount>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>196</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>8</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>2</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>FSX</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_90mmCannonShell_HEAT>5</Ammo_90mmCannonShell_HEAT>
		</products>
	</RecipeDef>

	<RecipeDef ParentName="CannonAmmoRecipeBase">
		<defName>MakeAmmo_90mmCannonShell_AP</defName>
		<label>make 90mm (AP) cannon shells x5</label>
		<description>Craft 5 90mm (AP) cannon shells.</description>
		<jobString>Making 90mm (AP) cannon shells.</jobString>
		<workAmount>21600</workAmount>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>180</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_90mmCannonShell_AP>5</Ammo_90mmCannonShell_AP>
		</products>
	</RecipeDef>

	<RecipeDef ParentName="CannonAmmoRecipeBase">
		<defName>MakeAmmo_90mmCannonShell_HE</defName>
		<label>make 90mm (HE) cannon shells x5</label>
		<description>Craft 5 90mm (HE) cannon shells.</description>
		<jobString>Making 90mm (HE) cannon shells.</jobString>
		<workAmount>23200</workAmount>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>180</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>10</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>2</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>FSX</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_90mmCannonShell_HE>5</Ammo_90mmCannonShell_HE>
		</products>
	</RecipeDef>

	<RecipeDef ParentName="CannonAmmoRecipeBase">
		<defName>MakeAmmo_90mmCannonShell_HE_TFuzed</defName>
		<label>make 90mm (Time-Fuzed) cannon shells x5</label>
		<description>Craft 5 90mm (Time-Fuzed) cannon shells.</description>
		<jobString>Making 90mm (Time-Fuzed) cannon shells.</jobString>
		<researchPrerequisite Inherit="False" />
		<researchPrerequisites>
			<li>CE_TurretHeavyWeapons</li>
			<li>CE_AdvancedLaunchers</li>
		</researchPrerequisites>
		<workAmount>25000</workAmount>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>180</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>10</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>5</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>FSX</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_90mmCannonShell_HE_TFuzed>5</Ammo_90mmCannonShell_HE_TFuzed>
		</products>
	</RecipeDef>

	<RecipeDef ParentName="CannonAmmoRecipeBase">
		<defName>MakeAmmo_90mmCannonShell_APCR</defName>
		<label>make 90mm (APCR) cannon shells x5</label>
		<description>Craft 5 90mm (APCR) cannon shells.</description>
		<jobString>Making 90mm (APCR) cannon shells.</jobString>
		<researchPrerequisite Inherit="False" />
		<researchPrerequisites>
			<li>CE_TurretHeavyWeapons</li>
			<li>CE_AdvancedAmmo</li>
		</researchPrerequisites>
		<workAmount>22400</workAmount>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>140</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Uranium</li>
					</thingDefs>
				</filter>
				<count>32</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>Uranium</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_90mmCannonShell_APCR>5</Ammo_90mmCannonShell_APCR>
		</products>
	</RecipeDef>

	<RecipeDef ParentName="CannonAmmoRecipeBase">
		<defName>MakeAmmo_90mmCannonShell_EMP</defName>
		<label>make 90mm (EMP) cannon shells x5</label>
		<description>Craft 5 90mm (EMP) cannon shells.</description>
		<jobString>Making 90mm (EMP) cannon shells.</jobString>
		<researchPrerequisite Inherit="False" />
		<researchPrerequisites>
			<li>CE_TurretHeavyWeapons</li>
			<li>MicroelectronicsBasics</li>
		</researchPrerequisites>
		<workAmount>25800</workAmount>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>180</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>13</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_90mmCannonShell_EMP>5</Ammo_90mmCannonShell_EMP>
		</products>
	</RecipeDef>

</Defs>