Quick Reference
Getting Information 1
| at() | Where a unit stands, for the AI: its character, or null when it has none (fallen and faded, removed). |
Other 5
| turncoats() | Turncoats. |
| scoreCell() | Weigh one cell: every action the unit has, from there. |
| approach() | With nothing to use from anywhere in reach: the way toward the fight (a healer toward whoever is hurt most). |
| prune() | A think lasts several frames, and the battle goes on between them: a unit that fell just before fades and is… |
| think() | Think. |
Getting Information
at
static sourceAI.at(fight, unit)
Where a unit stands, for the AI: its character, or null when it has none (fallen and faded, removed).
Details
Where a unit stands, for the AI: its character, or null when it has none (fallen and faded, removed). Every use checks.
Actions
begin
static sourceAI.begin(fight, unit, character, battler)
Begin.
forget
static sourceAI.forget()
The next think starts over (the field changed under the plan).
Other
turncoats
static sourceAI.turncoats(fight)
Turncoats.
scoreCell
static sourceAI.scoreCell(fight, unit, index, deadline)
Weigh one cell: every action the unit has, from there.
Details
Weigh one cell: every action the unit has, from there. With a deadline (a clock time) a cell with many
actions is weighed an action at a time: false comes back when the clock ran out with actions still to weigh,
and the same call goes on with the next. Without one the whole cell is weighed. Returns true when it is done.
approach
static sourceAI.approach(fight, unit, character, deadline)
With nothing to use from anywhere in reach: the way toward the fight (a healer toward whoever is hurt most).
prune
static sourceAI.prune(fight)
A think lasts several frames, and the battle goes on between them: a unit that fell just before fades and is erased, one may be removed.
Details
A think lasts several frames, and the battle goes on between them: a unit that fell just before fades and is erased, one may be removed. Each time the think resumes, everyone who has no place on the map any more leaves the pools (with what was kept beside them), so nothing below meets a unit without a character.
think
static sourceAI.think(fight, unit, character)
Think.