ACTOR NewLegendaryWar
{
//$Sprite LGWR
//$Title "Legendary War"
//Original: Divine Infinity
//Creato Eshkere_Jason + NemesisCaptain (uwu) + Marakov
//Info: Have bad sprites, but u can changed better - Eshkere Jason
Health 2700
Speed 30
PainChance 10
Scale 1.05
Radius 20
Height 84
Monster
DamageFactor 0.65
DamageFactor "GeneralTracer", 0.0
DamageFactor "LegendaryZombie", 0.0
DamageFactor "PDTBFG", 0.20
DamageFactor "PDTBFGTracer", 0.20
DamageFactor "PlayerDevBall", 0.120
DamageFactor "PlayerDevBall2", 0.120
DamageFactor "PlayerDTBFGRailgunSlug", 0.120
DamageFactor "PlayerDevTracer", 0.120
DamageFactor "Legendary", 0.0
DamageFactor "LegendaryPlayer", 0.3
DamageFactor "LegendaryGuru", 0.0
DamageFactor "LegendaryGuruPlayer", 0.3
DamageFactor "DBFG10K2", 0.65
DamageFactor "PlayerDBFG10K2", 0.65
DamageFactor "DBFG2", 0.65
DamageFactor "PlayerDBFG2", 0.65
DamageFactor "PlayerDTRG", 0.5
DropItem "BossLifeEssence" 256
DropItem "BossArmorBonusMax" 256
DropItem "HomingRocketLauncher" 128
DropItem "LegendaryCellPack" 202 
DropItem "LegendaryCell" 252 25
DropItem "LegendaryRune" 50 1
DropItem "LegendaryBFG10K" 180 1
DropItem "LegendaryPowerShard" 100 1
Bloodcolor "Blue"
SeeSound "LegWarSee/War"
ActiveSound "War/Active"
PainSound "War/Pain"
DeathSound "War/Death"
Obituary "%o was reduced to ruins by the onslaught of Legendary War."
Tag "\c[z3]Legendary War\c-"
+DONTHARMCLASS
+DONTHARMSPECIES
+MISSILEEVENMORE
+AVOIDMELEE
+QUICKTORETALIATE
+BOSS
var int user_music;
var int user_missile;
var int user_arson;
States
	{
  Spawn:
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LGWR C 10 A_Look
    Loop
  See:
	TNT1 A 0 A_JumpIf(user_music == 1,3)
	TNT1 A 0 ACS_NamedExecuteAlways("StartMonsterMusic",0,6739)
	TNT1 A 0 A_SetUserVar("user_music",1)
    TNT1 A 0 A_SpawnItem("BonyStep",0,0,0,0)
    LGWR AAABBB 2 A_Chase
    TNT1 A 0 A_SpawnItem("BonyStep",0,0,0,0)
    LGWR CCCDDD 2 A_Chase
    Loop
  Rush:
    LGWR A 0 A_JumpIfTargetInLOS("LegZombieStrafing2")
	TNT1 A 0 A_SpawnItem("BonyStep",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("LegWarGhost",0,0,0,0,0,0,0,128)
	LGWR A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("LegWarGhost",0,0,0,0,0,0,0,128)
	LGWR A 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("LegWarGhostB",0,0,0,0,0,0,0,128)
	LGWR B 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("LegWarGhostB",0,0,0,0,0,0,0,128)
	LGWR B 1 A_Chase
	TNT1 A 0 A_SpawnItem("BonyStep",0,0,0,0)
    TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("LegWarGhostC",0,0,0,0,0,0,0,128)
	LGWR C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("LegWarGhostC",0,0,0,0,0,0,0,128)
	LGWR C 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("LegWarGhostD",0,0,0,0,0,0,0,128)
	LGWR D 1 A_Chase
	TNT1 A 0 A_SpawnItemEx("LegWarGhostD",0,0,0,0,0,0,0,128)
	LGWR D 1 A_Chase
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItem("BonyStep",0,0,0,0)
	TNT1 A 0 A_Jump(84,"See")
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	Loop
  Teleport:
	LGWR A 0 A_UnSetShootable
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("LHellionSmokeSpawner")
	LGWR EE 1 A_FadeOut(0.5,0)
	LGWR AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	LGWR AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TNT1 A 0 A_PlaySound("boss/teleport")
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	TNT1 A 0 A_SpawnItemEx("LHellionSmokeSpawner")
	LGWR EE 1 A_FadeIn(0.5)
	LGWR A 0 A_SetShootable
	Goto See
  Strafing:
	LGWR A 1 A_JumpIfTargetInLos(1)
	Goto See
  	LGWR A 1 Bright A_SetAngle(random(0,359))
    TNT1 A 0 A_Recoil(-40)
	LGWR AAAAAAAAAAAAA 1 Bright A_SpawnItemEx("LegWarGhost",0,0,0,0,0,0,0,128)
	LGWR A 1 A_Stop	
  	LGWR A 1 A_SetAngle(random(0,359))
    TNT1 A 0 A_Recoil(-40)	
	LGWR AAAAAAAAAAAAA 1 Bright A_SpawnItemEx("LegWarGhost",0,0,0,0,0,0,0,128)
	LGWR A 1 A_Stop	
  	LGWR A 1 A_SetAngle(random(0,359))
    TNT1 A 0 A_Recoil(-40)
	LGWR AAAAAAAAAAAAA 1 Bright A_SpawnItemEx("LegWarGhost",0,0,0,0,0,0,0,128)
	LGWR A 1 A_Stop	
  	LGWR A 1 A_SetAngle(random(0,359))
    TNT1 A 0 A_Recoil(-40)
	LGWR AAAAAAAAAAAAA 1 Bright A_SpawnItemEx("LegWarGhost",0,0,0,0,0,0,0,128)
	LGWR A 1 A_Stop		
	Goto See
  Missile:
    TNT1 A 0 A_SetShootable
    TNT1 A 0 A_UnsetInvulnerable
    TNT1 A 0 A_SetTranslucent(1)
	TNT1 A 0 A_JumpIfTargetInLOS("UberHexaSG",90,JLOSF_DEADNOJUMP|JLOSF_TARGETLOS,600,0)
	TNT1 A 0 A_Jump(256,"ChainGuns","Rockets","Seekers","Railgun","BFG9K","DTBFG","DTDevastator","Flamethrower","Napalm")
  Rockets:
    LGWR E 12 A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryRocket", 40, 26, 0)
    LGWR F 8 Bright A_CustomMissile("LegendaryRocket", 40, -26, 0)
    LGWR E 8 A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryRocket", 40, 26, 0)
    LGWR F 4 Bright A_CustomMissile("LegendaryRocket", 40, -26, 0)
    LGWR E 4 A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryRocket", 40, 26, 0)
    LGWR F 2 Bright A_CustomMissile("LegendaryRocket", 40, -26, 0)
    LGWR E 2 A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryRocket", 40, 26, 0)
    LGWR F 1 Bright A_CustomMissile("LegendaryRocket", 40, -26, 0)
	LGWR E 1
	TNT1 A 0 A_Jump(128,"Seekers")
    Goto See
  Seekers:
	LGWR E 12 A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryHomingRocket", 40, 26, 0)
    LGWR F 10 Bright A_CustomMissile("LegendaryHomingRocket", 40, -26, 0)
    LGWR E 7 A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryHomingRocket", 40, 26, 0)
    LGWR F 7 Bright A_CustomMissile("LegendaryHomingRocket", 40, -26, 0)
    LGWR E 4 A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryHomingRocket", 40, 26, 0)
    LGWR F 4 Bright A_CustomMissile("LegendaryHomingRocket", 40, -26, 0)
    LGWR E 2 A_FaceTarget
    TNT1 A 0 A_CustomMissile("LegendaryHomingRocket", 40, 26, 0)
    LGWR F 2 Bright A_CustomMissile("LegendaryHomingRocket", 40, -26, 0)
	LGWR E 1
	Goto ChainGuns
  ChainGuns:
    TNT1 A 0 A_Jump(88,"Napalm")
	Goto Railgun
	LGWR G 2 A_FaceTarget
	TNT1 A 0 A_SpawnItemEx("YellowShellCasing", 10, -12, 40, Random(2, 6), 0, Random(1, 3), Random(-80, -90), 128)
	TNT1 A 0 A_PlaySound("sentient/fire")
	LGWR H 0 Bright A_CustomMissile("LegendaryBlueTracer",48,-17,Random(-800,800)/100.00)
	LGWR H 2 Bright A_CustomMissile("LegendaryBlueTracer",48,-17,Random(-800,800)/100.00)
	TNT1 A 0 A_StopSoundEx("Weapon")	
	TNT1 A 0 A_Jump(15,"See","Missile")
	TNT1 A 0 A_SpidRefire
	Loop 
  UberHexaSG:
	LGWR G 5 A_FaceTarget
	LGWR GGGGGG 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",7)
	TNT1 A 0 A_PlaySound("weapons/hsgfire")
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("LegendaryBlueTracer",48,-17,Random(6,-6),0)
	LGWR H 2 Bright A_CustomBulletAttack(22.5,18.3,30,Random(5,15)*6,"LegModdedBulletPuff")
	LGWR G 5 A_FaceTarget
	LGWR GGGGGG 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",7)
	TNT1 A 0 A_PlaySound("weapons/hsgfire")
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("LegendaryBlueTracer",48,-17,Random(6,-6),0)
	LGWR H 2 Bright A_CustomBulletAttack(22.5,18.3,30,Random(5,15)*6,"LegModdedBulletPuff")
	LGWR G 5 A_FaceTarget
	LGWR GGGGGG 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",7)
	TNT1 A 0 A_PlaySound("weapons/hsgfire")
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("LegendaryBlueTracer",48,-17,Random(6,-6),0)
	LGWR H 2 Bright A_CustomBulletAttack(22.5,18.3,30,Random(5,15)*6,"LegModdedBulletPuff")
	LGWR G 5 A_FaceTarget
	LGWR GGGGGG 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",7)
	TNT1 A 0 A_PlaySound("weapons/hsgfire")
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("LegendaryBlueTracer",48,-17,Random(6,-6),0)
	LGWR H 2 Bright A_CustomBulletAttack(22.5,18.3,30,Random(5,15)*6,"LegModdedBulletPuff")
	LGWR G 5 A_FaceTarget
	LGWR GGGGGG 0 A_SpawnItemEx("BlueShellCasing",25,-2,25,Random(2,4),Random(-3,-6),Random(3,6),0)
	TNT1 A 0 A_PlaySound("Weapons/LegAutoShotgun",7)
	TNT1 A 0 A_PlaySound("weapons/hsgfire")
	TNT1 AAAAAAAAAAAA 0 A_CustomMissile("LegendaryBlueTracer",48,-17,Random(6,-6),0)
	LGWR H 2 Bright A_CustomBulletAttack(22.5,18.3,30,Random(5,15)*6,"LegModdedBulletPuff")
	TNT1 A 0 A_StopSoundEx("Weapon")	
	TNT1 A 0 A_Jump(15,"See","Missile")
	TNT1 A 0 A_SpidRefire
	Goto See 
  Railgun:
	TNT1 A 0 A_PlaySound("weapons/rgcharge")
	TNT1 A 0 A_Changeflag(reflective,1)
	LGWR E 0 A_SetInvulnerable
	LGWR E 1 Bright A_FaceTarget
	LGWR E 1 Bright A_SetUserVar("user_missile",0)
	LGWR E 0 Bright A_FaceTarget
	LGWR E 2 Bright A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LGWR E 0 Bright A_FaceTarget
	LGWR E 2 Bright A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LGWR E 0 Bright A_FaceTarget
	LGWR E 2 Bright A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LGWR E 0 Bright A_FaceTarget
	LGWR E 2 Bright A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LGWR E 0 Bright A_FaceTarget
	LGWR E 2 Bright A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LGWR E 0 Bright A_FaceTarget
	LGWR E 2 Bright A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LGWR E 0 Bright A_FaceTarget
	LGWR E 2 Bright A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LGWR E 0 Bright A_FaceTarget
	LGWR E 2 Bright A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LGWR E 0 Bright A_FaceTarget
	LGWR E 2 Bright A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LGWR E 0 Bright A_FaceTarget
	LGWR E 2 Bright A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LGWR E 0 Bright A_FaceTarget
	LGWR E 2 Bright A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LGWR E 0 Bright A_FaceTarget
	LGWR E 2 Bright A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LGWR E 0 Bright A_FaceTarget
	LGWR E 2 Bright A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LGWR E 0 Bright A_FaceTarget
	LGWR E 2 Bright A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LGWR E 0 Bright A_FaceTarget
	LGWR E 2 Bright A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LGWR E 0 Bright A_FaceTarget
	LGWR E 2 Bright A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	LGWR E 0 A_ChangeFlag("NOPAIN",1)
    LGWR E 0 A_UnSetInvulnerable
	LGWR E 0 A_FaceTarget	
	LREV E 0 A_PlayWeaponSound("monsters/darkcyberrail")
	LGWR F 1 A_CustomMissile("LegendaryCyberRail",70,-26,0)
	LGWR F 1 Bright A_CustomMissile("LegendaryCyberRail",70,26,0)
	Goto See
  BFG9K:
	TNT1 A 0 A_PlaySound("weapons/bfgf")
	LGWR E 8 A_FaceTarget
	LGWR F 7 Bright A_CustomMissile("LegCyberBFG9500Ball",48,15,0)
	LGWR E 4 A_FaceTarget
	LGWR F 7 Bright A_CustomMissile("LegCyberBFG9500Ball",48,15,0)
	LGWR E 4 A_FaceTarget
	LGWR F 7 Bright A_CustomMissile("LegCyberBFG9500Ball",48,15,0)
	LGWR EE 4 A_FaceTarget   
	TNT1 A 0 A_Jump(128,"DTBFG","DTDevastator")
	Goto See
  DTBFG:
	TNT1 A 0 A_PlaySound("Cardinal/9k")
	LGWR EEEEEEEEEEEEFF 3 A_Facetarget
	LGWR FFFFF 4 Bright A_CustomMissile("LegAnniDTBFGBall",48,15,0)
	LGWR EEE 4 A_FaceTarget
	LGWR A 0 A_Jump(128,"DTDevastator")
	Goto See
  DTDevastator:
	TNT1 A 0 A_SetInvulnerable
	LGWR E 0 A_Facetarget
	TNT1 A 0 A_SetUserVar("user_missile", 0)
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryLineSpawner")
	LGWR E 0 Bright A_PlaySound ("devastator/charge")
  DevCharge:
	TNT1 A 0 A_JumpIf(user_missile > 55,"DevFire")
	TNT1 A 0 A_SetUserVar("user_missile",user_missile+1)
	LGWR E 2 A_Facetarget
	TNT1 A 0 A_SpawnItemEx("TrueLegendaryLineSpawner")
	Loop
  DevFire:
	LGWR F 0 A_PlaySound ("devastator/fire")
	LGWR F 0 Bright A_CustomMissile("LegCybDevastatorBall",48,17,0)
	LGWR E 50
	TNT1 A 0 A_UnSetInvulnerable
	Goto See
  Flamethrower:
	LGWR E 3 Bright A_FaceTarget
	TNT1 A 0 A_PlaySound("Weapons/PyroSGShot")
	TNT1 AAAA 0 A_CustomMissile("LegendaryFlamethrowerShot",36,0,0)
	LGWR E 3 Bright A_FaceTarget
	TNT1 A 0 A_PlaySound("Weapons/PyroSGShot")
	TNT1 AAAA 0 A_CustomMissile("LegendaryFlamethrowerShot",36,0,0)
	LGWR E 3 Bright A_FaceTarget
	TNT1 A 0 A_PlaySound("Weapons/PyroSGShot")
	TNT1 AAAA 0 A_CustomMissile("LegendaryFlamethrowerShot",36,0,0)
	LGWR E 3 Bright A_FaceTarget
	TNT1 A 0 A_PlaySound("Weapons/PyroSGShot")
	TNT1 AAAA 0 A_CustomMissile("LegendaryFlamethrowerShot",36,0,0)
	Goto See
  Napalm:
	LGWR E 3 Bright A_FaceTarget
	TNT1 A 0 A_CustomMissile("LegendaryNapalmBall",32,0,0)
	LGWR E 3 Bright A_FaceTarget
	TNT1 A 0 A_CustomMissile("LegendaryNapalmBall",32,0,0)
	LGWR E 3 Bright A_FaceTarget
	TNT1 A 0 A_CustomMissile("LegendaryNapalmBall",32,0,0)
	LGWR E 3 Bright A_FaceTarget
	TNT1 A 0 A_CustomMissile("LegendaryNapalmBall",32,0,0)
	Goto See
  Pain:
    LGWR J 5
    LGWR J 5 A_Pain
    TNT1 A 0 A_Jump(80,"Missile")
    Goto See
  XDeath:
  Death:
    LGWR J 7 A_Scream 
	LGWR J 2 Bright 
	TNT1 AA 0 A_SpawnItemEx("LegBlueGibbedGenerator",0,0,0,0,0,0,0,128,0)
	LGWR JJJJJ 1 Bright A_CustomMissile("PainfulDeathKaboom", Random(10,50), 0, random(0,360), 2, random(0,360))	
	LGWR JJKKK 1 Bright A_CustomMissile("PainfulDeathKaboom", Random(10,50), 0, random(0,360), 2, random(0,360))
	LGWR N 6 A_NoBlocking
    LGWR O -1
    Stop
    }  
}
ACTOR LegWarGhost
{
Scale 1.1
Radius 20
Height 56
Speed 0
Alpha 0.7
PROJECTILE
RENDERSTYLE Translucent
+CLIENTSIDEONLY
+NOINTERACTION
+NOTIMEFREEZE
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
    LGWR A 2 A_FadeOut(0.10)
    Wait
	}
}

ACTOR LegWarGhostB : LegWarGhost
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
    LGWR B 2 A_FadeOut(0.10)
    Wait
    }
}

ACTOR LegWarGhostC : LegWarGhost
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
    LGWR C 2 A_FadeOut(0.10)
    Wait
    }
}

ACTOR LegWarGhostD : LegWarGhost
{   
States
{
  Spawn:
    TNT1 A 0
    TNT1 A 1 A_JumpIf(ACS_ExecuteWithResult(304) == 1,"NULL")
    LGWR D 2 A_FadeOut(0.10)
    Wait
    }
} 
	
	
	
	
	
		
	
		
	
		
	
    





	
	
   
	 	
	
	
  
	
	
 


	
	
	
	


	
	
  
	
    
		 
	