actor NanoPlasmaGun : Weapon
{
  Weapon.SelectionOrder 1500
  Weapon.AmmoUse 1
  Weapon.AmmoGive 80
  Weapon.AmmoType "Cell"
  Tag "Plasma Blaster"
  Inventory.Pickupmessage "Picked up a Plasma Gun." // "Picked up a Plasma Gun."
  Weapon.UpSound "weapons/NanoPlasmaGun/raise"
  Scale 1.3
  States
  {
  Ready:
	NAPG A 1 A_WeaponReady
    Loop
  Deselect:
    NAPG A 1 A_Lower
	TNT1 A 0 A_Lower
	TNT1 A 0 A_Lower
	Loop
  Select:
	NAPG A 1 A_Raise
	TNT1 A 0 A_Raise
	TNT1 A 0 A_Raise
    Loop
  Fire:
    NAPG A 1 bright
	NAPG N 0 bright
	NAPG N 0 A_GUNFLASH
    NAPG N 2 bright A_FireCustomMissile("NanoPlasma", 0, 1, 0, 0)
	NAPG O 1 bright A_Recoil(0.6)
	NAPG A 1 bright A_ReFire
    Goto Ready
  Spawn:
    NAPG P -1
    Stop
  }
}

ACTOR NanoPlasma
{
	Radius 8
	Height 8
	Speed 25
	Damage 4
	Projectile
	+RANDOMIZE
	    Alpha .85
    RENDERSTYLE ADD
    SeeSound "weapons/camplasmafire"
    DeathSound "weapons/NanoPlasmaGun/explode"
	Obituary "$OB_MPROCKET"
	States
	{
	Spawn:
		ZXSS A 0
		ZXSS A 0
		ZXSS AB 2 BRIGHT A_CustomMissile("BlasterShotTrail",0,0,0,0)
		Loop
	Death:
		ZXSE ABCDE 3 bright
		Stop
	}
}

ACTOR BlasterShotTrail
{
    Speed 5
    Height 2
    Radius 4
    Mass 9
    Damage 1
    +Ripper
    SeeSound "weapons/blastershot2"
    PROJECTILE
	+NOTELEPORT
    Scale 0.3
    Alpha .55
    RENDERSTYLE ADD
    States
    {
    Spawn:
       ZXSE AB 2
       Goto Death       
    Death: 
       ZXSE B 2
       ZXSE ABAB 2 Bright A_FadeOut (0.1)
       loop
    }
}
