Jazz2::Actors::Bosses::BossBase class

Base class of an enemy boss.

A boss is a powerful, level-ending enemy with a large health pool shown on a dedicated health bar. Defeating it typically completes the level and shows the level's end text.

Base classes

class Jazz2::Actors::Enemies::EnemyBase
Base class of an enemy.

Derived classes

class Bilsy
Bilsy (boss).
class Bolly
Bolly (boss).
class Bubba
Bubba (boss).
class Devan
Devan (boss).
class DevanRemote
Devan with remote control (boss).
class Queen
Queen (boss).
class TurtleBoss
Turtle (boss).
class Uterus
Uterus (boss).

Public functions

auto OnActivatedBoss() -> bool pure virtual
Called when the boss is activated.
void OnDeactivatedBoss() virtual
Called when the boss is deactivated.
auto OnPlayerDied() -> bool virtual
Called when a player died, returns true if the boss was deactivated.

Protected functions

auto IsSerializable() const -> bool override
Returns true if the live state of the object can be stored in a level state snapshot.
auto OnTileDeactivated() -> bool override
Called when corresponding tile should be deactivated.
void SetHealthByDifficulty(std::int32_t health) override
Sets the enemy's health scaled by the current game difficulty.

Function documentation

bool Jazz2::Actors::Bosses::BossBase::IsSerializable() const override protected

Returns true if the live state of the object can be stored in a level state snapshot.

A snapshot stores the event type and parameters the object was spawned with together with its live state, so the object can be spawned again and resurrected exactly as it was. That works only for objects spawned from an event (see ActorActivationDetails::Type) which is registered in Events::EventSpawner. Objects that are not worth restoring (e.g., short-lived effects) can opt out by overriding it.