actor FreakKorpsAkimboPistols : GenericHumanScum 
{
  scale 1.0
  obituary "%o met the Freak Korps Akimbo Pistols Soldier"
  health 50
  radius 15
  height 54
  Species "Imp"
  +DONTHARMSPECIES
  mass 100
  speed 9
  Damage 1
  Translation "112:127=96:111"
  painchance 180
  SeeSound "ReichLover/see"
  PainSound "ReichLover/pain"
  DeathSound "ReichLover/Death"
  ActiveSound "Reichlover/active" 
  dropitem "Clip", 2
  Tag "Freak Korps Akimbo Pistols"
  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.08, 0.08), scaleY+frandom(-0.08,0.08)) 
	TNT1 A 0 A_SpawnItemEx ("HumanTrails", 0, 0, 0)
	TNT1 A 0 A_SpawnItemEx ("SiegWRITER", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 69)
  Spawn2:
    NA2P A 10 A_Look
    loop
  STFU:
     TNT1 A 0
	 TNT1 A 0 ACS_NamedExecute ("STFUReichLover")
	 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 (30, "MissileCheck")
    NA2P EF 10
SeeLoop:
    //TNT1 A 0 A_JumpIfCloser (450, "CheckDodge")
	TNT1 A 0 A_Jump (100, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
    NA2P AABBCCDD 3 A_Chase
	TNT1 A 0 A_CheckSight ("CheckReload")
    loop
CheckReload:
    TNT1 A 0 A_Jump (50, "CheckReload2")
 	Goto SeeLoop
CheckReload2:
    TNT1 A 0 A_JumpIfInventory ("LightPistolShotCounter", 14, "Reload")
	Goto SeeLoop
CheckDodge:
    TNT1 A 0 A_Jump (221, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
	Goto SeeLoop+1
    DodgeLeft:
	    TNT1 A 0 A_FaceTarget
	    NA2P AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (20, "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))
	    NA2P AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (20, "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))
	    NA2P AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (20, "MissileCheck")
		Goto SeeLoop+1
	DodgeRight:
	    TNT1 A 0 A_FaceTarget
	    NA2P 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)) 
	    NA2P 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)) 
	    NA2P AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (100, "MissileCheck")
		Goto SeeLoop+1
  MissileCheck:
    TNT1 A 0 A_JumpIfTargetInLos ("Missile")
    Goto SeeLoop+1
  Missile:
    TNT1 A 0 A_JumpIfInventory ("LightPistolShotCounter", 14, "Reload")
    NA2P EF 10 A_FaceTarget
	TNT1 A 0 A_JumpIfTargetInLos ("Accurate", 5, JLOSF_CLOSENOJUMP | JLOSF_DEADNOJUMP, 0, 1000)
	TNT1 A 0 A_JumpIfTargetInLos ("TriShot", 0, JLOSF_CLOSENOJUMP | JLOSF_DEADNOJUMP, 999, 600) 
	TNT1 A 0 A_Playsound ("HPISTOL")
	TNT1 A 0 A_PlaySound ("BPFIRF", 6, 0.5, 0)
	NA2P G 6 BRIGHT A_CustomMissile ("HeavyPistolTracer",45,9,random (-3,1))
	TNT1 A 0 A_GiveInventory ("LightPistolShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("LightPistolShotCounter", 14, "Reload")
	NA2P F 8 A_FaceTarget
	TNT1 A 0 A_Playsound ("HPISTOL")
	TNT1 A 0 A_PlaySound ("BPFIRF", 6, 0.5, 0)
    NA2P H 6 BRIGHT A_CustomMissile ("HeavyPistolTracer",45,-9,random (-1,3))
	TNT1 A 0 A_GiveInventory ("LightPistolShotCounter", 1)
    Goto SeeLoop+1
   TriShot:
	NA2P F 8 A_FaceTarget 
	TNT1 A 0 A_Playsound ("HPISTOL")
	TNT1 A 0 A_PlaySound ("BPFIRF", 6, 0.5, 0)
	NA2P G 6 BRIGHT A_CustomMissile ("HeavyPistolTracer",45,9,random (-3,1))
	TNT1 A 0 A_GiveInventory ("LightPistolShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("LightPistolShotCounter", 14, "Reload")
	NA2P F 8 A_FaceTarget
	TNT1 A 0 A_Playsound ("HPISTOL")
	TNT1 A 0 A_PlaySound ("BPFIRF", 6, 0.5, 0)
    NA2P H 6 BRIGHT A_CustomMissile ("HeavyPistolTracer",45,-9,random (-1,3))
	TNT1 A 0 A_GiveInventory ("LightPistolShotCounter", 1)
	NA2P F 10 A_FaceTarget 
	TNT1 A 0 A_Playsound ("HPISTOL")
	TNT1 A 0 A_PlaySound ("BPFIRF", 6, 0.5, 0)
	NA2P G 6 BRIGHT A_CustomMissile ("HeavyPistolTracer",45,9,random (-4,4))
	TNT1 A 0 A_GiveInventory ("LightPistolShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("LightPistolShotCounter", 14, "Reload")
	NA2P F 8 A_FaceTarget
	TNT1 A 0 A_Playsound ("HPISTOL")
	TNT1 A 0 A_PlaySound ("BPFIRF", 6, 0.5, 0)
    NA2P H 6 BRIGHT A_CustomMissile ("HeavyPistolTracer",45,-9,random (-4,4))
	TNT1 A 0 A_GiveInventory ("LightPistolShotCounter", 1)
	NA2P F 8 A_FaceTarget 
	TNT1 A 0 A_Playsound ("HPISTOL")
	TNT1 A 0 A_PlaySound ("BPFIRF", 6, 0.5, 0)
	NA2P G 6 BRIGHT A_CustomMissile ("HeavyPistolTracer",45,9,random (-5,5))
	TNT1 A 0 A_GiveInventory ("LightPistolShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("LightPistolShotCounter", 14, "Reload")
	NA2P F 8 A_FaceTarget
	TNT1 A 0 A_Playsound ("HPISTOL")
	TNT1 A 0 A_PlaySound ("BPFIRF", 6, 0.5, 0)
    NA2P H 6 BRIGHT A_CustomMissile ("HeavyPistolTracer",45,-9,random (-5,5))
	TNT1 A 0 A_GiveInventory ("LightPistolShotCounter", 1)
   Goto SeeLoop+1
   Accurate:
    TNT1 A 0 
	TNT1 A 0 A_JumpIfInventory ("LightPistolShotCounter", 14, "Reload")
    NA2P F 10 A_FaceTarget
	TNT1 A 0 A_Playsound ("HPISTOL")
	TNT1 A 0 A_PlaySound ("BPFIRF", 6, 0.5, 0)
	NA2P G 6 BRIGHT A_CustomMissile ("HeavyPistolTracer",45,9,random (-3,1))
	TNT1 A 0 A_GiveInventory ("LightPistolShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("LightPistolShotCounter", 14, "Reload")
	NA2P F 10 A_FaceTarget
	TNT1 A 0 A_Playsound ("HPISTOL")
	TNT1 A 0 A_PlaySound ("BPFIRF", 6, 0.5, 0)
    NA2P H 6 BRIGHT A_CustomMissile ("HeavyPistolTracer",45,-9,random (-1,3))
	TNT1 A 0 A_GiveInventory ("LightPistolShotCounter", 1)
	NA2P F 3 A_MonsterRefire (40, "SeeLoop")
	Loop
  Reload:
    NA2P F 12 A_PlaySound ("HPISOUT")
	TNT1 A 0 A_TakeInventory ("LightPistolShotCounter", 14)
	NA2P D 14 A_PlaySound ("HPISOUT")
	NA2P E 25 A_PlaySound ("HPISIN")
	NA2P F 22 A_PlaySound ("HPISIN")
	Goto SeeLoop
  Pain:
    NA2P I 3
    NA2P I 3 A_Pain
    goto SeeLoop
  Death:
	//TNT1 A 0 A_Jump(40, "Suren")
    NA2P P 5 A_NoBlocking
    NA2P Q 5 A_Scream
    NA2P R 4
	NA2P S 5 A_Playsound ("FallingBodyLight", CHAN_BODY) 
    NA2P V -1
    stop
  XDeath:
    TNT1 A 0 A_SpawnItemEx ("VgavnonahCore", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
    PGIB A 3 A_XScream
    PGIB B 3 A_NoBlocking
    PGIB CD 3
    PGIB E -1
    Stop
  Raise:
    TNT1 A 0 
	TNT1 A 0 A_SpawnItemEx ("NanoResEffect", 0, 0, 15, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
	NA2P VSRQP 5
   Goto See	
  Idle:
    NA2P AA 4 A_Wander
    NA2P A 0 A_Look
    NA2P BB 4 A_Wander
    NA2P A 0 A_Look
    NA2P CC 4 A_Wander
    NA2P A 0 A_Look
    NA2P DD 4 A_Wander
    NA2P A 0 A_Look
    loop
  }
}


	
	Actor HeavyPistolTracer 
{
Projectile
Damage (8) 
+FORCEXYBILLBOARD
+DONTSPLASH
+BLOODSPLATTER 
+NOEXTREMEDEATH
radius 2
height 2
speed 20
renderstyle Add
alpha 0.9
scale .15
 States
     {
	  Spawn:
	    TRAC A 1 Bright A_PlaySound ("Bullet/Fly", 0, 1.0, true)
		Loop
	  Death:
	    TNT1 A 0 A_Playsound ("Bullet/Impact")
		TNT1 A 0 A_Jump (100, "D2")
		FX57 CDEFGHI 1 BRIGHT
		Stop
	  D2:
	    FX58 CDEFGHI 1 BRIGHT
		Stop
      XDeath:
		TNT1 A 1
		Stop
	 }
}

