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


	<ThingDef Name="BaseGun" Abstract="True">
		<category>Item</category>
		<thingClass>ThingWithComps</thingClass>
		<equipmentType>Primary</equipmentType>
		<pathCost>10</pathCost>
		<useHitPoints>True</useHitPoints>
		<selectable>True</selectable>
		<drawGUIOverlay>true</drawGUIOverlay>
		<statBases>
			<MaxHitPoints>100</MaxHitPoints>
			<Flammability>1.0</Flammability>
			<DeteriorationRate>1</DeteriorationRate>
			<SellPriceFactor>0.5</SellPriceFactor>
		</statBases>
		<altitudeLayer>Item</altitudeLayer>
		<alwaysHaulable>True</alwaysHaulable>
		<tickerType>Never</tickerType>
		<techLevel>Midworld</techLevel>
		<thingCategories>
			<li>WeaponsRanged</li>
		</thingCategories>
		<inspectorTabs>
			<li>ITab_Art</li>
		</inspectorTabs>
		<comps>
			<li>
				<compClass>CompForbiddable</compClass>
			</li>
			<li>
				<compClass>CompEquippable</compClass>
			</li>
			<li>
				<compClass>CompQuality</compClass>
			</li>
			<li>
				<compClass>CompArt</compClass>
				<nameMaker>NamerGun</nameMaker>
				<descriptionMaker>ArtWeaponGun</descriptionMaker>
				<minQualityForArtistic>Excellent</minQualityForArtistic>
			</li>
		</comps>
		<smeltProducts>
			<Steel>20</Steel>
		</smeltProducts>
	</ThingDef>

	<ThingDef Name="BaseBullet" 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="BaseBullet">
		<defName>Bullet_EMRGTurret</defName>
		<label>Improvised turret bullet</label>
		<graphicData>
			<texPath>Things/Projectile/EM_Large</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<projectile>
			<damageDef>Bullet</damageDef>
			<damageAmountBase>80</damageAmountBase>
			<speed>200</speed>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="BaseGun">
		<defName>Gun_EMRGTurret</defName>
		<label>EMRG Turret Gun</label>
		<graphicData>
			<texPath>Things/Building/Turret/EMRGTurret_Top</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<menuHidden>true</menuHidden>
		<description>Jury-rigged EMRG Rifle attached to a turret.</description>
		<soundInteract>InteractRifle</soundInteract>
		<canBeSpawningInventory>false</canBeSpawningInventory>
		<tradeability>Never</tradeability>
		<statBases>
			<AccuracyTouch>0.90</AccuracyTouch>
			<AccuracyShort>0.98</AccuracyShort>
			<AccuracyMedium>0.98</AccuracyMedium>
			<AccuracyLong>0.98</AccuracyLong>
			<RangedWeapon_Cooldown>2.5</RangedWeapon_Cooldown>
		</statBases>
		<weaponTags>
			<li>EMRGTurretGun</li>
		</weaponTags>
		<verbs>
			<li>
				<verbClass>Verb_Shoot</verbClass>
				<hasStandardCommand>true</hasStandardCommand>
				<projectileDef>Bullet_EMRGTurret</projectileDef>
				<warmupTicks>180</warmupTicks>
				<range>60</range>
				<ticksBetweenBurstShots>15</ticksBetweenBurstShots>
				<burstShotCount>2</burstShotCount>
				<soundCast>EM</soundCast>
				<soundCastTail>GunTail_Heavy</soundCastTail>
				<muzzleFlashScale>12</muzzleFlashScale>
			</li>
		</verbs>
	</ThingDef>


	<ThingDef ParentName="BaseBullet">
		<defName>Bullet_CannisterTurret</defName>
		<label>Improvised turret bullet</label>
		<graphicData>
			<texPath>Things/Projectile/Bullet_Shotgun</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<projectile>
			<damageDef>Bullet</damageDef>
			<damageAmountBase>35</damageAmountBase>
			<speed>60</speed>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="BaseGun">
		<defName>Gun_CannisterTurret</defName>
		<label>Cannister Turret Gun</label>
		<menuHidden>true</menuHidden>
		<description>A cross between minigun and shotgun, attached to a turret.</description>
		<graphicData>
			<texPath>Things/Building/Turret/EMRGTurret_Top</texPath>
			<graphicClass>Graphic_Single</graphicClass>
		</graphicData>
		<soundInteract>InteractRifle</soundInteract>
		<canBeSpawningInventory>false</canBeSpawningInventory>
		<tradeability>Never</tradeability>
		<weaponTags>
			<li>CannisterTurretGun</li>
		</weaponTags>
		<statBases>
			<AccuracyTouch>0.35</AccuracyTouch>
			<AccuracyShort>0.15</AccuracyShort>
			<AccuracyMedium>0.8</AccuracyMedium>
			<AccuracyLong>0.2</AccuracyLong>
			<RangedWeapon_Cooldown>3.5</RangedWeapon_Cooldown>
		</statBases>
		<verbs>
			<li>
				<verbClass>Verb_Shoot</verbClass>
				<hasStandardCommand>true</hasStandardCommand>
				<projectileDef>Bullet_CannisterTurret</projectileDef>
				<warmupTicks>25</warmupTicks>
				<range>15</range>
				<ticksBetweenBurstShots>10</ticksBetweenBurstShots>
				<soundCast>ShotIncendiaryLauncher</soundCast>
				<soundCastTail>GunTail_Medium</soundCastTail>
				<muzzleFlashScale>12</muzzleFlashScale>
			</li>
		</verbs>
	</ThingDef>
	<!-- ================= Bomb mortar ================= -->

	<ThingDef ParentName="BaseBullet">
		<defName>Bullet_AutoMortar</defName>
		<label>explosive mortar shell</label>
		<graphicData>
			<texPath>Things/Projectile/ShellBomb</texPath>
			<graphicClass>Graphic_Single</graphicClass>
			<shaderType>TransparentPostLight</shaderType>
		</graphicData>
		<thingClass>Projectile_Explosive</thingClass>
		<projectile>
			<damageDef>Bomb</damageDef>
			<damageAmountBase>80</damageAmountBase>
			<speed>41</speed>
			<explosionRadius>4.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_AutoMortar</defName>
		<label>explosive mortar</label>
		<description>Mortar launcher. Lobs bombs over walls. Very inaccurate but long-ranged.</description>
		<techLevel>Spacer</techLevel>
		<destroyOnDrop>True</destroyOnDrop>
		<menuHidden>True</menuHidden>
		<tradeability>Never</tradeability>
		<statBases>
			<MarketValue>1500</MarketValue>
			<AccuracyTouch>0.79</AccuracyTouch>
			<AccuracyShort>0.42</AccuracyShort>
			<AccuracyMedium>0.18</AccuracyMedium>
			<AccuracyLong>0.06</AccuracyLong>
			<RangedWeapon_Cooldown>38</RangedWeapon_Cooldown>
		</statBases>
		<weaponTags>
			<li>Artillery</li>
			<li>Artillery_BaseDestroyer</li>
		</weaponTags>
		<verbs>
			<li>
				<verbClass>Verb_Shoot</verbClass>
				<forceNormalTimeSpeed>false</forceNormalTimeSpeed>
				<hasStandardCommand>true</hasStandardCommand>
				<projectileDef>Bullet_AutoMortar</projectileDef>
				<forcedMissRadius>8</forcedMissRadius>
				<warmupTicks>250</warmupTicks>
				<minRange>30</minRange>
				<range>500</range>
				<burstShotCount>1</burstShotCount>
				<soundCast>Mortar_LaunchA</soundCast>
				<muzzleFlashScale>16</muzzleFlashScale>
			</li>
		</verbs>
	</ThingDef>


	<ThingDef ParentName="BaseBullet">
		<defName>Bullet_ClusterMortar</defName>
		<label>explosive mortar shell</label>
		<graphicData>
			<texPath>Things/Projectile/ShellBomb</texPath>
			<graphicClass>Graphic_Single</graphicClass>
			<shaderType>TransparentPostLight</shaderType>
		</graphicData>
		<thingClass>Projectile_Explosive</thingClass>
		<projectile>
			<damageDef>Bomb</damageDef>
			<damageAmountBase>30</damageAmountBase>
			<speed>41</speed>
			<explosionRadius>1.9</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_ClusterMortar</defName>
		<label>explosive mortar</label>
		<description>Mortar launcher. Lobs bombs over walls. Very inaccurate but long-ranged.</description>
		<techLevel>Spacer</techLevel>
		<destroyOnDrop>True</destroyOnDrop>
		<menuHidden>True</menuHidden>
		<tradeability>Never</tradeability>
		<statBases>
			<MarketValue>1500</MarketValue>
			<AccuracyTouch>0.79</AccuracyTouch>
			<AccuracyShort>0.42</AccuracyShort>
			<AccuracyMedium>0.18</AccuracyMedium>
			<AccuracyLong>0.06</AccuracyLong>
			<RangedWeapon_Cooldown>38</RangedWeapon_Cooldown>
		</statBases>
		<weaponTags>
			<li>Artillery</li>
			<li>Artillery_BaseDestroyer</li>
		</weaponTags>
		<verbs>
			<li>
				<verbClass>Verb_Shoot</verbClass>
				<forceNormalTimeSpeed>false</forceNormalTimeSpeed>
				<hasStandardCommand>true</hasStandardCommand>
				<projectileDef>Bullet_ClusterMortar</projectileDef>
				<forcedMissRadius>8</forcedMissRadius>
				<warmupTicks>250</warmupTicks>
				<minRange>30</minRange>
				<range>500</range>
				<burstShotCount>12</burstShotCount>
				<soundCast>Mortar_LaunchA</soundCast>
				<muzzleFlashScale>16</muzzleFlashScale>
			</li>
		</verbs>
	</ThingDef>


	<ThingDef ParentName="BaseBullet">
		<defName>Bullet_EMPAMortar</defName>
		<label>explosive mortar shell</label>
		<graphicData>
			<texPath>Things/Projectile/ShellEMP</texPath>
			<graphicClass>Graphic_Single</graphicClass>
			<shaderType>TransparentPostLight</shaderType>
		</graphicData>
		<thingClass>Projectile_Explosive</thingClass>
		<projectile>
			<damageDef>EMP</damageDef>
			<damageAmountBase>260</damageAmountBase>
			<speed>65</speed>
			<explosionRadius>3.9</explosionRadius>
			<flyOverhead>true</flyOverhead>
			<soundHitThickRoof>ArtilleryHitThickRoof</soundHitThickRoof>
			<soundExplode>MortarEMP_Explode</soundExplode>
			<soundImpactAnticipate>MortarRound_PreImpact</soundImpactAnticipate>
			<soundAmbient>MortarRound_Ambient</soundAmbient>
		</projectile>
	</ThingDef>

	<ThingDef ParentName="BaseGun">
		<defName>Artillery_EMPAMortar</defName>
		<label>explosive mortar</label>
		<description>Mortar launcher. Lobs bombs over walls. Very inaccurate but long-ranged.</description>
		<techLevel>Spacer</techLevel>
		<destroyOnDrop>True</destroyOnDrop>
		<menuHidden>True</menuHidden>
		<tradeability>Never</tradeability>
		<statBases>
			<MarketValue>1500</MarketValue>
			<AccuracyTouch>0.79</AccuracyTouch>
			<AccuracyShort>0.42</AccuracyShort>
			<AccuracyMedium>0.18</AccuracyMedium>
			<AccuracyLong>0.06</AccuracyLong>
			<RangedWeapon_Cooldown>38</RangedWeapon_Cooldown>
		</statBases>
		<weaponTags>
			<li>Artillery</li>
			<li>Artillery_BaseDestroyer</li>
		</weaponTags>
		<verbs>
			<li>
				<verbClass>Verb_Shoot</verbClass>
				<forceNormalTimeSpeed>false</forceNormalTimeSpeed>
				<hasStandardCommand>true</hasStandardCommand>
				<projectileDef>Bullet_EMPAMortar</projectileDef>
				<forcedMissRadius>8</forcedMissRadius>
				<warmupTicks>250</warmupTicks>
				<minRange>30</minRange>
				<range>500</range>
				<burstShotCount>12</burstShotCount>
				<soundCast>Mortar_LaunchA</soundCast>
				<muzzleFlashScale>16</muzzleFlashScale>
			</li>
		</verbs>
	</ThingDef>

	<ThingDef ParentName="BaseBullet">
		<defName>Bullet_MissileTurret</defName>
		<label>explosive mortar shell</label>
		<graphicData>
			<texPath>Things/Projectile/Turret_Missile</texPath>
			<graphicClass>Graphic_Single</graphicClass>
			<shaderType>TransparentPostLight</shaderType>
		</graphicData>
		<thingClass>Projectile_Explosive</thingClass>
		<projectile>
			<damageDef>Bomb</damageDef>
			<damageAmountBase>40</damageAmountBase>
			<speed>35</speed>
			<explosionRadius>1.9</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_MissileTurret</defName>
		<label>explosive mortar</label>
		<description>Missile launcher. Launches a large number of missiles.</description>
		<techLevel>Spacer</techLevel>
		<destroyOnDrop>True</destroyOnDrop>
		<menuHidden>True</menuHidden>
		<tradeability>Never</tradeability>
		<statBases>
			<MarketValue>1500</MarketValue>
			<AccuracyTouch>0.85</AccuracyTouch>
			<AccuracyShort>0.75</AccuracyShort>
			<AccuracyMedium>0.65</AccuracyMedium>
			<AccuracyLong>0.55</AccuracyLong>
			<RangedWeapon_Cooldown>38</RangedWeapon_Cooldown>
		</statBases>
		<weaponTags>
			<li>Artillery</li>
			<li>Artillery_BaseDestroyer</li>
		</weaponTags>
		<verbs>
			<li>
				<verbClass>Verb_Shoot</verbClass>
				<forceNormalTimeSpeed>false</forceNormalTimeSpeed>
				<hasStandardCommand>true</hasStandardCommand>
				<projectileDef>Bullet_MissileTurret</projectileDef>
				<forcedMissRadius>2</forcedMissRadius>
				<warmupTicks>100</warmupTicks>
				<minRange>15</minRange>
				<range>500</range>
				<burstShotCount>36</burstShotCount>
				<soundCast>Missile_small</soundCast>
				<muzzleFlashScale>16</muzzleFlashScale>
			</li>
		</verbs>
	</ThingDef>

	<ThingDef ParentName="BaseBullet">
		<defName>Bullet_CMissileTurret</defName>
		<label>explosive mortar shell</label>
		<graphicData>
			<texPath>Things/Projectile/Turret_CMissile</texPath>
			<graphicClass>Graphic_Single</graphicClass>
			<shaderType>TransparentPostLight</shaderType>
		</graphicData>
		<thingClass>Projectile_Explosive</thingClass>
		<projectile>
			<damageDef>Bomb</damageDef>
			<damageAmountBase>80</damageAmountBase>
			<speed>35</speed>
			<explosionRadius>25.9</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_CMissileTurret</defName>
		<label>explosive mortar</label>
		<description>Missile launcher. Launches a large number of missiles.</description>
		<techLevel>Spacer</techLevel>
		<destroyOnDrop>True</destroyOnDrop>
		<menuHidden>True</menuHidden>
		<tradeability>Never</tradeability>
		<statBases>
			<MarketValue>1500</MarketValue>
			<AccuracyTouch>0.85</AccuracyTouch>
			<AccuracyShort>0.75</AccuracyShort>
			<AccuracyMedium>0.65</AccuracyMedium>
			<AccuracyLong>0.55</AccuracyLong>
			<RangedWeapon_Cooldown>80</RangedWeapon_Cooldown>
		</statBases>
		<weaponTags>
			<li>Artillery</li>
			<li>Artillery_BaseDestroyer</li>
		</weaponTags>
		<verbs>
			<li>
				<verbClass>Verb_Shoot</verbClass>
				<forceNormalTimeSpeed>false</forceNormalTimeSpeed>
				<hasStandardCommand>true</hasStandardCommand>
				<projectileDef>Bullet_CMissileTurret</projectileDef>
				<forcedMissRadius>2</forcedMissRadius>
				<warmupTicks>650</warmupTicks>
				<minRange>15</minRange>
				<range>500</range>
				<burstShotCount>1</burstShotCount>
				<soundCast>Missile_large</soundCast>
				<muzzleFlashScale>16</muzzleFlashScale>
			</li>
		</verbs>
	</ThingDef>

</ThingDefs>