Actor TrueLegendaryBarrelMan
{
//Creator: High Councilor
//Origin: Nexus Infinity
//Sprite: LB4R
//Title: "True Legendary Barrel Man"
  Monster
  Scale 1.2
  Health 3000
  Height 56
  Radius 20
  Speed 10
  PainChance 50
  PainChance "ZombieDemonTech", 0
  BloodColor "Blue"
  MinMissileChance 80
  -FORCERADIUSDMG
  +NOBLOOD
  +BOSS
  +FLOORCLIP
  +NORADIUSDMG
  +MISSILEMORE
  +QUICKTORETALIATE
  +DONTHARMSPECIES
  +THRUSPECIES
  +BRIGHT
  Species "Zombies"
  DamageFactor 0.5
  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 "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
  DamageFactor "LegMind", 0.0
  DamageFactor "VileFires", 0.0
  DamageFactor "Baby15K", 0.0
  DamageFactor "SoulToxic", 0.0
  DamageFactor "BombBreath", 0.0
  DamageFactor "CacoComet", 0.0
  DamageFactor "CadaverRocket", 0.0
  DamageFactor "BeheComet", 0.0
  DamageFactor "NobleComet", 0.0
  DamageFactor "DemolisherEx", 0.0
  DamageFactor "DarkDemoEx", 0.0
  DamageFactor "Hell", 0.0
  DamageFactor "UltimateLegendary", 0.0
  DamageFactor "PlayerPyro", 0.4
  DamageFactor "HellComet", 0.4
  DamageFactor "PlayerNemesisPlasma", 0.4
  DamageFactor "TrueLegendaryDamage", 0.0
  DamageFactor "TrueLegendaryPlayer", 0.0
  DropItem "LegendaryBossLifeEssence" 256
  DropItem "LegendaryBossArmorBonusMax" 256 
  DropItem "LegendaryArmor" 120 1 
  DropItem "LegAmmoSphere" 128 1
  DropItem "HandGrenadeAmmo" 235 2
  DropItem "MineAmmo" 235 2
  DropItem "Backpack" 198 1
  DropItem "Armorplate" 205 1
  DropItem "Portablemedkit" 210 1
  DropItem "LegendaryBulletBox" 202
  DropItem "LegendaryLMGBulletMag" 252 20
  DropItem "LegendaryRune" 65 1
  DropItem "Autofuck" 50 1
  DropItem "LegendaryPowerShard" 65 1
  DropItem "LegendaryCell" 180
  DropItem "LegendaryCellPack" 150
  DropItem "TrueLegUpgradeSpawnerWeak" 150 1
  DropItem "TrueLegendaryRune" 10 1
  DropItem "TrueLegTimeFreezeSphere" 100 1
  DropItem "TrueLegAmmoSphere" 128 1
  DropItem "TrueLegendaryArmor" 120 1
  DropItem "LegendaryFusionCell" 55 1
  SeeSound ""
  PainSound ""
  DeathSound ""
  ActiveSound ""
  AttackSound "Autofuck/Fire"
  Obituary "%o also did not expect that the Legendary Barrel with a gun would resurrect to finish him off"
  Tag "\c[l5]True\c- \c[z3]Legendary Barrel Man\c-"
  var int user_protection;
  var int user_protected;
  States
  {
  Spawn:
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	TNT1 A 0 A_SpawnItemEx("BHellionSmokeSpawner")
	TB5R A 10 A_Look
	Loop
  See:
	TNT1 A 0 A_ChangeFlag(NOPAIN,0)
	TNT1 A 0 A_UnHideThing
	TNT1 A 0 A_SetShootable
    TNT1 A 0 A_JumpIfTargetInLOS("Strafing")
	TNT1 A 0 A_SpawnItemEx("BHellionSmokeSpawner")
	TB5R AA 3 A_Chase
	TNT1 A 0 A_SpawnItemEx("BHellionSmokeSpawner")
	TB5R BB 3 A_Chase
	TNT1 A 0 A_SpawnItemEx("BHellionSmokeSpawner")
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
    TNT1 A 0 A_JumpIfTargetInLOS("Strafing")
	TB5R CC 3 A_Chase
	TNT1 A 0 A_SpawnItemEx("BHellionSmokeSpawner")
	TB5R DD 3 A_Chase
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	Loop
  Teleport:
    TB5R A 1 Bright A_UnSetShootable
	TB5R AAAA 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	TB5R AAAAAAAAAA 1  A_FadeOut(0.1,0)
	TB5R A 2 
	TB5R AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
	TB5R AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA 0 A_Wander
    TB5R A 1 A_PlayWeaponSound("boss/teleport")
	TB5R AAAA 0 A_SpawnItem("BHellionSmokeSpawner",0,0,0,0)
	TB5R AAAAAAAAAA 1 A_FadeIn(0.1)
    TB5R A 1 Bright A_SetShootable
    Goto See
  Strafing:
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	TB5R AA 3 A_GiveInventory("TLegZombieStrafing",1)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	TB5R BB 3 A_GiveInventory("TLegZombieStrafing",1)
	TNT1 A 0 A_SpawnItem("LegendaryFootStep",0,0,0,0)
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
    TB5R CC 3 A_GiveInventory("TLegZombieStrafing",1)	
	TNT1 A 0 A_Chase("","Missile",CHF_DONTMOVE)
	TB5R DD 3 A_GiveInventory("TLegZombieStrafing",1)
	Goto See
  Missile:
	TB5R EEEEEEEE 1 A_FaceTarget(45)
  MissileLoop:
	TNT1 A 0 A_JumpIfInventory("LegAutoFuckAmmo",41,"Reload")
	TNT1 A 0 A_GiveInventory("LegAutoFuckAmmo",1)
	TNT1 A 0 A_GiveInventory("TLegZombieStrafing",1)	
	TNT1 A 0 A_CustomMissile("LegendaryBlueTracer",Random(28,34),0,Random(6,-6),0)
	TNT1 A 0 A_SpawnItemEx("LegRifleCasing",12,-6,36,Random(2,6),0,Random(1,3),Random(-80,-90),128)
	TB5R F 2 A_CustomBulletAttack(42.5,14,1,Random(10,20)*3,"LegModdedBulletPuff")
	TB5R E 2
	TNT1 A 0 A_Jump(10,"Pause")
	TNT1 A 0 A_Jump(25,"Nade","TrueLegNade")
	TNT1 A 0 A_MonsterRefire(0,"See")
	Loop
  Pause:
	TB5R EEEEE 3 Bright A_GiveInventory("TLegZombieStrafing",1)
	Goto See
  Nade:
	TB5R E 1 A_JumpIfCloser(1000,1)
	Goto Missile
	TNT1 A 0 A_JumpIfCloser(280,"Missile")
	TB5R E 6 A_GiveInventory("TLegZombieStrafing",1)
	TB5R EEE 4 A_GiveInventory("TLegZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("TLegZombieStrafing",1)
	TB5R E 6 A_CustomMissile("LegThrownGrenade",32,0,0,2,10)
	TB5R E 1
	Goto See
  TrueLegNade:
	TB5R E 1 A_JumpIfCloser(1000,1)
	Goto Missile
	TNT1 A 0 A_JumpIfCloser(280,"Missile")
	TB5R E 12 A_GiveInventory("TLegZombieStrafing",1)
	TB5R EEE 6 A_GiveInventory("TLegZombieStrafing",1)
	TNT1 A 0 A_GiveInventory("TLegZombieStrafing",1)
	TB5R E 6 A_CustomMissile("LegThrownGrenade",32,0,0,2,10)
	TB5R EE 20
	Goto See
  Reload:
    TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_PlayWeaponSound("weapons/arreload")
    TB5R EE 7 A_TakeInventory ("LegAutoFuckAmmo",41)
	TNT1 A 0 A_CustomMissile("AREmptyMagSpawner")
    TB5R E 7
    TNT1 A 0 A_ChangeFlag(NOPAIN,0)
    Goto See
  Pain:
	TNT1 A 0 A_ChangeFlag(NOPAIN,1)
	TNT1 A 0 A_Jump(15,"Protection")
	TB5R G 3
	TB5R G 3 A_Pain
	TNT1 A 0 A_Jump(128,"PainMissile")
	Goto See
  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
	TB5R E 2 ACS_NamedExecuteAlways("LegendaryProtection",0,0,0,0)
	TNT1 A 0 A_SpawnItem("LHellionSmokeSpawner",0,0,0,0)
	Goto See	
  PainMissile:
	TNT1 A 0
	TNT1 A 0 A_JumpIfTargetInLos("Missile",360,JLOSF_DEADNOJUMP|JLOSF_TARGETLOS)
	GoTo See
  Death:
	TB5R H 1 A_Explode(384,1588)
	TB5R H 1 A_ChangeFlag(FORCERADIUSDMG,1)
	TNT1 A 0 A_Explode(100,1588,0,0,1588)
	TNT1 A 0 Radius_Quake(7,105,0,140,0)
	TNT1 A 0 A_SpawnItemEx("BlueParticleSpawner",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE) 
	TNT1 AAA 0 A_CustomMissile("BlueKaboom3",0,0,random(0,360),CMF_AIMDIRECTION,random(0,360))
	TNT1 AAA 0 A_CustomMissile("SmokeFX2",0,0,random(0,360),CMF_AIMDIRECTION,random(0,360))
	TNT1 AAAA 0 A_SpawnItemEx("Debris",0,0,0,Random(4,-4),Random(4,-4),Random(4,8),0,SXF_NOCHECKPOSITION|SXF_CLIENTSIDE,0)
	TNT1 A 0 A_PlaySoundEx("legendary/strike","Voice",0,2)
	TB5R H 5 A_SpawnItemEx("LegendaryBarrelStrike",0,0,0,0,0,0,0,SXF_CLIENTSIDE,0)
	TNT1 A 0 A_SpawnItemEx("LegendaryNuke")
	TB5R I 5 A_Scream
	TB5R K 5 A_NoBlocking
	TB5R L 5
	TB5R M 5
	TB5R N -1
	Stop
	}
}