Actor BlueBeam
{
 +NoClip
 +NoBlockmap
 +ForceXYBillboard
 +NoInteraction
 RenderStyle Add
 XScale 0.05
 YScale 4.0
 +CLIENTSIDEONLY
 Alpha 0.5
 States
 {
  Spawn:
   SBBL A 0
   SBBL AAAAAAAAAA 1 A_FadeIn(0.1)
   SBBL A 1 Bright A_SpawnItemEx("BeamFire", 0, 0, 0, 0.01 * Random(-10, 10), 0.01 * Random(-10, 10), 0.01 * Random(0, 125), 0, 128, 0)
   Wait
 }
}

Actor BeamFire
{
 +NoInteraction
 
 RenderStyle Add
 Alpha 1
 +CLIENTSIDEONLY
 Scale 0.2
 
 States
 {
  Spawn:
   TNT1 AA 0 A_Jump(196, "Spawn2", "Spawn3", "Spawn4")
   TNT1 A 0 A_SpawnItemEx("BeamSmoke", 0, 0, 0, momx, momy, momz, 0, 128, 0)
   ION1 A 1 Bright A_FadeOut(0.02)
   Wait
  Spawn2:
   ION1 B 1 Bright A_FadeOut(0.02)
   Wait
  Spawn3:
   ION1 C 1 Bright A_FadeOut(0.02)
   Wait
  Spawn4:
   ION1 D 1 Bright A_FadeOut(0.02)
   Wait
 }
}

Actor BeamSmoke
{
 +NoInteraction
 +CLIENTSIDEONLY
 Scale 0.4
 
 States
 {
  Spawn:
   TNT1 AA 0 A_Jump(196, "Spawn2", "Spawn3", "Spawn4")
   SMOK A 1 Bright A_FadeOut(0.01)
   Wait
  Spawn2:
   SMOK B 1 Bright A_FadeOut(0.01)
   Wait
  Spawn3:
   SMOK C 1 Bright A_FadeOut(0.01)
   Wait
  Spawn4:
   SMOK D 1 Bright A_FadeOut(0.01)
   Wait
 }
}

Actor BlueStrike
{
 +NoGravity
 +ForceRadiusDmg
 +ForceYBillboard
 RenderStyle Add
 DamageType "Superweapon"
 Scale 1.0
 YScale 4.0
 States
 {
  Spawn:
   TNT1 A 0
   TNT1 A 0 A_SpawnItem("BlueGlare", 0, 0, 0)
   TNT1 A 0 A_SpawnItem("IonFloor", 0, 0, 0)
   TNT1 A 0 A_SpawnItem("IonSphere", 0, 0, 0)
   TNT1 A 0 A_SpawnItem("IonBlasphemy", 0, 0, 0)
   TNT1 A 0 A_SpawnItem("IonPole", 0, 0, 0)
   TNT1 A 0 A_SpawnItem("IonSmokePole", 0, 0, 0)
   TNT1 A 0 A_SpawnItem("IonDebris", 0, 0, 0)
   BBLU A 1 Bright A_PlaySound("weapons/PlanetCrackerBlast",0)
   BBLU A 1 Bright A_Explode(75000, 2048, 1)
   BBLU A 1 Bright A_SetTranslucent(0.9, 1)
   BBLU A 0 A_Explode(75000, 3072, 1)
   BBLU A 1 Bright A_SetTranslucent(1.0, 1)
   BBLU A 1 Bright A_Explode(75000, 2048, 1)
   BBLU A 0 A_Explode(75000, 3072, 1)
   BBLU A 0 Bright A_Explode(75000, 2048, 1)
   BBLU AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 Bright A_FadeOut(0.02)
   TNT1 A 105
   stop
 }
}

Actor BlueGlare : BlueStrike
{
 XScale 1.0
 +CLIENTSIDEONLY
 YScale 1.0
 Scale 10.0
 Alpha 0.8
 States
 {
  Spawn:
   BLUF A 0 Bright
   BLUF A 1 Bright A_FadeOut(0.005)
   Wait
 }
}
Actor BeaconSpark
{
 +NoInteraction
 +CLIENTSIDEONLY
 Gravity 1
 Height 3
 Radius 2
 RenderStyle Add
 Scale 0.1
 States
 {
  Spawn:
   ION1 A 20 Bright
   ION1 A 1 Bright A_FadeOut(0.2)
   Wait
 }
}

Actor IonRing
{
+NOBLOCKMAP
+NOCLIP
States
{
Spawn:
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnItemEx("IonSmokefx", 0, 0, 0 ,0.00001 * Random(0, 300000), 0.00001 * Random(0, 300000), 0, Random(0, 359), 128, 0)
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnitemEx("IonFx3", 0, 0, 0, random(-6,6), random(-6,6), random(0,6), 0, (128|32), 0)
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnitemEx("IonFx3", 0, 0, 0, random(-1,1), random(-1,1), 0.0001 * Random(10000, 20000), 0, (128|32), 0)
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_SpawnitemEx("IonSmoke2", 0, 0, 0,0.0001 * Random(-80000, 80000), 0.0001 * Random(-80000, 80000), 0.0001 * Random(0, 80000), 0, (128|32), 0)
//TNT1 AAAAA 0 A_SpawnitemEx("IonSmoke2", 0.0001 * Random(-60000, 60000), 0.0001 * Random(-60000, 60000), 0.0001 * Random(-60000, 60000), 0, 0, 0.0001 * Random(0, 10000), 0, (128|32), 0)
TNT1 AAAAA 0 A_SpawnitemEx("IonFire", random(-1,1), random(-1,1), 0, 0.0001 * Random(0, 100), 0.0001 * Random(0, 100), 0.0001 * Random(0, 7000), 0, (128|32), 0)
//TNT1 AAAAAAAAAAAAAA 0 A_SpawnitemEx("IonBigSmoke", 0, 0, 16, 0.0001 * Random(0, 10000), 0.0001 * Random(0, 10000), 0.0001 * Random(0, 10000), 0, (128|32), 0)
TNT1 A 0 
TNT1 A 1
stop
}}

Actor IonFloor : IonRing
{
+CLIENTSIDEONLY
States
{
Spawn:
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_SpawnItemEx("IonSmokefx", 0, 0, 0 ,0.00001 * Random(-800000, 800000), 0.00001 * Random(-800000, 800000),0,0, 128, 0)
stop
}}

Actor IonSphere : IonRing
{
+CLIENTSIDEONLY
States
{
Spawn:
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_SpawnItemEx("IonSmokefx", 0, 0, 0 ,0.00001 * Random(-500000, 500000), 0.00001 * Random(-500000, 50000),0.00001 * Random(0, 500000),0, 128, 0)
stop
}}

Actor IonBlasphemy : IonRing
{
+CLIENTSIDEONLY
States
{
Spawn:
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_SpawnItemEx("Ionfx2", 0, 0, 0 ,0.00001 * Random(-500000, 500000), 0.00001 * Random(-500000, 500000),0.00001 * Random(0, 500000),0, 128, 0)
stop
}}

Actor IonPole : IonRing
{
+CLIENTSIDEONLY
States
{
Spawn:
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_SpawnItemEx("Ionfx2", 0, 0, 0 ,0.00001 * Random(-10000, 10000), 0.00001 * Random(-10000, 10000),0.00001 * Random(0, 2000000),0, 128,0)
stop
}
}

Actor IonSmokePole : IonRing
{
+CLIENTSIDEONLY
States
{
Spawn:
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_SpawnItemEx("Ionsmokefx", 0, 0, 0 ,0.00001 * Random(-10000, 10000), 0.00001 * Random(-1000, 10000),0.00001 * Random(0, 2000000),0, 128,0)
stop
}
}

Actor IonDebris : IonRing
{
+CLIENTSIDEONLY
States
{
Spawn:
TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 1 A_SpawnItemEx("Ionfx3", 0, 0, 0 ,0.00001 * Random(-2000000, 2000000), 0.00001 * Random(-2000000, 2000000),0.00001 * Random(0, 2000000),0, 128,0)
stop
}
}

Actor IonFx
{
+NOBLOCKMAP
+NOCLIP
+NOINTERACTION
+NOGRAVITY
+CLIENTSIDEONLY
Renderstyle Add
alpha 0.2
ReactionTime 10
Speed 28
Scale 5.0
PROJECTILE
States
{
Spawn:
ION1 ABCD 10 bright A_SpawnitemEx("IonFx2", 0, 0, 0, 0, 0, 0, 0, (128|32), 0)
ION1 A 0 bright A_Countdown
loop
Death:
Stop
}
}

Actor IonFx2 : IonFx
{
reactionTime 0
+CLIENTSIDEONLY
Speed 0
scale 4.0
States
{
Spawn:
   TNT1 AA 0 A_Jump(196, "Spawn2", "Spawn3", "Spawn4")
   ION1 A 1 Bright A_FadeOut(0.001)
   Wait
  Spawn2:
   ION1 B 1 Bright A_FadeOut(0.001)
   Wait
  Spawn3:
   ION1 C 1 Bright A_FadeOut(0.001)
   Wait
  Spawn4:
   ION1 D 1 Bright A_FadeOut(0.001)
   Wait
 }
}

Actor IonFx3 : IonFx
{
ReactionTime 5
Scale 3.7
renderstyle Add
+CLIENTSIDEONLY
Alpha 0.02
States
{
Spawn:
ION1 ABCD 4 bright A_SpawnitemEx("IonFx4", 0, 0, 0, 0, 0, 0, 0, (128|32), 0)
ION1 A 0 bright A_Countdown
loop
Death:
Stop
}
}

Actor IonFx4 : IonFx2
{
scale 3.0
renderstyle Add
+CLIENTSIDEONLY
Alpha 0.05
}

Actor IonSmoke1 : IonFx
{
+NOINTERACTION
-CLIENTSIDEONLY
+ForceRadiusDmg
Speed 28
DamageType "Superweapon"
ReactionTime 70
States
{
Spawn:
TNT1 A 2 A_SpawnitemEx("IonSmokeFx", 0, 0, 0, 0, 0, 0.0001 * Random(80000, 100000), 0, (128|32), 0)
TNT1 A 0 A_Explode(255, 256, 1)
TNT1 A 0 A_Countdown
loop
}
}

Actor IonSmokeFx : IonSmoke1
{
+NOGRAVITY
RenderStyle Normal
+CLIENTSIDEONLY
reactionTime 0
Speed 0
Alpha 0.2
scale 8.0
States
{
  Spawn:
   TNT1 AA 0 A_Jump(196, "Spawn2", "Spawn3", "Spawn4")
   SMOK A 1 Bright A_FadeOut(0.0005)
   Wait
  Spawn2:
   SMOK B 1 Bright A_FadeOut(0.0005)
   Wait
  Spawn3:
   SMOK C 1 Bright A_FadeOut(0.0005)
   Wait
  Spawn4:
   SMOK D 1 Bright A_FadeOut(0.0005)
   Wait
 }
}

Actor IonSmoke2 : IonSmoke1
{
+NoInteraction
RenderStyle Normal
reactionTime 0
+CLIENTSIDEONLY
Speed 0
scale 5.4
States
{
  Spawn:
   TNT1 AA 0 A_Jump(196, "Spawn2", "Spawn3", "Spawn4")
   SMOK A 1 Bright A_FadeOut(0.0002)
   Wait
  Spawn2:
   SMOK B 1 Bright A_FadeOut(0.0002)
   Wait
  Spawn3:
   SMOK C 1 Bright A_FadeOut(0.0002)
   Wait
  Spawn4:
   SMOK D 1 Bright A_FadeOut(0.0002)
   Wait
 }
}

Actor IonBigSmoke : IonSmoke1
{
+NoInteraction
-Noclip
-Nogravity
+LowGravity
+CLIENTSIDEONLY
+Hexenbounce
+Doombounce
-ForceRadiusDmg
}

Actor IonFire : IonSmokeFx
{
Scale 1.0
Renderstyle Add
+CLIENTSIDEONLY
alpha 0.25
States
{
  Spawn:
   IOF1 A 5 A_FadeOut(0.003)
   Wait
 }
}
