Actor ZombieMan2 : DnD_BaseRangedMonster { 
	Health 0x7FFFFFFF
	Radius 20
	Height 56
    GibHealth -10
	DropItem "DroppedClip"
	Speed 8
	PainChance 200
	SeeSound "grunt/sight"
	AttackSound "grunt/attack"
	PainSound "grunt/pain"
	DeathSound "grunt/death"
	ActiveSound "grunt/active"
	Obituary "$OB_ZOMBIE" // "%o was killed by a zombieman."
	Mass 100
	Tag "Zombieman"
	+ISMONSTER
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_ZOMBIEMANID)
		Goto SpawnSetup
		
		IdleState:
			ZHRF AB 10 A_GiveInventory("DnD_SightChecker", 1)
		Loop
		SeeState:
			ZHRF AABBCCDD 4 Fast A_Chase
		Goto See
		MissileState:
			ZHRF E 10 Fast A_FaceTarget
			TNT1 A 0 A_SpawnItemEx ("pistolcasing", -8, 7, 26, 4, 0, frandom(3.0, 5.0), random(-80, -90))
			TNT1 A 0 A_PlaySound ("grunt/attack")
			ZHRF F 8 Fast Bright A_CustomMissile("ZombieBullet", 32, 0, frandom(-22.5, 22.5))
			ZHRF E 8 Fast
		Goto See // this goes to see, just in case there are some important debuffs to check for
		PainState:
			ZHRF G 3 Fast
			ZHRF G 3 Fast A_Pain
		Goto See
		DeathState:
			TNT1 A 0 A_Jump(128, "Death2")
			ZHRF H 5
			ZHRF I 5 A_Scream
			ZHRF J 5 A_NoBlocking
			ZHRF K 5
			ZHRF L -1
		Stop
		Death2:
			TNT1 A 0 A_GiveInventory("DnD_Boolean", 1)
			ZHRF V 5
			ZHRF W 5 A_Scream
			ZHRF X 5 A_NoBlocking
			ZHRF Y 5
			ZHRF Z -1
		Stop
		XDeathState:
			TNT1 A 0 A_SpawnDebris("NashGore_Gib9",0)
			TNT1 A 0 A_SpawnDebris("NashGore_Gib10",0)
			TNT1 A 0 A_SpawnDebris("NashGore_Gib11",0)
			TNT1 A 0 A_SpawnDebris("NashGore_Gib11",0)
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			ZHRF M 5
			ZHRF N 5 A_XScream
			ZHRF O 5 A_NoBlocking
			ZHRF PQRST 5
			ZHRF U -1
		Stop
		RaiseState:
			TNT1 A 0 A_JumpIfInventory("DnD_Boolean", 1, "Raise2")
			ZHRF K 5
			ZHRF JIH 5
		Goto See
		Raise2:
			TNT1 A 0 A_TakeInventory("DnD_Boolean", 1)
			ZHRF Y 5
			ZHRF XWV 5
		Goto See
	}
}

Actor ZombieMan3 : Zombieman2 replaces Zombieman { }

Actor ZombieBullet : ProjBullet {
	Damage (random(1,5) * 3)
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		Goto Super::Spawn
	}
}

Actor Shotgunguy2 : DnD_BaseRangedMonster { 
	Health 0x7FFFFFFF
	Radius 20
	Height 56
    GibHealth -10
	DropItem "ShotgunPickup_Drop"
	Painchance 170
	SeeSound "shotguy/sight"
	AttackSound "shotguy/attack"
	PainSound "shotguy/pain"
	DeathSound "shotguy/death"
	ActiveSound "shotguy/active"
	Obituary "$OB_SHOTGUY"
	Mass 100
	Speed 8
	Tag "Shotgunner"
	+ISMONSTER
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_SHOTGUNNERID)
		Goto SpawnSetup

		IdleState:
			ZSSH AB 10 A_GiveInventory("DnD_SightChecker", 1)
		Loop
		SeeState:
			ZSSH AABBCCDD 3 Fast A_Chase
		Goto See
		MissileState:
			ZSSH E 10 Fast A_FaceTarget
			TNT1 A 0 A_PlaySound("shotguy/attack", CHAN_WEAPON)
			TNT1 AA 0 A_CustomMissile("ZombieBullet", 32, 0, frandom(-22.5, 22.5))
			ZSSH F 10 Fast bright A_CustomMissile("ZombieBullet", 32, 0, frandom(-22.5, 22.5))
			ZSSH V 5 Fast
			TNT1 A 0 A_SpawnItemEx ("shotguncasing", -8, 7, 26, 4, 0, frandom(3.0, 5.0), random(-80, -90))
			ZSSH WV 5 Fast
		Goto See
		PainState:
			ZSSH G 3 Fast
			ZSSH G 3 Fast A_Pain
		Goto See
		DeathState:
			ZSSH H 5
			ZSSH I 5 A_Scream
			ZSSH J 5 A_NoBlocking
			ZSSH K 5
			ZSSH L -1
		Stop
		XDeathState:
			TNT1 A 0 A_SpawnDebris("NashGore_Gib9",0)
			TNT1 A 0 A_SpawnDebris("NashGore_Gib10",0)
			TNT1 A 0 A_SpawnDebris("NashGore_Gib11",0)
			TNT1 A 0 A_SpawnDebris("NashGore_Gib11",0)
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR) 
			ZSSH M 5
			ZSSH N 5 A_XScream
			ZSSH O 5 A_NoBlocking
			ZSSH PQRST 5
			ZSSH U -1
		Stop
		RaiseState:
			ZSSH KJIH 5
		Goto See
	}
}

Actor Shotgunguy3 : Shotgunguy2 replaces Shotgunguy { }

Actor Chaingunguy2 : DnD_BaseRangedMonster {
	Health 0x7FFFFFFF
	Radius 20
	Height 56
	Mass 100
	Speed 8
	PainChance 170
	SeeSound "chainguy/sight"
	PainSound "chainguy/pain"
	DeathSound "chainguy/death"
	ActiveSound "chainguy/active"
	AttackSound "chainguy/attack"
	Obituary "$OB_CHAINGUY"
	DropItem "MachinegunPickup_Drop"
	Tag "Chaingunner"
	+ISMONSTER
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_CHAINGUNGUYID)
		Goto SpawnSetup

		IdleState:
			ZCCH AB 10 Fast A_GiveInventory("DnD_SightChecker", 1)
		Loop
		SeeState:
			ZCCH AABBCCDD 3 Fast A_Chase
		Goto See
		MissileState:
			ZCCH U 10 Fast A_FaceTarget
			TNT1 A 0 A_SpawnItemEx ("bulletcasing", -8, 7, 26, 4, 0, frandom(3.0, 5.0), random(-80, -90))
			TNT1 A 0 A_PlaySound("chainguy/attack", CHAN_WEAPON)
			ZCCH F 4 Fast bright A_CustomMissile("ZombieBullet", 32, 0, frandom(-22.5, 22.5))
			TNT1 A 0 A_SpawnItemEx ("bulletcasing", -8, 7, 26, 4, 0, frandom(3.0, 5.0), random(-80, -90))
			TNT1 A 0 A_PlaySound("chainguy/attack", CHAN_WEAPON)
			ZCCH E 4 Fast bright A_CustomMissile("ZombieBullet", 32, 0, frandom(-22.5, 22.5))
			TNT1 A 0 ACS_NamedExecuteAlways("DnD On Monster Attack", 0)
			ZCCH F 1 A_CPosRefire
		Goto MissileState + 1
		PainState:
			ZCCH G 3 Fast
			ZCCH G 3 Fast A_Pain
		Goto See
		DeathState:
			ZCCH I 5 A_Scream
			ZCCH J 5 A_NoBlocking
			ZCCH KLM 5
			ZCCH N -1
		Stop
		XDeathState:
			TNT1 A 0 A_SpawnDebris("NashGore_Gib9",0)
			TNT1 A 0 A_SpawnDebris("NashGore_Gib10",0)
			TNT1 A 0 A_SpawnDebris("NashGore_Gib11",0)
			TNT1 A 0 A_SpawnDebris("NashGore_Gib11",0)
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			ZCCH O 5 
			ZCCH P 5 A_XScream
			ZCCH Q 5 A_NoBlocking
			ZCCH RS 5
			ZCCH T -1
		Stop
		RaiseState:
			ZCCH MLKJIH 5
		Goto See
	}
}

Actor Chaingunguy3 : Chaingunguy2 replaces Chaingunguy { }

Actor Demon2x : DnD_BaseMeleeMonster { 
	Health 0x7FFFFFFF
	GibHealth -50
	Species "Demon"
	Tag "Demon"
	+DONTHURTSPECIES
	PainChance 180
	Speed 10
	Radius 30
	Height 56
	Mass 400
	SeeSound "demon/sight"
	AttackSound "demon/melee"
	PainSound "demon/pain"
	DeathSound "demon/death"
	ActiveSound "demon/active"
	Obituary "$OB_DEMONHIT"
	+ISMONSTER
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_DEMONID)
		Goto SpawnSetup
		
		IdleState:
			SARG AB 10 A_GiveInventory("DnD_SightChecker", 1)
		Loop
		SeeState:
			SARG AABBCCDD 2 Fast A_Chase
		Goto See
		MeleeState:
			SARG EF 8 Fast A_FaceTarget
			SARG G 8 Fast A_CustomMeleeAttack(random(1, 10) * 4, "", "")
		goto See
		PainState:
			SARG H 2 Fast
			SARG H 2 Fast A_Pain
		Goto See
		XDeathState:
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
		DeathState:
			SARG I 8
			SARG J 8 A_Scream
			SARG K 4
			SARG L 4 A_NoBlocking
			SARG M 4
			SARG N -1
		Stop
		RaiseState:
			SARG N 5
			SARG MLKJI 5
		Goto See
	}
}

Actor Demon2xx : Demon2x replaces Demon { }

Actor Spectre2 : Demon2x { 
	Tag "Spectre"
	HitObituary "$OB_SPECTREHIT"
	RenderStyle OptFuzzy
	Alpha 0.5
	+GHOST
	+SHADOW
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_SPECTREID)
		Goto SpawnSetup
	}
}

Actor Spectre3 : Spectre2 replaces Spectre { }

Actor DoomImp2 : DnD_BaseHybridMonster { 
	Health 0x7FFFFFFF
	Species "Imp"
	Radius 20
	Height 56
	Mass 100
	Speed 8
	PainChance 200
	GibHealth -10
	SeeSound "imp/sight"
	DeathSound "imp/death"
	ActiveSound "imp/active"
	HitObituary "$OB_IMPHIT"
	Obituary "$OB_IMP"
	PainSound "Imp/Pain"
	Tag "Imp"
	+ISMONSTER
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_IMPID)
		Goto SpawnSetup

		IdleState:
			IMP0 AB 10 Fast A_GiveInventory("DnD_SightChecker", 1)
		Loop
		SeeState:
			IMP0 AABBCCDD 3 Fast A_Chase
		Goto See
		MeleeState:
		MissileState:
			IMP0 EF 8 Fast A_FaceTarget
			IMP0 G 6 Fast A_CustomComboAttack("DoomImpBall", 32, 3 * random(1, 8), "imp/melee")
		Goto See
		PainState:
			IMP0 H 2 Fast
			IMP0 H 2 Fast A_Pain
		Goto See
		DeathState:
			IMP0 I 8
			IMP0 J 8 A_Scream
			IMP0 K 6
			IMP0 L 6 A_NoBlocking
			IMP0 M -1
		Stop
		XDeathState:
			TNT1 A 0 A_SpawnDebris("NashGore_Gib9",0)
			TNT1 A 0 A_SpawnDebris("NashGore_Gib10",0)
			TNT1 A 0 A_SpawnDebris("NashGore_Gib11",0)
			TNT1 A 0 A_SpawnDebris("NashGore_Gib11",0)
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			IMP0 N 5
			IMP0 O 5 A_XScream
			IMP0 P 5
			IMP0 Q 5 A_NoBlocking
			IMP0 RST 5
			IMP0 U -1
		Stop
		RaiseState:
			IMP0 MLKJI 8
		Goto See
	}
}

Actor DoomImp3 : DoomImp2 replaces DoomImp { }

ACTOR ImpBallTrail {
	Height 1
	Radius 1
	+NOGRAVITY
	+NOINTERACTION
	+CLIENTSIDEONLY
	States {
		Spawn:
			TNT1 A 1
			DIBT GHIJKL 1 A_FadeOut(0.1)
		Stop
	}
}

Actor DoomImpBall2 : DoomImpBall replaces DoomImpBall
{
	Damage (3 * random(1, 8))
	DamageType "Fire"
	Stamina 32 // fire
	+DONTBLAST
	Decal "DoomImpScorch"
	States {
		Spawn:	
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		SpawnLoop:
			BAL1 AB 2 Bright A_SpawnItemEx("ImpBallTrail",0,0,0,0,0,0,0,128,0)	
        Loop
		Death:
			TNT1 A 0
			TNT1 A 0 A_SpawnItemEx("RedParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
			TNT1 AAA 0 A_SpawnItemEx("ExplosionFX2", 0, 0, 0, frandom(-1, 1), frandom(-1, 1), frandom(-1, 1))
			TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
			BAL1 CDE 3 Bright
        Stop
	}
}

Actor LostSoul2 : DnD_BaseRangedMonster { 
	Health 0x7FFFFFFF
	Damage (3 * random(1, 10))
	DamageType "Melee"
	Stamina 1
	Tag "Lost Soul"
	Radius 16
	Height 56
	Mass 50
	Speed 8
	+FLOAT
	+NOGRAVITY
	+MISSILEMORE
	+DONTFALL
	+NOBLOOD
	+ISMONSTER
	PainChance 256
	AttackSound "skull/melee"
	PainSound "LostSoul/Pain"
	DeathSound "skull/death"
	ActiveSound "skull/active"
	RenderStyle SoulTrans
	Obituary "$OB_SKULL" // "%o was spooked by a lost soul."
	+ISMONSTER
	States {
		SetInfo:
			SKUL A 0 A_SetArg(4, DND_LOSTSOULID)
		Goto SpawnSetup
		
		IdleState:
			SKUL AB 6 Bright A_GiveInventory("DnD_SightChecker", 1)
		Loop
		
		SeeState:
			SKUL AB 6 Fast Bright A_Chase
		Loop
		MissileState:
			SKUL C 10 Fast Bright A_FaceTarget
			SKUL D 4 Fast Bright A_SkullAttack
		MissileLoop:
			SKUL CD 4 Fast Bright
		Loop
		PainState:
			SKUL E 3 Bright Fast
			SKUL E 3 Bright Fast A_Pain
		Goto See
		DeathState:
		XDeathState:
			TNT1 AAAAAA 0 A_CustomMissile("LostSoulSmoke", 32, 0, random(0,360), 2, random(0,360))
			SKUL F 6 Bright
			SKUL G 6 Bright A_Scream
			SKUL H 6 Bright
			SKUL I 6 Bright A_NoBlocking
			SKUL J 6
			SKUL K 6
		Stop
	}
}

Actor LostSoul3 : LostSoul2 replaces LostSoul { }

Actor LostSoulNoExp : LostSoul2 {
	+LOOKALLAROUND
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_LOSTSOULID)
			TNT1 A 0 A_SetArg(1, DND_SUMMONED)
			TNT1 A 0 A_GiveInventory("DnD_Boolean", 1)
		Goto SpawnSetup
		
		IdleState:
			TNT1 A 0 A_JumpIfInventory("DnD_Boolean", 1, "GoAttack")
		Goto Super::Idle
		GoAttack:
			TNT1 A 0 A_TakeInventory("DnD_Boolean", 1)
			TNT1 A 0 A_FaceTarget
			SKUL D 4 Bright A_SkullAttack
			SKUL CD 4 Bright
		Goto MissileLoop
	}
}

Actor CacoDemon2 : DnD_BaseHybridMonster {
	Health 0x7FFFFFFF
	GibHealth -50
    BloodColor "Blue"
	Species "Cacodemon"
	Tag "Cacodemon"
	Radius 31
	Height 56
	Mass 400
	Speed 8
	PainChance 128
	+FLOAT
	+NOGRAVITY
	+DONTHURTSPECIES
	-FLOORCLIP
	SeeSound "caco/sight"
	Painsound "Cacodemon/Pain"
	DeathSound "caco/death"
	ActiveSound "caco/active"
	Obituary "$OB_CACO"
	HitObituary "$OB_CACOHIT"
	+ISMONSTER
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_CACODEMONID)
		Goto SpawnSetup
	 
		IdleState:
			HEAD A 10 A_GiveInventory("DnD_SightChecker", 1)
		Loop
		SeeState:
			HEAD A 3 Fast A_Chase
		Goto See
		MissileState:
		MeleeState:
			HEAD BC 5 Fast A_FaceTarget
			HEAD D 5 Fast bright A_CustomComboAttack("CacoBall", 32, 10 * random(1, 6), "", "")
		goto See
		PainState:
			HEAD E 3 Fast
			HEAD E 3 Fast A_Pain
			HEAD F 6 Fast
		Goto See
		XDeathState:
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Medium", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
		DeathState:
			HEAD G 8
			HEAD H 8 A_Scream
			HEAD IJ 8
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			HEAD K 8 A_NoBlocking
			HEAD L -1 A_SetFloorClip
		Stop
		RaiseState:
			HEAD L 8 A_UnSetFloorClip
			HEAD KJIHG 8
		Goto See
	}
}

Actor CacoBall : Cacodemonball replaces Cacodemonball {
	Damage (5 * random(1, 8))
	+DONTBLAST
	DamageType "Energy"
	Stamina 16
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DND Pierce Check")
		Goto Super::Spawn
		Death:
			TNT1 A 0 A_SpawnItemEx("BlueParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
			TNT1 AAA 0 A_SpawnItemEx("ExplosionFX5", 0, 0, 0, frandom(-1, 1), frandom(-1, 1), frandom(-1, 1))
			TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
		Goto Super::Death
	}
}

Actor Cacodemon3 : Cacodemon2 replaces CacoDemon { }

Actor PainElemental2 : DnD_BaseRangedMonster {
	Health 0x7FFFFFFF
	GibHealth -50
	Species "PainElemental"
	Radius 31
	Height 56
	Mass 400
	Speed 8
	PainChance 128
	+ISMONSTER
	+FLOAT
	+NOGRAVITY
	+DONTHURTSPECIES
	-FLOORCLIP
	SeeSound "pain/sight"
	PainSound "pain/pain"
	DeathSound "pain/death"
	ActiveSound "pain/active"
	Tag "Pain Elemental"
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_PAINELEMENTALID)
		Goto SpawnSetup

		IdleState:
			PAIN A 10 A_GiveInventory("DnD_SightChecker", 1)
		Loop
		SeeState:
			PAIN AABBCC 3 Fast A_Chase
		Goto See
		PainState:
			PAIN G 6 Fast
			PAIN G 6 Fast A_Pain
		Goto See
		MissileState:
		   PAIN DE 5 Fast A_FaceTarget
		   PAIN F 5 Fast bright A_FaceTarget
		   PAIN F 0 A_SpawnItemEx("LostSoulNoExp", 60, 0, 12, 0, 0, 0, 0, SXF_SETMASTER)
		Goto See
		XDeathState:
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Medium", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
		DeathState:
			PAIN H 8 bright
			PAIN I 8 bright A_Scream
			PAIN JK 8 bright
			TNT1 AAA 0 A_SpawnItemEx("ExplosionFX6", 0, 0, 0, frandom(-1, 1), frandom(-1, 1), frandom(-1, 1))
			TNT1 A 0 A_FaceTarget
			TNT1 A 0 A_SpawnItemEx("LostSoul2", 20, 0, 0, -9, 9, 0, 0, SXF_NOCHECKPOSITION | SXF_SETMASTER)
			TNT1 A 0 A_SpawnItemEx("LostSoul2", 0, 0, 0, 9, 0, 0, 0, SXF_NOCHECKPOSITION | SXF_SETMASTER)
			PAIN L 8 bright A_SpawnItemEx("LostSoul2", -20, 0, 0, 9, 9, 0, 0, SXF_NOCHECKPOSITION | SXF_SETMASTER)
			PAIN M 8 bright
		stop
	}
}

Actor PainElemental3 : PainElemental2 replaces PainElemental { }

Actor Revenant2 : DnD_BaseHybridMonster {
	Health 0x7FFFFFFF
	GibHealth -50
	Radius 20
	Height 56
	Mass 500
	Speed 10
	PainChance 100
	+ISMONSTER
	MeleeThreshold 196
	+MISSILEMORE 
	+FLOORCLIP
	+DONTHURTSPECIES
	SeeSound "skeleton/sight"
	PainSound "Revenant/Pain"
	DeathSound "skeleton/death"
	ActiveSound "skeleton/active"
	MeleeSound "skeleton/melee"
	HitObituary "$OB_UNDEADHIT"
	Obituary "$OB_UNDEAD"
	Species "Skeleton"
	Tag "Revenant"
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_REVENANTID)
		Goto SpawnSetup

		IdleState:
			SKEL AB 10 A_GiveInventory("DnD_SightChecker", 1)
		Loop
		SeeState:
			SKEL AABBCCDDEEFF 2 A_Chase
		Goto See
		PainState:
			TNT1 A 0 A_SpawnDebris("MetalScrap")
			SKEL L 5 Fast
			SKEL L 5 Fast A_Pain
		Goto See
		MeleeState:
			TNT1 A 0 A_FaceTarget
			SKEL G 6 Fast A_SkelWhoosh
			SKEL H 6 Fast A_FaceTarget
			SKEL I 6 Fast A_CustomMeleeAttack(6 * random(1, 10), "skeleton/melee", "")
		Goto See
		MissileState:
			SKEL J 0 Bright A_FaceTarget
			SKEL J 10 Bright A_FaceTarget
			SKEL K 10 A_SkelMissile
			SKEL K 10 A_FaceTarget
		Goto See
		XDeathState:
			TNT1 A 0 A_SpawnDebris("MetalScrap_More")
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
		DeathState:
			SKEL LM 7
			SKEL N 7 A_Scream
			SKEL O 7 A_NoBlocking
			SKEL P 7
			SKEL Q -1
		Stop
		RaiseState:
			SKEL Q 5
			SKEL PONML 5
		Goto See
	}
}

actor RevenantTracerFixed : RevenantTracer replaces RevenantTracer {
  Decal RevenantScorch
  DamageType "Physical"
  Stamina 1
  Damage (10 * random(1, 8))
  +DONTBLAST
  +THRUGHOST
  States {
    Spawn:
      TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
      TNT1 A 0 A_Jump(128, "Homing")
    Dumbfire:
      FATB AB 2 Bright
      Loop
    Homing:
      FATB A 1 Bright A_Tracer
      FATB A 1 Bright A_Tracer
      FATB B 1 Bright A_Tracer
      FATB B 1 Bright A_Tracer
      Loop
	  Death:
	  	TNT1 A 0 A_SpawnItemEx("OrangeParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
		TNT1 AAA 0 A_SpawnItemEx("ExplosionFX2", 0, 0, 0, frandom(-1, 1), frandom(-1, 1), frandom(-1, 1))
		TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
	  Goto Super::Death
  }
}

Actor Revenant3 : Revenant2 replaces Revenant { }

Actor HellKnight2 : DnD_BaseHybridMonster { 
	Health 0x7FFFFFFF
	GibHealth -50
	Radius 24
	Height 64
	Mass 1000
	Speed 8
	PainChance 50
	+ISMONSTER
	+FLOORCLIP
	+DONTHURTSPECIES
	SeeSound "knight/sight"
	ActiveSound "knight/active"
	PainSound "HellKnight/Pain"
	DeathSound "knight/death"
	HitObituary "$OB_KNIGHTHIT"
	Obituary "$OB_KNIGHT"
	BloodColor "7D 9D 59"
	Species "HK"
	Tag "Hell Knight"
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_HELLKNIGHTID)
		Goto SpawnSetup
		
		IdleState:
			BOS2 AB 10 A_GiveInventory("DnD_SightChecker", 1)
		Loop
		SeeState:
			BOS2 AABBCCDD 3 Fast A_Chase
		Goto See
		MeleeState:
		MissileState:
			BOS2 EF 8 Fast A_FaceTarget
			BOS2 G 8 Fast A_CustomComboAttack("Baronball2", 32, 10 * random(1, 8), "baron/melee")
		Goto See
		PainState:
			BOS2 H 2 Fast
			BOS2 H 2 Fast A_Pain
		Goto See
		XDeathState:
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Medium", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
		DeathState:
			BOS2 I 8
			BOS2 J 8 A_Scream
			BOS2 K 8
			BOS2 L 8 A_NoBlocking
			BOS2 MN 8
			BOS2 O -1
		Stop
		RaiseState:
			BOS2 O 8
			BOS2 NMLKJI 8
		Goto See
	}
}

Actor Baronball2 : BaronBall replaces BaronBall
{
	Damage (8 * random(1, 8))
	DamageType "FireGreen"
	Stamina 32
	Decal "BaronScorch"
	+DONTBLAST
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		Goto Super::Spawn
		Death:
			TNT1 A 0 A_SpawnItemEx("GreenParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
			TNT1 AAA 0 A_SpawnItemEx("ExplosionFX4", 0, 0, 0, frandom(-1, 1), frandom(-1, 1), frandom(-1, 1))
			TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
		Goto Super::Death
	}
}

Actor HellKnight3 : HellKnight2 replaces HellKnight { }

Actor BaronOfHell2 : DnD_BaseHybridMonster { 
	Health 0x7FFFFFFF
	Radius 24
	Height 64
	Mass 1000
	Speed 8
	PainChance 50
	+ISMONSTER
	SeeSound "baron/sight"
	PainSound "baron/pain"
	DeathSound "baron/death"
	ActiveSound "baron/active"
	Obituary "$OB_BARON"
	HitObituary "$OB_BARONHIT"
	BloodColor "7D 9D 59"
	Species "HK"
	Tag "Baron of Hell"
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_BARONID)
		Goto SpawnSetup

		IdleState:
			BOSS AB 10 A_GiveInventory("DnD_SightChecker", 1)
		Loop
		SeeState:
			BOSS AABBCCDD 3 A_Chase
		Goto See
		MeleeState:
		MissileState:
			BOSS EF 8 Fast A_FaceTarget
			BOSS G 8 Fast A_CustomComboAttack("BaronBall", 32, 10 * random(1, 8), "baron/melee")
		Goto See
		PainState:
			BOSS H 2
			BOSS H 2 A_Pain
		Goto See
		XDeathState:
			TNT1 A 0 A_SpawnItemEx("GenericGibber_High", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
		DeathState:
			BOSS I 8
			BOSS J 8 A_Scream
			BOSS K 8
			BOSS L 8 A_NoBlocking
			BOSS MN 8
			BOSS O -1 A_KillMaster
		Stop
		RaiseState:
			BOSS O 8
			BOSS NMLKJI 8
		Goto See
	}	
}

Actor BaronOfHell3 : BaronOfHell2 replaces BaronOfHell { }

Actor Mancubus2 : DnD_BaseRangedMonster {
	Health 0x7FFFFFFF
	GibHealth -75
	Radius 48
	Height 64
	Mass 1000
	Speed 8
	PainChance 80
	+ISMONSTER
	+DONTHURTSPECIES
	SeeSound "fatso/sight"
	PainSound "fatso/pain"
	DeathSound "fatso/death"
	ActiveSound "fatso/active"
	Obituary "$OB_FATSO"
	Species "Fatso"
	Tag "Mancubus"
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_FATSOID)
		Goto SpawnSetup
	
		IdleState:
			FATT AB 15 A_GiveInventory("DnD_SightChecker", 1)
		Loop
		SeeState:
			FATT AABBCCDDEEFF 4 A_Chase
		Goto See
		MissileState:
			FATT G 20 A_FatRaise
			FATT H 10 Bright A_FatAttack1
			FATT IG 5 A_FaceTarget
			TNT1 A 0 ACS_NamedExecuteAlways("DnD On Monster Attack", 0)
			FATT H 10 Bright A_FatAttack2
			FATT IG 5 A_FaceTarget
			TNT1 A 0 ACS_NamedExecuteAlways("DnD On Monster Attack", 0)
			FATT H 10 Bright A_FatAttack3
			FATT IG 5 A_FaceTarget
		Goto See
		PainState:
			FATT J 3
			FATT J 3 A_Pain
		Goto See
		XDeathState:
			TNT1 A 0 A_SpawnItemEx("GenericGibber_High", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
		DeathState:
			FATT K 6
			FATT L 6 A_Scream
			FATT M 6 A_NoBlocking
			FATT N 6
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			FATT OPQRS 6
			FATT T -1 A_KillMaster
		Stop
		RaiseState:
			FATT R 5
			FATT QPONMLK 5
		Goto See
	}
}

Actor Mancubus3 : Mancubus2 replaces Fatso { }

Actor FatShot2 : Fatshot replaces Fatshot {
	Damage (8 * random(1, 8))
	DamageType "Fire"
	Stamina 32
	+THRUGHOST
	+DONTBLAST
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		Goto Super::Spawn
		Death:
			TNT1 A 0 A_SpawnItemEx("OrangeParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
			TNT1 AAAA 0 A_SpawnItemEx("ExplosionFX2", 0, 0, 0, frandom(-1, 1), frandom(-1, 1), frandom(-1, 1))
			TNT1 AAAAAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
		Goto Super::Death
	}
}

Actor Arachno2 : DnD_BaseRangedMonster { 
	Health 0x7FFFFFFF
	GibHealth -75
	Species "Spider"
	Radius 64
	Height 64
	Mass 600
	Speed 12
	PainChance 128
	+ISMONSTER
	+DONTHURTSPECIES
	SeeSound "baby/sight"
	PainSound "Arachnotron/Pain"
	DeathSound "baby/death"
	ActiveSound "baby/active"
	Obituary "$OB_BABY"
	Tag "Arachnotron"
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_ARACHNOTRONID)
		Goto SpawnSetup
	
		IdleState:
			BSPI AB 10 A_GiveInventory("DnD_SightChecker", 1)
		Loop
		SeeState:
			TNT1 A 0 A_JumpIfInventory("DnD_Boolean", 1, "SeeStateSkip")
			BSPI A 20 A_GiveInventory("DnD_Boolean", 1)
		SeeStateSkip:
			BSPI A 3 A_BabyMetal
			BSPI ABBCC 3 A_Chase
			BSPI D 3 A_BabyMetal
			BSPI DEEFF 3 A_Chase
		Goto See
		MissileState:
			BSPI A 20 Bright A_FaceTarget
			BSPI G 4 Bright A_BspiAttack
			BSPI H 4 Bright
			TNT1 A 0 ACS_NamedExecuteAlways("DnD On Monster Attack", 0)
			BSPI H 1 Bright A_SpidRefire
		Goto MissileState + 1
		PainState:
			BSPI I 3 A_SpawnDebris("MetalScrap")
			BSPI I 3 A_Pain
		Goto See
		XDeathState:
			TNT1 A 0 A_SpawnDebris("MetalScrap_More")
			TNT1 A 0 A_SpawnItemEx("GenericGibber_High", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
	    DeathState:	
			BSPI J 20 A_Scream
			BSPI K 7 A_NoBlocking
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			BSPI LMNO 7
			BSPI P -1 A_KillMaster
		Stop
		RaiseState:
			BSPI P 5 A_TakeInventory("DnD_Boolean", 1)
			BSPI ONMLKJ 5
		Goto See
	}
}

Actor ArachnotronPlasma2 : ArachnotronPlasma replaces ArachnotronPlasma
{
	Damage (5 * random(1, 8))
	DamageType "EnergyYellow"
	Stamina 16
	+DONTBLAST
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		Goto Super::Spawn
		Death:
			TNT1 A 0 A_SpawnItemEx("GreenParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
			TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
		Goto Super::Death
	}
}

Actor Arachno3 : Arachno2 replaces Arachnotron { }

Actor ArchVile2 : DnD_ArchVileBase {
	Health 0x7FFFFFFF
	GibHealth -75
	Species "AV"
	Tag "Arch Vile"
	Radius 20
	Height 56
	Mass 500
	Speed 15
	PainChance 10
	+ISMONSTER
	MaxTargetRange 896
	Stamina 32
	+QUICKTORETALIATE
	+NOTARGET
	+DONTHURTSPECIES
	SeeSound "vile/sight"
	PainSound "vile/pain"
	DeathSound "vile/death"
	ActiveSound "vile/active"
	MeleeSound "vile/stop"
	Obituary "$OB_VILE"
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_ARCHVILEID)
		Goto SpawnSetup
		
		IdleState:
			VILE AB 10 A_GiveInventory("DnD_SightChecker", 1)
		Loop
		SeeState:
			VILE AABBCCDDEEFF 2 A_VileChase
		Goto See
		MissileState:
			VILE G 0 BRIGHT A_VileStart
			VILE G 10 Fast BRIGHT A_FaceTarget
			VILE H 8 Fast BRIGHT A_VileTarget("ArchVileFlame")
			VILE IJKLMN 8 Fast BRIGHT A_FaceTarget
			VILE O 8 Fast BRIGHT A_VileAttack("vile/stop", 20, 70, 70, 1.0, "ExplosiveFire")
			VILE P 20 Fast BRIGHT
		Goto See
		HealState:
			VILE "[\]" 10 Bright
		Goto See
		PainState:
			VILE Q 5   
			VILE Q 5 A_Pain
		Goto See
		XDeathState:
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Medium", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
		DeathState:
			VILE Q 7
			VILE R 7 A_Scream
			VILE S 7 A_NoBlocking
			VILE TUVWXY 7
			VILE Z -1
		Stop
	}
}

Actor ArchVileFlame : ArchVileFire {
	Stamina 32
}

Actor ArchVile3 : ArchVile2 replaces ArchVile { }

Actor SpiderMastermind2 : DnD_BaseRangedBoss {
	Health 0x7FFFFFFF
	Species "Spider2"
	Tag "Spider Mastermind"
	Radius 128
	Height 100
	Mass 2048
	Speed 12
	PainChance 40
	+ISMONSTER
	MinMissileChance 160
	+BOSS
	+MISSILEMORE
	+NORADIUSDMG
	+DONTMORPH
	+DONTHURTSPECIES
	SeeSound "spider/sight"
	PainSound "SpiderMastermind/Pain"
	AttackSound ""
	DeathSound "spider/death"
	ActiveSound "spider/active"
	Obituary "$OB_SPIDER"
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_SPIDERMASTERMINDID)
		Goto SpawnSetup
		
		IdleState:
			SPID AB 10 A_GiveInventory("DnD_SightChecker", 1)
		Loop
		SeeState:
			TNT1 A 0 A_TakeInventory("DnD_Boolean", 1)
			SPID A 3 Fast A_Metal
			SPID ABB 3 Fast A_Chase
			SPID C 3 Fast A_Metal
			SPID CDD 3 Fast A_Chase
			SPID E 3 Fast A_Metal
			SPID EFF 3 Fast A_Chase
		Goto See
		MissileState:
			TNT1 A 0 A_PlaySound("weapons/minigunup", 7)
			SMAS T 8 Fast A_FaceTarget
			SMAS U 7 Fast A_FaceTarget
			SMAS T 6 Fast A_FaceTarget
			SMAS U 5 Fast A_FaceTarget
			SMAS T 4 Fast A_FaceTarget
			SMAS U 3 Fast A_FaceTarget
		MissileLoop:
			TNT1 A 0 A_StopSound(7)
			TNT1 A 0 A_FaceTarget
			TNT1 A 0 A_PlaySound("SpiderMasterMind/MiniGunSpin", 7)
			TNT1 A 0 A_PlaySound("SpiderMasterMind/MinigunFire", 5, 1, 1, 0.4)
			TNT1 A 0 A_GiveInventory("DnD_Boolean", 1)
			TNT1 A 0 A_CustomMissile("Tracer", 64, -12, frandom(-8.0, 8.0), 0, frandom(-2.0, 2.0))
			TNT1 A 0 A_SpawnItemEx ("bulletcasing", -8, 28, 34, -4, 0, frandom(3.0, 5.0), random(-80, -90))
			TNT1 AA 0 A_CustomMissile("SpiderMBullet", 32, 0, frandom(-22.5, 22.5))
			SPID G 3 Fast Bright A_CustomMissile("SpiderMBullet", 32, 0, frandom(-22.5, 22.5))
			TNT1 A 0 A_CustomMissile("Tracer", 64, -12, frandom(-8.0, 8.0), 0, frandom(-2.0, 2.0))
			TNT1 A 0 A_SpawnItemEx ("bulletcasing", -8, 28, 34, -4, 0, frandom(3.0, 5.0), random(-80, -90))
			TNT1 AA 0 A_CustomMissile("SpiderMBullet", 32, 0, frandom(-22.5, 22.5))
			SPID H 3 Fast Bright A_CustomMissile("SpiderMBullet", 32, 0, frandom(-22.5, 22.5))
			TNT1 A 0 ACS_NamedExecuteAlways("DnD On Monster Attack", 0)
			SPID H 1 Fast Bright A_MonsterRefire(24, "MissileFinish")
		Loop
		MissileFinish:
			TNT1 A 0 A_TakeInventory("DnD_Boolean", 1)
			TNT1 A 0 A_PlaySound("SpiderMasterMind/MinigunEnd", 5, 1, 0, 0.4)
			TNT1 A 0 A_PlaySound("SpiderMasterMind/MinigunSpinEnd", 7)
			SMAS U 3 A_FaceTarget
			SMAS T 4 Fast A_FaceTarget
			SMAS U 5 Fast A_FaceTarget
			SMAS T 6 Fast A_FaceTarget
			SMAS U 7 Fast A_FaceTarget
			SMAS T 8 Fast A_FaceTarget
		Goto See
		PainState:
			TNT1 A 0 A_GiveInventory("SpiderFireChecker", 1)
			TNT1 A 0 A_StopSound(5)
			SPID I 3 A_SpawnDebris("MetalScrap")
			SPID I 3 A_Pain
		Goto See
		XDeathState:
			TNT1 AA 0 A_SpawnDebris("MetalScrap_More")
			TNT1 A 0 A_SpawnItemEx("GenericGibber_High", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
		DeathState:
			SPID J 2 A_Scream
			TNT1 A 0 A_StopSound(7)
			TNT1 A 0 A_StopSound(5)
			TNT1 A 0 A_GiveInventory("SpiderFireChecker", 1)
			SPID J 18
			SPID K 2 A_NoBlocking
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			SPID KKKK 2 A_SpawnItemEx("ExplosionFX", 0, 0, random(0, 32),random(-9,9),random(-9,9),random(5,9), 48, 128)
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			SPID LLLLL 2 A_SpawnItemEx("ExplosionFX", 0, 0, random(0, 32),random(-9,9),random(-9,9),random(5,9), 48, 128)
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			SPID MMMMM 2 A_SpawnItemEx("ExplosionFX", 0, 0, random(0, 32),random(-9,9),random(-9,9),random(5,9), 48, 128)
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			SPID NNNNN 2 A_SpawnItemEx("ExplosionFX", 0, 0, random(0, 32),random(-9,9),random(-9,9),random(5,9), 48, 128)
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			SPID OOOOO 2 A_SpawnItemEx("ExplosionFX", 0, 0, random(0, 32),random(-9,9),random(-9,9),random(5,9), 48, 128)
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			SPID PPPPP 2 A_SpawnItemEx("ExplosionFX", 0, 0, random(0, 32),random(-9,9),random(-9,9),random(5,9), 48, 128)
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			SPID QQQQQ 2 A_SpawnItemEx("ExplosionFX", 0, 0, random(0, 32),random(-9,9),random(-9,9),random(5,9), 48, 128)
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			SPID RRRRR 2 A_SpawnItemEx("ExplosionFX", 0, 0, random(0, 32),random(-9,9),random(-9,9),random(5,9), 48, 128)
			SPID S 5
			SPID S -1 A_KillMaster
		Stop
	}	
}

Actor SpiderMBullet : ZombieBullet {
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		Goto Super::Spawn
	}
}

Actor SpiderMastermind3 : SpiderMastermind2 replaces SpiderMastermind { }

Actor SpiderFireChecker : DnD_Activator {
	States {
		Pickup:
			TNT1 A 0 A_JumpIfInventory("DnD_Boolean", 1, "Finish")
		Stop
		Finish:
			TNT1 A 0 A_TakeInventory("DnD_Boolean", 1)
			TNT1 A 0 A_PlaySound("SpiderMasterMind/MinigunEnd", CHAN_WEAPON, 1, 0, 0.4)
		Stop
	}
}

Actor Cyberdemon2 : DnD_BaseRangedBoss {
	Health 0x7FFFFFFF
	PainSound "CyberDemon/Pain"
	Radius 40
	Height 110
	Mass 2048
	Speed 16
	PainChance 20
	+ISMONSTER
	MinMissileChance 160
	MONSTER
	+BOSS
	+MISSILEMORE
	+NORADIUSDMG
	+DONTMORPH
	+DONTHURTSPECIES
	SeeSound "cyber/sight"
	PainSound "cyber/pain"
	DeathSound "cyber/death"
	ActiveSound "cyber/active"
	Obituary "$OB_CYBORG"
	Species "Cyber"
	Tag "Cyberdemon"
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_CYBERDEMONID)
		Goto SpawnSetup
		
		IdleState:
			CYBR AB 10 A_GiveInventory("DnD_SightChecker", 1)
		Loop
		SeeState:
			CYBR A 3 A_Hoof
			CYBR ABBCC 3 A_Chase
			CYBR D 3 A_Metal
			CYBR D 3 A_Chase
		Goto See
		MissileState:
			CYBR E 6 Fast A_FaceTarget
			CYBR F 12 Fast A_CustomMissile("CyberdemonRocket",42,-28)
			CYBR E 12 Fast A_FaceTarget
			TNT1 A 0 ACS_NamedExecuteAlways("DnD On Monster Attack", 0)
			CYBR F 12 Fast A_CustomMissile("CyberdemonRocket",42,-28)
			CYBR E 12 Fast A_FaceTarget
			TNT1 A 0 ACS_NamedExecuteAlways("DnD On Monster Attack", 0)
			CYBR F 12 Fast A_CustomMissile("CyberdemonRocket",42,-28)
		Goto See
		PainState:
			TNT1 A 0 A_SpawnDebris("MetalScrap")
			CYBR G 10 A_Pain
		Goto See
		XDeathState:
			TNT1 A 0 A_SpawnItemEx("GenericGibber_High", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			TNT1 A 0 A_SpawnDebris("MetalScrap_More")
		DeathState:	
			CYBR H 10
			CYBR I 10 A_Scream
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			CYBR JJJJJ 2 A_SpawnItemEx("ExplosionFX", 0, 0, random(0, 32),random(-9,9),random(-9,9),random(5,9), 48, 128) 
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			CYBR KKKKK 2 A_SpawnItemEx("ExplosionFX", 0, 0, random(0, 32),random(-9,9),random(-9,9),random(5,9), 48, 128) 
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			TNT1 A 0 A_NoBlocking
			CYBR LLLLL 2 A_SpawnItemEx("ExplosionFX", 0, 0, random(0, 32),random(-9,9),random(-9,9),random(5,9), 48, 128) 
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			CYBR MMMMM 2 A_SpawnItemEx("ExplosionFX", 0, 0, random(0, 32),random(-9,9),random(-9,9),random(5,9), 48, 128) 
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			CYBR NNNNN 2 A_SpawnItemEx("ExplosionFX", 0, 0, random(0, 32),random(-9,9),random(-9,9),random(5,9), 48, 128) 
			CYBR OOOOO 2 A_SpawnItemEx("ExplosionFX", 0, 0, random(0, 32),random(-9,9),random(-9,9),random(5,9), 48, 128) 
			CYBR P 5
			CYBR P -1 A_KillMaster
		Stop
	}	
}

Actor CyberdemonExp : BaseExplosionDamage {
	DamageType "Explosive"
	Stamina 4
	Obituary "$OB_CYBORG"
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
			TNT1 A 1 A_Explode(128, 128, 0)
		Stop
	}
}

Actor CyberdemonRocket : Rocket {
	Decal "Scorch"
	Damage (20 * random(1, 8))
	DamageType "Explosive"
	Stamina 4
	Speed 24
	+THRUGHOST
	+DONTBLAST
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		Goto Super::Spawn
		Death:
			TNT1 AAAAA 0 A_CustomMissile("RocketSmoke", 0, 0, random(0, 360), 2, random(0, 180))
			TNT1 AAAAAAAA 0 A_CustomMissile("RocketSmoke", 0, 0, random(0, 360), 2, random(0, 360))
			MISL B 8 Bright A_SpawnItem("CyberdemonExp")
			MISL C 6 Bright
			MISL D 4 Bright
		Stop
	}	
}

Actor Cyberdemon3 : Cyberdemon2 replaces Cyberdemon { }

Actor WolfensteinSS2 : DnD_BaseRangedMonster { 
	Health 0x7FFFFFFF
	Tag "SS Nazi"
	Radius 20
	Height 56
	Speed 8
	PainChance 170
	SeeSound "wolfss/sight"
	PainSound "wolfss/pain"
	DeathSound "wolfss/death"
	ActiveSound "wolfss/active"
	AttackSound "wolfss/attack"
	Obituary "$OB_WOLFSS"
	Dropitem "Clip"
	+ISMONSTER
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_NAZIID)
		Goto SpawnSetup
		

		IdleState:
			SSWV AB 10 A_GiveInventory("DnD_SightChecker", 1)
		Loop
		SeeState:
			SSWV AABBCCDD 3 A_Chase
		Goto See
		PainState:
			SSWV H 3
			SSWV H 3 A_Pain
		Goto See
		MissileState:
			SSWV E 10 Fast A_FaceTarget
			SSWV F 10 Fast A_FaceTarget
			TNT1 A 0 A_PlaySound("shotguy/attack", CHAN_WEAPON)
			SSWV G 4 Fast Bright A_CustomMissile("ZombieBullet", 32, 0, frandom(-22.5, 22.5))
			SSWV F 6 Fast A_FaceTarget
			TNT1 A 0 A_PlaySound("shotguy/attack", CHAN_WEAPON)
			SSWV G 4 Fast Bright A_CustomMissile("ZombieBullet", 32, 0, frandom(-22.5, 22.5))
			SSWV F 1 A_CPosRefire
		Goto MissileState + 1
		DeathState:
			SSWV I 5
			SSWV J 5 A_Scream
			SSWV K 5 A_NoBlocking
			SSWV L 5
			SSWV M -1
		Stop
		XDeathState:
			TNT1 A 0 A_SpawnItemEx("GenericGibber_Low", 0, 0, 0, 0, 0, 0, 0, SXF_USEBLOODCOLOR)
			SSWV N 5
			SSWV O 5 A_XScream
			SSWV P 5 A_NoBlocking
			SSWV QRSTU 5
			SSWV V -1
		Stop
		RaiseState:
			SSWV M 5
			SSWV LKJI 5
		Goto See 
	}
}

Actor BossBrain_DnD : BossBrain replaces BossBrain {
	DamageFactor "BarrelExplosion", 10.0
	+ISMONSTER
	-COUNTKILL
	States {
		spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteWithResult("DnD Setup Shootable")
		Goto Super::Spawn
		Death:
			TNT1 A 0 ACS_NamedExecuteAlways("DnD Make Player Invuln")
			BBRN A 100 ACS_ExecuteAlways(255, 0, 0, 1, 1) // forced exit case + bossbrain
			BBRN A -1
		Stop
	}
}

Actor CommanderKeen_DnD : CommanderKeen replaces CommanderKeen {
	// already is monster
	States {
		spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteWithResult("DnD Setup Shootable")
		Goto Super::Spawn
	}
}

Actor ReiverGhost : DnD_ArchVileBase {
	Health 0x7FFFFFFF
    Speed 6
    Alpha 0.75
    RenderStyle Add
    HitObituary "%o had %p soul devoured by a reiver ghost."
    Obituary "%o was charred by a reiver ghost."
	Tag "Wraith"
	Height 56
	Radius 16
	SeeSound "WraithSight"
	AttackSound "WraithAttack"
	PainSound "WraithPain"
	DeathSound "WraithDeath"
	ActiveSound "WraithActive"
	PainChance 0
	+ISMONSTER
    +GHOST
	+FLOAT
	+NOPAIN
	+NOGRAVITY
    +DONTFALL
    +NOBLOOD
    +NOTARGET
    -COUNTKILL
	-FLOORCLIP
    States {
		SetInfo:
			TNT1 A 0 ACS_NamedExecuteAlways("DnD Afrit Bob", 0, 4, 8)
			TNT1 A 0 A_SetArg(4, DND_WRAITH)
		Goto SpawnSetup
		
		IdleState:
			WRTH A 4 A_GiveInventory("DnD_SightChecker", 1)
		Loop
		
		SeeState:
			WRTH A 2 Fast A_Chase
			WRTH A 2 Fast A_VileChase
			TNT1 A 0 A_TakeInventory("AfritStopBob", 1)
			TNT1 A 0 A_GiveInventory("WraithChaseFXSpawner", 1)
			WRTH B 2 Fast A_Chase
			WRTH B 2 Fast A_VileChase
			TNT1 A 0 A_GiveInventory("WraithChaseFXSpawner", 1)
			WRTH C 2 Fast A_Chase
			WRTH C 2 Fast A_VileChase
			TNT1 A 0 A_GiveInventory("WraithChaseFXSpawner", 1)
			WRTH D 2 Fast A_Chase
			WRTH D 2 Fast A_VileChase
			TNT1 A 0 A_GiveInventory("WraithChaseFXSpawner", 1)
		Loop
		MissileState:
			TNT1 A 0 A_GiveInventory("AfritStopBob", 1)
			WRTH E 6 Fast A_FaceTarget
			WRTH F 6 Fast
			WRTH G 0 A_Jump(128, "MissileLoop")
			WRTH G 6 Fast A_CustomMissile("ReiverGhostFX", 32, 0)
		Goto See
		MissileLoop:
			WRTH G 6 Fast A_SkullAttack(30)
			WRTH G 2 Fast
			WRTH G 6 Fast A_SkullAttack(30)
			WRTH G 2 Fast
			WRTH G 6 Fast A_SkullAttack(30)
			WRTH G 2 Fast
			WRTH G 6 Fast A_SkullAttack(30)
		RealMissileLoop:
			WRTH G 2 Fast
		Loop
		HealState:
			TNT1 A 0 A_SpawnItemEx("ResurrectionFlame",16,0,floorz,0,0,0,32,0)
			TNT1 A 0 A_GiveInventory("Mo_Died", 1) // for elite crap
			TNT1 A 0 ACS_NamedExecuteAlways("DnD On Kill Forced CS", 0)
			WRTH EF 6 Fast
			WRTH G 1 A_FadeOut(0.06)
		Wait
		XDeathState:
		DeathState:
			TNT1 A 0 A_NoBlocking
			TNT1 A 10 A_SpawnItemEx("ReiverGhostExplode",0,0,32,0,0,0,0,32,0)
		Stop
    }
}

Actor WraithChaseFXSpawner : DnD_Activator {
	States {
		Pickup:
			TNT1 A 0 A_Jump(15, "FX4")
		Goto ContinueFX
		FX4:
			TNT1 A 0 A_SpawnItemEx("DnD_WraithFX4", frandom(-8, 8), frandom(-8, 8), 4)
		Goto ContinueFX
		ContinueFX:
			TNT1 A 0 A_Jump(15, "FX5")
		Stop
		FX5:
			TNT1 A 0 A_SpawnItemEx("DnD_WraithFX5", frandom(-4, 4), frandom(-4, 4), 4)
		Stop
	}
}

Actor AfritStopBob : DnD_Boolean { }

Actor ReiverGhost_NoExp : ReiverGhost {
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_WRAITH)
			TNT1 A 0 A_SetArg(1, DND_SUMMONED)
			TNT1 A 0 A_GiveInventory("DnD_Boolean", 1)
		Goto SpawnSetup
	
		IdleState:
			TNT1 A 0 A_JumpIfInventory("DnD_Boolean", 1, "GoAttack")
		Goto Super::Idle
		GoAttack:
			TNT1 A 0 A_TakeInventory("DnD_Boolean", 1)
			TNT1 A 0 A_FaceTarget
			WRTH G 6 Fast A_SkullAttack(30)
			WRTH G 2 Fast
		Goto MissileLoop
	}
}

Actor ReiverGhost_NoExp_NoSolid : ReiverGhost_NoExp {
	-SOLID
	
	States {
		IdleState:
			TNT1 A 0 A_ChangeFlag("SOLID", 0)
		IdleLoop:
			WRTH A 4 A_GiveInventory("DnD_SightChecker", 1)
		Loop
	}
}

Actor DnD_WraithFX4 : WraithFX4 {
	+CLIENTSIDEONLY
}

Actor DnD_WraithFX5 : WraithFX5 {
	+CLIENTSIDEONLY
}

ACTOR ReiverGhostExplode {
    +NOINTERACTION
    RenderStyle Add
	+CLIENTSIDEONLY
    States {
		Spawn:
			XPL1 ABCDEF 4 Bright
			Stop
    }
}

ACTOR ReiverGhostFX : WraithFX1 {
	Damage (5 * random(2,5))
	SeeSound "Beast/Attack"
    +MTHRUSPECIES
	DamageType "Fire"
	Stamina 32
	+DONTBLAST
	
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		Goto Super::Spawn
		Death:
			TNT1 A 0 A_SpawnItemEx("RedParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
			TNT1 AAAA 0 A_SpawnItemEx("ExplosionFX2", 0, 0, 0, frandom(-1, 1), frandom(-1, 1), frandom(-1, 1))
			TNT1 AAAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
		Goto Super::Death
	}
}

ACTOR ResurrectionFlame {
    Height 78
    +NOBLOCKMAP
    +NOGRAVITY
    +FLOORHUGGER
    RenderStyle Add
    Alpha 0.65
	+CLIENTSIDEONLY
	States {
		Spawn:
			FIRE ABCDEFGH 2 Bright
		Stop
    }
}

Actor WolfensteinSS3 : WolfensteinSS2 replaces WolfensteinSS { }

Actor Phantasm : DnD_BaseHybridMonster_NoRes {
	Health 0x7FFFFFFF
	Radius 20
	Height 56
	Speed 10
	SeeSound ""
	DeathSound "Phantasm/Die"
	ActiveSound "Phantasm/Act"
	Obituary "%o was scared to death by a Phantasm."
	Mass 0x7FFFFFFF
	Tag "Phantasm"
	Renderstyle Add
	Alpha 0.01
	Translation "236:239=%[0.00,0.00,0.00]:[1.52,1.52,1.52]", "48:79=%[0.00,0.00,0.00]:[1.88,1.88,1.88]", "128:151=%[0.00,0.00,0.00]:[1.10,1.10,1.10]"
	+ISMONSTER
	+NOCLIP
	-SHOOTABLE
	-SOLID
	-COUNTKILL
	+NOTARGET
	+NOGRAVITY
	+NOBLOOD
	+FLOAT
	+GHOST
	+NOINFIGHTING
	+MISSILEMORE
	+PIERCEARMOR
	+LOOKALLAROUND
	States {
		SetInfo:
			TNT1 A 0 A_SetArg(4, DND_PHANTASM)
		Goto SpawnSetup
		
		IdleState:
			TNT1 A 0 A_UnsetSolid
			TNT1 A 0 A_JumpIfInventory("DnD_Boolean", 1, "IdleLoop")
			TNT1 A 0 A_PlaySound("Phantasm/Rise", CHAN_VOICE)
			TNT1 A 0 A_SpawnItemEx("DissipationEffect")
			TNT1 A 0 ACS_NamedExecuteAlways("DnD Timed Monster", 0, 12, 0)
			PHNT EEEEEEE 2 A_FadeIn(0.125)
			TNT1 A 0 A_GiveInventory("DnD_Boolean", 1)
		IdleLoop:
			PHNT A 2 A_GiveInventory("DnD_SightChecker", 1)
		Loop
		
		SeeState:
			TNT1 A 0 A_SpawnItemEx("PhantasmTrail")
			PHNT A 2 A_Chase
			PHNT A 1 A_SpawnItemEx("PhantasmTrail")
		Goto See
		MissileState:
			PHNT B 4 A_FaceTarget
			PHNT C 4 Bright A_FaceTarget
			PHNT B 4 A_FaceTarget
			PHNT C 4 Bright A_FaceTarget
			PHNT B 4 A_FaceTarget
			PHNT C 4 Bright A_FaceTarget
			TNT1 A 0 A_PlaySound("Phantasm/Attack")
			PHNT D 7 Bright A_CustomMissile("PhantomMissile", 32)
		Goto See
		MeleeState:
			PHNT B 5 A_FaceTarget
			PHNT C 4 Bright A_FaceTarget
			TNT1 A 0 A_PlaySound("WraithAttack")
			PHNT D 4 Bright A_CustomMeleeAttack(random(8, 10) * 2, "", "")
		Goto See
		
		PainState:
			PHNT E 3
		Goto See
		
		Remove:
			TNT1 A 0 A_UnsetShootable
			TNT1 A 0 A_SetInvulnerable
		DeathState:
		XDeathState:
			TNT1 A 0 A_GiveInventory("Mo_Died", 1)
			TNT1 A 0 A_SpawnItemEx("DissipationEffect")
			TNT1 A 0 A_Scream
			PHNT EEEEEEE 2 A_FadeOut(0.125)
		Stop
	}
}

Actor PhantomMissile {
	Radius 6
	Height 12
	Speed 20
	Damage (18)
	+DONTBLAST
	RenderStyle Add
	Alpha 1
	Projectile
	SeeSound "fatso/attack"
	DeathSound "fatso/shotx"
	Translation "0:255=%[0.00,0.00,0.00]:[1.91,1.91,1.91]"
	+PIERCEARMOR
	states {
		Spawn:
			PHNM ABCD 3 Bright A_SpawnItemEx("PhantasmMissileTrail", 0, 0, 12, frandom(-2, 0), frandom(-2, 2), frandom(-2, 2))
		loop
		Death:
			PHNM EFG 4 Bright
		stop
	}
}

Actor PhantasmMissileTrail {
	Renderstyle Add
	Alpha 1.0
	Translation "0:255=%[0.00,0.00,0.00]:[1.91,1.91,1.91]"
	Scale 0.5
	+NOINTERACTION
	+CLIENTSIDEONLY
	States {
		Spawn:
			FX16 DEDEF 3
		Stop
	}
}

Actor PhantasmTrail {
	RenderStyle Add
	Alpha 1.0
	Translation "0:255=%[0.00,0.00,0.00]:[1.91,1.91,1.91]"
	+CLIENTSIDEONLY
	+NOINTERACTION
	States {
		Spawn:
			PHNT AAAAA 1 A_FadeOut(0.18)
		Stop
	}
}

// Reflect testing
Actor BaseReflectorMan : Zombieman2 {
	Health 99999
	+REFLECTIVE
	States {
		Spawn:
		Goto Idle
	}
}