Simulator::cScenarioPowerup class

Derived classes

class cInteractiveOrnament
Static objects in a planet that the player can interact with, such as pickable objects, skeletons in creature stage,...
class cOrnament
Used, among other things, for adventure objects (except pickable ones)

Public static variables

static const uint32_t TYPE

Public static functions

static auto ReactToPowerup(cGameData* pFirst, cGameData* pSecond, void*) -> void
Called when an object (creatures, and maybe other kinds of objects too?) gets inside the range of activation of a powerup, so this function activates the effects of those powerups.
static auto ActivateMedKit(cScenarioPowerup* pPowerup, cCreatureBase* pCreature) -> void
static auto ActivateEnergyKit(cScenarioPowerup* pPowerup, cCreatureBase* pCreature) -> void
static auto ActivateSpeedBoost(cScenarioPowerup* pPowerup, cCreatureBase* pCreature) -> void
static auto ActivateDamageBoost(cScenarioPowerup* pPowerup, cCreatureBase* pCreature) -> void
static auto ActivateArmorBoost(cScenarioPowerup* pPowerup, cCreatureBase* pCreature) -> void
static auto ActivateMine(cScenarioPowerup* pPowerup, cCombatant* pCombatant) -> void
static auto ActivateJumpPad(cScenarioPowerup* pPowerup, cCreatureBase* pCreature) -> void
static auto ActivateTeleporter(cScenarioPowerup* pPowerup, cCreatureBase* pCreature) -> void
static auto ActivateGate(cCreatureBase* pCreature, cScenarioPowerup* pKeyPowerup, cScenarioPowerup* pGatePowerup) -> void
static auto ActivateGrenade(cScenarioPowerup* pPowerup, cCreatureBase* pAttackerCreature) -> void

Constructors, destructors, conversion operators

~cScenarioPowerup() virtual

Public functions

auto ToGameData() -> cGameData* pure virtual
auto ToSpatialObject() -> cSpatialObject* pure virtual

Public variables

ScenarioPowerupType mPowerupType
ResourceKey mPowerupModel
bool field_14
PropertyListPtr mpPropList
ObjectPtr field_1C
cGameDataPtr field_20
float field_24
float field_28
int mScenarioClassIndex
bool mHasBeenThrown
float mTimeInFlight
cGameDataPtr mpThrowObjective
When you throw the object, this is the object to whom you throw it to. Only used by grenade.

Function documentation

static void Simulator::cScenarioPowerup::ReactToPowerup(cGameData* pFirst, cGameData* pSecond, void*)

Called when an object (creatures, and maybe other kinds of objects too?) gets inside the range of activation of a powerup, so this function activates the effects of those powerups.

Parameters
pFirst
pSecond

This function might be called twice, with the two parameters reversed; Spore activates the powerups when the first parameter is a cScenarioPowerup.

This method will call the ActivateMedKit(), ActivateEnergyKit(), etc methods.