<?xml version="1.0" encoding="utf-8" ?>
<Defs>
    <ThingDef Name="20mmShellBase" ParentName="ResourceBase" Abstract="True">
    <soundInteract>Metal_Drop</soundInteract>
    <soundDrop>Standard_Drop</soundDrop>
    <tickerType>Normal</tickerType>
    <stackLimit>10</stackLimit>
    <techLevel>Industrial</techLevel>
    <statBases>
      <MaxHitPoints>70</MaxHitPoints>
      <MarketValue>10</MarketValue>
      <Mass>10.0</Mass>
      <Flammability>1.0</Flammability>
      <DeteriorationRate>1.5</DeteriorationRate>
    </statBases>
    <thingCategories>
      <li>AAA_20mmShells</li>
    </thingCategories>
    <tradeTags>
      <li>AAA_20mmShells</li>
    </tradeTags>
  </ThingDef>
<ThingDef Name="Makeable20mmShellBase" ParentName="20mmShellBase" Abstract="True">
    <recipeMaker>
      <workSpeedStat>SmithingSpeed</workSpeedStat>
      <effectWorking>Cook</effectWorking>
      <soundWorking>Recipe_Machining</soundWorking>
      <workAmount>120</workAmount>
      <targetCountAdjustment>5</targetCountAdjustment>
      <workSkill>Crafting</workSkill>
      <recipeUsers>
        <li>TableMachining</li>
      </recipeUsers>
	  <researchPrerequisite>AAA_Autocannon</researchPrerequisite>

    </recipeMaker>
  </ThingDef>

  <!-- High-explosive -->

  <ThingDef ParentName="Makeable20mmShellBase">
    <defName>20mm_Shell_HighExplosive</defName>
    <label>20mm HE magazine</label>
    <description>A magazine of 20mm shells filled with high explosives.containing enough ammo to burst fire several times. Explodes when damaged.</description>
    <graphicData>
      <texPath>AAA/shell/20mmHE</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
    <comps>
      <li Class="CompProperties_Explosive">
        <explosiveRadius>1.0</explosiveRadius>
        <explosiveDamageType>Bomb</explosiveDamageType>
        <explosiveExpandPerStackcount>0.4</explosiveExpandPerStackcount>
        <startWickHitPointsPercent>0.333</startWickHitPointsPercent>
        <wickTicks>
          <min>10</min>
          <max>30</max>
        </wickTicks>
      </li>
    </comps>
    <projectileWhenLoaded>Bullet_20mm_HighExplosive</projectileWhenLoaded>
    <costList>
      <Steel>22</Steel>
      <Chemfuel>18</Chemfuel>
    </costList>
	  <researchPrerequisites>
      <li>AAA_Autocannon</li>
    </researchPrerequisites>
  </ThingDef>

	<ThingDef ParentName="AAA_BaseProjectileCustom">
    <defName>Bullet_20mm_HighExplosive</defName>
    <label>HE 20mm round</label>
    <graphicData>
      <texPath>Things/Projectile/Bullet_Big</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <shaderType>TransparentPostLight</shaderType>
    </graphicData>
    <!--thingClass>Projectile_Explosive</thingClass-->
	<comps>
	  <li Class="AAA.CompProperties_ProjectileMultiple">
			<pellets>2</pellets>
			<forsedScatterRadius>0.6</forsedScatterRadius>
			<scatterRadiusAt10tilesAway>0.40</scatterRadiusAt10tilesAway>
	  </li>

	  <li Class="AAA.CompProperties_ProjectileExtraDamage">
        <damageAmountBase>7</damageAmountBase>
        <damageDef>Bullet</damageDef>
		</li>
    </comps>
    <projectile>
      <damageDef>Bomb</damageDef>
      <damageAmountBase>5</damageAmountBase>
      <speed>81</speed>
      <explosionRadius>1.0</explosionRadius>
      <flyOverhead>false</flyOverhead>
      <soundExplode>MortarBomb_Explode</soundExplode>
      <soundImpactAnticipate>MortarRound_PreImpact</soundImpactAnticipate>
      <soundAmbient>MortarRound_Ambient</soundAmbient>
    </projectile>
  </ThingDef>


	<!-- Armor piercing -->

  <ThingDef ParentName="Makeable20mmShellBase">
    <defName>20mm_Shell_ArmorPiercing</defName>
    <label>20mm AP magazine</label>
    <description>A magazine of 20mm steel shells.containing enough ammo to burst fire several times. Explodes when damaged.</description>
    <graphicData>
      <texPath>AAA/shell/20mmAP</texPath>
      <graphicClass>Graphic_Single</graphicClass>
    </graphicData>
    <comps>
      <li Class="CompProperties_Explosive">
        <explosiveRadius>0.1</explosiveRadius>
        <explosiveDamageType>Bomb</explosiveDamageType>
        <explosiveExpandPerStackcount>0.4</explosiveExpandPerStackcount>
        <startWickHitPointsPercent>0.333</startWickHitPointsPercent>
        <wickTicks>
          <min>10</min>
          <max>30</max>
        </wickTicks>
      </li>
    </comps>
    <projectileWhenLoaded>Bullet_20mm_ArmorPiercing</projectileWhenLoaded>
    <costList>
      <Steel>28</Steel>
      <Chemfuel>12</Chemfuel>
    </costList>
	  <researchPrerequisites>
      <li>AAA_Autocannon</li>
    </researchPrerequisites>
  </ThingDef>

	<ThingDef ParentName="AAA_BaseProjectileCustom">
    <defName>Bullet_20mm_ArmorPiercing</defName>
    <label>AP 20mm round</label>
    <graphicData>
      <texPath>Things/Projectile/Bullet_Big</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <shaderType>TransparentPostLight</shaderType>
    </graphicData>
   <comps>
	  <li Class="AAA.CompProperties_ProjectileMultiple">
			<pellets>2</pellets>
			<scatterRadiusAt10tilesAway>0.0</scatterRadiusAt10tilesAway>
	  </li>


    </comps>
    <projectile>
      <damageDef>Bullet</damageDef>
      <damageAmountBase>25</damageAmountBase>
      <speed>95</speed>
       <flyOverhead>false</flyOverhead>
       <soundAmbient>MortarRound_Ambient</soundAmbient>
    </projectile>
  </ThingDef>

</Defs>
