

//***Che WARNING: this boss is entirelyly dependent on specific map's (EADY23) geometry and maps scripts to work at all.

// modding him to only dramatically roar once, and attack instantly if switches target:
// the map has many trigges that spawn short lived hate targets, to emulate him leading the player
// initially it did not work because he roared at each target switch, long enough for the temporary target to expire.

// WARNING: his roaring/fire breathing animation is inconsistent between the front and the other views.
// designed to work well for the player he is facing (say, in singleplayer)but other players in coop
// may experience unfair headbox disconnect while trying to flank him!


ACTOR TargetIsAILeadingTracker: Inventory
{
	inventory.maxamount 1
}

ACTOR CyberlordFrustration: Inventory // accumulate this frustration for a forced "fire as soon as target in sight"
{
	inventory.maxamount 100
}

ACTOR FiveSecondGhostlyHateTarget: HateTarget
{
	-SOLID
    +THRUACTORS
    +SPECTRAL
	
	+SERVERSIDEONLY
	
	var int user_lifetime;
	
	States
	{
		Spawn:
			TNT1 A 0 NODELAY A_GiveInventory("TargetIsAILeadingTracker", 1)
			//KYDB G 175 BRIGHT // the big-ass debugging cross
			TNT1 A 0 A_SetUserVar("user_lifetime", 175)
			//TNT1 A 175
		Live:
			TNT1 A 0 A_JumpIfInventory("HateTargetExpired", 1, "BeGone")// the boss gives us this if he sees any player.
			TNT1 A 0 A_JumpIf(user_lifetime <= 0, "Expire")
			TNT1 A 1 A_SetUserVar("user_lifetime", user_lifetime - 1)
			Loop
		Expire:	
			TNT1 A 1 ACS_NamedExecuteAlways("MarkHateTargetExpired", 0,0,0,0) // must interrupt bosses' attack on it
			// otherwise he just stands there with his mouth open as aiming mode requires a target and missiles fail to spawn
			Stop
		BeGone:	
			TNT1 A 1
			Stop
	}
}
/*
script "MarkHateTargetExpired" (void) {
	GiveActorInventory(666, "HateTargetExpired", 1);
	delay(1);
	Terminate;
}
*/


ACTOR IAmAsleep: Inventory
{
	inventory.maxamount 1
}

ACTOR IAmBusy: Inventory
{
	inventory.maxamount 1
}

ACTOR HateTargetExpired: Inventory
{
	inventory.maxamount 1
}


ACTOR CheeseLordUpgraded 8758
{
	
	//***Che making him darker in Chebskies 2.0
	Translation "16:31=16:40", "32:47=[128,0,0]:[43,0,0]", "80:88=80:99", "89:95=100:111", "96:111=5:8"	
	
	//***Che: mostly copy-paste from EDAY with a couple states reworked
	// copy-pasting it here to add headbox support
	Game Doom
	//Health 20000
	Health 13000 // LOWER than the original because the small random spread makes him too dedli	
	Radius 130
	Height 425 //460 //***Che his true height is 525 (425 + 100 head)
	Mass 999999
	Speed 50
	Monster
	MinMissileChance 160
	+NOPAIN
	Scale 5.0
	+BOSS 
	+FLOORCLIP
	+NORADIUSDMG
	+DONTMORPH
	+BOSSDEATH
	
	+NEVERTARGET // prevent NPCs interrupting his roar. Clears after roaring.
	
	Damage 60
	damagefactor "sTOMP", 0.0
	damagefactor "ExplosiveImpact", 0.0
	//SeeSound "CYBRLRD"
	PainSound "cyber/pain"
	DeathSound "HUGEEXPL"
	ActiveSound "CYBRLA1"
	//dAMAGEfACTOR "Desintegrate", 0.2
	damagefactor "Desintegrate", 1.0 // bfg 9000 & Unmaker - NO resistance (vs 80% in the vanilla eday)	
	//Obituary "%o was smeared under the Cyber Demon Lord's iron hoof"
	Tag "$CYBERLORD1"
	Obituary "$Obituary_CheeseLordUpgraded"
	
	Species "Cyberdemons" //***Che
	+DONTHARMSPECIES
	
	var int user_head_tid;
	var int user_head_type;
	var int user_head_rel;
	var int user_head_scale;
	var int user_head_xyzf;
	var int user_sleeping;
	var int user_item_no;
	var int user_serverside_sfchk;
	
	PainChance "HeadStun", 96
	PainChance "HeadPlasma", 48
	
	var int user_starting_hp;
	
	States
	{
		Spawn:
			ANNI B 0 NODELAY ACS_NamedExecuteWithResult("FBD_RunMonster", 15, 500) // cyberlord headbox, scale 500%
				//ACS_NamedExecuteAlways("SlaughtermapInit", 0, -1, 0, 0) // required for the headbox to work
				//ANNI B 0 A_SetUserVar("user_head_type", 15) // cyberlord headbox
			ANNI B 0 A_SetUserVar("user_starting_hp", health)
			TNT1 A 0 A_GiveInventory("TargetIsABoss")
			TNT1 A 0 A_GiveInventory("TargetIsAGreatTerribleBoss")
		Stand:
			TNT1 A 0 A_SetUserVar("user_sleeping", 0) // headbox init always sets itself to sleeping, must clear
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI B 10 A_Look
			Loop
			
		See:
			TNT1 A 0
			TNT1 A 0 A_SetUserVar("user_sleeping", 0)
			TNT1 A 0 ACS_NamedExecuteWithResult("FBD_DisplayBossHealth", 0, 0) // boss type 0 = default "boss", 0 - boss is the activator
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85) 
			ANNI V 10 A_FaceTarget
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 5, 0, 81)
			ANSA A 6 A_FaceTarget
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 10, 0, 75)
			ANSA B 6 A_FaceTarget
			TNT1 A 0 ACS_ExecuteAlways(33, 0, 0, 0, 0)
			TNT1 A 0 A_PLaySoundEx("CYBRLRD", 4, 0, 2)
			TNT1 A 0 Radius_Quake (22, 60, 0, 64, 0)
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 11, 0, 73)
			ANSA CDE 4 A_FaceTarget
			
			// punish desrespectful players
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 500, "Missile2") 
			
			ANSA DCF 4 A_FaceTarget
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 500, "Missile2")
			ANSA GFC 4 A_FaceTarget
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 500, "Missile2")
			ANSA CDE 4 A_FaceTarget
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 500, "Missile2")
			ANSA DCF 4 A_FaceTarget
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 500, "Missile2")
			ANSA GFC 4 A_FaceTarget
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 500, "Missile2")			
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 10, 0, 75)
			ANSA B 6 A_FaceTarget
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 5, 0, 81)
			ANSA A 6 A_FaceTarget
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 500, "Missile2")
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI V 10
			TNT1 A 0 A_ChangeFlag("NEVERTARGET", 0)
			Goto Chase
			
		Chase:
			TNT1 A 0
			TNT1 A 0 A_SetUserVar("user_sleeping", 0)
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", 3, 0, 0)
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI BB 2 A_Chase
			ANNI B 1 A_Chase("","")
			ANNI BB 2 A_Chase
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			ANNI CC 2 A_Chase
			ANNI C 3
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", 2, 0, 0)
			ANNI DD 2 A_Chase
			ANNI D 1 A_Chase("","")
			ANNI DD 2 A_Chase
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,-55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")
			ANNI AA 2 A_Chase
			ANNI A 3
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", 3, 0, 0)
			ANNI BB 2 A_Chase
			ANNI B 1 A_Chase("","")
			ANNI BB 2 A_Chase
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			ANNI CC 2 A_Chase
			ANNI C 3
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", 2, 0, 0)
			ANNI DD 2 A_Chase
			ANNI D 1 A_Chase("","")
			ANNI DD 2 A_Chase
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,-55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")
			ANNI AA 2 A_Chase
			ANNI A 3
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", 2, 0, 0)
			ANNI BB 2 A_Chase
			ANNI B 1 A_Chase("","")
			ANNI BB 2 A_Chase
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			ANNI CC 2 A_Chase
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", 3, 0, 0)
			ANNI C 3
			ANNI DD 2 A_Chase
			ANNI D 1 A_Chase("","")
			ANNI DD 2 A_Chase
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,-55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")
			ANNI AA 2 A_Chase
			ANNI A 3
			
			TNT1 A 0 A_PLaySoundEx("CYBRLA1", 4, 0, 2)
			Loop
		
		Idle:
			TNT1 A 0
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI BB 2 A_Wander
			ANNI B 1 A_Look
			ANNI BB 2 A_Wander
			TNT1 A 0 A_SpawnItemEx("CyberLordStomp")
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,55)
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			ANNI CC 2 A_Look
			ANNI C 3 A_Look
			ANNI DD 2 A_Wander
			ANNI D 1 A_Look
			ANNI DD 2 A_Wander
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,-55)
			TNT1 A 0 A_SpawnItemEx("CyberLordStomp")
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI AA 2 A_Look
			ANNI A 1 A_Look
			ANNI A 3 A_Look
			ANNI B 30 A_Look
			TNT1 A 0 A_SetAngle(Angle-30)
			ANNI B 60 A_Look
			TNT1 A 0 A_SetAngle(Angle+30)
			ANNI B 5 A_Look
			TNT1 A 0 A_SetAngle(Angle+30)
			ANNI B 60 A_Look
			TNT1 A 0 A_SetAngle(Angle-30)
			ANNI B 10 A_Look
			Loop
/*			
		Missile:
			TNT1 A 0
			TNT1 A 0 A_ChangeFlag("NEVERTARGET", 0)
			TNT1 a 0 A_jump(64, "Missile2")
			TNT1 A 0 A_JumpIfCloser(700, "missile2")
			//TNT1 A 0 ACS_NamedExecuteWithResult("FrankenHeadAdjustPosition", -55, 0, 435)
			ANNI E 4 A_FaceTarget
			
			ANNI E 6 A_FaceTarget
			TNT1 A 0 A_CustomMissile("CyberlordMissile",200,-80,0,0)
			TNT1 A 0 A_CustomMissile("CyberlordMissile",200,80,0,0)
			ANNI F 4 BRIGHT
			
			ANNI E 6 A_FaceTarget
			TNT1 A 0 A_CustomMissile("CyberlordMissile",200,-80,0,0)
			TNT1 A 0 A_CustomMissile("CyberlordMissile",200,80,0,0)
			ANNI F 4 BRIGHT
			
			Goto Chase
*/			
			
		Missile2:
			TNT1 A 0
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI V 10 A_FaceTarget
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 5, 0, 81)
			ANSA A 6 A_FaceTarget
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 10, 0, 75)
			ANSA B 6 A_FaceTarget
			TNT1 A 0 A_PLaySoundEx("ICOFIRE", 1, 0, 2)
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 11, 0, 73)
			ANSA CDEDC 4 A_CustomMissile("CyberlordMissile2",380,0,random(-10,10),0)
			TNT1 A 0 A_FaceTarget
			ANSA FGFC 4 A_CustomMissile("CyberlordMissile2",380,0,random(-10,10),0)
			TNT1 A 0 A_FaceTarget
			ANSA CDEDC 4 A_CustomMissile("CyberlordMissile2",380,0,random(-10,10),0)
			TNT1 A 0 A_FaceTarget
			ANSA FGFC 4 A_CustomMissile("CyberlordMissile2",380,0,random(-10,10),0)
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 10, 0, 75)
			ANSA B 6 A_FaceTarget
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 5, 0, 81)
			ANSA A 6 A_FaceTarget
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI V 10
			TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
			Goto Chase
		
		Pain:
			TNT1 A 0
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", -13, 0, 85)
			ANNI G 10 A_Pain
			Goto Chase
		Death:
			ANNI H 3
			TNT1 A 0 ACS_NamedExecuteWithResult("DeleteHeadboxMkII")
			TNT1 A 0 A_PLaySoundEx("CYBRLDIE", 4, 0, 2)
			TNT1 A 0 Radius_Quake (4, 170, 0, 64, 0)
			ANNI H 100
			TNT1 AAAA 0 A_CustomMissile ("MuchMeatDeath", 0, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("RidiculousExplosionSpawner", 450, 0, random (0, 360), 2, 90)
			TNT1 AAA 0 A_CustomMissile ("RidiculousExplosionSpawner", 200, 0, random (0, 360), 2, random (0, 60))
			TNT1 AAA 0 A_CustomMissile ("RidiculousExplosionSpawner", 200, 0, random (0, 360), 2, random (0, 20))
			TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("PEPart2SuperFast", 332, 0, random (0, 360), 2, random (0, 160))
			TNT1 AAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 300, 0, random (0, 360), 2, random (70, 90))
			TNT1 AAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 300, 0, random (0, 360), 2, random (20, 90))
			TNT1 AAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 230, 0, random (0, 360), 2, random (70, 90))
			TNT1 AAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 300, 0, random (0, 360), 2, random (20, 90))
			TNT1 A 0 A_SpawnItem("GiantExplosionSound")
			TNT1 A 0 Radius_Quake (9, 170, 0, 64, 0)
			TNT1 A 0 A_Explode(300, 1000)
			ANNI I 3 A_Scream
			ANNI JKL 3
			ANNI M 3 A_NoBlocking
			ANNI NO 3
			ANNI P 3
			ANNI P -1 A_BossDeath
			Stop
	
		// better missile: adding fixed-pattern spread, like the one cyberdemon has,
		// and increasing volley from 2 to 3 shots
		
		Missile:
			TNT1 A 0
			TNT1 A 0 A_ChangeFlag("NEVERTARGET", 0)
			TNT1 A 0 A_GiveInventory("TargetIsAGreatTerribleBoss")
			
			TNT1 a 0 A_jump(64, "Missile2")
			TNT1 A 0 A_JumpIfCloser(700, "missile2")
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 87)
			ANNI E 4 A_FaceTarget
			
			ANNI E 6 A_FaceTarget
			// still fires old unupgraded cheese missiles
			TNT1 A 0 A_CustomMissile("CyberlordMissile",200,-80,0,0)
			TNT1 A 0 A_CustomMissile("CyberlordMissile",200,80,0,0)
			ANNI F 4 BRIGHT
			
			ANNI E 6 A_FaceTarget
			TNT1 A 0 A_CustomMissile("CyberlordMissile",200,-80,-5,0)
			TNT1 A 0 A_CustomMissile("CyberlordMissile",200,80,5,0)
			ANNI F 4 BRIGHT
			
			ANNI E 6 A_FaceTarget
			TNT1 A 0 A_CustomMissile("CyberlordMissile",200,-80,-10,0)
			TNT1 A 0 A_CustomMissile("CyberlordMissile",200,80,10,0)
			ANNI F 4 BRIGHT
			TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
			
			Goto Chase
		
		Pain.HeadStun:
			TNT1 A 0
			TNT1 A 0 A_ChangeFlag("NOPAIN", 1)
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", -13, 0, 85)
			ANNI G 60 A_Pain // cheeselord can be stunned via rocket to the face
			Goto Missile // но потом он мстит, и мстя его ужасна.
		Pain.Head:
		Pain.HeadPlasma:
			TNT1 A 0
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", -13, 0, 85)
			ANNI G 6 A_Pain
			Goto Missile		

	}
}

/*
retired
ACTOR CheeseLordUpgradedMP: CheeseLordUpgraded 8759 { //replaces CyberdemonLordMP {
	DamageFactor "Normal", 0.33
	damagefactor "Desintegrate", 0.4 // bfg 9000 & Unmaker - 60% resistance (vs 80% in the vanilla eday)
	
	DamageFactor "Head", 0.75
	DamageFactor "HeadStun", 0.8
	DamageFactor "HeadPlasma", 0.8
}
*/

// by some reason, modding this class doesn't work. Doing a full copy-paste (so inelegant!)
//***Che: P.S. That train had passed long time ago. I modded the living shit out of this boss.
ACTOR CyberdemonLordMod 17532 {
	//$category "EDAY map-dependent bosses"
	
	//***Che making him darker in Chebskies 2.0
	Translation "16:31=16:40", "32:47=[128,0,0]:[43,0,0]", "80:88=80:99", "89:95=100:111", "96:111=5:8"
	
	// the HMP version
	Game Doom
	Tag "$CYBERLORD2"
	Obituary "$Obituary_CyberdemonLordMod"
	
	Species "Cyberdemons"
	+DONTHARMSPECIES	
	
	Health 20000
	Radius 130
	Height 425 //460 //***Che his true height is 525 (425 + 100 head)
	Mass 999999
	Speed 50
	Monster
	MinMissileChance 160
	+NOPAIN // is cleared after a normal attack
	+NEVERTARGET // prevent NPCs interrupting his roar. Clears after roaring.
	Scale 5.0
	+BOSS 
	+FLOORCLIP
	+NORADIUSDMG
	+DONTMORPH
	+BOSSDEATH
	Damage 60
	damagefactor "sTOMP", 0.0
	damagefactor "ExplosiveImpact", 0.0
	//SeeSound "CYBRLRD"
	PainSound "cyber/pain"
	DeathSound "HUGEEXPL"
	ActiveSound "CYBRLA" //"CYBRLA1"
	//dAMAGEfACTOR "Desintegrate", 0.2
	damagefactor "Desintegrate", 1.0 // bfg 9000 & Unmaker - NO resistance (vs 80% in the vanilla eday)
	
	var int user_head_tid;
	var int user_head_type;
	var int user_head_rel;
	var int user_head_scale;
	var int user_head_xyzf;
	var int user_sleeping;
	var int user_item_no;
	var int user_serverside_sfchk;
	var int user_starting_hp;
	
	PainChance 0
	PainChance "HeadStun", 32
	PainChance "HeadPlasma", 24	
	
	
	States {
		Spawn:
			ANNI B 0 NODELAY ACS_NamedExecuteWithResult("FBD_RunMonster", 15, 500) // cyberlord headbox, scale 500%
			ANNI B 0 A_SetUserVar("user_starting_hp", health)
			TNT1 A 0 A_GiveInventory("IAmAsleep", 1) // limits roar to one time
			TNT1 A 0 A_GiveInventory("TargetIsABoss")
			TNT1 A 0 A_GiveInventory("TargetIsAGreatTerribleBoss")
		Slumber:	
			ANNI B 10 A_Look
			TNT1 A 0 A_SetUserVar("user_sleeping", 0) // headboxes have built-in 
				//  clocking down for performance reasons
				//  absolutely dont need it for unique bosses
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)	
			Loop
		Roar: // a copy-paste of the ancestor classes' See
			TNT1 A 0
			TNT1 A 0 A_SetUserVar("user_sleeping", 0)
			TNT1 A 0 A_TakeInventory("IAmAsleep", 1)
			TNT1 A 0 A_GiveInventory("IAmBusy", 1) // prevents the premptive fire script 
			 // from breaking his states with ThingHate() (see the map's ACS in eday23.wad )
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI V 10 A_FaceTarget
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 5, 0, 81)
			ANSA A 6 A_FaceTarget
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 10, 0, 75)
			ANSA B 6 A_FaceTarget
			// script is defined in map scripts
			TNT1 A 0 ACS_NamedExecuteWithResult("FBD_DisplayBossHealth", 9, 0) // boss type = murderboss, 0 - boss is the activator //ACS_NamedExecuteAlways("DisplayBossHealth", 0, 0, 0, 0) //ACS_ExecuteAlways(33, 0, 0, 0, 0)
			TNT1 A 0 A_PLaySoundEx("CYBRLRD", CHAN_VOICE, 0, 2)
			TNT1 A 0 Radius_Quake (22, 60, 0, 64, 0)
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 11, 0, 73)
			
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 500, "OffendedEruption") // punish desrespectful players brutally
			
			ANSA CDE 4 A_FaceTarget
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 500, "OffendedEruption")
			ANSA DCF 4 A_FaceTarget
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 500, "OffendedEruption")
			ANSA GFC 4 A_FaceTarget
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 500, "OffendedEruption")
			ANSA CDE 4 A_FaceTarget
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 500, "OffendedEruption")
			ANSA DCF 4 A_FaceTarget
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 500, "OffendedEruption")
			ANSA GFC 4 A_FaceTarget
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 500, "OffendedEruption")
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 10, 0, 75)
			ANSA B 6 A_FaceTarget
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 5, 0, 81)
			ANSA A 6 A_FaceTarget
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 500, "OffendedEruption")
			ANNI V 10
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 500, "OffendedEruption")
			TNT1 A 0 A_TakeInventory("IAmBusy", 1)
			TNT1 A 0 A_ChangeFlag("NEVERTARGET", 0)
			ANNI V 1 A_Jump(256, "Chase") // frame never shows in GZDoom or Zandronum single-player
			Wait // Zandronum client skips jump and keeps repeating the last frame until receives update from server
		See:
			TNT1 A 0
			TNT1 A 0 A_JumpIfInventory ("IAmAsleep", 1, "Roar")
			TNT1 A 0 A_JumpIfTargetInLOS("Missile",0,JLOSF_DEADNOJUMP) // instant attack when switching targets
			ANNI V 1 A_Jump(256, "RealChase")
			Wait
		Chase: 
			//  its here to be overwritten by the descendant class
			TNT1 A 0
			TNT1 A 0 A_SetUserVar("user_sleeping", 0)
			ANNI V 1 A_Jump(256, "RealChase")
			Wait
		
		RealChase:
			TNT1 A 0
			TNT1 A 0 A_TakeInventory("HateTargetExpired", 1)
			TNT1 A 0 A_TakeInventory("IAmBusy", 1)
			
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, "MissilePreemptive")
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", CHAN_BODY, 0, 0)
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI BB 2 A_Chase
			ANNI B 1 A_Chase("","")
			ANNI BB 2 A_Chase
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			
			// force switch to the missile state if frustrated, target in sight and is not dead
			TNT1 A 0 A_GiveInventory("CyberlordFrustration", 1)
			TNT1 A 0 A_JumpIfTargetInLOS(2,0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_Jump(256, 2)
			TNT1 A 0 A_JumpIfInventory ("CyberlordFrustration", 40, "MissileNow")

			
			ANNI CC 2 A_Chase
			ANNI C 3
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, "MissilePreemptive")				
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", CHAN_BODY, 0, 0)
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI DD 2 A_Chase
			ANNI D 1 A_Chase("","")
			ANNI DD 2 A_Chase
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,-55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")

			// force switch to the missile state if frustrated, target in sight and is not dead
			TNT1 A 0 A_GiveInventory("CyberlordFrustration", 1)
			TNT1 A 0 A_JumpIfTargetInLOS(2,0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_Jump(256, 2)
			TNT1 A 0 A_JumpIfInventory ("CyberlordFrustration", 40, "MissileNow")


			ANNI AA 2 A_Chase
			ANNI A 3
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, "MissilePreemptive")
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", CHAN_BODY, 0, 0)
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI BB 2 A_Chase
			ANNI B 1 A_Chase("","")
			ANNI BB 2 A_Chase
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)

			// force switch to the missile state if frustrated, target in sight and is not dead
			TNT1 A 0 A_GiveInventory("CyberlordFrustration", 1)
			TNT1 A 0 A_JumpIfTargetInLOS(2,0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_Jump(256, 2)
			TNT1 A 0 A_JumpIfInventory ("CyberlordFrustration", 40, "MissileNow")

			ANNI CC 2 A_Chase
			ANNI C 3
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, "MissilePreemptive")
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", CHAN_BODY, 0, 0)
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI DD 2 A_Chase
			ANNI D 1 A_Chase("","")
			ANNI DD 2 A_Chase
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,-55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")

			// force switch to the missile state if frustrated, target in sight and is not dead
			TNT1 A 0 A_GiveInventory("CyberlordFrustration", 1)
			TNT1 A 0 A_JumpIfTargetInLOS(2,0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_Jump(256, 2)
			TNT1 A 0 A_JumpIfInventory ("CyberlordFrustration", 40, "MissileNow")

			ANNI AA 2 A_Chase
			ANNI A 3
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, "MissilePreemptive")
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", CHAN_BODY, 0, 0)
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI BB 2 A_Chase
			ANNI B 1 A_Chase("","")
			ANNI BB 2 A_Chase
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)

			// force switch to the missile state if frustrated, target in sight and is not dead
			TNT1 A 0 A_GiveInventory("CyberlordFrustration", 1)
			TNT1 A 0 A_JumpIfTargetInLOS(2,0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_Jump(256, 2)
			TNT1 A 0 A_JumpIfInventory ("CyberlordFrustration", 40, "MissileNow")

			ANNI CC 2 A_Chase
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, "MissilePreemptive")
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", CHAN_BODY, 0, 0)
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI C 3
			ANNI DD 2 A_Chase
			ANNI D 1 A_Chase("","")
			ANNI DD 2 A_Chase
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,-55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")
			
			// force switch to the missile state if frustrated, target in sight and is not dead
			TNT1 A 0 A_GiveInventory("CyberlordFrustration", 1)
			TNT1 A 0 A_JumpIfTargetInLOS(2,0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_Jump(256, 2)
			TNT1 A 0 A_JumpIfInventory ("CyberlordFrustration", 40, "MissileNow")
			
			ANNI AA 2 A_Chase
			
			// start growling if getting frustrated
			TNT1 A 0 A_JumpIfInventory ("CyberlordFrustration", 30, 2)
			TNT1 A 0 A_Jump(256, 2) // such a fucked up implementation of "if not"
			TNT1 A 0 A_PLaySoundEx("CYBRLA1", CHAN_VOICE, 0, 2) //A_PLaySoundEx("CYBRLA1", 4, 0, 2)
			ANNI A 3
			
			Loop
		
		Idle:
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI BB 2 A_Wander
			ANNI B 1 A_Look
			ANNI BB 2 A_Wander
			TNT1 A 0 A_SpawnItemEx("CyberLordStomp")
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,55)
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			ANNI CC 2 A_Look
			ANNI C 3 A_Look
			ANNI DD 2 A_Wander
			ANNI D 1 A_Look
			ANNI DD 2 A_Wander
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,-55)
			TNT1 A 0 A_SpawnItemEx("CyberLordStomp")
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI AA 2 A_Look
			ANNI A 1 A_Look
			ANNI A 3 A_Look
			ANNI B 30 A_Look
			TNT1 A 0 A_SetAngle(Angle-30)
			ANNI B 60 A_Look
			TNT1 A 0 A_SetAngle(Angle+30)
			ANNI B 5 A_Look
			TNT1 A 0 A_SetAngle(Angle+30)
			ANNI B 60 A_Look
			TNT1 A 0 A_SetAngle(Angle-30)
			ANNI B 10 A_Look
			Loop
		MissileNow:
			TNT1 A 0
			TNT1 A 0 A_JumpIfInTargetInventory("PlayerIsDead", 1, "Idle") 
			TNT1 A 0 A_TakeInventory("CyberlordFrustration", 50)
			Goto Missile	
		MissilePreemptive: // fires at a hate target placed there by script
			TNT1 A 0
			TNT1 A 0 A_CheckSight(1) // if any player is in sight, cancel preemptive fire 
			Goto CancelHateTarget
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 87)
			TNT1 A 0 A_GiveInventory("IAmBusy", 1)
			ANNI E 2 A_PLaySoundEx("CYBRLA2", CHAN_VOICE, 0, 2) // growl
			ANNI E 2 A_FaceTarget
			Goto MissileIndirect
		CancelHateTarget:
			TNT1 A 0
			TNT1 A 0 A_ClearTarget
			TNT1 A 0 A_GiveInventory("HateTargetExpired", 1, AAPTR_TARGET) // make it self-destruct
			// wait 7 tics for the hate target to delete itself
			ANNI V 7 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			TNT1 AAAAAAAA 0 A_Chase("", "Missile", CHF_DONTMOVE) // attack one of the players visible with very high probability
			Goto Chase
		Missile:
			TNT1 A 0
			TNT1 A 0 A_ChangeFlag("NEVERTARGET", 0)
			TNT1 A 0 A_JumpIfInTargetInventory("PlayerIsDead", 1, "Chase")
			TNT1 A 0 A_GiveInventory("IAmBusy", 1)
			TNT1 A 0 A_TakeInventory("CyberlordFrustration", 10)
			
			// May 19, 2024: no random patterns, fixed attack patterns
			//TNT1 a 0 A_jump(64, "Missile2")
			//ANNI G 1 A_Jump(256, "Missile1")
			//Wait
			Goto Missile1
			
		Missile1:
			TNT1 A 0
			//TNT1 A 0 A_JumpIfCloser(700, "missile2")
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 87)
			ANNI E 4 A_FaceTarget
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 87)
			ANNI E 6 //A_FaceTarget
			
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, "MissileIndirect")
			
			TNT1 A 0 A_JumpIfTargetInLOS(1,0,JLOSF_DEADNOJUMP) 
				// deadnojump here causes him to switch to spam attack if player is dead,
				// behaving like a human grinding a squashed roach down in anger
				
				// A jump with offset of 1 makes a jump to the next frame right after it
				//  i.e. it does nothing *unless* there is a goto operator right after it
				//  the goto operator does not count as a frame so A_JumpXXX(1,... jumps over it
			goto MissileIndirect // is not a frame
			
			// the next frame at offset 1:
			TNT1 A 0 A_FaceTarget(90, 90)//, 0, 0)//, FAF_BOTTOM) //, -50) //Script error, "chebskies.pk3:decorate.cybrlrd" line 198: Expected ')', got ','.
			// p. s. it seems Zandronum only accepts two parameters: max angle and max pitch
 
			// unlike the default call, sets caller's pitch
			// the pitch is then used in A_CustomMissile(), which otherwise has vo viable combinations
			// for combining aim pitch with a random offset
			
			
			// the problem with original targeting is HE ALWAYS AIMS TOO HIGH. All those fireballs just fly over your head
			// so i had to do *something* - in this case, switch him from proper aimed pitch to a random pitch
			// not dependent on target's position at all
			
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,0,0)// this makes Zandronum to crash on startup: //, 1 | CMF_OFFSETPITCH | CMF_SAVEPITCH, VectorAngle(200, GetDistance()) + random(3, 6))
			// passing 0 here as flags does NOT work as intended, i suspect a hidden variable in play.
			// the aiming mode is affected by previously used aiming modes
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,0,0)//, 1 | CMF_OFFSETPITCH | CMF_SAVEPITCH, VectorAngle(200, GetDistance()) + random(3, 6))
			ANNI F 4 BRIGHT
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 87)
			ANNI E 6 //A_FaceTarget
			
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			
			TNT1 A 0 A_JumpIfTargetInLOS(1,0,JLOSF_DEADNOJUMP)
			goto MissileIndirect
			TNT1 A 0 A_FaceTarget(90, 90)//, 0, 0, FAF_BOTTOM) 
			
			
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,-5,0)
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,5,0)
			ANNI F 4 BRIGHT
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 87)
			ANNI E 6 //A_FaceTarget
			
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			
			TNT1 A 0 A_JumpIfTargetInLOS(1,0,JLOSF_DEADNOJUMP)
			goto MissileIndirect
			TNT1 A 0 A_FaceTarget(90, 90)//, 0, 0, FAF_BOTTOM) 
			
			
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,-10,0)
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,10,0)
			ANNI F 4 BRIGHT
			
			//Loop // the true horror: will keep firing as long as you are in sight
			// NO! Too too dedli!
			
			TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
			
			// May 19, 2024: changed him to fixed pattern, three double-shots, then fire breath if target is alive and in sight, saturation attack otherwise.
			TNT1 A 0 A_JumpIfTargetInLOS("Missile2",0,JLOSF_DEADNOJUMP) 
			goto MissileIndirect
			
			//TNT1 A 0 A_TakeInventory("IAmBusy", 1)
			//Goto Chase
		MissileIndirect: // saturation attack (target out of sight)
			// when losing sight of you he begins spraying with great ferocity:
			TNT1 A 0
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,random(-1, 5), CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,random(-5, 1), CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			
			// this means he will keep firing as long as you keep popping in and out of cover
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, 2) // Saturation only on predictive heuristics
			TNT1 A 0 A_JumpIfTargetInLOS("Missile",0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_CheckSight(1) // if any player is in sight, cancel preemptive fire 
			Goto CancelHateTarget
			// deadnojump here, on the other hand, works as intended, breaking the attack cycle not to attack dead bodies endlessly
			
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 87)
			ANNI F 4 BRIGHT
			ANNI E 6
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,random(-1, 6), CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,random(-6, 1),  CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, 2)
			TNT1 A 0 A_JumpIfTargetInLOS("Missile",0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_CheckSight(1) // if any player is in sight, cancel preemptive fire 
			Goto CancelHateTarget			
			ANNI F 4 BRIGHT
			ANNI E 6
			
			TNT1 A 0 A_JumpIfTargetInLOS("Missile",0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,random(-1, 7),  CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,random(-7, 1),  CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, 2)
			TNT1 A 0 A_JumpIfTargetInLOS("Missile",0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_CheckSight(1) // if any player is in sight, cancel preemptive fire 
			Goto CancelHateTarget			
			ANNI F 4 BRIGHT
			ANNI E 6
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,random(-1, 8),  CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,random(-8, 1),  CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			ANNI F 4 BRIGHT
			TNT1 A 0 A_TakeInventory("IAmBusy", 1)
			TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
			ANNI V 1 A_Jump(256, "Chase")
			Wait
		
		Missile2: // fire breath
			
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI V 10 A_FaceTarget
			TNT1 A 0 A_JumpIfInTargetInventory("PlayerIsDead", 1, "Chase")
			TNT1 A 0 A_GiveInventory("IAmBusy", 1)
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 5, 0, 81)
			ANSA A 6
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 10, 0, 75)
			ANSA B 6 //A_FaceTarget
			
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, "Missile2Indirect")
			TNT1 A 0 A_JumpIfTargetInLOS(1,0,JLOSF_DEADNOJUMP)
			goto Missile2Indirect
			TNT1 A 0 A_FaceTarget
			
			TNT1 A 0 A_PLaySoundEx("ICOFIRE", CHAN_VOICE, 0, 2) // he can't roar and breathe fire at the same time, right?
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 11, 0, 73)
			ANSA CDEDC 4 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-10,10),CMF_AIMOFFSET | CMF_OFFSETPITCH | CMF_SAVEPITCH, random(0,1))
			TNT1 A 0 //A_FaceTarget
			
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			TNT1 A 0 A_JumpIfTargetInLOS(1,0,JLOSF_DEADNOJUMP)
			goto Missile2Indirect
			TNT1 A 0 A_FaceTarget
			
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 11, 0, 73)
			ANSA FGFC 4 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-10,10),CMF_AIMOFFSET | CMF_OFFSETPITCH | CMF_SAVEPITCH, random(1,2))
			TNT1 A 0 //A_FaceTarget
			
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			TNT1 A 0 A_JumpIfTargetInLOS(1,0,JLOSF_DEADNOJUMP)
			goto Missile2Indirect
			TNT1 A 0 A_FaceTarget
			
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 11, 0, 73)
			ANSA CDEDC 4 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-10,10),CMF_AIMOFFSET | CMF_OFFSETPITCH | CMF_SAVEPITCH, random(0,2))
			TNT1 A 0 //A_FaceTarget
			
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			TNT1 A 0 A_JumpIfTargetInLOS(1,0,JLOSF_DEADNOJUMP)
			goto Missile2Indirect
			TNT1 A 0 A_FaceTarget
			
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 11, 0, 73)
			ANSA FGFC 4 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-10,10),CMF_AIMOFFSET | CMF_OFFSETPITCH | CMF_SAVEPITCH, random(0,1))

			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 10, 0, 75)
			ANSA B 6 A_FaceTarget
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 5, 0, 81)
			ANSA A 6 A_FaceTarget
			
			
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			TNT1 A 0 A_JumpIfTargetInLOS(1,0,JLOSF_DEADNOJUMP)
			goto Missile2Indirect
			TNT1 A 0 A_FaceTarget			
			TNT1 A 0 A_TakeInventory("IAmBusy", 1)
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI V 10
			TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
			ANNI V 1 A_Jump(256, "Chase")
			Wait
			
		Missile2Indirect:  // fire breath saturation attack (target out of sight)
			TNT1 A 0 A_PLaySoundEx("ICOFIRE", CHAN_VOICE, 0, 2)
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 11, 0, 73)
			ANSA CDEDC 4 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-6, 6), CMF_AIMDIRECTION | CMF_SAVEPITCH, random(-6, -4))
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, 2)
			TNT1 A 0 A_JumpIfTargetInLOS("Missile2")
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			ANSA FGFC 4 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-8, 8), CMF_AIMDIRECTION | CMF_SAVEPITCH, random(-8, -5))
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, 2)
			TNT1 A 0 A_JumpIfTargetInLOS("Missile2")
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 11, 0, 73)
			ANSA CDEDC 4 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-12, 12), CMF_AIMDIRECTION | CMF_SAVEPITCH, random(-12, -6))
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, 2)
			TNT1 A 0 A_JumpIfTargetInLOS("Missile2")
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			//TNT1 A 0 ACS_NamedExecuteWithResult("FrankenHeadAdjustPosition", 55, 0, 385)
			ANSA FGFC 4 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-14, 14), CMF_AIMDIRECTION | CMF_SAVEPITCH, random(-16, -10))
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, 2)
			TNT1 A 0 A_JumpIfTargetInLOS("Missile2")
			TNT1 A 0 A_TakeInventory("IAmBusy", 1)
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 10, 0, 75)
			ANSA B 6 A_FaceTarget
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 5, 0, 81)
			ANSA A 6 A_FaceTarget
			TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
			ANNI V 1 A_Jump(256, "Chase")
			Wait
			
		OffendedEruption: // a simplified clone of the second form's saturation attack

			TNT1 A 0
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 87)
			TNT1 A 0 A_PLaySoundEx("ICOFIRE", CHAN_WEAPON, 0, 2)
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,random(-1, 5), CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,random(-5, 1), CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))

			ANNI FFEEE 2 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-6, 6), CMF_AIMOFFSET | CMF_OFFSETPITCH | CMF_SAVEPITCH, random(2, 5))
			
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 87)
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,random(-1, 6), CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,random(-6, 1),  CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			
			ANNI FFEEE 2 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-8, 8), CMF_AIMOFFSET | CMF_OFFSETPITCH | CMF_SAVEPITCH, random(1, 4))
			
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 87)
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,random(-1, 7),  CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,random(-7, 1),  CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))

			ANNI FFEEE 2 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-12, 12), CMF_AIMOFFSET | CMF_OFFSETPITCH | CMF_SAVEPITCH, random(1, 3))
			
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,random(-1, 8),  CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,random(-8, 1),  CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			ANNI FFFF 4 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-14, 14), CMF_AIMOFFSET | CMF_OFFSETPITCH | CMF_SAVEPITCH, random(2, 3))
			TNT1 A 0 A_TakeInventory("IAmBusy", 1)
			ANNI G 1 A_Jump(256, "Chase")
			Wait	
		
		Pain:
		Pain.Head:
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", -13, 0, 85)
			ANNI G 10 A_Pain
			TNT1 A 0 A_TakeInventory("IAmBusy", 1)
			ANNI G 1 A_Jump(256, "Chase")
			Wait
		Pain.HeadStun:
		Pain.HeadPlasma:
			ANNI G 0 A_ChangeFlag("NOPAIN", 1) // gets reset after the Missile state concludes
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", -13, 0, 85)
			ANNI G 20 A_Pain
			TNT1 A 0 A_TakeInventory("IAmBusy", 1)
			ANNI G 1 A_Jump(256, "Missile")
			Wait
		
		Death: 
			// to be overwritten by the descendant class
			ANNI W 3
			Goto FinalDeath
		FinalDeath:
			TNT1 A 0
			TNT1 A 0 ACS_NamedExecuteWithResult("DeleteHeadboxMkII")
			TNT1 A 0 A_PLaySoundEx("CYBRLDIE", CHAN_VOICE, 0, 2)
			TNT1 A 0 Radius_Quake (4, 170, 0, 64, 0)
			ANNI W 100
			TNT1 AAAA 0 A_CustomMissile ("MuchMeatDeath", 0, 0, random (0, 360), 2, random (0, 160))
			TNT1 A 0 A_CustomMissile ("RidiculousExplosionSpawner", 450, 0, random (0, 360), 2, 90)
			TNT1 AAA 0 A_CustomMissile ("RidiculousExplosionSpawner", 200, 0, random (0, 360), 2, random (0, 60))
			TNT1 AAA 0 A_CustomMissile ("RidiculousExplosionSpawner", 200, 0, random (0, 360), 2, random (0, 20))
			TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("PEPart2SuperFast", 332, 0, random (0, 360), 2, random (0, 160))
			TNT1 AAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 300, 0, random (0, 360), 2, random (70, 90))
			TNT1 AAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 300, 0, random (0, 360), 2, random (20, 90))
			TNT1 AAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 230, 0, random (0, 360), 2, random (70, 90))
			TNT1 AAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("BloodMistXXBig", 300, 0, random (0, 360), 2, random (20, 90))
			TNT1 A 0 A_SpawnItem("GiantExplosionSound")
			TNT1 A 0 Radius_Quake (9, 170, 0, 64, 0)
			TNT1 A 0 A_Explode(300, 1000)
			ANNI I 3 A_Scream
			ANNI JKL 3
			ANNI M 3 A_NoBlocking
			ANNI NO 3
			ANNI P 3
			TNT1 A 0 ACS_NamedExecuteAlways("BossDies", 0, 0, 0, 0)
			ANNI P -1 A_BossDeath
			Stop
			
	}
}

/*
retired
ACTOR CyberdemonLordModMP: CyberdemonLordMod 17533
{
	DamageFactor "Normal", 0.33
	damagefactor "Desintegrate", 0.4 // bfg 9000 & Unmaker - 60% resistance (vs 80% in the vanilla eday)
	damagefactor "Head", 0.6
	damagefactor "HeadStun", 0.8
	damagefactor "HeadPlasma", 0.8
}
*/

ACTOR CyberdemonLordModUV: CyberdemonLordMod 17537 // also ised on Hordes -- only the minions change
{
	+MISSILEMORE
	Tag "$CYBERLORD3"
	Obituary "$Obituary_CyberdemonLordModUV"
	
	damagefactor "Desintegrate", 0.75 // bfg 9000 & Unmaker - 25% resistance
	damagefactor "HeadPlasma", 0.75	
	
	States {
		Death: 
			ANNI W 3

			TNT1 A 0 A_GiveInventory("IAmBusy", 1)			
			TNT1 A 0 A_ChangeFlag("SHOOTABLE", 0)
			TNT1 A 0 ACS_NamedExecuteWithResult("DeleteHeadboxMkII")

			// just kidding
			TNT1 A 0 A_PLaySoundEx("CYBRLDIE", CHAN_VOICE, 0, 2)
			TNT1 A 0 Radius_Quake (4, 170, 0, 64, 0)
			ANNI W 120
			ANNI WWWXWWWWXWXWWWXYXWWWXYYXWWXYYXW 2
			ANNI W 2 ACS_NamedExecuteAlways("BossSummonMinions", 0, 0, 0, 0)
			TNT1 A 0 A_CHangeFlag("THRUACTORS", 1)
			TNT1 A 0 A_ChangeFlag("NOBLOCKMAP", 1)			
			ANNI W 1 A_Jump(256, "SecondWind")
			Wait
		SecondWind:
			//TNT1 A 0 A_SpawnItemEx("CyberdemonLordModUVSecondWind",0,0,0,0,0,0,0,SXF_TRANSFERSPECIAL,0)//,tid)
			TNT1 A 0 A_SpawnItemEx("CyberdemonLordModUVSecondWind",0,0,0,0,0,0,0,SXF_TRANSFERSPECIAL | SXF_CLEARCALLERSPECIAL,0,tid)
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 ACS_NamedExecuteWithResult("DeleteHeadboxMkII")
			TNT1 A 30 // without this, the headbox deleting script fails 
						// because it gets detached and runs ownerless
			Stop
			
	}		
}

ACTOR CyberdemonLordModUVMP: CyberdemonLordModUV 17538
{
	+MISSILEEVENMORE
	DamageFactor "Normal", 0.33
	damagefactor "Desintegrate", 0.4 // bfg 9000 & Unmaker - 60% resistance (vs 80% in the vanilla eday)
	States {
		SecondWind:
			//TNT1 A 0 A_SpawnItemEx("CyberdemonLordModUVMPSecondWind",0,0,0,0,0,0,0,SXF_TRANSFERSPECIAL,0)//,tid)
			TNT1 A 0 A_SpawnItemEx("CyberdemonLordModUVMPSecondWind",0,0,0,0,0,0,0,SXF_TRANSFERSPECIAL | SXF_CLEARCALLERSPECIAL,0,tid)
			TNT1 A 0 A_NoBlocking
			TNT1 A 0 ACS_NamedExecuteWithResult("DeleteHeadboxMkII")
			TNT1 A 30 // without this, the headbox deleting script fails 
						// because it gets detached and runs ownerless
			Stop
	}
}

ACTOR CyberdemonLordModUVSecondWind: CyberdemonLordModUV { // a red-hot volcano that erupts in your direction as soon as there is a line of sight
	+BRIGHT
	+NOPAIN
	+MISSILEEVENMORE
	// red hot
	Translation "80:86=224:231", "87:88=160:160", "89:93=212:223", "94:111=173:191", "1:1=0:0", "16:18=4:4", "19:25=224:231", "26:33=213:219", "34:47=176:189"
	Tag "$CYBERLORD4"
	Obituary "$Obituary_CyberdemonLordModUVSecondWind"
	Health 6666
	Speed 63 //75 was too much!
	damagefactor "Desintegrate", 0.6 // bfg 9000 & Unmaker - 40% resistance (vs 80% in the vanilla eday)
	States {
		Spawn:
			ANSA B 1
			// lo and behold, NODELAY doesn't work if you spawn the actor via A_SpawnItemEx
			ANSA B 0 ACS_NamedExecuteWithResult("FBD_RunMonster", 15, 500) // cyberlord headbox, scale 500%
			TNT1 A 0 A_SetUserVar("user_starting_hp", health)
			TNT1 A 0 A_GiveInventory("IAmAsleep", 1) // without this, he insta-attacks instead of roaring
			TNT1 A 0 A_GiveInventory("IAmBusy", 1) // prevents the premptive fire script 
						                           // from breaking his states with ThingHate() (see the map's ACS)
			TNT1 A 0 A_GiveInventory("TargetIsAGreatTerribleBoss")
			ANSA B 1
			//doesn't work //Goto Roar
			// a copy-paste of the Roar state
			ANSA B 6 A_FaceTarget
			TNT1 A 0 A_SetUserVar("user_sleeping", 0)
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 11, 0, 73, 1) // force create //ACS_NamedExecuteAlways("FrankenHeadForceCreate", 0, 55, 0, 365)
			// script is defined in map scripts
			TNT1 A 0 A_PLaySoundEx("CYBRLRD2", 4, 0, 2) //"CYBRLRD", 4, 0, 2)
			TNT1 A 0 Radius_Quake (22, 60, 0, 64, 0)
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 11, 0, 73)
			
			ANSA CDE 4 A_FaceTarget
			
			TNT1 A 0 ACS_NamedExecuteWithResult("FBD_DisplayBossHealth", 9, 0) // boss type 9 = murderboss, 0 - boss is the activator //ACS_NamedExecuteAlways("DisplayBossHealth", 0, 0, 0, 0) //ACS_ExecuteAlways(33, 0, 0, 0, 0) //ACS_NamedExecuteAlways("DisplayBossHealth", 0, 0, 0, 0) //ACS_ExecuteAlways(33, 0, 0, 0, 0)
			
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 200, "OffendedEruption")
			ANSA DCF 4 A_FaceTarget
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 200, "OffendedEruption")
			ANSA GFC 4 A_FaceTarget
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 200, "OffendedEruption")
			ANSA CDE 4 A_FaceTarget
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 200, "OffendedEruption")
			
			// the new sound is 1.2 seconds long -- plenty of time!
			
//			ANSA DCF 4 A_FaceTarget
//			TNT1 A 0 A_JumpIf(user_starting_hp - health > 200, "OffendedEruption")
//			ANSA GFC 4 A_FaceTarget
//			TNT1 A 0 A_JumpIf(user_starting_hp - health > 200, "OffendedEruption")
			
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 10, 0, 75)
			ANSA B 6 A_FaceTarget
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 5, 0, 81)
			ANSA A 6 A_FaceTarget
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 200, "OffendedEruption")
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", -13, 0, 85)
			ANNI G 10
			TNT1 A 0 A_JumpIf(user_starting_hp - health > 200, "OffendedEruption")
			TNT1 A 0 A_TakeInventory("IAmAsleep", 1)
			TNT1 A 0 A_TakeInventory("IAmBusy", 1)
			Goto Chase			
		Chase:
			TNT1 A 0
			ANNI V 1 A_Jump(256, "RealChase")
			Wait
		See:
			TNT1 A 0
			TNT1 A 0 A_JumpIfInventory ("IAmAsleep", 1, "Roar")
			TNT1 A 0 A_JumpIfTargetInLOS("MissileNow",0,JLOSF_DEADNOJUMP) // instant attack when switching targets
			ANNI V 1 A_Jump(256, "RealChase")
			Wait
		MissilePreemptive: // fires at a hate target placed there by script
			TNT1 A 0
			TNT1 A 0 A_GiveInventory("IAmBusy", 1)
			TNT1 A 0 A_TakeInventory("CyberlordFrustration", 50)
			ANNI E 2 A_PLaySoundEx("CYBRLA2", 4, 0, 2) // growl
			ANNI E 2 A_FaceTarget
			Goto MissileIndirect			
		MissileNow:
			TNT1 A 0
			TNT1 A 0 A_JumpIfInTargetInventory("PlayerIsDead", 1, "Idle") 
			Goto Missile
		Death:
			TNT1 A 0
			Goto FinalDeath
		RealChase:
			TNT1 A 0
			TNT1 A 0 A_TakeInventory("HateTargetExpired", 1)
			TNT1 A 0 A_TakeInventory("IAmBusy", 1)
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", CHAN_BODY, 0, 0)
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI BB 2 A_Chase
			ANNI B 1 A_Chase("","")
			ANNI BB 2 A_Chase
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			TNT1 A 0 A_JumpIfInventory ("CyberlordFrustration", 40, 2) // had enough
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, 2) // do NOT apply to hate targets: that effectively paralyzes him because you keeep moving around and he keeps erupting but never moves!
			TNT1 A 0 A_JumpIfTargetInLOS("MissileNow",0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_GiveInventory("CyberlordFrustration", 1)
			ANNI CC 1 A_Chase
			ANNI C 2
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", CHAN_BODY, 0, 0)
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI DD 2 A_Chase
			ANNI D 1 A_Chase("","")
			ANNI DD 2 A_Chase
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,-55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")
			TNT1 A 0 A_JumpIfInventory ("CyberlordFrustration", 40, 2) // had enough
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, 2) // do NOT apply to hate targets: that effectively paralyzes him because you keeep moving around and he keeps erupting but never moves!
			TNT1 A 0 A_JumpIfTargetInLOS("MissileNow",0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_GiveInventory("CyberlordFrustration", 1)
			ANNI AA 1 A_Chase
			ANNI A 2
			
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", CHAN_BODY, 0, 0)
			ANNI BB 2 A_Chase
			ANNI B 1 A_Chase("","")
			ANNI BB 2 A_Chase
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			TNT1 A 0 A_JumpIfInventory ("CyberlordFrustration", 40, 2) // had enough
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, 2) // do NOT apply to hate targets: that effectively paralyzes him because you keeep moving around and he keeps erupting but never moves!
			TNT1 A 0 A_JumpIfTargetInLOS("MissileNow",0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_GiveInventory("CyberlordFrustration", 1)
			ANNI CC 1 A_Chase
			ANNI C 2
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", CHAN_BODY, 0, 0)
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI DD 2 A_Chase
			ANNI D 1 A_Chase("","")
			ANNI DD 2 A_Chase
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,-55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")
			TNT1 A 0 A_JumpIfInventory ("CyberlordFrustration", 40, 2) // had enough
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, 2) // do NOT apply to hate targets: that effectively paralyzes him because you keeep moving around and he keeps erupting but never moves!
			TNT1 A 0 A_JumpIfTargetInLOS("MissileNow",0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_GiveInventory("CyberlordFrustration", 1)
			ANNI AA 1 A_Chase
			ANNI A 2
			
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", CHAN_BODY, 0, 0)
			ANNI BB 2 A_Chase
			ANNI B 1 A_Chase("","")
			ANNI BB 2 A_Chase
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			TNT1 A 0 A_JumpIfInventory ("CyberlordFrustration", 40, 2) // had enough
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, 2) // do NOT apply to hate targets: that effectively paralyzes him because you keeep moving around and he keeps erupting but never moves!
			TNT1 A 0 A_JumpIfTargetInLOS("MissileNow",0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_GiveInventory("CyberlordFrustration", 1)
			ANNI CC 1 A_Chase
			TNT1 A 0 A_PLaySoundEx("CYBRLWLK", CHAN_BODY, 0, 0)
			"----" A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 85)
			ANNI C 2
			ANNI DD 2 A_Chase
			ANNI D 1 A_Chase("","")
			ANNI DD 2 A_Chase
			EXPL A 0 Radius_Quake (2, 54, 0, 15, 0)
			TNT1 A 0 A_SpawnItemEx("CyberStep",12,-55)
			TNT1 A 0 A_CustomMissile("CyberLordStomp")
			TNT1 A 0 A_JumpIfInventory ("CyberlordFrustration", 40, 2) // had enough
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, 2) // do NOT apply to hate targets: that effectively paralyzes him because you keeep moving around and he keeps erupting but never moves!
			TNT1 A 0 A_JumpIfTargetInLOS("MissileNow",0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_GiveInventory("CyberlordFrustration", 1)
			ANNI AA 1 A_Chase
			ANNI A 2
			
			//TNT1 A 0 A_PLaySoundEx("CYBRLA1", 4, 0, 2)
			// start growling if getting frustrated
			TNT1 A 0 A_JumpIfInventory ("CyberlordFrustration", 20, 2)
			TNT1 A 0 A_Jump(256, 2) // such a fucked up implementation of "if not"
			TNT1 A 0 A_PLaySoundEx("CYBRLA1", CHAN_VOICE, 0, 2) //A_PLaySoundEx("CYBRLA1", 4, 0, 2)
			TNT1 A 0 // a stub frame to jump to
			
			Loop



		Missile:
		
			// a FUN and BALANCED combo attack of fireballs and fire breath at the same time :D
		
			TNT1 A 0
			TNT1 A 0 A_ChangeFlag("NEVERTARGET", 0)
			TNT1 A 0 A_JumpIfInTargetInventory("PlayerIsDead", 1, "Chase")
			TNT1 A 0 A_GiveInventory("IAmBusy", 1)

			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 87)
			ANNI E 1 A_FaceTarget
			
			TNT1 A 0 A_PLaySoundEx("ICOFIRE", CHAN_WEAPON, 0, 2)
			
			ANNI EEE 3 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-10,10),CMF_AIMOFFSET | CMF_OFFSETPITCH | CMF_SAVEPITCH, random(2,4)) // pitch it down!
			
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, "MissileIndirect")
			
			TNT1 A 0 A_JumpIfTargetInLOS(1,0,JLOSF_DEADNOJUMP) 
				// deadnojump here causes him to switch to spam attack if player is dead,
				// behaving like a human grinding a squashed roach down in anger
				
				// A jump with offset of 1 makes a jump to the next frame right after it
				//  i.e. it does nothing *unless* there is a goto operator right after it
				//  the goto operator does not count as a frame so A_JumpXXX(1,... jumps over it
			goto MissileIndirect // is not a frame
			
			// the next frame at offset 1:
			TNT1 A 0 A_FaceTarget(90, 90)//, 0, 0)//, FAF_BOTTOM) //, -50) //Script error, "chebskies.pk3:decorate.cybrlrd" line 198: Expected ')', got ','.
			// p. s. it seems Zandronum only accepts two parameters: max angle and max pitch
 
			// unlike the default call, sets caller's pitch
			// the pitch is then used in A_CustomMissile(), which otherwise has vo viable combinations
			// for combining aim pitch with a random offset
			
			
			// the problem with original targeting is HE ALWAYS AIMS TOO HIGH. All those fireballs just fly over your head
			// so i had to do *something* - in this case, switch him from proper aimed pitch to a random pitch
			// not dependent on target's position at all
			
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, "MissileIndirect")
			
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,0,0)// this makes Zandronum to crash on startup: //, 1 | CMF_OFFSETPITCH | CMF_SAVEPITCH, VectorAngle(200, GetDistance()) + random(3, 6))
			// passing 0 here as flags does NOT work as intended, i suspect a hidden variable in play.
			// the aiming mode is affected by previously used aiming modes
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,0,0)//, 1 | CMF_OFFSETPITCH | CMF_SAVEPITCH, VectorAngle(200, GetDistance()) + random(3, 6))
			
			//TNT1 A 0 ACS_NamedExecuteWithResult("FrankenHeadAdjustPosition", 0, 0, 455)
			ANNI FFEE 3 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-10,10),CMF_AIMOFFSET | CMF_OFFSETPITCH | CMF_SAVEPITCH, random(1,2))
			
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			
			TNT1 A 0 A_JumpIfTargetInLOS(1,0,JLOSF_DEADNOJUMP)
			goto MissileIndirect
			TNT1 A 0 A_FaceTarget(90, 90)//, 0, 0, FAF_BOTTOM) 
			
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 87)
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,-5,0)
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,5,0)
			ANNI FFEE 3 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-10,10),CMF_AIMOFFSET | CMF_OFFSETPITCH | CMF_SAVEPITCH, random(0,2))
			
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			
			TNT1 A 0 A_JumpIfTargetInLOS(1,0,JLOSF_DEADNOJUMP)
			goto MissileIndirect
			TNT1 A 0 A_FaceTarget(90, 90)//, 0, 0, FAF_BOTTOM) 
			
			
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 87)
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,-10,0)
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,10,0)
			ANNI FFFF 3 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-10,10),CMF_AIMOFFSET | CMF_OFFSETPITCH | CMF_SAVEPITCH, random(0,1))
			
			Loop // the true horror: will keep firing as long as you are in sight
			
			//TNT1 A 0 A_TakeInventory("IAmBusy", 1)
			//Goto Chase
		MissileIndirect: // saturation attack (target out of sight)

			TNT1 A 0
			TNT1 A 0 A_PLaySoundEx("ICOFIRE", CHAN_WEAPON, 0, 2)
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,random(-1, 5), CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,random(-5, 1), CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			
			// this means he will keep firing as long as you keep popping in and out of cover
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, 2)
			TNT1 A 0 A_JumpIfTargetInLOS("Missile",0,JLOSF_DEADNOJUMP)
			// deadnojump here, on the other hand, works as intended, breaking the attack cycle not to attack dead bodies endlessly
			TNT1 A 0 A_CheckSight(1) // if any player is in sight, cancel preemptive fire 
			Goto CancelHateTarget
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 87)
			ANNI FFEEE 2 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-6, 6), CMF_AIMOFFSET | CMF_OFFSETPITCH | CMF_SAVEPITCH, random(2, 5))
			
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,random(-1, 6), CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,random(-6, 1),  CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, 2)
			TNT1 A 0 A_JumpIfTargetInLOS("Missile",0,JLOSF_DEADNOJUMP)	
			TNT1 A 0 A_CheckSight(1) // if any player is in sight, cancel preemptive fire 
			Goto CancelHateTarget
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 87)
			ANNI FFEEE 2 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-8, 8), CMF_AIMOFFSET | CMF_OFFSETPITCH | CMF_SAVEPITCH, random(1, 4))
			
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, 2)
			TNT1 A 0 A_JumpIfTargetInLOS("Missile",0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,random(-1, 7),  CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,random(-7, 1),  CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			TNT1 A 0 A_JumpIfInventory ("HateTargetExpired", 1, "Chase")
			TNT1 A 0 A_JumpIfInTargetInventory("TargetIsAILeadingTracker", 1, 2)
			TNT1 A 0 A_JumpIfTargetInLOS("Missile",0,JLOSF_DEADNOJUMP)
			TNT1 A 0 A_CheckSight(1) // if any player is in sight, cancel preemptive fire 
			Goto CancelHateTarget			
			TNT1 A 0 ACS_NamedExecuteWithResult("AdjustHeadboxMkII", 0, 0, 87)
			ANNI FFEEE 2 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-12, 12), CMF_AIMOFFSET | CMF_OFFSETPITCH | CMF_SAVEPITCH, random(1, 3))
			
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,-80,random(-1, 8),  CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			TNT1 A 0 A_CustomMissile("InhumaneCyberLordMissile",200,80,random(-8, 1),  CMF_AIMDIRECTION | CMF_SAVEPITCH,random(-16, -6))
			ANNI FFFF 4 A_CustomMissile("ScorchingCyberLordMissile2",380,0,random(-14, 14), CMF_AIMOFFSET | CMF_OFFSETPITCH | CMF_SAVEPITCH, random(2, 3))
			TNT1 A 0 A_TakeInventory("IAmBusy", 1)
			ANNI G 1 A_Jump(256, "Chase")
			Wait
		
		Missile2: // fire breath
			TNT1 A 0
			Goto Misile
		Missile2Indirect:	
			TNT1 A 0
			Goto MisileIndirect
	}
}


ACTOR CyberdemonLordModUVMPSecondWind: CyberdemonLordModUVSecondWind {
	DamageFactor "Normal", 0.33
	damagefactor "Desintegrate", 0.4 // bfg 9000 & Unmaker - 60% resistance (vs 80% in the vanilla eday)
}

actor InhumaneExplosion: BarrelExplosion
{

	States   {
		// fix may 2024: the fucking GOTO again: was using ancestor's death instead of this one
		// Edit: fucking "breaking infinite loop at offset from spawn state 0"
		// Can Zandronum do *anything* normally as a client? >:(
		Spawn:
			TNT1 A 0
			//TNT1 A 0 A_Jump(256, "Death")
			//Loop // fucking multiplayer bug again //Goto Death
			Goto Death
		Death:
			TNT1 A 0
			TNT1 A 0 A_SpawnItem("WhiteShockwaveBig")
			TNT1 A 3
			TNT1 A 0 A_Explode(100,300) // radius half again as a barrel explosion
			TNT1 A 0 A_Explode(60,600)
			Stop
	}
}

actor InhumanePureExplosion: InhumaneExplosion
{

	States   {
		Spawn:
			TNT1 A 0
			Goto Death
		Death:
			TNT1 A 0
			TNT1 A 0 A_SpawnItem("WhiteShockwaveBig")
			TNT1 A 3
			TNT1 A 0 A_Explode(120,300) 
			Stop
	}
}

actor InhumaneFireExplosion: InhumaneExplosion
{

	Damagetype "Fire"
	States   {
		Spawn:
			TNT1 A 0
			Goto Death
		Death:
			TNT1 A 5
			TNT1 A 0 A_Explode(40,450) 
			Stop
	}
}

ACTOR CybrlrdNuclearMushroom: NuclearMushroom
{
	Damagetype "Fire"
	XScale 4.5
	YScale 4.5
	States	{
		Spawn:
			BFEI ABCDEFGHIJKLMNOPQRSTUV 2 BRIGHT
			Stop
	}	
}

ACTOR InhumaneCyberLordMissile: CyberLordMissile
{
	// ancestor's:
	 Damagetype "ExplosiveImpact"
	// "Damage 100", means 1..800
	Damage (Random(1,1)) // direct hit
	
	// composition 
	// 300 ExplosiveImpact in a radius of 128
	// 120 ExplosiveImpact in a radius of 300
	// 40 Fire in a radius of 450
	
	// direct hit: parent's damage (100..800) + 500 + 120 + 40 = 760..1460
	
	
	Obituary "%o was smeared by Cyber Demon Lord's overwhelming fireball"
    States  {
		Death:
			// no such actor anywhere
			//TNT1 A 0 A_SpawnItem ("BigRicoChet", 0, -15)
			TNT1 A 0 A_SpawnItemEx ("DetectFloorCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
			TNT1 A 0 A_SpawnItemEx ("DetectCeilCrater",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
			TNT1 A 0 A_SpawnItemEx ("ExplosionFlareSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
			//TNT1 A 0 A_SpawnItemEx ("InhumaneExplosion",0,0,30,0,0,0,0,SXF_NOCHECKPOSITION,0)
			TNT1 A 0 A_SpawnItemEx ("InhumanePureExplosion",0,0,30,0,0,0,0,SXF_NOCHECKPOSITION,0)
			TNT1 A 0 A_SpawnItemEx ("InhumaneFireExplosion",0,0,30,0,0,0,0,SXF_NOCHECKPOSITION,0)
			TNT1 A 0 A_SpawnItemEx ("BarrelKaboom",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
			EXPL A 0 Radius_Quake (2, 24, 0, 15, 0)
			BEXP B 0 BRIGHT A_Scream
			TNT1 A 0 A_Explode(300, 128)
			TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("ShrapnelParticle2", 0, 0, random (0, 360), 2, random (5, 90))
			TNT1 A 0 A_PlaySound("FAREXPL", 3) // already played by barrelkaboom!
			
			TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("ExplosionParticleSFX", 0, 0, random (0, 360), 2, random (0, 180))
			TNT1 A 0 A_SpawnItem("BarrelExplosionSmokeColumn")			
			
			TNT1 A 0 A_CheckFloor("Mushroom")
			
			TNT1 AAAAAAA 0 A_CustomMissile ("ExplosionFlames", 0, 0, random (0, 360), 2, random (0, 360))
			TNT1 AAAAAA 0 A_CustomMissile ("ExplosionParticleSFX", 0, 0, random (0, 360), 2, random (0, 180))
			TNT1 AAAAA 8 A_CustomMissile ("ExplosionSmoke", 1, 0, random (0, 360), 2, random (50, 130))
			
			Stop
		Mushroom:
			TNT1 A 0
			TNT1 A 1 A_SpawnItemEx ("CybrlrdNuclearMushroom",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
			TNT1 A 1
			Stop
    }
}

ACTOR ScorchingCyberLordMissile2: CyberLordMissile
// the original was all bark and no bite, all those flames doing no damage until detonation
{
	Alpha 1.0
	RenderStyle Add
	Obituary "%o was incinerated with Cyber Demon Lord's hellfire"
	+MISSILE
	PROJECTILE
	Damage 20
	Radius 8
	Height 8
	Speed 35
	Damagetype "Fire"
	
	+THRUSPECIES // otherwise his fire breath is blocked by his own head!
	+MTHRUSPECIES
	
	
    States
    {
		Spawn:
			TNT1 A 0 A_CustomMissile ("ExplosionSmoke", 1, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile ("CyberlordMissileTrail2", 1, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 1
			TNT1 A 0 A_CustomMissile ("CyberlordMissileTrail2", 1, 0, random (0, 360), 2, random (0, 360))
			TNT1 A 1
			TNT1 A 0 A_EXPLODE(4, 200, 0) // 70 AOE DPS in its explosion radius
			Loop
		Death:
			TNT1 AAAAAAAAAAAAA 0 A_CustomMissile ("CyberLordMissileTrail3", 1, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile ("ExplosionFlames", 0, 0, random (0, 360), 2, random (0, 360))
			TNT1 A 0 A_EXPLODE(75, 200, 0)
			TNT1 A 0 A_EXPLODE(25, 400, 0) // larger fringe damage
			TNT1 A 8
			
			TNT1 A 0 A_PlaySoundEx("misc/firebass", Auto, 0, 0)

			TNT1 AAAAAAAAAAAAA 0 A_CustomMissile ("CyberLordMissileTrail3", 1, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile ("ExplosionFlames", 0, 0, random (0, 360), 2, random (0, 360))
			TNT1 A 0 A_EXPLODE(75, 200, 0)
			TNT1 A 0 A_EXPLODE(25, 400, 0)
			TNT1 A 8

			TNT1 AAAAAAAAAAAAA 0 A_CustomMissile ("CyberLordMissileTrail3", 1, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile ("ExplosionFlames", 0, 0, random (0, 360), 2, random (0, 360))
			TNT1 A 0 A_EXPLODE(75, 200, 0)
			TNT1 A 0 A_EXPLODE(25, 400, 0)
			TNT1 A 8

			TNT1 AAAAAAAAAAAAA 0 A_CustomMissile ("CyberLordMissileTrail3", 1, 0, random (0, 360), 2, random (50, 130))
			TNT1 A 0 A_CustomMissile ("ExplosionFlames", 0, 0, random (0, 360), 2, random (0, 360))
			TNT1 A 0 A_EXPLODE(75, 200, 0)
			TNT1 A 0 A_EXPLODE(25, 400, 0)
			TNT1 A 8
			
			TNT1 A 0 A_Jump(192, 2)
			TNT1 A 0 A_CustomMissile("FlamethrowerBurningStuff", random (-32, 0), random (-32, 32), random (-32, 32), 2, random (-32, 32))
			TNT1 A 0
			
			Stop

    }
}

/* P.S. Integrated into FBD since I drop BD22 compatibility anyway
ACTOR IrreplaceableCyberdemon: TheCyberdemon 17620 {

	Species "Cyberdemons"
	+DONTHARMSPECIES

	Tag "$CYBERDEMON"
	States {
		// The slaughterswaps in BDv22test3 COMPLETELY WRECK map scripting
		//  because they do not transfer their TID!
		// And the special too!
		//  You kill the cyberdemon but the gate doesn't open.
		//  End of story, the map cannot be finished. UNPLAYABLE.
		SlaughterSwap2:
			TNT1 A 0 
			TNT1 A 0 A_TakeInventory("SlaughterCounter", 9999) // otherwise, and endless loop and crash-to-desktop
			TNT1 A 0 A_Jump(256, "Stand")
			Goto Stand
		SlaughterSwap:
			TNT1 A 0
			TNT1 A 0 A_TakeInventory("SlaughterCounter", 9999)			
			TNT1 A 0 A_Jump(256, "Stand")
			Goto Stand
		ReplaceVanilla:
			TNT1 A 0
			TNT1 A 0 A_Jump(256, "Stand")
			Goto Stand
	}
}
*/

/* // moved to Cyber_Tyrant.txt in FBD proper
Actor CyberdemonRunt: EDAY_Cyberdemon 17539 { //IrreplaceableCyberdemon 17539 {
	// pale pinkish cyberdemon minion with half hp
	//$category "EDAY Monsters"
	//$Sprite CYBRG8
	Health 2500
	Translation "48:69=16:27", "70:79=65:79", "174:191=16:46"
	Tag "$CYBRRUNT"
}
*/

actor CyberdemonLordTitlemapShowcase 17655 { // just stand there looking menacing
	+BRIGHT
	// red hot
	Translation "80:86=224:231", "87:88=160:160", "89:93=212:223", "94:111=173:191", "1:1=0:0", "16:18=4:4", "19:25=224:231", "26:33=213:219", "34:47=176:189"
	
	Radius 130
	Height 425
	Scale 5.0
	+FLOORCLIP
	States
	{
		Spawn:
			ANNI B 1
			ANNI B -1 BRIGHT
	}
}

