ACTOR Nifara
{
//Creator: ElAnexo Team
//Origin: Nexus Infinity
//Sprite: DJBF
//Title: "Nifara"
Health 6250
Radius  30 
Height 110
Mass 0x7FFFFFFF
Speed 5
PainChance 15
Scale 0.8
Monster
Obituary "%o was vanished by the Strong Fatality God Nifara!"
Species "Cybers"
DamageFactor "PlayerFireSword", 0.2
DamageFactor "PlayerDTRG", 0.4
DamageFactor "PlayerBHole", 0.1
DamageFactor "CustomSpray", 0.2
DamageFactor "BFG9500Ball", 0.1
DamageFactor "PlayerPyro", 0.2
DamageFactor "Extreme", 0.1
DamageFactor "UltimateLegendary", 0.1
DamageFactor "HellComet", 0.0
DamageFactor "T3rm", 0.0
DamageFactor "PDTBFG", 0.1
DamageFactor "PDTBFGTracer", 0.1
DamageFactor "PlayerRailPuff", 0.7
DamageFactor "PDTPuff", 0.5
DamageFactor "Ice", 0.4
DamageFactor "FreezerBurn", 0.5
DamageFactor "DemolisherEx", 0.0
DamageFactor "DarkDemoEx", 0.0
DamageFactor "CerChainguns", 0.0	
DamageFactor "CerEnergyBall", 0.0
DamageFactor "Cyber10K", 0.0
DamageFactor "C0mm4nder", 0.0
DamageFactor "HFCyb3r", 0.0
DamageFactor "Legendary", 0.5
DamageFactor "Legendary1", 0.5
DamageFactor "LegendaryGuru", 0.3
DamageFactor "LegendaryGuruPlayer", 0.3
DamageFactor "LegendaryPlayer", 0.3
DamageFactor "BFG10K", 0.4
DamageFactor "BFGSplash", 0.4
DamageFactor "BFGSpray", 0.4
DamageFactor "Railg", 0.2
DamageFactor "PlayerDevBall", 0.3
DamageFactor "PlayerDTBFGRailgunSlug", 0.4
DamageFactor "PlayerDevTracer", 0.5
DamageFactor "SuperWeapon", 0.6
DamageFactor "DBFG10K2", 0.2
DamageFactor "PlayerDBFG10K2", 0.5
DamageFactor "DBFG2", 0.6
DamageFactor "PlayerDBFG2", 0.2
damagefactor 0.55
SeeSound "Tyrone/Sight" 
PainSound "" 
DeathSound "TYRO/death"
AttackSound ""
ActiveSound "Tyrone/Active"
PainChance "BFG9500Ball", 40
PainChance "PlayerDevBall", 100
PainChance "BFG10K", 100
PainChance "PDTBFG", 100
PainChance "PlayerDBFG10K2", 100
PainChance "Legendary", 100 // 100
PainChance "LegendaryPlayer", 100 // 100
PainChance "LegendaryGuru", 256
PainChance "LegendaryGuruPlayer", 256
PainChance "PlayerDBFG2", 256
MinMissileChance 1
Tag "\c[l5]Nifara\c-"
dropitem "LegendaryRune", 256
dropitem "LegendaryRune", 256
DropItem "LegGreaterDemonicEnergy" 200 
DropItem "LegGreaterDemonicEnergy" 200 
DropItem "LegDemonicEnergy" 250 
DropItem "LegDemonicEnergy" 250 
Dropitem "PainLordSoul", 200
Dropitem "BLG", 80, 1
dropitem "Nemesis Rifle", 48, 1
dropitem "Nemesis Assault Shotgun", 48, 1
dropitem "Nemesis Sawed-Off Shotgun", 48, 1
dropitem "Enraged Legendary Light Machine Gun", 48, 1
dropitem "D-BFG", 48, 1
dropitem "Stingray", 24, 1
dropitem "LegendaryBossLifeEssence", 256
dropitem "LegendaryLifeEssence", 256
dropitem "LegendaryBossArmorBonusMax", 256
dropitem "LegendaryArmorBonusMax", 256
dropitem "LegendaryRune", 80
dropitem "ElNexusRuneSpawnerTier1", 95, 1
Dropitem "Randomcorrupteditem", 256, 1
DropItem "WeaponEnhancerModuleGiver" 256
+NOTIMEFREEZE
+MISSILEMORE
+FLOORCLIP
+NOTARGET
+FireResist
+NORADIUSDMG
+NOICEDEATH
+BOSS
+BOSSDEATH
+MISSILEEVENMORE
+CANTSEEK
+NOFEAR
+DONTGIB
+DONTSPLASH
+LOOKALLAROUND
+NOTELEFRAG
+DONTMORPH
+QUICKTORETALIATE
//+FULLVOLACTIVE
var int user_music;
var int user_bfg10k;
States 
    { 
     Spawn: 
       DJBF A 5 A_Look 
	   DJBF A 5 A_SpawnItemEx("DJBHellionSpawner") 
       Loop 
     See:
   	   TNT1 A 0 A_JumpIf(user_music == 1,3)
	   TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,2051)
	   TNT1 A 0 A_SetUserVar("user_music",1)
       TNT1 A 0 A_UnSetInvulnerable
       TNT1 A 0 A_Jump(100,"Rush")
	   TNT1 A 0 A_SpawnItemEx("DJBHellionSpawner") 
       DJBF A 0 A_SpawnItem("HoofStep",0,0,0,0)
       DJBF AA 3 A_Chase
	   DJBF A 0 A_JumpIfTargetInLOS("Strafing")
	   TNT1 A 0 A_SpawnItemEx("DJBHellionSpawner")
	   DJBF BB 3 A_Chase
	   DJBF B 0 A_JumpIfTargetInLOS("Strafing")
	   TNT1 A 0 A_SpawnItemEx("DJBHellionSpawner")
       DJBF C 0 A_SpawnItem("HoofStep",0,0,0,0)
       DJBF CC 3 A_Chase
	   DJBF C 0 A_JumpIfTargetInLOS("Strafing")
	   TNT1 A 0 A_SpawnItemEx("DJBHellionSpawner") 
	   DJBF DD 3 A_Chase
	   DJBF D 0 A_JumpIfTargetInLOS("Strafing")
       TNT1 A 0 A_Jump(40,"Teleport")
	   Loop
     Rush:
       DJBF A 0 A_SpawnItem("HoofStep",0,0,0,0)
       DJBF AA 0 A_Chase
	   DJBF A 0 A_JumpIfTargetInLOS("Strafing")
       DJBF A 2 A_SpawnItemEx("DJBGhost",0,0,0,0,0,0,0,128)
	   TNT1 A 0 A_SpawnItemEx("DJBHellionSpawner") 
       DJBF AA 0 A_Chase
	   DJBF A 0 A_JumpIfTargetInLOS("Strafing")
       DJBF A 2 A_SpawnItemEx("DJBGhost",0,0,0,0,0,0,0,128)
	   TNT1 A 0 A_SpawnItemEx("DJBHellionSpawner")
       DJBF AA 0 A_Chase
	   DJBF B 0 A_JumpIfTargetInLOS("Strafing")
       DJBF B 2 A_SpawnItemEx("DJBGhost",0,0,0,0,0,0,0,128)
	   TNT1 A 0 A_SpawnItemEx("DJBHellionSpawner")
       DJBF AA 0 A_Chase
	   DJBF B 0 A_JumpIfTargetInLOS("Strafing")
       DJBF B 2 A_SpawnItemEx("DJBGhost",0,0,0,0,0,0,0,128)
	   TNT1 A 0 A_SpawnItemEx("DJBHellionSpawner") 
       DJBF A 0 A_SpawnItem("HoofStep",0,0,0,0)
       DJBF AA 0 A_Chase
	   DJBF C 0 A_JumpIfTargetInLOS("Strafing")
       DJBF C 2 A_SpawnItemEx("DJBGhost",0,0,0,0,0,0,0,128)
	   TNT1 A 0 A_SpawnItemEx("DJBHellionSpawner") 
       DJBF AA 0 A_Chase
	   DJBF C 0 A_JumpIfTargetInLOS("Strafing")
       DJBF C 2 A_SpawnItemEx("DJBGhost",0,0,0,0,0,0,0,128)
	   TNT1 A 0 A_SpawnItemEx("DJBHellionSpawner") 
       DJBF AA 0 A_Chase
	   DJBF D 0 A_JumpIfTargetInLOS("Strafing")
       DJBF D 2 A_SpawnItemEx("DJBGhost",0,0,0,0,0,0,0,128)
	   TNT1 A 0 A_SpawnItemEx("DJBHellionSpawner")
       DJBF AA 0 A_Chase
	   DJBF D 0 A_JumpIfTargetInLOS("Strafing")
       DJBF D 2 A_SpawnItemEx("DJBGhost",0,0,0,0,0,0,0,128)
	   TNT1 A 0 A_SpawnItemEx("DJBHellionSpawner")
       TNT1 A 0 A_Jump(38,"Teleport")
       TNT1 A 0 A_Jump(75,"See")   
       Loop
    Teleport:
       DJBF A 1 A_UnSetShootable
       DJBF AAAAAAAAAAAA 0 A_SpawnItemEx("DJBHellionSpawner")
       DJBF AAAAAAAAAAA 1 A_FadeOut(0.1,0)
       DJBF AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
       DJBF AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
       DJBF A 1 A_PlayWeaponSound("boss/teleport")
       DJBF AAAAAAAAAAAA 0 A_SpawnItemEx("DJBHellionSpawner")
       DJBF AAAAAAAAAAA 1 A_FadeIn(0.1)
       DJBF A 1 A_SetShootable
       Goto Normal
    Strafing:
	   TNT1 A 0 A_SpawnItem("HoofStep",0,0,0,0)
	   TNT1 A 0 A_Chase("","DemonTech",CHF_DONTMOVE)
	   DJBF AA 3 Bright A_GiveInventory("DJBStrafing",1)
	   TNT1 A 0 A_Chase("","DemonTech",CHF_DONTMOVE)
	   DJBF BB 3 Bright A_GiveInventory("DJBStrafing",1)
	   TNT1 A 0 A_SpawnItem("HoofStep",0,0,0,0)
	   TNT1 A 0 A_Chase("","DemonTech",CHF_DONTMOVE)
       DJBF CC 3 Bright A_GiveInventory("DJBStrafing",1)	
	   TNT1 A 0 A_Chase("","DemonTech",CHF_DONTMOVE)
	   DJBF DD 3 Bright A_GiveInventory("DJBStrafing",1)
       TNT1 A 0 A_Jump(10,"Missile")
	   TNT1 A 0 A_Jump(40,"Teleport")
	   Goto See
    Missile:
	   TNT1 A 0 A_UnSetInvulnerable
	   TNT1 A 0 A_SetTranslucent(1)
	   TNT1 A 0 A_Jump(220,"BFG9K","BFG10K","DTBFG")
       TNT1 A 0 A_JumpIfTargetInLOS("UberHexaSG",90,JLOSF_DEADNOJUMP|JLOSF_TARGETLOS,600,0)
    Normal:   
	   DJBF E 2 A_FaceTarget
	   DJBF E 2 
	   DJBF E 0 A_CustomMissile("LegThrownGrenade",32,Random (32,-32),0,2,4)
	   DJBF E 0 A_CustomMissile("LegThrownGrenade",32,Random (32,-32),0,2,4)
	   DJBF E 5 Bright A_CustomMissile("LegThrownGrenade",32,Random (32,-32),0,2,4)
	   DJBF E 0 A_CustomMissile("LACThrownMine",32,Random (32,-32),0,2,4)
	   DJBF E 0 A_CustomMissile("LACThrownMine",32,Random (32,-32),0,2,4)
	   DJBF E 5 Bright A_CustomMissile("LACThrownMine",32,Random (32,-32),0,2,4)
	   TNT1 A 0 A_StopSoundEx("Weapon")
	   Goto See
	Pause:
	   DJBF E 0 A_PlaySound("weapons/demontechsteam")
	   DJBF EEEEE 3 Bright A_GiveInventory("DJBStrafing",1)
	   Goto See
	DemonTech:
	   TNT1 A 0 A_SetShootable
       TNT1 A 0 A_UnsetInvulnerable
       TNT1 A 0 A_SetTranslucent(1)
	   DJBF EEE 3 Bright A_GiveInventory("DJBStrafing",1)
	   TNT1 A 0 A_GiveInventory("DJBStrafing",1)
	   TNT1 A 0 A_CustomMissile("BLUEDemonTechProjectile",32,0,random(-2,2),0)
	   DJBF F 3 Bright A_PlaySoundEx("weapons/DemonTechRifle","Weapon")
	   TNT1 A 0 A_Jump(24,"Pause")
	   TNT1 A 0 A_SpidRefire
       TNT1 A 0 A_PlayWeaponSound("BlueDTRFire")
	   Goto DemonTech+5
	UberHexaSG:
	   DJBF E 5 A_FaceTarget
       DJBF EEEEEEEEE 0 A_SpawnItemEx("SSGShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	   TNT1 A 0 A_PlaySound("weapons/hsgfire")
	   TNT1 AAAAAAAAAAAA 0 A_CustomMissile("MonsterTracer2",48,-17,Random(6,-6),0)
       DJBF F 2 Bright A_CustomBulletAttack(15.4,10.6,78,Random(1,4)*3,"BulletPuff")
	   TNT1 A 0 A_StopSoundEx("Weapon")	
	   TNT1 A 0 A_Jump(15,"See","Missile")
       TNT1 A 0 A_SpidRefire
	   Loop  
	BFG9K:
	   TNT1 A 0 A_PlaySound("weapons/bfgf")
	   TNT1 A 0 A_PlaySound("Tyrone/Attack", CHAN_VOICE, 1.0, False, ATTN_NONE)
	   DJBF EEEEEEEEEEEEFFFF 2 A_FaceTarget
       DJBF FFFFF 2 Bright A_CustomMissile("DJBBFG9500Ball",48,15,random(-4,4))
       DJBF EE 4 A_FaceTarget   
	   TNT1 A 0 A_Jump(128,"BFG10K","DTBFG")
       Goto See
	BFG10K:
	   TNT1 A 0 A_Changeflag(reflective,1)
	   TNT1 A 0 A_PlaySound("weapons/charge15k")
	   TNT1 A 0 A_PlaySound("Tyrone/GreatAttack", CHAN_VOICE, 1.0, False, ATTN_NONE)
	   TNT1 A 0 A_SetUserVar("user_bfg10k", 0)
       DJBF AAAAAAAAA 4 A_FaceTarget
	BFG10KLoop:
	   TNT1 A 0 A_JumpIf(user_bfg10k > 40,"BFG10KEnd")
	   TNT1 A 0 A_SetUserVar("user_bfg10k",user_bfg10k+1)
	   TNT1 A 0 A_SpawnItemEx("DJBHellionSpawner") 
	   DJBF E 2 A_FaceTarget
	   TNT1 A 0 A_PlaySound("weapons/bfg15kfire")
       DJBF F 1 Bright A_CustomMissile("DJB10KProjectile",48,-15,random(-4,4))
	   Loop
	BFG10KEnd:
	   DJBF E 3 Bright A_PlaySound("weapons/bfg15kcooldown",CHAN_AUTO)
	   DJBF EEEEEEEE 3 A_FaceTarget	   
       DJBF EEE 4 A_FaceTarget
	   TNT1 A 0 A_Changeflag(reflective,0)
	   TNT1 A 0 A_Jump(128,"DTBFG")
       Goto See		   
	DTBFG:
	   TNT1 A 0 A_PlaySound("Cardinal/9k")
	   TNT1 A 0 A_PlaySound("Tyrone/Attack", CHAN_VOICE, 1.0, False, ATTN_NONE)
       DJBF EEEEEEEEEEEEFF 3 A_Facetarget
       DJBF FFF 4 Bright A_CustomMissile("DJBDTBFG10KBall",48,15,random(-10,10))
       DJBF EEE 4 A_FaceTarget
	   goto See
    Pain:
       TNT1 A 0 A_PlaySound("Tyrone/Pain", CHAN_VOICE, 1.0, False, ATTN_NONE)
	   TNT1 A 0 A_Jump(60,"Healing")
	   TNT1 A 0 A_Jump(128,"PainMissile")
       DJBF G 3 	
       DJBF G 3 A_Pain
       Goto See 
    PainMissile:
       DJBF G 3 	
       DJBF G 3 A_Pain
       Goto Missile	   
    Healing:
	   //TNT1 A 0 A_PlaySound("TYROACT5", CHAN_AUTO, 1.0, False, ATTN_NONE)
	   TNT1 A 0 A_SetInvulnerable
	   DJBF G 0 A_Pain
	   DJBF G 2 HealThing(550)
       DJBF GGGGGGGGGGGGGGGGGG 2 Bright A_SpawnItemEx("DJBHellionSpawner")
	   DJBF GGGGGGGGGGGGGGGGGGGG 2 Bright A_SpawnItemEx("DJBHellionSpawner")
	   TNT1 A 0 A_UnSetInvulnerable
	   DJBF l 2
       Goto See
    Pain.Legendary:
    Pain.LegendaryPlayer:
    Pain.LegendaryGuruPlayer:
    Pain.PlayerDevBall:
    Pain.PDTBFG:
    Pain.BFG10K:
    Pain.BFG9500Ball:
    Pain.PlayerDBFG10K2:
    Pain.PlayerDBFG2:
       TNT1 A 0 A_Jump(200, "Teleport")
       Goto PainMissile
    Death:
      //TNT1 A 0 A_PlaySound("TYRO/death", CHAN_AUTO, 1.0, False, ATTN_NONE)
      DJBF H 4 A_Scream
      DJBF I 6 A_Fall
      DJBF J 6
      DJBF K 1
      DJBF L 5 A_BossDeath
      DJBF L -1 Bright
      Stop
   }
}

ACTOR BLUEDemonTechProjectile //Fix this
{
   Height 4
   Radius 4
   Speed 50
   Damage 8
   Scale 0.06
   PROJECTILE
   +FORCERADIUSDMG
   Species "Cybers"
   Damagetype "Legendary"
   DeathSound "weapons/demontechex"
   Decal DTRScorch
   States
   {
   Spawn:
	  TNT1 A 0
	  TNT1 A 0 A_Jump(128,"Spawn2")
   Normal:
   	  TNT1 A 0 A_Jump(128,"NormalFX")
      BDTR A 1 Bright A_SpawnItemEx("BLUEDemonTechTrail",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
      Loop
   NormalFX:
	  //TNT1 A 0 A_SpawnItemEx("DTechLightningBlue",Random(1,-1),Random(1,-1),Random(1,-1),0,0,0,0,128)
      BDTR A 1 Bright A_SpawnItemEx("BLUEDemonTechTrail",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
	  //TNT1 A 0 A_SpawnItemEx("DTechLightningBlue",Random(1,-1),Random(1,-1),Random(1,-1),0,0,0,0,128)
      BDTR A 1 Bright A_SpawnItemEx("BLUEDemonTechTrail",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
      Goto Normal
   Spawn2:
	  TNT1 A 0 A_Jump(128,"Spawn2FX")
      BDTR A 1 Bright A_SpawnItemEx("BLUEDemonTechTrail2",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
      Loop
   Spawn2FX:
	  //TNT1 A 0 A_SpawnItemEx("DTechLightningBlue",Random(1,-1),Random(1,-1),Random(1,-1),0,0,0,0,128)
      BDTR A 1 Bright A_SpawnItemEx("BLUEDemonTechTrail",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
	  //TNT1 A 0 A_SpawnItemEx("DTechLightningBlue",Random(1,-1),Random(1,-1),Random(1,-1),0,0,0,0,128)
      BDTR A 1 Bright A_SpawnItemEx("BLUEDemonTechTrail",Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-1,1),Random(-20,20),128)
      Goto Spawn2
   Death:
   	  TNT1 A 0
	  //TNT1 A 0 A_SpawnItemEx("GreenParticleSpawnerDT", 0, 0, 0, 0, 0, 0, 0, 128)
	  TNT1 A 0 A_SpawnItemEx("BLUEDemonTechEx",0,0,0,0,0,0,0,128,0)
	  TNT1 AAA 0 A_CustomMissile("Kaboom6", 0, 0, random(0,360), 2, random(0,360))
	  TNT1 AAA 0 A_CustomMissile("SmokeFX4", 0, 0, random(0,360), 2, random(0,360))
	  TNT1 A 1 Bright A_Explode(20,64)
      Stop
	  }
}

ACTOR BLUEDemonTechEx
{
RenderStyle Add
Alpha 0.75
Scale 0.5
PROJECTILE
+NOCLIP
States
{
Spawn:
BDTH ABCDEFGH 2 Bright A_FadeOut(0.1)
Stop
}
}

ACTOR BLUEDemonTechTrail : BFG9500Trail
{
Scale 0.04
Alpha 0.65
States
{
Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
	TNT1 A 2
    BDTI AAAAAABBBBBBBB 1 Bright A_FadeOut(0.05)
    Stop
    }
}

ACTOR BlueDemonTechTrail2 : DemonTechTrail
{
States
{
Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
	TNT1 A 2
    BDTI AAAAAACCCCCCCC 1 Bright A_FadeOut(0.05)
    Stop
    }
}

ACTOR DJBGhost
{
Scale 1.2
RENDERSTYLE Translucent
Alpha 0.75
+NOGRAVITY
+CLIENTSIDEONLY
+DONTSPLASH
+NOINTERACTION
+NOCLIP
States
{
Spawn:
    DJBF A 2 A_FadeOut(0.18)
    Loop
    }
}

Actor DJBBFG9500Ball : SentientBFG9500Ball
{
-THRUSPECIES
+DontReflect
Species "Cybers"
DamageType "DJB"
States
{
Spawn:
	BLU1 AAABBB 1 Bright A_SpawnItemEx("ProjectileTrailParticleBlue",Random(-12,12),Random(-12,12),Random(-12,12),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    Loop
Death:
	TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("BFGShockwaveBlue", 0, 0, 0, 0, 0, 0, 0, 128)
    TNT1 AAAAAA 0 A_CustomMissile("KaboomBLUE", 0, 0, random(0,360), 2, random(0,360))
    BLU2 AB 8 Bright A_SpawnItemEx("BlueParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
    BLU2 C 8 Bright //A_BFGSpray("CustomSprayBlue")
    BLU2 DEF 8 Bright
    Stop    
    }

}

ACTOR DJBHellionSpawner : LHellionSmokeSpawner{
States
{
Spawn:
	TNT1 A 0
	TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
	TNT1 AAAAA 0 A_SpawnItemEx("DJBHellionSmoke",random(48,-48),random(48,-48),random(0,48),0,0,random(2,8),0,128,0) 	
	TNT1 A 1 A_SpawnItemEx("DJBHellionSmoke",random(48,-48),random(48,-48),random(0,48),0,0,random(2,8),0,128,0) 
    Stop  
    }
}

ACTOR DJB10KProjectile : 10KProjectile
{
   Height 1
   Radius 1
   Speed 200
   Scale 0.15
   RenderStyle Add
   Alpha 0.85
   PROJECTILE
   Decal BFG15KLightningBlue
   +NOEXTREMEDEATH
   +THRUSPECIES
   Species "Cyber"
   DamageType "GeneralTracer"
   DeathSound "weapons/bfg95explode"
   States
   {
   Spawn:
      BRAC A 1 Bright
      Loop
   Death:
   XDeath:  
      TNT1 A 0
      TNT1 A 1 A_SpawnItem("DJB10KEx")
      Stop
	  }
}

ACTOR DJB10KEx : Player10KEx
{
  Radius 11
  Height 8
  Damage 140
  Decal BFG15KLightningBlue
  +NOBLOCKMAP
  +NOGRAVITY
  +NOTELEPORT 
  +FORCERADIUSDMG
  DamageType "GeneralTracer"
  Species "Cyber"
  Renderstyle Add
  Alpha 0.75
  Scale 0.85
  States
  {
  Spawn:
    TNT1 A 0
	TNT1 A 0 A_SpawnItemEx("BFGShockwaveBlue", 0, 0, 0, 0, 0, 0, 0, 128)
	TNT1 AA 0 A_SpawnItemEx("BlueParticleSpawner", 0, 0, 0, 0, 0, 0, 0, 128)
    TNT1 AAAA 0 A_CustomMissile("KaboomBlue2", 0, 0, random(0,360), 2, random(0,360))
    BLU2 A 4 Bright A_Detonate
    BLU2 BCDEF 4 Bright
    Stop
  }
}

ACTOR DJBDTBFG10KBall : SentientDTBFG10KBall //Fix this
{
DamageType "SoapOpera"
Obituary ""  
States
{
Spawn:
    TNT1 A 0
	TNT1 A 0 A_Jump(128,"DTBFGSFX")
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_PlaySoundEx("weapons/dtech10kball","Voice",1)
    TNT1 A 0 A_SpawnItemEx("BFGTrailParticleBlue",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    DBDT A 1 Bright A_SpawnItemEx("DJBDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
    TNT1 A 0 A_SpawnItemEx("BFGTrailParticleBlue",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    DBDT B 1 Bright A_SpawnItemEx("DJBDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
    TNT1 A 0 A_SpawnItemEx("BFGTrailParticleBlue",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    DBDT C 1 Bright A_SpawnItemEx("DJBDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
    TNT1 A 0 A_SpawnItemEx("BFGTrailParticleBlue",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    DBDT D 1 Bright A_SpawnItemEx("DJBDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
    Loop
Attack:
	TNT1 A 0
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_RearrangePointers(AAPTR_MASTER, AAPTR_DEFAULT, AAPTR_DEFAULT)
	TNT1 A 1 Bright A_CustomRailgun(random(2,8),0,None,"80 00 FF",RGF_SILENT|RGF_FULLBRIGHT,0,2,"DJBDTBFG10KBall")
	Goto Death
DTBFGSFX:
    TNT1 A 0 A_AlertMonsters
    TNT1 A 0 A_PlaySoundEx("weapons/dtech10kball","Voice",1)
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningBlue",Random(6,-6),Random(6,-6),Random(16,8),0,0,0,0,128)
    TNT1 A 0 A_SpawnItemEx("BFGTrailParticleBlue",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    DBDT A 1 Bright A_SpawnItemEx("DJBDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningBlue2",Random(6,-6),Random(6,-6),Random(16,8),0,0,0,0,128)
    TNT1 A 0 A_SpawnItemEx("BFGTrailParticleBlue",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    DBDT B 1 Bright A_SpawnItemEx("DJBDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningBlue",Random(6,-6),Random(6,-6),Random(16,8),0,0,0,0,128)
    TNT1 A 0 A_SpawnItemEx("BFGTrailParticleBlue",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    DBDT C 1 Bright A_SpawnItemEx("DJBDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningBlue2",Random(6,-6),Random(6,-6),Random(16,8),0,0,0,0,128)
    TNT1 A 0 A_SpawnItemEx("BFGTrailParticleBlue",Random(-12,12),Random(-12,12),Random(12,22),Random(-2,2),Random(-2,2),Random(-2,2),Random(-20,20),128)
    DBDT D 1 Bright A_SpawnItemEx("DJBDTBFGProjectileAttack",0,0,0,0,0,0,0,SXF_SETMASTER)
    Goto Spawn   
Death:
    TNT1 A 0
	TNT1 A 0 A_SetTranslucent(0.75,1)
	TNT1 A 0 Radius_Quake(5,60,0,10,0)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,0,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,10,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,20,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,30,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,40,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,50,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,60,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,70,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,80,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,90,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,100,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,110,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,120,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,130,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,140,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,150,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,160,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,170,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,180,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,190,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,200,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,210,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,220,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,230,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,240,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,250,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,260,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,270,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,280,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,290,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,300,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,310,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,320,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,330,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,340,CMF_TRACKOWNER)
	TNT1 A 0 A_CustomMissile("DTBFG10KTracerDJB",0,0,350,CMF_TRACKOWNER)
	TNT1 A 0 A_SpawnItemEx("DTBFGLightningBlueSpawner", 0, 0, 15, 0, 0, 0, 0, 128)	
	DBDT ABCD 6 Bright A_SpawnItemEx("DTech10KShockwaveBlue", 0, 0, 15, 0, 0, 0, 0, 128)
	TNT1 A 0 A_Explode(480,240)
	TNT1 A 0 A_StopSoundEx("Voice")
	TNT1 A 0 Radius_Quake(15,20,0,20,0)
	TNT1 A 0 A_PlaySound("weapons/dtech10kexplode")
	TNT1 A 0 A_SpawnItemEx("DTech10KShockwaveBlue1", 0, 0, 15, 0, 0, 0, 0, 128)
    TNT1 A 20 Bright A_SpawnItem("TLegCybDTBFGEx",0,-10)
    Stop  
    }
}

ACTOR DTBFG10KTracerDJB : TLegCybDTBFGTracer
{
   Species "Cybers"
   DamageType "Cyber10K"
}

ACTOR DJBDTBFGRailgunSlug : TLegCybDTBFGTracer
{
Species "Cybers"
DamageType "CDTBFG"
}

ACTOR DJBDTBFGProjectileAttack
{
PROJECTILE
+LOOKALLAROUND
+ISMONSTER
+QUICKTORETALIATE
+NOTARGET
+FRIENDLY
+NOCLIP
Obituary ""
MissileType "PlayerDTBFGRailgunSlug"
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_MissileAttack
	TNT1 A 1 A_CustomRailgun(-1,0,NONE,"Blue",1,1,2)
	Goto Death	
Death:
	TNT1 A 1
	Stop
	}
}

Actor DJBStrafing : CustomInventory
{
  +INVENTORY.QUIET
  +INVENTORY.UNDROPPABLE
  +INVENTORY.ALWAYSPICKUP
  +INVENTORY.AUTOACTIVATE       
  +COUNTITEM
  Inventory.Amount 1
  Inventory.MaxAmount 0
  +NOTIMEFREEZE
  States
  {
  Pickup:
    NULL A 1 
	NULL A 1 A_SpawnItem("DJBHellionSpawner",0,0,0,0)
	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 DJBHellionSmoke
{
+MISSILE
+DONTSPLASH
+NOBLOCKMAP
+NOGRAVITY
+NOTELEPORT
+FORCEXYBILLBOARD
+THRUACTORS
+NOTIMEFREEZE
Scale 0.4
RenderStyle Normal
States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
    BLUM ABCDEFGHIJKL 2 Bright A_FadeOut
    Stop
  Toaster:
    TNT1 A 0
    Stop
  }
}

ACTOR DJBHellionSmokeSpawner : RedParticleSpawner
{
  +NOTIMEFREEZE
  States
  {
  Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
    TNT1 AAA 0 A_SpawnItemEx("DJBHellionSmoke",random(12,-12),random(12,-12),random(12,64),0,0,random(1,3),0,128,0)
    TNT1 A 1
    Stop
  Toaster:
    TNT1 A 0
	Stop		
  }
}