ACTOR BruiserBall
{
	Radius 16
	Height 16
	Speed 25
	Damage (35)
	Projectile
	+RANDOMIZE
	RenderStyle "ADD"
	Alpha 0.9
	SeeSound "imp/attack"
	DeathSound "imp/shotx"
	damagetype "boss"
	Decal Scorch
	States
	{
	Spawn: 
		BRBA AABB 2 BRIGHT A_SpawnItemEx("BruiserBallTrail", 0, 0, 0, 0, 0, 0, 0, 128)
		Loop
	Death:
		BRBA A 0 a_explode(16, 24)
		BRBA KLMNOPQRSTUVWX 3 Bright
		Stop
	}
}

ACTOR BruiserBall2
{
	Radius 8
	Height 8
	Speed 20
	Damage 6
	Projectile
	+RANDOMIZE
	RenderStyle "ADD"
	Alpha 0.9
	SeeSound "imp/attack"
	DeathSound "imp/shotx"
	Decal BaronScorch
	damagetype "boss"
	States
	{
	Spawn: 
		BRB2 AB 6 BRIGHT 
		Loop
	Death:
		BRBA A 0 a_explode(16, 12)
		BRB2 CDEFGHI 3 Bright
		Stop
	}
}

actor BruiserBallTrail
{
    Radius 1
    Height 1
    Speed 0
    PROJECTILE
    RENDERSTYLE ADD
    ALPHA 0.70
    +NOCLIP
    States
    {
    Spawn:
     	BRBA CDEFGHIJ 4 Bright
     	Stop       
    }
}

ACTOR BruiserDemonPlayer : PlayerPawn
{
  Scale 1.25
  Health 1000
  Radius 30
  Height 80
  Speed 0.9
  mass 2000
  Player.ColorRange 0, 0
  Player.JumpZ 6
  Player.MaxHealth 16000
  Player.DisplayName "BruiserDemon"
  Player.MorphWeapon "BruiserWeapon0"
  Player.StartItem "Mana", 100
  Player.SoundClass "Bruiser"
  DamageFactor "Boss", 0
  limitedtoteam 1
  	SeeSound "superbaron/scream"
	PainSound "superbaron/pain"
	DeathSound "superbaron/death"
	ActiveSound "superbaron/act"
	MeleeSound "baron/melee"
	+NOSKIN
	-PICKUP
  states
{
	Spawn:
		BRUS AB 10
		Loop
	See:
		BRUS AABBCCDD 3
		Loop
	Melee:
		BRUS E 6 Bright
		BRUS F 6 Bright
		BRUS G 6 Bright
		Goto Spawn
	Missile:
		BRUS KL 6 Bright 
		BRUS M 2 Bright
		BRUS M 2 Bright
		BRUS M 2 Bright
		Goto Spawn
	Death:
		TNT1 A 0 A_Scream
		TNT1 A 0 A_SpawnItem("BrusDeath")
		TNT1 A 0 a_givetotarget("BOSSKILLEDSTAT", 1)
		TNT1 A 1 a_givetotarget("reward", 1)
		BLAN A -1
		Stop
}
}

ACTOR BruiserWeapon : Weapon 
{
 Weapon.SelectionOrder 800
 Obituary "%o was engulfed in flames by %k"
 Inventory.PickupMessage ""
 Inventory.PickupSound "misc/pk_up"
 Weapon.AmmoUse 0
 Weapon.AmmoGive 0
 Weapon.AmmoType "Mana"
 +WEAPON.NOAUTOAIM
 +INVENTORY.UNDROPPABLE
  States
 {
  Spawn:
       TNT1 A -1
       Loop
  Ready:
       CLA3 A 1 A_WeaponReady
       goto ready
  Deselect:
       CLA3 A 1 A_Lower
       Loop
  Select:
       CLA3 A 0 A_Raise
       Loop
  Fire:
       TNT1 A 0 A_jumpIfinventory("bruiserattackmode1", 1, "NormalAttackcheck")
       TNT1 A 0 A_jumpIfinventory("bruiserattackmode2", 1, "SpreadAttackcheck")
       TNT1 A 0 A_jumpIfinventory("bruiserattackmode3", 1, "TrailAttackcheck")
	   Goto ready
  AltFire:
  	   CLA3 A 1 ACS_execute(812, 0, 2)
       CLA3 A 2
       CLA3 A 23
       goto ready
  NormalAttack:
         TNT1 A 0 A_Takeinventory("mana", 4)
       TNT1 A 0 A_PlayWeaponSound("imp/attack")
       TNT1 A 0 A_GunFlash
       TNT1 A 0 A_FireCustomMissile("BruiserBall",0,1,1,0)
       CLA3 B 5
  goto ready
  SpreadAttack:
       TNT1 A 0 A_Takeinventory("mana", 15)
         TNT1 A 0 A_PlayWeaponSound("imp/attack")
       TNT1 A 0 A_GunFlash
		CLA3 B 1 Bright A_FireCustomMissile("BruiserBall2",-40,1,0,0)
		CLA3 B 1 Bright A_FireCustomMissile("BruiserBall2",-30,0,0,0)
		CLA3 B 1 Bright A_FireCustomMissile("BruiserBall2",-20,0,0,0)
		CLA3 B 1 Bright A_FireCustomMissile("BruiserBall2",-10,0,0,0)
		CLA3 B 1 Bright A_FireCustomMissile("BruiserBall2",0,0,0,0)
		CLA3 B 1 Bright A_FireCustomMissile("BruiserBall2",10,0,0,0)
		CLA3 B 1 Bright A_FireCustomMissile("BruiserBall2",20,0,0,0)
       CLA3 A 3
  goto ready
  TrailAttack:
       TNT1 A 0 A_Takeinventory("mana", 33)
        TNT1 A 0 A_PlayWeaponSound("imp/attack")
       TNT1 A 0 A_GunFlash
		CLA3 B 3
		CLA3 B 0 Bright A_FireCustomMissile("BruiserFireSpawner",-15,1,0,16)
		CLA3 B 0 Bright A_FireCustomMissile("BruiserFireSpawner",0,0,0,16)
		CLA3 B 0 Bright A_FireCustomMissile("BruiserFireSpawner",15,0,0,16)
		CLA3 B 3
	   CLA3 A 2
  goto ready
  NormalAttackcheck:
       TNT1 A 0 A_jumpIfinventory("mana", 4, "NormalAttack")
  goto ready
  SpreadAttackcheck:
       TNT1 A 0 A_jumpIfinventory("mana", 15, "SpreadAttack")  
  goto ready
  TrailAttackcheck:
       TNT1 A 0 A_jumpIfinventory("mana", 33, "TrailAttack")  
  goto ready
  Flash:
       SNIF F 3 Bright A_Light2
       SNIF F 3 Bright A_Light1
       SNIF F 0 Bright A_Light0
       Goto LightDone     
       }
}
