ACTOR NemesisGhoul
{
//Creator: Eshkere_Jason
//Origin: Divine Infinity
//Sprite: NEGH
//Title: "NemesisGhoul"
Health 2750
Radius 16
Height 56
Mass 100
Speed 22
PainChance 50
Monster
MeleeDamage 25
DamageFactor 0.5
DamageFactor "PlayerNemesisPlasma", 0.0
DamageFactor "Explosion", 0.2 //0.4
DamageFactor "PlayerDTRG", 0.5
DamageFactor "DTRailgun", 0.5
DamageFactor "Player",0.5
DamageFactor "Legendary",0.0
DamageFactor "SuperWeapon", 0.75
DamageFactor "LegendaryPlayer", 0.0
DamageFactor "LegendaryGuruPlayer", 0.0
DamageFactor "PlayerDevBall", 0.65
DamageFactor "PlayerDevTracer", 0.15
DamageFactor "PowerDoubleDamage", 0.35
DamageFactor "PlayerBHole", 0.025
DamageFactor "PlayerDBFG", 0.015
DamageFactor "PlayerDBFG2", 0.015
DamageFactor "BFG10K", 0.65
DamageFactor "BFG9500Ball", 0.1
DamageFactor "CustomSpray", 0.1
DamageFactor "BFGSplash", 0.5
DamageFactor "BFGSpray", 0.5
DamageFactor "PDTBFG", 0.5
DamageFactor "PDTBFGTracer", 0.5
DamageFactor "PlayerDTBFGRailgunSlug", 0.5
DamageFactor "PDTPuff", 0.5
DamageFactor "SatanGuard", 0.0
DamageFactor "Moloch", 0.0
DamageFactor "ZombieDev", 0.0
DamageFactor "Terminator", 0.0
DamageFactor "Legendary1", 0.0
DamageFactor "LegendaryGuru", 0.0
DamageFactor "UltimateLegendary", 0.0
DamageFactor "Cybers", 0.0
DamageFactor "Hell", 0.0
DamageFactor "Commander", 0.0
DamageFactor "NobleComet", 0.0
DamageFactor "Baby15K", 0.0
DamageFactor "Cyber10K", 0.0
DamageFactor "DemolisherEx", 0.0
DamageFactor "DarkDemoEx", 0.0
DamageFactor "CerChainguns", 0.0
DamageFactor "CerEnergyBall", 0.0
DamageFactor "HellComet", 0.0
DamageFactor "HFCyber", 0.0
DamageFactor "DBFG2", 0.1
DamageFactor "DBFG10K2", 0.1
DamageFactor "DBFGSplash2", 0.1
DamageFactor "LegMind", 0.0
DropItem "legendaryRune" 100 1
DropItem "EnragedLegendarySphere" 70
DropItem "LegendaryPowerSphere" 85 1
DropItem "EnrLegGreaterDemonicEnergy" 200
DropItem "EnrLegDemonicEnergy" 250
DropItem "LegendaryBossLifeEssence" 256
DropItem "LegendaryBossArmorBonusMax" 256
DropItem "LegendaryBossLifeEssence" 128
DropItem "LegendaryBossArmorBonusMax" 128
DropItem "Enraged Legendary Plasmatic Rifle" 76
Species "Imps"
SeeSound "monster/vulsit"
PainSound "monster/vulpai"
DeathSound "monster/vulhit"
ActiveSound "monster/vulact"
BloodColor "Red"
MeleeSound "imp/melee"
HitObituary "%o was made into a feast for a Enraged Legendary Ghoul."
Obituary "%o was deep impaled by a Enraged Legendary Ghoul."
Tag "\c[v9]Nemesis Ghoul\c-"
+NOTIMEFREEZE
+NOFEAR
+BOSS
+BOSSDEATH
+FLOORCLIP
+MISSILEMORE
+MISSILEEVENMORE
+QUICKTORETALIATE
+NOICEDEATH
+NODROPOFF
+DONTGIB
+NOTARGET
+BRIGHT
var int user_music;
var int user_protection;
var int user_protected;
var int user_missile;
var int user_deathtimer;
var int user_deathtimeractive;
States
{
  Spawn:
    TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
    NEGH A 10 A_Look
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	NEGH A 10 A_Look
    Loop
  See:
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,6726)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
    NEGH A 0 A_JumpIfTargetInLOS("Strafing")
    NEGH AA 3 A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	NEGH BB 3 A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItem("FootStep")
	NEGH A 0 A_JumpIfTargetInLOS("Strafing")
	NEGH CC 3 A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	NEGH DD 3 A_Chase
	NEGH A 0 A_Jump(80,"Rush")
    TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItem("FootStep")
    Loop
  Rush:
    NEGH A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("NemesisGhoulGhostA")
	NEGH A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisGhoulGhostA")
	NEGH A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisGhoulGhostB")
	NEGH B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisGhoulGhostB")
	NEGH B 1 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
    TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("NemesisGhoulGhostC")
	NEGH C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisGhoulGhostC")
	NEGH C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisGhoulGhostD")
	NEGH D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisGhoulGhostD")
	NEGH D 1 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Jump(84,"See")
	Loop
  Strafing:
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NEGH AA 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NEGH BB 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    NEGH CC 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	NEGH DD 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	Goto See
  Pause:
	TNT1 A 0 A_SetUserVar(user_missile,0)
	NEGH E 0 A_PlaySound("legimp/fiyabetch")
	NEGH EEEEE 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	Goto See
  Melee:
    NEGH EF 6 A_FaceTarget
    NEGH F 5 A_MeleeAttack
	Goto See
  Missile:
	NEGH EEEE 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	TNT1 A 0 A_Jump(20,"NemesisGhoulRapid","NemesisGhoulSuper","NemesisGhoulSeeker","Normal")
	NEGH E 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	TNT1 A 0 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	TNT1 AA 0 A_CustomMissile("NemesisImpBallSeek",1,0,Frandom(-1,1),0)
	NEGH F 3 A_PlaySoundEx("weapons/DemonTechRifle","Weapon")
	TNT1 A 0 A_Jump(24,"Pause")
	TNT1 A 0 A_SpidRefire
    TNT1 A 0 A_PlayWeaponSound("BlueDTRFire")
	Goto Missile+4	
 NemesisGhoulRapid:
	TNT1 A 0 A_PlaySound("monster/vulpai",0,1,0,ATTN_NONE)
    NEGH EEEEEEEE 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
  NemesisGhoulRapidLoop:
    TNT1 A 0 A_JumpIf(user_missile == 20,"Pause")
    NEGH E 1 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	TNT1 AA 0 A_CustomMissile("NemesisZombieCannonLaser",32,0,Frandom(-1,1),0)
	NEGH F 3 A_PlaySoundEx("legimp/chargingsound","Weapon")
	TNT1 A 0 A_PlayWeaponSound("legimp/fiyabetch")
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	Loop
   Normal:
    NEGH EF 8 A_FaceTarget
	NEGH F 1 A_FaceTarget
	TNT1 A 0 A_PlaySound("imp/attack")
	TNT1 A 0 A_CustomMissile("NemesisImpBall", 28, 0, 0)
	TNT1 A 0 A_CustomMissile("NemesisImpBall", 28, 0, -5)
	TNT1 A 0 A_CustomMissile("NemesisImpBall", 28, 0, 5)
	TNT1 A 0 A_CustomMissile("NemesisImpBall", 28, 0, -10)
	TNT1 A 0 A_CustomMissile("NemesisImpBall", 28, 0, 10)
	TNT1 A 0 A_CustomMissile("NemesisImpBall", 28, 0, -15)
	TNT1 A 0 A_CustomMissile("NemesisImpBall", 28, 0, 15)
	TNT1 A 0 A_CustomMissile("NemesisImpBall", 28, 0, -20)
	TNT1 A 0 A_CustomMissile("NemesisImpBall", 28, 0, 20)
	TNT1 A 0 A_Jump(88,"NemesisGhoulSeeker")
	Goto See
  NemesisGhoulSeeker:
	NEGH EF 10 A_FaceTarget
  NemesisGhoulSeekerLoop:
    TNT1 A 0 A_JumpIf(user_missile >= 8,"Detox")
	TNT1 A 0 A_PlaySound("imp/attack")
	NEGH F 6 A_CustomMissile("NemesisImpBallSeek",32,20,0)
    NEGH F 2 A_FaceTarget
	TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	Loop
  NemesisGhoulSuper:
	TNT1 A 0 A_JumpIfCloser(200,"Normal")
	TNT1 A 0 A_PlaySound ("legimp/chargingsound")
	TNT1 A 0 A_SetInvulnerable
  NemesisGhoulSuperLoop1:
    TNT1 A 0 A_JumpIf(user_missile >= 5,"NemesisGhoulSuperLoop2")
	NEGH E 0 A_FaceTarget
	NEGH EEEEE 2 A_SpawnItem("NemesisGhoulILegImpLineSpawner")
    TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	Loop
  NemesisGhoulSuperLoop2:
	TNT1 A 0 A_JumpIf(user_missile >= 10,"NemesisGhoulSuperFire")
	NEGH E 0 A_FaceTarget
	NEGH FFFFF 2 A_SpawnItem("NemesisGhoulILegImpLineSpawner")
    TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	Loop
  NemesisGhoulSuperFire:
    TNT1 A 0 A_SetUserVar(user_missile,0)
    TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	NEGH F 0 A_CustomMissile ("NemesisImpLaserBall",28,0,-5)
	NEGH F 0 A_CustomMissile ("NemesisImpLaserBall",28,0,5)
	TNT1 A 0 A_playSound ("legimp/fiyabetch")
	TNT1 A 0 A_UnsetInvulnerable
	Goto See
  Teleport:
    NEGH A 1 A_UnSetShootable
	NEGH AAAA 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	NEGH AAAAAAAAAA 1  A_FadeOut(0.1,0)
	NEGH A 2 
	NEGH AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	NEGH AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
    NEGH A 1 A_PlayWeaponSound("boss/teleport")
	NEGH AAAA 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	NEGH AAAAAAAAAA 1 A_FadeIn(0.1)
    NEGH A 1 A_SetShootable
    Goto See
	Detox:
    TNT1 A 0 A_SetUserVar(user_missile,0)
  Pain:
	
  Pain2:
	TNT1 A 0 A_Jump(192,"PainMissile")
    NEGH G 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
    TNT1 A 0 A_Pain
	NEGH G 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
    Goto See
  PainMissile: 
	NEGH G 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	TNT1 A 0 A_Pain
	NEGH G 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	Goto Missile	
  NemesisGhoulProtection:
	TNT1 A 0 A_JumpIf(user_protection >= 3,"Pain2")
	TNT1 A 0 A_JumpIf(user_protected == 1,"Pain2")
	TNT1 A 0 A_PlaySound("legendary/defense")
	TNT1 A 0 A_FaceTarget
	NEGH E 2 ACS_NamedExecuteAlways("EnragedLegendaryProtection")
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	Goto See
  VexedSpawn:
	NEGH G 3 Bright A_Pain
	NEGH G 0 A_PlaySoundEx("brain/spit",7,0,2)
	NEGH GGGGGGGGGGGGGGGGG 2 Bright A_GiveInventory("NemesisSoulEvent",1)
	NEGH GGGGGGGGGGGGGGGGG 2 Bright A_GiveInventory("NemesisSoulEvent",1)
	NEGH ZZZZZZZZZZZZZZZZZ 2 Bright A_GiveInventory("NemesisSoulEvent",1)
	NEGH ZZZZZZZZZZZZZZZZZ 2 Bright A_GiveInventory("NemesisSoulEvent",1)
	NEGH XXXXXXXXXXXXXXXXX 2 Bright A_GiveInventory("NemesisSoulEvent",1)
	NEGH ZZZZZZZZZZZZZZZZZ 2 Bright A_GiveInventory("NemesisSoulEvent",1)
	NEGH XXXXXXXZZZXXZXZXZ 2 Bright A_GiveInventory("NemesisSoulEvent",1)
	NEGH ZXZXZXZXZXXXXXXXX 3 A_PlaySoundEx ("vexed/vulsh2",1)
	TNT1 A 0 A_SpawnItemEx("NemesisLightning")
	NEGH XXXXXXXXXXXXXXXXX 2 Bright A_SpawnItemEx("VexedNemesisFlameSpawner")
	TNT1 A 0 A_SpawnItemEx("VexedNemesisGhoul",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_TELEFRAG)
	TNT1 A 0
	Stop	
   Death:
    TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_ChangeFlag("BRIGHT",0)
	TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("NoVexedBoys") == 1,4)
	TNT1 A 0 A_JumpIfInTargetInventory("TrueLegendaryRuneItem",1,"VexedSpawn")
	TNT1 A 0 A_JumpIfInTargetInventory("TrueLegendaryRuneItem2",1,"VexedSpawn")
	TNT1 A 0 A_JumpIf(user_deathtimer <= 10,"VexedSpawn")
	NEGH I 8
    NEGH J 8 A_Scream
    NEGH K 6
    NEGH L 6 A_NoBlocking
    NEGH M 1
    NEGH N -1
	Stop
	}
}

Actor INFNemesisGhoul : NemesisGhoul
{
Tag "\c[v9]Nemesis Ghoul\c-"
States
{
  Spawn:
    TNT1 A 0 A_Jump(120,"Remove")
    TNT1 A 0 A_JumpIf(ACS_NamedExecuteWithResult("RuneTier2SpawnCheck") == 2,1)
	Goto Remove
  Idle:
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	NEGH A 10 A_Look
	Loop
  Remove:
	TNT1 A 1
	TNT1 A 0 A_SpawnItemEx("Imp",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION)
	TNT1 A 0 A_ChangeFlag("COUNTKILL", FALSE)
	TNT1 A 0
	Stop
	}
}
	
ACTOR NemesisGhoulGhostA
{
Scale 1.1
Radius 20
Height 56
Speed 0
Alpha 0.7
PROJECTILE
RENDERSTYLE Translucent
+NOTIMEFREEZE
+NOINTERACTION
+CLIENTSIDEONLY
+NONETID
States
{
  Spawn:
	TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "NULL")
	TNT1 A 1
	Goto Fade
  Fade:
	NEGH A 2 A_FadeOut(0.1,1)
	Loop
  Toaster:
	TNT1 A 1
	Stop
	}
}

ACTOR NemesisGhoulGhostB : NemesisGhoulGhostA
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "NULL")
  Fade:
    TNT1 A 1
    NEGH B 2 A_FadeOut(0.10)
    Goto Fade+1
    }
}

ACTOR NemesisGhoulGhostC : NemesisGhoulGhostA
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "NULL")
  Fade:
    TNT1 A 1
    NEGH C 2 A_FadeOut(0.10)
    Goto Fade+1
    }
}

ACTOR NemesisGhoulGhostD : NemesisGhoulGhostA
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "NULL")
  Fade:
    TNT1 A 1
    NEGH D 2 A_FadeOut(0.10)
    Goto Fade+1
    }
}



Actor NemesisGhoulLegZombieStrafingg : LegZombieStrafing
{
  States
  {
  Pickup:
    NULL A 1 
	NULL A 1 A_SpawnItem("NemesisHellionSmokeSpawner")
	NULL A 1 A_Jump(188,2)
	NULL A 1 A_GiveInventory("LegZombieJumping",1)
	NULL A 1 A_JumpIf(velx != 0 || vely != 0,2)
	NULL A 1 A_Jump(256,2)
	NULL A 1 A_Jump(235,5)
	NULL A 1 A_JumpIfInventory("LegZombieStrafeSens",1,3)
	NULL A 1 A_GiveInventory("LegZombieStrafeSens",1)
	NULL A 1 A_Jump(256,2)	
	NULL A 1 A_TakeInventory("LegZombieStrafeSens",1)
	NULL A 1 A_JumpIfInventory("LegZombieStrafeSens",1,3)
	NULL A 1 ThrustThing(angle*256/360+38.7,3,0,0)
	NULL A 1 A_Jump(256,2)	
	NULL A 1 ThrustThing(angle*256/360+38.7,-3,0,0)
    NULL A 1 A_FaceTarget
	NULL A 1 A_Jump(24,2)
	NULL A 1 A_JumpIfCloser(300,2)
	NULL A 1 A_Recoil(-1)
    Stop
	NULL A 1 A_Recoil(1)
    Stop	
  }
}

Actor NemesisGhoulLegZombieJumpingg : LegZombieStrafingg
{
  +NOTIMEFREEZE
  States
  {
  Pickup:
    NULL A 1 
    NULL A 1 A_CheckFloor(1)
    Stop
	NULL A 1 A_Jump(242,2)
	NULL A 1 ThrustThingZ(0,25,0,1)
    Stop
	NULL A 1
    Stop
  }
}

Actor NemesisGhoulLegendaryImpRedBall : LegendaryImpBlueBall
{
  Speed 30
  FastSpeed 30
  Damage 80
  Decal "BFG9500LightningRed"
  States
  {
  Spawn:
	TNT1 A 0 NoDelay A_PlaySound("legball/fly",6,1.0,1)
	Goto Fly
  Fly:
	CLBB D 3 Bright A_SpawnItemEx("BlackProjParticleSuperLarge2",0,0,0,0,frandom(-1,1),frandom(-1,1),random(0,359))
	TNT1 A 0 A_SpawnItemEx("BlackProjParticleSuperLarge2",0,0,0,0,frandom(-1,1),frandom(-1,1),random(0,359))
	TNT1 A 0 A_CustomMissile("NemesisImpLaserBallAttack",random(-1,1),random(-2,2),0,CMF_AIMDIRECTION|CMF_TRACKOWNER)
	CLBB D 3 Bright A_SpawnItemEx("BlackProjParticleSuperLarge2",0,0,0,0,frandom(-1,1),frandom(-1,1),random(0,359))
	TNT1 A 0 A_SpawnItemEx("BlackProjParticleSuperLarge2",0,0,0,0,frandom(-1,1),frandom(-1,1),random(0,359))
	TNT1 A 0 A_CustomMissile("NemesisImpLaserBallAttack",random(-1,1),random(-2,2),0,CMF_AIMDIRECTION|CMF_TRACKOWNER)
	CLBB D 3 Bright A_SpawnItemEx("BlackProjParticleSuperLarge2",0,0,0,0,frandom(-1,1),frandom(-1,1),random(0,359))
	TNT1 A 0 A_SpawnItemEx("BlackProjParticleSuperLarge2",0,0,0,0,frandom(-1,1),frandom(-1,1),random(0,359))
	TNT1 A 0 A_CustomMissile("NemesisImpLaserBallAttack",random(-1,1),random(-2,2),0,CMF_AIMDIRECTION|CMF_TRACKOWNER)
	Loop
  Death:
	TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_Explode(158,138,0)
	TNT1 A 0 Radius_Quake(20,12,0,12,0)
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("BlackProjParticleSuperLarge",0,0,0,frandom(-7,7),frandom(-7,7),frandom(-7,7),random(0,359))
	CLBB D 1 Bright A_FadeOut(0.2)
	Goto Death+4
	}
}

ACTOR NemesisGhoulILegBallAttack : LegBallAttack
{
Obituary "%o was ravaged by an Nemesis Ghoul."
States
{
  Spawn:
    TNT1 A 0
	TNT1 AAAAA 1 A_Look
	Stop
  See:
    TNT1 A 0
	TNT1 A 1 A_JumpIfCloser(1250,"Attack")
	Stop
  Attack:
	TNT1 A 0
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_RearrangePointers(AAPTR_MASTER, AAPTR_MASTER, AAPTR_NULL)
	TNT1 A 1 Bright A_CustomRailgun(8,0,None,None,RGF_SILENT|RGF_FULLBRIGHT,0,2,"LegendaryImpPuff",0,0,0,0,3.0,0,"NemesisImpRailParticle")
	Goto Death
  Death:
	TNT1 A 1
	Stop
	}
}

ACTOR NemesisGhoulILegendaryBallTrail : LegendaryBallTrail
{
States
{
  TNT1 A 0
	CLBA DDDDDDDDDDDDDDDDDDDD 1 Bright A_Explode(2,60)
	TNT1 A 0 A_SetScale(0.55)
	CLBA D 1 A_FadeOut(0.1)
	TNT1 A 0 A_SetScale(0.5)
	CLBA D 1 A_FadeOut(0.1)
	TNT1 A 0 A_SetScale(0.45)
	CLBA D 1 A_FadeOut(0.1)
	TNT1 A 0 A_SetScale(0.4)
	CLBA D 1 A_FadeOut(0.1)
	TNT1 A 0 A_SetScale(0.35)
	CLBA D 1 A_FadeOut(0.1)
	TNT1 A 0 A_SetScale(0.3)
	CLBA D 1 A_FadeOut(0.1)
	TNT1 A 0 A_SetScale(0.25)
	CLBA D 1 A_FadeOut(0.1)
	TNT1 A 0 A_SetScale(0.2)
	CLBA D 1 A_FadeOut(0.1)
	TNT1 A 0 A_SetScale(0.15)
	CLBA D 1 A_FadeOut(0.1)
	Stop
	}
}

ACTOR NemesisGhoulILegendaryBall : LegendaryBall
{
Speed 23
Damage 23
FastSpeed 30
States
{
  Spawn:
    IIM1 AB 1 Bright A_SpawnItemEx("ILegendaryBallTrail",0,0,2,0,0,0,0,128,0)
    Loop
  Death:
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("EnragedParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128) 
    TNT1 AAA 0 A_CustomMissile("NemesisHellionSmokeSpawner", 0, 0, random(0,360), 2, random(0,360))		
    IIM1 CDE 3 Bright
    Stop
	}
}

ACTOR NemesisGhoulILegImpSeekBall : LegImpSeekBall
{
Speed 39
FastSpeed 42
Damage (Random(12,18))
States
{
  Spawn:
    TNT1 A 0
	TNT1 A 0 A_SeekerMissile(12,0)
	TNT1 A 0 A_BishopMissileWeave
	CLBA D 1 Bright A_SpawnItemEx("BlackProjParticleSuperLarge",0,0,0,0,frandom(-1,1),frandom(-1,1),random(0,359))
	TNT1 A 0 A_BishopMissileWeave
	CLBA D 1 Bright A_SpawnItemEx("BlackProjParticleSuperLarge",0,0,0,0,frandom(-1,1),frandom(-1,1),random(0,359))
	Loop
  Death:
	TNT1 A 0
	TNT1 AAAAAAAAA 0 A_SpawnItemEx("BlackProjParticleSuperLarge",0,0,0,frandom(-2,2),frandom(-2,2),frandom(-2,2),random(0,359))
	CLBA D 1 Bright A_FadeOut(0.2)
	Wait
}
}

ACTOR NemesisGhoulILegImpSeekBallTrail : LegImpSeekBallTrail
{
States
{
  Spawn:
    TNT1 A 0
	TNT1 A 1 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "NULL")
    IIM1 GHIJKL 1 A_FadeOut(0.1)
	Stop
}
}

ACTOR NemesisGhoulILegImpLineSpawner : LegImpLineSpawner
{
States
{
  Spawn:
	TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "NULL")
	TNT1 AAA 0 A_CustomMissile("EnragedSparkleSpawner",0,0,random(0,-360),2,random(0,360))
	TNT1 AAAAAAA 0 A_SpawnItemEx("LegendaryRedPowerLine",random(32,-32),random(32,-32),random(8,48),0,0,random(1,4),0,128,0) 	
	TNT1 A 1 A_SpawnItemEx("LegendaryRedPowerLine",random(32,-32),random(32,-32),random(8,48),0,0,random(1,4),0,128,0) 
    Stop  
	}
}