ACTOR TKRWPlasmaArmCannon : Weapon
{
    obituary "%o took a fatal rifle round from %k."
	Weapon.SelectionOrder 560
	scale 0.4
		Weapon.AmmoUse1 5
	Weapon.AmmoGive1 50
	Inventory.PickupSound "TurokRageWars/Items/EnergyWeaponPick"
	Weapon.AmmoType1 "TKRWEnergyRounds"
	Weapon.AmmoType2 "TKRWEnergyRounds"
	Weapon.Kickback 100
	inventory.Icon "TK67L0"
	Tag "Plasma Arm Cannon"
	Inventory.PickupMessage "Plasma Arm Cannon"
	States
	{
		Spawn:
		TL66 I -1
		Stop
  Ready:
  	TNT1 A 0 A_PlaySound ("TurokRageWarsFanMade/Weapons/PlasmaCannonUp","Weapon")
    MK30 A 1
    MK30 BCDEFG 1
    MK30 H 1
    MK30 I -1 A_WeaponReady
    Goto Ready+5
  Deselect:
    MK30 D 1
    MK30 CBA 1
    TK10 O 0 A_Lower
    wait
	Select:
		MK30 A 0 A_Raise
		Loop
	Fire:
		TNT1 A 0 A_PlaySound ("TurokRageWarsFanMade/Weapons/PlasmaCannonFire","Weapon")
		MK30 JK 2
		MK30 L 2 BRIGHT A_FireCustomMissile ("TKRWPlasmaBang")
		MK30 MNOPQRST 1
		MK30 UVXYZ 2
		MK31 A 2 A_Refire
		Goto Ready+5
	AltFire:
	NULL A 0 A_JumpIfInventory("TKRWEnergyRounds",1,1)
  goto Ready+6
		TNT1 A 0 A_TakeInventory("TKRWEnergyRounds",50,TIF_NOTAKEINFINITE)
		TNT1 A 0 A_PlaySound ("TurokRageWarsFanMade/Weapons/PlasmaCannonAltFire","Weapon")
		MK30 JK 3
		TNT1 AAAAA 0 A_FireCustomMissile("TKRWPlasmaBangAlt",frandom(-1.5,1),5,frandom(1,9),0,0,frandom(-1.0,3))
		MK30 L 3 BRIGHT
		MK30 MNOPQRSTUVXYZ 3
		MK31 A 3 A_Refire
		Goto Ready+5
	}
}

ACTOR TKRWPlasmaBang
{   
  Speed 50
  Damage (30)
  damageType Plasma
  Scale 0.2
        radius 8
  height 8
  Projectile
  	  obituary "%k acidified %o with the Plasma Cannon."
  +FORCEXYBILLBOARD
  States
  {
  Spawn:
    TK53 ABCDEDCB 3 BRIGHT
    loop
DEATH:
NULL A 0
TNT1 A 0 A_PlaySound ("TurokRageWarsFanMade/Weapons/PlasmaCannonBoom")
NULL A 0 A_ALERTMONSTERS
NULL A 0 A_SPAWNITEMEX("TKRWPlasmaBangBoom",0,0,0,random(0,0),random(0,0),0)
STOP
}}


ACTOR TKRWPlasmaBangBoom
{
damageType Plasma
SCALE 1.5
	  obituary "%o got caught in %k's blast zone."
+NOGRAVITY
+FORCEXYBILLBOARD
+BRIGHT

STATES
{
SPAWN:
NULL A 0
NULL A 0 A_QUAKE(2,100,1,250,"")
NULL A 0 A_EXPLODE(30,200)
TK52 ABCDEFGHIJK 2
STOP
}}

Actor TKRWPlasmaBangAlt: Fastprojectile
{
	Height 1
	Radius 1
	Speed 5000
  obituary "%k's plasma obliterated %o."
	Damage (5)
	damageType Plasma
	Projectile
	  +BLOODSPLATTER
	+FORCEXYBILLBOARD
	states
		{
		Spawn:
			TNT1 A 1
			loop
		Crash:
		Death:
		TNT1 A 0 A_PlaySound ("TurokRageWarsFanMade/Weapons/PlasmaCannonBoom")
 TNT1 A 0 A_SpawnItemEx("TKRWPlasmaBangBoom",0,0,0,0,0,0,0,128,0)
			stop
		}
		
}