Namespace in reactor_fight_tactical.js
F
42 public functions in 5 groups · show internal (_) functions
Quick Reference
Getting Information 2
| heightInReach() | Whether an action's reach covers the height between two stands: anything that reaches 2 or more does; a blow… |
| heightReach() | How height adds to an action's reach: its own rule (F.tactics), else the project's, else every two levels a t… |
Checks (True / False) 2
| isBig() | Whether it is big. |
| canFace() | Whether a unit may turn to face d where it stands. |
Actions 4
| moveOf() | Tiles a unit moves in a turn: its event's own Move when it sets one, else its tags, else 4. |
| jumpOf() | Levels a unit climbs in one step (3D maps). |
| forgetFootprints() | Every body is measured again when next asked about (a battle starts, a map's data changed), and so is the gro… |
| setPace() | The player's choice of pace, kept with the game's options. |
Updating & Drawing 1
| stepsTo() | Steps to. |
Other 33
| key() | Key. |
| readHeightReach() | A stored height rule, { levels, most } held to F.HEIGHT_REACH_LIMITS, or null when it is not one. |
| reachAt() | The furthest an action reaches from from down (or up) to ground at to. |
| parseTactics() | The tactical tags of one note (range, area, los, move, jump, ai), or null when it has none. |
| recordTactics() | A record's tactical settings: its own rrBattle (what the Database's Tactical Battles card stores: { range: {… |
| tactics() | Where a skill or an item reaches when this battler uses it: { min, max, area: { shape, size }, los }. |
| aiOf() | How an AI unit decides: its <ai:> tag (actor or enemy), else aggressive. |
| grappleSpec() | A record's grapple (its rrGrapple) with every setting in range, or null when it has none. |
| grappleSounds() | Grapple sounds. |
| grappleOf() | The grapple a unit wears (the furthest reaching of its equipment's), whether or not it may use it now; null w… |
| grappleFor() | The grapple a unit may use this turn: worn, uses left, and its cooldown over. |
| grappleSight() | Whether a line from the eye of a unit on cell (x, y) at from reaches a grapple edge (ReactorPhysics.grappleTa… |
| grappleTargets() | The edges a unit wearing grapple takes hold of from its cell at from: ReactorPhysics.grappleTargets, on tiles… |
| rimOf() | Rim of. |
| flatFit() | What a flat map's picture of this character is scaled by: 1 for anyone who is no unit of a Tactical battle he… |
| flatLight() | How much light a flat map's picture of this character gets on top of its own: F.FLAT_LIGHT for a unit of a Ta… |
| unitHeight() | How tall a unit stands, in tiles (kept with its body: read as often as wanted). |
| footprint() | The cells a unit stands on: { ox, oy, w, h }, its first cell from the character's own and its size, as it fac… |
| footprintFacing() | The same when the unit faces d (2, 4, 6, 8); the object is shared with F.footprint. |
| turnsBody() | Whether a unit's body is another shape when it faces another way (a long vehicle). |
| footprintSource() | Where a unit's body comes from: "size" (typed on the event), "model", "picture", "pending" (its model is on i… |
| overhang() | The cells under what sticks out of a unit's body as it faces now (a gun's barrel), [dx, dy, ...] from the cha… |
| overhangFacing() | The same when the unit faces d (2, 4, 6, 8). |
| overhangAt() | The unit whose overhang is over a cell at about height h (any height without one); null when nobody's is. |
| covers() | Whether a unit standing at (ux, uy) covers cell (x, y). |
| nearestCell() | Nearest cell. |
| squareHulls() | A long body is drawn the way its cells lie. |
| settleUnit() | A big unit whose body does not fit where it stands (inside a wall or a structure, over another unit) is put o… |
| settleOut() | A unit standing on a cell another unit's body covers, or under what sticks out of one, is put on the nearest… |
| settle() | Every unit takes room it can have: big bodies first (each to the nearest place it fits), then anyone left sta… |
| lethalAllowed() | Whether a unit's way may end in a fall that leaves it with no HP: only the player's own unit on its own turn,… |
| standOnLift() | An event the map lifts over the ground (its height in the 3D view: reactor3d.eventZ) onto a roof, a deck or a… |
| pace() | Pace. |
Getting Information
heightInReach
static sourceF.heightInReach(tactics, from, to)
Whether an action's reach covers the height between two stands: anything that reaches 2 or more does; a blow from beside does not climb.
heightReach
static sourceF.heightReach(tactics)
How height adds to an action's reach: its own rule (F.tactics), else the project's, else every two levels a tile, up to three.
Checks (True / False)
isBig
static sourceF.isBig(unit)
Whether it is big.
canFace
static sourceF.canFace(fight, unit, d)
Whether a unit may turn to face d where it stands.
Details
Whether a unit may turn to face d where it stands. One whose body is the same shape every way always may; a
long one only where the turned body fits (no wall, no other unit under it), where a half turn has a quarter
turn to swing through, and not while its own action plays.
Actions
moveOf
static sourceF.moveOf(unit)
Tiles a unit moves in a turn: its event's own Move when it sets one, else its tags, else 4.
jumpOf
static sourceF.jumpOf(unit)
Levels a unit climbs in one step (3D maps).
forgetFootprints
static sourceF.forgetFootprints()
Every body is measured again when next asked about (a battle starts, a map's data changed), and so is the ground under them.
setPace
static sourceF.setPace(pace)
The player's choice of pace, kept with the game's options.
Details
The player's choice of pace, kept with the game's options. Returns the pace in force.
Updating & Drawing
stepsTo
static sourceF.stepsTo(unit, ux, uy, x, y)
Steps to.
Other
key
static sourceF.key(name)
Key.
readHeightReach
static sourceF.readHeightReach(value)
A stored height rule, { levels, most } held to F.HEIGHT_REACH_LIMITS, or null when it is not one.
reachAt
static sourceF.reachAt(tactics, from, to)
The furthest an action reaches from from down (or up) to ground at to.
parseTactics
static sourceF.parseTactics(note)
The tactical tags of one note (range, area, los, move, jump, ai), or null when it has none.
recordTactics
static sourceF.recordTactics(record)
A record's tactical settings: its own rrBattle (what the Database's Tactical Battles card stores: { range: { min, max }, area: { shape, size }, los, move, jump, ai }, each optional), and for whatever that leaves unset the tags of its note.
Details
A record's tactical settings: its own rrBattle (what the Database's Tactical Battles card stores:
{ range: { min, max }, area: { shape, size }, los, move, jump, ai }, each optional), and for whatever that
leaves unset the tags of its note. Null when it sets nothing either way.
tactics
static sourceF.tactics(battler, item)
Where a skill or an item reaches when this battler uses it: { min, max, area: { shape, size }, los }.
Details
Where a skill or an item reaches when this battler uses it: { min, max, area: { shape, size }, los }.
Each of range, area and line of sight is the record's own setting (its rrBattle, else its tag), else (the battler's attack skill and
any physical skill aimed at the other side) the first equipped weapon's, else the default: a weapon's
reach by its type, 1 unarmed, and by Scope for everything else. The object is shared: do not change it.
aiOf
static sourceF.aiOf(unit)
How an AI unit decides: its <ai:> tag (actor or enemy), else aggressive.
grappleSpec
static sourceF.grappleSpec(record)
A record's grapple (its rrGrapple) with every setting in range, or null when it has none.
grappleSounds
static sourceF.grappleSounds(value)
Grapple sounds.
grappleOf
static sourceF.grappleOf(fight, unit)
The grapple a unit wears (the furthest reaching of its equipment's), whether or not it may use it now; null without one or on a vehicle.
grappleFor
static sourceF.grappleFor(fight, unit)
The grapple a unit may use this turn: worn, uses left, and its cooldown over.
Details
The grapple a unit may use this turn: worn, uses left, and its cooldown over. Null otherwise.
grappleSight
static sourceF.grappleSight(x, y, from, target)
Whether a line from the eye of a unit on cell (x, y) at from reaches a grapple edge (ReactorPhysics.grappleTargets): no tile that hides what is behind it on the way, and nothing of the world or a model in front of the edge.
grappleTargets
static sourceF.grappleTargets(fight, unit, character, from, grapple)
The edges a unit wearing grapple takes hold of from its cell at from: ReactorPhysics.grappleTargets, on tiles that let it onto the top from that side, onto a top a body stops on, and with a clear line from its eye to the edge (F.grappleSight: the hook flies there).
rimOf
static sourceF.rimOf(tall)
Rim of.
flatFit
static sourceF.flatFit(character)
What a flat map's picture of this character is scaled by: 1 for anyone who is no unit of a Tactical battle here.
Details
What a flat map's picture of this character is scaled by: 1 for anyone who is no unit of a Tactical battle here. Eased, and kept per character.
flatLight
static sourceF.flatLight(character)
How much light a flat map's picture of this character gets on top of its own: F.FLAT_LIGHT for a unit of a Tactical battle here, else 0.
unitHeight
static sourceF.unitHeight(unit)
How tall a unit stands, in tiles (kept with its body: read as often as wanted).
footprint
static sourceF.footprint(unit)
The cells a unit stands on: { ox, oy, w, h }, its first cell from the character's own and its size, as it faces now.
Details
The cells a unit stands on: { ox, oy, w, h }, its first cell from the character's own and its size, as it
faces now. The object is shared: read it before the next call.
footprintFacing
static sourceF.footprintFacing(unit, d)
The same when the unit faces d (2, 4, 6, 8); the object is shared with F.footprint.
turnsBody
static sourceF.turnsBody(unit)
Whether a unit's body is another shape when it faces another way (a long vehicle).
footprintSource
static sourceF.footprintSource(unit)
Where a unit's body comes from: "size" (typed on the event), "model", "picture", "pending" (its model is on its way) or "".
overhang
static sourceF.overhang(unit)
The cells under what sticks out of a unit's body as it faces now (a gun's barrel), [dx, dy, ...] from the character's own cell; null for a body nothing sticks out of.
Details
The cells under what sticks out of a unit's body as it faces now (a gun's barrel), [dx, dy, ...] from the
character's own cell; null for a body nothing sticks out of. They are not the unit's (it is not struck or
picked on them); nobody else stands on them, and the unit needs them free. Shared: not to be changed.
overhangFacing
static sourceF.overhangFacing(unit, d)
The same when the unit faces d (2, 4, 6, 8).
overhangAt
static sourceF.overhangAt(fight, x, y, except, h)
The unit whose overhang is over a cell at about height h (any height without one); null when nobody's is.
covers
static sourceF.covers(unit, ux, uy, x, y)
Whether a unit standing at (ux, uy) covers cell (x, y).
nearestCell
static sourceF.nearestCell(unit, ux, uy, x, y)
Nearest cell.
squareHulls
static sourceF.squareHulls()
A long body is drawn the way its cells lie.
Details
A long body is drawn the way its cells lie. Whoever turns a unit toward a target an eighth of a turn further than it faces (an aim, eight ways) turns a figure on its cell; a hull drawn that way would lie across cells that are not its own. Once a frame while the battle runs, for the long bodies only.
settleUnit
static sourceF.settleUnit(fight, unit, quiet, asPut)
A big unit whose body does not fit where it stands (inside a wall or a structure, over another unit) is put on a place it does, no further than F.SETTLE_REACH cells off: the nearest it can get to the fight from (the nearest few separate places are asked), else the nearest; facing as it faced where that fits.
Details
A big unit whose body does not fit where it stands (inside a wall or a structure, over another unit) is put
on a place it does, no further than F.SETTLE_REACH cells off: the nearest it can get to the fight from (the
nearest few separate places are asked), else the nearest; facing as it faced where that fits. With no place
in reach it stays where it was put, and the battle says so. asPut: the battle begins and the units stand as
their author put them: a body is given room among walls, things and other bodies, and whoever of one cell
stands under it steps aside afterwards (settleOut), so a hull is not sent off for a soldier put at its corner.
quiet: nothing goes on the banner. Returns { x, y } when it was moved or turned.
settleOut
static sourceF.settleOut(fight, unit)
A unit standing on a cell another unit's body covers, or under what sticks out of one, is put on the nearest free cell.
Details
A unit standing on a cell another unit's body covers, or under what sticks out of one, is put on the nearest free cell. Returns { x, y } when it was moved.
settle
static sourceF.settle(fight, only, asPut)
Every unit takes room it can have: big bodies first (each to the nearest place it fits), then anyone left standing inside one.
Details
Every unit takes room it can have: big bodies first (each to the nearest place it fits), then anyone left
standing inside one. only names the units to look at (those measured anew); without it, all. asPut: the
battle is beginning (see settleUnit). Units on their way somewhere are left for later. Returns how many
were moved.
lethalAllowed
static sourceF.lethalAllowed(fight, unit)
Whether a unit's way may end in a fall that leaves it with no HP: only the player's own unit on its own turn, where the project allows it (Database › System 2 › Physics › Lethal jumps: Ask first, or Allowed without asking).
Details
Whether a unit's way may end in a fall that leaves it with no HP: only the player's own unit on its own turn, where the project allows it (Database › System 2 › Physics › Lethal jumps: Ask first, or Allowed without asking). A unit that decides for itself never takes one.
standOnLift
static sourceF.standOnLift(character)
An event the map lifts over the ground (its height in the 3D view: reactor3d.eventZ) onto a roof, a deck or a wall top stands ON that place in a battle: the level of its cell nearest its lifted height becomes the ground it stands on, and the lift is spent.
Details
An event the map lifts over the ground (its height in the 3D view: reactor3d.eventZ) onto a roof, a deck or
a wall top stands ON that place in a battle: the level of its cell nearest its lifted height becomes the
ground it stands on, and the lift is spent. One lifted to no place to stand (a bird, a lamp) is left as it is.
pace
static sourceF.pace()
Pace.