    Actor TerBurstCannon   
{

  //----------------------------COMPLEX DOOM COMPATIBILITY DROPS------------------------
  
  DropItem "WeaponUpgradeBox" 20
  DropItem "Demon Tech Rifle", 170
 
Health 325
Monster
Radius 20
Height 56
Speed 9
+BOSSDEATH
PainChance 125
+NODROPOFF
MaxDropOffHeight 69
Translation "9:12=105:111"
Species "MANCUCU"
+DONTHARMSPECIES
SeeSound "FieldCommander/See"
ActiveSound "FieldCommander/Active"
PainSound "Ster/Pain"
DeathSound "Ster/Death"
scale 1.0
Obituary "%o' met the desert far-righteous freedom fighter, armed with some ridiculous variant of autocannon."
//+DROPOFF
  States
	{
 Spawn:
    TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("STFUCheck") == 1, "STFU")
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult ("VanJumpCheck") == 1, "VanJump")
	TNT1 A 0 A_SetScale (scaleX+frandom(-0.02, 0.02), scaleY+frandom(-0.08,0.08)) 
	TNT1 A 0 A_SpawnItemEx ("HumanTrails", 0, 0, 0)
  Spawn2:	
	TBCJ A 10 A_Look
	loop
  STFU:
     TNT1 A 0
	 TNT1 A 0 ACS_NamedExecute ("STFUFieldCommander")
	 Goto Spawn+2
	VanJump:
	 TNT1 A 0
	 TNT1 A 0  NODELAY ACS_NamedExecuteAlways ("VanillaHeights")
	Goto Spawn+3 
	See:
	 "####" A random(1,5)
	 TNT1 A 0 A_Jump (70, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
	 TNT1 A 0 A_Jump (180, "MissileCheck")
	SeeLoop:
	 TNT1 A 0 A_Jump (170, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
	 TBCJ AABBCCDD 3 A_Chase 
	Loop
   MissileCheck:
	TNT1 A 0 A_JumpIfTargetInLos ("Missile", 50)
	Goto SeeLoop
  DodgeLeft:
        TNT1 A 0 A_FaceTarget
	    TBCJ AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (120, "MissileCheck")
		TNT1 A 0 A_Jump (50, "DodgeRight")
		Goto SeeLoop+2
	DodgeLeftF:
	    TNT1 A 0 A_FaceTarget
	    TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil (random (-8,-3))
	    TBCJ AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (120, "MissileCheck")
		Goto SeeLoop+2
    DodgeLeftB:
	    TNT1 A 0 A_FaceTarget
	    TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil (random (3,8))
	    TBCJ AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (120, "MissileCheck")
		Goto SeeLoop+2
	DodgeRight:
	    TNT1 A 0 A_FaceTarget
	    TBCJ AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (100, "MissileCheck")
		Goto SeeLoop+2
	DodgeRightF:
	    TNT1 A 0 A_FaceTarget
	    TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil ( random (-8,-3)) 
	    TBCJ AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (100, "MissileCheck")
		Goto SeeLoop+2
	DodgeRightB:
	    TNT1 A 0 A_FaceTarget
	    TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil ( random (3,8)) 
	    TBCJ AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (100, "MissileCheck")
		Goto SeeLoop+2			
	Missile:
	    TBCJ E 17 A_FaceTarget
		TNT1 A 0 A_JumpIfTargetInLos ("LongRange", 0, JLOSF_CLOSENOJUMP | JLOSF_DEADNOJUMP, 0, 1000)
		TNT1 A 0 A_JumpIfTargetInLos ("CQ", 0, JLOSF_DEADNOJUMP, 500)
	MissileMid:	
		TBCJ E 3 A_FaceTarget
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-4,4), CMF_OFFSETPITCH, random (0, 4))
		TBCJ E 1 A_FaceTarget
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-6,6), CMF_OFFSETPITCH, random (0, 4))
		TBCJ E 1 A_FaceTarget
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 32, 11, random (-6,6), CMF_OFFSETPITCH, random (0, 4))
		TBCJ E 1 A_FaceTarget
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-7,7), CMF_OFFSETPITCH, random (-3, 4))
		TBCJ E 1 A_FaceTarget
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-8,8), CMF_OFFSETPITCH, random (-3, 4))
		TBCJ E 1 A_FaceTarget
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 32, 11, random (-9,9), CMF_OFFSETPITCH, random (-3, 4))
	   Goto SeeLoop	
	CQ:	
		TNT1 A 0 A_Jump (175, "CloseRight")
		TNT1 A 0 A_SetAngle (angle-45)
		TBCJ E 10
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-15,-9), CMF_OFFSETPITCH, random (0, 4))
		TBCJ E 3
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-15,-9), CMF_OFFSETPITCH, random (0, 4))
		TBCJ E 3
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-15,-9), CMF_OFFSETPITCH, random (0, 4))
		
		TBCJ E 3 A_FaceTarget
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-5,5), CMF_OFFSETPITCH, random (0, 4))
		TBCJ E 3 A_FaceTarget
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-5,5), CMF_OFFSETPITCH, random (0, 4))
		TBCJ E 3 A_FaceTarget
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 32, 11, random (-5,5), CMF_OFFSETPITCH, random (0, 4))
		
		TNT1 A 0 A_SetAngle (angle+45)
		TBCJ E 10
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (9,15), CMF_OFFSETPITCH, random (0, 4))
		TBCJ E 3
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (9,15), CMF_OFFSETPITCH, random (0, 4))
		TBCJ E 3
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (9,15), CMF_OFFSETPITCH, random (0, 4))
		TBCJ E 3
	   Goto SeeLoop
	 CloseRight:
		TNT1 A 0 A_SetAngle (angle+45)
		TBCJ E 10
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (9,15), CMF_OFFSETPITCH, random (0, 4))
		TBCJ E 3
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (9,15), CMF_OFFSETPITCH, random (0, 4))
		TBCJ E 3
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (9,15), CMF_OFFSETPITCH, random (0, 4))
		
		TBCJ E 3 A_FaceTarget
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-5,5), CMF_OFFSETPITCH, random (0, 4))
		TBCJ E 3 A_FaceTarget
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-5,5), CMF_OFFSETPITCH, random (0, 4))
		TBCJ E 3 A_FaceTarget
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-5,5), CMF_OFFSETPITCH, random (0, 4))
		
		TNT1 A 0 A_SetAngle (angle-45)
		TBCJ E 10
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-15,-9), CMF_OFFSETPITCH, random (0, 4))
		TBCJ E 3
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-15,-9), CMF_OFFSETPITCH, random (0, 4))
		TBCJ E 3
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-15,-9), CMF_OFFSETPITCH, random (0, 4))
		TBCJ E 3
	   Goto SeeLoop
	 LongRange:
	    TBCJ E 10 A_FaceTarget
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-3,3), CMF_OFFSETPITCH, random (0, 2))
		TBCJ E 3 A_FaceTarget
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-3,3), CMF_OFFSETPITCH, random (0, 2))
		TBCJ E 3 A_FaceTarget
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-3,3), CMF_OFFSETPITCH, random (0, 2))
		TBCJ E 20 A_FaceTarget 
	    TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-3,3), CMF_OFFSETPITCH, random (0, 2))
		TBCJ E 3 A_FaceTarget
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-3,3), CMF_OFFSETPITCH, random (0, 2))
		TBCJ E 3 A_FaceTarget
		TNT1 A 0 A_PlaySound ("Erifle/Fir")
		TBCJ F 4 BRIGHT A_CustomMissile ("HFEErifleTracer", 30, 11, random (-3,3), CMF_OFFSETPITCH, random (0, 2))
	   Goto SeeLoop	
 Pain:
	TBCJ H 3
	TBCJ H 3 A_Pain
	Goto SeeLoop
 Death:
	TBCJ I 2
	TBCJ J 3 A_Scream
	TBCJ K 5 A_NoBlocking
	TBCJ L 5
	TBCJ M 5 A_Playsound ("FallingBodyGear", CHAN_BODY)
	TBCJ N -1
	Stop
  XDeath:
    TNT1 A 0
    TNT1 A 0 A_SpawnItemEx ("VgavnonahCore", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
    PGIB A 5
    PGIB B 5 A_XScream
    PGIB C 5 A_NoBlocking
    PGIB D 3
    PGIB E -1
    Stop
Raise:
    TNT1 A 0 
	TNT1 A 0 A_SpawnItemEx ("NanoResEffect", 0, 0, 15, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
	TBCJ NMLKJI 5
   Goto See	
    }
}	



		
	


		