//Teleporter Fog
ACTOR TeleportF: TeleportFog replaces TeleportFog
{
	+NOBLOCKMAP
	+NOTELEPORT
	+NOGRAVITY
	RenderStyle Add
	States
	{
	Spawn:
		TNT1 A 0 A_PlaySound("Misc/Teleport")
		TFOG ABCDEFGH 2 BRIGHT
		Stop
	}
}

//Smokes

ACTOR GunSmokeSpawner2
{
	+NOCLIP
    Speed 20
	States
    {
	Spawn:
		TNT1 A 1
		TNT1 A 0 Thing_ChangeTID(0,390)
		NULL A 0 A_CustomMissile("ShotSmoke2",0,0,random(0,360),2,random(0,180))
        Stop
    }
}

ACTOR ShotSmoke2
{
	+NOGRAVITY
	+NOBLOCKMAP
	+FLOORCLIP
	+FORCEXYBILLBOARD
	+CLIENTSIDEONLY
	+NOINTERACTION
	+DONTSPLASH
	+MISSILE
	RenderStyle Add
	Scale  0.4
	Alpha  0.4
	Radius 0
	Height 0
	Speed  1
	States
	{
    Spawn:
		NULL A 1 A_SetTranslucent(0.25)
		SMOK ABCDEFGHIJKLMNOPQR 2 A_FadeOut(0.005)
		TNT1 A 0
		Stop
    }
}

// Doom 64 Barrel
ACTOR D64Barrel : ExplosiveBarrel replaces ExplosiveBarrel
{
	-COUNTKILL
	+FLOORCLIP
	+SOLID
	+SHOOTABLE
	+NOBLOOD
	+PUSHABLE
	+ACTIVATEMCROSS
	+DONTGIB
	+NOICEDEATH
	+OLDRADIUSDMG
	DeathSound "Sounds/Effects/Explo1"
	Health 40
    Mass 650
	Speed 0
	Scale 0.6
	Painchance "Melee", 256
	Painchance "Kicked", 256
	Damagefactor "Melee", 0.1
	Damagefactor "Kicked", 0.1
	Painchance 255
	Obituary "You got splattered on a nearby wall. Good job."
	States
	{
	Spawn:
	See:
		BEXP A 1
		Loop
	Death:
		BEXP ABC 2 BRIGHT
		BEXP D 2 BRIGHT A_ScreamAndUnblock
		TNT1 A 0 A_SpawnItem("DetonationVisualBarrel")
		BEXP H 2 BRIGHT A_Explode
		TNT1 A 1050 A_BarrelDestroy
		TNT1 A 5 A_Respawn
		Stop
	}
}

ACTOR DetonationVisualBarrel
{
	Scale 1.26
	Radius 128
	Height 64
	+RANDOMIZE
	+DEHEXPLOSION
	+NOGRAVITY
	Obituary "You got splattered on a nearby wall. Good job."
	States
	{
	Spawn:
	Death:
		TNT1 A 0 A_SetScale(1.0)
		TNT1 A 0 A_SetTranslucent(0.65, 1)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 Radius_Quake (5, 35, 0, 15, 0)
		BLAM ABCDEFGHIJKLMNOP 2 BRIGHT
		Stop
	}
}

//Rocket Explosion.

ACTOR RockBoom
{
	+RANDOMIZE
	+DEHEXPLOSION
	+NOGRAVITY
	RenderStyle Add
	Alpha 0.5
	SeeSound ""
	DeathSound ""
	Obituary "Good Job!"
	States
	{
	Spawn:
	Death:
		TNT1 A 0 A_SetScale(1.0)
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_Explode(152,152)
		TNT1 A 0 A_MissileAttack
		TNT1 A 0 Radius_Quake (3, 25, 0, 15, 0)
		TNT1 AAAAA 0 A_CustomMissile("GunSmokeSpawner2")
		BLAG ABCDEFGHIJKLMNOPQRSTUVWWXXYYZZZ 1 BRIGHT
		Stop
	}
}

//For Micro Missiles.

ACTOR RockBoom2
{
	+RANDOMIZE
	+DEHEXPLOSION
	+NOGRAVITY
	RenderStyle Add
	Alpha 0.5
	Obituary "Good Job (Again)!"
	States
	{
	Spawn:
	Death:
		TNT1 A 0 A_SetScale(0.25)
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SetScale(0.25)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_MissileAttack
		TNT1 A 0 A_Explode(26,32)
		TNT1 A 0 A_Explode(18,32,0)
		TNT1 A 0 A_SetTranslucent(0.65, 1)
		TNT1 AAAAA 0 A_CustomMissile("GunSmokeSpawner2")
		TNT1 A 0 A_PlaySound("Weapons/HMG/Boom")
		BLAG ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 BRIGHT
		Stop
	}
}

//For the Devastator.

ACTOR DevBoom
{
	+RANDOMIZE
	+DEHEXPLOSION
	+NOGRAVITY
	RenderStyle Add
	Alpha 0.5
	Obituary "Good Job!"
	States
	{
	Spawn:
	Death:
		TNT1 A 0 A_SetScale(0.35)
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SetScale(0.35)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_Explode(120,120)
		TNT1 A 0 A_MissileAttack
		TNT1 A 0 Radius_Quake (3, 25, 0, 15, 0)
		TNT1 AAAAA 0 A_CustomMissile("GunSmokeSpawner2")
		BLAG ABCDEFGHIJKLMNOPQRSTUVWWXXYYZZZ 1 BRIGHT
		Stop
	}
}

ACTOR DevBoom2
{
	+RANDOMIZE
	+DEHEXPLOSION
	+NOGRAVITY
	RenderStyle Add
	Alpha 0.5
	Obituary "Good Job!"
	States
	{
	Spawn:
	Death:
		TNT1 A 0 A_SetScale(0.65)
		TNT1 A 0 A_NoBlocking
		TNT1 A 0 A_SetScale(0.65)
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_Explode(90,180)
		TNT1 A 0 A_MissileAttack
		TNT1 A 0 Radius_Quake (3, 25, 0, 15, 0)
		TNT1 AAAAA 0 A_CustomMissile("GunSmokeSpawner2")
		BLGG ABCDEFGHIJKLMNOPQRSTUVWWXXYYZZZ 1 BRIGHT
		Stop
	}
}


//Puffs

ACTOR Bullet_Puff: BulletPuff
{
	Game Doom
	+NOBLOCKMAP
	+NOGRAVITY
	+ALLOWPARTICLES
	+RANDOMIZE
	+NOEXTREMEDEATH
	RenderStyle Translucent
	Scale 0.5
	Alpha 1
	VSpeed 1
	Mass 5
	Decal BulletHole
	States
	{
	Spawn:
		SPRK A 2 Bright
		SPRK A 0 Bright A_SpawnDebris("BulletSparky")
		SPRK BCD 2 Bright
		Stop

	}
}

//Sparks.

ACTOR BulletSparky
{
	Health 4
	Radius 3
	Height 6
	Speed .1
	RenderStyle ADD
	Alpha  1
	Scale 0.5
	Mass  0
	+MISSILE
	+FLOORCLIP
	+DONTSPLASH
	+NOTELEPORT
	+NOEXTREMEDEATH
	States
	{
		SPRK E 1
		SPRK EFGHE 1  Bright A_SetTranslucent(.8,1)
		SPRK EGHEFG 1  Bright A_SetTranslucent(.6,1)
		SPRK HEFGHEFG 1  Bright A_SetTranslucent(.4,1)
		SPRK HEFGHEFGHE 1 Bright A_SetTranslucent(.2,1)
		Stop
	}
}

ACTOR BulletSparks
{
	+Missile
	+BOUNCELIKEHERETIC
	+FLOORCLIP
	+DONTSPLASH
	+NOTELEPORT
	+NOEXTREMEDEATH
	Health 4
	Radius 2
	Height 3
	Speed  1
	RenderStyle Add
	Alpha	1
	Scale	.032
	Mass	1
	States
	{
		Spawn:
		BPUF A 1
		BPUF ABCDA 1  BRIGHT A_SetTranslucent(.8,1)
		BPUF BCDABC 1  BRIGHT A_SetTranslucent(.6,1)
		BPUF DABCDABC 1  BRIGHT A_SetTranslucent(.4,1)
		BPUF DABCDABCDA 1 BRIGHT A_SetTranslucent(.2,1)
		Stop
	}
}

//New PlasmaBall (From Brutal Doom)

ACTOR NPlasma_Ball: FastProjectile
{
	Radius 4
	Height 4
	Speed 35
	Damage 8
	Projectile
	+RANDOMIZE
	+MISSILE
	+THRUSPECIES
	Species "Marines"
	RenderStyle Add
	Damagetype "Plasma"
	Alpha 0.9
	Obituary "$OB_MPPLASMARIFLE"
	Scale 0.01
	Decal Scorch
	States
	{
	Spawn:
		TNT1 A 1
	Fly:
		PLSS A 1 bright
		TNT1 A 0 A_SpawnItemEx("PlasmaBallTrail1", (3 *momx)/-35.0, -(3 *momy)/-35.0, 2+(3 *momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("PlasmaBallTrail2", (6 *momx)/-35.0, -(6 *momy)/-35.0, 2+(6 *momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("PlasmaBallTrail3", (9*momx)/-35.0, -(9*momy)/-35.0, 2+(9*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("PlasmaBallTrail4", (12*momx)/-35.0, -(12*momy)/-35.0, 2+(12*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("PlasmaBallTrail5", (15*momx)/-35.0, -(15*momy)/-35.0, 2+(15*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("PlasmaBallTrail6", (18*momx)/-35.0, -(18*momy)/-35.0, 2+(18*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("PlasmaBallTrail7", (21*momx)/-35.0, -(21*momy)/-35.0, 2+(21*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("PlasmaBallTrail8", (24*momx)/-35.0, -(24*momy)/-35.0, 2+(24*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        TNT1 A 0 A_SpawnItemEx("PlasmaBallTrail9", (27*momx)/-35.0, -(27*momy)/-35.0, 2+(27*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
		TNT1 A 0 A_SpawnItemEx("PlasmaBallTrail9", (30*momx)/-35.0, -(30*momy)/-35.0, 2+(30*momz)/-35.0, 0,0,0, 0, SXF_ABSOLUTEANGLE)
        Loop
	Death:
		TNT1 A 0 A_CustomMissile ("BluePlasmaFire", 0, 0, random (0, 360), 2, random (0, 360))
		TNT1 AAAAA 0 A_CustomMissile ("BluePlasmaParticle", 0, 0, random (0, 360), 2, random (0, 360))
		TNT2 AAAAA 9 A_CustomMissile ("GunSmokeSpawner2", 1, 0, random (0, 360), 2, random (0, 160))
		Stop
	}
}

ACTOR PlasmaBallTrail1
{
	+THRUACTORS
	+CLIENTSIDEONLY
	+NOBLOCKMAP
	+NOGRAVITY
	Renderstyle Add
	Alpha 0.99
	Scale 0.25
	+MISSILE
	States
	{
	Spawn:
		PLSS A 2 BRIGHT
		Stop
	}
}

ACTOR PlasmaBallTrail2: PlasmaBallTrail1 
{	Alpha 0.8
}

ACTOR PlasmaBallTrail3: PlasmaBallTrail1 
{	Alpha 0.7
}

ACTOR PlasmaBallTrail4: PlasmaBallTrail1 
{	Alpha 0.6
}

ACTOR PlasmaBallTrail5: PlasmaBallTrail1 
{	Alpha 0.5
}

ACTOR PlasmaBallTrail6: PlasmaBallTrail1 
{	Alpha 0.4
}

ACTOR PlasmaBallTrail7: PlasmaBallTrail1 
{	Alpha 0.3
}

ACTOR PlasmaBallTrail8: PlasmaBallTrail1 
{	Alpha 0.2
}

ACTOR PlasmaBallTrail9: PlasmaBallTrail1 
{	Alpha 0.1
}

Actor BluePlasmaParticleSpawner
{
  RenderStyle Add
  Alpha 0.95
  Scale 1.1
  +NoClip
  +NoBlockMap
  +NoGravity
  +Missile
  +FORCEXYBILLBOARD
  States
  {
  Spawn:
	TNT1 AA 0 A_CustomMissile ("BluePlasmaParticle", 0, 0, random (0, 360), 2, random (50, 130))
	//TNT1 AAA 0 A_CustomMissile ("BluePlasmaParticle", 0, 0, random (0, 360), 2, random (0, 360))
    TNT1 AA 0 A_CustomMissile ("GunSmokeSpawner2", 0, 0, random (0, 360), 2, random (0, 360))
    PBEX A 4 BRIGHT //A_SpawnItem("BlueFlare" ,0)
    TNT1 A 1
    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 ("GunSmokeSpawner2", 32, 0, random (0, 360), 2, random (0, 360))
    TNT1 A 1
    Stop
  }
}

Actor BluePlasmaParticle
{
  Height 0
  Radius 0
  Mass 0
  +Missile
  +NoBlockMap
  -NoGravity
  //+LowGravity
  +DontSplash
  +DoomBounce
  +FORCEXYBILLBOARD
  BounceFactor 0.2
  Gravity 0.8
  RenderStyle Add
  Scale 0.035
  //Speed 2
  Speed 12
  States
  {
  Spawn:
  Death:
    SPKB A 2 Bright A_FadeOut(0.04)
    Loop
  }
}

Actor BluePlasmaFire: BluePlasmaParticle
{

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

Actor BluePlasmaFireMove: BluePlasmaFire
{
  Speed 1
  Scale 0.3
}

Actor BluePlasmaFireMove2: BluePlasmaFire
{
  Speed 2
  Scale 0.6
}

Actor HotPlasmaGas: BluePlasmaParticle
{
  +NoGravity
  -DOOMBOUNCE
  -NOCLIP
  -NOBLOCKMAP
  Damage 1
  Damagetype Plasma
  RenderStyle Add
  Scale 0.1
  Alpha 0.9
  Speed 18
  Decal "Scorch"
  Radius 8
  Height 8
  States
  {
  Spawn:
    FIR5 AAABB 1 BRIGHT
	FIR5 CDEFGH 1 BRIGHT A_CustomMissile ("BluePlasmaFireMove", 0, 0, 0, 2, random (-30, 30))
	FIR5 IJKL 1 BRIGHT A_CustomMissile ("BluePlasmaFireMove2", 0, 0, 0, 2, random (-60, 60))
	FIR5 MNOP 1 Bright A_CustomMissile ("BluePlasmaFireMove2", 0, 0, random (0, 360), 2, random (0, 360))
    Stop
Death:
    TNT1 A 0 A_Explode(5, 180, 0)
	FIR5 BCDEFGHIJKLMNOP 1 Bright A_CustomMissile ("BluePlasmaFireMove2", 0, 0, random (0, 360), 2, random (0, 360))
    Stop
  }
}

Actor BluePlasmaFireNonStatic: BluePlasmaFire
{
Speed 2
Alpha 0.5
}

Actor PlasmaParticleX
{
  Height 0
  Radius 0
  Mass 0
  +Missile
  +NoBlockMap
  -NoGravity
  +DontSplash
  +DoomBounce
  +FORCEXYBILLBOARD
  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 A 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
  }
}

//Extra Puffs (Wacky Stuff)
ACTOR Shot_Puff: Bullet_Puff
{
+RIPPER
DamageType Shotgun
Decal BulletHole
States
{
}
}

//Kick

ACTOR KickPuff
{
	Projectile
	+NOBLOCKMAP
	+NOGRAVITY
	+PUFFONACTORS
	+STRIFEDAMAGE
	ActiveSound "weapons/melee/move"
	VSpeed 1
	States
	{
	Spawn:
	XDeath:
		TNT1 A 0 A_PlaySound("weapons/melee/hit")
		Stop
	Crash:
		TNT1 A 0 A_AlertMonsters
		TNT1 A 0 A_PlaySound("weapons/melee/miss")
		Stop
	}
}

//Unmaker Time Stop

ACTOR STPW1: PowerupGiver
{
  +Inventory.AutoActivate
  Inventory.MaxAmount 0
  Powerup.Type TimeFreezer
  Powerup.Color GoldMap
  Powerup.Duration -20
  States
  {
  Spawn:
    UMKP A 4 BRIGHT
    Loop
  }
}

ACTOR STPW2: PowerupGiver
{
  +Inventory.AutoActivate
  Inventory.MaxAmount 0
  Powerup.Duration -4
  Powerup.Type Invulnerable
  Powerup.Color InverseMap
  States
  {
  Spawn:
    UMKP A 4 BRIGHT
    Loop
  }
}