ACTOR NemesisDevastatorZombie : NemesisCommando
{
//Creator: Eshkere_Jason
//Origin: Divine Infinity
//Sprite: NDZM
//Title: "Nemesis Devastator Zombie"  
health 2000
speed 16
painchance 15
DropItem "NemesisHealthBonusMax", 256, 32
DropItem "NemesisArmorBonus32", 256
DropItem "NemesisHealthBonusMax", 256, 32
DropItem "NemesisArmorBonus32", 256
DropItem "VengefulNemesisArmor", 100, 1
DropItem "LegAmmoSphere", 88, 1
DropItem "NemesisPowerShard", 50, 1
DropItem "HandGrenadeAmmo", 235, 2
DropItem "MineAmmo", 235, 2
DropItem "Backpack", 198, 1
DropItem "Armorplate", 205, 1
DropItem "Portablemedkit", 210, 1
DropItem "NLDemonAmmoBox", 200 
DropItem "NLDemonAmmo", 250 
DropItem "NemesisRuneSpawnerTier1", 80, 1
DropItem "Nemesis Devastator", 128, 1
DamageFactor 0.4
DamageFactor "PDTBFG", 0.20
DamageFactor "PDTBFGTracer", 0.20
DamageFactor "PlayerDevBall", 0.120
DamageFactor "PlayerDevBall2", 0.120
DamageFactor "PlayerDTBFGRailgunSlug", 0.120
DamageFactor "PlayerDevTracer", 0.120
DamageFactor "Legendary", 0.0
DamageFactor "LegendaryPlayer", 0.3
DamageFactor "LegendaryGuru", 0.0
DamageFactor "LegendaryGuruPlayer", 0.3
DamageFactor "LACGrenade", 0.0
DamageFactor "LegendaryZombie", 0.0
DamageFactor "GeneralTracer", 0.0
DamageFactor "DBFG10K2", 0.65
DamageFactor "PlayerDBFG10K2", 0.65
DamageFactor "DBFG2", 0.65
DamageFactor "PlayerDBFG2", 0.65
DamageFactor "PlayerDTRG", 0.5
DamageFactor "Cyber10K", 0.0
obituary "%o was pulverized by a zombie's Nemesis Demon Tech Devastator."
Tag "\c[g3]Nemesis Devastator Zombie\c-"
SeeSound "NemesisCommando/sight"
PainSound "NemesisCommando/pain"
DeathSound "NemesisCommando/death"
ActiveSound "NemesisCommando/active"
AttackSound "Null"
var int user_music;
var int user_deathtimer;
states
{
  Spawn:
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
    NDZM A 10 Bright A_Look
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NDZM A 10 Bright A_Look
 	TNT1 A 0 A_PlaySound("devastator/idle",6,1.0,1)
	Loop
  See:
    TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,6800,563)
	TNT1 A 0 A_SetUserVar("user_music",1)
    NDZM A 0 A_JumpIfTargetInLOS("Strafing")
    NDZM AABB 3 Bright A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
    TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NDZM A 0 A_JumpIfTargetInLOS("Strafing")
	NDZM CCDD 3 Bright A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NDZM A 0 A_Jump(80,"Rush")
    TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
    Loop
  Rush:
    NDZM A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemDevastatorGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NDZM A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemDevastatorGhostA",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NDZM A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemDevastatorGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NDZM B 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemDevastatorGhostB",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NDZM B 1 Bright A_Chase
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
    TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("NemDevastatorGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NDZM C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemDevastatorGhostC",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NDZM C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemDevastatorGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NDZM D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("NemDevastatorGhostD",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	NDZM D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_Jump(84,"See")
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	Loop
  Strafing:
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NDZM AA 3 Bright A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NDZM BB 3 Bright A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    NDZM CC 3 Bright A_GiveInventory("NemesisLegZombieStrafing",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NDZM DD 3 Bright A_GiveInventory("NemesisLegZombieStrafing",1)
	Goto See
  Pause:
	NDZM EEEEE 3 Bright A_GiveInventory("NemesisLegZombieStrafing",1)
	Goto See	
  Missile:
    NDZM E 0 A_FaceTarget
	TNT1 A 0 A_StopSound(6)
    NDZM E 0 A_PlaySound ("devastator/charge")
	TNT1 A 0 A_ChangeFlag("NOPAIN",1)
    NDZM EEEEEEEEEEEEEEEEEEE 2 Bright A_FaceTarget
	NDZM F 8 Bright
    NDZM F 0 A_PlaySound ("devastator/fire")
    NDZM F 10 Bright A_Custommissile("NemImpDevastatorBall")
	TNT1 A 0 A_ChangeFlag("NOPAIN",0)
    NDZM E 50
    goto See
  Pain:
    NDZM G 3
    NDZM G 3 A_Pain
    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")
    TNT1 A 0 A_StopSound(6)
	NDZM H 5 A_Scream
    NDZM I 5 A_Fall
    NDZM J 5 A_SpawnItem("BodyCrash",0,0,0,0)
    NDZM KLM 5
    NDZM N -1 
    stop
  LegendarySoul:
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	NDZM H 6
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	NDZM 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)
	NDZM J 6 A_Fall
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	NDZM K 6 A_SpawnItem("BodyCrash",0,0,0,0)			
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	NDZM L 6
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	NDZM M 5
	NDZM N 5
	TNT1 A 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	NDZM NNNNNNNNNNNNNNNNN 2 A_GiveInventory("NemesisSoulEvent",1)
	NDZM NNNNNNNNNNNNNNNNN 2 A_GiveInventory("NemesisSoulEvent",1)
	NDZM 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)
	NDZM N 525
	NDZM N 5 A_FadeOut(0.1,1)
	Wait
  VexedSpawn:
    NDZM G 3 Bright A_Pain
    NDZM G 0 A_PlaySoundEx("brain/spit",7,0,2)
    NDZM GGGGGGGGGGGGGGGGG 2 Bright A_GiveInventory("NemesisSoulEvent",1)
    NDZM GGGGGGGGGGGGGGGGG 2 Bright A_GiveInventory("NemesisSoulEvent",1)
    NDZM GGGGGGGGGGGGGGGGG 2 Bright A_GiveInventory("NemesisSoulEvent",1)
    TNT1 A 0 A_SpawnItemEx("NemesisLightning")
    NDZM GGGGGGGGGGGG 2 Bright A_SpawnItemEx("VexedNemesisFlameSpawner")
    TNT1 A 0 A_SpawnItemEx("VexedNemesisDevastatorZombie",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_TELEFRAG)
    TNT1 A 1
  Stop
  }
}

Actor INFNemesisDevastatorZombie : NemesisDevastatorZombie
{
Tag "\c[g3]Nemesis Devastator Zombie\c-"
States
{
  Spawn:
    TNT1 A 0 A_Jump(130,"Remove")
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NDZM A 10 Bright A_Look
 	TNT1 A 0 A_PlaySound("devastator/idle",6,1.0,1)
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Chaingunner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}

ACTOR NemDevastatorGhostA
{
Scale 1.1
Radius 20
Height 56
Speed 0
Alpha 0.7
PROJECTILE
RENDERSTYLE Translucent
+CLIENTSIDEONLY
+NOINTERACTION
+NOTIMEFREEZE
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
    NDZM A 2 A_FadeOut(0.10)
    Wait
    }
}

ACTOR NemDevastatorGhostB : NemDevastatorGhostA
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
    NDZM B 2 A_FadeOut(0.10)
    Wait
    }
}

ACTOR NemDevastatorGhostC : NemDevastatorGhostA
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
    NDZM C 2 A_FadeOut(0.10)
    Wait
    }
}

ACTOR NemDevastatorGhostD : NemDevastatorGhostA
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
    NDZM D 2 A_FadeOut(0.10)
    Wait
    }
}