Actor PhaseGaus : Weapon
{
  Tag "Phase Gaus"
  Weapon.Selectionorder 4050
  Weapon.KickBack 100
  Weapon.AmmoType "DemonAmmo"
  Weapon.AmmoGive 80
  Weapon.AmmoUse 15
  Weapon.AmmoType2 "DemonAmmo"
  Weapon.PreferredSkin "Minigun-Marine"
  Inventory.PickupMessage "Phase Gaus"
  Inventory.PickupSound "weapons/demontechload"
  Obituary "%o got was divided by zero by %k's Phase Gaus"
  Decal DoomImpScorch
  States 
  {
Spawn:
	GAUS Z -1 
	Stop
Ready:
	TNT1 A 0 A_PlayWeaponSound("weapons/Hbfg10kidle")
	GAUS AAA 1 A_WeaponReady
	GAUS BBB 1 A_WeaponReady
	GAUS CCC 1 A_WeaponReady
	Loop
Select:
	GAUS A 1 Offset(-90,69)
	GAUS A 1 Offset(-70,60)
	GAUS A 1 Offset(-55,52)
	GAUS A 1 Offset(-35,45)
	GAUS A 1 Offset(-15,39)
	GAUS A 1 Offset(-1,35)
SelectRaise:
	GAUS A 1 A_Raise
Deselect:
	TNT1 A 0 A_PlayWeaponSound("weapons/weapondown")
	TNT1 A 0 A_Lower
	GAUS A 1 A_Lower
	Wait
Fire:
	GAUS A 25 A_PlayWeaponSound("weapons/Hcharge10k")
	TNT1 A 0 A_SetBlend("Purple", 0.1, 10)
	TNT1 A 0 A_FireCustomMissile("PhasePlayerRailPuff",0,0)
	TNT1 A 0 A_PlaySound("weapons/dtrailf")
	TNT1 A 0 A_RailAttack(750, 0, 1, none, none, RGF_SILENT, 0, "PhasePlayerRailPuff", 0, 0, 0, 0, 12.0, 0, "PhaseGausTrail", 1)
	GAUF A 2 Bright Offset(0, 48)
	GAUF B 2
	GAUF C 2
	GAUF D 2
	GAUF E 2
	GAUF F 2
	GAUF G 2
	GAUF H 2
	GAUF I 2
	GAUF J 2
	GAUF K 2
	Goto Ready
   }
}

ACTOR PhasePlayerRailPuff : FastProjectile
{
DamageType "Marine"
Damage (Random(200,250))
Speed 300
Radius 2
Height 2
RenderStyle Add
Alpha 0.85
+THRUACTORS
States
{
Spawn:
	TNT1 A 1
	Loop
Death:
	TNT1 A 0
	TNT1 A 0 A_Explode(125,100)
	TNT1 A 0 A_SpawnItemEx("PurpleBFGShockwave", 0, 0, 0, 0, 0, 0, 0, 128)
    TNT1 AAAA 0 A_CustomMissile("PurpleKaboom13", 0, 0, random(0,360), 2, random(0,360))	
	TNT1 A 1 A_SpawnItem("RailgunImpactEffectPurple")
	Stop
	}
}

ACTOR PhaseGausTrail 
{
Radius 8
Speed 10
Height 12
Scale 0.4
Renderstyle Add
Alpha 0.4
+NOGRAVITY
+NOINTERACTION
States
{
Spawn:
	TNT1 A 0 A_Explode(100,96)
	PGAB AAAAA 1 Bright
	GoTo Death
Death: 
	PGAB BC 2
	PGAB DE 2
	PGAB FG 2
	PGAB HI 2
	PGAB JKL 2
	TNT1 A 0
	STOP
}
}