Actor Corpulent : Mancubus2
{
  Health 850
  Radius 48
  Height 64
  Speed 12
  Scale 1.1
  PainChance 48
  Mass 1500
  SeeSound "Hectebus/Sight"
  PainSound "Hectebus/Pain"
  DeathSound "Hectebus/Death"
  ActiveSound "Hectebus/Active"
  Monster
  +FloorClip
  +MissileMore
  Species "Fatso"
  +DONTHURTSPECIES
  +NOINFIGHTING
  +DONTBLAST
  +USEKILLSCRIPTS
  Obituary "%o was cremated by a Corpulent."
  DropItem "SoulAmmoSpawner", 128
  DropItem "HellForgeCannonPickup", 160
  DamageFactor "Fatty", 0.0
  DamageFactor "FattyPlasma", 0.0
  DamageFactor "FattyExp", 0.0
  DamageFactor "FattyBullet", 0.0
  DamageFactor "FattyFire", 0.0
  DamageFactor "FattyIce", 0.0
  DamageFactor "FatsoCorrupt", 0.0
  DamageFactor "FattyVoidFire", 0.0
  DamageFactor "FattyMagic", 0.0
  DamageFactor "Lightning", 1.5
  Tag "Corpulent"
  States
  {
  Spawn:
	TNT1 A 0
	TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_CORPULENT)
Idle:
    FAT2 AAAAAAAAAABBBBBBBBBB 1 A_Look
    Loop
  See:
    FAT2 ABC 6 Fast A_Chase
    FAT2 DEF 6 Fast A_Chase
    Loop
  Missile:
    TNT1 A 0 A_JumpIfCloser(384, "Missile2")
    FAT2 G 0 A_PlaySoundEx("Hectebus/Attack", "SoundSlot6", 0)
    FAT2 GGGG 3 Fast A_FaceTarget
    FAT2 V 4 Fast Bright A_CustomMissile("Ripper1Corpulent", 24, 41, 0)
    FAT2 IGG 3 Fast A_FaceTarget
    FAT2 K 0 A_SpidReFire
    FAT2 U 4 Fast Bright A_CustomMissile("Ripper1Corpulent", 24, -41, 0)
    FAT2 GI 3 Fast A_FaceTarget
    FAT2 K 0 A_Jump(96, 2)
    FAT2 K 0 A_SpidReFire
    Goto Missile+7
    HECT K 0
    Goto See
  Missile2:
    FAT2 GGGG 3 Fast A_FaceTarget
    FAT2 H 0 Bright A_CustomMissile("Ripper1Corpulent", 24, 41, Random(-4, 2))
    FAT2 H 4 Fast Bright A_CustomMissile("Ripper1Corpulent", 24, -41, Random(-2, 4))
    FAT2 IGG 4 Fast A_FaceTarget
    FAT2 H 0 Bright A_CustomMissile("Ripper1Corpulent", 24, 41, Random(-4, 2))
    FAT2 H 4 Fast Bright A_CustomMissile("Ripper1Corpulent", 24, -41, Random(-2, 4))
    FAT2 IGG 4 Fast A_FaceTarget
    FAT2 H 0 Bright A_CustomMissile("Ripper1Corpulent", 24, 41, Random(-4, 2))
    FAT2 H 4 Fast Bright A_CustomMissile("Ripper1Corpulent", 24, -41, Random(-2, 4))
    FAT2 GI 4 Fast A_FaceTarget
    FAT2 K 0 A_Jump(200, 2)
    FAT2 K 0 A_SpidReFire
    Goto Missile2
    FAT2 K 0
    Goto See
  Pain:
    FAT2 J 10 Fast A_Pain
	TNT1 A 0 A_Jump(64, "PainFast")
    Goto See
  PainFast:
	FAT2 J 4 Fast
	Goto Missile
  Death:
	TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoul")
  GaveSoul:
    FAT2 K 6 A_Scream
	TNT1 A 0 ACS_ExecuteAlways(982, 0, 2)
    FAT2 L 6
    FAT2 M 6
    FAT2 N 6
	TNT1 AAAAAA 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,0)
    FAT2 O 6
    FAT2 P 6 A_Fall
    FAT2 Q 6
    FAT2 R 6
    FAT2 S 6
    FAT2 T -1 A_KillMaster
    Stop
	Raise:
		TNT1 A 0 A_GiveInventory("Mo_Revived", 1)
	  TNT1 A 0 A_GiveInventory("NoDrop", 1)
	  FAT2 SRQPONMLK 6
	Goto See
	  GiveSoul:
	  Death.BookOfTheDead:
		FAT2 K 1
		TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
		TNT1 A 0 A_GiveToTarget("Souls", 1)  
	  Goto GaveSoul
  }
}

Actor CorpulentExp : BaseExplosionDamage
{
	DamageType "FattyExp"
	Obituary "%o was cremated by a Corpulent."
	States
	{
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
			TNT1 A 1 A_Explode(12 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)), 84)
		Stop
	}
}

ACTOR Ripper1Corpulent : Ripper1
{
   Damage (8*random(2,4) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
   DamageType "Fatty"
   +THRUGHOST
   -FORCERADIUSDMG
   -MTHRUSPECIES
   -FOILINVUL
   States
   {
	  Spawn:
		  TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
	  Goto Super::Spawn
      Death:
		  RIP1 D 0 Bright A_SetTranslucent (0.75,1)
		  RIP1 D 1 Bright A_SpawnItem("CorpulentExp")
		  RIP1 D 0 Bright A_SpawnItemEx("Ripper2Corpulent",0,0,0,32,0,0,0,0,0)
		  RIP1 D 0 Bright A_SpawnItemEx("Ripper2Corpulent",0,0,0,32,0,0,60,0,0)
		  RIP1 D 0 Bright A_SpawnItemEx("Ripper2Corpulent",0,0,0,32,0,0,120,0,0)
		  RIP1 D 0 Bright A_SpawnItemEx("Ripper2Corpulent",0,0,0,32,0,0,180,0,0)
		  RIP1 D 0 Bright A_SpawnItemEx("Ripper2Corpulent",0,0,0,32,0,0,240,0,0)
		  RIP1 D 0 Bright A_SpawnItemEx("Ripper2Corpulent",0,0,0,32,0,0,300,0,0)
		RIP1 DEFGH 3 Bright
      stop
   }
}

ACTOR Ripper2Corpulent : Ripper2
{
   Damage (2 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
   DamageType "Fatty"
   +THRUGHOST
   -MTHRUSPECIES
   -FOILINVUL
   States
   {
	  Spawn:
		  TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
	  Goto Super::Spawn
   }
}

Actor Daedabus : Mancubus2
{
   Health 850
   Radius 48
   Height 64
   Mass 1000
   Speed 8
   PainChance 64
   Scale 1.07
   BloodColor "73 00 00"
   SeeSound "Daedabus/Sight"
   PainSound "Daedabus/Pain"
   DeathSound "Daedabus/Death"
   ActiveSound "Daedabus/Active"
   MONSTER
   +FLOORCLIP
  Species "Fatso"
  +DONTHURTSPECIES
  +DONTBLAST
  +USEKILLSCRIPTS
   Obituary "%o was torched by a Daedabus."
   DropItem "SoulAmmoSpawner", 128
   DamageFactor "Fatty", 0.0
   DamageFactor "FattyPlasma", 0.0
   DamageFactor "FattyExp", 0.0
   DamageFactor "FattyBullet", 0.0
   DamageFactor "FattyFire", 0.0
   DamageFactor "FattyIce", 0.0
   DamageFactor "FatsoCorrupt", 0.0
   DamageFactor "FattyVoidFire", 0.0
   DamageFactor "FattyMagic", 0.0
   Tag "Daedabus"
   States
   {
   Spawn:
	TNT1 A 0
	TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_DAEDABUS)
   Idle:
      DAED AB 15 A_Look
      Loop
   See:
      DAED AABBCCDDEEFF 4 Fast A_Chase
      Loop
   Pain:
      DAED J 3 Fast
      DAED J 3 Fast A_Pain
      Goto See
   Missile:
      DAED G 0 A_PlaySound("Daedabus/Attack")
      DAED G 20 Fast A_FaceTarget
      DAED H 0 A_CustomMissile("DaedFire",28,0,5.625)
      DAED H 0 A_CustomMissile("DaedFire",28,0,0)
      DAED H 0 A_CustomMissile("DaedFire",28,0,-5.625)
      DAED H 10 Fast BRIGHT
      DAED IG 5 Fast A_FaceTarget
      DAED H 0 A_CustomMissile("DaedFire",28,0,5.625)
      DAED H 0 A_CustomMissile("DaedFire",28,0,0)
      DAED H 0 A_CustomMissile("DaedFire",28,0,-5.625)
      DAED H 10 Fast BRIGHT
      DAED IG 5 Fast A_FaceTarget
      DAED H 0 A_CustomMissile("DaedFire",28,0,11.25)
      DAED H 0 A_CustomMissile("DaedFire",28,0,5.625)
      DAED H 0 A_CustomMissile("DaedFire",28,0,0)
      DAED H 0 A_CustomMissile("DaedFire",28,0,-5.625)
      DAED H 0 A_CustomMissile("DaedFire",28,0,-11.25)
      DAED H 10 Fast BRIGHT
      DAED IG 5 Fast A_FaceTarget
      Goto See
   Death:
	  TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "giveSoul")
   GaveSoul:   
      DAED K 6
	  TNT1 A 0 ACS_ExecuteAlways(982, 0, 2)
      DAED L 6 A_Scream
      DAED M 6 A_NoBlocking
	  TNT1 AAAAAA 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,0)
      DAED NOPQRS 6
      DAED T -1 A_KillMaster
      Stop
	  GiveSoul:
	  Death.BookOfTheDead:
		DAED K 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)
      DAED RQPONMLK 5
      Goto See
   }
}

Actor DaedExp : BaseExplosionDamage
{
	DamageType "FattyFire"
	Obituary "%o was torched by a Daedabus."
	States
	{
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
			TNT1 A 1 A_Explode(8 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)), 72, 0)
		Stop
	}
}

ACTOR DaedFire : FatShot
{
   Speed 22
   Damage (random(48, 96) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
   DamageType "FattyFire"
   PROJECTILE
   RENDERSTYLE ADD
   ALPHA 0.96
   Decal Scorch
   +THRUGHOST
   +DONTBLAST
   States
   {
   Spawn:
	  TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
   SpawnLoop:
      DAEF AAAA 1 BRIGHT A_SpawnItemEx("DaedTrail", 0, 0, 0, 0, 0, 0, 0, 128)
	  TNT1 A 0 A_SpawnItem("DaedExp")
	  DAEF BBBB 1 BRIGHT A_SpawnItemEx("DaedTrail", 0, 0, 0, 0, 0, 0, 0, 128)
	  TNT1 A 0 A_SpawnItem("DaedExp")
      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))
      DAEF C 8
      DAEF D 6
      DAEF E 4
      Stop
   }
}

Actor DaedTrail
{
  Scale 0.65
  RenderStyle Add
  Alpha 0.5
  +NoInteraction
  +CLIENTSIDEONLY
  States
  {
  Spawn:
    DAET ABCDE 2 Bright
    Stop
  }
}

actor IceFatso : Mancubus2
{
  obituary "%o was shatterred by an Ice Mancubus."
  health 650
  radius 48
  height 64
  mass 1000
  speed 8
  painchance 80
  damagefactor "Thunder", 0
  BloodColor "LightBlue"
  seesound "fatso/sight"
  painsound "fatso/pain"
  deathsound "fatso/death"
  activesound "fatso/active"
  DamageFactor "Fatty", 0.0
  DamageFactor "FattyPlasma", 0.0
  DamageFactor "FattyExp", 0.0
  DamageFactor "FattyBullet", 0.0
  DamageFactor "FattyFire", 0.0
  DamageFactor "FattyIce", 0.0
  DamageFactor "FatsoCorrupt", 0.0
  DamageFactor "FattyVoidFire", 0.0
  DamageFactor "FattyMagic", 0.0
  DamageFactor "P_Ice", 0
  DamageFactor "Fire", 1.5
  DamageFactor "FireFull", 1.5
  Tag "Ice Mancubus"
  MONSTER
  +FLOORCLIP
  Species "Fatso"
  +DONTHURTSPECIES  
  Translation "1:2=109:110", "13:15=107:109", "17:18=87:88", "48:53=4:4", "53:79=80:106", "112:125=192:202", "128:143=90:111", "144:151=100:107", "209:213=81:89", "236:239=107:109"
  +DONTBLAST
  states
  {
  Spawn:
	TNT1 A 0
	TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_ICEFATSO, DND_FIRE_WEAKNESS)
Idle:
	FATT AB 15 A_Look
  Loop
  Missile:
    FATT G 20 Fast A_FatRaise
	FATI H 0 bright A_CustomMissile("IceFatBall" ,20,20 ,-10,1,0)
    FATT H 10 Fast bright A_CustomMissile("IceFatBall",20,-20,0  ,1,0)
    FATT IG 5 Fast A_FaceTarget
	FATI H 0 bright A_CustomMissile("IceFatBall" ,20,20 ,0  ,1,0)
    FATT H 10 Fast bright A_CustomMissile("IceFatBall",20,-20,10 ,1,0)
    FATT IG 5 Fast A_FaceTarget
	FATI H 0 bright A_CustomMissile("IceFatBall" ,20 ,20,-10,1,0)
    FATT H 10 Fast bright A_CustomMissile("IceFatBall",20,-20 ,10,1,0)
    FATT IG 5 Fast A_FaceTarget
    goto See
  }
}


actor IceFatBall
{
  Radius 6
  Height 8
  Speed 20
  Damage (random(30,60) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
  +DONTBLAST
  +THRUGHOST
  DamageType "FattyIce"
  RenderStyle Add
  Alpha 1
  Projectile
  SeeSound "fatso/attack"
  DeathSound "fatso/shotx"
  states
  {
  Spawn:
	TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
   SpawnLoop:
    TNFX AB 2 bright A_SpawnItemEx("IceFatBallTrail",0,0,0,0,0,0,0,128)
	TNFX CD 2 bright A_SpawnItemEx("IceFatBallTrail",0,0,0,0,0,0,0,128)
    loop
  Death:
	TNT1 A 0 A_SpawnItemEx("BlueParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
    TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
    TNFX EFGHIJK 4 bright
    stop
  }
}

actor IceFatBallTrail
{
  Radius 6
  Height 8
  RenderStyle Add
  Projectile
  -ACTIVATEPCROSS
  -ACTIVATEIMPACT
  +SPAWNSOUNDSOURCE
  +CLIENTSIDEONLY
  states
  {
  Spawn:
    TNFX ABCD 3 bright
    goto death
  Death:
    TNFX D 1 bright A_SetTranslucent(0.5)
	TNFX A 1 bright A_SetTranslucent(0.4)
	TNFX B 1 bright A_SetTranslucent(0.3)
	TNFX C 1 bright A_SetTranslucent(0.2)
	TNFX D 1 bright A_SetTranslucent(0.1)
    stop
  }
}

Actor Mafibus : Mancubus2
{
   Health 1100
   Radius 48
   Height 64
   Mass 1000
   Speed 8
   PainChance 20
   Scale 1.15
   SeeSound "Mafibus/See"
   PainSound "Mafibus/Pain"
   DeathSound "Mafibus/Death"
   ActiveSound "Mafibus/Act"
   Monster
   +FloorClip
   +DontHurtSpecies
   Species "Fatso"
   +MissileMore
   +NORADIUSDMG
   +DONTBLAST
   Obituary "%o was melted to slag by a Mafibus!"
   DropItem "SoulAmmoSpawner", 128
   DamageFactor "Fatty", 0.0
   DamageFactor "FattyPlasma", 0.0
   DamageFactor "FattyExp", 0.0
   DamageFactor "FattyBullet", 0.0
   DamageFactor "FattyFire", 0.0
   DamageFactor "FattyIce", 0.0
   DamageFactor "FatsoCorrupt", 0.0
   DamageFactor "FattyVoidFire", 0.0
   DamageFactor "FattyMagic", 0.0
   DamageFactor "Fire", 0
   DamageFactor "P_Ice", 1.5
   DamageFactor "P_IceFull", 1.5
   Tag "Mafibus"
   States
   {
   Spawn:
	TNT1 A 0
	TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_MAFIBUS, DND_ICE_WEAKNESS | DND_EXPLOSIVE_IMMUNE)
Idle:
      MFBS AAAAAAAAAAAAAAABBBBBBBBBBBBBBB 1 A_Look
      Loop
   See:
      MFBS A 0 A_TakeInventory("MafibusChecker", 3)
      MFBS AABBCCDDEEFF 4 Fast A_Chase
      Loop
   Pain:
      MFBS J 3 Fast
      MFBS J 3 Fast A_Pain
      Goto See
   Missile:
      MFBS G 0 A_PlaySound("Daedabus/Attack")
      MFBS GGGG 5 Fast A_FaceTarget
      MFBS G 0 A_Jump(256, "Fire4", "Fire5", "Fire6")
   Fire4:
      MFBS G 0 A_JumpIfInventory("MafibusChecker", 3, "See")
      MFBS H 0 A_GiveInventory("MafibusChecker", 1)
      MFBS H 0 A_PlayWeaponSound("Mafibus/Fire")
      MFBS H 0 A_CustomMissile("MafibusBall", 24, 29, 0)
      MFBS H 0 A_CustomMissile("MafibusBall", 24, 29, -5.635)
      MFBS H 0 A_CustomMissile("MafibusBall", 24, -29, 5.635)
      MFBS H 10 Fast A_CustomMissile("MafibusBall", 24, -29, 0)
      MFBS IG 5 Fast A_FaceTarget
      Goto Missile+5
   Fire5:
      MFBS G 0 A_JumpIfInventory("MafibusChecker", 3, "See")
      MFBS H 0 A_GiveInventory("MafibusChecker", 1)
      MFBS H 0 A_Jump(128, "Fire52")
      MFBS H 0 A_PlayWeaponSound("Mafibus/Fire")
      MFBS H 0 A_CustomMissile("MafibusBall", 28, -29, 11.25)
      MFBS H 0 A_CustomMissile("MafibusBall", 28, -29, 5.625)
      MFBS H 0 A_CustomMissile("MafibusBall", 28, 29, 0)
      MFBS H 0 A_CustomMissile("MafibusBall", 28, 29, -5.625)
      MFBS H 10 Fast A_CustomMissile("MafibusBall", 28, 29, -11.25)
      MFBS IG 5 Fast A_FaceTarget
      Goto Missile+5
   Fire52:
      MFBS H 0 A_PlayWeaponSound("Mafibus/Fire")
      MFBS H 0 A_CustomMissile("MafibusBall", 28, -29, 11.25)
      MFBS H 0 A_CustomMissile("MafibusBall", 28, -29, 5.625)
      MFBS H 0 A_CustomMissile("MafibusBall", 28, -29, 0)
      MFBS H 0 A_CustomMissile("MafibusBall", 28, 29, -5.625)
      MFBS H 10 Fast A_CustomMissile("MafibusBall", 28, 29, -11.25)
      MFBS IG 5 Fast A_FaceTarget
      Goto Missile+5
   Fire6:
      MFBS G 0 A_JumpIfInventory("MafibusChecker", 3, "See")
      MFBS H 0 A_GiveInventory("MafibusChecker", 1)
      MFBS H 0 A_PlayWeaponSound("Mafibus/Fire")
      MFBS H 0 A_CustomMissile("MafibusBall", 28, 29, 0)
      MFBS H 0 A_CustomMissile("MafibusBall", 28, 29, -5.635)
      MFBS H 0 A_CustomMissile("MafibusBall", 28, 29, -11.25)
      MFBS H 0 A_CustomMissile("MafibusBall", 28, -29, 5.635)
      MFBS H 0 A_CustomMissile("MafibusBall", 28, -29, 11.25)
      MFBS H 10 Fast A_CustomMissile("MafibusBall", 28, -29, 0)
      MFBS IG 5 Fast A_FaceTarget
      Goto Missile+5
   Death:
      TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoul")
   GaveSoul:  
      MFBS K 6
	  TNT1 A 0 ACS_ExecuteAlways(982, 0, 2)
      MFBS L 6 A_Scream
	  TNT1 A 0 A_NoBlocking
      MFBS M 6
	  TNT1 AAAAAA 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,0)
      MFBS NOPQRS 6
      MFBS T -1 A_KillMaster
      Stop
	  GiveSoul:
	  Death.BookOfTheDead:
		MFBS K 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)
      MFBS TSRQPONMLK 5
      Goto See
   }
}

Actor MafibusChecker : Inventory { Inventory.MaxAmount 3 }

Actor MafibusBall
{
  Radius 6
  Height 8
  Speed 22
  Damage (12 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
  Scale 0.65
  Projectile
  DeathSound "Mafibus/Hit"
  Decal Scorch
  damagetype "Fatty"
  +DONTBLAST
  States
  {
  Spawn:
	TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
   SpawnLoop:
    MFBL A 0 A_PlaySoundEx("Mafibus/Loop", "SoundSlot7", 1, -1)
    MFBL AAAABBBBCCCC 1 Bright A_SpawnItemEx("MafibusBallTrail", 0, 0, 0, 0, 0, 0, 0, 128)
    Loop
  Death:
	TNT1 A 0 A_SpawnItemEx("OrangeParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
	TNT1 AAAA 0 A_CustomMissile("ExplosionFX2", 0, 0, random(0,360), 2, random(0,360))
	TNT1 AAAAAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
    MFBL A 0 A_StopSoundEx("SoundSlot7")
    MFBL DE 4 Bright
    MFBL F 4 Bright A_SetTranslucent(0.7, 1)
    MFBL G 4 Bright A_SetTranslucent(0.4, 1)
    MFBL HI 4 Bright
    Stop
  }
}

Actor MafibusBallTrail
{
  Projectile
  RenderStyle Add
  Alpha 0.2
  +CLIENTSIDEONLY
  States
  {
  Spawn:
    TNT1 A 1
    MFBT ABCDEFGHI 1 Bright
    Stop
  }
}

ACTOR Paladin : MechanicalExplosiveResistEnemy {
	Health 775
	Scale 1.15
	Radius 32
	Height 64
	Mass 1200 
	Speed 8
	PainChance 80
	Monster
	Species "Fatso"
	DamageFactor "Fatty", 0.0
	DamageFactor "FattyPlasma", 0.0
	DamageFactor "FattyExp", 0.0
	DamageFactor "FattyBullet", 0.0
	DamageFactor "FattyFire", 0.0
	DamageFactor "FattyIce", 0.0
	DamageFactor "FatsoCorrupt", 0.0
	DamageFactor "FattyVoidFire", 0.0
	DamageFactor "FattyMagic", 0.0
	+FloorClip
	+DontHarmClass
	+DontHarmSpecies
	+DontHurtSpecies
	+DONTBLAST
	+USEKILLSCRIPTS
	Obituary "%o played dodgeball with a paladin and lost."
	HitObituary "A Paladin blew %o away."
	SeeSound "Paladin/Sight" 
	PainSound "Paladin/Pain" 
	DeathSound "Paladin/Death" 
	ActiveSound "Paladin/Active" 
	DropItem "SoulAmmoSpawner", 96
	Tag "Paladin"
	States { 
		Spawn: 
			TNT1 A 0
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_PALADIN, DND_ENERGY_WEAKNESS | DND_PIERCE | DND_BULLET_RESIST | DND_HOMING | DND_BLOCK | DND_HARDENED_SKIN)
		Idle:
			HPAL AB 10 A_Look 
        Loop 
		See:
		   TNT1 A 0 A_UnSetInvulnerable
		   HPAL AABB 3 Fast A_Chase
		   TNT1 A 0 A_PlaySound("monster/bruwlk")
		   HPAL CCDD 3 Fast A_Chase
		   TNT1 A 0 A_PlaySound("monster/bruwlk")
		   TNT1 A 0 A_Jump(32, "SeeShield")
	    Goto See+1
		SeeShield:
		   TNT1 A 0 A_SetInvulnerable
		   HPAL EEFF 4 Fast A_Chase
		   TNT1 A 0 A_PlaySound("monster/bruwlk")
		   HPAL GGHH 4 Fast A_Chase
		   TNT1 A 0 A_PlaySound("monster/bruwlk")
		   TNT1 A 0 A_Jump (96, "See")
	    Goto SeeShield
		Melee:
			TNT1 A 0 A_UnSetInvulnerable
			HPAL MN 6 Fast A_FaceTarget
			TNT1 A 0 A_CustomMissile("PaladinBash")
			HPAL O 6 Fast A_CustomMeleeAttack(random(1, 10) * 4 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale")), "weapons/vblhit", "weapons/vblswg", "Knockback")
			TNT1 A 0 A_Jump(128, "Missile")
		Goto See
		Missile: //Shield attack; used if outside 720 map units
			TNT1 A 0 A_UnSetInvulnerable
			TNT1 A 0 A_Jump(64, "Missile2")
			TNT1 A 0 A_JumpIfCloser(720, "Missile1")
		Goto Missile2
		Missile1: //Grenade used if target is within 768 map units
			TNT1 A 0 A_Jump(32, "Missile2") //Use shield attack anyway
			HPAL I 5 Fast A_FaceTarget
			TNT1 A 0 A_JumpIfCloser(360, "MissileLow")	//Don't lob the grenade if closer
			HPAL I 5 Fast A_FaceTarget						//than 360 map units
			HPAL J 4 Fast Bright A_CustomMissile("PaladinGrenadeThrust", 30, 16, 0)
			HPAL J 4 Fast Bright A_FaceTarget
			HPAL II 5 Fast A_FaceTarget
		Goto See
		MissileLow: //Low lob grenade for close targets
			HPAL I 5 Fast A_FaceTarget
			TNT1 A 0 A_PlaySound("weapons/glauncherfiren")
			HPAL J 4 Fast Bright A_CustomMissile("PaladinGrenade", 30, 16, 0)
			HPAL J 4 Fast Bright A_FaceTarget
			HPAL II 5 Fast A_FaceTarget
		Goto See
		Missile2: //Shield attack
			TNT1 A 0 A_SetInvulnerable
			HPAL KK 5 Fast A_FaceTarget      
			HPAL L 4 Fast Bright A_CustomMissile("PaladinBall",32,0,0,0)
			HPAL KK 4 Fast A_FaceTarget      
			HPAL L 4 Fast Bright A_CustomMissile("PaladinBall",32,0,0,0)
			HPAL KK 4 Fast A_FaceTarget      
			HPAL L 4 Fast Bright A_CustomMissile("PaladinBall",32,0,0,0)
			HPAL KK 4 Fast A_FaceTarget      
			HPAL L 4 Fast Bright A_CustomMissile("PaladinBall",32,0,0,0)
			HPAL KK 4 Fast A_FaceTarget      
			HPAL L 4 Fast Bright A_CustomMissile("PaladinBall",32,0,0,0)
			HPAL KK 4 Fast A_FaceTarget  
			TNT1 A 0 A_UnSetInvulnerable
		Goto See
		Pain:
			HPAL P 3 Fast A_Pain
			TNT1 A 0 A_JumpIfCloser (512, "ClosePain")
			HPAL P 3 Fast
			TNT1 A 0 A_Jump (96, "See")
			TNT1 A 0 A_SetInvulnerable
			HPAL KKKKKKKKKKKKKKKKKKKK 3 A_FaceTarget
			TNT1 A 0 A_Jump (160, "SeeShield")
			TNT1 A 0 A_UnSetInvulnerable
		Goto See
		ClosePain: //Less likely to raise shield when in grenading-range
			HPAL P 3
			TNT1 A 0 A_Jump (184, "See")
			TNT1 A 0 A_SetInvulnerable
			HPAL KKKKKKKKKKKKKKKKKKKK 3 A_FaceTarget
			TNT1 A 0 A_Jump (48, "SeeShield")
			TNT1 A 0 A_UnSetInvulnerable
		Goto See
		Death:
		  TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoul")
	   GaveSoul: 
			HPAL Q 7 A_Scream
			HPAL R 7 A_SpawnItemEx("PaladinShield", 0, 0, 25, 6, 0, 0, 60, SXF_SETMASTER|SXF_CLIENTSIDE)
			HPAL S 7
			HPAL T 7 A_NoBlocking
			HPAL UV 7
			HPAL W -1 A_KillMaster
		Stop
		XDeath:
			TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoulX")
		GaveSoulX:
			HPLX A 6 A_Scream
			TNT1 A 0 A_SpawnItemEx("PaladinShield", 0, 0, 25, 6, 0, 0, 60, SXF_SETMASTER|SXF_CLIENTSIDE)
			HPLX BBBCCCDDD 2 Bright A_SpawnItemEx("ExplosionFXSmall", 0, 0, random(0, 32),random(-9,9),random(-9,9),random(5,9), 48, 128)
			TNT1 A 0 A_NoBlocking
			HPLX EEE 2 Bright A_SpawnItemEx("ExplosionFXSmall", 0, 0, random(0, 32),random(-9,9),random(-9,9),random(5,9), 48, 128)
			HPLX FGH 6 Bright
			HPLX I 6
			HPLX J -1 A_KillMaster
		Stop 
		Raise: 
			TNT1 A 0 A_GiveInventory("Mo_Revived", 1)
		    TNT1 A 0 A_GiveInventory("NoDrop", 1)
			HPAL W 7 A_KillChildren
			HPAL VUTSRQ 7
		Goto See 
		GiveSoul:
			HPAL A 1
			TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
			TNT1 A 0 A_GiveToTarget("Souls", 1)  
		Goto GaveSoul
		GiveSoulX:
		Death.BookOfTheDead:
			HPLX A 1
			TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
			TNT1 A 0 A_GiveToTarget("Souls", 1)  
		Goto GaveSoulX
	} 
}

Actor PaladinExplosion : BaseExplosionDamage {
	DamageType "FattyExp"
	Obituary "A Paladin blew %o away."
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
			TNT1 A 1 A_Explode(64 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)), 96, 0)
		Stop
	}
}

ACTOR PaladinGrenade {
	Radius 8
	Height 8
	Speed 25
	Damage (5 * random(4, 6) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	Projectile
	-NOGRAVITY
	+GRENADETRAIL
	+THRUGHOST
	+FORCEXYBILLBOARD
	+DONTBLAST
	BounceType "Doom"
	Gravity 0.625
	DeathSound "weapons/ebonyexplode"
	BounceSound "weapons/grenadebounce"
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		SpawnLoop:
			PGRN A 1 Bright A_SpawnItem("PaladinGrenadeTrail")
		Loop
		Death:
			TNT1 A 0 A_ChangeFlag ("NoGravity", 1)
			TNT1 A 0 A_Stop
			TNT1 A 0 A_SpawnItemEx ("ExplosionFlareSmall", 0, 0, 0, 0, 0, 0, 0, SXF_CLIENTSIDE | SXF_NOCHECKPOSITION, 0)
			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 AAAAAAAAA 0 A_CustomMissile ("ExplosionParticleHeavy", 0, 0, random (0, 360), 2, random (0, 180))
			TNT1 AAAAAAAAAAAAAAAAAA 0 A_CustomMissile ("ExplosionParticleHeavy", 0, 0, random (0, 360), 2, random (0, 360))
			TNT1 AAAAAAAAA 0 A_CustomMissile ("ExplosionParticleVeryFast", 0, 0, random (0, 360), 2, random (0, 360))
			BAXP A 6 Bright A_SpawnItem("PaladinExplosion")
			BAXP BCDEF 2 Bright
		Stop
	}
}

Actor PaladinGrenadeThrust : PaladinGrenade {
	States {
		Spawn:
			TNT1 AA 0 ThrustThingZ(0, 16, 0, 0)
		Goto Super::Spawn
	}
}

Actor PaladinGrenadeTrail {
	Height 1
	Radius 1
	Renderstyle Add
	Alpha 0.67
	Speed 0
	+NOGRAVITY
	+NOTELEPORT
	+CLIENTSIDEONLY
	
	States {
		Spawn:
			TNT1 A 2
			FRB1 DEHG 2 Bright
		Stop
	}
}

ACTOR PaladinBall {
	Radius 6
	Height 8
	Speed 18
	Damage (8 * random(2, 4) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	DamageType "FatsoCorrupt"
	Projectile
	RenderStyle Add
	Alpha 0.67
	+SeekerMissile
	+FORCEXYBILLBOARD
	+DONTBLAST
	SeeSound "weapons/boltfi"
	DeathSound "weapons/glahit"
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		SpawnLoop:
			HPLB A 2 Bright A_SeekerMissile(2, 2)
			HPLB A 0 Bright A_SpawnItemEx("PaladinBallTrail",0,0,0,0,0,0,0,128)
			HPLB B 2 Bright A_SeekerMissile(2, 2)
			HPLB B 0 Bright A_SpawnItemEx("PaladinBallTrail",0,0,0,0,0,0,0,128)
			HPLB C 2 Bright A_SeekerMissile(2, 2)
			HPLB C 0 Bright A_SpawnItemEx("PaladinBallTrail",0,0,0,0,0,0,0,128)
			HPLB D 2 Bright A_SeekerMissile(2, 2)
			HPLB D 0 Bright A_SpawnItemEx("PaladinBallTrail",0,0,0,0,0,0,0,128)
		Loop
		Death:
			HPLB EFHIJ 3 Bright
		Stop
	}
}

actor PaladinBash {
	radius 5
	height 5
	speed 28
	DamageType "Fatso"
	damage (5 * 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, 4, 40, 20)
			TNT1 A 1
		stop
	}
}

Actor PaladinBallTrail {   
	Radius 3
	Height 3
	Scale 1
	Speed 0
	+NOGRAVITY
	+FORCEXYBILLBOARD
	RenderStyle Add
	Alpha 0.67
	+CLIENTSIDEONLY
	States {
		Spawn:
		TNT1 A 2 Bright
		HPLB KLMNOP 2 Bright
		Stop 
	}
}

ACTOR PaladinShield {
	Radius 8
	Height 8
	+CLIENTSIDEONLY
	States {
		Spawn:
			HPLS ABCDEFGH 3 A_CheckFloor("Ground")
		Loop
		Ground:
			HPLS I 2100 A_SetFloorClip
			HPLS I 5 A_FadeOut(0.1)
		Wait
		Death:
			TNT1 A 0 A_SpawnItemEx("PaladinShieldFade")
		Stop
	}
}

Actor PaladinShieldFade {
	Radius 8
	Height 8
	+CLIENTSIDEONLY
	States {
		Spawn:
			HPLS I 1
			HPLS I 1 A_FadeOut(0.01) 
		Wait
	}
}

actor Gamon : MagicalBulletResistantEnemy {
	obituary "%o was shocked by a Gamon."
	health 875
	radius 28
	height 64
	mass 2048
	speed 8
	painchance 64
	Scale 1.12
	Renderstyle Translucent
	Alpha 1.0
	seesound "Veste/See"
	painsound "Veste/Pain"
	deathsound "Veste/Die"
	activesound "Veste/Act"
	MONSTER
	Species "Fatso"
	DamageFactor "Fatty", 0.0
	DamageFactor "FattyPlasma", 0.0
	DamageFactor "FattyExp", 0.0
	DamageFactor "FattyBullet", 0.0
	DamageFactor "FattyFire", 0.0
	DamageFactor "FattyIce", 0.0
	DamageFactor "FatsoCorrupt", 0.0
	DamageFactor "FattyVoidFire", 0.0
	DamageFactor "FattyMagic", 0.0
	DropItem "SoulAmmoSpawner", 96
	DamageFactor "Lightning", 0.5
	var int user_count;
	Tag "Gamon"
	+NOBLOOD
	+DONTBLAST
	+DONTHURTSPECIES
	+FLOORCLIP
	+BOSSDEATH
	+DONTRIP
	+MISSILEMORE
	+USEKILLSCRIPTS
	states {
		Spawn:
			TNT1 A 0
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_GAMON, DND_MAGIC_WEAKNESS | DND_PIERCE | DND_BULLET_RESIST | DND_HARDENED_SKIN)
			TNT1 A 0 ACS_ExecuteAlways(961, 0, 1)
		Idle:
			VEST AB 10 A_Look
		loop
		See:
			TNT1 A 0 A_ChangeFlag("NOPAIN", 0)
			TNT1 A 0 A_GiveInventory("GamonChecker", 1)
			VEST AABBCCDD 3 Fast A_Chase
		loop
		Melee:
		Missile:
			TNT1 A 0 A_GiveInventory("GamonChecker", 1)
			TNT1 A 0 A_SetUserVar("user_count", 0)
		MissileLoop:
			TNT1 A 0 A_JumpIfInventory("GamonGhost", 1, "MissileLoop2")
			TNT1 A 0 A_JumpIf(user_count == 3, "See")
			VEST EE 4 Fast A_FaceTarget
			VEST F 0 A_playsound("MageLightningFire")
			TNT1 A 0 A_custommissile("GamonBolt", 32, 12, 0)    
			VEST F 8 Fast bright A_custommissile("GamonBolt", 32, -12, 0)
			VEST E 8 Fast A_FaceTarget
			TNT1 A 0 A_SetUserVar("user_count", user_count + 1)
		Loop
		MissileLoop2:
			TNT1 A 0 A_ChangeFlag("NOPAIN", 1)
			TNT1 A 0 A_JumpIf(user_count == 3, "ComboFinish")
			VEST EE 4 Fast A_FaceTarget
			VEST F 0 A_playsound("MageLightningFire")
			TNT1 A 0 A_custommissile("GamonBoltFast", 32, 12, 0)    
			VEST F 8 Fast bright A_custommissile("GamonBoltFast", 32, -12, 0)
			VEST E 8 Fast A_FaceTarget
			TNT1 A 0 A_SetUserVar("user_count", user_count + 1)
		Loop
		ComboFinish:
			VEST EE 4 Fast A_FaceTarget
			VEST F 0 A_playsound("MageLightningFire")
			TNT1 A 0 A_custommissile("GamonBoltFast", 48, -12, 0, CMF_AIMOFFSET)
			TNT1 A 0 A_custommissile("GamonBoltFast", 48, 12, 0, CMF_AIMOFFSET)
			TNT1 A 0 A_custommissile("GamonBoltFast", 32, 12, 0, CMF_AIMOFFSET)
			VEST F 8 Fast bright A_custommissile("GamonBoltFast", 32, -12, 0, CMF_AIMOFFSET)
			VEST E 8 Fast A_FaceTarget
		Goto See
		Pain:
			TNT1 A 0 A_GiveInventory("GamonChecker", 1)
			VEST A 3 Fast
			VEST A 3 Fast A_Pain
		goto See
		Death:
			TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoul")
	    GaveSoul: 
			VEST G 8 A_Scream
			TNT1 A 0 ACS_ExecuteAlways(982, 0, 2)
			VEST H 8 
			VEST I 8 A_NoBlocking
			VEST J 8
			VEST K -1 A_KillMaster
		stop
		Raise:
			TNT1 A 0 A_GiveInventory("Mo_Revived", 1)
			TNT1 A 0 A_TakeInventory("GamonShift", 1)
			TNT1 A 0 A_TakeInventory("GamonGhost", 1)
			TNT1 A 0 A_SetTranslucent(1.0, 0)
			TNT1 A 0 A_ChangeFlag("GHOST", 0)
			TNT1 A 0 ACS_ExecuteAlways(961, 0, 1)
			VEST JIHG 8
		goto See
		GiveSoul:
		Death.BookOfTheDead:
			VEST G 1
			TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
			TNT1 A 0 A_GiveToTarget("Souls", 1)  
		Goto GaveSoul
	}
}

Actor GamonGhost : DnD_Boolean { }
Actor GamonShift : DnD_Boolean { }

Actor GamonChecker : DnD_Activator {
	States {
		Pickup:
			TNT1 A 0 A_JumpIfInventory("GamonGhost", 1, "Failed")
			TNT1 A 0 A_JumpIfHealthLower(ACS_ExecuteWithResult(961, 7) / 2, "TurnGhost")
		Stop
		TurnGhost:
			TNT1 A 0 A_GiveInventory("GamonShift", 1)
			TNT1 A 0 A_ChangeFlag("GHOST", 1)
			TNT1 A 0 A_GiveInventory("MonsterTraits", DND_GHOST)
			TNT1 A 0 A_GiveInventory("GamonGhost", 1)
		Stop
		Failed:
			TNT1 A 0
		Stop
	}
}

actor GamonBolt {
	Radius 6
	Height 16
	Speed 20
	Damage (4 * random(3, 5) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	DamageType "FattyMagic"
	RenderStyle Add
	Alpha 0.9
	DeathSound "Veste/Hit"
	Decal "BaronScorch"
	Projectile
	+PIERCEARMOR
	states {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		SpawnLoop:
			VPRJ A 2 Bright A_CustomMissile("Sorcerer2FXSpark2",0,0,0,0)
			TNT1 A 0 A_Weave(3, 2, 1.0, 1.0)
			VPRJ B 2 Bright A_CustomMissile("Sorcerer2FXSpark2",0,0,0,0)
			TNT1 A 0 A_Weave(3, 2, 1.0, 1.0)
			VPRJ C 2 Bright A_CustomMissile("Sorcerer2FXSpark2",0,0,0,0)
			TNT1 A 0 A_Weave(3, 2, 1.0, 1.0)
		loop
		Death:
			TNT1 A 0 A_SpawnItemEx("BlueParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
			VPRJ DEF 6 bright
		stop
	}
}

Actor GamonBoltFast : GamonBolt {
	Speed 36
}

Actor GamonPuff : BlasterPuff {
	DamageType "Fatty"
    +CLIENTSIDEONLY
    +ALWAYSPUFF
	States {
		Spawn:
			VPRJ JKLMNOP 3 Bright
		Stop
	}
}

ACTOR Sorcerer2FXSpark2 : Sorcerer2FXSpark {
	scale 0.7
	+FLOATBOB
	+CLIENTSIDEONLY
	States {
		Spawn:
			TNT1 A 2
			VPRJ GHI 8 BRIGHT 
		Stop
	}
}

Actor MephistoBullet : ZombieBullet {
	Damage (random(3,5) * 2 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	DamageType "FattyBullet"
}

Actor Mephisto : BasicMechanicalEnemy {
	Health 900
	Radius 48
	Height 64
	Speed 10
	Scale 0.8
	PainChance 32
	Mass 1500
	SeeSound "Mephisto/See"
	PainSound "Mephisto/pain"
	DeathSound "Mephisto/Die"
	ActiveSound "Mephisto/See"
	Monster
	+FloorClip
	+MissileMore
	Species "Fatso"
	+DONTHURTSPECIES
	+NOINFIGHTING
	+DONTBLAST
	+USEKILLSCRIPTS
	+DONTRIP
	RadiusDamageFactor 0.5
	Obituary "%o vanquished by a Mephisto."
	DropItem "SoulAmmoSpawner", 128
	DamageFactor "Fatty", 0.0
	DamageFactor "FattyPlasma", 0.0
	DamageFactor "FattyExp", 0.0
	DamageFactor "FattyBullet", 0.0
	DamageFactor "FattyFire", 0.0
	DamageFactor "FattyIce", 0.0
	DamageFactor "FatsoCorrupt", 0.0
	DamageFactor "FattyVoidFire", 0.0
	DamageFactor "FattyMagic", 0.0
	Tag "Mephisto"
	States {
		Spawn:
			TNT1 A 0
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_MEPHISTO, DND_ENERGY_WEAKNESS | DND_HARDENED_SKIN | DND_EXPLOSIVE_RESIST)
		Idle:
			MMDR A 6 A_Look
		Loop
		See:
			MMDR ABCD 4 Fast A_Chase
		Loop
		Missile:
			TNT1 A 0 A_StopSound(7)
			TNT1 A 0 A_JumpIfCloser(320, "Plasma")
		Goto Chaingun
		Plasma:
			TNT1 A 0 A_Jump(72, "Chaingun")
			MMDR E 5 Fast A_FaceTarget
			TNT1 A 0 A_PlaySound("Weapons/newplasmafire")
			TNT1 A 0 A_CustomMissile("MephistoPlasma", 42, -28)
			MMDR F 7 Fast Bright A_CustomMissile("MephistoPlasma", 42, 28)
			MMDR G 3 Fast Bright
			MMDR E 8 Fast A_FaceTarget
			TNT1 A 0 A_PlaySound("Weapons/newplasmafire")
			TNT1 A 0 A_CustomMissile("MephistoPlasma", 42, -28)
			MMDR F 7 Fast Bright A_CustomMissile("MephistoPlasma", 42, 28)
			MMDR G 3 Fast Bright
			MMDR E 8 Fast A_FaceTarget
			TNT1 A 0 A_PlaySound("Weapons/newplasmafire")
			TNT1 A 0 A_CustomMissile("MephistoPlasma", 42, -28)
			MMDR F 7 Fast Bright A_CustomMissile("MephistoPlasma", 42, 28)
			MMDR G 3 Fast Bright
			MMDR E 8 Fast A_FaceTarget
		Goto See
		Chaingun:
			MMDR E 7 Fast A_FaceTarget
		ChaingunLoop:
			TNT1 A 0 A_FaceTarget
			TNT1 A 0 A_PlaySound("Mephisto/Chaingun", 7)
			TNT1 A 0 A_SpawnItemEx ("bulletcasing", -8, 7, 80, -4, 0, frandom(3.0, 5.0), random(-80, -90))
			MMDR H 4 Fast Bright A_CustomMissile("MephistoBullet", 84, -8, frandom(-8.4, 8.4), 0, frandom(-4.8, 4.8))
			TNT1 A 0 A_FaceTarget
			TNT1 A 0 A_SpawnItemEx ("bulletcasing", -8, 7, 80, -4, 0, frandom(3.0, 5.0), random(-80, -90))
			MMDR I 4 Fast Bright A_CustomMissile("MephistoBullet", 84, -8, frandom(-8.4, 8.4), 0, frandom(-4.8, 4.8))
			TNT1 A 0 A_CposRefire
		Loop
		Pain:
			TNT1 A 0 A_StopSound(7)
			MMDR E 8 Fast A_Pain
		Goto See
		Death:
			TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoul")
		GaveSoul:
			MMDR P 6 A_Scream
			TNT1 A 0 ACS_ExecuteAlways(982, 0, 2)
			TNT1 A 0 A_Fall
			MMDR QR 5 Bright
			TNT1 AAAAAAAA 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,0)
			MMDR SSTTUUVV 2 A_SpawnItemEx("ExplosionFX", 0, 0, random(0, 32),random(-9,9),random(-9,9),random(5,9), 48, 128)
			MMDR W -1 A_KillMaster
		Stop
		Raise:
			TNT1 A 0 A_GiveInventory("Mo_Revived", 1)
			FAT2 SRQPONMLK 6
		Goto See
		GiveSoul:
		Death.BookOfTheDead:
			MMDR P 1
			TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
			TNT1 A 0 A_GiveToTarget("Souls", 1)  
		Goto GaveSoul
	}
}

Actor MephistoPuff : NewBulletPuff {
	DamageType "FattyBullet"
}

Actor MephistoExp1 : BaseExplosionDamage {
	DamageType "Fatty"
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
			TNT1 A 1 A_Explode(24 * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)), 48, 0)
		Stop
	}
}

Actor MephistoPlasma {
	PROJECTILE
	Speed 32
	Height 12
	Radius 8
	Renderstyle Add
	Alpha 0.9
	Damage (6 * random(1, 8) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	DamageType "FattyPlasma"
	Scale 0.9
	DeathSound "Mephisto/PlasmaHit"
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		SpawnLoop:
			CTFX A 3 Bright A_SpawnItemEx("MephistoPlasmaTrail")
		Loop
		Death:
			TNT1 A 0 A_SpawnItemEx("BlueParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
			TNT1 AAAA 0 A_CustomMissile("ExplosionFX5", 0, 0, random(0,360), 2, random(0,360))
			TNT1 AAAAAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
			CTFX BC 3 Bright
			TNT1 A 0 A_SpawnItem("MephistoExp1")
			CTFX DEF 3 Bright
		Stop
	}
}

actor MephistoPlasmaTrail {
	scale 0.9
	renderstyle add
	alpha 0.9
	radius 1
	height 1
	+NOGRAVITY
	+NOINTERACTION
	+CLIENTSIDEONLY
	States {
		Spawn:
			TNT1 A 1
		SpawnLoop:
			CTFX A 1 A_FadeOut(0.1)
		Loop
		Death:
			TNT1 A 1
		Stop
	}
}

Actor Abomination : Mancubus2 {
	Health 775
	Radius 48
	Height 64
	Mass 1536
	Speed 8
	PainChance 72
	SeeSound "Abomination/See"
	PainSound "Abomination/Pain"
	DeathSound "Abomination/Die"
	ActiveSound "Abomination/Act"
	MONSTER
	+FLOORCLIP
	Species "Fatso"
	+DONTHURTSPECIES
	+DONTRIP
	+DONTBLAST
	+USEKILLSCRIPTS
	Obituary "%o was corrupted by an Abomination."
	DropItem "SoulAmmoSpawner", 128
	DamageFactor "Fatty", 0.0
	DamageFactor "FattyPlasma", 0.0
	DamageFactor "FattyExp", 0.0
	DamageFactor "FattyBullet", 0.0
	DamageFactor "FattyFire", 0.0
	DamageFactor "FattyIce", 0.0
	DamageFactor "FatsoCorrupt", 0.0
	DamageFactor "FattyVoidFire", 0.0
	DamageFactor "FattyMagic", 0.0
	Tag "Abomination"
	States {
		Spawn:
			TNT1 A 0
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_ABOMINATION, DND_HARDENED_SKIN | DND_PIERCE)
		Idle:
			HFAT AB 15 A_Look
		Loop
		See:
			HFAT AABBCCDDEEFF 4 Fast A_Chase
		Loop
		Pain:
			HFAT J 3 Fast
			HFAT J 3 Fast A_Pain
		Goto See
		Missile:
			HFAT G 0 A_PlaySound("Abomination/Attack")
			HFAT G 20 Fast A_FaceTarget
			HFAT H 0 A_CustomMissile("AbominationShot2", 16, 28, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 16, 52, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 40, 28, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 40, 52, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot1", 28, 40)
			HFAT H 0 A_CustomMissile("AbominationShot2", 16, -28, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 16, -52, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 40, -28, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 40, -52, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot1", 28, -40)
			HFAT G 0 A_PlaySound("Abomination/Attack")
			HFAT H 10 Fast BRIGHT
			HFAT IG 5 Fast A_FaceTarget
			HFAT H 0 A_CustomMissile("AbominationShot2", 16, 28, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 16, 52, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 40, 28, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 40, 52, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot1", 28, 40)
			HFAT H 0 A_CustomMissile("AbominationShot2", 16, -28, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 16, -52, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 40, -28, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 40, -52, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot1", 28, -40)
			HFAT G 0 A_PlaySound("Abomination/Attack")
			HFAT H 10 Fast BRIGHT
			HFAT IG 5 Fast A_FaceTarget
			HFAT H 0 A_CustomMissile("AbominationShot2", 16, 28, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 16, 52, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 40, 28, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 40, 52, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot1", 28, 40)
			HFAT H 0 A_CustomMissile("AbominationShot2", 16, -28, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 16, -52, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 40, -28, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot2", 40, -52, 0, CMF_AIMOFFSET)
			HFAT H 0 A_CustomMissile("AbominationShot1", 28, -40)
			HFAT H 10 Fast BRIGHT
			HFAT IG 5 Fast A_FaceTarget
		Goto See
		Death:
			TNT1 A 0 A_Jump(128, "OtherWay")
			TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoul1")
		GaveSoul1:
			DA7D A 6
			TNT1 A 0 A_TakeInventory("DnD_Boolean", 1)
			TNT1 A 0 ACS_ExecuteAlways(982, 0, 2)
			DA7D B 6 A_Scream
			DA7D C 6 A_NoBlocking
			TNT1 AAAAAA 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,0)
			DA7D DEFGH 6
			DA7D I -1 A_KillMaster
		Stop
		GiveSoul1:
		Death.BookOfTheDead:
			DA7D A 1
			TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
			TNT1 A 0 A_GiveToTarget("Souls", 1)  
		Goto GaveSoul1	 
		GiveSoul2:
			DA7D J 1
			TNT1 A 0 A_SpawnItem("SoulEffectSpawner")
			TNT1 A 0 A_GiveToTarget("Souls", 1)  
		Goto GaveSoul2	 
		OtherWay:
			TNT1 A 0 A_GiveInventory("DnD_Boolean", 1)
			TNT1 A 0 A_JumpIfInTargetInventory("Ability_SoulStealer", 1, "GiveSoul2")
		GaveSoul2:
			DA7D J 6
			TNT1 A 0 A_TakeInventory("DnD_Boolean", 1)
			TNT1 A 0 ACS_ExecuteAlways(982, 0, 2)
			DA7D K 6 A_Scream
			DA7D L 6 A_NoBlocking
			TNT1 AAAAAA 0 A_SpawnItem("NashGore_GibGenerator",0,0,0,0)
			DA7D MNOPQ 6
			DA7D R -1 A_KillMaster
		Stop
		Stop
		Raise:
			TNT1 A 0 A_GiveInventory("Mo_Revived", 1)
			TNT1 A 0 A_JumpIfInventory("DnD_Boolean", 1, "Raise2")
			DA7D IHGFEDCBA 4
		Goto See
		Raise2:
			DA7D RQPONMLKJ 4
		Goto See
   }
}

Actor AbominationExp : BaseExplosionDamage {
	DamageType "FattyVoidFire"
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
			TNT1 A 1 A_Explode(30, 84, 0)
		Stop
	}
}

Actor AbominationShot1 {
	Translation "0:255=%[0.00,0.00,0.00]:[1.57,1.11,1.60]"
	RenderStyle Add
	PROJECTILE
	Speed 28
	Radius 5
	Height 10
	Damage (5 * random(4, 6) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	DamageType "FattyVoidFire"
	DeathSound "weapons/basiliskexpl3"
	+DONTBLAST
	+PIERCEARMOR
	States {
		Spawn:
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		SpawnLoop:
			HIB1 AB 3 Bright
		Loop
		Death:
			TNT1 A 0 A_SetTranslucent(0.75, 1)
			TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
			TNT1 A 0 A_SpawnItemEx("PurpleParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
			TNT1 A 0 A_SpawnItemEx ("SmallPurpleFlare", 0, 0, 0, 0, 0, 0, 0, SXF_CLIENTSIDE | SXF_NOCHECKPOSITION, 0)
			HIB1 C 3 Bright A_SpawnItem("AbominationExp")
			HIB1 DEFG 3 Bright
		stop
	}
}

ACTOR AbominationShot2 {
	Translation "0:255=%[0.00,0.00,0.00]:[1.57,1.11,1.60]"
	Radius 5
	Height 8
	Speed 36
	Damage (5 * random(1, 2) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	RenderStyle ADD
	Damagetype "FattyVoidFire"
	PROJECTILE
	+PIERCEARMOR
	+THRUGHOST
	+FORCEXYBILLBOARD
	+MTHRUSPECIES
	+DONTBLAST
	SeeSound "weapons/magic1"
	DeathSound "weapons/firex5"
	States {
		Spawn: 
			TNT1 A 0 NoDelay ACS_NamedExecuteAlways("DnD Pierce Check")
		SpawnLoop:
			BMIS A -1 Bright 
		Stop
		Death:
			TNT1 AAA 0 A_CustomMissile("FireballSmoke", 0, 0, random(0,360), 2, random(0,360))
			IMFX QRSTUVW 3 Bright
		stop
	}
}

Actor GoldGolem : MagicalEnemy {
	Obituary "%o's head was taken as a trophy for a Gold Golem."
	HitObituary "%o was smashed like an insect by a Gold Golem."
	Health 1000
	Radius 36
	Height 64
	ProjectilePassHeight 80
	Mass 2000
	Scale 1.45
	Speed 4
	PainChance 32
	MeleeRange 76
	MaxTargetRange 360
	DeathSound "GoldGolem/Die"
	PainSound "GoldGolem/Pain"
	SeeSound "GoldGolem/See"
	ActiveSound "EarthGolem/Act"
	Monster
	DamageFactor "Fatty", 0.0
	DamageFactor "FattyPlasma", 0.0
	DamageFactor "FattyExp", 0.0
	DamageFactor "FattyBullet", 0.0
	DamageFactor "FattyFire", 0.0
	DamageFactor "FattyIce", 0.0
	DamageFactor "FatsoCorrupt", 0.0
	DamageFactor "FattyVoidFire", 0.0
	DamageFactor "FattyMagic", 0.0
	+MISSILEMORE
	+MISSILEEVENMORE
	+FloorClip
	+DONTHARMSPECIES
	+NoBlood
	+NoIceDeath
	+DONTRIP
	+DONTBLAST
	+NODAMAGETHRUST
	+DONTMORPH
	+USEKILLSCRIPTS
	Tag "Gold Golem"
	Species "Fatso"
	var int user_count;
	States {
		Spawn:
			TNT1 A 0
			TNT1 A 0 A_GiveInventory("MakeElementalImmune", 1)
			TNT1 A 0 ACS_ExecuteAlways(DND_MONSTERSCALESCRIPT, 0, DND_GOLDGOLEM, DND_SILVER_WEAKNESS | DND_HARDENED_SKIN | DND_PIERCE, DND_ELEMENTAL_IMMUNE)
		Idle:
			GOL4 A 10 A_Look
		Loop
		See:
			GOL4 AA 2 Fast A_Chase
			GOL4 BB 3 Fast A_Chase
			TNT1 A 0 A_PlaySound("GoldGolem/Step")
			GOL4 CC 2 Fast A_Chase
			GOL4 DD 3 Fast A_Chase
			TNT1 A 0 A_PlaySound("GoldGolem/Step")
		Loop
		Pain:
			GOL4 I 5 A_Pain
			GOL4 I 5
		Goto See
		Melee:
			GOL4 E 6 Fast A_FaceTarget
			TNT1 A 0 A_PlaySound("GoldGolem/Swing")
			GOL4 F 5 Fast A_FaceTarget
			GOL4 G 8 Fast A_CustomMeleeAttack(5 * random(12, 16) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "GoldGolem/melee")
		Goto See
		Missile:
			TNT1 A 0 A_Jump(128, "Dash")
		MissileCont:
			GOL4 H 2 Fast A_FaceTarget
			TNT1 A 0 A_SetUserVar("user_count", 0)
			TNT1 A 0 A_PlaySound("GoldGolem/LaserCharge", 7)
			GOL4 H 2 Fast
			GOL4 H 4 Fast Bright A_FaceTarget
			GOL4 H 4 Fast A_FaceTarget
			GOL4 H 4 Fast Bright A_FaceTarget
			GOL4 H 4 Fast A_FaceTarget
			GOL4 H 4 Fast Bright A_FaceTarget
			GOL4 H 4 Fast A_FaceTarget
			TNT1 A 0 A_StopSound(7)
		MissileLoop:
			TNT1 A 0 A_JumpIf(user_count == 32, "See")
			GOL4 H 2 BRIGHT A_CustomMissile("GoldGolemLaser", 72, 0, -21 * cos(user_count * 22.5))
			TNT1 A 0 A_FaceTarget
			TNT1 A 0 A_SetUserVar("user_count", user_count + 1)
		Loop
		Dash:
			TNT1 A 0 A_JumpIfCloser(320, "ContinueDash")
		Goto MissileCont
		ContinueDash:
			GOL4 G 1 A_FaceTarget
			TNT1 A 0 A_PlaySound("Golem/Slide")
			TNT1 A 0 ACS_ExecuteAlways(971, 0, 25) // script sets velocity
			GOL4 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)
			GOL4 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)
			GOL4 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")
			GOL4 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)
			GOL4 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)
			GOL4 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)
			GOL4 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:
			GOL4 F 3 Fast A_FaceTarget
			TNT1 A 0 A_CustomMeleeAttack(5 * random(12, 16) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_SELF)), "Golem/Hit")
			GOL4 F 3 Fast A_FaceTarget
			TNT1 A 0 A_CustomMissile("GoldGolemBash")
			GOL4 E 5 Fast
			GOL4 E 1 Fast A_Jump(128, "Spikes")
		Goto See
		MissileFinish:
			GOL4 H 6 BRIGHT A_FaceTarget
			GOL4 H 6 A_FaceTarget
		Goto See
		Death:
			GOL4 I 35 A_Scream
			GOL4 J 3 A_Die
			GOL4 KL 3
			GOL4 M 3 A_NoBlocking
			GOL4 NOPQRST 3
			TNT1 A 0 A_PlaySound("GoldGolem/Fall")
			GOL4 UVW 3
			GOL4 X -1 A_KillMaster
		Stop
		Raise:
			TNT1 A 0 A_GiveInventory("Mo_Revived", 1)
			GOL4 WVUTSRQPONMLKJ 3
			GOL4 I 5
		Goto See
	}
}

Actor GoldGolemLaser {
	Radius 3
	Height 6
	Speed 36
	Damage (random(5, 12) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
	RenderStyle Add
	Alpha 0.5
	Scale 0.6
	Projectile
	DeathSound "GoldGolem/LaserHit"
	+DontReflect
	+Ripper
	+DONTBLAST
	+NODAMAGETHRUST
	Damagetype "Fatty"
	States {
		Spawn:
			G3PJ A 0
			G3PJ A 0 A_PlaySoundEx("GoldGolem/LaserFire", "SoundSlot7", 1)
			G3PJ AAABBB 1 Bright A_SpawnItemEx("GolemLaserTrail", -32, 0, (velz / 1.2 * (-1)), 28, 0, (velz / 1.2), 0)
			G3PJ AAABBB 1 Bright A_SpawnItemEx("GolemLaserTrail", -32, 0, (velz / 1.2 * (-1)), 28, 0, (velz / 1.2), 0)
			G3PJ AAABBB 1 Bright A_SpawnItemEx("GolemLaserTrail", -32, 0, (velz / 1.2 * (-1)), 28, 0, (velz / 1.2), 0)
		Death:
			TNT1 A 1
		Stop
	}
}

Actor GolemLaserTrail {
	Height 4
	Radius 2
	+NOINTERACTION
	+CLIENTSIDEONLY
	RenderStyle Add
	Alpha 0.5
	Scale 0.6
	States {
		Spawn:
			G3PJ ABC 1 Bright A_FadeOut(0.04)
		Loop
		Death:
			TNT1 A 1
		Stop
	}
}

Actor GoldGolemBash : CrystalGolemBash {
	Speed 40
	damage (20 * random(1, 2) * (1.0 + ACS_NamedExecuteWithResult("DND Monster Damage Scale", DND_USETARGET)))
}