actor BaronOfHellClass : Playerpawn
{
  health 1000
  radius 24
  height 64
  mass 1000
  speed 0.40
  painchance 50
  Player.DisplayName "BaronOfHell"
  Player.MaxHealth 1000
  Player.ViewHeight 54
  Player.SoundClass BaronOfHellClass 
  Player.JumpZ 5
  Player.MorphWeapon "BaronHand"
  Player.WeaponSlot 1, BaronHand
  BloodColor "darkgreen"
  
  DamageFactor "MarineDamage", 0.85
  DamageFactor "MarineRLDamage", 0.85
  DamageFactor "MarineRail", 0.65
  DamageFactor "CybRLDamage", 0.2
  DamageFactor "ImpBallDamage", 0
  DamageFactor "CacoDamage", 0
  DamageFactor "SkelDamage", 0
  DamageFactor "FatsoDamage", 0
  DamageFactor "KnightDamage", 0
  DamageFactor "ArachDamage", 0
  DamageFactor "viledamage", 0
  DamageFactor "Control", 0
  DamageFactor "ZombiesDamage", 0
  DamageFactor "Slime", 0
  
  -PICKUP
  +NOSKIN
  +NOPAIN
  -FRIENDLY
  +NOTARGET
  states
  {
  Spawn:
	BOSS AB 10 
    loop
  See:
    BOSS A 0 A_Jump (240,2)
    BOSS A 0 A_PlaySoundEx ("baron/active","body")
    BOSS AABBCCDD 3
    loop
  Missile:
    BOSS E 9 
    BOSS F 9 bright 
    BOSS G 9 bright
    goto See   
  Death:
    BOSS I 0 ACS_ExecuteAlways(426,0,6)
    BOSS I 8 A_GiveToTarget ("MarineExp",7)
    BOSS J 8 A_PlaySoundEx ("baron/death","body")
    BOSS K 8 A_NoBlocking
    BOSS LMN 8 
    TNT1 A 0 A_SpawnItemEx ("MDeathGhost",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
  DeathWait:
    BOSS O  2 A_CheckSight("Removecorpse")
    loop
  Removecorpse:
    TNT1 A 0 Thing_Remove (0)
    stop	
  }
}

// Weapon

ACTOR BaronHand : Weapon
{
  obituary "%o was bruised by %k."
  hitobituary "%o was ripped open by %k."
  weapon.kickback 100
  attacksound "baron/melee"
  weapon.ammouse 0
  +WEAPON.NOALERT
  +ammo_optional
  +Alt_Ammo_Optional
  +WEAPON.CHEATNOTWEAPON
  +INVENTORY.UNDROPPABLE

  states
  {
  Spawn:
    TNT1 A 0 Thing_Remove (0)
    Stop
  Select:
    BHND A 1 A_Raise
    goto ready
  Ready:
    BHND FAEA 2 A_WeaponReady
    TNT1 A 0 A_JumpIfInventory ("Mskull",0,6)
    BHND FAEA 2 A_WeaponReady
    TNT1 A 0 A_JumpIfInventory ("Mskull",3,1)
    Loop
    TNT1 A 0 HealThing(3)
    goto ready 
  DeSelect:
    BHND A 1 A_Lower
    Loop
  Fire:
    BHND A 0 A_JumpIfCloser (80,"Melee")
    BHND A 6 ACS_ExecuteAlways(426,0,5)
    BHND B 6
    BHND C 6
    BHND D 6 bright A_FireCustomMissile ("KnightBallAd",0,0,0,9,0)
    BHND CB 4 ACS_ExecuteAlways(426,0,6)
    Goto Ready
  Melee:
    BHND B 4 
    BHND C 4 
    BHND D 4 A_CustomPunch (16,0,0,"FBulletPuff",90)
    BHND C 4
    Goto Ready
  Altfire:
    BHND A 5 ACS_ExecuteAlways (419,0,12)
    goto Ready
  }
}

actor KnightBallAd : MBaronBall
{
  radius 12
  speed 19
  damage 9
  states
  {
  Spawn:
    BAL7 AB 4 bright
    loop
  Death:
    BAL7 C 5 A_Explode (12,64,0,0)
    BAL7 DE 5 bright
    stop
  }
}

// Belphegor

actor BelphegorClass : Playerpawn
{
  Health 1500
  radius 24
  height 64
  mass 1000
  speed 0.40
  painchance 50
  Player.DisplayName "Belphegor"
  Player.MaxHealth 1500
  Player.ViewHeight 54
  Player.SoundClass BaronOfHellClass 
  Player.JumpZ 5
  Player.MorphWeapon "BelphegorHand"
  Player.WeaponSlot 1, BelphegorHand
  BloodColor "darkgreen"
  
  DamageFactor "MarineDamage", 0.9
  DamageFactor "MarineRLDamage", 0.9
  DamageFactor "MarineRail", 0.8
  DamageFactor "CybRLDamage", 0.2
  DamageFactor "ImpBallDamage", 0
  DamageFactor "CacoDamage", 0
  DamageFactor "SkelDamage", 0
  DamageFactor "FatsoDamage", 0
  DamageFactor "KnightDamage", 0
  DamageFactor "ArachDamage", 0
  DamageFactor "viledamage", 0
  DamageFactor "Control", 0
  DamageFactor "ZombiesDamage", 0
  DamageFactor "Slime", 0
  
  -PICKUP
  +NOSKIN
  +NOPAIN
  -FRIENDLY
  +NOTARGET
  states
  {
  Spawn:
	BOS3 AB 10 
    loop
  See:
    BOS3 A 0 A_Jump (240,2)
	BOS3 A 0 A_PlaySoundEx ("baron/active","body")
	BOS3 AABBCCDD 3
    loop
  Missile:
    BOS3 A 0 A_JumpIfCloser (80,"Melee")
    BOS3 EF 4 
    BOS3 G 6 bright
    BOS3 EF 4 
    BOS3 G 6 bright
    BOS3 EF 4 
    BOS3 G 6 bright
    BOS3 E 8
    goto See
  Melee:
    BOS3 E 4 
    BOS3 F 4 
    BOS3 G 4
    BOS3 G 5
    Goto See  
  Death:
    BOS3 I 0 ACS_ExecuteAlways(426,0,6)
    BOS3 I 8 A_GiveToTarget ("MarineExp",7)
    BOS3 J 8 A_PlaySoundEx ("baron/death","body")
    BOS3 K 8 A_NoBlocking
    BOS3 LMN 8 
    TNT1 A 0 A_SpawnItemEx ("MDeathGhost",0,0,0,0,0,0,0,SXF_NOCHECKPOSITION,0)
  DeathWait:
    BOS3 O  2 A_CheckSight("Removecorpse")
    loop
  Removecorpse:
    TNT1 A 0 Thing_Remove (0)
	stop	
  }
}

// Weapon

ACTOR BelphegorHand : Weapon
{
  obituary "$OB_BELPHEGOR"
  hitobituary "$OB_BELPHEGOR_MELEE"
  weapon.kickback 100
  attacksound "baron/melee"
  weapon.ammouse 0
  +WEAPON.NOALERT
  +ammo_optional
  +Alt_Ammo_Optional
  +WEAPON.CHEATNOTWEAPON
  +INVENTORY.UNDROPPABLE

  states
  {
  Spawn:
    TNT1 A 0 Thing_Remove (0)
    Stop
  Select:
    BHND A 1 A_Raise
    goto ready
  Ready:
    BHND FAEA 2 A_WeaponReady
    TNT1 A 0 A_JumpIfInventory ("Mskull",0,6)
    BHND FAEA 2 A_WeaponReady
    TNT1 A 0 A_JumpIfInventory ("Mskull",3,1)
    Loop
    TNT1 A 0 HealThing(3)
    goto ready 
  DeSelect:
    BHND A 1 A_Lower
    Loop
  Fire:
    BHND A 0 A_JumpIfCloser (80,"Melee")
    BHND B 4
    BHND C 4 ACS_ExecuteAlways(426,0,5)
    BHND D 4 bright A_FireCustomMissile ("PBelphegorBall",0,0,0,9,0)
    BHND C 2
    BHND BC 4 
    BHND D 4 bright A_FireCustomMissile ("PBelphegorBall",0,0,0,9,0)
    BHND C 2
    BHND BC 4 
    BHND D 4 bright A_FireCustomMissile ("PBelphegorBall",0,0,0,9,0)
    BHND D 4 ACS_ExecuteAlways(426,0,6)
    BHND CBA 4
    Goto Ready
  Melee:
    BHND B 4 
    BHND C 4 
    BHND D 4 A_CustomPunch (16,0,0,"FBulletPuff",90)
    BHND C 4
    Goto Ready
  Altfire:
    BHND A 5 ACS_ExecuteAlways (419,0,27)
    goto Ready
  }
}

actor PBelphegorBall : MBelphegorBall
{
  radius 10
  damage 8
  states
  {
  Spawn:
    BAL7 AB 4 bright
    loop
  Death:
    BAL7 C 5 A_Explode (4,64,0,0)
    BAL7 DE 5 bright
    stop
  }
}