ACTOR VexedNemesisRailgunZombie : VexedNemesisZombie
{
//Creator: Eshkere_Jason
//Origin: Divine Infinity
//Sprite: VNRZ
//Title: "Nemesis Railgun Zombie"
Health 2250
BloodColor "Black"
DropItem "NemesisHealthBonusMax", 256, 32
DropItem "NemesisArmorBonus32", 256
DropItem "NemesisHealthBonusMax", 256, 32
DropItem "NemesisArmorBonus32", 256
DropItem "VengefulNemesisArmor", 85, 1
DropItem "LegAmmoSphere", 88, 1
DropItem "NemesisPowerShard", 35, 1
DropItem "HandGrenadeAmmo", 235, 2
DropItem "MineAmmo", 235, 2
DropItem "Backpack", 198, 1
DropItem "Armorplate", 205, 1
DropItem "Portablemedkit", 210, 1
DropItem "NLDemonAmmoBox", 200 
DropItem "NLDemonAmmo", 250 
DropItem "NemesisRuneSpawnerTier2", 60, 1
DropItem "Nemesis Rifle", 128, 1
DropItem "NemesisAmmoSphere", 128
DamageFactor 0.4
DamageFactor "PlayerNemesisPlasma", 0.0
DamageFactor "Explosion", 0.2
DamageFactor "PlayerDTRG", 0.4
DamageFactor "DTRailgun", 0.4
DamageFactor "PDTPuff", 0.4
DamageFactor "RailG", 0.3
DamageFactor "PlayerPyro", 0.1
DamageFactor "VileFires", 0.0
DamageFactor "DarkDemoEx", 0.0
DamageFactor "LegendaryZombie", 0.0
DamageFactor "PDTBFG", 0.25
DamageFactor "PDTBFGTracer", 0.25
DamageFactor "PlayerDevBall", 0.125
DamageFactor "PlayerDevBall2", 0.125
DamageFactor "PlayerDTBFGRailgunSlug", 0.125
DamageFactor "PlayerDevTracer", 0.125
DamageFactor "LegendaryPlayer", 0.0
DamageFactor "LegendaryGuruPlayer", 0.1
DamageFactor "LegendaryGuru", 0.0
DamageFactor "Legendary", 0.0
SeeSound "VexedNemesisZombie/Sight"
PainSound "VexedNemesisZombie/Pain"
DeathSound "VexedNemesisZombie/Death"
ActiveSound "VexedNemesisZombie/Active"
Obituary "%o was noscoped by a \c[w2]Vexed Nemesis Railgun Zombie\c-"
Tag "\c[w2]Vexed Nemesis Railgun Zombie\c-"
var int user_music;
var int user_protection;
var int user_protected;
States
{
  Spawn:
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	VNRZ A 10 Bright A_Look
    Loop
  See:
	TNT1 A 0 A_JumpIf(user_music == 1,3)
    TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,6806,755)
	TNT1 A 0 A_SetUserVar("user_music",1)
	VNRZ A 0 A_JumpIfTargetInLOS("Strafing")
	VNRZ AABB 3 Bright A_Chase
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
    TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	VNRZ A 0 A_JumpIfTargetInLOS("Strafing")
    VNRZ CCDD 3 Bright A_Chase
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	VNRZ A 0 A_Jump(80,"Rush")
    TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
    Loop
  Rush:
    VNRZ A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("VexedNemesisRailZombieGhost",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	VNRZ A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("VexedNemesisRailZombieGhost",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	VNRZ A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("VexedNemesisRailZombieGhost",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	VNRZ B 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("VexedNemesisRailZombieGhost",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	VNRZ B 1 Bright A_Chase
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
    TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("VexedNemesisRailZombieGhost",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	VNRZ C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("VexedNemesisRailZombieGhost",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	VNRZ C 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("VexedNemesisRailZombieGhost",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	VNRZ D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("VexedNemesisRailZombieGhost",0,0,0,0,0,0,0,SXF_CLIENTSIDE|SXF_NOCHECKPOSITION)
	VNRZ D 1 Bright A_Chase
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_Jump(84,"See")
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	Loop
  Strafing:
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	VNRZ AA 3 Bright A_GiveInventory("VexedNemesisLegZombieStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	VNRZ BB 3 Bright A_GiveInventory("VexedNemesisLegZombieStrafing",1)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    VNRZ CC 3 Bright A_GiveInventory("VexedNemesisLegZombieStrafing",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	VNRZ DD 3 Bright A_GiveInventory("VexedNemesisLegZombieStrafing",1)
	Goto See
  Missile:
	TNT1 A 0 A_SetShootable
    TNT1 A 0 A_UnsetInvulnerable
    TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_PlaySound("weapons/rgcharge")
	VNRZ EEE 2 Bright A_FaceTarget
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_PlayWeaponSound("lrailat")
	TNT1 A 0 A_CustomMissile("VexedNemesisCardinalRailLaser",30,0,0,0)
	TNT1 A 0 A_CustomMissile("VexedNemesisCardinalRailLaser",30,0,0,0)
	VNRZ F 5 Bright A_CustomRailgun(random(100,300),0,none,none,RGF_SILENT,1,0,"PlayerRailPuffBlue",0,0,0,0,0.5,0.5,"LegRailCoreTrail")
	VNRZ E 10
	Goto See
  Pain:
	TNT1 A 0 A_Jump(25,"Protection")
	TNT1 A 0 A_Jump(192,"PainMissile")
	VNRZ G 3 Bright
	VNRZ G 3 Bright A_Pain
	Goto See
  PainMissile:
	VNRZ G 3 Bright
	VNRZ G 3 Bright A_Pain
	Goto Missile	
  Protection:
	TNT1 A 0 A_JumpIf(user_protection >= 3,"Pain")
	TNT1 A 0 A_JumpIf(user_protected == 1,"Pain")
	TNT1 A 0 A_PlaySound("legendary/defense")
	TNT1 A 0 A_FaceTarget
	VNRZ E 2 Bright ACS_NamedExecuteAlways("NemesisZombieProtection",0,0,0,0)
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	Goto See
  Death:
	TNT1 A 0 A_Jump(36,"LegendarySoul")
    TNT1 A 0 A_StopSound(6)
    VNRZ H 5 A_Scream
    VNRZ I 5 A_Fall
    VNRZ J 5 A_SpawnItem("BodyCrash",0,0,0,0)
    VNRZ K 5
    VNRZ L -1
    Stop
  LegendarySoul:
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	VNRZ H 6
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	VNRZ I 6 A_Scream
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("LegSSGGuyGib",0,0,12,frandom(0.1,1.0),frandom(0.1,1.0),frandom(0.1,1.0),random(0,360),SXF_CLIENTSIDE)
	VNRZ J 6 A_Fall
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	VNRZ K 6 A_SpawnItem("BodyCrash",0,0,0,0)			
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	VNRZ L 6
	TNT1 A 0 A_SpawnItem("TrueNemesisHellionSmokeSpawner",0,0,0,0)
	VNRZ L 5
	TNT1 A 0 A_PlaySoundEx("brain/spit","Voice",0,2)
	VNRZ LLLLLLLLLLLLLLLLL 2 A_GiveInventory("NemesisSoulEvent",1)
	VNRZ LLLLLLLLLLLLLLLLL 2 A_GiveInventory("NemesisSoulEvent",1)
	VNRZ LLLLLLLLLLLLLLLLL 2 A_GiveInventory("NemesisSoulEvent",1)
	TNT1 A 0 A_ChangeFlag("BRIGHT",0)
	TNT1 A 0 A_SpawnItemEx("VexedNemesisSoul",0,0,16,0,0,0,0,SXF_NOCHECKPOSITION,0)
	TNT1 A 0 A_SpawnItemEx("TeleportFog",0,0,16,0,0,0,0,32)
	VNRZ L 525
	VNRZ L 5 A_FadeOut(0.1,1)
	Wait
	}
}

ACTOR VexedNemesisRailZombieGhost
{
Scale 1.1
Radius 20
Height 56
Speed 0
Alpha 0.7
PROJECTILE
RENDERSTYLE Translucent
+CLIENTSIDEONLY
+NOTIMEFREEZE
+NOINTERACTION
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
    VNRZ A 2 A_FadeOut(0.10)
    Wait
    }
}