//Missile

ACTOR NukerMissileExplode
{ 
    +NOINTERACTION
    +NOGRAVITY
    States
    {
    Spawn:
      TNT1 A 0
      TNT1 A 0 A_Quake(4, 15, 0, 384, none)
      TNT1 A 0 A_SpawnItemEx("NukerMissileFlash",0,0,0,0,0,0,0,128,0)
      TNT1 A 0 A_SpawnItemEx("NukerMissileExploder",0,0,0,0,0,0,0,128,0)
      TNT1 A 0 A_SpawnItemEx("NukerMissileSmoker",0,0,0,0,0,0,0,128,0)
      TNT1 A 1
      Stop
    }
}

ACTOR NukerMissileFlash
{
    +NOINTERACTION
	+CLIENTSIDEONLY
    +NOGRAVITY
    +NOCLIP
    Renderstyle Add
    Scale 0.5
    States
    {
    Spawn:
      TNT1 A 0
      FLAR A 1 Bright ////A_SetScale(ScaleX +0.05, ScaleY +0.05)
      FLAR A 0 A_FadeOut(0.125)
      Loop
    }
}

ACTOR NukerMissileExploder
{
    +NOINTERACTION
    +NOGRAVITY
    States
    {
    Spawn:
      TNT1 A 0
      TNT1 AAAAA 1 A_SpawnItemEx("NukerMissileExp", random(21,-21), random(21,-21), random(21,-21), 0, 0, 0, 0, 128, 0)
      Stop
    }
}

ACTOR NukerMissileExp
{
  +NOGRAVITY
  +NOINTERACTION
  +NOCLIP
  +DONTSPLASH
  +CLIENTSIDEONLY
  Renderstyle Add
  Scale 0.4
  states
  {
  Spawn:
    TNT1 A 1
    TNT1 A 0 A_Jump(255,"Exp1","Exp2","Exp3","Exp4")
    stop
  Exp1:
    FLA1 A 1 Bright //A_SetScale(ScaleX -0.01, ScaleY -0.01)
    FLA1 A 0 A_FadeOut(0.05)
    Loop
  Exp2:
    FLA2 A 1 Bright //A_SetScale(ScaleX -0.01, ScaleY -0.01)
    FLA2 A 0 A_FadeOut(0.05)
    Loop
  Exp3:
    FLA3 A 1 Bright //A_SetScale(ScaleX -0.01, ScaleY -0.01)
    FLA3 A 0 A_FadeOut(0.05)
    Loop
  Exp4:
    FLA4 A 1 Bright //A_SetScale(ScaleX -0.01, ScaleY -0.01)
    FLA4 A 0 A_FadeOut(0.05)
    Loop
  }
}

ACTOR NukerMissileSmoker
{
    +NOINTERACTION
	+CLIENTSIDEONLY
    +NOGRAVITY
    States
    {
    Spawn:
      TNT1 A 8
      TNT1 AAAAAA 0 A_SpawnItemEx("NukerMissileExpSmoke", random(26,-26), random(26,-26), random(26,-26), 0.1*frandom(2,4), 0.1*frandom(2,4), 0.1*frandom(-3,3), random(0,360), 128, 0)
      TNT1 AAAA 1 A_SpawnItemEx("NukerMissileExpSmoke", random(26,-26), random(26,-26), random(26,-26), 0.1*frandom(2,4), 0.1*frandom(2,4), 0.1*frandom(-3,3), random(0,360), 128, 0)
      Stop
    }
}

ACTOR NukerMissileExpSmoke
{
  +NOGRAVITY
  +NOINTERACTION
  +CLIENTSIDEONLY
  +NOCLIP
  +DONTSPLASH
  Renderstyle Normal
  Alpha 0.5
  Scale 0.6
  states
  {
  Spawn:
    TNT1 A 1
    TNT1 A 0 A_FadeOut(0.025)
    TNT1 A 0 A_Jump(255,"Smoke1","Smoke2","Smoke3","Smoke4")
    stop
  Smoke1:
    NSMK A 1 //A_SetScale(ScaleX +0.01, ScaleY +0.01)
    FLA1 A 0 A_FadeOut(0.0025+frandom(0.001, 0.006))
    Loop
  Smoke2:
    NSMK B 1 //A_SetScale(ScaleX +0.01, ScaleY +0.01)
    FLA1 A 0 A_FadeOut(0.0025+frandom(0.001, 0.006))
    Loop
  Smoke3:
    NSMK C 1 //A_SetScale(ScaleX +0.01, ScaleY +0.01)
    FLA1 A 0 A_FadeOut(0.0025+frandom(0.001, 0.006))
    Loop
  Smoke4:
    NSMK D 1 //A_SetScale(ScaleX +0.01, ScaleY +0.01)
    FLA1 A 0 A_FadeOut(0.0025+frandom(0.001, 0.006))
    Loop
  }
}

//Larpa & Gauss

ACTOR NukerPelletExplode
{ 
    +NOINTERACTION
    +NOGRAVITY
    States
    {
    Spawn:
      TNT1 A 0
      TNT1 A 0 A_Quake(2, 8, 0, 288, none)
      TNT1 A 0 A_SpawnItemEx("NukerPelletFlash",0,0,0,0,0,0,0,128,0)
      TNT1 A 0 A_SpawnItemEx("NukerPelletExploder",0,0,0,0,0,0,0,128,0)
      TNT1 A 0 A_SpawnItemEx("NukerPelletSmoker",0,0,0,0,0,0,0,128,0)
      TNT1 A 1
      Stop
    }
}

ACTOR NukerPelletFlash : NukerMissileFlash
{
    Scale 0.0075
	+CLIENTSIDEONLY
    Alpha 0.8
}

ACTOR NukerPelletExploder
{
    +NOINTERACTION
	+CLIENTSIDEONLY
    +NOGRAVITY
    States
    {
    Spawn:
      TNT1 A 0
      TNT1 AAA 1 A_SpawnItemEx("NukerPelletExp", random(3,-3), random(3,-3), random(3,-3), 0, 0, 0, 0, 128, 0)
      Stop
    }
}

ACTOR NukerPelletExp : NukerMissileExp
{
  Scale 0.175
  +CLIENTSIDEONLY
}

ACTOR NukerPelletSmoker
{
    +NOINTERACTION
    +NOGRAVITY
	+CLIENTSIDEONLY
    States
    {
    Spawn:
      TNT1 A 7
      TNT1 AAAA 0 A_SpawnItemEx("NukerPelletExpSmoke", random(6,-6), random(6,-6), random(6,-6), 0.1*frandom(2,4), 0.1*frandom(2,4), 0.1*frandom(-3,3), random(0,360), 128, 0)
      TNT1 AAA 1 A_SpawnItemEx("NukerPelletExpSmoke", random(6,-6), random(6,-6), random(6,-6), 0.1*frandom(2,4), 0.1*frandom(2,4), 0.1*frandom(-3,3), random(0,360), 128, 0)
      Stop
    }
}

ACTOR NukerPelletExpSmoke : NukerMissileExpSmoke
{
  Alpha 0.4
  +CLIENTSIDEONLY
  Scale 0.3
}

//Pushka

ACTOR NukerPushkaExplode
{ 
    +NOINTERACTION
    +NOGRAVITY
    States
    {
    Spawn:
      TNT1 A 0
      TNT1 A 0 A_Quake(6, 18, 0, 384, none)
      TNT1 A 0 A_SpawnItemEx("NukerPushkaFlash",0,0,0,0,0,0,0,128,0)
      TNT1 A 0 A_SpawnItemEx("NukerPushkaExploder",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS,0)
      TNT1 A 0 A_SpawnItemEx("NukerPushkaSmoker",0,0,0,0,0,0,0,128,0)
      TNT1 A 1
      Stop
    }
}

ACTOR NukerPushkaFlash : NukerMissileFlash
{
    Scale 0.75
	+CLIENTSIDEONLY
}

ACTOR NukerPushkaExploder
{
    +NOINTERACTION
    +NOGRAVITY
    +FORCERADIUSDMG
    ReactionTime 14
    States
    {
    Spawn:
    TNT1 A 0
    TNT1 A 0 A_Countdown
    TNT1 A 0 A_Explode(50,224,0,1)
    TNT1 A 2 A_SpawnItemEx("NukerPushkaExp", random(41,-41), random(41,-41), random(41,-41), 0, 0, 0, 0, SXF_TRANSFERPOINTERS, 0)
    Loop
    Death:
    TNT1 A 1
    Stop
    }
}

ACTOR NukerPushkaExploder2 : NukerPushkaExploder
{
    DamageType Nope
    States
    {
    Spawn:
    TNT1 A 0
    TNT1 A 0 A_Countdown
    TNT1 A 0 A_Explode(50,224,0,1)
    TNT1 A 2 A_SpawnItemEx("NukerPushkaExp", random(41,-41), random(41,-41), random(41,-41), 0, 0, 0, 0, SXF_TRANSFERPOINTERS, 0)
    Loop
    }
}

ACTOR NukerPushkaExp : NukerMissileExp
{
  Scale 0.65
}

ACTOR NukerPushkaSmoker
{
    +NOINTERACTION
    +NOGRAVITY
	+CLIENTSIDEONLY
    States
    {
    Spawn:
      TNT1 A 12
      TNT1 AAAAAAAAAA 0 A_SpawnItemEx("NukerPushkaExpSmoke", random(56,-56), random(56,-56), random(56,-56), 0.1*frandom(2,4), 0.1*frandom(2,4), 0.1*frandom(-3,3), random(0,360), 128, 0)
      TNT1 A 6
      TNT1 AAAAA 2 A_SpawnItemEx("NukerPushkaExpSmoker2", random(22,-22), random(22,-22), random(22,-22), 0, 0 ,0, 0, 128, 0)
      Stop
    }
}

ACTOR NukerPushkaExpSmoker2
{
    +NOINTERACTION
    +NOGRAVITY
	+CLIENTSIDEONLY
    States
    {
    Spawn:
      TNT1 A 0
      TNT1 AAAA 2 A_SpawnItemEx("NukerPushkaExpSmoke", frandom(39,-39), frandom(39,-39), frandom(39,-39), 0.1*frandom(2,4), 0.1*frandom(2,4), 0.1*frandom(-3,3), random(0,360), 128, 0)
      Stop
    }
}

ACTOR NukerPushkaExpSmoke : NukerMissileExpSmoke
{
  Scale 1.1
  +CLIENTSIDEONLY
}

//Deathhead

ACTOR NukerDeathheadExplode
{ 
    +NOINTERACTION
    +NOGRAVITY
    States
    {
    Spawn:
      TNT1 A 0
      TNT1 A 0 A_Quake(8, 25, 0, 768, none)
      TNT1 A 0 A_SpawnItemEx("NukerPushkaFlash",0,0,0,0,0,0,0,128,0)
      TNT1 A 0 A_SpawnItemEx("NukerPushkaExploder",0,0,0,0,0,0,0,SXF_TRANSFERPOINTERS,0)
      TNT1 A 0 A_SpawnItemEx("NukerPushkaSmoker",0,0,0,0,0,0,0,128,0)
      Stop
    }
}
