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

	<ThingCategoryDef>
		<defName>AmmoBoltXonus</defName>
		<label>Xonus Bolt</label>
		<parent>AmmoAdvanced</parent>
		<iconPath>UI/Icons/ThingCategories/CaliberHighCaliber</iconPath>
	</ThingCategoryDef>

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

	<CombatExtended.AmmoSetDef>
		<defName>AmmoSet_BoltXonus</defName>
		<label>Xonus Bolt</label>
		<ammoTypes>
			<Ammo_BoltXonus_Standard>Bullet_BoltXonus_Standard</Ammo_BoltXonus_Standard>
			<Ammo_BoltXonus_Inferno>Bullet_BoltXonus_Inferno</Ammo_BoltXonus_Inferno>
			<Ammo_BoltXonus_MetalStorm>Bullet_BoltXonus_MetalStorm</Ammo_BoltXonus_MetalStorm>
			<Ammo_BoltXonus_Kraken>Bullet_BoltXonus_Kraken</Ammo_BoltXonus_Kraken>
		</ammoTypes>
	</CombatExtended.AmmoSetDef>

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

	<ThingDef Class="CombatExtended.AmmoDef" Name="AmmoBoltXonusBase" ParentName="AmmoBase" Abstract="True">
		<description>A .998 caliber, gryojet-stabilized projectile with an explosive charge and hardened tip, fired from most patterns of Astartes heavy bolters.</description>
		<statBases>
			<Mass>0.385</Mass>
			<Bulk>0.15</Bulk>
		</statBases>
		<tradeTags>
			<li>CE_AutoEnableTrade</li>
			<li>CE_AutoEnableCrafting</li>
		</tradeTags>
		<thingCategories>
			<li>AmmoBoltXonus</li>
		</thingCategories>
		<stackLimit>2000</stackLimit>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="AmmoBoltXonusBase">
		<defName>Ammo_BoltXonus_Standard</defName>
		<label>Xonus bolt shell (Standard)</label>
		<graphicData>
			<texPath>ThirdParty/Warhammer/Ammo/HeavyBolter/Standard</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>Standard</ammoClass>
		<cookOffProjectile>Bullet_BoltXonus_Standard</cookOffProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="AmmoBoltXonusBase">
		<defName>Ammo_BoltXonus_Inferno</defName>
		<label>Xonus bolt shell (Inferno)</label>
		<graphicData>
			<texPath>ThirdParty/Warhammer/Ammo/HeavyBolter/Inferno</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>Inferno</ammoClass>
		<cookOffProjectile>Bullet_BoltXonus_Inferno</cookOffProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="AmmoBoltXonusBase">
		<defName>Ammo_BoltXonus_MetalStorm</defName>
		<label>Xonus bolt shell (Metal Storm)</label>
		<graphicData>
			<texPath>ThirdParty/Warhammer/Ammo/HeavyBolter/MetalStorm</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>MetalStorm</ammoClass>
		<cookOffProjectile>Bullet_BoltXonus_MetalStorm</cookOffProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="AmmoBoltXonusBase">
		<defName>Ammo_BoltXonus_Kraken</defName>
		<label>Xonus bolt shell (Kraken)</label>
		<graphicData>
			<texPath>ThirdParty/Warhammer/Ammo/HeavyBolter/Kraken</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>Kraken</ammoClass>
		<cookOffProjectile>Bullet_BoltXonus_Kraken</cookOffProjectile>
	</ThingDef>

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

	<ThingDef Name="BaseBoltXonusBullet" ParentName="BaseExplosiveBullet" Abstract="true">
		<graphicData>
			<texPath>Things/Projectile/Bullet_Big</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<thingClass>CombatExtended.BulletCE</thingClass>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bullet</damageDef>
			<speed>96</speed>
			<dropsCasings>true</dropsCasings>
			<casingMoteDefname>Fleck_RifleAmmoCasings_HighCal</casingMoteDefname>
			<casingFilthDefname>Filth_RifleAmmoCasings_HighCal</casingFilthDefname>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="BaseBoltXonusBullet">
		<defName>Bullet_BoltXonus_Standard</defName>
		<label>.998 cal bolt (Standard)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageAmountBase>64</damageAmountBase>
			<armorPenetrationSharp>20</armorPenetrationSharp>
			<armorPenetrationBlunt>5.101</armorPenetrationBlunt>
			<secondaryDamage>
				<li>
					<def>Bomb_Secondary</def>
					<amount>38</amount>
				</li>
			</secondaryDamage>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="BaseBoltXonusBullet">
		<defName>Bullet_BoltXonus_Inferno</defName>
		<label>.998 cal bolt (Inferno)</label>
		<thingClass>CombatExtended.ProjectileCE_Explosive</thingClass>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>PrometheumFlame</damageDef>
			<damageAmountBase>5</damageAmountBase>
			<explosionRadius>1.5</explosionRadius>
			<preExplosionSpawnThingDef>FilthPrometheum</preExplosionSpawnThingDef>
			<preExplosionSpawnChance>0.7</preExplosionSpawnChance>
			<soundExplode>MortarIncendiary_Explode</soundExplode>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_ExplosiveCE">
				<damageAmountBase>7</damageAmountBase>
				<explosiveDamageType>Thermobaric</explosiveDamageType>
				<explosiveRadius>1</explosiveRadius>
				<explosionSound>MortarIncendiary_Explode</explosionSound>
				<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
			</li>
		</comps>
	</ThingDef>

	<ThingDef ParentName="BaseBoltXonusBullet">
		<defName>Bullet_BoltXonus_MetalStorm</defName>
		<thingClass>CombatExtended.ProjectileCE_Bursting</thingClass>
		<label>.998 cal bolt (Metal Storm)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<explosionRadius>1</explosionRadius>
			<damageDef>Bomb</damageDef>
			<damageAmountBase>17</damageAmountBase>
			<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
			<aimHeightOffset>1.05</aimHeightOffset>
			<armingDelay>1.75</armingDelay>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_Fragments">
				<fragments>
					<Fragment_Small>6</Fragment_Small>
				</fragments>
				<fragAngleRange>-60~-2</fragAngleRange>
				<fragXZAngleRange>-45~45</fragXZAngleRange>
			</li>
		</comps>
	</ThingDef>

	<ThingDef ParentName="BaseBoltXonusBullet">
		<defName>Bullet_BoltXonus_Kraken</defName>
		<label>.998 cal bolt (Kraken)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bullet</damageDef>
			<damageAmountBase>142</damageAmountBase>
			<armorPenetrationSharp>46</armorPenetrationSharp>
			<armorPenetrationBlunt>5.101</armorPenetrationBlunt>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_ExplosiveCE">
				<damageAmountBase>17</damageAmountBase>
				<explosiveDamageType>Bomb</explosiveDamageType>
				<explosiveRadius>0.5</explosiveRadius>
				<explosionSound>MortarBomb_Explode</explosionSound>
				<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
			</li>
		</comps>
	</ThingDef>

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

	<RecipeDef ParentName="AmmoRecipeBase">
		<defName>MakeAmmo_BoltXonus_Standard</defName>
		<label>make Xonus bolt (standard) shell x200</label>
		<description>Craft 200 Xonus bolt (standard) shells.</description>
		<jobString>Making Xonus bolt (standard) shells.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>154</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>18</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_BoltXonus_Standard>200</Ammo_BoltXonus_Standard>
		</products>
		<workAmount>36600</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="AmmoRecipeBase">
		<defName>MakeAmmo_BoltXonus_Inferno</defName>
		<label>make Xonus bolt (inferno) shell x200</label>
		<description>Craft 200 Xonus bolt (inferno) shells.</description>
		<jobString>Making Xonus bolt (inferno) shells.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>154</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Prometheum</li>
					</thingDefs>
				</filter>
				<count>12</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>6</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>Prometheum</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_BoltXonus_Inferno>200</Ammo_BoltXonus_Inferno>
		</products>
		<workAmount>19400</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="AmmoRecipeBase">
		<defName>MakeAmmo_BoltXonus_MetalStorm</defName>
		<label>make Xonus bolt (metal storm) shell x200</label>
		<description>Craft 200 Xonus bolt (metal storm) shells.</description>
		<jobString>Making Xonus bolt (metal storm) shells.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>154</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>8</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>8</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>FSX</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_BoltXonus_MetalStorm>200</Ammo_BoltXonus_MetalStorm>
		</products>
		<workAmount>21800</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="AmmoRecipeBase">
		<defName>MakeAmmo_BoltXonus_Kraken</defName>
		<label>make Xonus bolt (kraken) shell x200</label>
		<description>Craft 200 Xonus bolt (kraken) shells.</description>
		<jobString>Making Xonus bolt (kraken) shells.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>154</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>6</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>6</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>Uranium</li>
					</thingDefs>
				</filter>
				<count>8</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>FSX</li>
				<li>ComponentIndustrial</li>
				<li>Uranium</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_BoltXonus_Kraken>200</Ammo_BoltXonus_Kraken>
		</products>
		<workAmount>20600</workAmount>
	</RecipeDef>

</Defs>