Combat Special Action


When the 'Special Action' menu item (See: SACombatMainMenu) is chosen by the player, then we call any special ability scripts named 'CombatSpecialAction' which are attached to the active combatant (the attacker). In all cases, the Attacker Context is set to the active character.


The scripts are first called with a fake Target Context whose index is -2.


Then, for each combatant in the combat, the scripts are called with that combatant as the Target Context.. This list of combatants includes the attacker!


Finally, the scripts are called with a fake Target Context whose index is -1.


Each of these calls can perform actions on the attacker and target and can also display a message on the menu line by setting hook parameter[5] to a non-empty string.

Parameters

Parameter[5] = Can be set to a message to be displayed on the menu line.

Context

Combatant (Attacker)

Combatant (Target); or one of two 'fake' combatants – see above.