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


  <ThingDef Name="BaseGun" Abstract="True">
    <category>Item</category>
    <eType>Equipment</eType>
    <thingClass>Equipment</thingClass>
    <label>Gun</label>
    <equipmentType>Primary</equipmentType>
    <isGun>True</isGun>
    <pathCost>10</pathCost>
    <useStandardHealth>True</useStandardHealth>
    <selectable>True</selectable>
    <maxHealth>100</maxHealth>
    <altitudeLayer>Item</altitudeLayer>
    <alwaysHaulable>True</alwaysHaulable>
    <tickerType>Never</tickerType>
    <techLevel>Midworld</techLevel>
    <storeCategories>
      <li>Weapons</li>
    </storeCategories>
    <weaponTags>
      <li>Gun</li>
    </weaponTags>
    <comps>
      <li>
        <compClass>CompForbiddable</compClass>
      </li>
    </comps>
    <verb>
      <category>Nonnative</category>
      <verbClass>Verb_Shoot</verbClass>
      <cooldownTicks>40</cooldownTicks>
      <label>VerbGun</label>
      <description>Fire a bullet.</description>
      <hasStandardCommand>true</hasStandardCommand>
      <targetParams>
        <canTargetPawns>true</canTargetPawns>
        <canTargetBuildings>true</canTargetBuildings>
        <worldObjectTargetsMustBeAutoAttackable>true</worldObjectTargetsMustBeAutoAttackable>
      </targetParams>
      <canMiss>true</canMiss>
    </verb>
  </ThingDef>

  <ThingDef Name="BaseBullet" Abstract="True">
    <category>Projectile</category>
    <tickerType>Normal</tickerType>
    <altitudeLayer>Projectile</altitudeLayer>
    <thingClass>Bullet</thingClass>
    <label>Bullet</label>
    <useStandardHealth>False</useStandardHealth>
    <neverMultiSelect>True</neverMultiSelect>
    <baseMaterialType>Transparent</baseMaterialType>
  </ThingDef>

  
  

  <!-- ================== Incendiary mortar ================== -->

  <ThingDef ParentName="BaseBullet">
    <defName>Bullet_MortarIncendiary</defName>
    <label>Incendiary mortar shell</label>
    <texturePath>Things/Projectile/ShellIncendiary</texturePath>
    <baseMaterialType>MotePostLight</baseMaterialType>
    <thingClass>Projectile_Explosive</thingClass>
    <projectile>
      <damageDef>Flame</damageDef>
      <damageAmountBase>50</damageAmountBase>
      <speed>41</speed>
      <explosionRadius>1.9</explosionRadius>
      <postExplosionSpawnThingDef>Puddle_Fuel</postExplosionSpawnThingDef>
      <explosionSpawnChance>0.3</explosionSpawnChance>
      <flyOverhead>true</flyOverhead>
      <soundHitThickRoof>ArtilleryHitThickRoof</soundHitThickRoof>
      <soundExplode>MortarIncendiary_Explode</soundExplode>
      <soundImpactAnticipate>MortarRound_PreImpact</soundImpactAnticipate>
      <soundAmbient>MortarRound_Ambient</soundAmbient>
    </projectile>
  </ThingDef>
  <ThingDef ParentName="BaseGun">
    <defName>Artillery_MortarIncendiary</defName>
    <label>Incendiary mortar</label>
    <description>Incendiary mortar launcher. Lobs fire-starting bombs over walls. Very inaccurate but long-ranged.</description>
    <basePrice>1500</basePrice>
    <techLevel>Spacer</techLevel>
    <destroyOnDrop>True</destroyOnDrop>
    <menuHidden>True</menuHidden>
    <weaponTags>
      <li>Artillery</li>
    </weaponTags>
    <verb>
      <projectileDef>Bullet_MortarIncendiary</projectileDef>
      <forcedMissRadius>16</forcedMissRadius>
      <ai_IsIncendiary>true</ai_IsIncendiary>
      <warmupTicks>300</warmupTicks>
      <cooldownTicks>3000</cooldownTicks>
      <minRange>30</minRange>
      <range>500</range>
      <accuracyTouch>0.79</accuracyTouch>
      <accuracyShort>0.42</accuracyShort>
      <accuracyMedium>0.18</accuracyMedium>
      <accuracyLong>0.06</accuracyLong>
      <burstShotCount>1</burstShotCount>
      <fireSound>Mortar_LaunchA</fireSound>
    </verb>
  </ThingDef>


  <!-- ================= Bomb mortar ================= -->

  <ThingDef ParentName="BaseBullet">
    <defName>Bullet_MortarBomb</defName>
    <label>Explosive mortar shell</label>
    <texturePath>Things/Projectile/ShellBomb</texturePath>
    <baseMaterialType>MotePostLight</baseMaterialType>
    <thingClass>Projectile_Explosive</thingClass>
    <projectile>
      <damageDef>Bomb</damageDef>
      <damageAmountBase>50</damageAmountBase>
      <speed>41</speed>
      <explosionRadius>2.5</explosionRadius>
      <flyOverhead>true</flyOverhead>
      <soundHitThickRoof>ArtilleryHitThickRoof</soundHitThickRoof>
      <soundExplode>MortarBomb_Explode</soundExplode>
      <soundImpactAnticipate>MortarRound_PreImpact</soundImpactAnticipate>
      <soundAmbient>MortarRound_Ambient</soundAmbient>
    </projectile>
  </ThingDef>
  <ThingDef ParentName="BaseGun">
    <defName>Artillery_MortarBomb</defName>
    <label>Explosive mortar</label>
    <description>Mortar launcher. Lobs bombs over walls. Very inaccurate but long-ranged.</description>
    <basePrice>1500</basePrice>
    <techLevel>Spacer</techLevel>
    <destroyOnDrop>True</destroyOnDrop>
    <menuHidden>True</menuHidden>
    <weaponTags>
      <li>Artillery</li>
    </weaponTags>
    <verb>
      <projectileDef>Bullet_MortarBomb</projectileDef>
      <forcedMissRadius>16</forcedMissRadius>
      <ai_IsIncendiary>true</ai_IsIncendiary>
      <warmupTicks>300</warmupTicks>
      <cooldownTicks>3000</cooldownTicks>
      <minRange>30</minRange>
      <range>500</range>
      <accuracyTouch>0.79</accuracyTouch>
      <accuracyShort>0.42</accuracyShort>
      <accuracyMedium>0.18</accuracyMedium>
      <accuracyLong>0.06</accuracyLong>
      <burstShotCount>1</burstShotCount>
      <fireSound>Mortar_LaunchA</fireSound>
    </verb>
  </ThingDef>




</ThingDefs>