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

	<ThingCategoryDef>
		<defName>Ammo127x99mm</defName>
		<label>12.7x99mm</label>
		<parent>AmmoHighCaliber</parent>
		<iconPath>UI/Icons/ThingCategories/CaliberHighCaliber</iconPath>
	</ThingCategoryDef>

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

	<CombatExtended.AmmoSetDef>
		<defName>AmmoSet_127x99mm</defName>
		<label>12.7x99mm</label>
		<ammoTypes>
			<Ammo_127x99mm_FMJ>Bullet_127x99mm_FMJ</Ammo_127x99mm_FMJ>
			<Ammo_127x99mm_Incendiary>Bullet_127x99mm_Incendiary</Ammo_127x99mm_Incendiary>
			<Ammo_127x99mm_HE>Bullet_127x99mm_HE</Ammo_127x99mm_HE>
			<Ammo_127x99mm_Sabot>Bullet_127x99mm_Sabot</Ammo_127x99mm_Sabot>
		</ammoTypes>
	</CombatExtended.AmmoSetDef>

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

	<ThingDef Class="CombatExtended.AmmoDef" Name="Ammo127x99mmBase" ParentName="MediumAmmoBase" Abstract="True">
		<description>Large caliber bullet used by many UNSC heavy machine guns.</description>
		<statBases>
			<Mass>0.115</Mass>
			<Bulk>0.14</Bulk>
		</statBases>
		<tradeTags>
			<li>CE_AutoEnableTrade</li>
			<li>CE_AutoEnableCrafting</li>
		</tradeTags>
		<thingCategories>
			<li>Ammo127x99mm</li>
		</thingCategories>
		<stackLimit>5000</stackLimit>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="Ammo127x99mmBase">
		<defName>Ammo_127x99mm_FMJ</defName>
		<label>12.7x99mm cartridge (FMJ)</label>
		<graphicData>
			<texPath>Things/Ammo/HighCaliber/FMJ</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>FullMetalJacket</ammoClass>
		<cookOffProjectile>Bullet_127x99mm_FMJ</cookOffProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="Ammo127x99mmBase">
		<defName>Ammo_127x99mm_Incendiary</defName>
		<label>12.7x99mm cartridge (AP-I)</label>
		<graphicData>
			<texPath>Things/Ammo/HighCaliber/Incendiary</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<statBases>
			<Mass>0.112</Mass>
		</statBases>
		<ammoClass>IncendiaryAP</ammoClass>
		<generateAllowChance>0.65</generateAllowChance> <!-- Make advanced ammo types less common. -->
		<cookOffProjectile>Bullet_127x99mm_Incendiary</cookOffProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="Ammo127x99mmBase">
		<defName>Ammo_127x99mm_HE</defName>
		<label>12.7x99mm cartridge (AP-HE)</label>
		<graphicData>
			<texPath>Things/Ammo/HighCaliber/HE</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>ExplosiveAP</ammoClass>
		<generateAllowChance>0.65</generateAllowChance> <!-- Make advanced ammo types less common. -->
		<cookOffProjectile>Bullet_127x99mm_HE</cookOffProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="Ammo127x99mmBase">
		<defName>Ammo_127x99mm_Sabot</defName>
		<label>12.7x99mm cartridge (Sabot)</label>
		<graphicData>
			<texPath>Things/Ammo/HighCaliber/Sabot</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<statBases>
			<Mass>0.095</Mass>
		</statBases>
		<ammoClass>Sabot</ammoClass>
		<generateAllowChance>0.65</generateAllowChance> <!-- Make advanced ammo types less common. -->
		<cookOffProjectile>Bullet_127x99mm_Sabot</cookOffProjectile>
	</ThingDef>

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

	<ThingDef ParentName="Base50BMGBullet">
		<defName>Bullet_127x99mm_FMJ</defName>
		<label>12.7x99mm bullet (FMJ)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>40</damageAmountBase>
			<armorPenetrationSharp>18</armorPenetrationSharp>
			<armorPenetrationBlunt>356.380</armorPenetrationBlunt>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base50BMGBullet">
		<defName>Bullet_127x99mm_Incendiary</defName>
		<label>12.7x99mm bullet (AP-I)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>25</damageAmountBase>
			<armorPenetrationSharp>36</armorPenetrationSharp>
			<armorPenetrationBlunt>356.7</armorPenetrationBlunt>
			<secondaryDamage>
				<li>
					<def>Flame_Secondary</def>
					<amount>15</amount>
				</li>
			</secondaryDamage>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base50BMGBullet">
		<defName>Bullet_127x99mm_HE</defName>
		<label>12.7x99mm bullet (AP-HE)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>40</damageAmountBase>
			<armorPenetrationSharp>18</armorPenetrationSharp>
			<armorPenetrationBlunt>356.380</armorPenetrationBlunt>
			<secondaryDamage>
				<li>
					<def>Bomb_Secondary</def>
					<amount>24</amount>
				</li>
			</secondaryDamage>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base50BMGBullet">
		<defName>Bullet_127x99mm_Sabot</defName>
		<label>12.7x99mm bullet (Sabot)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>19</damageAmountBase>
			<armorPenetrationSharp>55</armorPenetrationSharp>
			<armorPenetrationBlunt>384.780</armorPenetrationBlunt>
			<speed>207</speed>
		</projectile>
	</ThingDef>

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

	<RecipeDef ParentName="UNAmmoRecipeBase">
		<defName>MakeAmmo_127x99mm_FMJ</defName>
		<label>make 12.7x99mm (FMJ) cartridge x200</label>
		<description>Craft 200 12.7x99mm (FMJ) cartridges.</description>
		<jobString>Making 12.7x99mm (FMJ) cartridges.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>48</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_127x99mm_FMJ>200</Ammo_127x99mm_FMJ>
		</products>
		<workAmount>6000</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="AdvancedAmmoRecipeBase">
		<defName>MakeAmmo_127x99mm_Incendiary</defName>
		<label>make 12.7x99mm (AP-I) cartridge x200</label>
		<description>Craft 200 12.7x99mm (AP-I) cartridges.</description>
		<jobString>Making 12.7x99mm (AP-I) cartridges.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>46</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Prometheum</li>
					</thingDefs>
				</filter>
				<count>4</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>Prometheum</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_127x99mm_Incendiary>200</Ammo_127x99mm_Incendiary>
		</products>
		<workAmount>8200</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="AdvancedAmmoRecipeBase">
		<defName>MakeAmmo_127x99mm_HE</defName>
		<label>make 12.7x99mm (AP-HE) cartridge x200</label>
		<description>Craft 200 12.7x99mm (HE) cartridges.</description>
		<jobString>Making 12.7x99mm (HE) cartridges.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>48</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>10</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>FSX</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_127x99mm_HE>200</Ammo_127x99mm_HE>
		</products>
		<workAmount>10800</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="AdvancedAmmoRecipeBase">
		<defName>MakeAmmo_127x99mm_Sabot</defName>
		<label>make 12.7x99mm (Sabot) cartridge x200</label>
		<description>Craft 200 12.7x99mm (Sabot) cartridges.</description>
		<jobString>Making 12.7x99mm (Sabot) cartridges.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>30</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Uranium</li>
					</thingDefs>
				</filter>
				<count>5</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Chemfuel</li>
					</thingDefs>
				</filter>
				<count>5</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>Uranium</li>
				<li>Chemfuel</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_127x99mm_Sabot>200</Ammo_127x99mm_Sabot>
		</products>
		<workAmount>8000</workAmount>
	</RecipeDef>

</Defs>