Skip to content

Actions

Sandrem edited this page Dec 25, 2017 · 3 revisions

(for version 0.3.2)

New action is created as child of class "ActionsList.GenericAction"

Fields:

  • Name - is used in "Perform action" window.
  • EffectName - is used in "Apply dice modifications" window.
  • ImageUrl - path to tooltip image (is used for actions from cards).
  • Host - GenericShip. Pay attention that this value is not set automatically, must be set manually for custom actions.
  • Source - GenericUpgrade. Pay attention that this value is not set automatically, must be set manually for custom actions.
  • Flag "IsCritCancelAction" - is used by actions listed on Critical Hit cards.
  • Flag "IsSpendFocus" - for restrictions (Carnor Jax).
  • Flag "IsSpendEvade" - for restrictions.
  • Flag "IsReroll" - for restrictions (Dark Curse).
  • Flag "IsSpendTargetLock" - for restictions.
  • Flags "IsTurnsOneFocusIntoSuccess" and "IsTurnsAllFocusIntoSuccess" are used by AI on "Apply dice modifications" step.
  • Flag "IsOpposite" is used if this is dice modification of opponent's dice (like Elusiveness elite).
  • Flag "CanBePerformedWhileStressed" - stress doesn't prevent this action (like Primed Thrusters tech).

Method "ActionTake"

  • Called when action is selected in "Perform action" window.
  • Here tokens are assigned for ships during Focus and Evade actions.
  • Call "Phases.CurrentSubPhase.CallBack()" when all is done.

Method "GetActionPriority" is used by AI to get priority of action. See list of values in GenericAction.cs

Method "ActionEffect"

  • Called when effect of performed action is selected in "Apply dice modifications" window.
  • Here tokens are spent for effects.
  • Here thrown dices are modified.
  • Call "callBack" when all is done.

Method "GetActionEffectPriority" is used by AI to get priority of dice modification effect. See list of values in GenericAction.cs

Method "IsActionEffectAvailable"

  • Returns "true" if action effect can be used now (For example, "Evade" token can be used only during defence).