/*

==BUSTER CARBINE==

After spending enough time with the Buster Rifle,
Arti has managed to construct a new variant of the
weapon in the form of a Carbine, featuring a more
streamlined trigger system, doing away with the old
method of swapping between three fire modes, the 
Buster Carbine now only sports two fire modes, each
bound to a separate trigger.

Primary fire is a rapid fire plasma weapon, a good
well rounded projectile weapon most are used to.
The secondary fire is the big change here, combining
the old rail beam and rocket modes into one attack,
the second trigger fires a long condensed beam of plasma
that paralyzes targets, with the tail end having a volatile
payload of explosive energy. It should be noted that this
alternate fire mode empties the capacitor, which requires
a quick cycling of the charging handle to return the weapon
to normal use.


*/

actor BusterCarbine : Weapon
{
	Weapon.SelectionOrder 30
	weapon.bobstyle smooth
	weapon.bobrangex 0.1
	weapon.bobrangey 0.6
	weapon.bobspeed 2
	Weapon.AmmoUse 1
	Weapon.Ammouse2 0
	Weapon.AmmoType "Cell"
	Weapon.AmmoType2 "Cell"
	Weapon.SlotNumber 6
	+weapon.noautofire
	+WEAPON.AMMO_OPTIONAL
	+WEAPON.ALT_AMMO_OPTIONAL
	+noalert
	+NOAUTOAIM
	Inventory.RestrictedTo "Artificer"
	Inventory.PickupMessage "You got the Buster Carbine!"
	Tag "Buster Carbine"
	states
	{
	Select:
		TNT1 A 0
		TNT1 A 0 a_playsound ("buster/draw", 0)
	draw:
		TNT1 A 0
		BCID AAAA 0 A_Raise
		BCP3 B 1 A_Raise
		Loop
	Deselect:
		TNT1 A 0
		TNT1 A 0 a_jumpifhealthlower (1, "deadlower")
		TNT1 A 0 a_stopsound (6)
		TNT1 A 0 a_playsound ("buster/holster",0)
	holster:
		TNT1 A 0
		BCID A 1 A_Lower
		TNT1 A 0 a_stopsound (6)
		TNT1 AA 0 A_Lower
		TNT1 A 0 a_takeinventory ("secretaction", 99)
		Loop
	deadlower:
		TNT1 A 0
		TNT1 A 0
		TNT1 A 0 a_stopsound (6)
		TNT1 AAAAAAAAAAAAA 0 a_lower
		TNT1 A 1 a_lower
		wait
	Ready:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("cell",1, "RealReady")
		BCP3 B 1
		goto NoCellReady
	RealReady:
		TNT1 A 0
		BCID A 1 a_playsound ("BusterCarbine/Idle",6,1,1)
		goto RealReadyLoop
	RealReadyLoop:
		BCID ABCD 2 A_WeaponReady
		Loop
	NoCellReady:
		TNT1 A 0
		TNT1 A 0 a_jumpifinventory ("cell",1, "PowerOn")
		BCP3 B 1 a_weaponready
		TNT1 A 0 a_jumpifinventory ("cell",1, "PowerOn")
		loop
	PowerOn:
		BCS2 ABCD 2 a_weaponready (WRF_NOBOB)
		TNT1 A 0 a_playsound ("BusterCarbine/Rattle",0)
		BCS2 EFG 2 a_weaponready (WRF_NOBOB)
		BCS2 G 5 a_weaponready (WRF_NOBOB)
		TNT1 A 0 a_playsound ("BusterCarbine/BoltBack",0)
		BCS2 H 2 bright a_weaponready (WRF_NOBOB)
		TNT1 A 0 a_playsound ("BusterCarbine/BoltForward",0)
		BCS2 I 3 bright
		BCS2 JK 2 a_weaponready (WRF_NOBOB)
		BCS2 LMN 3 a_weaponready (WRF_NOBOB)
		goto realready
	
	Fire:
		TNT1 A 0
		TNT1 A 0 a_stopsound (6)
		TNT1 A 0 a_jumpifinventory ("cell", 1, "realfire")
		BCP3 B 1 offset (0,34)
		BCP3 B 1 offset (0,36) a_playsound ("bustercarbine/dryfire",0) 
		BCP3 B 1 offset (0,33)
		goto NoCellReady
	realfire:
		TNT1 A 0
		BRIF A 0 Bright A_GunFlash
		TNT1 A 0 a_stopsound (6)
		TNT1 A 0 a_jumpifinventory ("CarbineShot1", 1, "OtherFlash")
		TNT1 A 0 a_alertmonsters
		TNT1 A 0 A_Quake(1, 4, 0, 5,"Silence")
		PLZM A 0 A_FireCustomMissile("IonBullet",0,1,0,0)
		BRIF A 0 A_PlaySound("bustercarbine/fire",1)
		BCP1 ABC 1 bright
		TNT1 A 0 a_giveinventory ("CarbineShot1", 1)
		TNT1 A 0 a_jumpifinventory ("Cell",1,"NormalFinish")
		BCP3 A 1
		BCP3 B 2
		goto NoCellReady
	OtherFlash:
		TNT1 A 0
		TNT1 A 0 A_Quake(1, 4, 0, 5,"Silence")
		PLZM A 0 A_FireCustomMissile("IonBullet",0,1,0,0)
		TNT1 A 0 a_stopsound (6)
		BRIF A 0 A_PlaySound("bustercarbine/fire",1)
		TNT1 A 0 a_takeinventory ("CarbineShot1",999)
		BCP2 A 1 bright
		BCP1 BC 1 bright
		TNT1 A 0 a_jumpifinventory ("Cell",1,"NormalFinish")
		BCP3 A 1 
		BCP3 B 2
		goto NoCellReady
	NormalFinish:
		TNT1 A 0
		BCP1 D 1 a_refire ("Fire")
		BCP1 E 2
		goto RealReady
	Altfire:
		TNT1 A 0
		TNT1 A 0 a_stopsound (6)
		TNT1 A 0 a_jumpifinventory ("cell", 15, "LaserShot")
		TNT1 A 0 a_jumpifinventory ("cell", 1, "NoLaser")
		BCP3 B 1 offset (0,34)
		BCP3 B 1 offset (0,36) a_playsound ("bustercarbine/dryfire",0) 
		BCP3 B 1 offset (0,33)
		goto NoCellReady
	NoLaser:
		TNT1 A 0 offset (0,34)
		BCID A 1 A_WeaponReady 
		TNT1 A 0 offset (0,36) 
		TNT1 A 0 a_playsound ("bustercarbine/dryfire",0) 
		BCID B 1 A_WeaponReady 
		TNT1 A 0 offset (0,33)
		BCID C 1 A_WeaponReady 
		BCID D 1 A_WeaponReady
		goto RealReady
		
		
	LaserShot:
		TNT1 A 0
		TNT1 A 0 a_playsound ("Bustercarbine/laser",0)
		TNT1 A 0 A_Quake(2, 8, 0, 5,"Silence")
		TNT1 A 0 a_takeinventory ("cell",15)
		BCS1 A 2 bright a_firecustommissile ("IonBeamSpawner")
		TNT1 A 0 a_recoil (5)
		TNT1 A 0 a_setpitch (pitch-4,SPF_INTERPOLATE)
		BCS1 BC 2 bright
		BCS1 DEF 2
		BCP3 B 8
		TNT1 A 0 a_jumpifinventory ("Cell", 1, "BoltRack")
		goto NoCellReady		
	BoltRack:
		BCS2 ABCD 2
		TNT1 A 0 a_playsound ("BusterCarbine/Rattle",0)
		BCS2 EFG 2
		BCS2 G 5
		TNT1 A 0 a_playsound ("BusterCarbine/BoltBack",0)
		BCS2 H 3 
		TNT1 A 0 a_playsound ("BusterCarbine/BoltForward",0)
		BCS2 I 4 a_weaponready (WRF_NOSECONDARY)
		BCS2 JK 3 a_weaponready
		BCS2 LMN 3 a_weaponready
		goto ready
	}
}

actor CarbineShot1 : inventory
{inventory.maxamount 1}


ACTOR IonBullet 
{
    Radius 6
    Height 6
    Speed 60
    Damage 5
    Decal "PlasmaScorchLower"
	Species "Player"
    Projectile
	+randomize
    +THRUSPECIES
	+FORCEXYBILLBOARD
	+bright
	scale 0.75
    States
    {
    Spawn:
		TNT1 A 0
		TNT1 A 1
		TNT1 A 0 a_jump (120,"spawn2","spawn3","Spawn4")
		goto Spawn1
	Spawn1:
        IBLT A 1 a_spawnitemex ("IonBulletTrail1",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
        IBLT B 1 a_spawnitemex ("IonBulletTrail2",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
        IBLT C 1 a_spawnitemex ("IonBulletTrail3",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
        IBLT D 1 a_spawnitemex ("IonBulletTrail4",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
		Loop
	Spawn2:
        IBLT B 1 a_spawnitemex ("IonBulletTrail2",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
        IBLT C 1 a_spawnitemex ("IonBulletTrail3",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
        IBLT D 1 a_spawnitemex ("IonBulletTrail4",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
        IBLT A 1 a_spawnitemex ("IonBulletTrail1",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
		Loop
	Spawn3:
        IBLT C 1 a_spawnitemex ("IonBulletTrail3",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
        IBLT D 1 a_spawnitemex ("IonBulletTrail4",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
        IBLT B 1 a_spawnitemex ("IonBulletTrail2",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
        IBLT A 1 a_spawnitemex ("IonBulletTrail1",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
		Loop
    Spawn4:
        IBLT D 1 a_spawnitemex ("IonBulletTrail4",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
        IBLT A 1 a_spawnitemex ("IonBulletTrail1",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
        IBLT B 1 a_spawnitemex ("IonBulletTrail2",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
        IBLT C 1 a_spawnitemex ("IonBulletTrail3",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
		Loop
		
    XDeath:
		TNT1 A 0
		TNT1 A 0 a_setscale (1.25)
		TNT1 AA 0 a_spawnitemex ("IonParticle",random(-8,8),random(-8,8),random(-5,5),random(-100,100)/10.0,random(-100,100)/10.0,random(-100,100)/10.0,0,SXF_NOCHECKPOSITION)
		TNT1 A 0 a_playsound ("Bustercarbine/Hit",0,0.40,0,1.20)
		IBHT ABCDEF 1 bright
		TNT1 A 0 a_setscale (1.50)
		IBHT F 1
        stop
	Death:
		TNT1 A 0
		TNT1 A 0 a_setscale (1.25)
		TNT1 A 0 a_playsound ("Bustercarbine/Miss",0,0.60)
		IBMS ABC 2 bright
		TNT1 A 0 a_setscale (1.50, 0.50)
		IBMS D 2 bright
		TNT1 A 0 a_setscale (2, 0.25)
		IBMS E 2 bright
		stop
    }
}





actor IonBulletTrail1
{
    Scale 0.60
    RenderStyle Translucent
    Alpha 0.95
    +NOINTERACTION
	+FORCEXYBILLBOARD
    States
    {
    Spawn:
		TNT1 AA 1
 		IBLT B 1 bright
 		IBLT C 1 bright a_setscale (0.40)
 		IBLT D 1 bright a_setscale (0.25)
 		IBLT A 1 bright a_setscale (0.10)
        stop
    }
}

actor IonBulletTrail2 : IonBulletTrail1
{
    States
    {
    Spawn:
		TNT1 AA 1
 		IBLT C 1 bright
 		IBLT D 1 bright a_setscale (0.40)
 		IBLT A 1 bright a_setscale (0.25)
 		IBLT B 1 bright a_setscale (0.10)
        stop
    }
}

actor IonBulletTrail3 : IonBulletTrail1
{
    States
    {
    Spawn:
		TNT1 AA 1
 		IBLT D 1 bright
 		IBLT A 1 bright a_setscale (0.40)
 		IBLT B 1 bright a_setscale (0.25)
 		IBLT C 1 bright a_setscale (0.10)
        stop
    }
}

actor IonBulletTrail4 : IonBulletTrail1
{
    States
    {
    Spawn:
		TNT1 AA 1
 		IBLT A 1 bright
 		IBLT B 1 bright a_setscale (0.40)
 		IBLT C 1 bright a_setscale (0.25)
 		IBLT D 1 bright a_setscale (0.10)
        stop
    }
}




actor IonBeamSpawner
{
	PROJECTILE
	+NOINTERACTION
	Speed 1
	Radius 4
	Height 8
	Damage (0)
	RenderStyle None
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1 A_SpawnItemEx("ionchain",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		TNT1 A 1 A_SpawnItemEx("ionchain",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		TNT1 A 1 A_SpawnItemEx("ionchain",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		TNT1 A 1 A_SpawnItemEx("ionchain",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		TNT1 A 1 A_SpawnItemEx("ionchain",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		TNT1 A 1 A_SpawnItemEx("ionchain",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		TNT1 A 1 A_SpawnItemEx("ionchain",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		TNT1 A 1 A_SpawnItemEx("ionchain",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		TNT1 A 1 A_SpawnItemEx("ionTail",0,0,0,momx*60,momy*60,momz*60,0,SXF_NOCHECKPOSITION|SXF_ABSOLUTEMOMENTUM)
		Stop
	}
}

actor IonChain : fastprojectile
{
    Projectile
    Damage 8
    Decal "PlasmaScorch"
	Species "Player"
	+randomize
    +THRUSPECIES
	+FORCEXYBILLBOARD
	+DONTBLAST
	+FORCEPAIN
	speed 120
	MissileType "IonChainLink"
	missileheight 8
	+bright
	radius 8
	height 8
	renderstyle add
	scale 0.90
	decal doomimpscorch
	states
	{
	Spawn:
		TNT1 A 0
		AMB1 ABC 1
		loop
	Xdeath:
		TNT1 A 0
		TNT1 A 0 a_setscale (0.60)
		TNT1 AAAA 0 a_spawnitemex ("IonParticle",random(-2,2),random(-2,2),random(-3,3),random(-100,100)/10.0,random(-100,100)/10.0,random(-100,100)/10.0,0,SXF_NOCHECKPOSITION)
		TNT1 A 0 a_playsound ("Bustercarbine/Hit",0,0.50,0,1.20)
		AMB1 DEFGHIJ 1
		stop
	death:
		TNT1 A 0
		TNT1 A 0 a_setscale (0.60)
		TNT1 AAAA 0 a_spawnitemex ("IonParticle",random(-2,2),random(-2,2),random(-3,3),random(-100,100)/10.0,random(-100,100)/10.0,random(-100,100)/10.0,0,SXF_NOCHECKPOSITION)
		TNT1 A 0 a_playsound ("Bustercarbine/Miss",0,0.70,0,1.20)
		AMB1 DEFGHIJ 1
		stop
	}
}


actor IonChainLink
{
	+NOINTERACTION
	+NOCLIP
    +BRIGHT
	+clientsideonly
	Radius 1
	Height 1
	Renderstyle Add
	Alpha 0.06
	Scale 0.80
	States
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1
		AMB1 AB 1
		Stop
	Death:
		TNT1 A 0
		TNT1 A 1
		stop
	}
}


actor IonTail : IonChain
{
	MissileType ""
	scale 1.1
	decal BigScorch
	+FORCEPAIN
	+HITTRACER
	states
	{
	Xdeath:
	death:
		TNT1 A 0
		TNT1 A 0 a_playsound ("BusterCarbine/LaserExplode",0)
		TNT1 A 0 radius_quake (3,8,0,20,0)
		TNT1 A 0 a_radiusgive ("IonBooster",150,RGF_MONSTERS,1)
		TNT1 A 0 a_blast (BF_NOIMPACTDAMAGE)
		TNT1 A 0 a_radiusthrust (1500,165,RTF_NOIMPACTDAMAGE,165)
		TNT1 A 0 a_explode (75,140,0,0,140)
		TNT1 A 0 a_setscale (3)
		TNT1 AAAAAAAAAAAAAAA 0 a_spawnitemex ("IonParticle",random(-2,2),random(-2,2),random(-2,2),random(-100,100)/10.0,random(-100,100)/10.0,random(-100,100)/10.0,0,SXF_NOCHECKPOSITION)
		TNT1 AAAAAAAAAAAAAAAAAAAAAAAAA 0 Bright A_SpawnItemEx("IonDust1",frandom(-31,31),frandom(-31,31),frandom(-31,31),frandom(-1,1),frandom(-1,1),frandom(0,1),0,SXF_NOCHECKPOSITION)
		TNT1 AAAAAAAAAAAAAAAAA 0 Bright A_SpawnItemEx("IonDust2",frandom(-16,16),frandom(-16,16),frandom(-16,16),frandom(-1,1),frandom(-1,1),frandom(0,1),0,SXF_NOCHECKPOSITION)
		TNT1 AAAAAAAAAAAAAAAAA 0 Bright A_SpawnItemEx("IonDust3",frandom(-8,8),frandom(-8,8),frandom(-8,8),frandom(-1,1),frandom(-1,1),frandom(0,1),0,SXF_NOCHECKPOSITION)
		B1HT ABCDE 1
		B1HT E 1 a_setscale (3.35)
		stop
	}
}

actor IonBooster : CustomInventory
{
	states
	{
	Spawn:
		TNT1 A 0
		TNT1 A 1
		stop
	Pickup:
		TNT1 A 0 
		TNT1 A 0 a_facetarget
		TNT1 A 0 ThrustThing(angle * 256 / 360 + 128, 20, 0, 0)
		TNT1 A 0 A_CheckFlag ("BOSS", "NoThrust")
		TNT1 A 0 ThrustThingZ(0,55,0,0)
		stop
	NoThrust:
		TNT1 A 0 
		stop
	}
}


actor IonParticle
{
	projectile
	+clientsideonly
	+hexenbounce
	+bright
	speed 10
	+THRUACTORS
	scale 0.25
	Renderstyle add
	reactiontime 3
	bouncefactor 1
	Bouncecount 2
	states
	{
	spawn:	
		TNT1 A 0
		PLZM MMMM 1  Bright 
		TNT1 A 0 a_setscale (0.40)
		PLZM N 2 Bright 
		TNT1 A 0 a_changeflag ("NOGRAVITY", 0)
		TNT1 A 0 a_setscale (0.20)
		PLZM M 3 Bright 
		TNT1 A 0 a_setscale (0.40)
		PLZM N 3 Bright 
		TNT1 A 0 a_setscale (0.20)
		PLZM M 3 Bright
		goto bouncing
	Bouncing:
		TNT1 A 0
		TNT1 A 0 a_setscale (0.40)
		PLZM N 3 Bright 
		TNT1 A 0 a_setscale (0.20)
		PLZM M 3 Bright 
		TNT1 A 0 a_countdown
		loop
	Death:
		TNT1 A 0
		TNT1 A 0 a_changeflag ("NOGRAVITY",1)
		TNT1 A 0 a_setscale (0.30)
		TNT1 A 1
		stop
	}
}




ACTOR IonDust1
{
	+NOBLOCKMAP
	+NOGRAVITY
	+ALLOWPARTICLES
	+RANDOMIZE
	RenderStyle Add
	Alpha 0.5
	Scale 0.75
	+clientsideonly
	Mass 5
	States
	{
	Spawn:
		DPLE A 2 Bright A_FadeOut(0.1)
		DPLE B 2 Bright A_FadeOut(0.1)
		DPLE C 2 Bright A_FadeOut(0.1)
		DPLE D 2 Bright A_FadeOut(0.1)
		DPLE E 2 Bright A_FadeOut(0.1)
	fade:
		DPLE E 2 Bright A_FadeOut(0.05)
		loop
	}
}

ACTOR IonDust2
{
	+NOBLOCKMAP
	+NOGRAVITY
	+ALLOWPARTICLES
	+RANDOMIZE
	RenderStyle Add
	Alpha 0.5
	Scale 0.20
	+clientsideonly
	Mass 5
	States
	{
	Spawn:
		AMB1 E 2 Bright A_FadeOut(0.04)
		AMB1 F 2 Bright A_FadeOut(0.1)
		AMB1 E 2 Bright A_FadeOut(0.1)
	fade:
		AMB1 F 2 Bright A_FadeOut(0.1)
		AMB1 E 2 Bright A_FadeOut(0.1)
		loop
	}
}

ACTOR IonDust3
{
	+NOBLOCKMAP
	+ALLOWPARTICLES
	+RANDOMIZE
	Gravity 0.2
	RenderStyle Add
	Alpha 0.5
	Scale 0.10
	Mass 5
	+clientsideonly
	States
	{
	Spawn:
		PLMZ M 35 Bright
		PLMZ NNMMMMNNNNMMMMNNN 2 Bright A_FadeOut(0.04)
		Stop
	}
}




//=============================================================================
//=============================================================================
//=============================================================================
//=============================================================================
//=============================================================================



actor FuzzyPlasma // edited from Doom's standard plasmaball actor
{
	Radius 13
	Height 8
	Speed 40
	Damage 4
	Decal DoomImpScorch
	Projectile
	species "Player"
	+thruspecies
	+RANDOMIZE
	RenderStyle Add
	Alpha 0.65
	SeeSound ""
	DeathSound "fuzzy/pdeath"
	Obituary "%o was fried by %k's buster rifle"
	States
	{
	Spawn:
		AMB1 A 0
		AMB1 A 0 A_SpawnItemEx("FuzzyPlasmaTrail")
		AMB1 A 1 bright
		AMB1 A 0 A_SpawnItemEx("FuzzyPlasmaTrail")
		AMB1 B 1 bright
		AMB1 A 0 A_SpawnItemEx("FuzzyPlasmaTrail")
		AMB1 C 1 bright
		loop
	Death:
		PLZM H 0
		PLZM HIJKL 3 bright
		stop
	}
}

ACTOR FuzzyPlasmaTrail
{
	RenderStyle Translucent
	Alpha 0.80
	Scale 0.5
	+NOBLOCKMAP
	+NOGRAVITY
	+NOCLIP
	+DONTSPLASH
	+NOTELEPORT
	+clientsideonly
	States
	{
	Spawn:
		AMB1 A 0
		AMB1 A 1 A_SetTranslucent(0.70, 1)
		AMB1 B 1 A_SetTranslucent(0.65, 1)
		AMB1 C 1 A_SetTranslucent(0.60, 1)
		AMB1 A 1 A_SetTranslucent(0.55, 1)
		AMB1 B 1 A_SetTranslucent(0.50, 1)
		AMB1 C 1 A_SetTranslucent(0.45, 1)
		Stop
	}
}


actor plasmaring
{
	+NOBLOCKMAP
	+NOGRAVITY
	+NOCLIP
	+DONTSPLASH
	+NOTELEPORT
	+clientsideonly
	+bright
	RenderStyle add
	Alpha 0.50
	Scale 3
	States
	{
	spawn:
		PSMH AB 3
	FadingOut:
		TNT1 A 0
		TNT1 A 0 A_SetScale (scalex + frandom(0.05,0.10))
		PSMH C 1 a_fadeout (0.04)
		loop
	Death:
		TNT1 A 1
		stop
	}
}

actor plasmabang
{
	+NOBLOCKMAP
	+NOGRAVITY
	+NOCLIP
	+DONTSPLASH
	+NOTELEPORT
	+clientsideonly
	RenderStyle translucent
	Alpha 0.70
	Scale 1
	States
	{
	spawn:
		PSMH DEFGH 1
		stop
	death:
		TNT1 A 2
		stop
	}
}


