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

  <ThingDef Name="BasedWeapon" ParentName="BasedMom" Abstract="True">
    <designationCategory>Rimatomics</designationCategory>
    <tickerType>Normal</tickerType>
    <castEdgeShadows>false</castEdgeShadows>
    <blockWind>true</blockWind>
    <altitudeLayer>Building</altitudeLayer>
    <passability>PassThroughOnly</passability>
    <pathCost>150</pathCost>
    <terrainAffordanceNeeded>Light</terrainAffordanceNeeded>
    <constructEffect>ConstructMetal</constructEffect>
    <hasTooltip>true</hasTooltip>
    <staticSunShadowHeight>0</staticSunShadowHeight>
    <canOverlapZones>false</canOverlapZones>
  </ThingDef>

  <ThingDef ParentName="BasedWeapon">
    <defName>PPC</defName>
    <label>Pulsed Power Capacitor</label>
    <description>A PPC stores large amounts of energy, which can be discharged in a single pulse by energy weapons</description>
    <thingClass>Rimatomics.Building_PPC</thingClass>
    <graphicData>
      <texPath>Things/RimatomicsBuildings/PPC</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(4,6)</drawSize>
    </graphicData>
    <size>(2,4)</size>
    <fillPercent>0.60</fillPercent>
    <statBases>
      <MaxHitPoints>200</MaxHitPoints>
      <WorkToBuild>800</WorkToBuild>
      <Mass>2000</Mass>
      <Flammability>1.0</Flammability>
      <Beauty>-18</Beauty>
    </statBases>
    <building>
      <ignoreNeedsPower>true</ignoreNeedsPower>
      <ai_combatDangerous>true</ai_combatDangerous>
    </building>
    <costList>
      <Steel>400</Steel>
      <Component>8</Component>
    </costList>
    <comps>
      <li Class="CompProperties_Battery">
        <storedEnergyMax>6000</storedEnergyMax>
        <efficiency>0.9</efficiency>
        <startElectricalFires>false</startElectricalFires>
        <transmitsPower>true</transmitsPower>
      </li>
      <li Class="CompProperties_Breakdownable"/>
    </comps>
    <designationHotkey>Misc4</designationHotkey>
    <researchPrerequisites>
      <li>EnergyWeapons6</li>
    </researchPrerequisites>
  </ThingDef>

  <ThingDef ParentName="BasedWeapon">
    <defName>PPCWeaponsConsole</defName>
    <label>Weapons Console</label>
    <description>A manned target acquisition computer required by all energy weapons</description>
    <size>(5,2)</size>
    <thingClass>Rimatomics.WeaponsConsole</thingClass>
    <graphicData>
      <texPath>Things/RimatomicsBuildings/WarRoom</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <shaderType>CutoutComplex</shaderType>
      <drawSize>(7,4)</drawSize>
    </graphicData>
    <DrawGUIOverlay>True</DrawGUIOverlay>
    <fillPercent>1</fillPercent>
    <statBases>
      <MaxHitPoints>250</MaxHitPoints>
      <WorkToBuild>9800</WorkToBuild>
      <Flammability>1.0</Flammability>
    </statBases>
    <hasInteractionCell>True</hasInteractionCell>
    <interactionCellOffset>(0,0,-1)</interactionCellOffset>
    <rotatable>true</rotatable>
    <costList>
      <Steel>250</Steel>
      <Component>16</Component>
    </costList>
    <comps>
      <li Class="CompProperties_Mannable">
        <manWorkType>Violent</manWorkType>
      </li>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>175</basePowerConsumption>
        <startElectricalFires>true</startElectricalFires>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_Breakdownable"/>
    </comps>
    <building>
      <ai_combatDangerous>true</ai_combatDangerous>
    </building>
    <designationHotkey>Misc6</designationHotkey>
    <researchPrerequisites>
      <li>EnergyWeapons4</li>
    </researchPrerequisites>
  </ThingDef>

  <ThingDef ParentName="BasedWeapon">
    <defName>RadarDish</defName>
    <label>Target Acquisition System</label>
    <description>The Target Acquisition System uses a combination of technologies to track land and air based targets</description>
    <thingClass>Rimatomics.Building_Radar</thingClass>
    <graphicData>
      <texPath>Things/RimatomicsBuildings/LaWSbase</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <drawSize>(5,5)</drawSize>
    </graphicData>
    <uiIconPath>UI/Radar</uiIconPath>
    <rotatable>false</rotatable>
    <statBases>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <WorkToBuild>2500</WorkToBuild>
      <Mass>100</Mass>
      <Beauty>-60</Beauty>
    </statBases>
    <comps>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>550</basePowerConsumption>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_Breakdownable"/>
    </comps>
    <size>(3,3)</size>
    <fillPercent>0.8</fillPercent>
    <costList>
      <Steel>275</Steel>
      <Component>6</Component>
    </costList>
    <terrainAffordanceNeeded>Light</terrainAffordanceNeeded>
    <building>
      <turretTopgraphicPath>Things/RimatomicsBuildings/RadarDish</turretTopgraphicPath>
    </building>
    <designationHotKey>Misc2</designationHotKey>
    <placeWorkers>
      <li>PlaceWorker_NotUnderRoof</li>
      <li>Rimatomics.PlaceWorker_ResearchStage</li>
    </placeWorkers>
    <researchPrerequisites>
      <li>EnergyWeapons5</li>
    </researchPrerequisites>
  </ThingDef>

  <ThingDef ParentName="BasedWeapon">
    <defName>PPCADS</defName>
    <label>ADS</label>
    <description>The ADS (Active Denial System) is a directed energy weapon that uses microwaves to burn groups of enemies forcing them to flee, Requires a weapons console and a PPC for power.</description>
    <thingClass>Rimatomics.Building_ADS</thingClass>
    <graphicData>
      <texPath>Things/RimatomicsBuildings/ADSbase</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <drawSize>(5,5)</drawSize>
    </graphicData>
    <uiIconPath>UI/ADS</uiIconPath>
    <rotatable>false</rotatable>
    <statBases>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <WorkToBuild>2500</WorkToBuild>
      <Mass>100</Mass>
      <Beauty>-60</Beauty>
    </statBases>
    <comps>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>200</basePowerConsumption>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_Breakdownable"/>
      <li Class="Rimatomics.CompProperties_Upgradable"/>
    </comps>
    <size>(3,3)</size>
    <fillPercent>0.4</fillPercent>
    <costList>
      <Steel>600</Steel>
      <Component>13</Component>
    </costList>
    <terrainAffordanceNeeded>Light</terrainAffordanceNeeded>
    <specialDisplayRadius>55</specialDisplayRadius>
    <building>
      <ai_combatDangerous>true</ai_combatDangerous>
      <turretTopgraphicPath>Things/RimatomicsBuildings/ADSdish</turretTopgraphicPath>
    </building>
    <designationHotKey>Misc2</designationHotKey>
    <placeWorkers>
      <li>Rimatomics.PlaceWorker_ResearchStage</li>
    </placeWorkers>
    <researchPrerequisites>
      <li>ADS3</li>
    </researchPrerequisites>
  </ThingDef>

  <ThingDef ParentName="BasedWeapon">
    <defName>PPCTeslaCoil</defName>
    <label>Tesla Coil</label>
    <description>Delivers a large electrical discharge to anything within range. Short range. Requires a weapons console and a PPC for power.</description>
    <thingClass>Rimatomics.Building_TeslaCoil</thingClass>
    <graphicData>
      <texPath>Things/RimatomicsBuildings/teslaCoil</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <drawSize>(5,5)</drawSize>
    </graphicData>
    <size>(3,3)</size>
    <fillPercent>0.4</fillPercent>
    <rotatable>false</rotatable>
    <statBases>
      <MaxHitPoints>100</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <WorkToBuild>2500</WorkToBuild>
      <Mass>100</Mass>
      <Beauty>-60</Beauty>
    </statBases>
    <comps>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>175</basePowerConsumption>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_Breakdownable"/>
      <li Class="Rimatomics.CompProperties_Upgradable"/>
    </comps>
    <costList>
      <Steel>300</Steel>
      <Component>9</Component>
    </costList>
    <specialDisplayRadius>14.9</specialDisplayRadius>
    <building>
      <ai_combatDangerous>true</ai_combatDangerous>
    </building>
    <designationHotKey>Misc2</designationHotKey>
    <drawOffscreen>true</drawOffscreen>
    <placeWorkers>
      <li>Rimatomics.PlaceWorker_ResearchStage</li>
    </placeWorkers>
    <researchPrerequisites>
      <li>TeslaCoil3</li>
    </researchPrerequisites>
  </ThingDef>



  <ThingDef ParentName="BasedWeapon">
    <defName>PPCHEL</defName>
    <label>HEL</label>
    <description>The HEL (High Energy Laser) is a weapon that uses a laser to destroy incoming airborne projectiles. Requires a weapons console and a PPC for power.</description>
    <thingClass>Rimatomics.Building_HEL</thingClass>
    <graphicData>
      <texPath>Things/RimatomicsBuildings/LaWSbase</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <drawSize>(5,5)</drawSize>
    </graphicData>
    <uiIconPath>UI/HEL</uiIconPath>
    <drawOffscreen>true</drawOffscreen>
    <rotatable>false</rotatable>
    <size>(3,3)</size>
    <fillPercent>0.4</fillPercent>
    <specialDisplayRadius>55</specialDisplayRadius>
    <comps>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>250</basePowerConsumption>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_Breakdownable"/>
      <li Class="Rimatomics.CompProperties_Upgradable"/>
    </comps>
    <statBases>
      <MaxHitPoints>180</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <WorkToBuild>2700</WorkToBuild>
      <Mass>200</Mass>
      <Beauty>-60</Beauty>
    </statBases>
    <building>
      <ai_combatDangerous>true</ai_combatDangerous>
      <turretTopgraphicPath>Things/RimatomicsBuildings/LaWStop</turretTopgraphicPath>
    </building>
    <placeWorkers>
      <li>PlaceWorker_NotUnderRoof</li>
      <li>Rimatomics.PlaceWorker_ResearchStage</li>
    </placeWorkers>
    <costList>
      <Steel>650</Steel>
      <Component>19</Component>
    </costList>
    <designationHotKey>Misc3</designationHotKey>
    <researchPrerequisites>
      <li>HEL3</li>
    </researchPrerequisites>
  </ThingDef>

  <ThingDef ParentName="BasedWeapon">
    <defName>PPCRailgun</defName>
    <label>Railgun</label>
    <description>A weapon that uses a large electromagnetic pulse to launch a projectile to extreme ranges. Requires a weapons console and a PPC for power.</description>
    <thingClass>Rimatomics.Building_Railgun</thingClass>
    <graphicData>
      <texPath>Things/RimatomicsBuildings/RailgunBase</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <drawSize>(4,4)</drawSize>
      <damageData>
        <rect>(0.38,0.2,0.56375,0.8)</rect>
        <cornerTL>Damage/Corner</cornerTL>
      </damageData>
    </graphicData>
    <rotatable>true</rotatable>
    <size>(4,4)</size>
    <fillPercent>0.9</fillPercent>
    <comps>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>350</basePowerConsumption>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_Breakdownable"/>
      <li Class="Rimatomics.CompProperties_Upgradable"/>
    </comps>
    <statBases>
      <MaxHitPoints>480</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <WorkToBuild>2700</WorkToBuild>
      <Mass>200</Mass>
      <Beauty>-60</Beauty>
    </statBases>
    <building>
      <turretShellDef>RailgunSabot</turretShellDef>
      <turretBurstwarmupTime>5.0</turretBurstwarmupTime>
      <turretBurstCooldownTime>35.0</turretBurstCooldownTime>
      <buildingTags>
        <li>Artillery</li>
      </buildingTags>
      <turretGunDef>Artillery_PPCRailgun</turretGunDef>
      <turretTopgraphicPath>Things/RimatomicsBuildings/Railgun_Top</turretTopgraphicPath>
    </building>
    <placeWorkers>
      <li>PlaceWorker_NotUnderRoof</li>
      <li>Rimatomics.PlaceWorker_ResearchStage</li>
    </placeWorkers>
    <costList>
      <Steel>650</Steel>
      <Component>19</Component>
    </costList>
    <designationHotKey>Misc3</designationHotKey>
    <uiIconPath>UI/Railgun</uiIconPath>
    <researchPrerequisites>
      <li>Railgun3</li>
    </researchPrerequisites>
  </ThingDef>

  <ThingDef>
    <defName>Artillery_PPCRailgun</defName>
    <label>explosive mortar</label>
    <description>Mortar launcher. Lobs bombs over walls. Very inaccurate but long-ranged.</description>
    <category>Item</category>
    <thingClass>ThingWithComps</thingClass>
    <equipmentType>Primary</equipmentType>
    <tickerType>Never</tickerType>
    <techLevel>Industrial</techLevel>
    <destroyOnDrop>True</destroyOnDrop>
    <menuHidden>True</menuHidden>
    <tradeability>Never</tradeability>
    <weaponTags>
      <li>Artillery</li>
    </weaponTags>
    <comps>
      <li>
        <compClass>CompEquippable</compClass>
      </li>
    </comps>
    <verbs>
      <li>
        <verbClass>Verb_Shoot</verbClass>
        <forceNormalTimeSpeed>false</forceNormalTimeSpeed>
        <hasStandardCommand>true</hasStandardCommand>
        <projectileDef>Bullet_PPCRailgun</projectileDef>
        <forcedMissRadius>6</forcedMissRadius>
        <warmupTime>5.8</warmupTime>
        <minRange>30</minRange>
        <range>500</range>
        <burstShotCount>1</burstShotCount>
        <soundCast>Mortar_LaunchA</soundCast>
        <muzzleFlashScale>24</muzzleFlashScale>
      </li>
    </verbs>
  </ThingDef>

  <ThingDef Name="BaseSabot" Abstract="True">
    <category>Projectile</category>
    <tickerType>Normal</tickerType>
    <altitudeLayer>Projectile</altitudeLayer>
    <thingClass>Bullet</thingClass>
    <label>bullet</label>
    <useHitPoints>False</useHitPoints>
    <neverMultiSelect>True</neverMultiSelect>
    <graphicData>
      <shaderType>Transparent</shaderType>
    </graphicData>
  </ThingDef>

  <ThingDef ParentName="BaseSabot">
    <defName>Bullet_PPCRailgun</defName>
    <label>explosive mortar shell</label>
    <graphicData>
      <texPath>Things/Resources/SabotRound</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <shaderType>TransparentPostLight</shaderType>
    </graphicData>
    <thingClass>Projectile_Explosive</thingClass>
    <projectile>
      <damageDef>Bomb</damageDef>
      <damageAmountBase>60</damageAmountBase>
      <speed>150</speed>
      <explosionRadius>6.5</explosionRadius>
      <flyOverhead>true</flyOverhead>
      <soundHitThickRoof>ArtilleryHitThickRoof</soundHitThickRoof>
      <soundExplode>MortarBomb_Explode</soundExplode>
      <soundImpactAnticipate>MortarRound_PreImpact</soundImpactAnticipate>
      <soundAmbient>MortarRound_Ambient</soundAmbient>
    </projectile>
  </ThingDef>

  <ThingDef ParentName="BasedWeapon">
    <defName>PPCObelisk</defName>
    <label>Obelisk</label>
    <description>A directed energy weapon that uses a focused laser to burn targets. Highly accurate with long range, Requires a weapons console and a PPC for power.</description>
    <thingClass>Rimatomics.Building_Obelisk</thingClass>
    <graphicData>
      <texPath>Things/RimatomicsBuildings/obelisk</texPath>
      <graphicClass>Graphic_Multi</graphicClass>
      <drawSize>(5,5)</drawSize>
    </graphicData>
    <size>(3,3)</size>
    <fillPercent>0.4</fillPercent>
    <drawOffscreen>true</drawOffscreen>
    <rotatable>true</rotatable>
    <statBases>
      <MaxHitPoints>280</MaxHitPoints>
      <Flammability>1.0</Flammability>
      <WorkToBuild>2500</WorkToBuild>
      <Mass>100</Mass>
      <Beauty>-60</Beauty>
    </statBases>
    <comps>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>350</basePowerConsumption>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_Breakdownable"/>
      <li Class="Rimatomics.CompProperties_Upgradable"/>
    </comps>
    <costStuffCount>75</costStuffCount>
    <costList>
      <Steel>600</Steel>
      <Component>13</Component>
    </costList>
    <specialDisplayRadius>55</specialDisplayRadius>
    <building>
      <ai_combatDangerous>true</ai_combatDangerous>
    </building>
    <designationHotKey>Misc2</designationHotKey>
    <placeWorkers>
      <li>Rimatomics.PlaceWorker_ResearchStage</li>
    </placeWorkers>
    <researchPrerequisites>
      <li>Obelisk3</li>
    </researchPrerequisites>
  </ThingDef>

  <!-- ICBM -->

  <ThingDef Name="BaseMissile" Abstract="True" ParentName="BasedMom">
    <tickerType>Normal</tickerType>
    <rotatable>false</rotatable>
    <altitudeLayer>Weather</altitudeLayer>
    <passability>Standable</passability>
    <iconDrawScale>1</iconDrawScale>
    <statBases>
      <MaxHitPoints>75</MaxHitPoints>
      <WorkToBuild>25000</WorkToBuild>
      <Flammability>0</Flammability>
    </statBases>
    <building>
      <isEdifice>false</isEdifice>
    </building>
    <placeWorkers>
      <li>Rimatomics.PlaceWorker_NeedsPad</li>
      <li>PlaceWorker_NotUnderRoof</li>
    </placeWorkers>
    <comps>
      <li Class="CompProperties_Explosive">
        <explosiveRadius>8.9</explosiveRadius>
        <explosiveDamageType>Flame</explosiveDamageType>
        <chanceNeverExplodeFromDamage>0</chanceNeverExplodeFromDamage>
      </li>
      <li Class="Rimatomics.CompProperties_Upgradable"/>
    </comps>
  </ThingDef>

  <ThingDef ParentName="BaseMissile">
    <defName>ICBMfission</defName>
    <label>ICBM Fission</label>
    <description>An intercontinental ballistic missile (ICBM) is a guided ballistic missile primarily designed for nuclear weapons delivery, this one is tipped with a fission warhead.</description>
    <thingClass>Rimatomics.BaseMissile</thingClass>
    <graphicData>
      <texPath>Things/RimatomicsBuildings/icbm</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <drawSize>(3,6)</drawSize>
    </graphicData>
    <drawOffscreen>true</drawOffscreen>
    <statBases>
      <WorkToBuild>20000</WorkToBuild>
    </statBases>
    <costList>
      <Steel>175</Steel>
      <Chemfuel>175</Chemfuel>
      <RocketEngine>4</RocketEngine>
      <FissionWarhead>1</FissionWarhead>
    </costList>
    <researchPrerequisites>
      <li>ICBM4</li>
    </researchPrerequisites>
  </ThingDef>

  <ThingDef ParentName="BasedWeapon">
    <defName>LaunchPad</defName>
    <label>Launch Pad</label>
    <thingClass>Rimatomics.LaunchPad</thingClass>
    <fillPercent>0.2</fillPercent>
    <description>A launch pad is an above-ground platform from which a rocket-powered missile is vertically launched.</description>
    <graphicData>
      <texPath>Things/RimatomicsBuildings/launchpad</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <drawSize>(7,7)</drawSize>
    </graphicData>
    <category>Building</category>
    <passability>Standable</passability>
    <surfaceType>Item</surfaceType>
    <altitudeLayer>Building</altitudeLayer>
    <rotatable>false</rotatable>
    <tickerType>Normal</tickerType>
    <selectable>true</selectable>
    <size>(5,5)</size>
    <castEdgeShadows>true</castEdgeShadows>
    <blockWind>false</blockWind>
    <constructEffect>ConstructMetal</constructEffect>
    <staticSunShadowHeight>0.2</staticSunShadowHeight>
    <drawOffscreen>true</drawOffscreen>
    <costList>
      <Steel>400</Steel>
      <Component>4</Component>
    </costList>
    <statBases>
      <MaxHitPoints>500</MaxHitPoints>
      <WorkToBuild>1000</WorkToBuild>
      <Flammability>0</Flammability>
      <Beauty>-30</Beauty>
    </statBases>
    <comps>
      <li Class="CompProperties_Power">
        <compClass>CompPowerTrader</compClass>
        <basePowerConsumption>200</basePowerConsumption>
      </li>
      <li Class="CompProperties_Flickable"/>
      <li Class="CompProperties_Breakdownable"/>
    </comps>
    <placeWorkers>
      <li>Rimatomics.PlaceWorker_LaunchPad</li>
      <li>PlaceWorker_NotUnderRoof</li>
    </placeWorkers>   
    <drawPlaceWorkersWhileSelected>true</drawPlaceWorkersWhileSelected>
    <researchPrerequisites>
      <li>ICBM3</li>
    </researchPrerequisites>
  </ThingDef>

  <ThingDef>
    <defName>notReal</defName>
    <label>notReal</label>
    <thingClass>Rimatomics.notReal</thingClass>
    <category>Item</category>
    <tickerType>Normal</tickerType>
    <graphicData>
      <texPath>Things/Untitled</texPath>
      <graphicClass>Graphic_Single</graphicClass>
      <drawSize>(6,6)</drawSize>
    </graphicData>
    <altitudeLayer>FlyingItem</altitudeLayer>
    <useHitPoints>false</useHitPoints>
    <drawOffscreen>true</drawOffscreen>
    <passability>Impassable</passability>
  </ThingDef>

</Defs>