Namespace in reactor_fight_tactical.js

In

9 functions in 3 groups · hide internal

A Tactical battle on a 2D map.

Quick Reference

Getting Information 1

pick() The cell under a screen point: through the 3D camera onto the ground on a 3D map, the tile on a 2D one.

Updating & Drawing 2

updateThreatKey() T while a command, skill or item list is up (the map's keys are not read then): every enemy's reach is shown…
update() Update.

Other 6

used() A command used this frame's press: the keys are not read again until the next.
bindThreat() Bind threat.
unitOnRay() The unit a ray meets first (origin and direction in tiles: x east, y up, z south): a unit of one cell is a bo…
confirm() Confirm.
cancel() Cancel.
cycle() The cursor to the next unit that can be picked, or the next target in range.

Getting Information

pick

static source
In.pick(x, y)

The cell under a screen point: through the 3D camera onto the ground on a 3D map, the tile on a 2D one.

Updating & Drawing

updateThreatKey

static source
In.updateThreatKey(fight)

T while a command, skill or item list is up (the map's keys are not read then): every enemy's reach is shown and hidden as at any other of the player's stages.

Details

T while a command, skill or item list is up (the map's keys are not read then): every enemy's reach is shown and hidden as at any other of the player's stages. Called once a frame by the battle's update.

update

static source
In.update(fight)

Update.

Other

used

static source
In.used()

A command used this frame's press: the keys are not read again until the next.

bindThreat

static source
In.bindThreat(on)

Bind threat.

unitOnRay

static source
In.unitOnRay(fight, ox, oy, oz, dx, dy, dz)

The unit a ray meets first (origin and direction in tiles: x east, y up, z south): a unit of one cell is a box as tall as it stands, a bigger one its hull (rayHull).

Details

The unit a ray meets first (origin and direction in tiles: x east, y up, z south): a unit of one cell is a box as tall as it stands, a bigger one its hull (rayHull). A hull met low (its rim) gives way to whoever of one cell stands on the ground the ray comes down on: their feet and the ring under them are theirs, not the hull's they stand by. The cell of its body nearest where the ray meets it and the height it stands at are left in picked. Null when the ray meets nobody.

confirm

static source
In.confirm(fight)

Confirm.

cancel

static source
In.cancel(fight)

Cancel.

cycle

static source
In.cycle(fight, step)

The cursor to the next unit that can be picked, or the next target in range.