////////////////////////////////
// HERETIC GOLD WAND ENHANCED //
////////////////////////////////

ACTOR GoldWandPuff1~ : GoldWandPuff1 replaces GoldWandPuff1
{
	+NOBLOCKMAP
	+GHOST
	+NOCLIP
	+NOGRAVITY
	+NOTARGET
	-SOLID
	-SHOOTABLE
	-COUNTKILL
	+FLOORCLIP
  RenderStyle Add
  States  
  {
  Spawn:
    TNT1 A 0
	TNT1 AAAAA 0 A_SpawnItemEx("SparkPiece", 0, 0, 0, (0.1)*Random(10, 40), 0, (0.1)*Random(-40, 40), Random(0, 360), 128)
	TNT1 A 0 A_SpawnItem("WandFlash")
    PUF2 ABCDE 3 Bright
	stop
  }
}

Actor Sparkpiece
{
  Height 0
  Radius 0
  Mass 0
  +Missile
  +NoBlockMap
  +DontSplash
  +NoInteraction
  RenderStyle Add
  Scale 0.015
  States
  {
  Spawn:
  Death:
    GLIT A 2 Bright A_FadeOut(0.1)
    Loop
  }
}

ACTOR GoldWandPuff2~ : GoldWandFX1 replaces GoldWandPuff2
{
  Skip_Super
  +NOBLOCKMAP
  +NOGRAVITY
  RenderStyle Add
  States
  {
  Spawn:
    TNT1 AAAAA 0 A_SpawnItemEx("SparkPiece", 0, 0, 0, (0.1)*Random(10, 40), 0, (0.1)*Random(-40, 40), Random(0, 360), 128)
	TNT1 A 0 A_SpawnItem("WandFlash")
    Goto Super::Death
  }
}

ACTOR GoldWandFX1~ : GoldWandFX1 replaces GoldWandFX1
{
  Game Heretic
  SpawnID 151
  Radius 10
  Height 6
  Speed 22
  Damage 2
  Projectile
  RenderStyle Add
  DeathSound "weapons/wandhit"
  States
  {
  Spawn:
    FX01 AB 6 BRIGHT A_CustomMissile("Wandtrail",0,0,0,2)
    Loop
  Death:
	TNT1 AAAAA 0 A_SpawnItemEx("SparkPiece", 0, 0, 0, (0.1)*Random(10, 40), 0, (0.1)*Random(-40, 40), Random(0, 360), 128)
	TNT1 A 0 A_SpawnItem("WandFlash")
	FX01 EFGH 3 BRIGHT
    Stop
  }
}

ACTOR GoldWandFX2~ : GoldWandFX2 replaces GoldWandFX2
{
  Game Heretic
  SpawnID 152
  Speed 18
  Damage 1
  DeathSound ""
  RenderStyle Add
  States
  {
  Spawn:
    FX01 CD 6 BRIGHT A_CustomMissile("Wandtrail",0,0,0,2)
    Loop
  Death:
	TNT1 AAAAA 0 A_SpawnItemEx("SparkPiece", 0, 0, 0, (0.1)*Random(10, 40), 0, (0.1)*Random(-40, 40), Random(0, 360), 128)
	TNT1 A 0 A_SpawnItem("WandFlash")
	FX01 EFGH 3 BRIGHT
	stop
  }
}

ACTOR WandTrail : DoomImpBall
{
	Seesound ""
	Deathsound ""
	+NOCLIP
	Speed 0
	Alpha 0.5
	States
	{
	Spawn:
		FX01 A 1 BRIGHT A_FadeOut(0.04)
		loop
	}
}

ACTOR WandFlash : Baseflare
{
   Scale 0.2
   alpha 1
   +DONTSPLASH
   +BRIGHT
   States
   {
   Spawn:
    YGZF A 6 BRIGHT
   Death:
	YGZF A 1 BRIGHT A_FadeOut
	Loop
   }
}