actor SMGUSNMilitarist : GenericHumanScum 
{
  scale 1.0
  obituary "%o was used as the shooting range dummy by the USN militarist with SMG"
  health 50
  radius 15
  height 54
  mass 100
  speed 11
  Species "IMP"
+DONTHARMSPECIES
  painchance 200
  SeeSound "USNMilitarist1/See"
  PainSound "USNMilitarist2/pain"
  DeathSound "Manhunt/Death"
  ActiveSound "USNMilitarist1/Active"
  Translation "112:127=96:111", "192:207=91:111"
  Tag "UZI nine millimeter USN Militarist"
  //+DROPOFF
  MONSTER
  +FLOORCLIP
  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:
    USMU T 10 A_Look
    loop
  STFU:
     TNT1 A 0
	 TNT1 A 0 ACS_NamedExecute ("STFUUSNMilitarist1")
	 Goto Spawn+2
  VanJump:
	 TNT1 A 0
	 TNT1 A 0  NODELAY ACS_NamedExecuteAlways ("VanillaHeights")
	Goto Spawn+3	 
  See:
     "####" A random(1,4)
	 TNT1 A 0 A_Jump (70, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
	 TNT1 A 0 A_Jump (180, "MissileCheck")
  SeeLoop:
	TNT1 A 0 A_CheckSight ("CheckReload")
	TNT1 A 0 A_Jump (170, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
	TNT1 A 0 A_JumpIfInventory ("SMGShotCounter", 30, "Reload")
    USMU AABBCCDD 3 A_Chase
    loop
    CheckReload:
    TNT1 A 0 A_Jump (250, "CheckReload2")
 	Goto SeeLoop+1
  CheckReload2:
    TNT1 A 0 A_JumpIfInventory ("SMGShotCounter", 30, "Reload")
	Goto SeeLoop+1
  DodgeLeft:
        TNT1 A 0 A_FaceTarget
	    USMU 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+1
	DodgeLeftF:
	    TNT1 A 0 A_FaceTarget
	    TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil (random (-8,-3))
	    USMU AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (120, "MissileCheck")
		Goto SeeLoop+1
    DodgeLeftB:
	    TNT1 A 0 A_FaceTarget
	    TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil (random (3,8))
	    USMU AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (120, "MissileCheck")
		Goto SeeLoop+1
	DodgeRight:
	    TNT1 A 0 A_FaceTarget
	    USMU AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (100, "MissileCheck")
		Goto SeeLoop+1
	DodgeRightF:
	    TNT1 A 0 A_FaceTarget
	    TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil ( random (-8,-3)) 
	    USMU AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (100, "MissileCheck")
		Goto SeeLoop+1
	DodgeRightB:
	    TNT1 A 0 A_FaceTarget
	    TNT1 A 0 ThrustThingZ (0, 15, 0, 0)
	    TNT1 A 0 A_Recoil ( random (3,8)) 
	    USMU AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (100, "MissileCheck")
		Goto SeeLoop+1
  RetreatStop:
	    TNT1 A 0
		TNT1 A 0 A_Changeflag ("FRIGHTENED", false)
		TNT1 A 0 A_CheckSight ("AlphaBravo")
	   Goto SeeLoop+1
	 ShortRetreat:
	    TNT1 A 0 A_TakeInventory ("ShotCounter", 10)
	    TNT1 A 0 A_ChangeFlag ("FRIGHTENED", true)
	    USMU AABBCCDDAABBCCDDAABBCCDD 2 A_Chase ("", "")
	   Goto RetreatStop	
  AlphaBravo:
    TNT1 A 0 A_JumpIfInventory ("SMGShotCounter", 30, "ABReload")
    USMU F 4 A_FaceTarget
	TNT1 A 0 A_Chase ("", "MissileAmbush", CHF_DONTMOVE)
	USMU F 4 A_FaceTarget
	TNT1 A 0 A_Chase ("", "MissileAmbush", CHF_DONTMOVE)
	USMU F 4 A_FaceTarget
	TNT1 A 0 A_Chase ("", "MissileAmbush", CHF_DONTMOVE)
	TNT1 A 0 A_Jump (1, "SeeLoop")
   Loop
  MissileAmbush:
    USMU FF 4 A_FaceTarget
	TNT1 A 0 A_JumpIfTargetInLos ("LongRange", 0, JLOSF_CLOSENOJUMP | JLOSF_DEADNOJUMP, 0, 1000)
	TNT1 A 0 A_JumpIfTargetInLos ("CloseQuarters", 0, JLOSF_DEADNOJUMP, 500)
  MissileCheck:
	TNT1 A 0 A_JumpIfTargetInLos ("Missile", 0, JLOSF_DEADNOJUMP)
	Goto SeeLoop	
  Missile:
    TNT1 A 0 A_JumpIfInventory ("SMGShotCounter", 30, "Reload")
	TNT1 A 0 A_JumpIfTargetInLos ("CloseQuarters", 0, JLOSF_DEADNOJUMP, 500)
	TNT1 A 0 A_JumpIfTargetInLos ("LongRange", 0, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 0, 1000)
    USMU EF 6 A_FaceTarget
  MissileMid:
    USMU F 1 A_FaceTarget
	TNT1 A 0 A_PlaySound ("UZIF")
	TNT1 A 0 A_PlaySound ("SMGFF", 6, 0.5, 0)
	TNT1 A 0 A_CustomMissile ("SMGTracer",44,-1,random (-2,2))
	USMU G 1 BRIGHT A_FaceTarget
	TNT1 A 0 A_GiveInventory ("SMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("SMGShotCounter", 30, "Reload")
	TNT1 A 0 A_GiveInventory ("ShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("ShotCounter", 10, "ShortRetreat")
	TNT1 A 0 A_MonsterRefire (4, "AlphaBravo")
   Loop
  CloseQuarters:
    USMU F 1 A_FaceTarget
	TNT1 A 0 A_PlaySound ("UZIF")
	TNT1 A 0 A_PlaySound ("SMGFF", 6, 0.5, 0)
	TNT1 A 0 A_CustomMissile ("SMGTracer",44,-1,random (-3,3))
	USMU G 1 BRIGHT A_FaceTarget
	TNT1 A 0 A_GiveInventory ("SMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("SMGShotCounter", 30, "Reload")
    TNT1 A 0 A_MonsterRefire (4, "ShortRetreat")
	Loop
  LongRange:
    USMU F 8 A_FaceTarget
	TNT1 A 0 A_PlaySound ("UZIF")
	TNT1 A 0 A_PlaySound ("SMGFF", 6, 0.5, 0)
	TNT1 A 0 A_CustomMissile ("SMGTracer",44,-1)
	USMU G 1 BRIGHT A_FaceTarget
	TNT1 A 0 A_GiveInventory ("SMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("SMGShotCounter", 30, "Reload")
    TNT1 A 0 A_MonsterRefire (4, "AlphaBravo")
	USMU F 1 A_FaceTarget
	TNT1 A 0 A_PlaySound ("UZIF")
	TNT1 A 0 A_PlaySound ("SMGFF", 6, 0.5, 0)
	TNT1 A 0 A_CustomMissile ("SMGTracer",44,-1, random (-1,1))
	USMU G 1 BRIGHT A_FaceTarget
	TNT1 A 0 A_GiveInventory ("SMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("SMGShotCounter", 30, "Reload")
    TNT1 A 0 A_MonsterRefire (4, "AlphaBravo")
	USMU F 1 A_FaceTarget
	TNT1 A 0 A_PlaySound ("UZIF")
	TNT1 A 0 A_PlaySound ("SMGFF", 6, 0.5, 0)
	TNT1 A 0 A_CustomMissile ("SMGTracer",44,-1, random (-1,1))
	USMU G 1 BRIGHT A_FaceTarget
	TNT1 A 0 A_GiveInventory ("SMGShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("SMGShotCounter", 30, "Reload")
    TNT1 A 0 A_MonsterRefire (4, "AlphaBravo")
   Goto ShortRetreat	
  Reload:
    TNT1 A 0 A_TakeInventory ("ShotCounter", 10)
    USMU F 16 A_PlaySound ("SMGOUT")
	TNT1 A 0 A_TakeInventory ("SMGShotCounter", 30)
	USMU E 42 A_PlaySound ("SMGIN")
	USMU F 10 A_PlaySound ("SMGCOCK")	
	Goto SeeLoop
  Retreating:
    TNT1 A 0 A_ChangeFlag ("FRIGHTENED", true) 
    USMU ABCDABCDABCDABCDABCDABCDABCDABCD 2 A_Chase
	TNT1 A 0 A_CheckSight ("ReloadReady")	
 ReloadReady:
    TNT1 A 0 A_ChangeFlag ("FRIGHTENED", false)
	Goto ReloadBrave
 ABReload:
    TNT1 A 0 A_TakeInventory ("ShotCounter", 10)
    USMU F 16 A_PlaySound ("SMGOUT")
	TNT1 A 0 A_TakeInventory ("SMGShotCounter", 30)
	USMU E 42 A_PlaySound ("SMGIN")
	USMU F 10 A_PlaySound ("SMGCOCK")
	TNT1 A 0 A_JumpIfTargetInLos ("Missile", 0, JLOSF_DEADNOJUMP)
	Goto AlphaBravo+1	
  Pain:
    TNT1 A 0 A_Changeflag ("FRIGHTENED", false)
    USMU H 3 
    USMU H 3 A_Pain
    goto SeeLoop
  Death:
    USMU I 5 A_Scream
    USMU J 5
    USMU K 5 A_NoBlocking
    USMU L 5 A_Playsound ("FallingBodyLight", CHAN_BODY)
    USMU M -1
    stop
  XDeath:
    TNT1 A 0
    TNT1 A 0 A_SpawnItemEx ("VgavnonahCore", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
    PGIB A 5 A_XScream
    PGIB B 5 
    PGIB C 5 A_NoBlocking
    PGIB D 5
    PGIB E -1
    Stop
  Raise:
    TNT1 A 0 
    TNT1 A 0 A_SpawnItemEx ("NanoResEffect", 0, 0, 15, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
	USMU MLKJI 5
   Goto See	
  Idle:
    USMU AA 4 A_Wander
    USMU A 0 A_Look
    USMU BB 4 A_Wander
    USMU A 0 A_Look
    USMU CC 4 A_Wander
    USMU A 0 A_Look
    USMU DD 4 A_Wander
    USMU A 0 A_Look
    loop
  }
}





	ACTOR SMGUSNMilitaristSpawner : RandomSpawner 
		{
		 DropItem SMGUSNMilitarist
		 DropItem SMGUSNMilitaristHakiGrey
		 DropItem SMGUSNMilitaristGreyBlack
		 DropItem SMGUSNMilitaristHakiBrown
		 DropItem SMGUSNMilitaristHakiSwamp
		 DropItem SMGUSNMilitaristBlackGreen
		}

actor SMGUSNMilitaristHakiGrey : SMGUSNMilitarist  
{
Translation "112:127=152:159", "192:207=96:111" 
}


actor SMGUSNMilitaristGreyBlack : SMGUSNMilitarist  
{
Translation "112:127=96:111", "192:207=4:8" 
}



actor SMGUSNMilitaristHakiBrown : SMGUSNMilitarist  
{
Translation "112:127=152:159", "192:207=128:143" 
}


actor SMGUSNMilitaristHakiSwamp : SMGUSNMilitarist  
{
Translation "112:127=152:159", "192:207=7:12" 
}


actor SMGUSNMilitaristBlackGreen : SMGUSNMilitarist  
{
Translation "112:127=4:8", "192:207=122:127" 
}



