Combat Main Menu

At the time the main combat menu is about to be displayed we call special ability scripts named “CombatMainMenu”. These scripts are also called if a combatant moves into another combatant. No actions are taken as a result of this call. The original purpose of this hook is to provide an opportunity for the designer to determine if a “Sweep” attack is possible. The function $ListAdjacentCombatants() was provided at the same time to make this determination easier.


Parameters

Parameter[5] = “Menu” or “Move” depending on whether the Main Menu is about to be displayed or the combatant is about to attack by 'moving' onto another combatant.



Parameter[6] is initially set to the empty string. Your script may set it to a string That is the name of a special action. For example, you might set it to “Sweep”. Then that name will be added to the list of possible action on the Combat Main Menu. Parameter[7] should be set to the index within the name of the letter that can be used by the player to select the action. It should be different from any letter used by other menu selections. For example, you might set parameter[7] to 1 to select the 'W' as the keyboard shortcut for “Sweep”.



If you provide an additional menu selection and the player chooses it then you will probably want to provide a script “CombatSpecialAction” which will be called for each of the characters in the combat. For example, the script for a menu option named 'PUKE' might damage each enemy combatant within a certain range of the active combatant and display the message “Enemies suffer chemical damage”.

Context

Combatant (The combatant about to take some action)

Character (The character associated with that combatant)

Class (The class of that character)