Actor PistolMollyBandit : GenericHumanScum  
{

   //----------------------------COMPLEX DOOM COMPATIBILITY DROPS------------------------

DropItem "HealthFlask" 40
DropItem "ArmorCharge" 40
DropItem "AmmoPack" 20
DropItem "HandGrenadeAmmo" 50 1
DropItem "MineAmmo" 25 1
 
Health 35
Monster
Radius 20
Height 56
Speed 10
PainChance 200
Monster
Species "Z"
+DOHARMSPECIES
seesound "Band/Alert"
attacksound "weapons/pistol"
painsound "Band/Pain"
deathsound "Band/Death"
activesound "Band/Active"
Tag "Pistol Hoodie Bandit"
Translation "112:127=240:247", "192:207=5:8"
scale 1.0
Obituary "%o was killed by the hoodie bandit."
//+DROPOFF
DropItem "Clip"
  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 ("BydloWRITER", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION, 69)
  Spawn2:	
	EZ3A T 10 A_Look
	loop
   STFU:
     TNT1 A 0
	 TNT1 A 0 ACS_NamedExecute ("STFUBand")
	 Goto Spawn+2
   VanJump:
	 TNT1 A 0
	 TNT1 A 0  NODELAY ACS_NamedExecuteAlways ("VanillaHeights")
	Goto Spawn+3	 
	See:
	 "####" A random(1,6)
	 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")
	 EZ3A AABB 4 A_Chase
	 EZ3A CCDD 4 A_Chase  
	Loop
   MissileCheck:
	TNT1 A 0 A_JumpIfInventory ("GrenadeCoolDown", 1, 2)
	TNT1 A 0 A_Jump (45, "MollyCheck")
	TNT1 A 0 A_JumpIfTargetInLos ("Missile")
	Goto SeeLoop	
  CheckReload:
    TNT1 A 0 A_Jump (150, "CheckReload2")
 	Goto SeeLoop+1
  CheckReload2:
    TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
	Goto SeeLoop+1
  DodgeLeft:
        TNT1 A 0 A_FaceTarget
	    EZ3A 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))
	    EZ3A 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))
	    EZ3A 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
	    EZ3A 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)) 
	    EZ3A 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)) 
	    EZ3A AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (100, "MissileCheck")
		Goto SeeLoop+2			
 Missile:
    TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
	TNT1 A 0 A_TakeInventory ("GrenadeCooldown", 1)
	EZ3A EF 8 A_FaceTarget
	TNT1 A 0 A_JumpIfTargetInLos ("RapidFireCheck", 0, JLOSF_DEADNOJUMP, 420)
	TNT1 A 0 A_JumpIfTargetInLOS ("Accuracy", 0, JLOSF_CLOSENOJUMP | JLOSF_DEADNOJUMP, 0, 1400)
	TNT1 A 0 A_PlaySound ("BYPFR")
	TNT1 A 0 A_PlaySound ("BYPFRF", 6, 0.5, 0)
	EZ3A G 5 BRIGHT A_CustomMissile ("LightPistolTracer",45,0)
	TNT1 A 0 A_GiveInventory ("PistolShotCounter", 1)
	EZ3A F 6 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
	TNT1 A 0 A_PlaySound ("BYPFR")
	TNT1 A 0 A_PlaySound ("BYPFRF", 6, 0.5, 0)
	EZ3A G 5 BRIGHT A_CustomMissile ("LightPistolTracer",45,0,random (-2,1))
	TNT1 A 0 A_GiveInventory ("PistolShotCounter", 1)
	EZ3A F 6 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
	TNT1 A 0 A_PlaySound ("BYPFR")
	TNT1 A 0 A_PlaySound ("BYPFRF", 6, 0.5, 0)
	EZ3A G 5 BRIGHT A_CustomMissile ("LightPistolTracer",45,0,random (-2,1))
	TNT1 A 0 A_GiveInventory ("PistolShotCounter", 1)
	goto SeeLoop
 RapidFire:
    TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
	TNT1 A 0 A_PlaySound ("BYPFR")
	TNT1 A 0 A_PlaySound ("BYPFRF", 6, 0.5, 0)
    EZ3A G 2 Bright A_CustomMissile ("LightPistolTracer",45)
	TNT1 A 0 A_GiveInventory ("PistolShotCounter", 1)
	EZ3A F 5 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
	TNT1 A 0 A_PlaySound ("BYPFR")
	TNT1 A 0 A_PlaySound ("BYPFRF", 6, 0.5, 0)
	EZ3A G 2 Bright A_CustomMissile ("LightPistolTracer",45,0,random (-1,0))
	TNT1 A 0 A_GiveInventory ("PistolShotCounter", 1)
	EZ3A F 5 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
	TNT1 A 0 A_PlaySound ("BYPFR")
	TNT1 A 0 A_PlaySound ("BYPFRF", 6, 0.5, 0)
	EZ3A G 2 Bright A_CustomMissile ("LightPistolTracer",45,0,random (-1,1))
	TNT1 A 0 A_GiveInventory ("PistolShotCounter", 1)
	EZ3A F 5 A_FaceTarget
	TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
	TNT1 A 0 A_PlaySound ("BYPFR")
	TNT1 A 0 A_PlaySound ("BYPFRF", 6, 0.5, 0)
	EZ3A G 2 Bright A_CustomMissile ("LightPistolTracer",45,0,random (-1,3))
	TNT1 A 0 A_GiveInventory ("PistolShotCounter", 1)
	Goto SeeLoop
 Accuracy:
    TNT1 A 0 A_JumpIfInventory ("PistolShotCounter", 11, "Reload")
    EZ3A EF 12
	TNT1 A 0 A_PlaySound ("BYPFR")
	TNT1 A 0 A_PlaySound ("BYPFRF", 6, 0.5, 0)
	EZ3A G 3 Bright A_CustomMissile ("LightPistolTracer",45)
	TNT1 A 0 A_GiveInventory ("PistolShotCounter", 1)
	Goto SeeLoop
 MollyCheck:
	TNT1 A 0 A_JumpIfTargetInLos ("Molly", 0, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 700, 325)
 Goto MissileCheck
 Molly:
	TNT1 A 0 	 
	EZ3A F 4 Bright 
	EZ3A E 1 Bright A_CustomMissile ("Molotow1", 42, 0, random (-6,6), CMF_OFFSETPITCH, random (8, 12))
	TNT1 A 0 A_GiveInventory ("GrenadeCoolDown", 1)	
 Goto SeeLoop		
 Reload:
    EZ3A F 10
	TNT1 A 0 A_PlaySound ("LPISOUT")
	TNT1 A 0 A_TakeInventory ("PistolShotCounter", 11)
	EZ3A E 17
	TNT1 A 0 A_PlaySound ("LPISIN")
	EZ3A F 30
	TNT1 A 0 A_PlaySound ("LPISREAD")
	TNT1 A 0 A_JumpIfCloser (350, "RapidFireCheck")
	Goto SeeLoop
 RapidFireCheck:
    TNT1 A 0 A_JumpIfTargetInLos ("RapidFire")
	Goto SeeLoop
 MissileCheck2:
    TNT1 A 0 A_JumpIfTargetInLos ("Missile")
	Goto SeeLoop
 Pain:
	EZ3A H 3
	EZ3A H 3 A_Pain
	Goto SeeLoop
 Death:
	EZ3A I 5 A_Scream
	EZ3A J 5 A_NoBlocking
	EZ3A K 5
	EZ3A L 5 A_Playsound ("FallingBodyLight", CHAN_BODY)
	EZ3A M -1
	Stop
  Raise:
    TNT1 A 0 
    TNT1 A 0 A_SpawnItemEx ("NanoResEffect", 0, 0, 15, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
	EZ3A MLKJI 5
   Goto See 	 
  XDeath:
    TNT1 A 0
    TNT1 A 0 A_SpawnItemEx ("VgavnonahCore", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
    EZ3A U 5
    EZ3A V 5 A_XScream
    PGIB A 5 A_NoBlocking
    PGIB BCD 5
    PGIB E -1
    Stop	
    }
}	


	Actor PistolMollyBanditSpawner : RandomSpawner 
		{
		 DropItem PistolMollyBandit
		 DropItem PistolMollyBanditGreyNavy
		 DropItem PistolMollyBanditBrownBlack
		}


	Actor PistolMollyBanditGreyNavy : PistolMollyBandit
		{
		 Translation "112:127=96:111", "192:207=240:247"
		}

	Actor PistolMollyBanditBrownBlack : PistolMollyBandit
		{
		 Translation "112:127=64:79", "192:207=5:8"
		}

	

	