actor BloodSatyr : Satyr {
    Health 550
    Radius 24
    Height 64
    Scale 1.1
    PainChance 64
	Tag "Blood Satyr"
	Species "HK"
	DamageFactor "Barons", 0.0
	DamageFactor "BaronsExp", 0.0
	DamageFactor "BaronsPoison", 0.0
	DamageFactor "BaronsFire", 0.0
	DamageFactor "BaronGreen", 0.0
	DamageFactor "BaronGreenFire", 0.0
	DamageFactor "BaronPlasma", 0.0
	DamageFactor "BaronVoid", 0.0
	DamageFactor "BaronYellow", 0.0
	DamageFactor "BaronsMagic", 0.0
	DamageFactor "BaronsMagicFire", 0.0
	+DONTHARMSPECIES
	Obituary "%o was drained of all life by a blood satyr."
    HitObituary "%o was mauled by a blood satyr."
	Translation "0:255=%[0.00,0.00,0.00]:[1.10,0.13,0.13]", "3:8=3:8", "16:47=16:47", "80:111=80:111", "168:191=168:191"
    States {
		Spawn:
			TNT1 A 0
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_BLOODSATYR, DND_HEAL)
		Idle:
			STYR AB 10 A_Look
		Loop
		See:
			STYR AABBCCDD 3 Fast A_Chase
		Loop
		Melee:
			STYR E 2 Fast A_FaceTarget
			TNT1 A 0 A_Recoil(-1.6)
			STYR E 3 Fast A_FaceTarget
			TNT1 A 0 A_Recoil(-2.0)
			STYR F 2 Fast A_FaceTarget
			TNT1 A 0 A_Recoil(-2.4)
			STYR F 3 Fast A_FaceTarget
			TNT1 A 0 A_Recoil(-2.8)
			STYR G 5 Fast A_CustomMeleeAttack(random(18, 36) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "baron/melee")
			TNT1 A 0 A_Stop
			STYR P 2 Fast A_FaceTarget
			TNT1 A 0 A_Recoil(-1.6)
			STYR P 3 Fast A_FaceTarget
			TNT1 A 0 A_Recoil(-2.0)
			STYR Q 2 Fast A_FaceTarget
			TNT1 A 0 A_Recoil(-2.4)
			STYR Q 3 Fast A_FaceTarget
			TNT1 A 0 A_Recoil(-2.8)
			STYR R 5 Fast A_CustomMeleeAttack(random(18, 36) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "baron/melee")
		Goto See
		Missile:
			STYR EF 4 Fast A_FaceTarget
			STYR G 5 Fast A_CustomMissile("BloodSatyrMissile", 34)
			TNT1 A 0 A_CustomMissile("BloodSatyrMissile")
			STYR PQ 4 Fast A_FaceTarget
			STYR R 5 Fast A_CustomMissile("BloodSatyrMissile", 34)
			TNT1 A 0 A_CustomMissile("BloodSatyrMissile")
		Goto See
		Pain:
			STYR H 3 Fast
			STYR H 3 Fast A_Pain
		Goto See
		Death:
			TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoul")
		GaveSoul:	
			STYR I 5
			TNT1 A 0 ACS_ExecuteAlways(982, 0, 2)
			STYR J 5 A_Scream
			STYR K 6
			STYR L 7 A_Fall
			STYR M 4
			STYR N 4
			STYR O -1
		Stop
	  GiveSoul:
	  Death.BookOfTheDead:
		STYR I 1
		TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
		TNT1 A 0 A_GiveToTarget("Souls", 1)  
	  Goto GaveSoul	
		Raise:
			STYR ONMLKJI 8
		Goto See
	    Ice:
			"----" G 5 A_GenericFreezeDeath
			"----" G 1 A_FreezeDeathChunks
		Wait
    }
}

Actor BloodSatyrHeal : DnD_Activator {
	States {
		Pickup:
			
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERHEALSCRIPT, 0, 25 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)))
		Stop
	}
}

Actor BloodSatyrMissileTrail {
	+NOINTERACTION
	+CLIENTSIDEONLY
	Scale 0.25
	States {
		Spawn:
			TNT1 A 2
			TNT1 A 0 A_Jump(256, "A", "B", "C", "D", "E", "F")
		A:
			FGOR A 4
		Stop
		B:
			FGOR B 4
		Stop
		C:
			FGOR C 4
		Stop
		D:
			FGOR D 4
		Stop
		E:
			FGOR E 4
		Stop
		F:
			FGOR F 4
		Stop
	}
}

Actor BloodSatyrMissile {
	PROJECTILE
	Speed 24
	Radius 4
	Height 8
	Damage (random(2, 16) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	+NODAMAGETHRUST
	DamageType "BaronsMagic"
	SeeSound "BloodSatyr/Fire"
	DeathSound "ClericCStaffHitThing"
	Obituary "%o was drained of all life by a blood satyr."
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		SpawnLoop:
			FGOR A 2 A_SpawnItem("BloodSatyrMissileTrail")
			TNT1 AA 0 A_BishopMissileWeave
			FGOR B 2 A_SpawnItem("BloodSatyrMissileTrail")
			TNT1 AA 0 A_BishopMissileWeave
			FGOR C 2 A_SpawnItem("BloodSatyrMissileTrail")
			TNT1 AA 0 A_BishopMissileWeave
			FGOR D 2 A_SpawnItem("BloodSatyrMissileTrail")
			TNT1 AA 0 A_BishopMissileWeave
			FGOR E 2 A_SpawnItem("BloodSatyrMissileTrail")
			TNT1 AA 0 A_BishopMissileWeave
			FGOR F 2 A_SpawnItem("BloodSatyrMissileTrail")
			TNT1 AA 0 A_BishopMissileWeave
		Loop
		XDeath:
			TNT1 A 0 ACS_NamedExecuteAlways("DND Blood Satyr FX", 0)
			FGOR G 3 A_GiveToTarget("BloodSatyrHeal", 1)
			FGOR HIJ 3
		Stop
		Death:
			FGOR GHIJ 3
		Stop
	}
}

Actor SatyrMissile : BaronBall
{
	Projectile
	Radius 8
	Height 16
	Speed 22
	Damage (4*random(3,7) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	DamageType "BaronYellow"
	Scale 0.75
	RenderStyle Add
	Translation "193:201=160:167", "202:208=165:168"
	Decal PlasmaScorchLower
	States
	{
	Spawn:
		TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
	SpawnLoop:
		ANFB ABC 3 Bright
		Loop
	Death:
		TNT1 A 0 A_SpawnItemEx("OrangeParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
		TNT1 AAA 0 A_CustomMissile("ExplosionFX2", 0, 0, random(0,360), 2, random(0,360))
		TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
		ANFB DEFG 3 Bright
		Stop
	}
}

Actor HellWarrior : DnD_BaseEnemy
{
  Health 400
  Speed 8
  Radius 24
  Height 64
  PainChance 50
  Mass 1000
  SeeSound "knight/sight"
  PainSound "HellKnight/Pain"
  DeathSound "knight/death"
  ActiveSound "knight/active"
  MeleeSound "baron/melee"
  ReactionTime 8
	Species "HK"
	+DONTHURTSPECIES  
	+DONTBLAST
	+USEKILLSCRIPTS
  Monster
  +FloorClip
  Obituary "%o was tagged by the hell warrior's fireball."
  HitObituary "%o was torn apart by a hell warrior."
  DamageFactor "Barons", 0.0
  DamageFactor "BaronsExp", 0.0
  DamageFactor "BaronsPoison", 0.0
  DamageFactor "BaronsFire", 0.0
  DamageFactor "BaronGreen", 0.0
  DamageFactor "BaronGreenFire", 0.0
  DamageFactor "BaronPlasma", 0.0
  DamageFactor "BaronVoid", 0.0
  DamageFactor "BaronYellow", 0.0
  DamageFactor "BaronsMagic", 0.0
	DamageFactor "BaronsMagicFire", 0.0
  Tag "Hell Warrior"
  States
  {
  Spawn:
	TNT1 A 0
	TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_HELLWARRIOR, DND_BLOCK)
Idle:
    HWAR AB 10 A_Look
    Loop
  See: 
    TNT1 A 0 A_UnSetInvulnerable
    HWAR AABBCCDD 3 Fast A_Chase
    Loop
  Missile:
    HWAR E 0 A_Jump(128, 4)
    HWAR EF 8 Fast A_FaceTarget
    HWAR G 8 Fast A_CustomComboAttack("HellWarriorBall", 32, 10 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "baron/melee")
    Goto See
    HWAR H 0 A_Jump(128, 6)
    HWAR H 0 A_SetInvulnerable
    HWAR H 6 Fast A_FaceTarget
    HWAR I 4 Fast Bright A_Custommissile("HellWarriorBall2", 25, 0, 0)
    HWAR H 6 Fast A_FaceTarget
    HWAR H 0 A_UnSetInvulnerable
    Goto See
    HWAR H 0 A_SetInvulnerable
	TNT1 A 0 A_ChangeFlag("NOBLOOD", 1)
    HWAR H 6 Fast A_FaceTarget
    HWAR I 4 Fast Bright A_Custommissile("HellWarriorBall2", 25, 0, 0)
    HWAR H 16 Fast A_SpidRefire
    HWAR I 4 Fast Bright A_Custommissile("HellWarriorBall2", 25, 0, 0)
    HWAR H 6 Fast A_FaceTarget
	TNT1 A 0 A_ChangeFlag("NOBLOOD", 0)
    HWAR H 0 A_UnSetInvulnerable
    Goto See  
  Melee: 
    HWAR EF 8 Fast A_FaceTarget 
    HWAR G 8 Fast A_ComboAttack 
    Goto See 
  Pain:
    TNT1 A 0 A_ChangeFlag("NOBLOOD", 0)
    HWAR J 6 Fast A_Pain 
    HWAR H 0 A_SetInvulnerable
	TNT1 A 0 A_ChangeFlag("NOBLOOD", 1)
    HWAR HHHHHHH 6 Fast A_FaceTarget 
    HWAR H 0 A_UnSetInvulnerable
	TNT1 A 0 A_ChangeFlag("NOBLOOD", 0)
    Goto See 
  Death: 
    HWAE K 0 A_FaceTarget
    HWAR K 5 A_SpawnItemEx("HellWarriorShield", 0, 0, 25, 6, 0, 0, 60, 128)
	TNT1 A 0 ACS_ExecuteAlways(982, 0, 2)
    HWAR L 5 A_Scream
	TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoul")
  GaveSoul:
    HWAR M 5
    HWAR N 5 A_NoBlocking 
    HWAR OPQRS 5  
    HWAR T -1 
    Stop
  GiveSoul:
  Death.BookOfTheDead:
    HWAR M 1
	TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
	TNT1 A 0 A_GiveToTarget("Souls", 1)  
  Goto GaveSoul
  Raise: 
    TNT1 A 0 A_GiveInventory("Mo_Revived", 1)
    HWAR QPONMLK 5 
    Goto See 
  } 
}

Actor HellWarriorBall
{
  Radius 6
  Height 8
  Speed 14
  Damage (8 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
  +DONTBLAST
  DamageType "BaronYellow"
  Projectile
  RenderStyle Add
  Alpha 0.7
  SeeSound "imp/attack"
  DeathSound "imp/shotx"
  Decal BaronScorch
  Translation "112:112=231:231", "113:119=161:167", "120:120=44:44", "121:121=78:79", "122:122=239:239", "123:126=5:8"
  States
  {
	Spawn:
		TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
	SpawnLoop:
		BAL7 AABB 2 Bright A_SpawnItem("HellWarriorBallTrail")
    Loop
  Death:
	TNT1 A 0 A_SpawnItemEx("YellowParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
	TNT1 AAA 0 A_CustomMissile("ExplosionFX9", 0, 0, random(0,360), 2, random(0,360))
	TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
    BAL7 CDE 5 Bright
    Stop
  }
}

Actor HellWarriorBallTrail {
	+CLIENTSIDEONLY
	+NOINTERACTION
	+NOGRAVITY
	Renderstyle Add
	Alpha 0.75
	Translation "112:112=231:231", "113:119=161:167", "120:120=44:44", "121:121=78:79", "122:122=239:239", "123:126=5:8"
	States {
		Spawn:
			BAL7 AB 2 Bright A_FadeOut(0.15)
		Loop
	}
}

Actor HellWarriorBall2
{
  Radius 6
  Height 8
  Speed 8
  Damage (2 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
  +DONTBLAST
  DamageType "Barons"
  Projectile
  RenderStyle Add
  +Randomize
  +Ripper
  Alpha 0.8
  Scale 0.4
  SeeSound "imp/attack"
  DeathSound "imp/shotx"
  States
  {
	Spawn:
		TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
	SpawnLoop:
		GRBA ABCDEFGH 2 Bright A_SpawnItem("HellWarriorBall2Trail")
    Loop
  Death:
    GRBA AIJKLMN 3 Bright
    Stop
  }
}

Actor HellWarriorBall2Trail {
	+CLIENTSIDEONLY
	+NOINTERACTION
	+NOGRAVITY
	Renderstyle Add
	Alpha 0.75
	Scale 0.75
	States {
		Spawn:
			GRBA ABCDEFGH 2 Bright A_FadeOut(0.075)
		Loop
	}
}

Actor HellWarriorShield
{
  Radius 8
  Height 8
  Speed 6
  +DoomBounce
  +DropOff
  +Missile
  +CLIENTSIDEONLY
  States
  {
  Spawn:
    HWSH ABCDEFGH 3
    Loop
  Death:
    HWSH I -1
    Loop
  }
}

Actor HellsFury : DnD_BaseEnemy
{
  //$Category Monsters
  Health 600
  Radius 24
  Height 64
  Speed 8
  PainChance 50
  Mass 1000
  MONSTER
  +FLOORCLIP
  SeeSound "baron/sight"
  ActiveSound "baron/active"
  PainSound "baron/pain"
  DeathSound "baron/death"
  Obituary "%o felt the wrath of Hell's Fury"
  HitObituary "%o got ripped apart by Hell's Fury"
  DamageFactor "Barons", 0.0
  DamageFactor "BaronsExp", 0.0
  DamageFactor "BaronsPoison", 0.0
  DamageFactor "BaronsFire", 0.0
  DamageFactor "BaronGreen", 0.0
  DamageFactor "BaronGreenFire", 0.0
  DamageFactor "BaronPlasma", 0.0
  DamageFactor "BaronVoid", 0.0
  DamageFactor "BaronYellow", 0.0
  DamageFactor "BaronsMagic", 0.0
	DamageFactor "BaronsMagicFire", 0.0
  Tag "Hell's Fury"
	Species "HK"
	+DONTHURTSPECIES  
	+DONTBLAST
	+USEKILLSCRIPTS
  States
  {
  Spawn:
	TNT1 A 0
	TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_HELLSFURY, DND_HOMING)
Idle:
    HFRY AB 10 A_Look
    Loop
  See:
    HFRY AABBCCDD 4 Fast A_Chase
    Loop
  Missile:
    HFRY E 0 A_Jump(96, "Missile2")
    HFRY EF 8 Fast A_FaceTarget
    HFRY G 8 Fast A_CustomComboAttack("HellsFuryBall", 32, 11 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "baron/melee")
    Goto See
  Missile2:
    HFRY P 8 Fast A_FaceTarget
    HFRY Q 0 A_CustomMissile("SoulHarvesterBall", 60, 0, -45)
    HFRY Q 0 A_CustomMissile("SoulHarvesterBall", 60, 0, 0)
    HFRY Q 8 Fast A_CustomMissile("SoulHarvesterBall", 60, 0, 45)
    Goto See
    Melee:
    HFRY EF 8 Fast A_FaceTarget
    HFRY G 8 Fast A_CustomComboAttack("HellsFuryBall", 32, 11 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "baron/melee")
    Goto See
  Pain:
    HFRY H 2 Fast
    HFRY H 2 Fast A_Pain
    Goto See
  Death:
	TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoul")
  GaveSoul: 
    HFRY I 8 A_Scream
	TNT1 A 0 ACS_ExecuteAlways(982, 0, 2)
    TNT1 A 0 A_FaceTarget
    TNT1 A 0 A_SpawnItemEx("HellsFurySkull", 0, 0, 60, 5, 0, 0, 10 * random(-2, 2), 128)
    HFRY J 8 
    HFRY K 8
    HFRY L 8 A_Fall
    HFRY MN 8
    HFRY O -1
    Stop
	  GiveSoul:
	  Death.BookOfTheDead:
		HFRY I 1
		TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
		TNT1 A 0 A_GiveToTarget("Souls", 1)  
	  Goto GaveSoul	
  Raise:
    TNT1 A 0 A_GiveInventory("Mo_Revived", 1)
    HFRY NMLKJI 8
    Goto See
   }
}

Actor HellsFuryBall 
{
  Radius 6
  Height 8
  Speed 14
  Damage (8 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
  +DONTBLAST
  DamageType "Barons"
  Projectile
  RenderStyle Add
  Alpha 0.7
  SeeSound "imp/attack"
  DeathSound "imp/shotx"
  Translation "112:122=175:188", "112:113=175:175", "123:123=44:44", "124:127=191:191"
  Decal BaronScorch
  States
  {
	Spawn:
		TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
	SpawnLoop:
		BAL7 AABB 2 Bright A_SpawnItem("HellsFuryBallTrail")
    Loop
  Death:
	TNT1 A 0 A_SpawnItemEx("RedParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
	TNT1 AAA 0 A_CustomMissile("ExplosionFX8", 0, 0, random(0,360), 2, random(0,360))
	TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
    BAL7 CDE 6 Bright
    Stop
  }
}

Actor HellsFuryBallTrail : HellWarriorBallTrail {
	Translation "112:122=175:188", "112:113=175:175", "123:123=44:44", "124:127=191:191"
	States {
		Spawn:
			BAL7 AB 2 Bright A_FadeOut(0.15)
		Loop
	}
}

Actor HellsFurySkull
{
  Radius 5
  Height 5
  Speed 5
  Mass 5000
  +DropOff
  +DoomBounce
  +Missile
  +CLIENTSIDEONLY
  States
  {
  Spawn:
    FSKL ABCDEFGHIJK 2
    Loop
  Death:
    FSKL L -1
    Loop
  }
}

Actor ArchonOfHell : HellKnight2
{ 
  Health 700 
  Radius 24 
  Height 64 
  Mass 1000 
  Speed 8 
  PainChance 20 
  Monster
  Obituary "%o was no match for an archon of hell."
  HitObituary "%o was ripped apart by an archon of hell."
  BloodColor "20 60 20"
  +NoTarget
  +FloorClip
  +MissileMore
  +BossDeath
  +DONTBLAST
  +USEKILLSCRIPTS
	Species "HK"
	+DONTHURTSPECIES  
  SeeSound "monster/ar2sit" 
  PainSound "baron/pain" 
  DeathSound "monster/ar2dth"
  MeleeSound "baron/melee"
  DropItem "SoulAmmoSpawner", 128
  DamageFactor "Barons", 0.0
  DamageFactor "BaronsExp", 0.0
  DamageFactor "BaronsPoison", 0.0
  DamageFactor "BaronsFire", 0.0
  DamageFactor "BaronGreen", 0.0
  DamageFactor "BaronGreenFire", 0.0
  DamageFactor "BaronPlasma", 0.0
  DamageFactor "BaronVoid", 0.0
  DamageFactor "BaronYellow", 0.0
  DamageFactor "BaronsMagic", 0.0
	DamageFactor "BaronsMagicFire", 0.0
  Tag "Archon of Hell"
  States 
  { 
  Spawn: 
	TNT1 A 0
	TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_ARCHON)
Idle:
    BOS4 AB 10 A_Look 
    Loop 
  See:
    BOS4 AABBCCDD 3 Fast A_Chase 
    Loop 
  Missile:
    BOS4 B 0 A_Jump(128,15)
    BOS4 EF 8 Fast Bright A_FaceTarget 
    BOS4 G 0 Bright A_CustomMissile("BaronBall",28,0,0,0)
    BOS4 G 0 Bright A_CustomMissile("BaronBall",28,0,-4,0)
    BOS4 G 3 Fast Bright A_CustomMissile("BaronBall",28,0,4,0)
    BOS4 H 3 Fast Bright
    BOS4 H 0 A_Jump(64,8)
    BOS4 IJ 8 Fast Bright A_FaceTarget 
    BOS4 K 0 Bright A_CustomMissile("BaronBall",28,0,0,0)
    BOS4 K 0 Bright A_CustomMissile("BaronBall",28,0,-4,0)
    BOS4 K 3 Fast Bright A_CustomMissile("BaronBall",28,0,4,0)
    BOS4 L 3 Fast Bright
    BOS4 L 0 A_Jump(64,1)
    Goto See
    BOS4 MN 8 Fast Bright A_FaceTarget
    BOS4 O 0 Bright A_Jump(128,3)
    BOS4 O 4 Fast Bright A_CustomMissile("ArchonComet",28,0,0,0)
    BOS4 P 4 Fast Bright
    Goto See
    BOS4 O 0 A_CustomMissile("BaronBall",28,0,-6,0)
    BOS4 O 0 A_CustomMissile("BaronBall",28,0,-4,0)
    BOS4 O 0 A_CustomMissile("BaronBall",28,0,-2,0)
    BOS4 O 0 A_CustomMissile("BaronBall",28,0,2,0)
    BOS4 O 0 A_CustomMissile("BaronBall",28,0,4,0)
    BOS4 O 3 Fast Bright A_CustomMissile("BaronBall",28,0,6,0)
    BOS4 P 3 Fast Bright
    Goto See
  Melee:
    BOS4 EF 8 Fast Bright A_FaceTarget 
    BOS4 G 3 Fast Bright A_CustomMeleeAttack(10 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "baron/melee")
    BOS4 H 3 Fast Bright
    BOS4 H 0 A_Jump(128,1)
    Goto See
    BOS4 IJ 8 Fast Bright A_FaceTarget 
    BOS4 K 3 Fast Bright A_CustomMeleeAttack(10 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "baron/melee")
    BOS4 L 3 Fast Bright
    BOS4 L 0 A_Jump(64,1)
    Goto See
    BOS4 MN 8 Fast Bright A_FaceTarget
    BOS4 O 3 Fast Bright A_CustomMeleeAttack(20 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "baron/melee")
    BOS4 P 3 Fast Bright
    Goto See
  Pain: 
    BOS4 Q 2 Fast 
    BOS4 Q 2 Fast A_Pain 
    Goto See 
  Death:
    TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoul")
  GaveSoul:
    BOS4 R 6 Bright 
	TNT1 A 0 ACS_ExecuteAlways(982, 0, 2)
    BOS4 S 6 Bright A_Scream 
    BOS4 T 6 Bright 
    BOS4 U 6 Bright A_NoBlocking 
    BOS4 VW 6 Bright 
    BOS4 X 6 Bright A_CustomMissile("ArchonSoul",86,0,0,2,90)
    BOS4 YZ 6 Bright 
    BOS4 [ 6 Bright
    Stop
	  GiveSoul:
	  Death.BookOfTheDead:
		BOS4 R 1 Bright
		TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
		TNT1 A 0 A_GiveToTarget("Souls", 1)  
	  Goto GaveSoul	
  } 
}

Actor ArchonExp : BaseExplosionDamage
{
	DamageType "BaronGreen"
	Obituary "%o was no match for an archon of hell."
	States
	{
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
			TNT1 A 1 A_Explode(32 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)), 128, 0)
		Stop
	}
}

Actor ArchonComet
{
  Radius 8
  Height 12
  Speed 24
  Damage (6 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
  Scale 1.0
  Projectile
  +ThruGhost
  +DONTBLAST
  SeeSound "weapons/firbfi"
  DeathSound "weapons/hellex"
  DontHurtShooter
  DamageType "BaronGreen"
  States
  {
	Spawn: 
		TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
	SpawnLoop:
		ARCB AAAABBBBCCCC 1 Bright A_SpawnItemEx("ArchonCometTrail",0,0,0,0,0,0,0,128)
    Loop
  Death:
	TNT1 AA 0 A_SpawnItemEx("GreenParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
	TNT1 AAA 0 A_CustomMissile("ExplosionFX4", 0, 0, random(0,360), 2, random(0,360))
    TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
    TNT1 A 0 A_SetTranslucent (0.67,1)
    ARCB J 3 Bright
    ARCB K 3 Bright A_SpawnItem("ArchonExp")
    ARCB LMN 3 Bright
    Stop
  }
}

Actor ArchonSoul
{   
  Radius 1
  Height 1
  Speed 3
  Projectile
  RenderStyle Add
  Alpha 0.80
  +CLIENTSIDEONLY
  States
  {
  Spawn:
    BFX1 ABCD 6 Bright
    Stop 
  }
}

Actor ArchonCometTrail
{   
  Radius 3
  Height 3
  Scale 0.75
  Speed 0
  Projectile
  RenderStyle Add
  Alpha 0.67
  +CLIENTSIDEONLY
  States
  {
  Spawn:
    TNT1 A 3 Bright
    ARCB DEFGHI 3 Bright
    Stop 
  }
}

Actor WarlordOfHell : DnD_BaseEnemy
{ 
  Health 650
  Radius 24
  Height 64 
  Speed 10 
  PainChance 50
  Scale 1.1
  Mass 1000
  BloodColor "39 59 9F"
  Species "Barons"
  DamageFactor "Barons", 0.0
  DamageFactor "BaronsExp", 0.0
  DamageFactor "BaronsPoison", 0.0
  DamageFactor "BaronsFire", 0.0
  DamageFactor "BaronGreen", 0.0
  DamageFactor "BaronGreenFire", 0.0
  DamageFactor "BaronPlasma", 0.0
  DamageFactor "BaronVoid", 0.0
  DamageFactor "BaronYellow", 0.0
  DamageFactor "BaronsMagic", 0.0
	DamageFactor "BaronsMagicFire", 0.0
  Monster
  +FloorClip
  +DONTBLAST
  +NoRadiusDmg
  +USEKILLSCRIPTS
  Obituary "%o was extingished by the warlord of hell." 
  SeeSound "warlord/sight" 
  PainSound "warlord/pain" 
  DeathSound "warlord/death" 
  ActiveSound "warlord/active" 
  Translation "1:2=8:0", "13:15=5:7", "48:64=90:110", "64:70=109:112", "70:83=5:10", "110:123=196:207", "80:111=80:111", "124:127=242:245", "128:141=102:111", "143:149=104:114", "142:143=5:5", "148:151=5:7"
  Tag "Warlord of Hell"
  States 
  { 
  Spawn: 
	TNT1 A 0
	TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_WARLORD, DND_EXPLOSIVE_IMMUNE)
Idle:
    BOS2 AB 10 A_Look 
    Loop 
  See: 
    BOS2 AABBCCDD 4 Fast A_Chase 
    Loop 
  Missile: 
    BOS2 E 0 A_JumpIfHealthLower(ACS_ExecuteWithResult(961, 7) / 3, "Missile3") 
    BOS2 E 0 A_JumpIfHealthLower(2 * ACS_ExecuteWithResult(961, 7) / 3, "Missile2")
    BOS2 E 6 Fast A_FaceTarget 
    BOS2 F 6 Fast A_FaceTarget 
    BOS2 G 6 Fast A_Custommissile("WarlordOfHellBall", 32, 0, 0)
    Goto See
  Missile2:
    BOS2 E 6 Fast A_FaceTarget 
    BOS2 F 6 Fast A_FaceTarget 
    BOS2 G 0 A_Custommissile("WarlordOfHellBall", 32, 0, 8) 
    BOS2 G 6 Fast A_Custommissile("WarlordOfHellBall", 32, 0, 0)
    BOS2 X 6 Fast A_FaceTarget 
    BOS2 Y 6 Fast A_FaceTarget 
    BOS2 R 0 A_Custommissile("WarlordOfHellBall", 32, 0, 0) 
    BOS2 Z 6 Fast A_Custommissile("WarlordOfHellBall", 32, 0, -8)
    Goto See 
  Missile3:
    BOS2 E 6 Fast A_FaceTarget 
    BOS2 F 6 Fast A_FaceTarget 
    BOS2 G 0 A_Custommissile("WarlordOfHellBall", 32, 0, -20) 
    BOS2 G 6 Fast A_Custommissile("WarlordOfHellBall", 32, 0, 0) 
    BOS2 X 6 Fast A_FaceTarget 
    BOS2 Y 6 Fast A_FaceTarget 
    BOS2 R 0 A_Custommissile("WarlordOfHellBall", 32, 0, 20) 
    BOS2 Z 6 Fast A_Custommissile("WarlordOfHellBall", 32, 0, 0) 
    BOS2 E 6 Fast A_FaceTarget 
    BOS2 F 6 Fast A_FaceTarget 
    BOS2 G 0 A_Custommissile("WarlordOfHellBall", 32, 0, -12) 
    BOS2 G 6 Fast A_Custommissile("WarlordOfHellBall", 32, 0, 12) 
    Goto See 
  Pain: 
    BOS2 H 5 Fast 
    BOS2 H 5 Fast A_Pain 
    Goto See 
  Death: 
	TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "giveSoul")
  GaveSoul:
    BOS2 I 12 
	TNT1 A 0 ACS_ExecuteAlways(982, 0, 2)
    BOS2 J 12 A_Scream 
    BOS2 K 6
	BOS2 K 6 A_Fall
    BOS2 LMN 12 
    BOS2 O -1 
    Stop 
	  GiveSoul:
	  Death.BookOfTheDead:
		BOS2 I 1
		TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
		TNT1 A 0 A_GiveToTarget("Souls", 1)  
	  Goto GaveSoul	
  Raise: 
    TNT1 A 0 A_GiveInventory("Mo_Revived", 1)
    TNT1 A 0 A_GiveInventory("NoDrop", 1)
    BOS2 ONMLKJI 5 
    Goto See
  } 
}

Actor WarlordOfHellBall
{
  Radius 6
  Height 8
  Speed 20
  Damage (8 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
  Projectile
  SeeSound "imp/attack"
  DeathSound "imp/shotx"
  Damagetype "Barons"
  Decal BaronScorch
  Translation "111:123=197:207", "124:127=242:245"
  +DONTBLAST
  States
  {
	Spawn:
		TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
	SpawnLoop:
		BAL7 AAAABBBB 1 Bright A_SpawnItem("WarlordBallTrail")
    Loop
  Death:
	TNT1 A 0 A_SpawnItemEx("BlueParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
	TNT1 AAA 0 A_CustomMissile("ExplosionFX5", 0, 0, random(0,360), 2, random(0,360))
	TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
    BAL7 CDE 6 Bright
    Stop
  }
}

Actor WarlordBallTrail
{
	+NOBLOCKMAP
	+NOGRAVITY
	+CLIENTSIDEONLY
	Height 2
	Radius 2
	Renderstyle Add
	Alpha 0.75
	Translation "111:123=197:207", "124:127=242:245"
	States
	{
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_Jump(128, "Type2")
		SpawnLoop:
			BAL7 A 1 A_FadeOut(0.15)
		Loop
		Type2:
			BAL7 B 1 A_FadeOut(0.15)
		Loop
	}
}

ACTOR ShadowBeast : DnD_BaseEnemy
{
  OBITUARY "%o was killed by a shadow beast."
  Bloodcolor "70 AC 00"
  Health 400
  Radius 24
  Height 64
  Mass 500
  Speed 12
  MeleeRange 96
  GibHealth -75
  PainChance 144
  SEESOUND "shadowbeast/sight"
  PAINSOUND "shadowbeast/pain"
  DEATHSOUND "shadowbeast/death"
  ACTIVESOUND "shadowbeast/active"
  DropItem "SoulAmmoSpawner", 96
  MONSTER
  DamageFactor "Barons", 0.0
  DamageFactor "BaronsExp", 0.0
  DamageFactor "BaronsPoison", 0.0
  DamageFactor "BaronsFire", 0.0
  DamageFactor "BaronGreen", 0.0
  DamageFactor "BaronGreenFire", 0.0
  DamageFactor "BaronPlasma", 0.0
  DamageFactor "BaronVoid", 0.0
  DamageFactor "BaronYellow", 0.0
  DamageFactor "BaronsMagic", 0.0
	DamageFactor "BaronsMagicFire", 0.0
  Species "HK"
  Tag "Shadow Beast"
  +DONTHURTSPECIES
  +FloorClip
  +DONTBLAST
  +USEKILLSCRIPTS
  states
  {
  Spawn:
	TNT1 A 0
	TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_SHADOWBEAST, DND_RAGE)
Idle:
    BDEM AB 10 A_Look
    Loop
  See:
    TNT1 A 0 A_JumpIfHealthLower (ACS_ExecuteWithResult(961, 7) / 2, "Run") 
    BDEM ABCDEF 6 Fast A_Chase
    Loop
  Run:
    TNT1 A 0 A_PlaySound("shadowbeast/sight")
    BDEM AABBCCDDEEFF 2 Fast A_Chase("Spit","Missile")
    BDEM AABBCCDDEEFF 2 Fast A_Chase("Spit","Missile")
    BDEM AABBCCDDEEFF 2 Fast A_Chase("Spit","Missile")
    Goto Missile
  Missile:
    TNT1 A 0 A_JumpIfHealthLower (ACS_ExecuteWithResult(961, 7) / 2, "Missile2") 
    TNT1 A 0 A_Jump(90, 5)
    BDEM H 6 Fast A_FaceTarget
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball1", 56, 0, -8)
    BDEM I 6 Fast A_CustomMissile ("ShadowBeast_Ball1", 56, 0, 8)
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball1", 56, 0, 0)
    Goto See
    BDEM H 4 Fast A_FaceTarget
    BDEM I 4 Fast A_CustomMissile ("ShadowBeast_Ball2", 56, 0, -16)
    BDEM I 0 A_FaceTarget
    BDEM I 4 Fast A_CustomMissile ("ShadowBeast_Ball2", 56, 0, -8)
    BDEM I 0 A_FaceTarget
    BDEM I 4 Fast A_CustomMissile ("ShadowBeast_Ball2", 56, 0, 0)
    BDEM I 0 A_FaceTarget
    BDEM I 4 Fast A_CustomMissile ("ShadowBeast_Ball2", 56, 0, 8)
    BDEM I 0 A_FaceTarget
    BDEM I 4 Fast A_CustomMissile ("ShadowBeast_Ball2", 56, 0, 16)
    BDEM I 0 A_FaceTarget
    BDEM I 4 Fast A_CustomMissile ("ShadowBeast_Ball2", 56, 0, 32)
    Goto See
  Missile2:
    TNT1 A 0 A_Jump(90, 15)
  Spit:
    BDEM H 6 Fast A_FaceTarget
    BDEM I 2 Fast A_CustomMissile ("ShadowBeast_BallFire", 56, 0, random(-8,8))
    BDEM I 2 Fast A_CustomMissile ("ShadowBeast_BallFire", 56, 0, random(-8,8))
    BDEM I 2 Fast A_CustomMissile ("ShadowBeast_BallFire", 56, 0, random(-8,8))
    BDEM I 2 Fast A_CustomMissile ("ShadowBeast_BallFire", 56, 0, random(-8,8))
    BDEM I 2 Fast A_CustomMissile ("ShadowBeast_BallFire", 56, 0, random(-8,8))
    BDEM I 2 Fast A_CustomMissile ("ShadowBeast_BallFire", 56, 0, random(-8,8))
    BDEM I 2 Fast A_CustomMissile ("ShadowBeast_BallFire", 56, 0, random(-8,8))
    BDEM I 2 Fast A_CustomMissile ("ShadowBeast_BallFire", 56, 0, random(-8,8))
    BDEM I 2 Fast A_CustomMissile ("ShadowBeast_BallFire", 56, 0, random(-8,8))
    BDEM I 2 Fast A_CustomMissile ("ShadowBeast_BallFire", 56, 0, random(-8,8))
    BDEM I 2 Fast A_CustomMissile ("ShadowBeast_BallFire", 56, 0, random(-8,8))
    BDEM I 2 Fast A_CustomMissile ("ShadowBeast_BallFire", 56, 0, random(-8,8))
    BDEM I 2 Fast A_CustomMissile ("ShadowBeast_BallFire", 56, 0, random(-8,8))
    Goto See
    BDEM H 16 Fast A_FaceTarget
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball3", 56, 0, -64)
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball3", 56, 0, 64)
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball3", 56, 0, -56)
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball3", 56, 0, 56)
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball3", 56, 0, -48)
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball3", 56, 0, 48)    
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball3", 56, 0, -40)
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball3", 56, 0, 40)    
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball3", 56, 0, -32)
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball3", 56, 0, 32)
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball3", 56, 0, -24)
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball3", 56, 0, 24)
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball3", 56, 0, -16)
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball3", 56, 0, 16)    
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball3", 56, 0, -8)
    BDEM I 0 A_CustomMissile ("ShadowBeast_Ball3", 56, 0, 8)    
    BDEM I 6 Fast A_CustomMissile ("ShadowBeast_Ball3", 56, 0, 0)
    Goto See
  Pain:
    BDEM G 4 Fast A_Pain
    Goto See
  Death:
	TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoulN")
  GaveSoulN:
    BDEM R 8
	TNT1 A 0 ACS_ExecuteAlways(982, 0, 2)
    BDEM S 8 A_Scream
	TNT1 A 0 A_NoBlocking
    BDEM TUVWX 6
    BDEM Y 6
    BDEM Z -1
    Stop
  XDeath:
	TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoulX")
  GaveSoulX:
    BDEM J 6
	TNT1 A 0 ACS_ExecuteAlways(982, 0, 2)
	BDEM K 6 A_Scream
	TNT1 A 0 A_NoBlocking
	BDEM LMNOPQ 6
    Stop
	  GiveSoulN:
		BDEM R 1
		TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
		TNT1 A 0 A_GiveToTarget("Souls", 1)  
	  Goto GaveSoulN
	  GiveSoulX:
		BDEM J 1
		TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
		TNT1 A 0 A_GiveToTarget("Souls", 1)  
	  Goto GaveSoulX	  
  Raise:
    TNT1 A 0 A_GiveInventory("Mo_Revived", 1)
    BDEM YXWVUT 6
	BDEM SR 8
	Goto See
  }
}

ACTOR ShadowBeast_BallFire
{
  Alpha 1.0  
  Renderstyle Add
  Speed 15
  Radius 10
  Height 6
  Damage (2 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
  DamageType "BaronGreenFire"
  Projectile
  +SPAWNSOUNDSOURCE
  +RIPPER
  +DONTBLAST
  RenderStyle Add
  SeeSound "shadowbeast/pr1death"
  Decal MummyScorch
  States
  {
	Spawn:
		TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
	SpawnLoop:
		BDP2 DEFGH 5 Bright
    Goto Death
  Death:
    TNT1 A 0
    Stop
  }
}

ACTOR ShadowBeast_Ball1
{
  Alpha 1.0  
  Renderstyle Add
  Speed 15
  Radius 10
  Height 6
  Damage (5*random(2,5) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
  DamageType "BaronGreenFire"
  Projectile
  +SPAWNSOUNDSOURCE
  +DONTBLAST
  RenderStyle Add
  SeeSound "shadowbeast/pr1sight"
  DeathSound "shadowbeast/pr1death"
  States
  {
	Spawn:
		TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
	SpawnLoop:
		BDP2 ABC 4 Bright
    Loop
  Death:
	TNT1 A 0 A_SpawnItemEx("GreenParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
	TNT1 AAA 0 A_CustomMissile("ExplosionFX4", 0, 0, random(0,360), 2, random(0,360))
	TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
    BDP2 DE 4 Bright
    BDP2 FGH 3 Bright
    Stop
  }
}

ACTOR ShadowBeast_Ball2
{
   Alpha 1.0
   Renderstyle Add
   Radius 8
   Height 6
   Damage (2 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
   Damagetype "BaronGreenFire"
   Speed 16
   PROJECTILE
   +Randomize
   +DONTBLAST
   SeeSound "shadowbeast/pr2sight"
   DeathSound "shadowbeast/pr2death"
   Decal PlasmaScorchLower
   States
     {
     Spawn:
	 	TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
	SpawnLoop:
		BDP1 D 1 A_BishopMissileWeave
		BDP1 E 1 A_BishopMissileWeave
     loop
     Death:
     BDP1 FGHI 3
     Stop
   }
}

ACTOR ShadowBeast_Ball3
{
   Alpha 1.0
   Scale 1.4
   Renderstyle Add
   Radius 8
   Height 6
   Damage (5 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
   DamageType "BaronGreenFire"
   Speed 20
   PROJECTILE
   +DONTBLAST
   +Randomize
   SeeSound "shadowbeast/pr2sight"
   DeathSound "shadowbeast/pr2death"
   Decal PlasmaScorchLower
   States
     {
     Spawn:
	 	TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
	SpawnLoop:
		BDP1 DEDEDEDED 2 A_BishopMissileWeave
		BDP1 ED 2 A_BishopMissileWeave
		TNT1 A 0 A_FadeOut(0.20)
     Goto Spawn+9
     Death:
     BDP1 FGHI 3
     Stop
   }
}

actor BlackKnight : UndeadBulletResistantEnemy {
	Health 550
	Radius 24
	Height 64
	PainChance 100
	Mass 0x7FFFFFFF
	MeleeRange 96
	MaxStepHeight 32
	Speed 9
	Scale 0.95
	Species "HK"
	DamageFactor "Barons", 0.0
	DamageFactor "BaronsExp", 0.0
	DamageFactor "BaronsPoison", 0.0
	DamageFactor "BaronsFire", 0.0
	DamageFactor "BaronGreen", 0.0
	DamageFactor "BaronGreenFire", 0.0
	DamageFactor "BaronPlasma", 0.0
	DamageFactor "BaronVoid", 0.0
	DamageFactor "BaronYellow", 0.0
	DamageFactor "BaronsMagic", 0.0
	DamageFactor "BaronsMagicFire", 0.0
	DamageFactor "P_Ice", 1.5
	RadiusDamageFactor 0.5
	Tag "Black Knight"
	Monster
	+NOBLOOD
	+FLOORCLIP
	+DONTBLAST
	+DONTRIP
	+DONTHURTSPECIES
	+USEKILLSCRIPTS
	SeeSound "dknight/sight"
	ActiveSound "dknight/active"
	MeleeSound "dknight/melee"
	PainSound "dknight/pain"
	DeathSound "dknight/death"

	HitObituary "%o was sliced by a black knight."
	Obituary "%o was burned from a black knight's dark magic."
	States {
		Spawn:
			TNT1 A 0
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_BLACKKNIGHT, DND_SILVER_WEAKNESS | DND_BULLET_RESIST | DND_MELEE_RESIST | DND_HARDENED_SKIN | DND_EXPLOSIVE_RESIST | DND_MOBILITY)
		Idle:
			KNGT E 5 A_Look
		Loop
		See:
			TNT1 A 0 A_UnsetInvulnerable
			KNGT AABBCCDD 2 Fast A_Chase
		Loop
		Melee:
			KNGT E 3 Fast A_FaceTarget
			KNGT F 2 Fast A_FaceTarget
			KNGT F 0 A_PlaySound("dknight/swing")
			KNGT GH 2 Fast
			KNGT I 3 Fast A_CustomMeleeAttack(4 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "dknight/melee")
			KNGT J 4 Fast A_CustomMeleeAttack(4 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "dknight/melee")
			KNGT E 2 Fast
		Goto See
		Missile:
			TNT1 A 0 A_Jump(96, "Charge")
			KNGT E 4 Fast A_FaceTarget
			KNGT F 3 Fast A_FaceTarget
			KNGT GH 3 Fast
			KNGT I 3 Fast A_CustomMissile("KFireBall",32,0,-12)
			KNGT I 3 Fast A_CustomMissile("KFireBall",32,0,-8)
			KNGT I 3 Fast A_CustomMissile("KFireBall",32,0,-4)
			KNGT I 3 Fast A_CustomMissile("KFireBall",32,0,0)
			KNGT I 3 Fast A_CustomMissile("KFireBall",32,0,4)
			KNGT I 3 Fast A_CustomMissile("KFireBall",32,0,8)
			KNGT I 3 Fast A_CustomMissile("KFireBall",32,0,12)
			KNGT E 2 Fast
		Goto See
		Charge:
			TNT1 A 0 A_PlaySound("dknight/sight")
			TNT1 A 0 A_FaceTarget
			TNT1 A 0 ACS_ExecuteAlways(971, 0, 14) // script sets velocity, ensures no dropoff
			TNT1 A 0 A_ChangeFlag("SKULLFLY", 1)
			TNT1 A 0 A_SetInvulnerable
		ChargeLoop:
			TNT1 A 0 ACS_ExecuteAlways(971, 0, 14)
			KNGT ABCD 2 A_FaceTarget
		Loop
		Pain:
			TNT1 A 0 A_UnsetInvulnerable
			KNGT E 3 Fast A_Pain
			KNGT E 3 Fast
		Goto See
		Raise:
			TNT1 A 0 A_GiveInventory("Mo_Revived", 1)
			KNGT QPONLMK 3
		Goto See
		Death:
			KNGT K 6 A_Scream
			TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoul")
		GaveSoul:
			KNGT L 5
			KNGT M 5
			TNT1 A 0 A_NoBlocking
			KNGT NOPQ 5
			KNGT R -1
		Stop
		GiveSoul:
		Death.BookOfTheDead:
			KNGT L 1
			TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
			TNT1 A 0 A_GiveToTarget("Souls", 1)  
		Goto GaveSoul
	}
}
       
ACTOR KFireBall {
	Radius 8
	Height 8
	Speed 18
	Damage (random(6, 16) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	DamageType "BaronsMagic"
	PROJECTILE
	SeeSound "monster/dkball"
	+DONTBLAST
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		SpawnLoop:
			TNT1 A 0 A_CustomMissile("KBallTrail",0,0,-90,0)
			KATK E 2 Bright A_CustomMissile("KBallTrail",0,0,90,0)
		Loop
		Death:
			TNT1 A 0 A_SpawnItemEx("OrangeParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
			TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
			KATK HIJ 5 Bright
		Stop
	}
}

ACTOR KBallTrail
{
	Radius 1
	Height 1
	Speed 1
	Damage 0
	Scale 1.4
	PROJECTILE
	+CLIENTSIDEONLY
	+NOGRAVITY
	States {
		Spawn:
			KATK FG 14 BRIGHT
		Stop
	}
}

Actor SkullWizard : MagicalEnemy
{
  Obituary "%o succumbed to a Skull Wizard's magic."
  Health 500
  Radius 21
  Height 64
  Mass 120
  Speed 3
  PainChance 48
  MeleeRange 96
  MeleeDamage 4
  MissileType "SkullWizardProjectile"
  SeeSound "H2SkullWizard/Sight"
  PainSound "H2SkullWizard/Pain"
  DeathSound "H2SkullWizard/Death"
  ActiveSound "H2SkullWizard/Sight"
  MeleeSound "H2SkullWizard/Melee"
  Monster
  Species "HK"
  DamageFactor "Barons", 0.0
  DamageFactor "BaronsExp", 0.0
  DamageFactor "BaronsPoison", 0.0
  DamageFactor "BaronsFire", 0.0
  DamageFactor "BaronGreen", 0.0
  DamageFactor "BaronGreenFire", 0.0
  DamageFactor "BaronPlasma", 0.0
  DamageFactor "BaronVoid", 0.0
  DamageFactor "BaronYellow", 0.0
  DamageFactor "BaronsMagic", 0.0
	DamageFactor "BaronsMagicFire", 0.0
  Tag "Skull Wizard"
  +FloorClip
  +DontHurtSpecies
  +MissileMore
  +DONTBLAST
  +USEKILLSCRIPTS
  States
  {
  Spawn:
	TNT1 A 0
	TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_SKULLWIZARD, DND_MAGIC_WEAKNESS | DND_HOMING | DND_TELEPORT)
Idle:
    SKWZ A 1 A_Look
    Loop
  See:
    SKWZ AAAAAABBBBBBB 4 Fast A_Chase
    Loop
  Melee:
    SKWZ C 6 Fast Bright A_FaceTarget
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_CustomMeleeAttack(10 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)), "", "")
	TNT1 A 0 A_CustomMissile("SkullWizardPush", 40)
	SKWZ D 6 Fast Bright A_FaceTarget
    Goto See
  Missile:
    SKWZ C 0 A_Jump(128, "Teleport")
  Attack:
    SKWZ C 8 Fast A_FaceTarget
    SKWZ D 8 Fast Bright A_FaceTarget
    SKWZ D 8 Fast Bright A_CustomMissile("SkullWizardProjectile", 40, 0, 0)
    SKWZ D 0 Bright A_Jump(80, 2)
    SKWZ D 0 Bright A_SpidReFire
    Goto Missile+1
    SKWZ D 0
    Goto See
  Teleport:
    SKWZ C 0 A_JumpIfCloser(512, 1)
    Goto See
    SKWZ C 8 Fast A_PlaySoundEx("H2SkullWizard/Teleport", "SoundSlot7", 0)
    SKWZ DEF 8 Fast Bright
    TNT1 A 0 A_Stop
    TNT1 A 0 A_StopSoundEx("SoundSlot7")
    TNT1 A 0 A_SpawnItemEx("SkullWizardTeleport", 0, 0, 0, 0, 0, 0, 0, 128) //Remove the 33 for Doom
    TNT1 A 0 A_ChangeFlag("NoTeleport", 1)
    TNT1 A 0 A_ChangeFlag("NoDropOff", 0)
	TNT1 A 0 A_ChangeFlag(Invulnerable, 1)
    TNT1 A 0 A_UnSetShootable
    TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
    TNT1 AAA 3 Fast A_Wander
    TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
    TNT1 AAA 3 Fast A_Wander
    TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
    TNT1 AAA 3 Fast A_Wander
    TNT1 AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
    TNT1 AAA 3 Fast A_Wander
	SKWZ A 0 A_ChangeFlag(Invulnerable, 0)
    SKWZ A 0 A_SetShootable
	TNT1 A 0 A_PlaySound("Wizard/Appear", 7)
    SKWZ A 0 A_SpawnItemEx("SkullWizardTeleport", 0, 0, 0, 0, 0, 0, 0, 128)
    SKWZ A 0 A_ChangeFlag("NoDropOff", 1)
    SKWZ A 0 A_ChangeFlag("NoTeleport", 0)
	TNT1 A 0 A_Jump(128, "Attack")
    Goto See
  Pain:
    SKWZ A 3 Fast
    SKWZ A 3 Fast A_Pain
    SKWZ A 0 A_Jump(96, "Teleport")
    Goto See
  Death:
    SKWZ G 5 A_Scream
	TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoul")
  GaveSoul:
    SKWZ HIJ 5 bright
	TNT1 A 0 ACS_ExecuteAlways(982, 0, 2)
	SKWZ K 5 bright
	SKWZ LM 5 bright
    SKWZ N 5
    SKWZ O 0 A_NoBlocking
	SKWZ O 5 Bright
    SKWZ P -1
    Stop
  Raise:
    TNT1 A 0 A_GiveInventory("Mo_Revived", 1)
	SKWZ ON 5
	SKWZ MLKJIH 5 Bright
	SKWZ G 5
	Goto See
		GiveSoul:
		Death.BookOfTheDead:
			SKWZ H 1 Bright
			TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
			TNT1 A 0 A_GiveToTarget("Souls", 1)  
		Goto GaveSoul
   }
}

Actor SkullWizardPush {
	radius 5
	height 5
	speed 48
	DamageType "BaronsMagic"
	damage (random(1, 2) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	DeathSound "Wizard/Push"
	PROJECTILE
	+SEEKERMISSILE
	+DONTBLAST
	+THRUGHOST
	States {
		spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
			TNT1 AA 1 A_SeekerMissile(90, 90, SMF_PRECISE)
			stop
		death:
			TNT1 A 1 A_Blast(0, 4, 40, 20)
			TNT1 A 1
		stop
	}
}

Actor SkullWizardProjectile
{
    PROJECTILE
    +SEEKERMISSILE
	+NoDamageThrust
	+DONTBLAST
	Damagetype "BaronsMagicFire"
    Speed 16
    Damage (random(3, 7) * 5 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
    Radius 6
    Height 8
    RenderStyle Add
    Scale 0.6
    SeeSound "H2SkullWizard/Fire"
    DeathSound "H2SkullWizard/Hit"
    States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		SpawnLoop:
			IFX1 A 1 Bright A_SpawnItemEx("SkullSpellTrail2",0,0,0,0,random(2,-2),random(2,-2),0,0)
			IFX1 A 1 Bright A_SpawnItemEx("SkullSpellTrail2",0,0,0,0,random(2,-2),random(2,-2),0,0)
			IFX1 B 1 Bright A_SpawnItemEx("SkullSpellTrail2",0,0,0,0,random(2,-2),random(2,-2),0,0)
			IFX1 B 1 Bright A_SpawnItemEx("SkullSpellTrail2",0,0,0,0,random(2,-2),random(2,-2),0,0)
			TNT1 A 0 A_SeekerMissile(1,1)
		Loop
		Death:
			TNT1 A 0 A_SpawnItemEx("OrangeParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
			TNT1 AAA 0 A_CustomMissile("ExplosionFX2", 0, 0, random(0,360), 2, random(0,360))
			TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
			IFX1 IJKL 4 Bright
		Stop
    }
}

Actor SkullSpellTrail2 {
    PROJECTILE
    +NOCLIP
	+CLIENTSIDEONLY
	+NOINTERACTION
    Speed 0
    RenderStyle Add
    Alpha 0.6
    Scale 1.0
    States {
		Spawn:
			TNT1 A 1
			IFX1 CDEFGH 2 Bright
		Stop
    }
}

Actor SkullWizardTeleport {
	RenderStyle Translucent
	Alpha 0.25
	Height 2
	Radius 2
	+NOGRAVITY
	+CLIENTSIDEONLY
	+NOINTERACTION
	
	States {
		Spawn:
			SWZT ABCDEFG 1 Bright A_FadeIn(0.045)
			SWZT HIJKLMNOP 1 Bright
			SWZT QRSTUVWXYZ 1 Bright A_FadeOut(0.045)
		Stop
	}
}

Actor CyborgWarrior : MechanicalExplosiveResistEnemy { 
	Health 650
	Radius 24 
	Height 64 
	Mass 1000 
	Speed 9
	Monster
	Obituary "%o was blown to bits by a Cyborg Warrior."
	HitObituary "%o was smashed by a Cyborg Warrior."
	DamageFactor "Painless_Sun", 1.3
	+FloorClip
	+MissileMore
	+BossDeath
	+NOBLOOD
	+NOPAIN
	+DONTRIP
	Species "HK"
	+DONTHURTSPECIES
	+DONTBLAST
	+USEKILLSCRIPTS
	SeeSound "CyborgWarrior/See" 
	DeathSound "CyborgWarrior/Die"
	DamageFactor "Barons", 0.0
	DamageFactor "BaronsExp", 0.0
	DamageFactor "BaronsPoison", 0.0
	DamageFactor "BaronsFire", 0.0
	DamageFactor "BaronGreen", 0.0
	DamageFactor "BaronGreenFire", 0.0
	DamageFactor "BaronPlasma", 0.0
	DamageFactor "BaronVoid", 0.0
	DamageFactor "BaronYellow", 0.0
	DamageFactor "BaronsMagic", 0.0
	DamageFactor "BaronsMagicFire", 0.0
	Tag "Cyborg Warrior"
	States  { 
		Spawn: 
			TNT1 A 0
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_CYBORGWARRIOR, DND_ENERGY_WEAKNESS | DND_HOMING | DND_BULLET_RESIST | DND_MELEE_RESIST | DND_HARDENED_SKIN | DND_EXPLOSIVE_RESIST)
		Idle:
			QQMN AB 10 A_Look 
		Loop 
		See:
			QQMN A 1 Fast
			QQMN A 2 Fast A_Chase
			QQMN A 3 Fast A_Chase
			QQMN BB 3 Fast A_Chase
			QQMN C 1 Fast
			QQMN C 2 Fast A_Chase
			QQMN C 3 Fast A_Chase 
			QQMN DD 3 Fast A_Chase
		Loop 
		Missile:
			TNT1 A 0 A_Jump(96, "Missile2")
			QQMN E 8 Fast A_FaceTarget 
			QQMN O 4 Fast Bright A_CustomMissile("CyborgPlasma1",38,15,0,0)
			QQMN E 4 Fast A_FaceTarget
			QQMN O 4 Fast Bright A_CustomMissile("CyborgPlasma1",38,15,0,0)
			QQMN E 4 Fast A_FaceTarget
			QQMN O 4 Fast Bright A_CustomMissile("CyborgPlasma1",38,15,0,0)
		Goto See
		Missile2:
			QQMN E 8 Fast A_FaceTarget 
			QQMN F 6 Fast Bright A_CustomMissile("CyborgPlasma2",38,15,0,0)
			QQMN E 5 Fast A_FaceTarget
		Goto See
		Melee:
			TNT1 A 0 A_PlaySound("CyborgWarrior/Attack")
			QQMN GH 8 Fast A_FaceTarget
			QQMN I 8 Fast A_CustomMeleeAttack(40 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "weapons/vblhit", "")
			QQMN A 2 Fast
		Goto See 
		Death: 
			TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoul")
		GaveSoul:
			QQMN J 6 A_Scream
			TNT1 A 0 A_NoBlocking
			QQMN KL 5
			QQMN M 4
			QQMN N -1 A_BossDeath
		Stop
		GiveSoul:
		Death.BookOfTheDead:
			QQMN J 1
			TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
			TNT1 A 0 A_GiveToTarget("Souls", 1)  
		Goto GaveSoul  
		Raise:
			TNT1 A 0 A_GiveInventory("Mo_Revived", 1)
			QQMN MLKJ 6
		Goto See
	} 
}

Actor CyborgPlasma1 {
	PROJECTILE
	Translation "0:255=%[0.00,0.00,0.00]:[1.07,2.00,1.96]"
	Height 8
	Radius 4
	Renderstyle Add
	Alpha 0.875
	Damage (4 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	DamageType "BaronPlasma"
	Speed 30
	+FORCEXYBILLBOARD
	+DONTBLAST
    SeeSound "CyborgWarrior/Plasma1"
    DeathSound "weapons/firex5"
	States {
		Spawn: 
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
			BMIS A -1 Bright 
		Stop
		Death:
			TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
			TNT1 A 0 A_SpawnItemEx("BlueParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
			IMFX QRSTUVW 3 Bright
		stop
	}
}

Actor CyborgPlasma2 {
	Radius 8
	Height 10
	Speed 24
	Damage (5 * random(5, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	DamageType "BaronVoid"
	Scale 1.0
	Alpha 0.9
	RENDERSTYLE Add
	SEESOUND "HFSpid/See" 
	DEATHSOUND "HFSpid/Die"
	PROJECTILE
	Decal PlasmaScorchLower
	Scale 0.825
	+SEEKERMISSILE
	+DONTBLAST
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		SpawnLoop:
			ESPJ A 1 Bright
			TNT1 A 0 A_SpawnItem("CyborgPlasma2Trail", 0, 0)
			ESPJ A 1 Bright A_SeekerMissile(4, 4, SMF_CURSPEED)
			TNT1 A 0 A_SpawnItem("CyborgPlasma2Trail", 0, 0)
			ESPJ B 1 Bright
			TNT1 A 0 A_SpawnItem("CyborgPlasma2Trail", 0, 0)
			ESPJ B 1 Bright A_SeekerMissile(4, 4, SMF_CURSPEED)
			TNT1 A 0 A_SpawnItem("CyborgPlasma2Trail", 0, 0)
		Loop
		Death:
			TNT1 A 0 A_SpawnItemEx("PurpleParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
			TNT1 AAA 0 A_CustomMissile("ExplosionFX3", 0, 0, random(0,360), 2, random(0,360))
			TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
			TNT1 A 0 A_SpawnItem("HellForgeSpiderExp")
			ESPJ CDEFGHI 2 Bright
		Stop
	}
}

Actor CyborgPlasma2Trail {
	+CLIENTSIDEONLY
	+NOGRAVITY
	+NOINTERACTION
	Renderstyle Add
	Alpha 0.75
	Scale 0.75
	States {
		Spawn:
			TNT1 A 1
		SpawnLoop:
			ESPJ AABB 1 Bright A_FadeOut(0.15)
		Loop
	}
}

ACTOR ChaosSerpent : DnD_BaseEnemy {
	Health 450
	PainChance 64
	Speed 12
	Radius 24
	Height 64
	Mass 640
	Monster
	Species "HK"
	+FLOORCLIP
	+DONTHURTSPECIES
	+USEKILLSCRIPTS
	SeeSound "ChaosSerpent/See"
	AttackSound "ChaosSerpent/Melee"
	PAINSOUND "Beast/pain"
	DeathSound "ChaosSerpent/Die"
	ActiveSound "ChaosSerpent/See"
	Obituary "%o was destroyed by a Chaos Serpent."
	const int ChunkFlags = SXF_TRANSFERTRANSLATION|SXF_ABSOLUTEVELOCITY;
	DamageFactor "Barons", 0.0
	DamageFactor "BaronsExp", 0.0
	DamageFactor "BaronsPoison", 0.0
	DamageFactor "BaronsFire", 0.0
	DamageFactor "BaronGreen", 0.0
	DamageFactor "BaronGreenFire", 0.0
	DamageFactor "BaronPlasma", 0.0
	DamageFactor "BaronVoid", 0.0
	DamageFactor "BaronYellow", 0.0
	DamageFactor "BaronsMagic", 0.0
	DamageFactor "BaronsMagicFire", 0.0
	DropItem "SoulAmmoSpawner", 64
	Tag "Chaos Serpent"
	States {
		Spawn:
			TNT1 A 0
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_CHAOSSERPENT)
		Idle:
			DEMN AA 10 A_Look
		Loop
		See:
			DEMN ABCD 4 Fast A_Chase
		Loop
		Pain:
			DEMN E 4 Fast
			DEMN E 4 Fast A_Pain
		Goto See
		Melee:
			DEMN E 6 Fast A_FaceTarget
			DEMN F 8 Fast A_FaceTarget
			DEMN G 6 Fast A_CustomMeleeAttack(random[DemonAttack1](8, 16) * 2 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)))
		Goto See
		Missile:
			TNT1 A 0 A_Jump(128, "Belch")
			DEMN E 5 Fast A_FaceTarget
			DEMN F 6 Fast A_FaceTarget
			DEMN G 5 Fast A_CustomMissile("ChaosSerpentFireball", 62, 0)
		Goto See
		Belch:
			DEMN GG 5 Fast A_FaceTarget
			DEMN F 7 Fast A_FaceTarget
			DEMN E 5 Fast A_FaceTarget
			TNT1 A 0 A_FaceTarget
			DEMN GGG 2 Fast A_CustomMissile("ChaosSerpentFireball", 62, 0, frandom(-4.8, 4.8), CMF_AIMDIRECTION, frandom(-3.2, 0))
			DEMN GGG 2 Fast A_CustomMissile("ChaosSerpentFireball", 62, 0, frandom(-4.8, 4.8), 0, frandom(-3.2, 0))
		Goto See
		Death:
			DEMN H 6
			DEMN I 0 A_SpawnItemEx("Demon1Chunk1C", 0, 0, 45, frandom[DemonChunks](1, 4.984375)*cos(angle+90),
					   frandom[DemonChunks](1, 4.984375)*sin(angle+90), 8, 90, ChunkFlags)
			DEMN I 0 A_SpawnItemEx("Demon1Chunk2C", 0, 0, 45, frandom[DemonChunks](1, 4.984375)*cos(angle-90),
					   frandom[DemonChunks](1, 4.984375)*sin(angle-90), 8, 270, ChunkFlags)
			DEMN I 0 A_SpawnItemEx("Demon1Chunk3C", 0, 0, 45, frandom[DemonChunks](1, 4.984375)*cos(angle-90),
					   frandom[DemonChunks](1, 4.984375)*sin(angle-90), 8, 270, ChunkFlags)
			DEMN I 0 A_SpawnItemEx("Demon1Chunk4C", 0, 0, 45, frandom[DemonChunks](1, 4.984375)*cos(angle-90),
					   frandom[DemonChunks](1, 4.984375)*sin(angle-90), 8, 270, ChunkFlags)
			DEMN I 6 A_SpawnItemEx("Demon1Chunk5C", 0, 0, 45, frandom[DemonChunks](1, 4.984375)*cos(angle-90),
					   frandom[DemonChunks](1, 4.984375)*sin(angle-90), 8, 270, ChunkFlags)
			TNT1 A 0 A_JumpIfInventory("Ability_SoulStealer", 1, "GiveSoul")
		GaveSoul:
			DEMN J 1
			TNT1 A 0 ACS_ExecuteAlways(982, 0, 2)
			DEMN J 5 A_Scream
			DEMN K 6 A_NoBlocking
			DEMN L 6 A_QueueCorpse
			DEMN MNO 6
			DEMN P -1
		Stop
		Raise:
			DEMN PONMLKJIH 5
		Goto See
		GiveSoul:
		Death.BookOfTheDead:
			DEMN J 1
			TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
			TNT1 A 0 A_GiveToTarget("Souls", 1)  
		Goto GaveSoul
	}
}

Actor ChaosSerpentFireball {
	Radius 6
	Height 8
	Speed 24
	PROJECTILE
	Damage (5 * random(4, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	DamageType "BaronsFire"
	SeeSound "Beast/Attack"
	DeathSound "weapons/phoenixhit"
	+DONTBLAST
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		SpawnLoop:
			FX14 ABC 4 Bright
		Loop
		Death:
			TNT1 A 0 A_SpawnItemEx("OrangeParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
			TNT1 AAA 0 A_CustomMissile("ExplosionFX2", 0, 0, random(0,360), 2, random(0,360))
			TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
			FX14 DE 6 Bright
			FX14 FGH 4 Bright
		Stop
	}
}

Actor Demon1Chunk1C : Demon1Chunk1 {
	+CLIENTSIDEONLY
	+MOVEWITHSECTOR
}

Actor Demon1Chunk2C : Demon1Chunk2 {
	+CLIENTSIDEONLY
	+MOVEWITHSECTOR
}

Actor Demon1Chunk3C : Demon1Chunk3 {
	+CLIENTSIDEONLY
	+MOVEWITHSECTOR
}
Actor Demon1Chunk4C : Demon1Chunk4 {
	+CLIENTSIDEONLY
	+MOVEWITHSECTOR
}

Actor Demon1Chunk5C : Demon1Chunk5 {
	+CLIENTSIDEONLY
	+MOVEWITHSECTOR
}

Actor MoonSatyr : Satyr {
    Health 750
    Radius 24
    Height 64
    Scale 1.1
    PainChance 64
    HitObituary "%o was mauled by a moon satyr."
	Obituary "%o didn't notice the sky crashing on him, thanks to a moon satyr."
	Translation "0:255=%[0.00,0.00,0.00]:[1.12,1.20,1.57]", "3:8=3:8", "16:47=16:47", "80:111=80:111", "168:191=168:191"
	+BOSSDEATH
	+NODAMAGETHRUST
	Species "HK"
	+DONTHARMSPECIES
	+DONTMORPH
	Tag "Moon Satyr"
	DamageFactor "Barons", 0.0
	DamageFactor "BaronsExp", 0.0
	DamageFactor "BaronsPoison", 0.0
	DamageFactor "BaronsFire", 0.0
	DamageFactor "BaronGreen", 0.0
	DamageFactor "BaronGreenFire", 0.0
	DamageFactor "BaronPlasma", 0.0
	DamageFactor "BaronVoid", 0.0
	DamageFactor "BaronYellow", 0.0
	DamageFactor "BaronsMagic", 0.0
	DamageFactor "BaronsMagicFire", 0.0
    States {
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_GiveInventory("MakeEnergyResist", 1)
			TNT1 A 0 A_GiveInventory("MakeElementalResist", 1)
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_MOONSATYR, 0, DND_ELEMENTAL_RESIST | DND_ENERGY_RESIST)
		Idle:
			STYR AB 10 A_Look
		Loop
		See:
			STYR AABBCCDD 3 Fast A_Chase
		Loop
		Melee:
			STYR E 2 Fast A_FaceTarget
			TNT1 A 0 A_Recoil(-1.6)
			STYR E 3 Fast A_FaceTarget
			TNT1 A 0 A_Recoil(-2.0)
			STYR F 2 Fast A_FaceTarget
			TNT1 A 0 A_Recoil(-2.4)
			STYR F 3 Fast A_FaceTarget
			TNT1 A 0 A_Recoil(-2.8)
			STYR G 5 Fast A_CustomMeleeAttack(random(26, 46) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "baron/melee")
			TNT1 A 0 A_Stop
			STYR P 2 Fast A_FaceTarget
			TNT1 A 0 A_Recoil(-1.6)
			STYR P 3 Fast A_FaceTarget
			TNT1 A 0 A_Recoil(-2.0)
			STYR Q 2 Fast A_FaceTarget
			TNT1 A 0 A_Recoil(-2.4)
			STYR Q 3 Fast A_FaceTarget
			TNT1 A 0 A_Recoil(-2.8)
			STYR R 5 Fast A_CustomMeleeAttack(random(26, 46) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "baron/melee")
		Goto See
		Missile:
			TNT1 A 0 A_Jump(128, "Other")
			STYR EF 4 Fast A_FaceTarget
			STYR G 5 Fast A_CustomBulletAttack(0, 0, 1, 0, "MoonSatyrMeteorSpawner")
			STYR GGGGGGGGG 4 Fast A_FaceTarget
		Goto See
		Other:
			STYR PQ 4 Fast A_FaceTarget
			STYR R 5 Fast A_CustomBulletAttack(0, 0, 1, 0, "MoonSatyrMeteorSpawner")
			STYR RRRRRRRRR 4 Fast A_FaceTarget
		Goto See
		Pain:
			STYR H 3 Fast
			STYR H 3 Fast A_Pain
		Goto See
		Death:
			TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoul")
		GaveSoul:	
			STYR I 5
			TNT1 A 0 ACS_ExecuteAlways(982, 0, 2)
			STYR J 5 A_Scream
			STYR K 6
			STYR L 7 A_Fall
			STYR M 4
			STYR N 4
			STYR O -1 A_BossDeath
		Stop
		Raise:
			STYR ONMLKJI 8
		Goto See
	  GiveSoul:
	  Death.BookOfTheDead:
		STYR I 1
		TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
		TNT1 A 0 A_GiveToTarget("Souls", 1)  
	  Goto GaveSoul	
	    Ice:
			"----" G 5 A_GenericFreezeDeath
			"----" G 1 A_FreezeDeathChunks
		Wait
    }
}

Actor MoonSatyrMeteorMarker {
	+NOINTERACTION
	+CLIENTSIDEONLY
	Renderstyle Add
	Alpha 0.8
	Scale 1.15
	States {
		Spawn:
			CJFX ABCDEFGHIJK 3
		Stop
	}
}

Actor MoonSatyrMeteorMarkerSpawner {
	+NOINTERACTION
	+CLIENTSIDEONLY
	States {
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_PlaySound("MoonSatyr/MoonFall")
			TNT1 AAA 7 A_SpawnItemEx("MoonSatyrMeteorMarker", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
			TNT1 A 0 A_PlaySound("MoonSatyr/MoonFall")
			TNT1 AAAA 7 A_SpawnItemEx("MoonSatyrMeteorMarker", 0, 0, 0, 0, 0, 0, 0, SXF_NOCHECKPOSITION)
		Stop
	}
}

Actor MoonSatyrMeteorSpawner : BulletPuff {
	Renderstyle None
	VSpeed 0
	Speed 0
	+DONTBLAST
	+ALWAYSPUFF
	+PUFFONACTORS
	+PUFFGETSOWNER
	+BLOODLESSIMPACT
	+MISSILE
	States {
		Spawn:
			TNT1 A 0
			TNT1 A 55 A_SpawnItem("MoonSatyrMeteorMarkerSpawner", 0, -z + floorz)
			TNT1 A 1 A_CustomMissile("MoonSatyrMeteor", ceilingz - z - 32, 0, 0, CMF_TRACKOWNER)
		Stop
	}
}

Actor MoonSatyrMeteorExplosion : BaseExplosionDamage {
	DamageType "BaronsMagic"
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
			TNT1 A 1 A_Explode(128 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)), 160, 0, 0, 72)
		Stop
	}
}

Actor MoonSatyrMeteor {
	PROJECTILE
	Height 8
	Radius 4
	Damage (50 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	DamageType "BaronsMagic"
	+NODAMAGETHRUST
	Deathsound "MoonSatyr/MeteorExplode"
	Scale 1.75
	Speed 0
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		SpawnLoop:
			MSX0 AAABBBCCC 1 Bright ThrustThingZ(0, 90, 1, 0)
		Loop
		Death:
			TNT1 A 0 A_SpawnItem("MoonSatyrMeteorExplosion")
			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))
			TNT1 AAAAAAAAAAAAAAAA 0 A_SpawnItemEx("BlueParticleNoGravityFastVanish",Random(-12,12),Random(-12,12),Random(-12,12),Random(-6,6),Random(-6,6),Random(-6,6),Random(-20,20),128)
			TNT1 A 0 A_SetTranslucent(1,1)
			MSX0 DEFGHI 2 Bright
		Stop
	}
}

Actor IceGolem : MagicalEnemy { 
    Health 400
    Speed 6
	Scale 1.2
    Height 64
    Radius 24
    Mass 4096
    PainChance 48
    MONSTER
    SeeSound "EarthGolem/See"
    PainSound "EarthGolem/Pain"
    DeathSound "EarthGolem/Death"
    ActiveSound "EarthGolem/Act"
    Obituary "%o wass destroyed by a Crystal Golem." 
	Species "HK"
	DamageFactor "Barons", 0.0
	DamageFactor "BaronsExp", 0.0
	DamageFactor "BaronsPoison", 0.0
	DamageFactor "BaronsFire", 0.0
	DamageFactor "BaronGreen", 0.0
	DamageFactor "BaronGreenFire", 0.0
	DamageFactor "BaronPlasma", 0.0
	DamageFactor "BaronVoid", 0.0
	DamageFactor "BaronYellow", 0.0
	DamageFactor "BaronsMagic", 0.0
	DamageFactor "BaronsMagicFire", 0.0
	DamageFactor "Painless_Sun", 1.3
	damagefactor "P_Ice", 0
	Tag "Crystal Golem"
	MeleeRange 76
	MaxTargetRange 640
	RadiusDamageFactor 1.5
	RenderStyle Add
	Alpha 0.525
	+DONTHURTSPECIES
	+USEKILLSCRIPTS
    +FLOORCLIP
	+DONTBLAST
	+DONTRIP
	+NOBLOOD
	+NODROPOFF
    States { 
		Spawn: 
			TNT1 A 0
			TNT1 A 0 A_GiveInventory("MakePhysicalResist", 1)
			TNT1 A 0 A_GiveInventory("MakeElementalImmune", 1)
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_ICEGOLEM, DND_HEAL | DND_HARDENED_SKIN | DND_BULLET_RESIST | DND_SILVER_WEAKNESS, DND_ELEMENTAL_IMMUNE)
			TNT1 A 0 ACS_NamedExecuteAlways("DnD Translucency Weave")
		Idle:
		   GOL3 AB 10 A_Look
	    Loop 
		See: 
			GOL3 A 2 Fast A_Chase
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERHEALSCRIPT, 0, 3 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)))
			GOL3 A 2 Fast A_Chase
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERHEALSCRIPT, 0, 3 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)))
			GOL3 B 2 Fast A_Chase
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERHEALSCRIPT, 0, 3 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)))
			GOL3 B 2 Fast A_Chase
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERHEALSCRIPT, 0, 3 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)))
			GOL3 C 2 Fast A_Chase
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERHEALSCRIPT, 0, 3 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)))
			GOL3 C 2 Fast A_Chase
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERHEALSCRIPT, 0, 3 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)))
			GOL3 D 2 Fast A_Chase
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERHEALSCRIPT, 0, 3 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)))
			GOL3 D 2 Fast A_Chase
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERHEALSCRIPT, 0, 3 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)))
	    Loop 
		Melee: 
			TNT1 A 0 A_PlaySound("Golem/Swing")
			TNT1 A 0 A_Jump(128, "OtherMelee")
			GOL3 E 6 Fast A_FaceTarget
			GOL3 F 3 Fast A_FaceTarget
			TNT1 A 0 A_CustomMeleeAttack(6 * random(6, 10) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "Golem/Hit")
			GOL3 FG 5 Fast 
		Goto See
		OtherMelee:
			GOL3 H 6 Fast A_FaceTarget
			GOL3 I 3 Fast A_FaceTarget
			TNT1 A 0 A_CustomMeleeAttack(6 * random(6, 10) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "Golem/Hit")
			GOL3 IJ 5 Fast 
		Goto See
		Missile:
			TNT1 A 0 A_JumpIf(160, "Dash")
		Spikes:
			TNT1 A 0 A_FaceTarget
			GOL3 K 2 Fast A_CustomMissile("CrystalSpike", 44 + random(-6, 10), random(-6, 6), frandom(-8, 8), CMF_OFFSETPITCH, frandom(-2.4, 2.4))
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERHEALSCRIPT, 0, 3 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)))
			TNT1 A 0 A_MonsterRefire(160, "See")
		Loop
		Dash:
			TNT1 A 0 A_JumpIfCloser(320, "ContinueDash")
		Goto Spikes
		ContinueDash:
			GOL3 G 1 A_FaceTarget
			TNT1 A 0 A_PlaySound("Golem/Slide")
			TNT1 A 0 ACS_ExecuteAlways(971, 0, 27) // script sets velocity
			GOL3 G 3 A_JumpIfTargetInLos("DashFinish", 90, JLOSF_DEADNOJUMP, 80)
			TNT1 A 0 A_SpawnItemEx("GrenadeSmoke", -8, -12, 0, 0, -2.5, 1)
			TNT1 A 0 A_SpawnItemEx("GrenadeSmoke", -8, 12, 0, 0, 2.5, 1)
			GOL3 G 3 A_JumpIfTargetInLos("DashFinish", 90, JLOSF_DEADNOJUMP, 80)
			TNT1 A 0 A_SpawnItemEx("GrenadeSmoke", -8, -12, 0, 0, -2.5, 1)
			TNT1 A 0 A_SpawnItemEx("GrenadeSmoke", -8, 12, 0, 0, 2.5, 1)
			GOL3 G 3 A_JumpIfTargetInLos("DashFinish", 90, JLOSF_DEADNOJUMP, 80)
			TNT1 A 0 A_SpawnItemEx("GrenadeSmoke", -8, -12, 0, 0, -2.5, 1)
			TNT1 A 0 A_SpawnItemEx("GrenadeSmoke", -8, 12, 0, 0, 2.5, 1)
			TNT1 A 0 A_JumpIf(velx == 0 || vely == 0, "See")
			GOL3 G 3 A_JumpIfTargetInLos("DashFinish", 90, JLOSF_DEADNOJUMP, 80)
			TNT1 A 0 A_SpawnItemEx("GrenadeSmoke", -8, -12, 0, 0, -2.5, 1)
			TNT1 A 0 A_SpawnItemEx("GrenadeSmoke", -8, 12, 0, 0, 2.5, 1)
			GOL3 G 3 A_JumpIfTargetInLos("DashFinish", 90, JLOSF_DEADNOJUMP, 80)
			TNT1 A 0 A_SpawnItemEx("GrenadeSmoke", -8, -12, 0, 0, -2.5, 1)
			TNT1 A 0 A_SpawnItemEx("GrenadeSmoke", -8, 12, 0, 0, 2.5, 1)
			GOL3 G 3 A_JumpIfTargetInLos("DashFinish", 90, JLOSF_DEADNOJUMP, 80)
			TNT1 A 0 A_SpawnItemEx("GrenadeSmoke", -8, -12, 0, 0, -2.5, 1)
			TNT1 A 0 A_SpawnItemEx("GrenadeSmoke", -8, 12, 0, 0, 2.5, 1)
			GOL3 G 3 A_JumpIfTargetInLos("DashFinish", 90, JLOSF_DEADNOJUMP, 80)
			TNT1 A 0 A_SpawnItemEx("GrenadeSmoke", -8, -12, 0, 0, -2.5, 1)
			TNT1 A 0 A_SpawnItemEx("GrenadeSmoke", -8, 12, 0, 0, 2.5, 1)
		Goto See
		DashFinish:
			GOL3 F 3 Fast A_FaceTarget
			TNT1 A 0 A_CustomMeleeAttack(6 * random(6, 10) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "Golem/Hit")
			GOL3 F 3 Fast A_FaceTarget
			TNT1 A 0 A_CustomMissile("CrystalGolemBash")
			GOL3 E 5 Fast
			GOL3 E 1 Fast A_Jump(128, "Spikes")
		Goto See
		Pain: 
		   GOL3 L 5 Fast A_Stop
		   TNT1 AAAA 0 A_SpawnItemEx("WhiteParticleSpawner", 0, 0, 32, 0, 0, 0, 0, 128)
		   GOL3 L 5 Fast A_Pain
		   Goto See
		Death: 
			GOL3 L 1 A_NoBlocking
			TNT1 AAAAA 0 A_SpawnItemEx("WhiteParticleSpawner", 0, 0, 32, 0, 0, 0, 0, 128)
			TNT1 AAAAAAAAAAA 0 A_CustomMissile("ExplosionFX10", 32, random(-16, 16), random(0,360), 2, random(0,360))
			TNT1 A 0 A_SpawnItem("IceBurst")
			TNT1 A 0 A_PlaySound("IceGuyShatter")
			TNT1 A 0 A_SpawnDebris("IceChunkDebris")
			TNT1 A -1
		   Stop
		Raise: 
			TNT1 A 0 A_GiveInventory("Mo_Revived", 1)
			TNT1 A 0 A_ChangeFlag("NOPAIN", 1)
			GOL3 L 1 A_SetScale(0.05, 0.05)
			GOL3 L 1 A_SetScale(0.1, 0.1)
			GOL3 L 1 A_SetScale(0.15, 0.15)
			GOL3 L 1 A_SetScale(0.2, 0.2)
			GOL3 L 1 A_SetScale(0.25, 0.25)
			GOL3 L 1 A_SetScale(0.3, 0.3)
			GOL3 L 1 A_SetScale(0.35, 0.35)
			GOL3 L 1 A_SetScale(0.4, 0.4)
			GOL3 L 1 A_SetScale(0.45, 0.45)
			GOL3 L 1 A_SetScale(0.5, 0.5)
			GOL3 L 1 A_SetScale(0.55, 0.55)
			GOL3 L 1 A_SetScale(0.6, 0.6)
			GOL3 L 1 A_SetScale(0.65, 0.65)
			GOL3 L 1 A_SetScale(0.7, 0.7)
			GOL3 L 1 A_SetScale(0.75, 0.75)
			GOL3 L 1 A_SetScale(0.8, 0.8)
			GOL3 L 1 A_SetScale(0.85, 0.85)
			GOL3 L 1 A_SetScale(0.9, 0.9)
			GOL3 L 1 A_SetScale(0.95, 0.95)
			GOL3 L 1 A_SetScale(1.0, 1.0)
			TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
		   Goto See
    } 
}

Actor IceGolemAlphaWeaver : DnD_Activator {
	States {
		Pickup:
			TNT1 A 0 ACS_NamedExecuteAlways("DnD Translucency Weave")
		Stop
	}
}

Actor CrystalSpike {
	PROJECTILE
	+THRUGHOST
	+DONTBLAST
	Speed 24
	Damage (random(6, 10) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	DamageType "Barons"
	Radius 6
	Height 10
	Alpha 0.8
	RenderStyle Add
	SeeSound "Armors/NecroShard"
	DeathSound "Armors/NecroShardHit"
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		SpawnLoop:
			GOL3 S 1 A_Weave(1.0, 0.5, 3.0, 1.5)
		Loop
		Death:
			TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
			GOL3 MNOPQR 3
		Stop
	}
}

Actor CrystalGolemBash {
	radius 5
	height 5
	speed 38
	DamageType "Barons"
	damage (15 * random(1, 2) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	deathsound "weapons/vblhit"
	PROJECTILE
	+SEEKERMISSILE
	+DONTBLAST
	States {
		spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		SpawnLoop:
			TNT1 AA 1 A_SeekerMissile(90, 90, SMF_PRECISE)
			stop
		death:
			TNT1 A 0 A_Quake(4, 17, 0, 256)
			TNT1 A 1 A_Blast(0, 5, 64, 24)
			TNT1 A 1
		stop
	}
}