ACTOR VexedNemesisGhoul : NemesisZombie
{
//Creator: Eshkere_Jason
//Origin: Divine Infinity
//Sprite: VXGH
//Title: "NemesisGhoul"
//Info: its Vexed Nemesis Ghoul Version 3.0
Health 2750
Radius 16
Height 56
Mass 500
Speed 26
PainChance 25
Monster
MeleeDamage 75
DamageFactor 0.3
DamageFactor "PlayerNemesisPlasma", 0.0
DamageFactor "Explosion", 0.2 //0.4
DamageFactor "PlayerDTRG", 0.5
DamageFactor "DTRailgun", 0.5
DamageFactor "Player",0.1
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.1
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 "NemesisSphere" 128
DropItem "NemesisArmor" 70
DropItem "NemesisPowerSphere" 85 1
DropItem "GreaterDemonicEnergy" 200
DropItem "NemesisDemonicEnergy" 250
DropItem "NemesisBossLifeEssence" 256
DropItem "NemesisBossArmorBonusMax" 256
DropItem "NemesisBossLifeEssence" 128
DropItem "NemesisBossArmorBonusMax" 128
DropItem "Nemesis Plasmatic Rifle" 110
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 \c[w2]Vexed Nemesis Ghoul\c-."
Obituary "%o was deep impaled by a \c[w2]Vexed Nemesis Ghoul\c-."
Tag "\c[w2]Vexed 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_summoning;
var int user_summoned;
States
{
  Spawn:
    TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
    VXGH A 10 A_Look
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	VXGH A 10 A_Look
    Loop
  See:
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,6726,560)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
    VXGH A 0 A_JumpIfTargetInLOS("Strafing")
    VXGH AA 3 A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	VXGH BB 3 A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItem("FootStep")
	VXGH A 0 A_JumpIfTargetInLOS("Strafing")
	VXGH CC 3 A_Chase
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	VXGH DD 3 A_Chase
	VXGH A 0 A_Jump(80,"Rush")
    TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItem("FootStep")
    Loop
  Rush:
    VXGH A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("NemesisGhoulLegZombieGhostAA")
	VXGH A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisGhoulLegZombieGhostAA")
	VXGH A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisGhoulLegendaryZombieGhostBB")
	VXGH B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisGhoulLegendaryZombieGhostBB")
	VXGH B 1 A_Chase
	TNT1 A 0 A_SpawnItem("FootStep")
    TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItemEx("NemesisGhoulLegZombieGhostCC")
	VXGH C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisGhoulLegZombieGhostCC")
	VXGH C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisGhoulLegendaryZombieGhostDD")
	VXGH D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("NemesisGhoulLegendaryZombieGhostDD")
	VXGH 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)
	VXGH AA 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	VXGH BB 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	TNT1 A 0 A_SpawnItem("FootStep")
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    VXGH CC 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	VXGH DD 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	Goto See
  Pause:
	TNT1 A 0 A_SetUserVar(user_missile,0)
	VXGH E 0 A_PlaySound("legimp/fiyabetch")
	VXGH EEEEE 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	Goto See
  Melee:
    VXGH EF 6 A_FaceTarget
    VXGH F 5 A_MeleeAttack
	Goto See
  Missile:
	VXGH EEEE 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	TNT1 A 0 A_Jump(20,"NemesisGhoulRapid","NemesisGhoulSuper","NemesisGhoulSeeker","Normal")
	VXGH 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)
	VXGH 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)
    VXGH EEEEEEEE 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
  NemesisGhoulRapidLoop:
    TNT1 A 0 A_JumpIf(user_missile == 20,"Pause")
    VXGH E 1 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	TNT1 AA 0 A_CustomMissile("NemesisZombieCannonLaser",32,0,Frandom(-1,1),0)
	VXGH 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:
    VXGH EF 8 A_FaceTarget
	VXGH F 1 A_FaceTarget
	TNT1 A 0 A_PlaySound("imp/attack")
	TNT1 A 0 A_CustomMissile("VexedNemesisImpBall",32,0,-8)
	TNT1 A 0 A_CustomMissile("VexedNemesisImpBall",32,0,-8)
	TNT1 A 0 A_CustomMissile("VexedNemesisImpBall",32,0,-8)
	TNT1 A 0 A_CustomMissile("VexedNemesisImpBall",32,0,-8)
	TNT1 A 0 A_CustomMissile("VexedNemesisImpBall",32,0,-8)
	TNT1 A 0 A_CustomMissile("VexedNemesisImpBall",32,0,-8)
	TNT1 A 0 A_CustomMissile("VexedNemesisImpBall",32,0,-8)
	TNT1 A 0 A_CustomMissile("VexedNemesisImpBall",32,0,-8)
	TNT1 A 0 A_CustomMissile("VexedNemesisImpBall",32,0,-8)
	TNT1 A 0 A_Jump(88,"NemesisGhoulSeeker")
	Goto See
  NemesisGhoulSeeker:
	VXGH EF 10 A_FaceTarget
  NemesisGhoulSeekerLoop:
    TNT1 A 0 A_JumpIf(user_missile >= 8,"Detox")
	TNT1 A 0 A_PlaySound("imp/attack")
	VXGH F 6 A_CustomMissile("VexedNemesisImpBallSeek",32,0,0)
    VXGH 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")
	VXGH E 0 A_FaceTarget
	VXGH EEEEE 2 A_SpawnItem("NemesisZombieProtection")
    TNT1 A 0 A_SetUserVar(user_missile,user_missile+1)
	Loop
  NemesisGhoulSuperLoop2:
	TNT1 A 0 A_JumpIf(user_missile >= 10,"NemesisGhoulSuperFire")
	VXGH E 0 A_FaceTarget
	VXGH FFFFF 2 A_SpawnItem("NemesisZombieProtection")
    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")
	VXGH F 0 A_CustomMissile ("NemesisImpLaserBall",28,0,-5)
	VXGH F 0 A_CustomMissile ("NemesisImpLaserBall",28,0,5)
	TNT1 A 0 A_playSound ("legimp/fiyabetch")
	TNT1 A 0 A_UnsetInvulnerable
	Goto See
  Teleport:
    VXGH A 1 A_UnSetShootable
	VXGH AAAA 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	VXGH AAAAAAAAAA 1  A_FadeOut(0.1,0)
	VXGH A 2 
	VXGH AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	VXGH AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
    VXGH A 1 A_PlayWeaponSound("boss/teleport")
	VXGH AAAA 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	VXGH AAAAAAAAAA 1 A_FadeIn(0.1)
    VXGH A 1 A_SetShootable
    Goto See
	Detox:
    TNT1 A 0 A_SetUserVar(user_missile,0)
  Pain:
	TNT1 A 0 A_Jump(75,"Protection")
	TNT1 A 0 A_Jump(25,"Protection")
  Pain2:
	TNT1 A 0 A_Jump(192,"PainMissile")
    VXGH G 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
    TNT1 A 0 A_Pain
	VXGH G 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
    Goto See
  PainMissile: 
	VXGH G 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	TNT1 A 0 A_Pain
	VXGH G 3 A_GiveInventory("NemesisGhoulLegZombieStrafingg",1)
	Goto Missile	
  Protection:
	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
	VXGH E 2 ACS_NamedExecuteAlways("NemesisZombieProtection")
	TNT1 A 0 A_SpawnItem("NemesisHellionSmokeSpawner")
	Goto See 
  Summoning:
    TNT1 A 0 A_JumpIf(user_summoning >= 3,"Pain2")
	TNT1 A 0 A_JumpIf(user_summoned == 1,"Pain2")
    VXGH FFFFFF 10 A_SetInvulnerable
    TNT1 AAAAA 0 A_CustomMissile("NemesisPhantasmSummoner",32,0,random(0,360),CMF_AIMDIRECTION)
    Goto See
  XDeath:
   Death:
    TNT1 A 0 A_StopSound(6)
	TNT1 A 0 A_ChangeFlag("BRIGHT",0)
	VXGH I 8
    VXGH J 8 A_Scream
    VXGH K 6
    VXGH L 6 A_NoBlocking
    VXGH M 1
    VXGH N -1
	Stop
	}
}
	
ACTOR NemesisGhoulLegZombieGhostAA : LegZombieGhostA
{
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "NULL")
  Fade:
    TNT1 A 1
    VXGH A 2 A_FadeOut(0.10)
    Goto Fade+1
  Toaster:
    TNT1 A 0
    Stop
    }
}

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

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

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

ACTOR NemesisGhoulLegendaryZombieGhostEE : LegZombieGhostAA
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "NULL")
  Fade:
    TNT1 A 1
    VXGH E 2 A_FadeOut(0.10)
    Goto Fade+1
    }
}

ACTOR NemesisGhoulLegendaryZombieGhostFF : LegZombieGhostAA
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "NULL")
  Fade:
    TNT1 A 1
    VXGH F 2 A_FadeOut(0.10)
    Goto Fade+1
    }
}