Skip to content

How to add activated ability (dice modification effect)

Michael Speth edited this page Oct 18, 2017 · 1 revision

(Version 0.1.2)

LukeSkywalker is used as example

  1. New Action is created - LukeSkywalkerAction.
  2. In "InitializePilot" we subscribe AfterGenerateAvailableActionEffectsList event.
  3. In "AddLukeSkywalkerPilotAbility" we create new instance of our new action and call host's "AddAvailableActionEffect" to add our action to list of available dice modification effect. It will not be added if this dice modification effect is already used for current dices.

LukeSkywalkerAction:

  1. Initialized
    1. Name is set
    2. IsTurnsOneFocusIntoSuccess is set for AI
  2. This ability is not activated as action, to "ActionTake" is not used.
  3. In "IsActionEffectAvailable" we check if this dice modification can be used:
    1. It can be used if Combat's step is "Defence"
  4. In "ActionEffect":
    1. Take combat's current dices and change one focus to one success (for defence dices this is evade side)
    2. When everything is done, "callBack" is called.
  5. "GetActionPriority" is used to set priority of action for AI.