ACTOR Plasma_Ball: FastProjectile Replaces PlasmaBall
{
	Radius 4
	Height 2
	Speed 30
	Damage 5
    DamageType Plasma
	Decal "BluePlasmaSplat"
	Projectile
	+RANDOMIZE
	+FORCEXYBILLBOARD
	+STRIFEDAMAGE
	//+SHOOTABLE
	-NOBLOCKMAP
	+NOBLOOD
	+NORADIUSDMG

	damagefactor "Blood", 0.0 damagefactor "BlueBlood", 0.0 damagefactor "GreenBlood", 0.0 damagefactor "Taunt", 0.0 damagefactor "KillMe", 0.0 damagefactor "Shrapnel", 0.0
	Health 5	
	renderstyle ADD
	alpha 0.75
	Scale 0.10
	SeeSound "weapons/plasmaf"
	DeathSound "weapons/plasmax"
	Translation "0:255=%[0,0,0]:[0.7,0.9,1.5]"
	Obituary "$OB_MPPLASMARIFLE"
	var int user_c2;
	States
	{
	DM:
		TNT1 A 0

		Goto Spawn1
	
	Spawn:
		TNT1 A 0

	Spawn1:
       TNT1 A 0
		{
		user_c2 = (frandom(0.04,0.08)*0.0375);
		A_SetScale(sin(user_c2)*1.5,Max((sin(user_c2)*0.14),0.0));
		return A_Jump(256,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26);
		}
	Moving:
		PLS1 ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 BRIGHT
		{
		A_SetScale((sin(user_c2)*0.075)+0.05,Max((sin(user_c2)*0.14),0.0));
		user_c2 = (user_c2 + random(20,45)) % 360;
		A_SetRoll(cos(user_c2) + random(1,5), SPF_INTERPOLATE);
		A_SpawnItemEx("PlasmaFlare",0,0);
		}
		PLS2 ABCDEF 1 BRIGHT
		{
		A_SetScale((sin(user_c2)*0.075)+0.05,Max((sin(user_c2)*0.14),0.0));
		user_c2 = (user_c2 + random(20,45)) % 360;
		A_SetRoll(cos(user_c2) + random(1,5), SPF_INTERPOLATE);
		A_SpawnItemEx("PlasmaFlare",0,0);
		}
		Loop

Xdeath:
    //TNT1 A 0 A_SpawnItem ("PlasmaPuff", 0)
    //TNT1 A 0 A_SpawnItem ("RailPuff", 0)
	TNT1 A 0 A_CustomMissile ("BluePlasmaFire", 0, 0, random (0, 360), 2, random (0, 360))
	//TNT1 A 0 A_SpawnItem("BluePlasmaRife")
	TNT1 AAAAA 0 A_CustomMissile ("BluePlasmaParticle", 0, 0, random (0, 360), 2, random (0, 360))
    TNT1 B 1 ////A_Explode(6,50,0)
	TNT1 B 4
	TNT2 AA 9 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
		
		Stop

	Death:
    //TNT1 A 0 A_SpawnItem ("PlasmaPuff", 0)
    //TNT1 A 0 A_SpawnItem ("RailPuff", 0)
	TNT1 B 1 //A_Explode(6,50,1)
		TNT1 A 0 A_SpawnProjectile("Ricochet_Plasma",0, 0, random (0, 36), 2, random (0, 36))
		TNT1 A 0 A_SpawnProjectile("Ricochet_Plasma",0, 0, random (0, 36), 2, random (0, 36))
	TNT1 A 0 A_SpawnItemEx ("DetectFloorCraterSmall",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_SpawnItemEx ("DetectCeilCraterSmall",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
	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))
		TNT1 B 4	
    TNT2 AAAAAAAAA 9 A_CustomMissile ("PlasmaSmoke", 1, 0, random (0, 360), 2, random (0, 160))
		Stop
	}
}



Actor Ricochet_Plasma //: FastProjectile
{
-ACTIVATEIMPACT
-ACTIVATEPCROSS
+FORCEXYBILLBOARD
+THRUACTORS
bouncetype "Hexen"
mass 1
damage 0
radius 1
height 1
speed 30
seesound ""
renderstyle Add
alpha 0.8
//MissileType BulletTrail
//MissileHeight 8
states
	{
	Spawn:
		TNT1 A 0 NoDelay A_JumpIf(GetCVAR("bdoom_sparks")==0,2)
		TNT1 A 0 A_PlaySound("weapons/ricochet")
		PUF1 AAAAAAAAAAAA 0 A_CustomMissile("RP_Puffpart_plasma", random(0, 3), random(0, 3), random(0, 360), random(0, 3), random(0, 3))
		PUF1 AAAAAAAAAAAA 0 A_CustomMissile("RP_Puffpart_plasma1", random(0, 3), random(0, 3), random(0, 360), random(0, 3), random(0, 3))
		PUF1 AAAAAAAAAAAA 0 A_CustomMissile("RP_Puffpart_plasma2", random(0, 3), random(0, 3), random(0, 360), random(0, 3), random(0, 3))
		PUF1 AAAAAAAAAAAA 0 A_CustomMissile("RP_Puffpart_plasma3", random(0, 3), random(0, 3), random(0, 360), random(0, 3), random(0, 3))
		PUFF A 2
		stop
	}
}



actor RP_Puffpart_plasma
{
PROJECTILE
radius 1
height 1
renderstyle add
alpha 0.96
damage 0
speed 6
gravity 0.4
-nogravity
-noclip
States
	{
	Spawn:
		EMPT AABBCCCCCCCC 1 BRIGHT A_FadeOut(0.05)
		Stop
	}
}


actor RP_Puffpart_plasma1
{
PROJECTILE
radius 2
height 1
renderstyle add
alpha 0.96
damage 0
speed 5
gravity 0.4
-nogravity
-noclip
States
	{
	Spawn:
		EMPT AABBCCCCCCCCCCC 1 BRIGHT A_FadeOut(0.05)
		Stop
	}
}

actor RP_Puffpart_plasma2
{
PROJECTILE
radius 3
height 1
renderstyle add
alpha 0.96
damage 0
speed 4
gravity 0.4
-nogravity
-noclip
States
	{
	Spawn:
		EMPT AABBCCCCCCCCCCC 1 BRIGHT A_FadeOut(0.05)
		Stop
	}
}

actor RP_Puffpart_plasma3
{
PROJECTILE
radius 4
height 1
renderstyle add
alpha 0.96
damage 0
speed 3
gravity 0.4
-nogravity
-noclip
States
	{
	Spawn:
		EMPT AABBCCCCCCCCCCC 1 BRIGHT A_FadeOut(0.05)
		Stop
	}
}