Classes:BaronOfHell

From ZDoom Wiki
Jump to navigation Jump to search
Note: Wait! Stop! Before you copy this actor's definition into your mod, remember the following things:
  1. You do NOT need to copy that actor, since it is already defined.
  2. In fact, it's not just useless, it will cause problems.
  3. If you want to modify it, or use a modified version, using inheritance is the way to go.
  4. The actor definitions here are put on the wiki for reference purpose only. Learn from them, don't copy them.
Baron of Hell
Actor type Monster Game MiniDoomLogoIcon.png (Doom)
DoomEd Number 3003 Class Name BaronOfHell
Spawn ID 3 Identifier T_BARON


Classes: BaronOfHell
 →HellKnight
  →StealthHellKnight
 →StealthBaron


The Baron of Hell is akin to the Hell Knight, but has twice as much health. A pair of Barons serve as the endbosses for the first episode of Doom before becoming a far more common foe later on in the series.

ZScript definition

Note: The ZScript definition below is for reference and may be different in the current version of GZDoom.The most up-to-date version of this code can be found on GZDoom GitHub.
class BaronOfHell : Actor
{
	Default
	{
		Health 1000;
		Radius 24;
		Height 64;
		Mass 1000;
		Speed 8;
		PainChance 50;
		Monster;
		+FLOORCLIP
		+BOSSDEATH
		SeeSound "baron/sight";
		PainSound "baron/pain";
		DeathSound "baron/death";
		ActiveSound "baron/active";
		Obituary "$OB_BARON";
		HitObituary "$OB_BARONHIT";
		Tag "$FN_BARON";
	}
	States
	{
	Spawn:
		BOSS AB 10 A_Look ;
		Loop;
	See:
		BOSS AABBCCDD 3 A_Chase;
		Loop;
	Melee:
	Missile:
		BOSS EF 8 A_FaceTarget;
		BOSS G 8 A_BruisAttack;
		Goto See;
	Pain:
		BOSS H  2;
		BOSS H  2 A_Pain;
		Goto See;
	Death:
		BOSS I  8;
		BOSS J  8 A_Scream;
		BOSS K  8;
		BOSS L  8 A_NoBlocking;
		BOSS MN 8;
		BOSS O -1 A_BossDeath;
		Stop;
	Raise:
		BOSS O 8;
		BOSS NMLKJI 8;
		Goto See;
	}
}

extend class Actor
{
	void A_BruisAttack()
	{
		let targ = target;
		if (targ)
		{
			if (CheckMeleeRange())
			{
				int damage = random[pr_bruisattack](1, 8) * 10;
				A_StartSound ("baron/melee", CHAN_WEAPON);
				int newdam = target.DamageMobj (self, self, damage, "Melee");
				targ.TraceBleed (newdam > 0 ? newdam : damage, self);
			}
			else
			{
				// launch a missile
				SpawnMissile (target, "BaronBall");
			}
		}
	}
}

DECORATE definition

Note: This is legacy code, kept for archival purposes only. DECORATE is deprecated in GZDoom and is completely superseded by ZScript. GZDoom internally uses the ZScript definition above.
ACTOR BaronOfHell
{
  Health 1000
  Radius 24
  Height 64
  Mass 1000
  Speed 8
  PainChance 50
  Monster
  +FLOORCLIP
  +BOSSDEATH
  SeeSound "baron/sight"
  PainSound "baron/pain"
  DeathSound "baron/death"
  ActiveSound "baron/active"
  Obituary "$OB_BARON"
  HitObituary "$OB_BARONHIT"
  States
  {
  Spawn:
    BOSS AB 10 A_Look
    Loop
  See:
    BOSS AABBCCDD 3 A_Chase
    Loop
  Melee:
  Missile:
    BOSS EF 8 A_FaceTarget
    BOSS G 8 A_BruisAttack
    Goto See
  Pain:
    BOSS H 2
    BOSS H 2 A_Pain
    Goto See
  Death:
    BOSS I 8
    BOSS J 8 A_Scream
    BOSS K 8
    BOSS L 8 A_NoBlocking
    BOSS MN 8
    BOSS O -1 A_BossDeath
    Stop
  Raise:
    BOSS O 8
    BOSS NMLKJI 8
    Goto See
  }
}