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

	<ThingCategoryDef>
		<defName>Ammo83mmPIATGrenades</defName>
		<label>83mm PIAT Grenade</label>
		<parent>AmmoGrenades</parent>
		<iconPath>UI/Icons/ThingCategories/CaliberGrenade</iconPath>
	</ThingCategoryDef>

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

	<CombatExtended.AmmoSetDef>
		<defName>AmmoSet_83mmPIATGrenade</defName>
		<label>83mm PIAT Grenades</label>
		<ammoTypes>
			<Ammo_83mmPIATGrenade_HEAT>Bullet_83mmPIATGrenade_HEAT</Ammo_83mmPIATGrenade_HEAT>
			<Ammo_83mmPIATGrenade_HE>Bullet_83mmPIATGrenade_HE</Ammo_83mmPIATGrenade_HE>
			<Ammo_83mmPIATGrenade_EMP>Bullet_83mmPIATGrenade_EMP</Ammo_83mmPIATGrenade_EMP>
		</ammoTypes>
	</CombatExtended.AmmoSetDef>

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

	<ThingDef Class="CombatExtended.AmmoDef" Name="83mmPIATGrenadeBase" ParentName="MediumAmmoBase" Abstract="True">
		<description>Large spigot grenade designed to be fired at tanks.</description>
		<statBases>
			<Mass>3.176</Mass>
			<Bulk>6.5</Bulk>
		</statBases>
		<tradeTags>
			<li>CE_AutoEnableTrade</li>
			<li>CE_AutoEnableCrafting_TableMachining</li>
		</tradeTags>
		<thingCategories>
			<li>Ammo83mmPIATGrenades</li>
		</thingCategories>
		<stackLimit>25</stackLimit>
		<cookOffFlashScale>30</cookOffFlashScale>
		<cookOffSound>MortarBomb_Explode</cookOffSound>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="83mmPIATGrenadeBase">
		<defName>Ammo_83mmPIATGrenade_HEAT</defName>
		<label>83mm PIAT grenade (HEAT)</label>
		<graphicData>
			<texPath>Things/Ammo/GrenadeLauncher/HE</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>RocketHEAT</ammoClass>
		<detonateProjectile>Bullet_83mmPIATGrenade_HEAT</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="83mmPIATGrenadeBase">
		<defName>Ammo_83mmPIATGrenade_HE</defName>
		<label>83mm PIAT grenade (HE)</label>
		<graphicData>
			<texPath>Things/Ammo/GrenadeLauncher/HE</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>GrenadeHE</ammoClass>
		<detonateProjectile>Bullet_83mmPIATGrenade_HE</detonateProjectile>
	</ThingDef>

	<ThingDef Class="CombatExtended.AmmoDef" ParentName="83mmPIATGrenadeBase">
		<defName>Ammo_83mmPIATGrenade_EMP</defName>
		<label>83mm PIAT grenade (EMP)</label>
		<graphicData>
			<texPath>Things/Ammo/GrenadeLauncher/EMP</texPath>
			<graphicClass>Graphic_StackCount</graphicClass>
		</graphicData>
		<ammoClass>GrenadeEMP</ammoClass>
		<generateAllowChance>0.5</generateAllowChance>
		<detonateProjectile>Bullet_83mmPIATGrenade_EMP</detonateProjectile>
	</ThingDef>

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

	<ThingDef Name="Base83mmPIATGrenade" ParentName="BaseExplosiveBullet" Abstract="true">
		<thingClass>CombatExtended.ProjectileCE_Explosive</thingClass>
		<graphicData>
			<texPath>Things/Projectile/LauncherShot</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<speed>26</speed>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="Base83mmPIATGrenade">
		<defName>Bullet_83mmPIATGrenade_HEAT</defName>
		<label>83mm PIAT grenade (HEAT)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bullet</damageDef>
			<damageAmountBase>268</damageAmountBase>
			<armorPenetrationSharp>100</armorPenetrationSharp>
			<armorPenetrationBlunt>41.818</armorPenetrationBlunt>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_ExplosiveCE">
				<damageAmountBase>139</damageAmountBase>
				<explosiveDamageType>Bomb</explosiveDamageType>
				<explosiveRadius>1</explosiveRadius>
				<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
				<explosionSound>MortarBomb_Explode</explosionSound>
			</li>
			<li Class="CombatExtended.CompProperties_Fragments">
				<fragments>
					<Fragment_Large>1</Fragment_Large>
					<Fragment_Small>11</Fragment_Small>
				</fragments>
			</li>
		</comps>
	</ThingDef>

	<ThingDef ParentName="Base83mmPIATGrenade">
		<defName>Bullet_83mmPIATGrenade_HE</defName>
		<label>83mm PIAT grenade (HE)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>Bomb</damageDef>
			<damageAmountBase>139</damageAmountBase>
			<explosionRadius>2.5</explosionRadius>
			<applyDamageToExplosionCellsNeighbors>true</applyDamageToExplosionCellsNeighbors>
			<preExplosionSpawnSingleThingDef>Filth_BlastMark</preExplosionSpawnSingleThingDef>
		</projectile>
		<comps>
			<li Class="CombatExtended.CompProperties_Fragments">
				<fragments>
					<Fragment_Small>80</Fragment_Small>
				</fragments>
			</li>
		</comps>
	</ThingDef>

	<ThingDef ParentName="Base83mmPIATGrenade">
		<defName>Bullet_83mmPIATGrenade_EMP</defName>
		<label>83mm PIAT grenade (EMP)</label>
		<projectile Class="CombatExtended.ProjectilePropertiesCE">
			<damageDef>EMP</damageDef>
			<damageAmountBase>139</damageAmountBase>
			<explosionRadius>5</explosionRadius>
		</projectile>
	</ThingDef>

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

	<RecipeDef ParentName="LauncherAmmoRecipeBase">
		<defName>MakeAmmo_83mmPIATGrenade_HEAT</defName>
		<label>make 83mm PIAT HEAT grenades x5</label>
		<description>Craft 5 83mm PIAT HEAT grenades.</description>
		<jobString>Making 83mm PIAT HEAT grenades.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>32</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>9</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_83mmPIATGrenade_HEAT>5</Ammo_83mmPIATGrenade_HEAT>
		</products>
		<workAmount>8000</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="LauncherAmmoRecipeBase">
		<defName>MakeAmmo_83mmPIATGrenade_HE</defName>
		<label>make 83mm PIAT HE grenades x5</label>
		<description>Craft 5 83mm PIAT HE grenades.</description>
		<jobString>Making 83mm PIAT HE grenades.</jobString>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>32</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>FSX</li>
					</thingDefs>
				</filter>
				<count>9</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_83mmPIATGrenade_HE>5</Ammo_83mmPIATGrenade_HE>
		</products>
		<workAmount>8000</workAmount>
	</RecipeDef>

	<RecipeDef ParentName="LauncherAmmoRecipeBase">
		<defName>MakeAmmo_83mmPIATGrenade_EMP</defName>
		<label>make 83mm PIAT EMP grenades x5</label>
		<description>Craft 5 83mm PIAT EMP grenades.</description>
		<jobString>Making 83mm PIAT EMP grenades.</jobString>
		<researchPrerequisites>
			<li>MicroelectronicsBasics</li>
			<li>CE_Launchers</li>
		</researchPrerequisites>
		<ingredients>
			<li>
				<filter>
					<thingDefs>
						<li>Steel</li>
					</thingDefs>
				</filter>
				<count>32</count>
			</li>
			<li>
				<filter>
					<thingDefs>
						<li>ComponentIndustrial</li>
					</thingDefs>
				</filter>
				<count>12</count>
			</li>
		</ingredients>
		<fixedIngredientFilter>
			<thingDefs>
				<li>Steel</li>
				<li>ComponentIndustrial</li>
			</thingDefs>
		</fixedIngredientFilter>
		<products>
			<Ammo_83mmPIATGrenade_EMP>5</Ammo_83mmPIATGrenade_EMP>
		</products>
		<workAmount>10400</workAmount>
	</RecipeDef>

</Defs>