Actor HovercraftPlasmaGunner
  {
  Health 400
  Radius 25
  Height 56
  Mass 400
  Speed 1
  Species "PlasmaHoverCraft"
  PainChance 15
  MinMissileChance 35
  BloodType "MetalSurface"
  Monster
  Obituary "%o was roasted and atomised by the hovercraft plasmagunner" 
  Seesound "HoverPlasmaGunner/See"
  Activesound "HoverPlasmaGunner/Active"
  PainSound ""
  Tag "Plasma Hovercraft Gunner"
  DeathSound "BIGBOOM"
  +FLOAT
  +NOICEDEATH
  +NOBLOODDECALS
  +NOGRAVITY
       States
	        {
			Spawn:
			   TNT1 A 0
			   TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("STFUCheck") == 1, "STFU")
			Spawn2:     
			   PFLY A 3 A_Look
			  Loop
			STFU:
				 TNT1 A 0
				 TNT1 A 0 ACS_NamedExecute ("STFUHoverPlasmaGunner")
				 Goto Spawn2  
			 See:  
			   TNT1 A 0 A_PlaySound ("HOVIDLE1", 6, 1.0, true) 
			   PFLY A 3 A_Chase
			   PFLY A 2 A_Recoil (-3)
			  Loop
			 Missile:
			   PFLY A 11 A_FaceTarget
			   TNT1 A 0 A_JumpIfTargetInLos ("CloseQuarters", 0, JLOSF_DEADNOJUMP, 469)
			   TNT1 A 0 A_JumpIfTargetInLos ("LongRange", 0, JLOSF_CLOSENOJUMP | JLOSF_DEADNOJUMP, 0, 1000)
			 MissileAct:  
			   PFLY A 3 A_FaceTarget
			   TNT1 A 0 A_Jump (69, "DodgeFire")
			   TNT1 A 0 A_Playsound ("PFLYHFIR")
			   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
			   PFLY B 1 BRIGHT A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
			   PFLY A 2 A_FaceTarget
			   TNT1 A 0 A_Playsound ("PFLYHFIR")
			   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
			   PFLY B 1 BRIGHT A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
			   PFLY A 2 A_FaceTarget
			   TNT1 A 0 A_Playsound ("PFLYHFIR")
			   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
			   PFLY B 1 BRIGHT A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
			   PFLY A 2 A_FaceTarget
			   TNT1 A 0 A_Playsound ("PFLYHFIR")
			   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
			   PFLY B 1 BRIGHT A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
			   PFLY A 2 A_FaceTarget
			   TNT1 A 0 A_Playsound ("PFLYHFIR")
			   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
			   PFLY B 1 BRIGHT A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
			  Goto See
			 Dodgefire:
			   PFLY AA 1 A_ChangeVelocity (random (-6, 6), random (-6,6), random (0,6), CVF_REPLACE)
			   TNT1 A 0 A_FaceTarget
			   TNT1 A 0 A_Playsound ("PFLYHFIR")
			   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
			   PFLY B 1 BRIGHT A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
			   PFLY A 2 A_FaceTarget
			   TNT1 A 0 A_Playsound ("PFLYHFIR")
			   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
			   PFLY B 1 Bright A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
			   PFLY A 2 A_FaceTarget
			   TNT1 A 0 A_Playsound ("PFLYHFIR")
			   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
			   PFLY B 1 BRight A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
			   PFLY A 2 A_FaceTarget
			   TNT1 A 0 A_Playsound ("PFLYHFIR")
			   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
			   PFLY B 1 Bright A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
			   PFLY A 2 A_FaceTarget
			   TNT1 A 0 A_Playsound ("PFLYHFIR")
			   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
			   PFLY B 1 Bright A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
			  Goto See
			 CloseQuarters:
			   PFLY A 3 A_FaceTarget
			   TNT1 A 0 A_Jump (175, "StrafeFireLeft", "StrafeFireRight")
			   TNT1 A 0 A_Playsound ("PFLYBLAS")
			   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaCharge", 12, -12) 
			   PFLY B 1 Bright A_CustomMissile ("HovercraftPlasmaCharge", 12, 12)
			  Goto See
			 StrafeFireLeft:
				   PFLY AAAA 2 ThrustThing(angle*256/360+192, 1, 0, 0)
				   TNT1 A 0 A_FaceTarget
				   TNT1 A 0 A_Playsound ("PFLYHFIR")
				   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
				   PFLY B 1 BRIGHT A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
				   PFLY A 2 A_FaceTarget
				   TNT1 A 0 A_Playsound ("PFLYHFIR")
				   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
				   PFLY B 1 Bright A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
				   PFLY A 2 A_FaceTarget
				   TNT1 A 0 A_Playsound ("PFLYHFIR")
				   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
				   PFLY B 1 BRight A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
				   PFLY A 2 A_FaceTarget
				   TNT1 A 0 A_Playsound ("PFLYHFIR")
				   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
				   PFLY B 1 Bright A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
				   PFLY A 2 A_FaceTarget
				   TNT1 A 0 A_Playsound ("PFLYHFIR")
				   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
				   PFLY B 1 Bright A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
				  Goto See
			  StrafeFireRight:
				   PFLY AAAA 2 ThrustThing(angle*256/360+64, 1, 0, 0)
				   TNT1 A 0 A_FaceTarget
				   TNT1 A 0 A_Playsound ("PFLYHFIR")
				   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
				   PFLY B 1 BRIGHT A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
				   PFLY A 2 A_FaceTarget
				   TNT1 A 0 A_Playsound ("PFLYHFIR")
				   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
				   PFLY B 1 Bright A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
				   PFLY A 2 A_FaceTarget
				   TNT1 A 0 A_Playsound ("PFLYHFIR")
				   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
				   PFLY B 1 BRight A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
				   PFLY A 2 A_FaceTarget
				   TNT1 A 0 A_Playsound ("PFLYHFIR")
				   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
				   PFLY B 1 Bright A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
				   PFLY A 2 A_FaceTarget
				   TNT1 A 0 A_Playsound ("PFLYHFIR")
				   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
				   PFLY B 1 Bright A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
				  Goto See	  
			 LongRange:
			   PFLY A 9 A_FaceTarget
			   TNT1 A 0 A_Jump (100, "PlasmaBarrage")
			   TNT1 A 0 A_Playsound ("PFLYBLAS")
			   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaCharge", 12, -12, random (-1,1)) 
			   PFLY B 3 Bright A_CustomMissile ("HovercraftPlasmaCharge", 12, 12, random (-1,1))
			   PFLY A 9 A_FaceTarget
			   TNT1 A 0 A_Playsound ("PFLYBLAS")
			   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaCharge", 12, -12, random (-1,1)) 
			   PFLY B 3 Bright A_CustomMissile ("HovercraftPlasmaCharge", 12, 12, random (-1,1))
			   PFLY A 9 A_FaceTarget
			   TNT1 A 0 A_Playsound ("PFLYBLAS")
			   TNT1 A 0 A_CustomMissile ("HovercraftPlasmaCharge", 12, -12, random (-1,1)) 
			   PFLY B 3 Bright A_CustomMissile ("HovercraftPlasmaCharge", 12, 12, random (-1,1))
			   Goto See
			  PlasmaBarrage:
			    TNT1 A 0 A_FaceTarget
				TNT1 A 0 A_Playsound ("PFLYHFIR")
				TNT1 A 0 A_SentinelBob
				TNT1 A 0 A_CustomMissile ("HovercraftPlasmaOrb", 12, -12) 
				PFLY B 1 BRIGHT A_CustomMissile ("HovercraftPlasmaOrb", 12, 12)
				TNT1 A 0 A_GiveInventory ("ShotCounter", 1)
				TNT1 A 0 A_JumpIfInventory ("ShotCounter", 15, "See")
				PFLY A 3 A_MonsterRefire (40, "SeeLoop")
				Loop
			   BarrageStop:
			    PFLY A 3 
			    TNT1 A 0 A_TakeInventory ("ShotCounter", 15)
			   Goto See
			 Pain:
			   TNT1 A 0 A_PlaySound ("HOVIDLE1", 6, 1.0, true) 
			   PFLY A 3
			   PFLY A 3 A_Pain
			  Goto See
			 Death:
			   TNT1 A 0 A_StopSound (6)	  
			   TNT1 A 0 A_SpawnItemEx ("HoverCraftPlasmaExplosion", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
			   TNT1 A 0 A_SpawnItemEx ("BigTinCanExplosion", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
			   TNT1 A 0 A_SpawnItemEx ("VgavnonahCore", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
		       TNT1 AAAA 0 A_CustomMissile ("CrapMetal", random (-4,4), random (-4,4), random (-360,360), CMF_OffSetPitch | CMF_AIMDIRECTION, random (30,90)) 
			   TNT1 A 1 A_NoBlocking
			   TNT1 A 0 A_SpawnItemEx ("TinCanExplosion", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
			   TNT1 A 1 A_Scream
			   TNT1 A 0 A_SpawnItemEx ("TinCanExplosion", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
			   TNT1 A 4 A_SpawnItemEx ("TinCanExplosion", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
			   TNT1 A 4 A_SpawnItemEx ("LittleTinCanExplosion", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
			   TNT1 A 6
			  Stop 
			}


  }
  
  
  
  
			Actor HovercraftPlasmaOrb
      {
	      Radius 6
          Height 8
		  Speed 18
		  Scale 0.2
		  FastSpeed 20
		  Damage (5)
		  Projectile
		  +RANDOMIZE
		  RenderStyle Add
		  SeeSound ""
		  DeathSound "HYPBLIMP"
		  States
		  {
		  Spawn:
			CLBB I 1 Bright 
 			Loop
		  Death:
			//TNT1 A 0 A_SpawnItemEx ("SmallbluePlasmaShockwave", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
			TNT1 A 1 A_SpawnItemEx ("CyanPlasmaOrbDischarge", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
			Stop
			  }
           }
		   
		   
		
	
	
	Actor HovercraftPlasmaCharge
      {
	      Radius 6
          Height 8
		  Speed 18
		  Scale 0.4
		  FastSpeed 20
		  Damage (20)
		  Projectile
		  +RANDOMIZE
		  RenderStyle Add
		  SeeSound ""
		  DeathSound "PLSEXP"
		  States
		  {
		  Spawn:
			DB19 ABCDEFGHIJKLMNOPQRSTUVWXYZ 1 Bright 
 			Loop
		  Death:
			TNT1 AA 0 A_SpawnItemEx ("AssSmoke2", 0, 0, 0)
			TNT1 A 0 A_Explode ((20), 88)
			TNT1 A 0 A_SetScale (scaleX+0.1, ScaleY+0.1)
			TNT1 A 0 A_SpawnItemEx ("BluePlasmaShockwave", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
			TNT1 AAAAAAAAA 0 A_CustomMissile ("HoverCraftPlasmaParticle", 0, 0, random (-180,180), CMF_OFFSETPITCH, random (-180,180))
			TNT1 A 1 A_SpawnItemEx ("CyanPlasmaExplosion", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
			//DB21 ABCDEFGHI 1 Bright A_FadeOut (0.08)
			Stop
			  }
           }
		   
	
	
	 Actor HovercraftPlasmaParticle
      {
	      Radius 6
          Height 8
		  Speed 1
		  Scale 0.15
		  FastSpeed 2
		  +DONTHARMSPECIES
		  Species "PlasmaHoverCraft"
		  Bouncecount 2
		  BounceFactor 1
		  +DOOMBOUNCE
		  Damage (0)
		  +THRUACTORS 
		  Projectile
		  ReactionTime 69
		  RenderStyle Add
		  SeeSound ""
		  DeathSound "HYPBLIMP"
		  States
		  {
		  Spawn:
		    CLB4 I 3 A_CountDown
		    TNT1 A 0 A_Explode ((2),15)
			CLB4 I 5 Bright 
 			Loop
		  Death:
			TNT1 A 0 A_SetScale (scaleX+0.1, ScaleY+0.1)
			TNT1 A 0 A_Explode ((4),30)
			TNT1 A 0 A_SpawnItemEx ("SmallbluePlasmaShockwave", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
			X051 A 3 Bright A_FadeOut (0.08)
			Stop
			  }
           }	
		   
	    
		
		
		actor CyanPlasmaOrbDischarge
		{
		renderstyle add
		alpha 1.0
		scale 0.88
		+NOINTERACTION
		+CLIENTSIDEONLY
		states
			{
			Spawn:
			CYPL ABCDEFGHIJKLMNOPQ 1 Bright A_FadeOut (0.08)
			loop
		}
	  } 
	  
	  
	  
	  actor CyanPlasmaExplosion
		{
		renderstyle add
		alpha 1.0
		scale 1.75
		+NOINTERACTION
		+CLIENTSIDEONLY
		states
			{
			Spawn:
			DB21 ABCDEFGHI 1 Bright A_FadeOut (0.08)
			loop
		}
	  } 
	  
	  
	  
	  
	  actor HoverCraftPlasmaExplosion
		{
		renderstyle add
		alpha 1.0
		scale 3.88
		+NOINTERACTION
		+CLIENTSIDEONLY
		states
			{
			Spawn:
			DB21 ABCDEFGHI 1 Bright A_FadeOut (0.08)
			loop
		}
	  } 
		
		
		
		
	
	
		actor BluePlasmaShockwave
		{
		renderstyle add
		alpha 0.88
		scale 0.1
		+NOINTERACTION
		+CLIENTSIDEONLY
		states
			{
			Spawn:
			BSW2 A 1 bright A_FadeOut(0.1,1)
			TNT1 A 0 A_SetScale(scalex+0.05,scaley+0.05)
			loop
		}
	  }  
		   
		   
		 actor SmallBluePlasmaShockwave
	{
	renderstyle add
	alpha 0.88
	scale 0.03
	+NOINTERACTION
	+CLIENTSIDEONLY
	states
	{
	Spawn:
	BSW2 A 1 bright A_FadeOut(0.4,1)
	TNT1 A 0 A_SetScale(scalex+0.05,scaley+0.05)
	loop
	}
	}  
			