ACTOR NemesisPyroZombie
{
//Creator: Eshkere_Jason
//Origin: Divine Infinity
//Sprite: NMPY
//Title: "Nemesis Pyro Zombie"
Obituary "%o went brunt into a bluish crisp by a \c[g3]Nemesis Pyro Zombie\c-."
Health 2250
Radius 20
Height 56
Mass 500
Speed 15
FastSpeed 24
PainChance 20
BloodColor "Black"
MONSTER
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 Assault Shotgun", 128, 1
DropItem "Nemesis Rifle", 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.15
DamageFactor "PlayerDBFG10K2", 0.15
DamageFactor "DBFG2", 0.15
DamageFactor "PlayerDBFG2", 0.15
DamageFactor "PlayerDTRG", 0.5
DamageFactor "Cyber10K", 0.0
DamageFactor "SoapOpera", 0.0 
DamageFactor "Fire", 0.0
DamageFactor "Ice", 0.0
SeeSound "Nemssgzomb/sight"
PainSound "Nemssgzomb/pain"
DeathSound "Nemssgzomb/death"
ActiveSound "NemesisZombie/Active"
Tag "\c[g3]Nemesis Pyro Zombie\c-"
+NOTIMEFREEZE
+BOSS
+BOSSDEATH
+FLOORCLIP
+MISSILEMORE
+MISSILEEVENMORE
+QUICKTORETALIATE
+NOICEDEATH
+NODROPOFF
+DONTGIB
+NOTARGET
+NORADIUSDMG
+FORCERADIUSDMG
+NOFEAR
+BRIGHT
var int user_music;
var int user_arson;
var int user_protection;
var int user_protected;
var int user_deathtimer;
states
{
  Spawn:
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
    NMPY A 10 A_Look
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NMPY X 10 A_Look
    Loop
  See:
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,6814,563)
	TNT1 A 0 A_SetUserVar("user_music",1)
    NMPY A 0 A_JumpIfTargetInLOS("Strafing")
    NMPY AABB 3 A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NMPY A 0 A_Jump(30,"Rush","Arson")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
    TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NMPY A 0 A_JumpIfTargetInLOS("Strafing")
	NMPY CCDD 3 A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NMPY A 0 A_Jump(80,"Rush","Arson")
    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:
    NMPY 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("NemesisPyroGhost",0,0,0,0,0,0,0,128)
	NMPY A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisPyroGhost",0,0,0,0,0,0,0,128)
	NMPY A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisPyroGhostB",0,0,0,0,0,0,0,128)
	NMPY B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisPyroGhostB",0,0,0,0,0,0,0,128)
	NMPY B 1 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("NemesisPyroGhostC",0,0,0,0,0,0,0,128)
	NMPY C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisPyroGhostC",0,0,0,0,0,0,0,128)
	NMPY C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisPyroGhostD",0,0,0,0,0,0,0,128)
	NMPY D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisPyroGhostD",0,0,0,0,0,0,0,128)
	NMPY D 1 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_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)
	NMPY AA 3 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NMPY BB 3 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    NMPY CC 3 A_GiveInventory("NemesisLegZombieStrafing",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NMPY DD 3 A_GiveInventory("NemesisLegZombieStrafing",1)
	Goto See
  Pause:
	NMPY EEEEE 3 A_GiveInventory("NemesisLegZombieStrafing",1)
	Goto See	
  Arson:
    TNT1 A 0 A_JumpIf(user_arson == 0,"Rush")
    NMPY EEE 3
    NMPY E 0 A_JumpIfTargetInLos("Missile")
    NMPY E 0 A_JumpIfCloser(300,"Missile")
	TNT1 AAAA 0 A_CustomMissile("NemesisZombieCannonProj",36,0,random(-6,6),CMF_TRACKOWNER)
    NMPY F 15 Bright A_PlaySound("NemesisCannon/Fire",7)
	Goto See
  Missile:
    TNT1 A 0 A_SetShootable
    TNT1 A 0 A_UnsetInvulnerable
    TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_SetUserVar("user_arson",1)
	TNT1 A 0 A_JumpIfCloser(500,"MissileClose")
	TNT1 A 0 A_Jump(72,"Napalm")
	Goto Normal
  MissileClose:
    TNT1 A 0 A_Jump(88,"Normal","Normal","Napalm","Flamethrower")
  Flamethrower:
	NMPY EF 5 A_FaceTarget
	TNT1 A 0 A_PlaySound("magma/firebreath")
	TNT1 A 0 A_FaceTarget
	NMPY FFF 2 A_CustomMissile("NemesisFiendBreath",32,0,Random(6,-6))
	TNT1 A 0 A_FaceTarget
    NMPY FFF 2 A_CustomMissile("NemesisFiendBreath",32,0,Random(6,-6))
	TNT1 A 0 A_FaceTarget
    NMPY FFF 2 A_CustomMissile("NemesisFiendBreath",32,0,Random(6,-6))
	TNT1 A 0 A_FaceTarget		
	NMPY FFF 2 A_CustomMissile("NemesisFiendBreath",32,0,Random(6,-6))
    NMPY E 5
	Goto See
  Close:
	TNT1 A 0 A_CheckRange(500,"Normal")
	NMPY EEEE 3 A_GiveInventory("NemesisLegZombieStrafing",1)
	NMPY FF 1 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_PlaySound("Weapons/PyroSGShot")
	TNT1 AAAA 0 A_CustomMissile("NemesisImpBall",36,0,random(-6,6),CMF_TRACKOWNER)
	NMPY EEEE 3 A_GiveInventory("NemesisLegZombieStrafing",1)
	NMPY FF 1 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_PlaySound("Weapons/PyroSGShot")
	TNT1 AAAA 0 A_CustomMissile("NemesisImpBall",36,0,random(-6,6),CMF_TRACKOWNER)
	TNT1 A 0 A_Jump(24,"Pause")
	TNT1 A 0 A_SpidRefire
	Loop
  Normal:
    TNT1 A 0 A_SetShootable
    TNT1 A 0 A_UnsetInvulnerable
    TNT1 A 0 A_SetTranslucent(1)
	NMPY EEE 3 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 AAAAA 0 A_CustomMissile("NemesisImpBallSeek",32,0,random(-6,6),0)
	NMPY F 5 A_PlaySoundEx("Weapons/PyroSGShot","Weapon")
	TNT1 A 0 A_Jump(24,"Pause")
	TNT1 A 0 A_JumpIfCloser(500,"Close")
	TNT1 A 0 A_SpidRefire
	Goto Normal+5
  Napalm:
	NMPY EEEE 3 A_GiveInventory("NemesisLegZombieStrafing",1)
	NMPY FF 1 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_CustomMissile("NBehemothComet",32,0,0)
	NMPY EEEE 3 A_GiveInventory("NemesisLegZombieStrafing",1)
	NMPY FF 1 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_CustomMissile("NBehemothComet",32,0,0)
	NMPY EEEE 3 A_GiveInventory("NemesisLegZombieStrafing",1)
	NMPY FF 1 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_CustomMissile("NBehemothComet",32,0,0)
	NMPY EEEE 3 A_GiveInventory("NemesisLegZombieStrafing",1)
	NMPY FF 1 A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_CustomMissile("NBehemothComet",32,0,0)
	//TNT1 A 0 A_Jump(24,"Pause")
	//TNT1 A 0 A_SpidRefire
	Goto See
  Pain:
	TNT1 A 0 A_Jump(30,"Protection")
	TNT1 A 0 A_Jump(192,"PainMissile")
	NMPY G 3
	NMPY G 3 A_Pain
	Goto See
  PainMissile:
	NMPY G 3
	NMPY G 3 A_Pain
	TNT1 A 0 A_Jump(64,"Arson")
	Goto Missile	
  Protection:
	TNT1 A 0 A_JumpIf(user_protection >= 3,"Pain")
	TNT1 A 0 A_JumpIf(user_protected == 1,"Pain")
	TNT1 A 0 A_PlaySound("legendary/defense")
	TNT1 A 0 A_FaceTarget
	NMPY E 2 ACS_NamedExecuteAlways("LegendaryProtection",0,0,0,0)
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	Goto See
  XDeath:
  Death:
	TNT1 A 0 A_StopSound(6)
	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(36,"LegendarySoul")
    NMPY G 0 A_Scream
	NMPY HHHIHIHIHIHHIHIHIHIHIHIIHIHIHIIHIHI 2 A_SpawnItemEx("WhiteNemesisKaboom",random(-32,32),random(-40,40),random(16,48),random(-4,4),random(-4,4),random(0,4),0,SXF_TRANSFERPOINTERS)
	TNT1 AA 0 A_SpawnItemEx("NemesisGibbedGenerator",0,0,0,0,0,0,0,128)	
	TNT1 A 0 A_SpawnItem("MiniNemesisDeathBall")
	NMPY JJJKKK 2 A_CustomMissile ("WhiteNemesisKaboom", Random(10,50), 0, random(0,360), 2, random(0,360))
	TNT1 AA 0 A_SpawnItemEx("NemesisGibbedGenerator",0,0,0,0,0,0,0,128)
    TNT1 AAAA 0 A_CustomMissile("LegendarySmokeFX", Random(30,60), 0, random(0,360), 2, random(0,360))	
    NMPY L 4 A_NoBlocking
    NMPY MNO 3
	TNT1 A 0 A_BossDeath
	NMPY P 2 A_ChangeFlag("BRIGHT",0)
    NMPY P -1 A_KillMaster
    Stop
  LegendarySoul:
    TNT1 A 0 A_StopSound(6)
    NMPY G 0 A_Scream
	NMPY HHHIHIHIHIHHIHIHIHIHIHIIHIHIHIIHIHI 2 A_SpawnItemEx("WhiteNemesisKaboom",random(-32,32),random(-40,40),random(16,48),random(-4,4),random(-4,4),random(0,4),0,SXF_TRANSFERPOINTERS)
	TNT1 AA 0 A_SpawnItemEx("NemesisGibbedGenerator",0,0,0,0,0,0,0,128)	
	TNT1 A 0 A_SpawnItem("MiniNemesisDeathBall")
	NMPY JJJKKK 2 A_CustomMissile ("WhiteNemesisKaboom", Random(10,50), 0, random(0,360), 2, random(0,360))
	TNT1 AA 0 A_SpawnItemEx("NemesisGibbedGenerator",0,0,0,0,0,0,0,128)
    TNT1 AAAA 0 A_CustomMissile("LegendarySmokeFX", Random(30,60), 0, random(0,360), 2, random(0,360))	
    NMPY L 4 A_NoBlocking
    NMPY MNO 3
	TNT1 A 0 A_BossDeath
	NMPY P 2 A_ChangeFlag("BRIGHT",0)
    NMPY P -1 A_KillMaster
	NMPY P 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	NMPY PPPPPPPPPPPPPPPPP 2 Bright A_GiveInventory("NemesisSoulEvent",1)
	NMPY PPPPPPPPPPPPPPPPP 2 Bright A_GiveInventory("NemesisSoulEvent",1)
	NMPY PPPPPPPPPPPPPPPPP 2 Bright A_GiveInventory("NemesisSoulEvent",1)
	TNT1 A 0 A_SpawnItemEx("NemesisSoul",0,0,16,0,0,0,0,32)
	TNT1 A 0 A_SpawnItemEx("TeleportFog",0,0,16,0,0,0,0,32)
	NMPY P -1
	Stop
  VexedSpawn:
	NMPY G 3 Bright A_Pain
	NMPY G 0 A_PlaySoundEx("brain/spit",7,0,2)
	NMPY GGGGGGGGGGGGGGGGG 2 Bright A_GiveInventory("NemesisSoulEvent",1)
	NMPY GGGGGGGGGGGGGGGGG 2 Bright A_GiveInventory("NemesisSoulEvent",1)
	NMPY GGGGGGGGGGGGGGGGG 2 Bright A_GiveInventory("NemesisSoulEvent",1)
	TNT1 A 0 A_SpawnItemEx("NemesisLightning")
	NMPY GGGGGGGGGGGG 2 Bright A_SpawnItemEx("VexedNemesisFlameSpawner")
	NSZ0 G 0 A_CustomMissile("WhiteNemesisKaboom", Random(10,50), 0, random(0,360), 2, random(0,360))
	TNT1 A 0 A_SpawnItem("MiniNemesisDeathBall")
	TNT1 A 0 A_SpawnItemEx("VexedNemesisPyroZombie",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_TELEFRAG)
	TNT1 A 0
	Stop	
  }
}

Actor INFNemesisPyroZombie : NemesisPyroZombie
{
Tag "\c[g3]Nemesis Pyro Zombie\c-"
States
{
  Spawn:
    TNT1 A 0 A_Jump(120,"Remove")
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
    NMPY A 10 A_Look
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner",0,0,0,0)
	NMPY X 10 A_Look
	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 NemesisPyroGhost
{
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")
    NMPY A 2 A_FadeOut(0.10)
    Wait
	}
}

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

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

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