GetNumberOfAttacks





During combat, a combatant is allowed a certain number of attacks per round. At the start of each combat round this number is computed and stored in a variable called 'Available Attacks' and is decremented each time the combatant executes an attack. When the variable becomes zero then the combatant's turn is finished. At character creation time, each character is given value called 'Number of Attacks' that is used as the default value for 'Available Attacks' when he enters a combat round.

This script can override the value of either of these numbers.

At character creation time this script is called and the result is used to set the value of 'Number of attacks'.

At the start of each combat round, this script is called and the result is used to set the value of 'Available Attacks'.

There can be multiple scripts by this name attached to multiple Special Abilities. Each script can supply an answer in MinMax Format . The resulting maximum after all such scripts are called is the value assigned to the combatant's 'Available Attacks' for that round of combat(in the case of combat) or to the character's 'Number of Attacks' (in the case of character creation). As an example, suppose we want a spell that gives the caster five attacks.


Warning: During character creation there is no possible 'Combatant' context. If you supply this hook attached to a character's Special Ability then your hook will be called without a Combatant Context. You can determine that this is happening by having your script examine the Special Ability that triggered the script. Be sure to give the character's special ability a different name or parameter than you give to the combatant so that your script can differentiate the two cases.

Note: This script cannot change the 'Available Attacks' after a round has started. It is only called at the start of each round of combat, not during the round. For example, if a spell is intended to increase or decrease a target's 'Available Attacks' immediately within a round of combat, it should use the function $COMBATANT_AVAILATTACKS(actor, value, function).

Parameters



Hook Parameter [5] = Current default value of 'Number of Attacks' or 'Available Attacks'

Context