     Actor ASGStormTrooper : GenericHumanScum 
	    {
		
  //-----------------------------------COMPLEX DOOM COMPATIBILITY DROPS----------------------------------------------
  
  DropItem "WeaponUpgradeBox" 120		 
  DropItem "Assault Shotgun", 255			
		
  scale 1.0
  obituary "%o was slightly unconventionally turned into a sieve by the ASG StormTrooper"
  health 325
  radius 15
  height 54
  mass 100
  speed 12
  Species "Mancucu"
+DONTHARMSPECIES
  Damage 2
  painchance 70
  SeeSound "ASGStormTrooper/See"
  PainSound "GTS/Pain"
  DeathSound "GTS/Death"
  ActiveSound "ASGStormTrooper/Active"
  dropitem "Shotgun", 25
  Tag "ASG StormTrooper"
  MONSTER
  +FLOORCLIP
  States
       {
  Spawn:
	TNT1 A 0
	TNT1 A 0 A_SetScale (scaleX+frandom(-0.02, 0.02), scaleY+frandom(-0.04,0.04))
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult ("VanJumpCheck") == 1, "VanJump")
  Spawn2:
    UNAS E 10 A_Look
    loop
  VanJump:
	 TNT1 A 0
	 TNT1 A 0  NODELAY ACS_NamedExecuteAlways ("VanillaHeights")
	Goto Spawn+3	
  See:
   "####" A random(1,5)
    TNT1 A 0 A_Jump (170, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
	TNT1 A 0 A_Jump (180, "MissileCheck")
  SeeLoop:	
    TNT1 A 0 A_CheckSight ("CheckReload")
    TNT1 A 0 A_JumpIfInventory ("AA12ShotCounter", 12, "Reload")
	TNT1 A 0 A_Jump (199, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
    UNAS AABBCCDD 3 A_Chase
    loop		 	
  CheckReload:
    TNT1 A 0 A_Jump (150, "CheckReload2")
 	Goto SeeLoop+1
  CheckReload2:
    TNT1 A 0 A_JumpIfInventory ("AA12ShotCounter", 12, "Reload")
	Goto SeeLoop+1
  DodgeCheck:
    TNT1 A 0 A_Jump (255, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
	Goto MissileCheck	
  DodgeLeft:
        TNT1 A 0 A_FaceTarget
	    UNAS 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, 25, 0, 0)
	    TNT1 A 0 A_Recoil (random (-8,-3))
	    UNAS 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, 25, 0, 0)
	    TNT1 A 0 A_Recoil (random (3,8))
	    UNAS 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
	    UNAS 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, 25, 0, 0)
	    TNT1 A 0 A_Recoil ( random (-8,-3)) 
	    UNAS 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, 25, 0, 0)
	    TNT1 A 0 A_Recoil ( random (3,8)) 
	    UNAS AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "MissileCheck")
		Goto SeeLoop+1
  MissileCheck:
    TNT1 A 0 A_JumpIfTargetInLos ("Missile")
	Goto SeeLoop
  Missile:
    UNAS E 8 A_FaceTarget
	TNT1 A 0 A_JumpIfTargetInLos ("Cluster", 0, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 1200, 350)
	TNT1 A 0 A_JumpIfTargetInLos ("SlugShot", 0, JLOSF_DEADNOJUMP | JLOSF_CLOSENOJUMP, 0, 1000)
	TNT1 A 0 A_PlaySound ("ASSASG")
	TNT1 A 0 A_PlaySound ("DBSHOFRF", 6, 0.5, 0)
	UNAS F 2 BRIGHT A_FaceTarget
	TNT1 AAAAAAAA 0 A_CustomMissile ("ShotgunTracer",32,9,random (-4,0))
	TNT1 A 0 A_GiveInventory ("AA12ShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AA12ShotCounter", 12, "Reload")
	UNAS E 6 A_FaceTarget
	TNT1 A 0 A_PlaySound ("ASSASG")
	TNT1 A 0 A_PlaySound ("DBSHOFRF", 6, 0.5, 0)
	UNAS F 2 BRIGHT A_FaceTarget 
	TNT1 AAAAAAAA 0 A_CustomMissile ("ShotgunTracer",32,9,random (0,4))
	TNT1 A 0 A_GiveInventory ("AA12ShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AA12ShotCounter", 12, "Reload")
	UNAS E 6 A_FaceTarget
	TNT1 A 0 A_PlaySound ("ASSASG")
	TNT1 A 0 A_PlaySound ("DBSHOFRF", 6, 0.5, 0)
	UNAS F 2 BRIGHT A_FaceTarget 
	TNT1 AAAAAAAA 0 A_CustomMissile ("ShotgunTracer",32,9,random (-4,4))
	TNT1 A 0 A_GiveInventory ("AA12ShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AA12ShotCounter", 12, "Reload")
  MissileDodge:
    UNAS E 6 A_FaceTarget
	TNT1 A 0 A_PlaySound ("ASSASG")
	TNT1 A 0 A_PlaySound ("DBSHOFRF", 6, 0.5, 0)
	UNAS F 2 BRIGHT A_FaceTarget 
	TNT1 AAAAAAAA 0 A_CustomMissile ("ShotgunTracer",32,9,random (-6,6))
	TNT1 A 0 A_GiveInventory ("AA12ShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AA12ShotCounter", 12, "Reload")
	TNT1 A 0 A_JumpIfInTargetLos ("DodgeCheck", 0) 
	TNT1 A 0 A_MonsterRefire (40, "SeeLoop")
	Loop
  Cluster:
    TNT1 A 0
    TNT1 A 0 A_JumpIfInventory ("AA12ShotCounter", 12, "Reload")
    UNAS E 6 A_FaceTarget
	TNT1 A 0 A_PlaySound ("ASSASG")
	TNT1 A 0 A_PlaySound ("DBSHOFRF", 6, 0.5, 0)
	UNAS F 3 BRIGHT A_FaceTarget
	TNT1 AAAA 0 A_CustomMissile ("ClusterShotgunTracer",32,9,random (-6,6))
	TNT1 A 0 A_GiveInventory ("AA12ShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AA12ShotCounter", 12, "Reload")
	Goto SeeLoop+1
  SlugShot:
    TNT1 A 0 A_JumpIfInventory ("AA12ShotCounter", 12, "Reload")
    UNAS E 22 A_FaceTarget
	TNT1 A 0 A_PlaySound ("ASSASG")
	TNT1 A 0 A_PlaySound ("DBSHOFRF", 6, 0.5, 0)
	UNAS F 3 BRIGHT A_FaceTarget
	TNT1 AAAA 0 A_CustomMissile ("ShotgunHeavySlugTracer",32,9,random (-2,2))
	TNT1 A 0 A_GiveInventory ("AA12ShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("AA12ShotCounter", 12, "Reload")
	TNT1 A 0 A_MonsterRefire (40, "SeeLoop")
	Loop
  Reload:
    UNAS D 15 A_PlaySound ("ASGOUT")
	TNT1 A 0 A_TakeInventory ("AA12ShotCounter", 12)
	UNAS E 32 A_PlaySound ("ASGIN")
	UNAS D 16
	Goto SeeLoop
  Pain:
    UNAS G 3
    UNAS G 3 A_Pain
    goto SeeLoop
  Death:
  	//TNT1 A 0 A_Jump(20, "Suren")
    UNAS H 4 A_Scream
    UNAS I 4
    UNAS J 4 A_NoBlocking
    UNAS K 4
    UNAS L 4
	TNT1 A 0 A_PlaySound ("FallingBodyGear")
	UNAS M 5 
	UNAS 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 A_NoBlocking
    PGIB B 3 A_XScream
	PGIB CD 5
    PGIB E -1
    Stop
Raise:
    TNT1 A 0 
	TNT1 A 0 A_SpawnItemEx ("NanoResEffect", 0, 0, 15, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
	UNAS NMLKJIH 5
   Goto See	
  Idle:
    UNAS AA 4 A_Wander
    UNAS A 0 A_Look
    UNAS BB 4 A_Wander
    UNAS A 0 A_Look
    UNAS CC 4 A_Wander
    UNAS A 0 A_Look
    UNAS DD 4 A_Wander
    UNAS A 0 A_Look
    loop
  }

}   




	Actor ClusterShotgunTracer 
	{
	Projectile
	Damage (8)
	+FORCEXYBILLBOARD
	+DONTSPLASH
	+BLOODSPLATTER
	+DOHARMSPECIES 
	+NOEXTREMEDEATH
	radius 2
	height 2
	speed 20
	ReactionTime 32
	renderstyle Add
	alpha 0.9
	scale .24
	 States
		 {
		  Spawn:
			TNT1 A 0
			TNT1 A 0 A_CountDown
			TRAC A 1 Bright A_PlaySound ("Bullet/Fly", 0, 1.0, true)
			Loop
		  Death:
			TNT1 A 0 A_PlaySound("MINIEX",0)
			//TNT1 A 0 A_PlaySound("misc/distanceboom",6,1.0,0,0)
			TNT1 AAAAAAAA 0 Bright A_CustomMissile ("ShotgunTracer",0,0,random(-4,4),CMF_AIMDIRECTION | CMF_OFFSETPITCH | CMF_SAVEPITCH,frandom(-4.0,4.0))
			TNT1 A 0 A_Explode((8),88,0 ,0,40)
			TNT1 AAAAA 0 A_CustomMissile ("ShotgunExplosionFlame", 0, 0, random (0, 360), 2, random (0, 360))
			TNT1 A 0 A_SpawnItemEx ("IncShotgunSparxExplosion", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
			TNT1 A 0 A_CustomMissile ("ShotgunBoomSmoke", 0, 0, random (0, 360), 2, random (0, 360))
			TNT1 A 0 A_SpawnItemEx("ShotgunShockwave",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
			TNT1 A 1 Radius_Quake (2,4,0,7,0)
			TNT1 A 20
			Stop
		  XDeath:
			TNT1 A 0 A_PlaySound("MINIEX",0)
			TNT1 A 0 A_PlaySound("misc/distanceboom",6,1.0,0,0)
			TNT1 A 0 A_Explode((15),50,0 ,0,40)
			TNT1 AAAAA 0 A_CustomMissile ("ShotgunExplosionFlame", 0, 0, random (0, 360), 2, random (0, 360))
			TNT1 A 0 A_SpawnItemEx ("IncShotgunSparxExplosion", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
			TNT1 A 0 A_CustomMissile ("ShotgunBoomSmoke", 0, 0, random (0, 360), 2, random (0, 360))
			TNT1 A 0 A_SpawnItemEx("ShotgunShockwave",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
			TNT1 A 1 Radius_Quake (2,4,0,7,0)
			TNT1 A 20
			Stop
		 }
	}



Actor ShotgunHeavySlugTracer 
{
Projectile
Damage (15)
+FORCEXYBILLBOARD
+DONTSPLASH
+BLOODSPLATTER
+DOHARMSPECIES 
+NOEXTREMEDEATH
radius 2
height 2
speed 24
renderstyle Add
alpha 0.9
scale .28
 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		
	 }
}	
 