ACTOR CyberdemonLord_DnD : DnD_BaseRangedBoss replaces CyberdemonLord
{
	Game Doom
	Health 20000
	Radius 130
	Height 460
	Mass 5000
	Speed 50
	MinMissileChance 160
	+NOPAIN
	Scale 5.0
	+ISMONSTER
	+BOSS 
	+DONTRIP
	+FLOORCLIP
	+NORADIUSDMG
	+DONTMORPH
	+BOSSDEATH
	+NODAMAGETHRUST
	Damage 60
	damagefactor "sTOMP", 0.0
	damagefactor "ExplosiveImpact", 0.0
	//SeeSound "CYBRLRD"
	PainSound "cyber/pain"
	DeathSound "HUGEEXPL"
	ActiveSound "CYBRLA1"
	Obituary "%o was smeared under the Cyber Demon Lord's iron hoof"
	Tag "Cyberdemon Lord"
	States {
		SetInfo:
			TNT1 A 0
		Goto SpawnSetup
	
		SpawnSetup:
			ANNI A 0 ACS_NamedExecuteWithResult("DnD Init Monster Data", 100000)
			ANNI B 0 ACS_NamedExecuteWithResult(
				"DnD Custom Monster Scale",
				DND_CUSTOM_UNIQUEBOSS | (MONSTERCLASS_CYBERDEMON << 9) | ((DND_MTYPE_DEMON_POW | DND_MTYPE_ROBOTIC_POW) << 14),
				DND_EXPLOSIVE_RESIST,
				-1, 
				-1
			)
			ANNI B 0 A_ChangeFlag("INVULNERABLE", 1)
			ANNI B 0 A_Jump(256, "Idle")
			ANNI B 35
		Wait
	
		SeeState:
			ANNI G 10 A_FaceTarget
			ANSA AB 6 A_FaceTarget
			TNT1 A 0 A_PLaySoundEx("CYBRLRD", 4, 0, 2)
			TNT1 A 0 Radius_Quake (22, 60, 0, 64, 0)
			ANSA CDEDCFGFCCDEDCFGFC 4 A_FaceTarget
			ANSA BA 6 A_FaceTarget
			ANNI B 0 A_ChangeFlag("INVULNERABLE", 0)
			ANNI G 10
		Goto Chase
		
		Chase:
			TNT1 A 0
			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
			
			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
			
			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:
			ANNI B 4 A_Look
			/*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")
			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
		
		MissileState:
			TNT1 A 0
			TNT1 a 0 A_jump(64, "Missile2")
			TNT1 A 0 A_JumpIfCloser(700, "missile2")
			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:
			ANNI G 10 A_FaceTarget
			ANSA AB 6 A_FaceTarget
			TNT1 A 0 A_PLaySoundEx("ICOFIRE", 1, 0, 2)
			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)
			ANSA BA 6 A_FaceTarget
			ANNI G 10
		Goto Chase
	
		PainState:
			ANNI G 10 A_Pain
		Goto Chase
		XDeathState:
		DeathState:
		Death.Emerald:
		Death.MagicSealing:
		Death.Ice:
		Death.P_Ice:
			ANNI H 3
			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 ACS_NamedExecuteAlways("DnD Generic Boss Loot", 0, DND_BOSS_MEDTIER, 0, 0)
			ANNI P -1 A_BossDeath
		Stop
	}
}

ACTOR CyberdemonLordMP_DnD : CyberdemonLord_DnD replaces CyberdemonLordMP {
	DamageFactor "Normal", 0.5
}

ACTOR CyberdemonLordMinor_DnD : CyberdemonLord_DnD replaces CyberdemonLordMinor
{
	Health 8000
	Radius 50
	Height 280
	Speed 25
	Scale 2.5
	Translation "16:47=128:143"
	States
	{
		MissileState:
			TNT1 A 0
			TNT1 a 0 A_jump(64, "Missile2")
			TNT1 A 0 A_JumpIfCloser(600, "missile2")
			ANNI E 4 A_FaceTarget
			
			ANNI E 6 A_FaceTarget
			TNT1 A 0 A_CustomMissile("CyberlordMissile",100,-80,0,0)
			TNT1 A 0 A_CustomMissile("CyberlordMissile",100,80,0,0)
			ANNI F 4 BRIGHT
			
			ANNI E 6 A_FaceTarget
			TNT1 A 0 A_CustomMissile("CyberlordMissile",100,-80,0,0)
			TNT1 A 0 A_CustomMissile("CyberlordMissile",100,80,0,0)
			ANNI F 4 BRIGHT
		Goto Chase
		
		Missile2:
			ANNI G 10 A_FaceTarget
			ANSA AB 6 A_FaceTarget
			TNT1 A 0 A_PLaySoundEx("ICOFIRE", 1, 0, 2)
			ANSA CDEDC 4 A_CustomMissile("CyberlordMissile2",240,0,random(-10,10),0)
			TNT1 A 0 A_FaceTarget
			ANSA FGFC 4 A_CustomMissile("CyberlordMissile2",240,0,random(-10,10),0)
			TNT1 A 0 A_FaceTarget
			ANSA CDEDC 4 A_CustomMissile("CyberlordMissile2",240,0,random(-10,10),0)
			TNT1 A 0 A_FaceTarget
			ANSA BA 6 A_FaceTarget
			ANNI G 10
		Goto Chase
	}
}

ACTOR CyberLordStomp_DnD : CyberLordStomp replaces CyberLordStomp
{
    Stamina 1
}


ACTOR CyberLordMissile_DnD : CyberLordMissile replaces CyberLordMissile
{
	Stamina 4
}



ACTOR CyberLordMissile2_DnD : CyberLordMissile2 replaces CyberLordMissile2
{
	Stamina 36
}



ACTOR CyberLordMissileTrail_DnD : CyberLordMissileTrail replaces CyberLordMissileTrail
{
	Stamina 32
}

ACTOR CyberLordMissileTrail2_DnD : CyberLordMissileTrail2 replaces CyberLordMissileTrail2
{
	Stamina 32
}



ACTOR CyberLordMissileTrail3_DnD : CyberLordMissileTrail3 replaces CyberLordMissileTrail3
{
	Stamina 32
}