Skip to content

03 RandomArtifactPower Constants

Marc Johnston edited this page Jul 26, 2022 · 1 revision

RandomArtifactPower Constants

The RandomArtifactPower constants have been converted into the IActivationPower interface, ActivationPower and DirectionalActivationPower abstract classes.

IActivation Interface

The "Random" prefix was moved into the original "Chance" variable into the RandomChance property. All of the activation actions had a pattern of:

  1. rendering a message to the user, for which a PreActivationMessage property was created,
  2. performing a directional aiming, for which a DirectionalActivationPower base class was created,
  3. rendering a post directional message, for which a PostDirectionalMessage property was created,
  4. performing the activation, for which an Activate method was created that returns a boolean to determine if step 5 is performed,
  5. setting the item recharge time, for which a RechargeTime property was created.

ActivationPowerManager Static Class

This factory class loads all of the IActivationPower classes into a list and provides the ability to find an ActivationPower by type and select a random ActivationPower.

ActivationPower Abstract

All activations make use of this base class.

DirectionalActivationPower Abstract

Activations that used the TargetEngine to allow the player to select a direction, make use of this base class. The base class provides the directional functionality and rendering the PostDirectionalMessage to the player.