Actor ZamasuLordRevenant
{
Monster
Health 25000
Radius 20
Height 56
Speed 27
Scale 1.15 //later need change sprites
MeleeDamage 500
PainChance 140
PainChance "SoulToxic", 60
PainChance "FatFlamer", 60
PainChance "FiendFire", 60
DamageFactor 0.1
Damagefactor "Acid", 2.5
DamageFactor "PDTBFG", 0.05
DamageFactor "PDTBFGTracer", 0.05
DamageFactor "BFGSplash", 0.25
DamageFactor "BFGSpray", 0.25
DamageFactor "PlayerDevBall", 0.025
DamageFactor "PlayerDevBall2", 0.025
DamageFactor "PlayerDTBFGRailgunSlug", 0.025
DamageFactor "PlayerDevTracer", 0.025
DamageFactor "ImpComet", 0.0
DamageFactor "Cyber10K", 0.0
DamageFactor "Legendary", 0.0
DamageFactor "LegendaryPlayer", 0.0
DamageFactor "LegendaryGuru", 0.0
DamageFactor "LegendaryGuruPlayer", 0.0
DamageFactor "CadaverRocket", 0.0
DamageFactor "DemolisherEx", 0.0
DamageFactor "DarkDemoEx", 0.0
DamageFactor "CerChainguns", 0.0
DamageFactor "CerEnergyBall", 0.0
DamageFactor "LegMind", 0.0
DamageFactor "BeheComet", 0.0
DamageFactor "NobleCOmet", 0.0
DamageFactor "CacoComet", 0.0
DamageFactor "CadaverRocket", 0.0
DamageFactor "HellComet", 0.0
DamageFactor "Legendary1", 0.0
DamageFactor "T3rm", 0.0
DamageFactor "C0mm4nder", 0.0
DamageFactor "DBFG10K2", 0.0
DamageFactor "HFCyb3r", 0.0
DamageFactor "PlayerDBFG10K2", 0.0
DamageFactor "PlayerDTRG", 0.3
DamageFactor "DBFG2", 0.0
DamageFactor "PlayerDBFG2", 0.0
DamageFactor "PyroShot", 0.0
DamageFactor "PlayerPyro", 0.0
DamageFactor "PDTPuff", 0.0
DamageFactor "Touhou", 0.0
DamageFactor "Hell", 0.0
DamageFactor "PlayerBHole", 0.0
DamageFactor "PlayerNemesisPlasma", 0.0
DamageFactor "SatanGuard", 0.0
DamageFactor "Explosion", 0.01
DamageFactor "NemesisBall", 0
DamageFactor "NemesisBeam", 0.3
DropItem "Zamasu Plasmatic Cannon", 256, 33
DropItem "NemesisHealthBonusMax", 256, 32
DropItem "NemesisArmorBonus32", 256
DropItem "NemesisHealthBonusMax", 256, 32
DropItem "NemesisArmorBonus32", 256
DropItem "EnragedLegendaryArmor", 85, 1
DropItem "LegAmmoSphere", 88, 3
DropItem "EnragedLegendaryPowerShard", 35, 1
DropItem "HandGrenadeAmmo", 235, 2
DropItem "MineAmmo", 235, 2
DropItem "Backpack", 198, 1
DropItem "Armorplate", 205, 1
DropItem "Portablemedkit", 210, 1
DropItem "LegendaryRune", 60, 1
DropItem "Nemesis Rifle", 128, 1
DropItem "ZamasuAgilityRune", 128, 1 
DropItem "ZamasuWeakRune", 128, 1
DropItem "ZamasuVitalityRune", 256, 11
SeeSound "ZamasuImpSee"
PainSound "ZamasuImpPain"
DeathSound " "
ActiveSound "ZamasuImpActive"
MeleeSound "ZamasuImpMelee"
Obituary "%o got burned by an Imp."
HitObituary "%o was shredded by an Zamasu Phase Imp."
DropItem "LifeEssence" 50
DropItem "ArmorBonusMax" 50
Species "Revenant"
+FLOORCLIP
+MISSILEMORE
+MISSILEEVENMORE
+DONTHARMSPECIES
+LOOKALLAROUND
+NOPAIN
var int user_music;
var int user_missile;
var int user_phase;
var int user_hide;
var int user_hidecount;
var int user_aurascript;
var int user_cloaked;
States
{
  Spawn:
 	TNT1 A 0
	TNT1 A 0 A_PlaySoundEx("NDemonHeart/Pickup","Voice",0,2)
	Idle: 
	   TNT1 A 0 A_ChangeFlag("NOPAIN",1)
       ZRED A 0 Bright A_ChangeFlag(Invulnerable,1)
	   TNT1 A 0 A_ChangeFlag(Reflective,1)
       ZRED A 0 Bright A_UnSetShootable
	   TNT1 A 0 A_PlaySoundEx("thunder/hit","Voice",0,2) 
	   ZRED AAAAAAAAAAAA 1 A_Look
	   ZRED AAAAAAAAAAAA 2 A_Look
	   ZRED AAAAAABBBBBB 2 A_Look
	   ZRED BBBBBBBBBBBB 2 A_Look
	   ZRED BBBBBBBBBBBB 2 A_Look
	   TNT1 A 0 A_PlaySoundEx("thunder/hit","Voice",0,2) 
	   ZRED AAAAAAAAAAAA 1 A_Look
	   ZRED AAAAAAAAAAAA 2 A_Look
	   ZRED AAAAAABBBBBB 2 A_Look
	   ZRED BBBBBBBBBBBB 2 A_Look
	   ZRED BBBBBBBBBBBB 2 A_Look
	   TNT1 A 0 A_PlaySoundEx("thunder/hit","Voice",0,2) 
	   ZRED AAAAAAAAAAAA 1 A_Look
	   ZRED AAAAAAAAAAAA 2 A_Look
	   ZRED AAAAAABBBBBB 2 A_Look
	   ZRED BBBBBBBBBBBB 2 A_Look
	   ZRED BBBBBBBBBBBB 2 A_Look
	   TNT1 A 0 A_PlaySoundEx("thunder/hit","Voice",0,2) 
	   ZRED AAAAAAAAAAAA 1 A_Look
	   ZRED AAAAAAAAAAAA 2 A_Look
	   ZRED AAAAAABBBBBB 2 A_Look
	   ZRED BBBBBBBBBBBB 2 A_Look
	   ZRED BBBBBBBBBBBB 2 A_Look
	   Loop
Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("cyberdemon",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	See:
	   TNT1 A 0 A_ChangeFlag("NOPAIN",1)
       ZRED A 0 Bright A_ChangeFlag(Invulnerable,1)
	   TNT1 A 0 A_ChangeFlag(Reflective,1)
       ZRED A 0 Bright A_UnSetShootable
       TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0) 
       TNT1 A 0 ACS_NamedExecuteAlways("Hem_LightOnMap",0,1,40)
	   TNT1 A 0 ACS_ExecuteAlways(69,0,0,0,0)
       TNT1 A 0 A_JumpIf(user_music == 1,3)
	   TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,6758)
	   TNT1 A 0 A_SetUserVar("user_music",1)
	   ZRED AAAAABBBBB 2 Bright
	   ZRED AAAAABBBBB 2 Bright
	   ZRED AAAAABBBBB 2 Bright
	   ZRED AAAAABBBBB 2 Bright
	   TNT1 A 0 A_PlaySoundEx("thunder/hit","Voice",0,2) 
	   ZRED AAAAABBBBB 1 Bright
	   ZRED AAAAABBBBB 2 Bright
	   ZRED AAAAABBBBB 2 Bright
	   ZRED AAAAABBBBB 2 Bright
	   ZRED AAAAABBBBB 2 Bright
	   TNT1 A 0 A_PlaySoundEx("thunder/hit","Voice",0,2) 
	   ZRED AAAAABBBBB 1 Bright
	   ZRED AAAAABBBBB 2 Bright
	   ZRED AAAAABBBBB 2 Bright
	   ZRED AAAAABBBBB 2 Bright
	   ZRED AAAAABBBBB 2 Bright
	   TNT1 A 0 A_PlaySoundEx("thunder/hit","Voice",0,2) 
	   ZRED AAAAABBBBB 1 Bright
	   ZRED AAAAABBBBB 2 Bright
	   TNT1 A 0 A_PlaySoundEx("thunder/hit","Voice",0,2) 
	   ZRED AAAAABBBBB 1 Bright
	   ZRED AAAAABBBBB 2 Bright
	   TNT1 A 0 A_PlaySoundEx("thunder/hit","Voice",0,2) 
	   ZRED AAAAABBBBB 1 Bright
	   ZRED AAAAABBBBB 2 Bright
	   TNT1 A 0 A_PlaySoundEx("thunder/hit","Voice",0,2) 
	   ZRED ABABABABABAB 1 Bright
	   ZRED AAAAABBBBB 2 Bright
	   TNT1 A 0 A_PlaySoundEx("thunder/hit","Voice",0,2) 
	   ZRED ABAB 1 Bright
	   TNT1 A 0 A_SpawnItemEx("ZamasuPatriarchLightningSpawner",0,0,0,0,0,0,0,0,0,0)
	   ZRED AAAAABBBBB 1 Bright
	   ZRED AAAAABBBBB 4 Bright
	   ZRED AAAAABBBBB 3 Bright
	   ZRED AAAAABBBBB 2 Bright
	   ZRED AAAAABBBBB 1 Bright
	   Goto ZamasuScriptRaising
  ZamasuScriptRaising:
	   TNT1 A 0 A_ChangeFlag("NOPAIN",1)
       ZRED A 0 Bright A_ChangeFlag(Invulnerable,1)
	   TNT1 A 0 A_ChangeFlag(Reflective,1)
       ZRED A 0 Bright A_UnSetShootable
   	   TNT1 A 0
       ZRED A 0 A_Playsound ("ZamasuPatriarchBoss/Talking1",0,99)
	   TNT1 A 0 A_Printbold("\c[v9]I am the epidemy of darkness...\c-", 120, "BIGFONT")
       ZRED A 60 A_FaceTarget
	   TNT1 A 0 A_SpawnItemEx("ZamasuPatriarchThunderSpawner",Random(2150,-2150),Random(2150,-2150),0,0,0,0,SXF_NOCHECKPOSITION,64)
       ZRED A 60 A_FaceTarget
       ZRED A 0 A_Playsound ("ZamasuPatriarchBoss/Talking2",0,99)
	   TNT1 A 0 A_Printbold("\c[v9]The Divine of all the previous zamasu demons that you've killed,have not vanished.\c-", 240, "BIGFONT")
	   TNT1 A 0 A_Quake(1,240,0,900)
	   TNT1 A 0 A_SpawnItemEx("ZamasuPatriarchThunderSpawner",Random(2150,-2150),Random(2150,-2150),0,0,0,0,SXF_NOCHECKPOSITION,64)
	   TNT1 A 0 Radius_Quake(999,999,0,999,0)
	   TNT1 A 0 A_SpawnItemEx("ZamasuPatriarchThunderSpawner",Random(2150,-2150),Random(2150,-2150),0,0,0,0,SXF_NOCHECKPOSITION,64)
       ZRED A 120 A_FaceTarget 
       ZRED A 120 A_FaceTarget 
	   TNT1 A 0 A_SpawnItemEx("ZamasuPatriarchThunderSpawner",Random(2150,-2150),Random(2150,-2150),0,0,0,0,SXF_NOCHECKPOSITION,64)
       ZRED A 0 A_Playsound ("ZamasuPatriarchBoss/Talking3",0,99)
	   TNT1 A 0 A_Printbold("\c[v9]They got free from their dismembered bodies, and began to form something.\c-", 200, "BIGFONT")
	   TNT1 A 0 A_Quake(2,200,0,1000)
	   TNT1 A 0 Radius_Quake(999,999,0,999,0)
       ZRED A 100 A_FaceTarget 
	   TNT1 A 0 A_SpawnItemEx("ZamasuPatriarchThunderSpawner",Random(2150,-2150),Random(2150,-2150),0,0,0,0,SXF_NOCHECKPOSITION,64)
	   ZRED B 100 A_FaceTarget 
       ZRED B 0 A_Playsound ("ZamasuPatriarchBoss/Talking4",0,99)
	   TNT1 A 0 A_Printbold("\c[v9]That's more Divine anyone could imagine....\c-", 120, "BIGFONT")
	   TNT1 A 0 A_Quake(4,120,0,1200)
	   TNT1 A 0 Radius_Quake(999,999,0,999,0)
	   TNT1 A 0 A_SpawnItemEx("ZamasuPatriarchThunderSpawner",Random(2150,-2150),Random(2150,-2150),0,0,0,0,SXF_NOCHECKPOSITION,64)
       ZRED B 120 A_FaceTarget 
       ZRED B 0 A_Playsound ("ZamasuPatriarchBoss/Talking5",0,99)
	   TNT1 A 0 A_Printbold("\c[v9]The dark spirits of theirs combined into one, until they've finally formed me...\c-", 240, "BIGFONT")
	   TNT1 A 0 A_Quake(9,380,0,1500)
	   TNT1 A 0 Radius_Quake(999,999,0,999,0)
	   TNT1 A 0 A_SpawnItemEx("ZamasuPatriarchThunderSpawner",Random(2150,-2150),Random(2150,-2150),0,0,0,0,SXF_NOCHECKPOSITION,64)
       ZRED B 240 A_FaceTarget 	   
       ZRED B 0 A_Playsound ("ZamasuPatriarchBoss/Talking6",0,99)
	   TNT1 A 0 A_Printbold("\c[v9]The true incarnation of Pure DARKNESS...\c-", 120, "BIGFONT")
	   TNT1 A 0 A_SpawnItemEx("ZamasuPatriarchThunderSpawner",Random(2150,-2150),Random(2150,-2150),0,0,0,0,SXF_NOCHECKPOSITION,64)
	   TNT1 A 0 A_Printbold("  ", 120, "BIGFONT")
       ZRED B 140 A_FaceTarget 
	   Goto SpawnZamasuPatriarchLightnings
   SpawnZamasuPatriarchLightnings:
	   TNT1 A 0 A_PlaySoundEx("thunder/hit","Voice",0,2) 
	   TNT1 A 0 A_SpawnItemEx("ZamasuBoss360Cube1",0,0,0,0,0,0,0,SXF_SETMASTER)
	   TNT1 A 0 A_Quake(9,4,0,1500)
	   TNT1 A 0 Radius_Quake(999,999,0,999,0)
	   ZRED CDCDCDCDCDCD 1 Bright
	   ZRED DDDDDDDDDDDD 2 Bright
	   ZRED DDDDDDDDDDDD 1 Bright
	   TNT1 A 0 A_PlaySoundEx("thunder/hit","Voice",0,2) 
	   TNT1 A 0 A_SpawnItemEx("ZamasuBoss360Cube2",0,0,0,0,0,0,120,SXF_SETMASTER)
	   TNT1 A 0 A_Quake(9,4,0,1500)
	   TNT1 A 0 Radius_Quake(999,999,0,999,0)
	   ZRED DDDDDDDDDDDD 1 Bright
	   ZRED EEEEEEEEEEEE 2 Bright
	   ZRED EEEEEEEEEEEE 1 Bright
	   TNT1 A 0 A_PlaySoundEx("thunder/hit","Voice",0,2) 
	   TNT1 A 0 A_SpawnItemEx("ZamasuBoss360Cube3",0,0,0,0,0,0,240,SXF_SETMASTER)
	   TNT1 A 0 A_Quake(9,4,0,1500)
	   TNT1 A 0 Radius_Quake(999,999,0,999,0)
	   ZRED EEEEEEEEEEEE 1 Bright
	   TNT1 A 0 A_ChangeFlag("NOPAIN",0)
       ZRED E 0 Bright A_ChangeFlag(Invulnerable,0)
	   TNT1 A 0 A_ChangeFlag(Reflective,0)
       ZRED E 0 Bright A_SetShootable
	   Goto SeeNotSoLoop
   SeeNotSoLoop:
       ZREV A 0 A_Playsound ("ZamasuPatrBoss/See")
       TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0) 
       ZREV AA 2 A_Chase 
	   Goto SeeLoopedThingy
   SeeLoopedThingy:
	    TNT1 A 0 A_ChangeFlag(NOPAIN,0)
		ZREV ABCDEF 3 A_Chase
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		ZREV ABCDEF 3 A_Chase
		TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
		Loop
		Idle:
		TNT1 A 0 A_JumpIf(user_phase == 1,"StopPhaseWalkingIdle")
		TNT1 A 0 A_JumpIf(user_hide == 1,"AppearIdle")
       TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0) 
       ZREV AA 2 A_Chase 
	   TNT1 A 0 A_Jump(50,"Rush")
	   ZREV A 0 A_Jump(30,"Teleport")
       TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0) 
       ZREV BB 2 A_Chase
       TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0) 
       ZREV CC 2 A_Chase
	   TNT1 A 0 A_Jump(25,"Rush")
	   ZREV A 0 A_Jump(10,"Teleport")	   
       TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0) 
       ZREV DD 2 A_Chase
	   Loop
   Strafing:
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ZREV AA 2 Bright A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ZREV BB 2 Bright A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ZREV CC 2 Bright A_GiveInventory("NemesisLegZombieStrafing",1)  
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	ZREV DD 2 Bright A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_Jump(256,"SeeNotSoLoop")
	ZREV EE 2 Bright A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_Jump(256,"SeeNotSoLoop")
	ZREV FF 2 Bright A_GiveInventory("NemesisLegZombieStrafing",1)
	TNT1 A 0 A_Jump(256,"SeeNotSoLoop")
  IdleLoop:
    TNT1 A 0 A_Look
	ZREV A 3 Bright A_Wander
	TNT1 A 0 A_Look
	ZREV A 3 Bright A_Wander
	TNT1 A 0 A_Look
    ZREV B 3 Bright A_Wander
	TNT1 A 0 A_Look
	ZREV B 3 Bright A_Wander
	TNT1 A 0 A_Look
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
    TNT1 A 0 A_Look
	ZREV C 3 Bright A_Wander
	TNT1 A 0 A_Look
	ZREV C 3 Bright A_Wander
	TNT1 A 0 A_Look
    ZREV D 3 Bright A_Wander
	TNT1 A 0 A_Look
	ZREV D 3 Bright A_Wander
	TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
	TNT1 A 0 A_Look
	Loop
  PhaseWalk:
	TNT1 A 0 A_PlaySound("phaseimp/teleport")
	ZREV A 2 A_FaceTarget
	TNT1 A 0 A_Changeflag(NOCLIP,1)
	//TNT1 A 0 A_Changeflag(NODROPOFF,1)
	TNT1 A 0 A_Changeflag(NOPAIN,1)
	TNT1 A 0 A_SetUserVar("user_phase",1)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.75)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.55)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.35)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.15)
	TNT1 A 0 A_Changeflag(NOPAIN,0)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	Goto PhaseWalking
  PhaseWalking:
	ZREV AABBCCDDEEFFAABBCCDDEEFF 1 A_ExtChase(0,0)
	ZREV AABBCCDDEEFFAABBCCDDEEFFAABBCCDDEEFFAABBCCDDEEFF 1 A_Chase
	TNT1 A 0 A_JumpIfCloser(270,"StopPhaseWalking")
	Goto PhaseWalking+32
  StopPhaseWalking:
    TNT1 A 0 A_PlaySound("phaseimp/teleport")
	TNT1 A 0 A_Changeflag(NOCLIP,0)
	//TNT1 A 0 A_Changeflag(NODROPOFF,0)
	TNT1 A 0 A_Changeflag(NOPAIN,1)
	TNT1 A 0 A_SetUserVar("user_phase",0)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.15)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.35)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.55)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.75)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_Changeflag(NOPAIN,0)
	ZREV A 2 A_FaceTarget	
    Goto Missile
	StopPhaseWalkingIdle:
    TNT1 A 0 A_PlaySound("phaseimp/teleport")
	TNT1 A 0 A_Changeflag(NOCLIP,0)
	//TNT1 A 0 A_Changeflag(NODROPOFF,0)
	TNT1 A 0 A_Changeflag(NOPAIN,1)
	TNT1 A 0 A_SetUserVar("user_phase",0)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.15)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.35)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.55)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.75)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_Changeflag(NOPAIN,0)
    Goto Idleloop
  Hide:
    TNT1 A 0 A_SpawnItemEx("NemesisTeleportExplode",0,0,30)
	TNT1 A 0 A_PlayWeaponSound("Tarmidhesrune/use")
	TNT1 A 0 A_PlaySound("TerrorZombie/Amb",5,3.0,1)
	TNT1 A 0 A_Changeflag(NOCLIP,1)
	TNT1 A 0 A_Changeflag(NOPAIN,1)
	TNT1 A 0 A_SetUserVar("user_hide",1)
	TNT1 A 0 A_SetUserVar("user_hidecount",0)
	ZREV E 1 A_SetTranslucent(0.75)
	ZREV E 1 A_SetTranslucent(0.55)
	ZREV E 1 A_SetTranslucent(0.35)
	ZREV E 1 A_SetTranslucent(0.10)
	ZREV E 1 A_SetTranslucent(0.0)
	TNT1 A 0 A_Changeflag(NOPAIN,0)
	TNT1 A 0 A_Changeflag(SHOOTABLE,0)
  Hidden:
    TNT1 A 0 ACS_NamedExecuteAlways("TerrorSpeed",0)
  HiddenLoop:
	ZREV AABBCCDDAABBCCDDAABBCCDDAABBCCDD 1 A_Wander
	TNT1 A 0 A_JumpIf(user_hidecount >= 20, "Hidden2")
	TNT1 A 0 A_SetUserVar("user_hidecount", user_hidecount+1)
	Loop
  Hidden2:
	TNT1 A 0 A_SetUserVar("user_cloaked",1)
  Hidden2Loop:
    TNT1 AABBCCDDAABBCCDDAABBCCDDAABBCCDD 1 A_ExtChase(0,0,0)
	TNT1 A 0 A_JumpIf(user_hidecount >= 40, "Hidden3")
	TNT1 A 0 A_SetUserVar("user_hidecount", user_hidecount+1)
	Loop
  Hidden3:
    TNT1 A 0 A_Changeflag(SHOOTABLE,1)
	TNT1 A 0 A_SetUserVar("user_cloaked",0)
  Hidden3Loop:
    ZREV AABB 1 A_ExtChase(0,0,0)
	TNT1 A 0 A_GiveInventory("NemesisLegZombieStrafing",1)
	ZREV CCDD 1 A_ExtChase(0,0,0)
	TNT1 A 0 A_GiveInventory("NemesisLegZombieStrafing",1)
	ZREV AABB 1 A_ExtChase(0,0,0)
	TNT1 A 0 A_GiveInventory("NemesisLegZombieStrafing",1)
	ZREV CCDD 1 A_ExtChase(0,0,0)
	TNT1 A 0 A_GiveInventory("NemesisLegZombieStrafing",1)
	ZREV AABB 1 A_ExtChase(0,0,0)
	TNT1 A 0 A_GiveInventory("NemesisLegZombieStrafing",1)
	ZREV CCDD 1 A_ExtChase(0,0,0)
	TNT1 A 0 A_GiveInventory("NemesisLegZombieStrafing",1)
	ZREV AABB 1 A_ExtChase(0,0,0)
	TNT1 A 0 A_GiveInventory("NemesisLegZombieStrafing",1)
	ZREV CCDD 1 A_ExtChase(0,0,0)
	TNT1 A 0 A_JumpIfCloser(270,"Appear")
	Loop
  NotThisime:
    TNT1 A 0 A_Changeflag(SHOOTABLE,0)
	TNT1 A 0 A_SetUserVar("user_hidecount",0)
	//TNT1 A 0 ACS_NamedExecuteAlways("TerrorRenderStyle",0)
	TNT1 A 0 A_SetTranslucent(0,1)
  NotThisimeLoop:
    ZREV AA 1 A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREV BB 1 A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREV CC 1 A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREV DD 1 A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREV AA 1 A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREV BB 1 A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREV CC 1 A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREV DD 1 A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_Jump(45,"GlitchMode")
	TNT1 A 0 A_JumpIf(user_hidecount >= 10, "Hidden")
	TNT1 A 0 A_SetUserVar("user_hidecount", user_hidecount+Random(1,2))
	Loop
  GlitchMode:
    ZREX A 1 A_SetTranslucent(0.5)
	TNT1 A 0 A_Changeflag(SHOOTABLE,1)
	TNT1 A 0 A_Changeflag(NOPAIN,1)
	ZREX A 0 A_PlaySound("TerrorZombie/Glitch",7,3.0)
	TNT1 A 0 A_Jump(80,"GlitchMode2","GlitchMode3")
    ZREX AA 1 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 1 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 1 A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 1 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 1 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 1 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 1 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX A 1 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_Jump(100,"GlitchMode2","GlitchMode3")
	TNT1 A 0 A_Changeflag(SHOOTABLE,0)
	TNT1 A 0 A_Changeflag(NOPAIN,0)
	ZREX A 1 A_SetTranslucent(0.0)
	Goto NotThisimeLoop
  GlitchMode2:
    ZREX AA 2 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 2 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 2 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 2 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 1 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 1 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 1 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_Changeflag(SHOOTABLE,0)
	TNT1 A 0 A_Changeflag(NOPAIN,0)
	TNT1 A 1 A_SetTranslucent(0.0)
    Goto NotThisimeLoop
  GlitchMode3:
    ZREX AA 2 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 2 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 2 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 2 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 1 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 1 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_GiveInventory("SpecOpsStrafing",1)
	ZREX AA 1 Bright A_Chase("","",CHF_DONTMOVE)
	TNT1 A 0 A_Changeflag(SHOOTABLE,0)
	TNT1 A 0 A_Changeflag(NOPAIN,0)
	TNT1 A 1 A_SetTranslucent(0.0)
    Goto NotThisimeLoop
  Appear:
    TNT1 A 0 A_SetUserVar("user_cloaked",0)
    TNT1 A 0 A_jump(128,"NotThisime")
  AppearReally:
    TNT1 A 0 A_PlaySound("phaseimp/teleport") //Teleport sound?
	TNT1 A 0 A_Changeflag(NOCLIP,0)
	TNT1 A 0 A_Changeflag(NOPAIN,1)
	TNT1 A 0 A_SetUserVar("user_hide",0)
	TNT1 A 0 A_StopSound(5)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.15,0)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.35)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.55)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.75)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_Changeflag(NOPAIN,0)
	Goto Missile
  AppearIdle:
    TNT1 A 0 A_SetUserVar("user_cloaked",0)
    TNT1 A 0 A_PlaySound("phaseimp/teleport") //Teleport sound?
	TNT1 A 0 A_Changeflag(NOCLIP,0)
	TNT1 A 0 A_Changeflag(NOPAIN,1)
	TNT1 A 0 A_SetUserVar("user_hide",0)
	TNT1 A 0 A_StopSound(5)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.15)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.35)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.55)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	ZREV A 1 A_SetTranslucent(0.75)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_Changeflag(NOPAIN,0)
	Goto Idleloop
  Missile:
	TNT1 A 0
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	TNT1 A 0 A_CheckFlag(FRIENDLY,6)
	TNT1 A 0 A_TakeInventory("ProjHitCheck",1)
	TNT1 A 0 A_TakeInventory("ProjMissCheck",1)
	TNT1 A 0 A_FaceTarget
	ZREV EEEE 5 A_FaceTarget
	TNT1 A 0 A_CheckFlag(FRIENDLY,6)
	TNT1 A 0 A_Jump(256,"SeeNotSoLoop","Normal","ZamasuDevastator","ZamasuDarkMatter")
  Melee:
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_Jump(128,"Melee2")
	ZREV G 1 Bright A_SkelWhoosh
	ZREV G 1 Bright A_FaceTarget
	ZREV G 1 Bright A_SkelFist
	TNT1 A 0 A_Jump(256,"SeeNotSoLoop")
  Melee2:
	ZREV H 1 Bright A_SkelWhoosh
	ZREV H 1 Bright A_FaceTarget
	ZREV H 1 Bright A_SkelFist
	TNT1 A 0 A_Jump(256,"SeeNotSoLoop")
  Normal:
	TNT1 AAA 0 A_ChangeFlag(NOPAIN,1)
	ZREV III 3 A_FaceTarget
	ZREV J 2 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/PCNNF",CHAN_WEAPON)
	ZREV K 4 Bright A_CustomMissile("ZamasuPhaseImpLaserBall",40,20,0,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("ZamasuPhaseImpLaserBall",40,-20,0,CMF_TRACKOWNER)
	TNT1 A 0 A_PlaySound("weapons/dtech10ksteam",6)
	TNT1 AAA 0 A_ChangeFlag(NOPAIN,0)
	ZREV L 20 Bright A_SpawnItemEx("LegendaryCannonSmoke",40,20,0)
	TNT1 A 0 A_SpawnItemEx("LegendaryCannonSmoke",40,-20,0)
	ZREV L 20 Bright A_SpawnItemEx("LegendaryCannonSmoke",40,20,0)
	TNT1 A 0 A_SpawnItemEx("LegendaryCannonSmoke",40,-20,0)
	ZREV L 20 Bright A_SpawnItemEx("LegendaryCannonSmoke",40,20,0)
	TNT1 A 0 A_SpawnItemEx("LegendaryCannonSmoke",40,-20,0)
	TNT1 A 0 A_Jump(256,"SeeNotSoLoop")
  ZamasuDevastator:
	TNT1 A 0 A_PlaySound("LNightmare/sight",CHAN_AUTO,1.0,0,0.5)
	ZREV G 1 Bright A_FaceTarget
	TNT1 A 0 A_SetInvulnerable
	TNT1 A 0 A_SpawnItem("NemesisCyberFlameSpawner",0,0,0,0)
	ZREV G 2 Bright A_FaceTarget
	TNT1 A 0 A_SpawnItem("NemesisCyberFlameSpawner",0,0,0,0)
	ZREV G 2 Bright A_FaceTarget
	TNT1 A 0 A_UnSetInvulnerable
	TNT1 A 0 A_playSound("legimp/fiyabetch")
	ZREV HH 7 A_CustomMissile("NemImpDevastatorBall", 32, 0, 0)
	TNT1 A 0 A_Jump(256,"SeeNotSoLoop")
  ZamasuDarkMatter:
    ZREV I 0 A_SetInvulnerable
	ZREV I 0 A_PlaySound("zamasuimp/sight",7,1,0,0.5)
	ZREV I 3 Bright A_FaceTarget
	ZREV I 0 Bright A_GiveInventory("NLegZombieStrafing3",1)
	ZREV I 3 Bright A_FaceTarget
	ZREV I 0 Bright A_GiveInventory("NLegZombieStrafing3",1)
	ZREV J 3 Bright A_FaceTarget
	ZREV J 0 Bright A_GiveInventory("NLegZombieStrafing3",1)
	ZREV J 3 Bright A_FaceTarget
	ZREV J 0 Bright A_GiveInventory("NLegZombieStrafing3",1)
	ZREV J 3 Bright A_FaceTarget
	ZREV J 0 Bright A_GiveInventory("NLegZombieStrafing3",1)
	ZREV K 3 Bright A_FaceTarget
	ZREV K 0 Bright A_GiveInventory("NLegZombieStrafing3",1)
	ZREV K 3 Bright A_FaceTarget
	ZREV K 0 Bright A_GiveInventory("NLegZombieStrafing3",1)
	ZREV K 3 Bright A_FaceTarget
	ZREV L 0 Bright A_GiveInventory("NLegZombieStrafing3",1)
	ZREV L 3 Bright A_FaceTarget
	ZREV L 0 Bright A_GiveInventory("NLegZombieStrafing3",1)
	ZREV L 3 Bright A_FaceTarget
	ZREV L 0 Bright A_GiveInventory("NLegZombieStrafing3",1)
	ZREV M 0 A_UnSetInvulnerable
	ZREV M 7 Bright A_CustomMissile("ActualDarkMatter",32,0,0)
	ZREV M 3 Bright A_FaceTarget
	ZREV M 0 Bright A_GiveInventory("NLegZombieStrafing3",1)
	ZREV M 3 Bright A_FaceTarget
	ZREV M 0 Bright A_GiveInventory("NLegZombieStrafing3",1)
	ZREV M 3 Bright A_FaceTarget
	ZREV M 0 Bright A_GiveInventory("NLegZombieStrafing3",1)
	ZREV M 7 Bright A_CustomMissile("ActualDarkMatter",32,0,0)
	ZREV M 3 Bright A_FaceTarget
	ZREV M 0 Bright A_GiveInventory("NLegZombieStrafing3",1)
	ZREV M 3 Bright A_FaceTarget
	ZREV M 0 Bright A_GiveInventory("NLegZombieStrafing3",1)
	ZREV M 3 Bright A_FaceTarget
	ZREV M 0 Bright A_GiveInventory("NLegZombieStrafing3",1)
	ZREV M 8 Bright A_FaceTarget
	TNT1 A 0 A_Jump(256,"SeeNotSoLoop")
  Pain:
  Death:
	TNT1 A 0
	ZREV S 5 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	ZREV T 5 A_ScreamAndUnblock
	ZREV U 5 A_SpawnItemEx("GibbedGenerator",0,0,0,0,0,0,0,128,0)
	ZREV VV 5 //A_BossDeath
	ZREV VV 5
	ZREX AAA 0
    ZREX A 0 A_Scream
    ZREX A 0 A_NoBlocking
    ZREX A 3 Bright A_FadeOut(0.02)
    Goto Death+2
	Stop
	}
}