Programming the FFXII Gambit System
Created on 2023-06-05T02:09:52-05:00
Gambits are a list of actions where each entry has a position in the list and whether its enabled or not. The list is advanced over and considered first by a condition, then by whether the desired action would veto itself, and finally the action is sent down to the character.
Conditions set when processing advances to the action step. These include conditions like "any friendly has this specific negative status effect" or "nearest enemy."
Actions are using a potion, skill, spell effect, or just run up and stab someone.
Actions can disqualify themselves if they are invalid; execution returns to the gambit list and advances as though the condition had vetoed this step. Typically done if the action is nonsense--trying to resurrect someone who is not dead.