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

	<ThingCategoryDef>
		<defName>Ammo95x40mmUNSC</defName>
		<label>9.5x40mm UNSC</label>
		<parent>AmmoRifles</parent>
		<iconPath>UI/Icons/ThingCategories/CaliberRifle</iconPath>
	</ThingCategoryDef>

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

	<CombatExtended.AmmoSetDef>
		<defName>AmmoSet_95x40mmUNSC</defName>
		<label>9.5x40mm UNSC</label>
		<ammoTypes>
			<Ammo_95x40mmUNSC_FMJ>Bullet_95x40mmUNSC_FMJ</Ammo_95x40mmUNSC_FMJ>
			<Ammo_95x40mmUNSC_AP>Bullet_95x40mmUNSC_AP</Ammo_95x40mmUNSC_AP>
			<Ammo_95x40mmUNSC_HP>Bullet_95x40mmUNSC_HP</Ammo_95x40mmUNSC_HP>
			<Ammo_95x40mmUNSC_Incendiary>Bullet_95x40mmUNSC_Incendiary</Ammo_95x40mmUNSC_Incendiary>
			<Ammo_95x40mmUNSC_HE>Bullet_95x40mmUNSC_HE</Ammo_95x40mmUNSC_HE>
			<Ammo_95x40mmUNSC_Sabot>Bullet_95x40mmUNSC_Sabot</Ammo_95x40mmUNSC_Sabot>
		</ammoTypes>
	</CombatExtended.AmmoSetDef>

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

	<ThingDef Class="CombatExtended.AmmoDef" Name="95x40mmUNSCBase" ParentName="SmallAmmoBase" Abstract="True">
		<description>A relatively rare large diameter rifle cartridge, advanced propellents allow it to be shortened consideraly without any loss of power. It is currently only used by UNSC battlerifles.</description>
		<statBases>
			<Mass>0.024</Mass>
			<Bulk>0.02</Bulk>
		</statBases>
		<tradeTags>
			<li>CE_AutoEnableTrade</li>
			<li>CE_AutoEnableCrafting</li>
		</tradeTags>
		<thingCategories>
			<li>Ammo95x40mmUNSC</li>
		</thingCategories>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="95x40mmUNSCBase">
		<defName>Ammo_95x40mmUNSC_FMJ</defName>
		<label>9.5x40mm UNSC cartridge (FMJ)</label>
		<graphicData>
			<texPath>Things/Ammo/Rifle/FMJ</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>FullMetalJacket</ammoClass>
		<generateAllowChance>0.4</generateAllowChance>
		<cookOffProjectile>Bullet_95x40mmUNSC_FMJ</cookOffProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="95x40mmUNSCBase">
		<defName>Ammo_95x40mmUNSC_AP</defName>
		<label>9.5x40mm UNSC cartridge (AP)</label>
		<graphicData>
			<texPath>Things/Ammo/Rifle/AP</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>ArmorPiercing</ammoClass>
		<generateAllowChance>0.4</generateAllowChance>
		<cookOffProjectile>Bullet_95x40mmUNSC_AP</cookOffProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="95x40mmUNSCBase">
		<defName>Ammo_95x40mmUNSC_HP</defName>
		<label>9.5x40mm UNSC cartridge (HP)</label>
		<graphicData>
			<texPath>Things/Ammo/Rifle/HP</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>HollowPoint</ammoClass>
		<generateAllowChance>0.1</generateAllowChance>
		<cookOffProjectile>Bullet_95x40mmUNSC_HP</cookOffProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="95x40mmUNSCBase">
		<defName>Ammo_95x40mmUNSC_Incendiary</defName>
		<label>9.5x40mm UNSC cartridge (AP-I)</label>
		<graphicData>
			<texPath>Things/Ammo/Rifle/Incendiary</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>IncendiaryAP</ammoClass>
		<generateAllowChance>0.65</generateAllowChance> <!-- Make advanced ammo types less common. -->
		<cookOffProjectile>Bullet_95x40mmUNSC_Incendiary</cookOffProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="95x40mmUNSCBase">
		<defName>Ammo_95x40mmUNSC_HE</defName>
		<label>9.5x40mm UNSC cartridge (HEDP)</label>
		<graphicData>
			<texPath>Things/Ammo/Rifle/HE</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>ExplosiveAP</ammoClass>
		<generateAllowChance>0.65</generateAllowChance> <!-- Make advanced ammo types less common. -->
		<cookOffProjectile>Bullet_95x40mmUNSC_HE</cookOffProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="95x40mmUNSCBase">
		<defName>Ammo_95x40mmUNSC_Sabot</defName>
		<label>9.5x40mm UNSC cartridge (Sabot)</label>
		<graphicData>
			<texPath>Things/Ammo/Rifle/Sabot</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<statBases>
			<Mass>0.02</Mass>
		</statBases>
		<ammoClass>Sabot</ammoClass>
		<generateAllowChance>0.65</generateAllowChance> <!-- Make advanced ammo types less common. -->
		<generateAllowChance>0.2</generateAllowChance>
		<cookOffProjectile>Bullet_95x40mmUNSC_Sabot</cookOffProjectile>
	</ThingDef>

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

	<ThingDef ParentName="Base762x51mmNATOBullet">
		<defName>Bullet_95x40mmUNSC_FMJ</defName>
		<label>9.5mm UNSC bullet (FMJ)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>23</damageAmountBase>
			<armorPenetrationSharp>12</armorPenetrationSharp>
			<armorPenetrationBlunt>80.72</armorPenetrationBlunt>
			<speed>176</speed>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base762x51mmNATOBullet">
		<defName>Bullet_95x40mmUNSC_AP</defName>
		<label>9.5mm UNSC bullet (AP)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>15</damageAmountBase>
			<armorPenetrationSharp>24</armorPenetrationSharp>
			<armorPenetrationBlunt>80.72</armorPenetrationBlunt>
			<speed>176</speed>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base762x51mmNATOBullet">
		<defName>Bullet_95x40mmUNSC_HP</defName>
		<label>9.5mm UNSC bullet (HP)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>28</damageAmountBase>
			<armorPenetrationSharp>6</armorPenetrationSharp>
			<armorPenetrationBlunt>80.72</armorPenetrationBlunt>
			<speed>176</speed>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base762x51mmNATOBullet">
		<defName>Bullet_95x40mmUNSC_Incendiary</defName>
		<label>9.5mm UNSC bullet (AP-I)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>15</damageAmountBase>
			<armorPenetrationSharp>24</armorPenetrationSharp>
			<armorPenetrationBlunt>80.72</armorPenetrationBlunt>
			<speed>176</speed>
			<secondaryDamage>
				<li>
					<def>Flame_Secondary</def>
					<amount>8</amount>
				</li>
			</secondaryDamage>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base762x51mmNATOBullet">
		<defName>Bullet_95x40mmUNSC_HE</defName>
		<label>9.5mm UNSC bullet (HEDP)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>23</damageAmountBase>
			<armorPenetrationSharp>12</armorPenetrationSharp>
			<armorPenetrationBlunt>80.72</armorPenetrationBlunt>
			<speed>176</speed>
			<secondaryDamage>
				<li>
					<def>Bomb_Secondary</def>
					<amount>13</amount>
				</li>
			</secondaryDamage>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base762x51mmNATOBullet">
		<defName>Bullet_95x40mmUNSC_Sabot</defName>
		<label>9.5mm UNSC bullet (Sabot)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>11</damageAmountBase>
			<armorPenetrationSharp>35</armorPenetrationSharp>
			<armorPenetrationBlunt>101.28</armorPenetrationBlunt>
			<speed>228</speed>
		</projectile>
	</ThingDef>

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

	<RecipeDef ParentName="UNAmmoRecipeBase">
		<defName>MakeAmmo_95x40mmUNSC_FMJ</defName>
		<label>make 9.5x40mm UNSC (FMJ) cartridge x500</label>
		<description>Craft 500 9.5x40mm UNSC (FMJ) cartridges.</description>
		<jobString>Making 9.5x40mm UNSC (FMJ) cartridges.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>29</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_95x40mmUNSC_FMJ>500</Ammo_95x40mmUNSC_FMJ>
		</products>
		<workAmount>5000</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="UNAmmoRecipeBase">
		<defName>MakeAmmo_95x40mmUNSC_AP</defName>
		<label>make 9.5x40mm UNSC (AP) cartridge x500</label>
		<description>Craft 500 9.5x40mm UNSC (AP) cartridges.</description>
		<jobString>Making 9.5x40mm UNSC (AP) cartridges.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>29</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_95x40mmUNSC_AP>500</Ammo_95x40mmUNSC_AP>
		</products>
		<workAmount>5000</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="UNAmmoRecipeBase">
		<defName>MakeAmmo_95x40mmUNSC_HP</defName>
		<label>make 9.5x40mm UNSC (HP) cartridge x500</label>
		<description>Craft 500 9.5x40mm UNSC (HP) cartridges.</description>
		<jobString>Making 9.5x40mm UNSC (HP) cartridges.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>29</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_95x40mmUNSC_HP>500</Ammo_95x40mmUNSC_HP>
		</products>
		<workAmount>5000</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="AdvancedAmmoRecipeBase">
		<defName>MakeAmmo_95x40mmUNSC_Incendiary</defName>
		<label>make 9.5x40mm UNSC (AP-I) cartridge x500</label>
		<description>Craft 500 9.5x40mm UNSC (AP-I) cartridges.</description>
		<jobString>Making 9.5x40mm UNSC (AP-I) cartridges.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>29</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Prometheum</li>
					</thingDefs>
				</filter>
				<count>3</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>Prometheum</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_95x40mmUNSC_Incendiary>500</Ammo_95x40mmUNSC_Incendiary>
		</products>
		<workAmount>6900</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="AdvancedAmmoRecipeBase">
		<defName>MakeAmmo_95x40mmUNSC_HE</defName>
		<label>make 9.5x40mm UNSC (HEDP) cartridge x500</label>
		<description>Craft 500 9.5x40mm UNSC (HEDP) cartridges.</description>
		<jobString>Making 9.5x40mm UNSC (HEDP) cartridges.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>29</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>5</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>FSX</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_95x40mmUNSC_HE>500</Ammo_95x40mmUNSC_HE>
		</products>
		<workAmount>6900</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="AdvancedAmmoRecipeBase">
		<defName>MakeAmmo_95x40mmUNSC_Sabot</defName>
		<label>make 9.5x40mm UNSC (Sabot) cartridge x500</label>
		<description>Craft 500 9.5x40mm UNSC (Sabot) cartridges.</description>
		<jobString>Making 9.5x40mm UNSC (Sabot) cartridges.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>18</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Uranium</li>
					</thingDefs>
				</filter>
				<count>4</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Chemfuel</li>
					</thingDefs>
				</filter>
				<count>3</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>Uranium</li>
				<li>Chemfuel</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_95x40mmUNSC_Sabot>500</Ammo_95x40mmUNSC_Sabot>
		</products>
		<workAmount>5000</workAmount>
	</RecipeDef>

</Defs>