      Actor FreakKorpsEShotgun : GenericHumanScum 18815       
	  {
	  

  //----------------------------COMPLEX DOOM COMPATIBILITY DROPS------------------------
  
  DropItem "WeaponUpgradeBox" 15	  
	  
  Health 267
  Radius 20
  Height 56
  Mass 100
  Speed 12
  PainChance 120
  Monster
  +BOSSDEATH
  MinMissileChance 88
  +NODROPOFF
  MaxDropOffHeight 69
  Species "Mancucu"
  +DONTHARMSPECIES
  Translation "112:127=32:47", "192:207=48:79"
  SeeSound "ExShotgunNazi/See"
  PainSound "ExShotgunNazi/pain"
  DeathSound "Telefonmast/death"
  ActiveSound "ExShotgunNazi/active"
  Tag "Explosive shotgun FreakKorps"
  Obituary "%o was blown apart by the neonazi with explosive shotgun"
  DropItem "Shotgun", 4
  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.04,0.04))
	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:
    ESGN T 10 A_Look
    Loop
  STFU:
     TNT1 A 0
	 TNT1 A 0 ACS_NamedExecute ("STFUExShotgunNazi")
	 Goto Spawn+2
  VanJump:
	 TNT1 A 0
	 TNT1 A 0  NODELAY ACS_NamedExecuteAlways ("VanillaHeights")
	Goto Spawn+3	 
  See:
   "####" A random(1,5)
	 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_JumpIfCloser (388, "Retreat")
    TNT1 A 0 A_JumpIfInventory ("ShotgunShotCounter", 6, "Reload")
	TNT1 A 0 A_Jump (199, "DodgeLeft", "DodgeRight", "DodgeLeftF", "DodgeLeftB", "DodgeRightF", "DodgeRightB")
    ESGN AABBCCDD 3 A_Chase
    Loop
  CheckReload:
    TNT1 A 0 A_Jump (150, "CheckReload2")
 	Goto SeeLoop+1
  CheckReload2:
    TNT1 A 0 A_JumpIfInventory ("ShotgunShotCounter", 6, "Reload")
	Goto SeeLoop+1
  DodgeLeft:
        TNT1 A 0 A_FaceTarget
	    ESGN 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))
	    ESGN 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))
	    ESGN 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
	    ESGN 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)) 
	    ESGN 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)) 
	    ESGN AABBCCDD 2 ThrustThing(angle*256/360+64, 1, 0, 0)
		TNT1 A 0 A_Jump (228, "MissileCheck")
		Goto SeeLoop+1
	Retreat:
		TNT1 A 0
		TNT1 A 0 A_ChangeFlag ("NOPAIN", true)
		TNT1 A 0 A_Changeflag ("FRIGHTENED", true)
	Retreating:
		TNT1 A 0 A_JumpIfInventory ("MovingCounter", 12, "KontrAngriff")
		ESGN AABBCCDD 2 A_Chase
		TNT1 A 0 A_JumpIfCloser (200, "GetOff") 
		TNT1 A 0 A_GiveInventory ("MovingCounter", 1)
		TNT1 A 0 A_CheckSight ("KontrAngriff")
	   Loop 	
  MissileCheck:
    TNT1 A 0 A_JumpIfTargetInLos ("Missile", 30, JLOSF_DEADNOJUMP)
	Goto SeeLoop	
  Missile:
    TNT1 A 0 A_JumpIfInventory ("ShotgunShoTCounter", 6, "Reload") 
	TNT1 A 0 A_Jump (18, "Reichwrath")
	TNT1 A 0 A_JumpIfTargetInLos ("DoubleShot", 0, JLOSF_CLOSENOJUMP | JLOSF_DEADNOJUMP, 0, 988)
	ESGN E 12 A_FaceTarget
	TNT1 A 0 A_PlaySound ("BSHFR")
	TNT1 A 0 A_PlaySound ("BSHFRF", 6, 0.5, 0)
	TNT1 AAAA 0 A_CustomMissile ("ExplosiveShotgunTracer", 32, 4, random (-4,4))
	TNT1 A 0 A_GiveInventory ("ShotgunShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("ShotgunShoTCounter", 6, "Reload")
    ESGN F 5 Bright
   Goto SeeLoop+1
   DoubleShot:
	ESGN E 17 A_FaceTarget
	TNT1 A 0 A_PlaySound ("BSHFR")
	TNT1 A 0 A_PlaySound ("BSHFRF", 6, 0.5, 0)
	TNT1 AAAA 0 A_CustomMissile ("ExplosiveShotgunTracer", 32, 4, random (-3,3))
	TNT1 A 0 A_GiveInventory ("ShotgunShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("ShotgunShoTCounter", 6, "Reload")
    ESGN F 5 Bright
	ESGN E 17 A_FaceTarget
	TNT1 A 0 A_PlaySound ("BSHFR")
	TNT1 A 0 A_PlaySound ("BSHFRF", 6, 0.5, 0)
	TNT1 AAAA 0 A_CustomMissile ("ExplosiveShotgunTracer", 32, 4, random (-5,5))
	TNT1 A 0 A_GiveInventory ("ShotgunShotCounter", 1)
	TNT1 A 0 A_JumpIfInventory ("ShotgunShoTCounter", 6, "Reload")
    ESGN F 5 Bright
	ESGN E 2 A_MonsterRefire (40, "SeeLoop")
	Goto SeeLoop+1
  Reichwrath:
	ESGN E 10 A_FaceTarget	
	TNT1 A 0 A_PlaySound ("FRKNAC02", 0, 1.0, false, 0.69)
  ReichWrathLoop:
	TNT1 A 0 A_JumpIfInventory ("ShotgunShoTCounter", 6, "Reload")
	ESGN E 18 A_FaceTarget
	TNT1 A 0 A_PlaySound ("BSHFR")
	TNT1 A 0 A_PlaySound ("BSHFRF", 6, 0.5, 0)
	TNT1 AAAA 0 A_CustomMissile ("ExplosiveShotgunTracer", 32, 4, random (-7,7))
	TNT1 A 0 A_GiveInventory ("ShotgunShotCounter", 1)
    ESGN F 3 Bright
	TNT1 A 0 A_Facetarget
	ESGN E 2 A_MonsterRefire (40, "SeeLoop")
   Loop
  KontrAngriff:
	TNT1 A 0
	TNT1 A 0 A_TakeInventory ("MovingCounter", 12)
	TNT1 A 0 A_ChangeFlag ("NOPAIN", false)
	TNT1 A 0 A_ChangeFlag ("FRIGHTENED", false)
   Goto MissileCheck
  GetOff:
	TNT1 A 0
	TNT1 A 0 A_TakeInventory ("MovingCounter", 12)
	TNT1 A 0 A_ChangeFlag ("NOPAIN", false)
	TNT1 A 0 A_ChangeFlag ("FRIGHTENED", false)
   Goto MissileCheck
  Reload:
    ESGN DE 7 A_PlaySound ("SHOTLOD")
	ESGN DE 7 A_PlaySound ("SHOTLOD")
	ESGN DE 7 A_PlaySound ("SHOTLOD")
	ESGN DE 7 A_PlaySound ("SHOTLOD")
	ESGN DE 7 A_PlaySound ("SHOTLOD")
	TNT1 A 0 A_TakeInventory ("ShotgunShotCounter", 6)
	ESGN DE 7 A_PlaySound ("SHOTLOD")
	ESGN E 8 A_Playsound ("SHOTPUMP")
	Goto SeeLoop
  Pain:
    TNT1 A 0 A_TakeInventory ("MovingCounter", 12)
    ESGN G 3 
    ESGN G 3 A_Pain
    Goto SeeLoop
  Death:
    ESGN H 5 A_NoBlocking
    ESGN I 5 A_Scream
    ESGN J 5 
    ESGN K 4 A_Playsound ("FallingBodyGear", CHAN_BODY)
    ESGN L -1
    Stop
  XDeath:
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx ("VgavnonahCore", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
    ESGN X 2 A_NoBlocking
    ESGN Y 1 
	PGIB A 5 A_XScream
	PGIB B 5 
	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)
    ESGN L 5
    ESGN KJIH 5
    Goto See
     }

}


	
	Actor ExplosiveShotgunTracer 
{
Projectile
Damage (6)
+FORCEXYBILLBOARD
+DONTSPLASH
+BLOODSPLATTER
+DOHARMSPECIES 
+NOEXTREMEDEATH
radius 2
height 2
speed 20
renderstyle Add
alpha 0.9
scale .19
 States
     {
	  Spawn:
	    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,0.5,0,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		
	 }
}



	actor ShotgunExplosionFlame
{
renderstyle add
alpha 0.9
scale 0.4
projectile 
radius 1
height 1
speed 3
damage 0
+NOINTERACTION
+CLIENTSIDEONLY
states
{
Spawn:
EXP1 ABCDEFGH 1 Bright
stop
}
}

actor ShotgunBoomSmoke
{
PROJECTILE
	+CLIENTSIDEONLY
	+NOINTERACTION	
	+MISSILE
	+THRUACTORS
	+DOOMBOUNCE
	Radius 1
	Height 1
	Scale 2.0
	Speed 0.69
	Renderstyle Translucent
	Alpha 0.4
	States
    {
    Spawn:  
	    TNT1 A 0
		TNT1 A 0 A_Jump(128, 2)
		TNT1 A 0 A_SetScale(-1.2, 1.2)
		TNT1 A 0
        NSMK ABCDEFGHIJKLMNOPQR 2
		Stop
		}
} 



actor ShotgunShockwave
{
renderstyle add
alpha 0.5
scale 0.088
+NOINTERACTION
+CLIENTSIDEONLY
states
{
Spawn:
BFS7 A 1 bright A_FadeOut(0.05,1)
TNT1 A 0 A_SetScale(scalex+0.05,scaley+0.05)
loop
}
}



		ACTOR FreakKorpsEShotgunSpawner : RandomSpawner
			{
			 DropItem FreakKorpsEShotgun
			 DropItem FreakKorpsEShotgunGrey
			 DropItem FreakKorpsEShotgunSwamp
			}





		Actor FreakKorpsEShotgunGrey : FreakKorpsEShotgun
			{
			 Translation "112:127=16:47", "192:207=80:111"	
			}
			
		Actor FreakKorpsEShotgunSwamp : FreakKorpsEShotgun
			{
			 Translation "112:127=29:47", "192:207=152:159"
			}