Actor NemesisQuadShotgunZombie : LegendaryLieutenant
{
//Creator: Eshkere_Jason
//Origin: Divine Infinity
//Sprite: NQSZ
//Title: "Nemesis Quad Shotgun Zombie"
  Health 1850 //2750
  Speed 12
  PainChance 20
  +BRIGHT
  PainChance 20
	DamageFactor 0.6
	DamageFactor "PlayerNemesisPlasma", 0.0
	DamageFactor "Explosion", 0.2
	DamageFactor "PlayerDTRG", 0.4
	DamageFactor "DTRailgun", 0.4
	DamageFactor "PDTPuff", 0.4
	DamageFactor "RailG", 0.3
	DamageFactor "PlayerPyro", 0.2
	DamageFactor "VileFires", 0.0
	DamageFactor "DarkDemoEx", 0.0
	BloodColor "Black"
	DropItem "LegAmmoSphere" 95 1
	DropItem "HandGrenadeAmmo" 237 2
	DropItem "MineAmmo" 242 2
	DropItem "Backpack" 202 1
	DropItem "Armorplate" 212 1
	DropItem "Portablemedkit" 217 1
	DropItem "StimKit" 222 3
	DropItem "HealthFlask" 227 5
	DropItem "LegendaryQuadShotgun" 224 1
	DropItem "LegendaryRune" 57 1
	DropItem "NemesisHealthBonusMax", 256, 32
	DropItem "NemesisArmorBonus32", 256
	DropItem "NemesisHealthBonusMax", 256, 32
	DropItem "NemesisArmorBonus32", 256
	DropItem "StimKit", 222, 3
	DropItem "HealthFlask", 227, 5
	DropItem "Armorplate", 212, 1
	DropItem "LegAmmoSphere", 95, 3
	DropItem "Portablemedkit", 217, 1
	DropItem "NemesisRuneSpawnerTier1", 70, 1
	DropItem "SemiNemesisArmor", 92, 1
	DropItem "NemesisPowerShard", 35, 1
	DropItem "HandGrenadeAmmo", 237, 2
	DropItem "MineAmmo", 242, 2
	DropItem "ModdedBackPack", 202, 1
	DropItem "NemesisShell", 256
	DropItem "NemesisShellBox", 130
	DropItem "Nemesis Sawed-Off Shotgun", 128, 1
	DropItem "NemesisAmmoSphere", 128
    DropItem "NemesisTimeFreezeSphere", 128 
  AttackSound ""
  SeeSound "NemesisZombie/Sight"
  PainSound "NemesisZombie/Pain"
  DeathSound "NemesisZombie/Death"
  ActiveSound "NemesisZombie/Active"
  Obituary "%o's body wasn't able to be identified after being shot by a Enraged Legendary Quad Shotgun Zombie."
  var int user_reload;
  var int user_deathtimer;
  var int user_deathtimeractive;
  Tag "\c[g3]Nemesis Quad-Shotgun Zombie\c-"
  States
  {
  Spawn:
	NQSZ A 10 A_Look
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	Loop
  Idle:
	TNT1 A 0 A_SetShootable
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NQSZ AA 3 A_Wander
	TNT1 A 0 A_Look
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NQSZ BB 3 A_Wander
	TNT1 A 0 A_Look
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NQSZ CC 3 A_Wander
	TNT1 A 0 A_Look
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NQSZ DD 3 A_Wander
	TNT1 A 0 A_Look
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	Loop
  See:
  	TNT1 A 0 A_JumpIf(user_deathtimeractive == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("NemesisDeathTimerForVexed",0)
	TNT1 A 0 A_SetUserVar("user_deathtimeractive",1)
	TNT1 A 0 A_SetShootable
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
    TNT1 A 0 A_JumpIf(user_music == 1,3)
    TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,1803,561)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_JumpIfInventory("RunesCheck",1,2)
	TNT1 A 0 ACS_NamedExecuteWithResult("CheckRunes")
	TNT1 A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NQSZ AA 3 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NQSZ BB 3 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NQSZ CC 3 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NQSZ DD 3 A_Chase
	TNT1 A 0 A_Jump(80,"Mine","Rush")
	TNT1 A 0 A_Jump(64,"Dodge")
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	Loop
  Rush:
	TNT1 A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("NemQuadSGZombieGhostA",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	NQSZ A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemQuadSGZombieGhostA",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	NQSZ A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemQuadSGZombieGhostB",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	NQSZ B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemQuadSGZombieGhostB",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	NQSZ B 1 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("NemQuadSGZombieGhostC",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	NQSZ C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemQuadSGZombieGhostC",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	NQSZ C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemQuadSGZombieGhostD",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	NQSZ D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemQuadSGZombieGhostD",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE)
	NQSZ D 1 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Jump(84,"See")
	TNT1 A 0 A_Jump(64,"Dodge")
	Loop
  Strafing:
	TNT1 A 0
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NQSZ AA 3 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NQSZ BB 3 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NQSZ CC 3 A_GiveInventory("NemesisLegZombieStrafing",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NQSZ DD 3 A_GiveInventory("NemesisLegZombieStrafing",1)
	Goto See
  Dodge:
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NQSZ A 1 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	NQSZ E 0 ThrustThingZ(0,20,0,0)
	NQSZ A 0 A_Jump(256,"DodgeRight","DodgeLeft")
  DodgeLeft:
	NQSZ E 0 ThrustThing(angle*256/360+192, 15, 0, 0)
	Goto See
  DodgeRight:
	NQSZ E 0 ThrustThing(angle*256/360+64, 15, 0, 0)
	Goto See
  Mine:
	NQSZ C 1 Bright
    NQSZ C 12 Bright A_CustomMissile("ELACThrownMine",32,0,0,2,15)
	NQSZ E 12 Bright
    NQSZ C 3 Bright
	Goto See
  Missile:
	TNT1 A 0 A_SetShootable
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
	TNT1 A 0 A_JumpIf(user_reload == 2,"Reload")
	TNT1 A 0 A_Jump(40,"Grenade")
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_JumpIfCloser(400,"Quad")
  Normal:
	NQSZ EE 5 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/DualFire",CHAN_WEAPON)
	TNT1 AAAAAAAA 0 A_CustomMissile("NemesisTracer",Random(28,34),0,Random(6,-6),0)
	TNT1 A 0 A_SetUserVar(user_reload,1)
	NQSZ F 5 A_CustomBulletAttack(30,20,24,Random(20,28),"NemesisASGBulletPuff")
	NQSZ EE 4 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_JumpIf(user_reload == 2,"Reload")
	TNT1 A 0 A_PlaySound("LegendaryQuadShotgun/DualFire",CHAN_WEAPON)
	TNT1 AAAAAAAA 0 A_CustomMissile("NemesisTracer",Random(28,34),0,Random(6,-6),0)
	TNT1 A 0 A_SetUserVar(user_reload,2)
	NQSZ F 5 A_CustomBulletAttack(30,20,24,Random(20,28),"NemesisASGBulletPuff")
	NQSZ EE 5 A_GiveInventory("NemesisLegZombieStrafing",1)
	Goto Reload
  Quad:
	TNT1 A 0 A_JumpIf(user_reload == 1,"Normal")
	TNT1 A 0 A_FaceTarget(45)
	NQSZ E 5 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_FaceTarget(45)
	NQSZ E 5 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_FaceTarget(45)
	NQSZ E 5 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_PlaySound("Coachgun/Fire1",CHAN_WEAPON)
	TNT1 AAAAAAAAAAAAAAAA 0 A_CustomMissile("NemesisTracer",Random(28,34),0,Random(6,-6),0)
	TNT1 A 0 A_SetUserVar(user_reload,4)
	NQSZ F 5 A_CustomBulletAttack(30,20,48,Random(20,28),"NemesisASGBulletPuff") //oh...
	NQSZ EEE 5 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_Jump(64,"Grenade")
	Goto Reload
  Grenade:
	TNT1 A 0 A_PlaySound("weapons/hgrenadepin",0,1.0,0)
	NQSZ CE 4 Bright A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/hgrenadethrow",0,1.0,0)
	NQSZ E 1 Bright A_CustomMissile("NemesisGrenade2",32,0,0,2,4)
	TNT1 A 0 A_JumpIf(user_reload == 2,"Reload")
	Goto Dodge
  Reload:
	NQSZ E 3 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("NemesisLegZombieStrafing",1)
	NQSZ A 6 A_PlaySound("LegendaryQuadShotgun/Open")
	TNT1 A 0 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing",-8,6,36,Random(2,6),0,random(1,3),random(-80,-90),128)
	NQSZ B 1 A_SpawnItemEx("NemesisShellCasing",-10,6,36,Random(2,6),0,random(1,3),random(-80,-90),128)
	NQSZ B 6 A_PlaySound("LegendaryQuadShotgun/Load")
	TNT1 A 0 A_SpawnItemEx("NemesisShellCasing",-8,6,36,Random(2,6),0,random(1,3),random(-80,-90),128)
	NQSZ B 1 A_SpawnItemEx("NemesisShellCasing",-10,6,36,Random(2,6),0,random(1,3),random(-80,-90),128)
	NQSZ B 6 A_PlaySound("LegendaryQuadShotgun/Load")
	TNT1 A 0 A_SetUserVar(user_reload,0)
	TNT1 A 0 A_GiveInventory("NemesisLegZombieStrafing",1)
	NQSZ C 6 A_PlaySound("LegendaryQuadShotgun/Close")
	TNT1 A 0 A_GiveInventory("NemesisLegZombieStrafing",1)
	NQSZ D 6
	Goto See
  Pain:
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
	TNT1 A 0 A_Jump(10,"Protection")
	TNT1 A 0 A_Jump(20,"Dodge")
	NQSZ G 3
	NQSZ G 3 A_Pain
	TNT1 A 0 A_Jump(192,"Missile")
	Goto See
  Protection:
	TNT1 A 0 A_JumpIf(user_protection >= 4,"Pain")
	TNT1 A 0 A_JumpIf(user_protected == 1,"Pain")
	TNT1 A 0 A_PlaySound("legendary/defense")
	TNT1 A 0 A_FaceTarget
	NQSZ E 2 ACS_NamedExecuteAlways("LegendaryProtection",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemesisHellionSmokeSpawner")
	Goto See	
  Death:
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("NoVexedBoys") == 1,4)
	TNT1 A 0 A_JumpIfInTargetInventory("TrueLegendaryRuneItem",1,"VexedSpawn")
	TNT1 A 0 A_JumpIfInTargetInventory("TrueLegendaryRuneItem2",1,"VexedSpawn")
	TNT1 A 0 A_JumpIf(user_deathtimer <= 10,"VexedSpawn")
    TNT1 A 0 A_Jump(40,"LegendarySoul")
	NSZX H 6 A_Scream
	NSZX I 6 A_ChangeFlag(BRIGHT,0)
	NSZX J 6 A_Fall
	NSZX K 6 A_SpawnItem("BodyCrash",0,0,0,0)
	NSZX L -1
  LegendarySoul:
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	NQSZ H 6
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	NQSZ I 6 A_Scream
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("LegSSGGuyGib",0,0,12,frandom(0.1,1.0),frandom(0.1,1.0),frandom(0.1,1.0),random(0,360),SXF_CLIENTSIDE)
	NQSZ J 6 A_Fall
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	NQSZ K 6 A_SpawnItem("BodyCrash",0,0,0,0)			
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	NQSZ L 6
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	NQSZ L 5
	NQSZ M 5
    NQSZ N 140
	TNT1 A 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	NQSZ NNNNNNNNNNNNNNNNN 2 A_GiveInventory("NemesisSoulEvent",1)
	NQSZ NNNNNNNNNNNNNNNNN 2 A_GiveInventory("NemesisSoulEvent",1)
	NQSZ NNNNNNNNNNNNNNNNN 2 A_GiveInventory("NemesisSoulEvent",1)
	TNT1 A 0 A_ChangeFlag("BRIGHT",0)
	TNT1 A 0 A_SpawnItemEx("NemesisSoul",0,0,16,0,0,0,0,SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_SpawnItemEx("TeleportFog",0,0,16,0,0,0,0,32)
	NQSZ N 525
	NQSZ N 5 A_FadeOut(0.1,1)
	Wait
  VexedSpawn:
	NQSZ G 3 Bright A_Pain
	NQSZ G 0 A_PlaySoundEx("brain/spit",7,0,2)
	NQSZ GGGGGGGGGGGGGGGGG 2 Bright A_GiveInventory("NemesisSoulEvent",1)
	NQSZ GGGGGGGGGGGGGGGGG 2 Bright A_GiveInventory("NemesisSoulEvent",1)
	NQSZ GGGGGGGGGGGGGGGGG 2 Bright A_GiveInventory("NemesisSoulEvent",1)
	TNT1 A 0 A_SpawnItemEx("NemesisLightning")
	NQSZ GGGGGGGGGGGG 2 Bright A_SpawnItemEx("VexedNemesisFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("VexedNemesisQuadShotgunZombie",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_TELEFRAG)
	TNT1 A 1
	Stop	
  XDeath:
	TNT1 A 0 A_ChangeFlag("BRIGHT",0)
	TNT1 A 0 A_Jump(36,"LegendarySoul")
	NQSZ H 6 A_Scream
	NQSZ I 6 A_ChangeFlag("BRIGHT",0)
	NQSZ J 6 A_Fall
	NQSZ K 6 A_SpawnItem("BodyCrash",0,0,0,0)
	NQSZ L 5
	NQSZ M 5
	NQSZ N -1
	Stop
	}
}

ACTOR NemQuadSGZombieGhostA
{
  Alpha 0.7
  Renderstyle Translucent
  +NOTIMEFREEZE
  +NOINTERACTION
  +CLIENTSIDEONLY
  States
  {
  Spawn:
	TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
	TNT1 A 1 Bright
	Goto Fade
  Fade:
	LQSZ A 2 A_FadeOut(0.1,1)
	Goto Spawn+3
  Toaster:
	TNT1 A 1 Bright
	Stop
	}
}

ACTOR NemQuadSGZombieGhostB : NemQuadSGZombieGhostA
{   
States
	{
	Fade:
	LQSZ B 2 A_FadeOut(0.1,1)
	Loop
    }
}

ACTOR NemQuadSGZombieGhostC : NemQuadSGZombieGhostA
{   
States
	{
	Fade:
	LQSZ C 2 A_FadeOut(0.1,1)
	Loop
    }
}

ACTOR NemQuadSGZombieGhostD : NemQuadSGZombieGhostA
{   
States
	{
	Fade:
	LQSZ D 2 A_FadeOut(0.1,1)
	Loop
    }
}

ACTOR NemQuadSGZombieGhostE : NemQuadSGZombieGhostA
{   
States
	{
	Fade:
	LQSZ E 2 A_FadeOut(0.1,1)
	Loop
	}
}