   Actor SmokerMinigunner : GenericHumanScum 
       {
	   
  //----------------------------COMPLEX DOOM COMPATIBILITY DROPS------------------------
  
  DropItem "Stimkit" 60
DropItem "ArmorCharge" 60
DropItem "AmmoPack" 40
DropItem "HandGrenadeAmmo" 100 1
DropItem "Minigun" 35
DropItem "MineAmmo" 50 1	   
	   
  scale 1.0
  obituary "%o got smoked by the Smoker Minigunner"
  health 277
  radius 15
  height 54
  mass 400
  speed 10
    Species "Arac"
  +DONTHARMSPECIES 
  painchance 145
  SeeSound "SmokerMG/See"
  PainSound "SmokerMG/pain"
  DeathSound "SmokerMG/Death"
  ActiveSound "SmokerMG/Active"
  dropitem "Chaingun"
  Tag "The Smoker minigunner"
  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:
    TNT1 A 0 A_Jump (225, 2)
	TNT1 A 0 A_SpawnItemEx ("CigaSmoke", random (12,15), 0, random (48, 53), 0, 0, 0, SXF_NOCHECKPOSITION)
    DIES A 10 A_Look
    loop
  STFU:
     TNT1 A 0
	 TNT1 A 0 ACS_NamedExecute ("STFUSmokerMG")
	 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_StopSound (1)
	TNT1 A 0 A_StopSound (7)
	TNT1 A 0 A_Jump (199, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
	TNT1 A 0 A_Jump (140, 2)
	TNT1 A 0 A_SpawnItemEx ("CigaSmoke", random (12,15), 0, random (48, 53), 0, 0, 0, SXF_NOCHECKPOSITION)
    DIES AABBCCDD 3 A_Chase 
    loop
  DodgeLeft:
        TNT1 A 0 A_FaceTarget
	    DIES AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "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))
	    DIES AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0) 
		TNT1 A 0 A_Jump (228, "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))
	    DIES AABBCCDD 2 ThrustThing(angle*256/360+192, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "MissileCheck")
		Goto SeeLoop+1
	DodgeRight:
	    TNT1 A 0 A_FaceTarget
	    DIES AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "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)) 
	    DIES AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "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)) 
	    DIES AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "MissileCheck")
		Goto SeeLoop+1
	Evade:
	    TNT1 A 0
	    TNT1 A 0 A_StopSound (1)
 	    DIES AABBCCDD 2 A_Wander
		TNT1 A 0 A_Jump (5, "MissileCheck")
		DIES AABBCCDD 2 A_Wander
		TNT1 A 0 A_Jump (5, "MissileCheck")
		DIES AABBCCDD 2 A_Wander
		TNT1 A 0 A_Jump (5, "MissileCheck")
		DIES AABBCCDD 2 A_Wander
		TNT1 A 0 A_Jump (5, "MissileCheck")
  MissileCheck:
    TNT1 A 0 A_JumpIfTargetInLos ("Missile", 0, JLOSF_DEADNOJUMP)
	Goto SeeLoop
  ReadyToFire:
    TNT1 A 0 A_StopSound (1)
    TNT1 A 0 A_JumpIfInventory ("ShotCounter", 250, "Reload")
    //TNT1 A 0 A_PlaySound("CHNGNU1A", 7, 1, 1, 1.2)
    DIES E 0 A_Chase ("", "MissileAmbush", CHF_DONTMOVE)
    DIES E 4 A_FaceTarget
    DIES E 0 A_Chase ("", "MissileAmbush", CHF_DONTMOVE)
    DIES E 4 A_FaceTarget
    TNT1 A 0 A_Jump (8, "MissileStop")
    Loop
  Missile:
	TNT1 A 0
	TNT1 A 0 A_StopSound (1)
	TNT1 A 0 A_TakeInventory ("StartShotCounter", 15)
	TNT1 A 0 A_TakeInventory ("DodgeShotCounter", 15)
	TNT1 A 0 A_TakeInventory ("LongShotCounter", 25)
 	TNT1 A 0 A_StopSound (4)
	TNT1 A 0 A_Jump (158, 2)
	TNT1 A 0 A_PlaySound ("SmokerMG/Warcry", 0, 1.0, false, 0.69)
	TNT1 A 0 A_PlaySound ("CHNGNU1A", 7)
	TNT1 A 0 A_JumpIfTargetInLos ("BackOffFire", 1, JLOSF_DEADNOJUMP, 249, 0) 
	TNT1 A 0 A_JumpIfTargetInLos ("CloseCombat", 1, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 450, 250)
	TNT1 A 0 A_JumpIfTargetInLos ("LongRange", 1, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 0, 1250)
 MissileMiddleStart:	
    DIES E 20 A_FaceTarget
	TNT1 A 0 A_Jump (75, 2)
	TNT1 A 0 A_SpawnItemEx ("CigaSmoke", random (12,15), 0, random (48, 53), 0, 0, 0, SXF_NOCHECKPOSITION)
	DIES E 12 Bright A_FaceTarget
  MissileLoop:
    TNT1 A 0 A_PlaySound ("MSTRFIRE", 1)
	TNT1 A 0 A_PlaySound ("MNGFF", 6, 0.5, 0)
	TNT1 A 0 A_CustomMissile ("GatlingTracer",31,9,random (-2,2))
	DIES F 1 BRIGHT A_FaceTarget
	TNT1 A 0 A_GiveInventory ("ShotCounter", 1)
	TNT1 A 0 A_GiveInventory ("StartShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("ShotCounter", 250, "Reload")
	TNT1 A 0 A_JumpIfInventory ("StartShotCounter", 15, "MissileLoopAlt") 
    DIES E 1 Bright A_FaceTarget
	TNT1 A 0 A_MonsterRefire (40, "SeeLoop") 
	TNT1 A 0 A_JumpIfTargetInLos ("CloseCombatLoop", 1, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 450, 250)
	TNT1 A 0 A_JumpIfTargetInLos ("LongRangeLoop", 1, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 0, 1250)
	Loop
    MissileLoopAlt:
    TNT1 A 0 A_PlaySound ("MSTRFIRE", 1)
	TNT1 A 0 A_PlaySound ("MNGFF", 6, 0.5, 0)
	TNT1 A 0 A_CustomMissile ("GatlingTracer",31,9,random (-2,2))
	DIES F 1 BRIGHT A_FaceTarget
	TNT1 A 0 A_GiveInventory ("ShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("ShotCounter", 250, "Reload")
	TNT1 A 0 A_MonsterRefire (2, "ReadyToFire")
    DIES E 1 Bright A_FaceTarget
	TNT1 A 0 A_JumpIfTargetInLos ("LongRangeLoop", 1, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 0, 1250)
	Loop
  CloseCombat:
    DIES E 24 A_FaceTarget
  CloseCombatLoop: 	
	TNT1 A 0 A_PlaySound ("MSTRFIRE", 1)
	TNT1 A 0 A_PlaySound ("MNGFF", 6, 0.5, 0)
	TNT1 A 0 A_CustomMissile ("GatlingTracer",31,9,random (-2,2))
	DIES F 1 BRIGHT A_FaceTarget
	TNT1 A 0 A_GiveInventory ("ShotCounter", 1)
	TNT1 A 0 A_GiveInventory ("DodgeShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("DodgeShotCounter", 15, "DodgeCombat") 
    DIES E 1 Bright A_FaceTarget
	TNT1 A 0 A_MonsterRefire (2, "ReadyToFire")
	TNT1 A 0 A_JumpIfTargetInLos ("LongRangeLoop", 1, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 0, 1250)
	Loop
  DodgeCombat:
    DIES E 1 A_FaceTarget
	TNT1 A 0 A_PlaySound ("MSTRFIRE", 1)
	TNT1 A 0 A_PlaySound ("MNGFF", 6, 0.5, 0)
	TNT1 A 0 A_CustomMissile ("GatlingTracer",31,9,random (-2,2))
	DIES F 1 BRIGHT A_FaceTarget
	TNT1 A 0 A_GiveInventory ("ShotCounter", 1)
	TNT1 A 0 A_JumpIfInTargetLos ("Evade", 5, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 650, 250)
	TNT1 A 0 A_MonsterRefire (2, "ReadyToFire")
	Loop	
  BackOffFire:
    TNT1 A 0 A_FaceTarget
    DIES AABBCCDD 2 A_Recoil (random (1,3))
	DIES E 15 A_FaceTarget
  BackOffFireLoop:	
	TNT1 A 0 A_PlaySound ("MSTRFIRE", 1)
	TNT1 A 0 A_PlaySound ("MNGFF", 6, 0.5, 0)
	TNT1 A 0 A_CustomMissile ("GatlingTracer",31,9,random (-2,2))
	DIES E 1 BRIGHT A_FaceTarget
	TNT1 A 0 A_GiveInventory ("ShotCounter", 1)
	TNT1 A 0 A_GiveInventory ("StartShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("ShotCounter", 250, "Reload")
	TNT1 A 0 A_JumpIfInventory ("StartShotCounter", 15, "MissileLoopAlt") 
    DIES F 1 Bright A_FaceTarget
	TNT1 A 0 A_MonsterRefire (2, "ReadyToFire")
	TNT1 A 0 A_JumpIfTargetInLos ("LongRangeLoop", 1, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 0, 1250)
	Loop
  LongRange:
    DIES E 24 A_FaceTarget
  LongRangeLoop:	
	TNT1 A 0 A_PlaySound ("MSTRFIRE", 1)
	TNT1 A 0 A_PlaySound ("MNGFF", 6, 0.5, 0)
	TNT1 A 0 A_CustomMissile ("GatlingTracer",31,9,random (-3,3))
	DIES F 1 BRIGHT A_FaceTarget
	TNT1 A 0 A_GiveInventory ("ShotCounter", 1)
	TNT1 A 0 A_GiveInventory ("LongShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("LongShotCounter", 25, "PauseReAim") 
    DIES E 1 Bright A_FaceTarget
	TNT1 A 0 A_MonsterRefire (40, "SeeLoop")
	TNT1 A 0 A_JumpIfTargetInLos ("CloseCombatLoop", 1, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 450, 250)
	TNT1 A 0 A_JumpIfTargetInLos ("MissileMiddleStart", 1, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 899, 451)
	Loop
  PauseReAim:
    TNT1 A 0 A_Jump (100, 2)
	TNT1 A 0 A_SpawnItemEx ("CigaSmoke", random (12,15), 0, random (48, 53), 0, 0, 0, SXF_NOCHECKPOSITION)
    DIES E 75 A_FaceTarget
	Goto MissileCheck
  MissileAmbush:
    DIES E 4 A_FaceTarget
    TNT1 A 0 A_Jump (256, 1,2,3)
    DIES EEEE 4 A_FaceTarget	
  MissileLoopAmbush:
    TNT1 A 0 A_PlaySound ("MSTRFIRE", 1)
	TNT1 A 0 A_PlaySound ("MNGFF", 6, 0.5, 0)
	TNT1 A 0 A_CustomMissile ("GatlingTracer",31,9,random (-2,2))
	DIES F 1 BRIGHT A_FaceTarget
	TNT1 A 0 A_GiveInventory ("ShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("ShotCounter", 250, "Reload")
	TNT1 A 0 A_MonsterRefire (40, "SeeLoop")
    DIES E 1 Bright A_FaceTarget
	Loop	
  MissileStop:
	TNT1 A 0
	TNT1 A 0 A_StopSound (7)
	TNT1 A 0 
	DIES E 8 A_Playsound ("CHNGND1A")
	Goto Seeloop
  Reload:
	TNT1 A 0 A_StopSound (7)
	DIES A 14 
	TNT1 A 0 A_Playsound ("CHNGND1A")
    DIES D 35 A_Playsound ("M60Open") 
	DIES C 20 A_Playsound ("M60Load")
	TNT1 A 0 A_TakeInventory ("ShotCounter", 250)
	DIES B 17 A_Playsound ("M60Clos")
	Goto SeeLoop+1
  Pain:
	TNT1 A 0
	TNT1 A 0 A_StopSound (7)
	TNT1 A 0 A_StopSound (1)
    DIES G 3
    DIES G 3 A_Pain
    goto SeeLoop+1
  Death:
  	//TNT1 A 0 A_Jump(20, "Suren")
	TNT1 A 0 A_StopSound (7)
	TNT1 A 0 A_StopSound (1)
    DIES H 6 A_Scream
    DIES I 6
    DIES J 6 A_NoBlocking
    DIES KL 3
	DIES M 3 A_Playsound ("FallingBodyGear", CHAN_BODY)
    DIES N -1
    stop
  XDeath:
    TNT1 A 0
	TNT1 A 0 A_StopSound (7)
	TNT1 A 0 A_StopSound (1)
    TNT1 A 0 A_SpawnItemEx ("VgavnonahCore", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
    PGIB A 1 A_XScream
    PGIB A 5 A_NoBlocking
    PGIB BCD 5
    PGIB E -1
    Stop
   Raise:
    TNT1 A 0 
	TNT1 A 0 A_SpawnItemEx ("NanoResEffect", 0, 0, 15, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
	DIES NMLKJIH 5
   Goto See	
  Idle:
    DIES AA 4 A_Wander
    DIES A 0 A_Look
    DIES BB 4 A_Wander
    DIES A 0 A_Look
    DIES CC 4 A_Wander
    DIES A 0 A_Look
    DIES DD 4 A_Wander
    DIES A 0 A_Look
    loop
  }
	   
	   
}


  Actor StartShotCounter : Inventory
	{
	 Inventory.Maxamount 50
	}
	
	
  Actor DodgeShotCounter : Inventory
	{
	 Inventory.Maxamount 50
	}
	
	
  Actor LongShotCounter : Inventory
	{
	 Inventory.Maxamount 50
	}
 	


  Actor CigaSmoke
		{
		PROJECTILE
		+CLIENTSIDEONLY
		+NOINTERACTION	
		+MISSILE
		+THRUACTORS
		+DOOMBOUNCE
		Radius 1
		Height 1
		Speed 1
		Renderstyle Translucent
		Alpha 0.15 
		Scale 0.36
		 States	
			{
		 Spawn:  
			TNT1 A 0
			TNT1 A 0 ThrustThingZ (0, random (1,2), 0, 0) 
			TNT1 A 0 A_Jump(128, 2)
			TNT1 A 0 A_SetScale(-0.1, 0.1)
			TNT1 A 0
			NSMK ABCDEFGHIJKLMNOPQR 1
		Stop
			}
		}	