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 void 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.
static void ActivateMedKit(cScenarioPowerup* pPowerup, cCreatureBase* pCreature)
static void ActivateEnergyKit(cScenarioPowerup* pPowerup, cCreatureBase* pCreature)
static void ActivateSpeedBoost(cScenarioPowerup* pPowerup, cCreatureBase* pCreature)
static void ActivateDamageBoost(cScenarioPowerup* pPowerup, cCreatureBase* pCreature)
static void ActivateArmorBoost(cScenarioPowerup* pPowerup, cCreatureBase* pCreature)
static void ActivateMine(cScenarioPowerup* pPowerup, cCombatant* pCombatant)
static void ActivateJumpPad(cScenarioPowerup* pPowerup, cCreatureBase* pCreature)
static void ActivateTeleporter(cScenarioPowerup* pPowerup, cCreatureBase* pCreature)
static void ActivateGate(cCreatureBase* pCreature, cScenarioPowerup* pKeyPowerup, cScenarioPowerup* pGatePowerup)
static void ActivateGrenade(cScenarioPowerup* pPowerup, cCreatureBase* pAttackerCreature)

Constructors, destructors, conversion operators

~cScenarioPowerup() virtual

Public functions

auto ToGameData() -> IGameData* 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.