Actor ExplosionParticle
{
  Height 1
  Radius 1
  Mass 0
  +Missile
  +NoBlockMap
  +DontSplash
  +FORCEXYBILLBOARD
  +CLIENTSIDEONLY
  +NONETID
  +THRUACTORS
  +GHOST
  -NOGRAVITY
  +THRUGHOST
  +NOTELEPORT
  RenderStyle Add
  Scale 0.8
  Gravity 0
  States
  {
  Spawn:
    SPKO B 1 Bright A_FadeOut(0.02)
    Loop
  }
}

Actor ExplosionParticle2: ExplosionParticle
{

  Scale 0.1
  States
  {
  Spawn:
    SPRK SSSSSSSS 1 BRIGHT
	SPRK SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS 1 Bright A_FadeOut(0.02)
    Stop
  }
}

ACTOR ExplosionParticleHeavy: ExplosionParticle2
{
  speed 5
  Gravity 0.5
  Scale 0.2
  BounceFactor 0.01
    States
    {
     Spawn:
       SPRK SSSSS 1 BRIGHT
	   SPRK SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS 1 Bright A_FadeOut(0.02)
        stop
     Death:
       Stop
    }
}

ACTOR MagentaParticleHeavy: ExplosionParticle2
{
  speed 5
  Gravity 0.5
  Scale 0.2
  BounceFactor 0.01
    States
    {
     Spawn:
       SPRK MMMMM 1 BRIGHT
	   SPRK MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM 1 Bright A_FadeOut(0.02)
        stop
     Death:
       Stop
    }
}

ACTOR YellowParticleHeavy: ExplosionParticle2
{
  speed 5
  Gravity 0.5
  Scale 0.2
  BounceFactor 0.01
    States
    {
     Spawn:
       SPRK YYYYY 1 BRIGHT
	   SPRK YYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYYY 1 Bright A_FadeOut(0.02)
        stop
     Death:
       Stop
    }
}

ACTOR ExplosionParticleVeryFast: ExplosionParticleHeavy
{
 speed 18
 Gravity 0.9
}

ACTOR ExplosionParticleVerySlow: ExplosionParticleHeavy
{
 Scale 0.05
 speed 3
 Gravity 0.2
 Scale 0.03
}

ACTOR ShotgunParticles: ExplosionParticle2
{
 speed 15
 radius 8
 height 1
 Gravity 0.6
 RenderStyle Add
 Scale 0.1
 Alpha 0.9
    States
    {
     Spawn:
	  TNT1 A 2
       SPKO BBBB 1 Bright A_FadeOut(0.02)
	   TNT1 A 0 A_ChangeFlag(NOGRAVITY, 0)
	   SPKO BBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBBB 1 Bright A_FadeOut(0.04)
        stop
     Death:
       Stop
    }
}

ACTOR ShotgunParticles2 : ShotgunParticles
{
  speed 10
  Gravity 0.5
  Scale 0.1
  Alpha 0.9
}

ACTOR HitSpark: ExplosionParticleHeavy
{
 speed 6
  Scale 0.04
 Gravity 1.0
   +NOCLIP
    States
    {
     Spawn:
       SPKO SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS 1 Bright A_FadeOut(0.07)
        stop
     Death:
       Stop
    }
}

Actor ExplosionParticleSpawner
{
  +NOCLIP
  +NOBLOCKMAP
  +CLIENTSIDEONLY
  +NONETID
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 AAAAA 0 A_CustomMissile ("ExplosionParticleHeavy", 0, 0, random (0, 360), 2, random (0, 180))
    TNT1 AAAAA 0 A_CustomMissile ("ExplosionParticleHeavy", 0, 0, random (0, 180), 2, random (0, 180))
    TNT1 A 1
    Stop
  }
}

Actor BluePlasmaParticleSpawner: ExplosionParticleSpawner
{
  States
  {
  Spawn:
	TNT1 AAA 0 A_CustomMissile ("BluePlasmaParticle", 0, 0, random (0, 360), 2, random (50, 130))
	TNT1 AA 0 A_CustomMissile ("PlasmaSmoke", 0, 0, random (0, 360), 2, random (0, 360))
    Stop
  }
}

Actor PlasmaParticleSpawner: BluePlasmaParticleSpawner
{
  States
  {
  Spawn:
    TNT1 AAAA 0 A_SpawnItemEx("PlasmaParticle", 0, 0, 14, (0.1)*Random(10, 40), 0, (0.1)*Random(-40, 40), Random(0, 360), 128)
    TNT1 AAAA 0 A_CustomMissile ("PlasmaSmoke", 32, 0, random (0, 360), 2, random (0, 360))
    TNT1 A 1
    Stop
  }
}

Actor BluePlasmaParticle: ExplosionParticle
{
  BounceFactor 0.2
  Gravity 0.8
  Scale 0.035
  Speed 12
  States
  {
  Spawn:
  Death:
    SPKB A 2 Bright A_FadeOut(0.04)
    Loop
  }
}

Actor RailgunTrailParticle : BluePlasmaParticle
{
  Gravity 0.0
  RenderStyle Add
  Scale 0.1
  Speed 1
  States
  {
  Spawn:
  Death:
    SPKB A 2 Bright A_FadeOut(0.04)
    Loop
  }
}

Actor BluePlasmaFire: BluePlasmaParticle
{

  +NoGravity
  RenderStyle Add
  Scale 0.7
  Alpha 0.9
  Speed 0
  States
  {
  Spawn:
  Death:
    FIR5 ABCDEFGHIJKLMNOP 1 Bright// A_FadeOut(0.04)
	//PLAF ABCDEFGHIJKLMNOPQ 1 Bright
    Stop
  }
}

Actor BluePlasmaFireNonStatic: BluePlasmaFire
{
Speed 2
Alpha 0.5
}

Actor PlasmaParticleX: BluePlasmaParticle
{
  BounceFactor 0.1
  Gravity 0.4
  RenderStyle Add
  Scale 1.0
  Speed 2
  States
  {
  Spawn:
	SPKB A 1 Bright
	TNT1 A 0 A_ChangeFlag(DOOMBOUNCE, 0)
    Goto Stand

  Stand:
    SPKB B 2 Bright A_FadeOut(0.06)
    Loop

  Death:
	 TNT1 A 1
	 TNT1 A 0
	 Stop

  }
}

Actor BigPlasmaParticleX: PlasmaParticleX
{
  Scale 2.0
  Speed 3
}

Actor PlasmaParticle: BluePlasmaParticle

{
  States
  {
  Spawn:
  Death:
    SPKG A 2 Bright A_FadeOut(0.02)
    Loop
  }
}

ACTOR RailPuff: BulletPuff
{
  renderstyle Translucent
  alpha 0.9
  Scale 1.3
  +NOBLOCKMAP
  +NOGRAVITY
  +NOEXTREMEDEATH
  states
  {
  Spawn:
  Death:
  Xdeath:
  Melee:
    TNT1 A 0
    TNT1 AAAA 0 A_SpawnItemEx("BluePlasmaParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
	//EXPL AAAA 0 A_CustomMissile ("SmallSmoke", 0, 0, random (0, 360), 2, random (0, 360))
    TNT1 ABCDE 2 BRIGHT A_SpawnItem("BlueFlare" ,0)
    Stop
  }
}

ACTOR ShortRailPuff: BulletPuff
{
  renderstyle Translucent
  alpha 0.9
  Scale 1.6
  +NOBLOCKMAP
  +NOGRAVITY
  +NOEXTREMEDEATH
  +PUFFONACTORS
  Damagetype SSG
  states
  {
  Spawn:
    TNT1 A 0
    TNT1 AAA 0 A_SpawnItemEx("BluePlasmaParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
    PLSE ABCDE 5 BRIGHT A_SpawnItem("BlueFlareMedium",0,0)
    Stop
  }
}

ACTOR RailgunPuff: BulletPuff
{
  RenderStyle Add
  Alpha 0.95
  +NOBLOCKMAP
  +NOGRAVITY
  +CLIENTSIDEONLY
  +NONETID
  Scale 1.1
  states
  {
  Spawn:
    PBEX A 0 BRIGHT// A_SpawnItem("BlueFlare",0,0)
		TNT1 AA 0 A_CustomMissile ("PlasmaParticleX", 12, 0, random (0, 360), 2, random (0, 360))
	TNT1 A 0 A_SpawnItemEx("BluePlasmaParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
	//EXPL AAAA 0 A_CustomMissile ("SmallSmoke", 0, 0, random (0, 360), 2, random (0, 360))
    PLSE ABCDE 2 BRIGHT A_SpawnItem("BlueFlare" ,0)
    stop
  }
}

ACTOR BarrelParticle
{
    Radius 8
    Height 8
    Scale 0.6
	Speed 7
	Mass 1
    gravity 0.5
	BounceFactor 0.6
	+DOOMBOUNCE
	+MISSILE
    +MOVEWITHSECTOR
    +CLIENTSIDEONLY
	+NONETID
    +NOBLOCKMAP
    +NOTELEPORT
    States
    {
    Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Death")
		TNT1 A 0 //A_SpawnItemEx("AltSmoke", 0, 0)
		BPRT ABCDEFGH 4
        Loop

	Death:
        BPRT GGGGGGGGGGGGG 20 //A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
        Stop
    }
}

ACTOR Shrapnel: BarrelParticle
{
Scale 0.02
RenderStyle Add
Gravity 0.8
Speed 13
-DOOMBOUNCE
    States
    {
    Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Death")
		LENY AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 2 A_SpawnItemEx("AltSmoke", 0, 0)
        Stop
    Death:
        TNT1 A 0
        Stop
    }
}

Actor GlassPart : BarrelParticle
{
bouncefactor 0.2
speed 8
seesound ""
renderstyle translucent
alpha 0.4
scale 0.2
translation "0:255=4:4"
states
	{
	Spawn:
		TNT1 A 0
		BPRT ABCDEFGH 2
		loop
   Death:
   	TNT1 A 0
   	TNT1 A 0 A_jump(255,"death1","death2","death3","death4","death5","death6")
Death1:
      BPRT A 1
	  BPRT A -1
	  Stop
Death2:
      BPRT C 1
      BPRT C -1
	  Stop
Death3:
      BPRT E 1
	  BPRT E -1
	  Stop
Death4:
      BPRT G 1
	  BPRT G -1
	  Stop
Death5:
      BPRT B 1
	  BPRT B -1
	  Stop
Death6:
      BPRT D 1
	  BPRT D -1
	  Stop
   }
}

ACTOR BDGlassShard : BarrelParticle
{
	States
	{
	Spawn:
		SGSW ABCDE 4
		Loop
	Death:
		SGSW F 30
		Stop
	}
}

Actor ShrapnelPieceDamaging
{
bouncefactor 1.5
WallBounceFactor 0.6
PROJECTILE
+MISSILE
+BOUNCEONCEILINGS
+BOUNCEONFLOORS
+BOUNCEONWALLS
-NOGRAVITY
Gravity 1.0
speed 36
BounceCount 3
scale 0.4
Radius 4
Height 4
+NOEXTREMEDEATH
+CLIENTSIDEONLY
+NONETID
Damage (random (80, 80))
Damagetype "Shrapnel"
Obituary "%o ate a handful of shrapnel."
states
	{
	Spawn:
		TNT1 A 0
		BPRT ABCDEFGH 2
		loop
   Death:
   	TNT1 A 0
   	TNT1 A 0 A_jump(255,"death1","death2","death3","death4","death5","death6")
Death1:
      BPRT A 1
	  BPRT A 100
	  Stop
Death2:
      BPRT C 1
      BPRT C 100
	  Stop
Death3:
      BPRT E 1
	  BPRT E 100
	  Stop
Death4:
      BPRT G 1
	  BPRT G 100
	  Stop
Death5:
      BPRT B 1
	  BPRT B 100
	  Stop
Death6:
      BPRT D 1
	  BPRT D 100
	  Stop
   }
}

Actor ShrapnelPieceDamagingGrenade: ShrapnelPieceDamaging
{
Radius 32
}

Actor TacticalShrapnelSpawner
{
+NOCLIP
+NOBLOCKMAP
States
	{
		Spawn:
		Death:
			TNT1 A 0
			TNT1 AAAAAA 0 A_CustomMissile("ShrapnelPieceDamaging", 0, 8, random(0, 360), 2, random(-45, 45))
			Stop
		}
}

Actor TacticalShrapnelSpawnerGrenade
{
+NOCLIP
+NOBLOCKMAP
States
	{
		Spawn:
		Death:
			TNT1 A 0
			TNT1 AAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile("ShrapnelPieceDamagingGrenade", 0, 8, random(0, 360), 2, random(0, 15))
			TNT1 AAAAAAAAAAAAA 0 A_CustomMissile("ShrapnelPieceDamagingGrenade", 0, 8, random(0, 360), 2, random(0, 45))
			Stop
		}
}

Actor WoodParticle : BarrelParticle
{
Scale 1.5
+THRUACTORS
bouncefactor 0.5
speed 8
seesound ""
states
	{
	Spawn:
		TNT1 A 0
		WOOD ABCD 2
		loop
   Death:
   	TNT1 A 0
      WOOD B 300
	  WOOD BBBBB 1 A_FadeOut(0.2)
      Stop
   }
}

Actor WoodParticleSmall: WoodParticle
{
Scale 0.9
speed 6
}

Actor WoodParticleBig: WoodParticle
{
Scale 2.3
speed 11
}

Actor WoodParticleTIny: WoodParticle
{
Scale 0.6
speed 5
states
	{
   Death:
   	TNT1 A 0
      WOOD B 100
	  WOOD BBBBB 1 A_FadeOut(0.2)
      Stop
   }
}

ACTOR SparkX: ExplosionParticleHeavy
{
 speed 10
 Gravity 0.8
 -NOGRAVITY
  Scale 0.05
   radius 1
 height 1
 +DOOMBOUNCE
 +GHOST
 BounceFactor 0.5
 Damage 0
  alpha 1.0
    States
    {
     Spawn:
       SPKO AAA 1 BRIGHT
	   SPKO AAAAAAA 1 Bright A_FadeOut(0.20)
        stop
     Death:
	 TNT1 A 0
       Stop
    }
}

ACTOR SparkXNoModel: SparkX
{
 Gravity 0.7
}

ACTOR HitSparkGroup: SparkXNoModel
{
  Scale 0.2
  States
    {
     Spawn:
	   SPKO M 2
       SPKO MMMMMMMM 2 Bright A_FadeOut(0.1)
        stop
     Death:
       Stop
    }
}

ACTOR MetalShard1: BarrelParticle
{
    Scale 0.2
	Speed 7
	Gravity 0.5
	BounceFactor 0.4
    States
    {
    Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Death")
		JNK1 ABCDEFGH 3
        Loop

	Death:
        JNK1 H 200
        Stop
    }
}

ACTOR MetalShard2: MetalShard1
{
    States
    {
    Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Death")
		JNK2 ABCDEFGH 3
        Loop

	Death:
        JNK2 H 200
        Stop
    }
}

ACTOR MetalShard3: MetalShard1
{
    States
    {
    Spawn:
	    TNT1 A 0 A_JumpIf(waterlevel > 1, "Death")
		JNK3 ABCDEFGH 3
        Loop

	Death:
        JNK3 H 200
        Stop
    }
}

ACTOR MudDust
{
	Scale 1.0
	+noteleport
	+missile
	+forcexybillboard
    +CLIENTSIDEONLY
	+NONETID
	+DOOMBOUNCE
	+THRUACTORS
	Renderstyle Translucent
	Alpha 0.9
	BounceFactor 0.01
    Speed 12
    Gravity 0.8
	height 1
	radius 1
	States
	{
	Spawn:
		DIRP A 1
		TNT1 A 0 A_Jump(255, "Spawn1", "Spawn2", "Spawn3", "Fly")
	Fly:
		DIRP AABCDEFHIIII 2 A_FadeOut(0.05)
		DIRP IIIIIIII 1 A_FadeOut(0.1)
		Stop

	Spawn1:
		DIRP A 1
		TNT1 A 0 A_SetScale(1.0, -1.0)
		Goto Fly

	Spawn2:
		DIRP A 1
		TNT1 A 0 A_SetScale(-1.0, -1.0)
		Goto Fly

	Spawn3:
		DIRP A 1
		TNT1 A 0 A_SetScale(-1.0, 1.0)
		Goto Fly

	Death:
	    TNT1 A 0
		Stop
	}
}

ACTOR MudDustSmall: MudDust
{
    Speed 4
	Scale 0.5
    Gravity 0.4
		States
	{
	Spawn:
		DIRP A 0
		TNT1 A 0 A_Jump(255, "Spawn1", "Spawn2", "Spawn3", "Fly")

	Spawn1:
		DIRP A 1
		TNT1 A 0 A_SetScale(0.5, -0.5)
		Goto Fly

	Spawn2:
		DIRP A 1
		TNT1 A 0 A_SetScale(-0.5, -0.5)
		Goto Fly

	Spawn3:
		DIRP A 1
		TNT1 A 0 A_SetScale(-0.5, 0.5)
		Goto Fly

	Death:
	    TNT1 A 0
		Stop
	}
}

ACTOR MudDustFromTrail: MudDustSmall
{
	+THRUACTORS
		States
	{
	Spawn:
		DIRP A 1
		Loop
	Death:
	    DIRP B 1
		Stop
	}
}

ACTOR BrownCloud: MudDust
{
	+NOGRAVITY
	+WINDTHRUST
	+THRUACTORS
	+NOINTERACTION
    Speed 1
	Scale 3.5
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(128, 2)
		TNT1 A 0 A_SetScale(-3.0, 4.0)
		TNT1 A 0
        SM5K ABCDEFGHIJKLMNOPQRSTUVWXYZ 3
		Stop

	}
}

Actor BrownCloudSmall: BrownCloud
{
Scale 1.0
Speed 1
-NOGRAVITY
+THRUACTORS
Gravity 0.1
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(128, 2)
		TNT1 A 0 A_SetScale(-1.0, 1.25)
		TNT1 A 0
        SM5K ABCDEFGHIJKLMNOPQRSTUVWXYZ 2
		Stop

	}
}

Actor BrownCloudShort: BrownCloudSmall
{
Scale 1.0
Speed 2
}

Actor BrownCloudSmallLong: BrownCloudSmall
{
Speed 1
}

////

ACTOR SAndDust: MudDust
{
	States
	{
	Spawn:
		DIRP ZZZZZZZZZZZZ 2 A_FadeOut(0.05)
		Loop
	Death:
	    TNT1 A 0
		Stop
	}
}

ACTOR SandDustSmall: SandDust
{
    Speed 4
	Scale 0.5
    Gravity 0.4
	States
	{
	Spawn:
		DIRP ZZZZZZZZZZZZ 2 A_FadeOut(0.05)
		Loop
	Death:
	    TNT1 A 0
		Stop
	}
}

ACTOR SAndCloud: BrownCloud
{
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(128, 2)
		TNT1 A 0 A_SetScale(-3.0, 4.0)
		TNT1 A 0
        SM4K ABCDEFGHIJKLMNOPQRSTUVWXYZ 3
		Stop
	}
}

ACTOR SAndCloudShort: SAndCloud
{
	Speed 1
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(128, 2)
		TNT1 A 0 A_SetScale(-3.0, 4.0)
		TNT1 A 0
        SM4K ABCDEFGHIJKLMNOPQRSTUVWXYZ 1
		Stop
	}
}

Actor SAndCloudSmall: SAndCloud
{
	Scale 1.0
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(128, 2)
		TNT1 A 0 A_SetScale(-1.0, 1.2)
		TNT1 A 0
        SM4K ABCDEFGHIJKLMNOPQRSTUVWXYZ 2
		Stop
		}
}

Actor SAndCloudSmallLong: SAndCloud
{
	Scale 1.5
	States
	{
	Spawn:
		Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(128, 2)
		TNT1 A 0 A_SetScale(-1.5, 1.6)
		TNT1 A 0
        SM4K ABCDEFGHIJKLMNOPQRSTUVWXYZ 3
		Stop
	}
}

Actor SAndCloudFootstep:SAndCloudSmallLong
{
Scale 0.9
Speed 1
	States
	{
	Spawn:
		Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(128, 2)
		TNT1 A 0 A_SetScale(-0.9, 1.0)
		TNT1 A 0
        SM4K ABCDEFGHIJKLMNOPQRSTUVWXYZ 1
		Stop
	}
}

ACTOR SnowDust: MudDust
{
	States
	{
	Spawn:
		DIRP SSSSSSSSSSSS 2 A_FadeOut(0.05)
		Loop
	Death:
	    TNT1 A 0
		Stop
	}
}

ACTOR SnowDustSmall: SnowDust
{
    Speed 4
	Scale 0.5
    Gravity 0.4
	States
	{
	Spawn:
		DIRP SSSSSSSSSSSS 2 A_FadeOut(0.05)
		Loop
	Death:
	    TNT1 A 0
		Stop
	}
}

ACTOR SnowCloud: BrownCloud
{
	RenderStyle Add
	Alpha 0.25
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(128, 2)
		TNT1 A 0 A_SetScale(-3.0, 4.0)
		TNT1 A 0
        SM6K ABCDEFG 3
		Stop
	}
}

ACTOR SnowCloudShort: SnowCloud
{
	Speed 1
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(128, 2)
		TNT1 A 0 A_SetScale(-3.0, 4.0)
		TNT1 A 0
        SM6K ABCDEFG 1
		Stop
	}
}

Actor SnowCloudSmall: SnowCloud
{
	Scale 1.0
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(128, 2)
		TNT1 A 0 A_SetScale(-1.0, 1.2)
		TNT1 A 0
        SM6K ABCDEFG 2
		Stop
		}
}

Actor SnowCloudSmallLong: SnowCloud
{
	Scale 1.5
	States
	{
	Spawn:
		Spawn:
		TNT1 A 0
		TNT1 A 0 A_Jump(128, 2)
		TNT1 A 0 A_SetScale(-1.5, 1.6)
		TNT1 A 0
        SM6K ABCDEFG 3
		Stop
	}
}

ACTOR WallChunk
{
	Scale 0.16
	+noteleport
	+missile
	+bounceonactors
	+doombounce
	+forcexybillboard
    +CLIENTSIDEONLY
	+NONETID
    Speed 6
    Gravity 0.7
	bouncefactor 0.2
	height 1
	radius 1
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 0 A_GiveInventory ("Timer", random(1,4))
	See:
		TNT1 A 0 A_JumpIfInventory("Timer",4,"See4")
		TNT1 A 0 A_JumpIfInventory("Timer",3,"See3")
		TNT1 A 0 A_JumpIfInventory("Timer",2,"See2")
	See1:
		DUST A 1
		loop
	See2:
		DUST B 1
		loop
	See3:
		DUST C 1
		loop
	See4:
		DUST D 1
		loop
	Death:
		TNT1 A 0 A_ChangeFlag ("missile",0)
		TNT1 A 0 A_ChangeFlag ("doombounce",0)
		TNT1 A 0 A_JumpIfInventory("Timer",4,"Death4")
		TNT1 A 0 A_JumpIfInventory("Timer",3,"Death3")
		TNT1 A 0 A_JumpIfInventory("Timer",2,"Death2")
	Death1:
		DUST A 100
		Stop
	Death2:
		DUST B 100
		Stop
	Death3:
		DUST C 100
		Stop
	Death4:
		DUST D 100
		Stop
	}
}
ACTOR TinyWallChunk : WallChunk
{
	Scale 0.12
}
ACTOR BigWallChunk : WallChunk
{
	Scale 0.3
}
ACTOR HugeWallChunk : WallChunk
{
	Scale 0.4
}

ACTOR DirtChunk1 : WallChunk
{
	Scale 0.6
	Speed 16
	BounceFactor 0.5
	Translation "128:151=74:79", "96:111=71:79"
}

ACTOR DirtChunk2 : WallChunk
{
	Scale 0.4
	Speed 12
	BounceFactor 0.3
	Translation "128:151=74:79", "96:111=71:79"
}

ACTOR DirtChunk3 : WallChunk
{
	Scale 0.2
	Speed 4
	BounceFactor 0.3
	Translation "128:151=74:79", "96:111=71:79"
}

ACTOR DirtChunk4 : WallChunk
{
	Scale 0.2
	Speed 8
	BounceFactor 0.3
	Translation "128:151=74:79", "96:111=71:79"
}

ACTOR LargeGlassParticle1: WallChunk
{
+DROPOFF
Renderstyle Add
Scale 0.6
Alpha 0.9
Speed 7
Mass 0
BounceFactor 0.5
	States
    {
    Spawn:
	GLSP ABCDEFGH 3
	Loop
	Death:
	GLSP C 1
	GLSP C -1
    Stop
    }
}

ACTOR LargeGlassParticle2: LargeGlassParticle1
{
XScale -0.8
BounceFactor 0.6
}

ACTOR LargeGlassParticle3: LargeGlassParticle1
{
XScale -0.3
YScale 0.3
BounceFactor 0.4
}

ACTOR LargeGlassParticle4: LargeGlassParticle1
{
Scale 0.4
BounceFactor 0.3
}

ACTOR BDExplosionparticles: ExplosionParticle2
{
	Radius 1
	Height 1
	Alpha 1.0
	RenderStyle Add
	Scale 0.6
	Speed 1
	Gravity 0.7
	+BOUNCEONCEILINGS
	+BOUNCEONWALLS
	-SKYEXPLODE
	+NOGRAVITY
	States
    {
        Spawn:
			TNT1 A 0
			TNT1 A 0 A_Jump(255, "Spawn1", "Spawn2", "Spawn3", "Live")
	Spawn1:
			TNT1 A 0
			TNT1 A 0 A_SetScale(-0.7, -0.7)
			Goto live

	Spawn2:
			TNT1 A 0
			TNT1 A 0 A_SetScale(0.5, -0.5)
			Goto live

	Spawn3:
			TNT1 A 0
			TNT1 A 0 A_SetScale(-0.8, 0.8)
			Goto live

	Live:
			SPKS ABCDEFGHI 1 BRIGHT
			Stop
    }
}

ACTOR BDExplosionparticles2: BDExplosionparticles
{
-NOGRAVITY
+BOUNCEONWALLS
Speed 6
	States
    {
    Spawn:
			TNT1 A 0
			TNT1 A 0 A_Jump(255, "Spawn1", "Spawn2", "Spawn3", "Live")
	Spawn1:
			TNT1 A 0
			TNT1 A 0 A_SetScale(-0.6, 0.6)
			Goto live

	Spawn2:
			TNT1 A 0
			TNT1 A 0 A_SetScale(0.4, 0.4)
			Goto live

	Spawn3:
			TNT1 A 0
			TNT1 A 0 A_SetScale(-0.7, 0.7)
			Goto live

	Live:
			SPKS JKLMN 1 BRIGHT
			SPKS O 35
			SPKS OOOOOOOOOO 1 BRIGHT A_FadeOut(0.1)
			Stop
    }
}

Actor BDExplosionparticles3: BDExplosionparticles2
{
Speed 7
}

Actor BDExplosionparticles4: BDExplosionparticles2
{
Speed 8
}

ACTOR BDExplosionparticlesBig: BDExplosionparticles
{
	Speed 4
	Scale 1.0
		States
    {
	Spawn:
			TNT1 A 0
			TNT1 A 0 A_Jump(255, "Spawn1", "Spawn2", "Spawn3", "Live")
	Spawn1:
			TNT1 A 0
			TNT1 A 0 A_SetScale(-0.8, 0.8)
			Goto live

	Spawn2:
			TNT1 A 0
			TNT1 A 0 A_SetScale(-1.0, -1.0)
			Goto live

	Spawn3:
			TNT1 A 0
			TNT1 A 0 A_SetScale(-1.2, 1.2)
			Goto live
			    }
}

ACTOR BDExplosionparticlesSmall: BDExplosionparticles
{
Scale 0.4
States
    {
    Spawn:
			TNT1 A 0
			TNT1 A 0 A_Jump(255, "Spawn1", "Spawn2", "Spawn3", "Live")
	 Spawn1:
			TNT1 A 0
			TNT1 A 0 A_SetScale(-0.4, 0.4)
			Goto live

	Spawn2:
			TNT1 A 0
			TNT1 A 0 A_SetScale(0.3, 0.3)
			Goto live

	Spawn3:
			TNT1 A 0
			TNT1 A 0 A_SetScale(-0.5, 0.5)
			Goto live

	Live:
			SPKS ABCDEFGHIJ 1 BRIGHT
			Stop
    }
}

ACTOR BDECFoliageParticle1a
{
 game Doom
 speed 8
 radius 8
 height 2
 Gravity 0.6
  Scale 0.9
	+MISSILE
   +CLIENTSIDEONLY   +NOTELEPORT   +NOBLOCKMAP
   +FORCEXYBILLBOARD    +DONTSPLASH	+NONETID
    States
    {
     Spawn:
	  TNT1 A 0
      TNT1 A 0 A_Jump(128, "Spawn2")
	  Goto Fly

	  Spawn2:
	  TNT1 A 0 A_SetScale(-0.8, 0.7)
	  GOto Fly

	  Fly:
	  PP11 A 4
	  Loop

     Death:
		PP11 A -1
        Stop
    }
}

ACTOR BDECFoliageParticle1b: BDECFoliageParticle1a
{
 Speed 6
    States    {
     Spawn:
	  TNT1 A 0
      TNT1 A 0 A_Jump(128, "Spawn2")
	  Goto Fly

	  Spawn2:
	  TNT1 A 0 A_SetScale(-0.8, 0.7)
	  GOto Fly

	  Fly:
	  PP11 B 4
	  Loop

     Death:
		PP11 B -1
        Stop
}}

ACTOR BDECFoliageParticle2a: BDECFoliageParticle1a
{
 Speed 8
    States    {
     Spawn:
	  TNT1 A 0
      TNT1 A 0 A_Jump(128, "Spawn2")
	  Goto Fly

	  Spawn2:
	  TNT1 A 0 A_SetScale(-0.8, 0.7)
	  GOto Fly

	  Fly:
	  PP12 A 4
	  Loop

     Death:
		PP12 A -1
        Stop
}}

ACTOR BDECFoliageParticle2b: BDECFoliageParticle1a
{
 Speed 6
    States    {
     Spawn:
	  TNT1 A 0
      TNT1 A 0 A_Jump(128, "Spawn2")
	  Goto Fly

	  Spawn2:
	  TNT1 A 0 A_SetScale(-0.8, 0.7)
	  GOto Fly

	  Fly:
	  PP12 B 4
	  Loop

     Death:
		PP12 B -1
        Stop
}}

ACTOR BDECFoliageParticle2c: BDECFoliageParticle1a
{
 Speed 5
    States    {
     Spawn:
	  TNT1 A 0
      TNT1 A 0 A_Jump(128, "Spawn2")
	  Goto Fly

	  Spawn2:
	  TNT1 A 0 A_SetScale(-0.8, 0.7)
	  GOto Fly

	  Fly:
	  PP12 C 4
	  Loop

     Death:
		PP12 C -1
        Stop
}}

ACTOR BDECFoliageParticle3a: BDECFoliageParticle1a
{
 Speed 8
 Scale 0.5
    States    {
     Spawn:
	  TNT1 A 0
      TNT1 A 0 A_Jump(128, "Spawn2")
	  Goto Fly

	  Spawn2:
	  TNT1 A 0 A_SetScale(-0.8, 0.7)
	  GOto Fly

	  Fly:
	  PP13 C 4
	  Loop

     Death:
		PP13 C -1
        Stop
}}

ACTOR BDECFoliageParticle3b: BDECFoliageParticle1a
{
 Speed 5
 Scale 0.5
    States    {
     Spawn:
	  TNT1 A 0
      TNT1 A 0 A_Jump(128, "Spawn2")
	  Goto Fly

	  Spawn2:
	  TNT1 A 0 A_SetScale(-0.8, 0.7)
	  GOto Fly

	  Fly:
	  PP13 B 4
	  Loop

     Death:
		PP13 B -1
        Stop
}}

ACTOR BDECFoliageParticle4a: BDECFoliageParticle1a
{
 Speed 7
    States    {
     Spawn:
	  TNT1 A 0
      TNT1 A 0 A_Jump(128, "Spawn2")
	  Goto Fly

	  Spawn2:
	  TNT1 A 0 A_SetScale(-0.8, 0.7)
	  GOto Fly

	  Fly:
	  PP16 A 4
	  Loop

     Death:
		PP16 A -1
        Stop
}}

ACTOR BDECFoliageParticle4b: BDECFoliageParticle1a
{
 Speed 8
    States    {
     Spawn:
	  TNT1 A 0
      TNT1 A 0 A_Jump(128, "Spawn2")
	  Goto Fly

	  Spawn2:
	  TNT1 A 0 A_SetScale(-0.8, 0.7)
	  GOto Fly

	  Fly:
	  PP16 B 4
	  Loop

     Death:
		PP16 B -1
        Stop
}}

ACTOR BDECFoliageParticle5a: BDECFoliageParticle1a
{
 Speed 5
    States    {
     Spawn:
	  TNT1 A 0
      TNT1 A 0 A_Jump(128, "Spawn2")
	  Goto Fly

	  Spawn2:
	  TNT1 A 0 A_SetScale(-0.8, 0.7)
	  GOto Fly

	  Fly:
	  PP17 A 4
	  Loop

     Death:
		PP17 A -1
        Stop
}}

ACTOR BDECFoliageParticle5b: BDECFoliageParticle1a
{
 Speed 7
    States    {
     Spawn:
	  TNT1 A 0
      TNT1 A 0 A_Jump(128, "Spawn2")
	  Goto Fly

	  Spawn2:
	  TNT1 A 0 A_SetScale(-0.8, 0.7)
	  GOto Fly

	  Fly:
	  PP17 B 4
	  Loop

     Death:
		PP17 B -1
        Stop
}}

ACTOR BDECFoliageParticle6a: BDECFoliageParticle1a
{
 Speed 7
    States    {
     Spawn:
	  TNT1 A 0
      TNT1 A 0 A_Jump(128, "Spawn2")
	  Goto Fly

	  Spawn2:
	  TNT1 A 0 A_SetScale(-0.8, 0.7)
	  GOto Fly

	  Fly:
	  PP14 A 4
	  Loop

     Death:
		PP14 A -1
        Stop
}}

ACTOR BDECFoliageParticle6b: BDECFoliageParticle1a
{
 Speed 7
    States    {
     Spawn:
	  TNT1 A 0
      TNT1 A 0 A_Jump(128, "Spawn2")
	  Goto Fly

	  Spawn2:
	  TNT1 A 0 A_SetScale(-0.8, 0.7)
	  GOto Fly

	  Fly:
	  PP14 B 4
	  Loop

     Death:
		PP14 B -1
        Stop
}}

ACTOR BDECFoliageParticle7: BDECFoliageParticle1a
{
 Speed 7
 Gravity 0.2
    States    {
     Spawn:
	  TNT1 A 0
      TNT1 A 0 A_Jump(128, "Spawn2")
	  Goto Fly

	  Spawn2:
	  TNT1 A 0 A_SetScale(-0.8, 0.7)
	  GOto Fly

	  Fly:
	  PP15 ABCDEFGH 4
	  Loop

     Death:
		PP15 I -1
        Stop
}}

ACTOR BDECFoliageParticleLeaf: BDECFoliageParticle1a
{
 Speed 8
 Gravity 0.2
    States    {
     Spawn:
	  LEVP ABCB 6
	  Loop

     Death:
		TNT1 A 0
        Stop
}}