actor LegendaryDarko
{
Monster
Health 5500
Height 64
Radius 32
Mass 5000
Speed 8
PainChance 30
PainChance "Explosion", 100
PainChance "Mine", 100
PainChance "NuclearFire", 100
Species "SS"
Damagetype "SS"
DamageFactor "SS", 0.0
DamageFactor "Extreme", 0.0
DamageFactor "Legendary", 0.0
DamageFactor "LegendaryGuru", 0.0
DamageFactor "LegendaryGuruPlayer", 0.3
DamageFactor "LegendaryPlayer", 0.3
DamageFactor "Legendary1", 0.0
DamageFactor "PDTBFG", 0.25
DamageFactor "PDTBFGTracer", 0.25
DamageFactor "PlayerDevBall", 0.025
DamageFactor "PlayerDevBall2", 0.025
DamageFactor "PlayerDTBFGRailgunSlug", 0.025
DamageFactor "PlayerDevTracer", 0.025
DamageFactor "DBFG10K2", 0.65
DamageFactor "PlayerDBFG10K2", 0.65
DamageFactor "PlayerDTRG", 0.5
DamageFactor "DBFG2", 0.65
DamageFactor "PlayerDBFG2", 0.65
DamageFactor 0.65
DropItem "PortableMedCell", 100, 1
DropItem "PortableMedCell", 100, 1
DropItem "PortableMedCellPack", 50, 1
DropItem "Portablemedkit" 200 1
DropItem "StimKit", 200, 1
DropItem "HealthFlask", 200, 6
DropItem "ArmorPlate", 160
DropItem "LegendaryArmor" 256 1
DropItem "ClipBox", 180
DropItem "ExplosiveRifle", 120 1
DropItem "HandGrenadeAmmo", 200, 1
DropItem "MineAmmo", 200, 1
DropItem "AmmoPack", 160, 1
DropItem "Backpack" 200, 1
DropItem "LegendarySyringe", 256, 1
DropItem "RadarItem" 50, 1
DropItem "LDemonAmmoBox" 200 
DropItem "LDemonAmmo" 250 
DropItem "Legendary Plasmatic Rifle" 170 1
SeeSound "Darko/Sight"
ActiveSound "Darko/Active"
PainSound "Darko/Pain"
DeathSound "Darko/Death"
Obituary "%o was blown appart by Legendary Darko."
Tag "\c[z3]Legendary Darko\c-"
+NOTIMEFREEZE
+BOSS
+BOSSDEATH
+FLOORCLIP
+MISSILEMORE
+MISSILEEVENMORE
+QUICKTORETALIATE
+NOICEDEATH
+NODROPOFF
+DONTGIB
+NOTARGET
+NORADIUSDMG
+DONTHARMSPECIES
+NOFEAR
+LOOKALLAROUND
var int user_music;
var int user_BeaconUsed;
var int user_BeaconUsed2;
States
  {
  Spawn:
    LARO A 10 A_Look
	TNT1 A 0 A_SpawnItemEx("LHellionSmokeSpawner")
    Loop
  See:
    TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("InfinityMusic",0,1823,1005)
	TNT1 A 0 A_SetUserVar("user_music",1)
	TNT1 A 0 A_JumpIf(user_BeaconUsed == 1,2)
    TNT1 A 0 A_JumpIfHealthLower(4000, "Beacon")
	TNT1 A 0 A_JumpIf(user_BeaconUsed2 == 1,2)
    TNT1 A 0 A_JumpIfHealthLower(2000, "Beacon")
    TNT1 A 0 A_SpawnItemEx("LHellionSmokeSpawner")
    TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)
    LARO AAAABBBB 3 A_Chase
	TNT1 A 0 A_SpawnItemEx("LHellionSmokeSpawner")
    TNT1 A 0 A_SpawnItem("FootStep",0,0,0,0)		
    LARO CCCCDDDD 3 A_Chase  
	TNT1 A 0 A_SpawnItemEx("LHellionSmokeSpawner")
	//TNT1 A 0 A_Jump(20,"Teleport")
	TNT1 A 0 A_Jump(80,"Rush")
    Loop
  Rush:
	TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_SpawnItemEx("LegDarkoGhost")
	LARO A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("LegDarkoGhost")
	LARO B 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("LegDarkoGhost")
	LARO A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("LegDarkoGhost")
	LARO B 1 Bright A_Chase  
	TNT1 A 0 A_SpawnItemEx("LegDarkoGhost")
	LARO A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("LegDarkoGhost")
	LARO B 1 Bright A_Chase 
	TNT1 A 0 A_SpawnItemEx("LegDarkoGhost")
	LARO A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("LegDarkoGhost")
	LARO B 1 Bright A_Chase  
	TNT1 A 0 A_SpawnItemEx("LegDarkoGhost")
	LARO A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("LegDarkoGhost")
	LARO B 1 Bright A_Chase  
	TNT1 A 0 A_SpawnItemEx("LegDarkoGhost")
	LARO A 1 Bright A_Chase
	TNT1 A 0 A_SpawnItemEx("LegDarkoGhost")
	LARO B 1 Bright A_Chase  
	TNT1 A 0 A_Jump(70,"See")
	Loop
  Missile:
	TNT1 A 0 A_JumpIfCloser(420,"SpreadFire")
	TNT1 A 0 A_Jump(55,"Rockets")
    Goto Normal
  Normal:
	LARO E 8 A_FaceTarget
	TNT1 A 0 A_PlaySound("PulseNail/fire")
	LARO F 3 Bright A_CustomMissile("LegDarkoExplosiveTracer",32,12,random(-1,1))
	LARO F 3 Bright A_CustomMissile("LegDarkoExplosiveTracer",32,12,random(-1,1))
	LARO F 3 Bright A_CustomMissile("LegDarkoExplosiveTracer",32,12,random(-1,1))
	LARO F 3 Bright A_CustomMissile("LegDarkoExplosiveTracer",32,12,random(-1,1))
	LARO F 3 Bright A_CustomMissile("LegDarkoExplosiveTracer",32,12,random(-1,1))
	TNT1 A 0 A_FaceTarget
	TNT1 A 0 A_Jump(30,"Pause")
	LARO E 5 A_SpidRefire
	Goto See
  SpreadFire:
	TNT1 A 0
	TNT1 A 0 A_FastChase
	LARO EEEEEEEEEE 1 A_FaceTarget
	TNT1 A 0 A_PlaySound("weapons/ExplosiveSG/fire")
	TNT1 A 0 A_CustomMissile("LegDarkoExplosiveTracer",32,12,random(-8,8),CMF_OFFSETPITCH,frandom(-4.0,4.0))
	TNT1 A 0 A_CustomMissile("LegDarkoExplosiveTracer",32,12,random(-8,8),CMF_OFFSETPITCH,frandom(-4.0,4.0))
	TNT1 A 0 A_CustomMissile("LegDarkoExplosiveTracer",32,12,random(-8,8),CMF_OFFSETPITCH,frandom(-4.0,4.0))
	TNT1 A 0 A_CustomMissile("LegDarkoExplosiveTracer",32,12,random(-8,8),CMF_OFFSETPITCH,frandom(-4.0,4.0))
	TNT1 A 0 A_CustomMissile("LegDarkoExplosiveTracer",32,12,random(-8,8),CMF_OFFSETPITCH,frandom(-4.0,4.0))
	TNT1 A 0 A_CustomMissile("LegDarkoExplosiveTracer",32,12,random(-8,8),CMF_OFFSETPITCH,frandom(-4.0,4.0))
	TNT1 A 0 A_CustomMissile("LegDarkoExplosiveTracer",32,12,random(-8,8),CMF_OFFSETPITCH,frandom(-4.0,4.0))
	LARO F 3 Bright A_CustomMissile("LegDarkoExplosiveTracer",random(30,34),random(11,13),random(-8,8),CMF_TRACKOWNER|CMF_OFFSETPITCH,frandom(-4.0,4.0))
	LARO E 5 A_FaceTarget
	TNT1 A 0 A_PlaySound("Darko/Taunt",CHAN_VOICE,1.0,0)
	Goto See
  Rockets:
    LARO E 4 Bright A_FaceTarget
    LARO A 4 Bright A_CustomMissile("LegendaryRocket",32,12,0,0)
    LARO A 4 Bright A_CustomMissile("LegendaryRocket",32,12,0,0)
    LARO A 4 Bright A_CustomMissile("LegendaryRocket",32,12,0,0)
    LARO A 4 Bright A_CustomMissile("LegendaryRocket",32,12,0,0)
    LARO A 4 Bright A_CustomMissile("LegendaryRocket",32,12,0,0)
	LARO E 3 Bright A_FaceTarget
    Goto See
  Pause:
	TNT1 A 0
	LARO E 5 A_FaceTarget
	TNT1 A 0 A_Jump(60,"SpreadFire")
	Goto See
  Beacon:
    TNT1 A 0 A_SetUserVar("user_BeaconUsed",1)
	TNT1 A 0 A_PlaySound("Darko/Taunt",CHAN_VOICE,1.0,0)
    LARO E 20 A_SpawnItem("LegActiveStrongSSBeacon")
	Goto See
  Beacon2:
    TNT1 A 0 A_SetUserVar("user_BeaconUsed2",1)
	TNT1 A 0 A_PlaySound("Darko/Taunt",CHAN_VOICE,1.0,0)
    LARO E 20 A_SpawnItem("LegActiveStrongSSBeacon")
	Goto See
  Pain:
	LARO E 6 A_Pain
	Goto Missile
  Death:
    LARO G 5 A_SpawnItemEx("LegBlueGibbedGenerator",0,0,0,0,0,0,0,128,0)
    LARO H 5 A_Scream
    LARO I 5
    LARO J -1 A_NoBlocking
    Stop
	}
}

ACTOR LegDarkoGhost
{
Scale 1.2
RENDERSTYLE Translucent
Alpha 0.75
+NOGRAVITY
+CLIENTSIDEONLY
+DONTSPLASH
+NOINTERACTION
+NOCLIP
+NOTIMEFREEZE
States
{
Spawn:
    TNT1 A 0
    TNT1 A 0 A_JumpIf(ACS_ExecuteWithResult(304) == 1, "Toaster")
    LARO A 2 A_FadeOut(0.18)
    Loop
  Toaster:
    TNT1 A 0
	Stop		
    }
}

actor LegActiveStrongSSBeacon : ActiveFormerBeacon
{
  +NOTIMEFREEZE
  States
  {
  Spawn:
    SSLB A 210
    SSLB A 0 A_CustomMissile ("TeleportFog", 0, 0, 0, 0, 0)
    SSLB A 0 A_SpawnItemEx ("LegendarySSSuperSoldierPyroCannon", 0, 0, 8, 0, 0, 0, 0, 1)
    SSLB A 210
    SSLB A 0 A_CustomMissile ("TeleportFog", 0, 0, 0, 0, 0)
    SSLB A 0 A_SpawnItemEx ("LegendarySSSuperSoldierPyroCannon", 0, 0, 8, 0, 0, 0, 0, 1)
    SSLB A 210
	SSLB A 0 A_CustomMissile ("TeleportFog", 0, 0, 0, 0, 0)
    stop
  }
}

Actor LegDarkoExplosiveTracer : LegSentientExplosiveTracer
{
Decal ""
Damage (0)
+DONTREFLECT
+THRUSPECIES
+MTHRUSPECIES
Species "SS"
DamageType "SS"
States
{
  Spawn:
	LRAC A 1 Bright
	Loop
  XDeath:
  Death:
	TNT1 A 1
	Stop
	}
}