     Actor ShockerStealthDrone
{
Health 50
Monster
Radius 16
Height 56
Mass 50
Speed 12
DamageType "DroneDischarge"
DamageFactor "DroneDischarge", 0.0
BloodType "MetalSurface"
PainChance 56
MaxTargetRange 100
Scale 0.64
Monster
+FLOAT
+NOGRAVITY
+NOBLOODDECALS
+MISSILEMORE
-DONTFALL
+NOICEDEATH
PainSound ""
Tag "Discharger Drone"
DeathSound "misc/boom"
ActiveSound ""
SeeSound "BOOMDRSE" 
Obituary "%o felt the infinite power of the Stealth Shocker Drone" 
States
     {
	  Spawn:
	     TNT1 A 0 A_SentinelBob 
	     SCDR A 5 A_Look
		Loop
	  See:
		 SCDR A 20
	  SeeLoop:	 
		 TNT1 A 0 A_PlaySound ("BOOMDRAC", 6, 1.0, true)
	     SCDR AAAAAAAA 1 Bright A_Chase ("Discharge", "")
		 TNT1 A 0 A_JumpIfInTargetLos ("StealthMode", 5, JLOSF_CLOSENOJUMP | JLOSF_DEADNOJUMP, 1500, 340)
		Loop
	 Charge:
		 SCDR C 1 A_SetTranslucent (0.08, 1)
		 SCDR D 1 A_SetTranslucent (0.2, 1)
		 SCDR E 1 A_SetTranslucent (0.4, 1)
		 SCDR F 1 A_SetTranslucent (0.8, 1)
		 SCDR A 1 A_SetTranslucent (1, 0)
		 TNT1 A 0 A_FaceTarget
		 SCDR AAAA 1 A_Recoil (-2)
		 TNT1 A 0 A_Chase ("Discharge", "")
		 Goto SeeLoop
	 Discharge:
		 SCDR A 11 A_FaceTarget
		 TNT1 A 0 A_CustomMissile ("DroneDischarge", 32, 0)
		 TNT1 A 0 A_SpawnItemEx ("DroneDischargeFlare", 0, 0, 28, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
		 TNT1 A 0 A_Playsound ("GRLIGHT", CHAN_WEAPON)
		 TNT1 AAAAA 0 A_SpawnItemEx ("DroneDischargeLightning", random (-5,5), random (-2,2), random (5,14), 0, 0, 0, SXF_NOCHECKPOSITION)
		 SCDR A 4 BRIGHT A_FaceTarget
	   Goto SeeLoop
	 StealthMode:
	   SCDR F 1 A_SetTranslucent (0.8,1)
	   SCDR E 1 A_SetTranslucent (0.6,1)
	   SCDR D 1 A_SetTranslucent (0.4,1)
	   SCDR C 1 A_SetTranslucent (0.08,1)
	   Goto StealthMovement
	 StealthMovement:
	   TNT1 A 0 A_SentinelBob
	   TNT1 A 0 A_JumpIfCloser (275, "Charge")
	   SCDR FFFFFFFF 1 Bright A_Chase ("UnStealthDischarge", "")
	   Loop
	 UnStealthDischarge:
	   SCDR C 1 A_SetTranslucent (0.09, 1)
	   SCDR D 1 A_SetTranslucent (0.2, 1)
	   SCDR E 1 A_SetTranslucent (0.4, 1)
	   SCDR F 1 A_SetTranslucent (0.8, 1)
	   SCDR A 1 A_SetTranslucent (1, 0)
	   Goto Discharge
	 Pain:
		SCDR B 1 A_SetAngle (angle+15)
		SCDR B 1 A_SetAngle (angle+15)
		SCDR B 1 A_SetAngle (angle+15)
		SCDR B 1 A_SetAngle (angle+15)
		SCDR B 1 A_SetAngle (angle+15)
		SCDR B 1 A_SetAngle (angle+15)
		SCDR B 2 A_SetAngle (angle+15)
		SCDR B 2 A_SetAngle (angle+15)
		SCDR B 2 A_SetAngle (angle+15)
		SCDR A 1 A_FaceTarget
		Goto SeeLoop
	  Death:
		 TNT1 A 0 A_StopSound (6) 	
	     TNT1 A 0 A_SpawnItemEx ("TinCanExplosion", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
		 TNT1 AAAAAA 0 A_CustomMissile ("CrapMetal", random (-4,4), random (-4,4), random (-360,360), CMF_OffSetPitch | CMF_AIMDIRECTION, random (30,90)) 
	     TNT1 A 1 Bright A_NoBlocking
		 TNT1 A 1 Bright A_Scream
		Stop 
	 }
}	 




     Actor DroneDischargeLightning
				{
				 +NOINTERACTION
				 Scale 0.88
				 RenderStyle Add
				 Alpha 0.88
				 +CLIENTSIDEONLY
						States
							{
                             Spawn:
                                 TNT1 A 0
								 TNT1 A 0 A_Jump (175, "Spawn2", "Spawn3", "Spawn4") 
								 DLI6 E 1 Bright
                                Stop
							 Spawn2:
								 DLI7 E 1 Bright
							   	Stop
							 Spawn3:
								 DLI8 E 1 Bright
							   	Stop
							 Spawn4:
								 DLI9 E 1 Bright
							   	Stop	
                            }
						}	
							
		Actor DroneDischargeFlare
			 {
			  +NOINTERACTION
				 Scale 1.0
				 RenderStyle Add
				 Alpha 0.14
				 +CLIENTSIDEONLY
				   States
					   {
					    Spawn:
						   CLB4 I 4 BRIGHT
						Stop    
					   }
				}
				
				
		Actor DroneDischarge
			{
			 Projectile
			 DamageType "DroneDischarge"
			 Speed 30
			    States
					{
					 Spawn:
						TNT1 A 7 
					  Death:
						TNT1 A 3 A_Explode ((14), 128)
					    Stop	
					}
			}