Namespace in reactor_fight_tactical.js

Game_Fight

138 public functions in 7 groups · show internal (_) functions

A Tactical battle on a 2D map.

Familiar territory. Game_Fight keeps the RPG Maker MZ API, so existing MZ knowledge, tutorials and plugin code apply. Reactor's additions are marked with descriptions below.

Quick Reference

Setup & Creation 1

ensureFlood() The grid's buffers hold this unit's flood for that budget (cached until a unit moves).

Getting Information 1

currentTeam() The current team.

Checks (True / False) 13

isTactical() A tactical battle is running (here or on a map the party left it on).
isPlayerUnit() Whether the player gives this unit its orders: an actor on the party's side, unless it fights by itself.
isArmy() An army: a battle that has had more than F.ARMY units standing.
isWatched() Whether the units that decide for themselves take their turns one at a time, each one watched: the normal pac…
isCrowded() Whether the units that decide for themselves act quick: a crowd at the fast pace (and in an army at the norma…
canDetach() Whether it can detach.
canOverwatch() Whether it can overwatch.
isOnOverwatch() Whether it is on overwatch.
canGrapple() Grapple, as a command: offered while the unit has not moved, wears a grapple it may use now (F.grappleFor) an…
canUndoMove() Whether it can undo move.
canAuto() Whether the battle menu offers Auto now: team turns, at "Choose a unit", with two or more units still to act.
canRetreat() Whether the player may leave this battle now (a battle started with Can Escape).
hasTargets() Whether an action the acting unit would use from where it stands has anyone to land on.

Actions 25

clear() Clear.
start() Start.
finish() Finish.
spawn() Spawn.
startRound() Starts the round.
beginPick() Team turns: the player chooses which unit goes next.
beginUnit() Begin unit.
finishAct() Finish act.
startWalk() Starts the walk.
takeStep() Take step.
beginSideAction() A unit's action beside the others: a quick run of its own, with the same events as any action.
endMover() Ends the mover.
startReaction() The reaction shot begins: the walk waits, the watcher turns and aims.
moveCells() Move cells.
stopCells() Every place a unit could stop on with steps to spend, { x, y, cost, h, grapple }; grappleOnly: those it reach…
enterGrapple() The move range as only the grapple's edges, from the menu (from "command") or the grapple key in a move ("mov…
setPreview() The action highlighted in the unit's menu or its lists (kind "skill" or "item", its id; nothing: none): its r…
setCursor() Sets the cursor.
turnOrder() Turn order.
setObjective() Sets the objective.
openList() Opens the list.
beginAction() A unit uses a skill or an item on a cell: it turns to it, pays for it, and the action is about to play.
setEventSide() Sets the event side.
toggleThreat() Show (or stop showing) what every enemy reaches next turn; on sets it, nothing turns it over.
setTerrainCost() What a step onto a region or a terrain tag costs in a battle from now on: 0 shuts it, 1 (or nothing) is the o…

Events, Commands & Input 22

commandGrapple() Runs the grapple command.
commandSelectUnit() Runs the select unit command.
commandMoveTo() Runs the move to command.
commandFallAnswer() The question before a fatal fall is answered: yes takes the way asked about, no leaves the unit where it is t…
commandUndoMove() Runs the undo move command.
commandAttack() Runs the attack command.
commandSkill() via "vehicle": the skill is the vehicle's the unit rides, used with its strength and paid from its MP and TP.
commandItem() Runs the item command.
commandOpenSkills() Open the skill or the item list (a HUD with its own lists does not need them).
commandOpenItems() Runs the open items command.
commandWhom() The rider ("rider") or its vehicle ("vehicle") is the one the aimed action is for: it begins.
commandTarget() Runs the target command.
commandWait() The unit's turn ends where it stands, facing the nearest enemy (or the way the player turned it: commandFace).
commandFace() Turn the unit (2/4/6/8) before it waits; the direction stays when its turn ends.
commandOverwatch() The unit ends its turn on watch: one attack at the first enemy that steps into its reach and sight.
commandEndTurn() Team turns: the player's side is done; its units that have not acted stay where they are.
commandAuto() The rest of the player's turn plays itself: every unit not yet ordered acts by its own preset (<ai:>, aggress…
commandCancel() One step back: out of aiming, out of a list, the move undone, the unit put down (team turns).
commandNextUnit() Team turns, a unit picked that has done nothing yet: it is put down and the cursor goes to the next unit stil…
commandRetreat() The battle ends as an escape, through the battle's own end.
commandLookAt() The view goes to a unit (a tile of the turn strip, a row of the battle menu's Units).
commandReason() Why a command of the acting unit's menu cannot be chosen, as a term key (F.TERMS), or "" when it can: "whyNoR…

Updating & Drawing 12

update() Update.
updateAct() Updates the act each frame.
updatePlan() A unit that decides for itself has thought ("plan"); what it decided says how its turn is shown.
updateHold() A unit waiting for a place among those walking aside: it goes when one is free, in front of the player if a w…
updateSideRuns() The actions playing side by side, each a frame further; the foreground's own run is left as it is.
updateMovers() Updates the movers each frame.
stepMovers() The units of one list of walkers, each a step further when its last step is done.
updateWalk() Updates the walk each frame.
updateReaction() Updates the reaction each frame.
refreshAim() The cursor-dependent lists, made again when the revision moved.
updateStripClick() A click on the HUD's turn strip looks at the unit of the tile clicked: the press is the strip's, not the map'…
updateAi() Updates the ai each frame.

Other 64

noteGrapple() A grapple was taken on a unit's way: counted against its uses and cooldown.
placements() Every unit that had no room where the battle found it: [{ unitId, eventId, name, from, to, reason, moved, sta…
tac() Tac.
touch() Something a HUD shows changed.
anySpotNear() A free cell beside (x, y) whatever its tiles say: on a map nobody can walk, units still stand apart.
noteFallen() A unit that died by something other than a blow of the battle (an event's Change HP, a cost it paid) has fall…
pendingUnits() The player's units still to act in this side's turn (team turns), in queue order.
nextInQueue() Next in queue.
standing() The units still standing on either side.
overlaps() Whether the battle's own units act side by side: above F.OVERLAP at the fast pace (and in an army at the norm…
watchTurn() The acting unit's turn is played in front of the player: the view goes to it and rests there before it does a…
viewHeld() Whether the acting unit's turn waits for the view, which is away showing someone (the View's visit: a unit th…
awaitView() A beat of a watched turn does not begin while the view is away showing someone (a unit that just joined, whoe…
walksAside() Whether a walk that is all a unit does this turn is taken off to the side at the normal pace: its way begins…
restAfter() The acting unit's turn rests a beat before it ends, so what it did is read; a battle its action decided ends…
moverOf() The walk of a unit that is walking on its own, or null.
pendingOn() What the walks and actions under way are expected to take from a unit.
judgePlan() Whether a planned action may play beside the others: the battle is big enough, nobody of the other side keeps…
walkRoom() Whether one more unit may walk on its own now: a third of its side at once (walks and the actions that follow…
walkWatched() Whether a walk passes under someone's watch: it is then taken in front of the player (the reaction shot needs…
detachWalk() A unit starts walking on its own and its turn passes: with the others (tac.movers), or aside at the normal pa…
landDrop() A unit that dropped off an edge comes down before its next step; on landing it loses what the way said the fa…
actOnPlan() An AI unit does what it planned from where it now stands: its action, a watch, or nothing; then it turns to t…
armOverwatch() Arm overwatch.
watcherFor() The watcher that has mover in its attack's reach and sight now, or null.
faceNearest() At the end of its turn a unit faces the nearest unit of the other side.
positionsHash() A number that changes when any unit moves, falls or joins, or a long body turns where it stands (it lies on o…
playerStage() Player stage.
pendingAction() The pending action as a Game_Action (one kept while it is aimed).
pendingItem() Pending item.
previewCells() The cells the highlighted action reaches from where the unit stands (setPreview), while its menu or a list is…
rangeCells() Range cells.
unitAt() The unit covering a cell (a big unit covers its whole footprint).
reachCells() The cells an action by unit, standing at (ux, uy), can be aimed at: inside its range (counted from the neares…
withFootprints() Adds the cells of every big unit in units to cells (those not already there).
inRange() In range.
areaCells() Area cells.
pathCells() Path cells.
pathLoss() The HP the way to the cursor costs in falls (0 with no way shown, or none that hurts).
pathLethal() Whether the way to the cursor ends in a fall that leaves the unit with no HP.
pathCost() What the way to the cursor costs of the unit's move (0 with no way shown).
targetsAtCursor() Targets at cursor.
tacticalState() Tactical state.
tacticalRevision() Tactical revision.
activeUnit() The unit whose turn is shown: at the normal pace a unit still deciding ("plan", "hold") is not shown yet.
actingTeam() The side that is moving while the state is "enemy": "enemy" for the other side, "ally" for the player's own u…
awaitsPlayer() Awaits player.
cursor() Cursor.
cursorLevel() The level the cursor takes on a cell when nobody names one: a unit standing there (the one nearest near), els…
cycleCursorLevel() The cursor to the next level of its cell (a cell with more than one place to stand: the Control key).
focusOn() Where the view should look: the camera eases there.
focusedUnit() Focused unit.
unitInfo() Unit info.
hintText() The tip for the HUD's hint line now, or "" (the HUD then writes the stage's plain line).
strikeFor() The blow run's action lands on target (the base applies it): its side, cover and height.
afterHit() After hits land (the base calls this): a fallen party member brought back stands again, and the HUD redraws.
preview() Preview.
aim() Aim a skill or an item: the range shows and the cursor goes to the nearest target it has.
targetsOf() The units an action by unit (a skill or an item, via "vehicle" for its vehicle's) would land on, aimed at a c…
targetPair() A rider and its vehicle on a cell an action for one target is aimed at: [rider's unit, vehicle's], else null.
unactedCount() How many of the player's units would lose their turn if the side's turn ended now (the unit whose menu is ope…
threatOf() Where a unit can stand after its next move and what it can strike from there: { tread: [{ x, y, h }], reach:…
threatOfAll() Every cell any enemy can stand on or strike next turn, as one list (kept until anyone moves).
showsThreat() Shows threat.

Setup & Creation

ensureFlood

method source
Game_Fight.prototype.ensureFlood(unit, budget, deadline)

The grid's buffers hold this unit's flood for that budget (cached until a unit moves).

Details

The grid's buffers hold this unit's flood for that budget (cached until a unit moves). With a deadline (a clock time) a long flood is taken a slice at a time: false comes back while it is unfinished, and the same call on a later frame goes on with it. Without one the flood is whole when this returns.

Getting Information

currentTeam

method source
Game_Fight.prototype.currentTeam()

The current team. (Same as the RPG Maker MZ method of this name.)

Checks (True / False)

isTactical

method source
Game_Fight.prototype.isTactical()

A tactical battle is running (here or on a map the party left it on).

isPlayerUnit

method source
Game_Fight.prototype.isPlayerUnit(unit)

Whether the player gives this unit its orders: an actor on the party's side, unless it fights by itself.

isArmy

method source
Game_Fight.prototype.isArmy()

An army: a battle that has had more than F.ARMY units standing.

Details

An army: a battle that has had more than F.ARMY units standing. It plays at the fast pace whatever the player's setting, and to its end: the pace does not change under the player as its lines thin out.

isWatched

method source
Game_Fight.prototype.isWatched()

Whether the units that decide for themselves take their turns one at a time, each one watched: the normal pace in a battle that is no army.

isCrowded

method source
Game_Fight.prototype.isCrowded()

Whether the units that decide for themselves act quick: a crowd at the fast pace (and in an army at the normal one), any battle at "skip".

canDetach

method source
Game_Fight.prototype.canDetach(unit, steps)

Whether it can detach. (Same as the RPG Maker MZ method of this name.)

canOverwatch

method source
Game_Fight.prototype.canOverwatch(unit)

Whether it can overwatch. (Same as the RPG Maker MZ method of this name.)

isOnOverwatch

method source
Game_Fight.prototype.isOnOverwatch(unit)

Whether it is on overwatch. (Same as the RPG Maker MZ method of this name.)

canGrapple

method source
Game_Fight.prototype.canGrapple(unit)

Grapple, as a command: offered while the unit has not moved, wears a grapple it may use now (F.grappleFor) and has an edge in its reach.

Details

Grapple, as a command: offered while the unit has not moved, wears a grapple it may use now (F.grappleFor) and has an edge in its reach. The move range then lists only those edges, the cursor on the nearest (which lifts the battle's cut to its level, so the roof shows), the unit key steps through them, and Cancel goes back to the menu.

canUndoMove

method source
Game_Fight.prototype.canUndoMove()

Whether it can undo move. (Same as the RPG Maker MZ method of this name.)

canAuto

method source
Game_Fight.prototype.canAuto()

Whether the battle menu offers Auto now: team turns, at "Choose a unit", with two or more units still to act.

canRetreat

method source
Game_Fight.prototype.canRetreat()

Whether the player may leave this battle now (a battle started with Can Escape).

hasTargets

method source
Game_Fight.prototype.hasTargets(kind, id, via)

Whether an action the acting unit would use from where it stands has anyone to land on.

Actions

clear

method source
Game_Fight.prototype.clear()

Clear. (Same as the RPG Maker MZ method of this name.)

start

method source
Game_Fight.prototype.start(options)

Start. (Same as the RPG Maker MZ method of this name.)

finish

method source
Game_Fight.prototype.finish()

Finish. (Same as the RPG Maker MZ method of this name.)

spawn

method source
Game_Fight.prototype.spawn(options)

Spawn. (Same as the RPG Maker MZ method of this name.)

startRound

method source
Game_Fight.prototype.startRound()

Starts the round. (Same as the RPG Maker MZ method of this name.)

beginPick

method source
Game_Fight.prototype.beginPick()

Team turns: the player chooses which unit goes next.

beginUnit

method source
Game_Fight.prototype.beginUnit(unit)

Begin unit. (Same as the RPG Maker MZ method of this name.)

finishAct

method source
Game_Fight.prototype.finishAct()

Finish act. (Same as the RPG Maker MZ method of this name.)

startWalk

method source
Game_Fight.prototype.startWalk(unit, character, steps)

Starts the walk. (Same as the RPG Maker MZ method of this name.)

takeStep

method source
Game_Fight.prototype.takeStep(character, step)

Take step. (Same as the RPG Maker MZ method of this name.)

beginSideAction

method source
Game_Fight.prototype.beginSideAction(unit, plan)

A unit's action beside the others: a quick run of its own, with the same events as any action.

endMover

method source
Game_Fight.prototype.endMover(mover, arrived)

Ends the mover. (Same as the RPG Maker MZ method of this name.)

startReaction

method source
Game_Fight.prototype.startReaction(mover, character)

The reaction shot begins: the walk waits, the watcher turns and aims.

moveCells

method source
Game_Fight.prototype.moveCells()

Move cells. (Same as the RPG Maker MZ method of this name.)

stopCells

method source
Game_Fight.prototype.stopCells(unit, steps, grappleOnly)

Every place a unit could stop on with steps to spend, { x, y, cost, h, grapple }; grappleOnly: those it reaches by its grapple.

Details

Every place a unit could stop on with steps to spend, { x, y, cost, h, grapple }; grappleOnly: those it reaches by its grapple.

enterGrapple

method source
Game_Fight.prototype.enterGrapple(from)

The move range as only the grapple's edges, from the menu (from "command") or the grapple key in a move ("move").

setPreview

method source
Game_Fight.prototype.setPreview(kind, id, via)

The action highlighted in the unit's menu or its lists (kind "skill" or "item", its id; nothing: none): its reach shows on the field before it is chosen, whether or not anyone stands in it, so a greyed Attack still says how far it would shoot from here.

setCursor

method source
Game_Fight.prototype.setCursor(x, y, h)

Sets the cursor. (Same as the RPG Maker MZ method of this name.)

turnOrder

method source
Game_Fight.prototype.turnOrder()

Turn order. (Same as the RPG Maker MZ method of this name.)

setObjective

method source
Game_Fight.prototype.setObjective(objective)

Sets the objective. (Same as the RPG Maker MZ method of this name.)

openList

method source
Game_Fight.prototype.openList(stage)

Opens the list. (Same as the RPG Maker MZ method of this name.)

beginAction

method source
Game_Fight.prototype.beginAction(unit, kind, id, cx, cy, via)

A unit uses a skill or an item on a cell: it turns to it, pays for it, and the action is about to play.

setEventSide

method source
Game_Fight.prototype.setEventSide(eventId, team)

Sets the event side. (Same as the RPG Maker MZ method of this name.)

toggleThreat

method source
Game_Fight.prototype.toggleThreat(on)

Show (or stop showing) what every enemy reaches next turn; on sets it, nothing turns it over.

Details

Show (or stop showing) what every enemy reaches next turn; on sets it, nothing turns it over. Returns what it is now.

setTerrainCost

method source
Game_Fight.prototype.setTerrainCost(type, id, cost)

What a step onto a region or a terrain tag costs in a battle from now on: 0 shuts it, 1 (or nothing) is the ordinary step.

Events, Commands & Input

commandGrapple

method source
Game_Fight.prototype.commandGrapple()

Runs the grapple command. (Same as the RPG Maker MZ method of this name.)

commandSelectUnit

method source
Game_Fight.prototype.commandSelectUnit(unitId)

Runs the select unit command. (Same as the RPG Maker MZ method of this name.)

commandMoveTo

method source
Game_Fight.prototype.commandMoveTo(x, y, h, sure)

Runs the move to command. (Same as the RPG Maker MZ method of this name.)

commandFallAnswer

method source
Game_Fight.prototype.commandFallAnswer(yes)

The question before a fatal fall is answered: yes takes the way asked about, no leaves the unit where it is to move.

commandUndoMove

method source
Game_Fight.prototype.commandUndoMove()

Runs the undo move command. (Same as the RPG Maker MZ method of this name.)

commandAttack

method source
Game_Fight.prototype.commandAttack()

Runs the attack command. (Same as the RPG Maker MZ method of this name.)

commandSkill

method source
Game_Fight.prototype.commandSkill(skillId, via)

via "vehicle": the skill is the vehicle's the unit rides, used with its strength and paid from its MP and TP.

commandItem

method source
Game_Fight.prototype.commandItem(itemId)

Runs the item command. (Same as the RPG Maker MZ method of this name.)

commandOpenSkills

method source
Game_Fight.prototype.commandOpenSkills()

Open the skill or the item list (a HUD with its own lists does not need them).

commandOpenItems

method source
Game_Fight.prototype.commandOpenItems()

Runs the open items command. (Same as the RPG Maker MZ method of this name.)

commandWhom

method source
Game_Fight.prototype.commandWhom(who)

The rider ("rider") or its vehicle ("vehicle") is the one the aimed action is for: it begins.

commandTarget

method source
Game_Fight.prototype.commandTarget(x, y)

Runs the target command. (Same as the RPG Maker MZ method of this name.)

commandWait

method source
Game_Fight.prototype.commandWait()

The unit's turn ends where it stands, facing the nearest enemy (or the way the player turned it: commandFace).

commandFace

method source
Game_Fight.prototype.commandFace(direction)

Turn the unit (2/4/6/8) before it waits; the direction stays when its turn ends.

Details

Turn the unit (2/4/6/8) before it waits; the direction stays when its turn ends. False when it did not turn (a long body with no room for its turned self refuses).

commandOverwatch

method source
Game_Fight.prototype.commandOverwatch()

The unit ends its turn on watch: one attack at the first enemy that steps into its reach and sight.

commandEndTurn

method source
Game_Fight.prototype.commandEndTurn()

Team turns: the player's side is done; its units that have not acted stay where they are.

commandAuto

method source
Game_Fight.prototype.commandAuto()

The rest of the player's turn plays itself: every unit not yet ordered acts by its own preset (<ai:>, aggressive without one), as an army's turn asks.

Details

The rest of the player's turn plays itself: every unit not yet ordered acts by its own preset (<ai:>, aggressive without one), as an army's turn asks. Until the round's next turn.

commandCancel

method source
Game_Fight.prototype.commandCancel()

One step back: out of aiming, out of a list, the move undone, the unit put down (team turns).

commandNextUnit

method source
Game_Fight.prototype.commandNextUnit()

Team turns, a unit picked that has done nothing yet: it is put down and the cursor goes to the next unit still to act, in the round's order (back to itself when it is the only one).

Details

Team turns, a unit picked that has done nothing yet: it is put down and the cursor goes to the next unit still to act, in the round's order (back to itself when it is the only one). Nobody's turn is spent.

commandRetreat

method source
Game_Fight.prototype.commandRetreat()

The battle ends as an escape, through the battle's own end.

commandLookAt

method source
Game_Fight.prototype.commandLookAt(unitId)

The view goes to a unit (a tile of the turn strip, a row of the battle menu's Units).

Details

The view goes to a unit (a tile of the turn strip, a row of the battle menu's Units). While the player chooses a unit or a place to move the cursor goes with it; while they aim, or the battle plays, the cursor is the battle's and only the view goes.

commandReason

method source
Game_Fight.prototype.commandReason(symbol)

Why a command of the acting unit's menu cannot be chosen, as a term key (F.TERMS), or "" when it can: "whyNoReach" for an Attack with nobody in its reach from where the unit stands.

Details

Why a command of the acting unit's menu cannot be chosen, as a term key (F.TERMS), or "" when it can: "whyNoReach" for an Attack with nobody in its reach from where the unit stands. Asked when the menu is made and by a HUD's hint line for the highlighted row; the answer is kept until a unit moves.

Updating & Drawing

update

method source
Game_Fight.prototype.update()

Update. (Same as the RPG Maker MZ method of this name.)

updateAct

method source
Game_Fight.prototype.updateAct()

Updates the act each frame. (Same as the RPG Maker MZ method of this name.)

updatePlan

method source
Game_Fight.prototype.updatePlan(unit, character)

A unit that decides for itself has thought ("plan"); what it decided says how its turn is shown.

Details

A unit that decides for itself has thought ("plan"); what it decided says how its turn is shown. An action, a walk near the units it fights or under someone's watch: the view goes to the unit and rests on it ("look"), it walks, its target is pointed at ("ready"), the action plays whole and its result is read ("rest"). A walk far from everyone it fights goes off to the side with the others doing the same (tac.aside) while the next unit begins; with every place there taken it waits for one ("hold"). Nothing to do: the turn passes unseen. While the view is away showing someone (a unit that just joined) no turn begins: the unit is not shown as acting over a picture of somebody else.

updateHold

method source
Game_Fight.prototype.updateHold(unit, character)

A unit waiting for a place among those walking aside: it goes when one is free, in front of the player if a watch now reaches its way.

updateSideRuns

method source
Game_Fight.prototype.updateSideRuns()

The actions playing side by side, each a frame further; the foreground's own run is left as it is.

updateMovers

method source
Game_Fight.prototype.updateMovers()

Updates the movers each frame. (Same as the RPG Maker MZ method of this name.)

stepMovers

method source
Game_Fight.prototype.stepMovers(movers)

The units of one list of walkers, each a step further when its last step is done.

updateWalk

method source
Game_Fight.prototype.updateWalk(unit, character)

Updates the walk each frame. (Same as the RPG Maker MZ method of this name.)

updateReaction

method source
Game_Fight.prototype.updateReaction()

Updates the reaction each frame. (Same as the RPG Maker MZ method of this name.)

refreshAim

method source
Game_Fight.prototype.refreshAim()

The cursor-dependent lists, made again when the revision moved.

updateStripClick

method source
Game_Fight.prototype.updateStripClick()

A click on the HUD's turn strip looks at the unit of the tile clicked: the press is the strip's, not the map's under it.

updateAi

method source
Game_Fight.prototype.updateAi(unit, character)

Updates the ai each frame. (Same as the RPG Maker MZ method of this name.)

Other

noteGrapple

method source
Game_Fight.prototype.noteGrapple(unit, steps)

A grapple was taken on a unit's way: counted against its uses and cooldown.

Details

A grapple was taken on a unit's way: counted against its uses and cooldown. Returns whether it took the unit's action.

placements

method source
Game_Fight.prototype.placements()

Every unit that had no room where the battle found it: [{ unitId, eventId, name, from, to, reason, moved, stays }].

Details

Every unit that had no room where the battle found it: [{ unitId, eventId, name, from, to, reason, moved, stays }]. moved: it was put on the tile to; stays: no place near fits it and it is where it was put; neither: it was turned on its tile.

tac

method source
Game_Fight.prototype.tac()

Tac. (Same as the RPG Maker MZ method of this name.)

touch

method source
Game_Fight.prototype.touch()

Something a HUD shows changed.

anySpotNear

method source
Game_Fight.prototype.anySpotNear(x, y)

A free cell beside (x, y) whatever its tiles say: on a map nobody can walk, units still stand apart.

noteFallen

method source
Game_Fight.prototype.noteFallen()

A unit that died by something other than a blow of the battle (an event's Change HP, a cost it paid) has fallen all the same: it fades, its pages run, and the goal is judged.

Details

A unit that died by something other than a blow of the battle (an event's Change HP, a cost it paid) has fallen all the same: it fades, its pages run, and the goal is judged. A fallen party member an event brought back stands again. Returns how many fell.

pendingUnits

method source
Game_Fight.prototype.pendingUnits()

The player's units still to act in this side's turn (team turns), in queue order.

nextInQueue

method source
Game_Fight.prototype.nextInQueue()

Next in queue. (Same as the RPG Maker MZ method of this name.)

standing

method source
Game_Fight.prototype.standing()

The units still standing on either side.

overlaps

method source
Game_Fight.prototype.overlaps()

Whether the battle's own units act side by side: above F.OVERLAP at the fast pace (and in an army at the normal one), any battle at "skip".

watchTurn

method source
Game_Fight.prototype.watchTurn(unit, character, steps)

The acting unit's turn is played in front of the player: the view goes to it and rests there before it does anything.

viewHeld

method source
Game_Fight.prototype.viewHeld()

Whether the acting unit's turn waits for the view, which is away showing someone (the View's visit: a unit that joined, whoever speaks): counted in act.away, and never longer than F.BEAT_AWAY, after which the turn takes the view back.

awaitView

method source
Game_Fight.prototype.awaitView(character, frames)

A beat of a watched turn does not begin while the view is away showing someone (a unit that just joined, whoever spoke): nothing of the turn plays out of the picture.

Details

A beat of a watched turn does not begin while the view is away showing someone (a unit that just joined, whoever spoke): nothing of the turn plays out of the picture. True while the turn waits. When the view is free it is sent back to the unit and the beat (frames) is counted from its start.

walksAside

method source
Game_Fight.prototype.walksAside(unit, character, steps)

Whether a walk that is all a unit does this turn is taken off to the side at the normal pace: its way begins and ends further than F.ASIDE steps from every unit it fights.

Details

Whether a walk that is all a unit does this turn is taken off to the side at the normal pace: its way begins and ends further than F.ASIDE steps from every unit it fights. Nearer, the walk is watched like any turn.

restAfter

method source
Game_Fight.prototype.restAfter(frames)

The acting unit's turn rests a beat before it ends, so what it did is read; a battle its action decided ends at once.

moverOf

method source
Game_Fight.prototype.moverOf(unit)

The walk of a unit that is walking on its own, or null.

pendingOn

method source
Game_Fight.prototype.pendingOn(target)

What the walks and actions under way are expected to take from a unit.

judgePlan

method source
Game_Fight.prototype.judgePlan(unit, character, plan)

Whether a planned action may play beside the others: the battle is big enough, nobody of the other side keeps watch, it is not decisive (a party member about to fall, a heavy blow on the leader: those are watched alone), and none of its targets is already expected to fall to an action under way (then the unit thinks again).

Details

Whether a planned action may play beside the others: the battle is big enough, nobody of the other side keeps watch, it is not decisive (a party member about to fall, a heavy blow on the leader: those are watched alone), and none of its targets is already expected to fall to an action under way (then the unit thinks again). Returns "side", "alone" or "wait"; fills plan.targets and plan.expect.

walkRoom

method source
Game_Fight.prototype.walkRoom(unit)

Whether one more unit may walk on its own now: a third of its side at once (walks and the actions that follow them), never fewer than F.MOVERS_MAX.

walkWatched

method source
Game_Fight.prototype.walkWatched(unit, steps)

Whether a walk passes under someone's watch: it is then taken in front of the player (the reaction shot needs it there); one no watcher can reach goes with the others.

Details

Whether a walk passes under someone's watch: it is then taken in front of the player (the reaction shot needs it there); one no watcher can reach goes with the others. Without the way given, any watcher of the other side counts.

detachWalk

method source
Game_Fight.prototype.detachWalk(unit, character, steps, watch, plan, aside)

A unit starts walking on its own and its turn passes: with the others (tac.movers), or aside at the normal pace.

landDrop

method source
Game_Fight.prototype.landDrop(unit, character)

A unit that dropped off an edge comes down before its next step; on landing it loses what the way said the fall would cost (G.lossAt, the number the move preview shows).

Details

A unit that dropped off an edge comes down before its next step; on landing it loses what the way said the fall would cost (G.lossAt, the number the move preview shows). True while it is still in the air.

actOnPlan

method source
Game_Fight.prototype.actOnPlan(unit)

An AI unit does what it planned from where it now stands: its action, a watch, or nothing; then it turns to the fight.

armOverwatch

method source
Game_Fight.prototype.armOverwatch(unit)

Arm overwatch. (Same as the RPG Maker MZ method of this name.)

watcherFor

method source
Game_Fight.prototype.watcherFor(mover, character)

The watcher that has mover in its attack's reach and sight now, or null.

faceNearest

method source
Game_Fight.prototype.faceNearest(unit)

At the end of its turn a unit faces the nearest unit of the other side.

positionsHash

method source
Game_Fight.prototype.positionsHash()

A number that changes when any unit moves, falls or joins, or a long body turns where it stands (it lies on other cells).

playerStage

method source
Game_Fight.prototype.playerStage(stage)

Player stage. (Same as the RPG Maker MZ method of this name.)

pendingAction

method source
Game_Fight.prototype.pendingAction()

The pending action as a Game_Action (one kept while it is aimed).

pendingItem

method source
Game_Fight.prototype.pendingItem()

Pending item. (Same as the RPG Maker MZ method of this name.)

previewCells

method source
Game_Fight.prototype.previewCells()

The cells the highlighted action reaches from where the unit stands (setPreview), while its menu or a list is up.

rangeCells

method source
Game_Fight.prototype.rangeCells()

Range cells. (Same as the RPG Maker MZ method of this name.)

unitAt

method source
Game_Fight.prototype.unitAt(x, y, except, h)

The unit covering a cell (a big unit covers its whole footprint).

reachCells

method source
Game_Fight.prototype.reachCells(unit, action, ux, uy, height)

The cells an action by unit, standing at (ux, uy), can be aimed at: inside its range (counted from the nearest cell of its own body), seen, and not a wall.

withFootprints

method source
Game_Fight.prototype.withFootprints(cells, units)

Adds the cells of every big unit in units to cells (those not already there).

inRange

method source
Game_Fight.prototype.inRange(x, y)

In range. (Same as the RPG Maker MZ method of this name.)

areaCells

method source
Game_Fight.prototype.areaCells()

Area cells. (Same as the RPG Maker MZ method of this name.)

pathCells

method source
Game_Fight.prototype.pathCells()

Path cells. (Same as the RPG Maker MZ method of this name.)

pathLoss

method source
Game_Fight.prototype.pathLoss()

The HP the way to the cursor costs in falls (0 with no way shown, or none that hurts).

pathLethal

method source
Game_Fight.prototype.pathLethal()

Whether the way to the cursor ends in a fall that leaves the unit with no HP.

pathCost

method source
Game_Fight.prototype.pathCost()

What the way to the cursor costs of the unit's move (0 with no way shown).

targetsAtCursor

method source
Game_Fight.prototype.targetsAtCursor()

Targets at cursor. (Same as the RPG Maker MZ method of this name.)

tacticalState

method source
Game_Fight.prototype.tacticalState()

Tactical state. (Same as the RPG Maker MZ method of this name.)

tacticalRevision

method source
Game_Fight.prototype.tacticalRevision()

Tactical revision. (Same as the RPG Maker MZ method of this name.)

activeUnit

method source
Game_Fight.prototype.activeUnit()

The unit whose turn is shown: at the normal pace a unit still deciding ("plan", "hold") is not shown yet.

actingTeam

method source
Game_Fight.prototype.actingTeam()

The side that is moving while the state is "enemy": "enemy" for the other side, "ally" for the player's own units acting by themselves (allies that fight alone, a turn handed to Auto), "" when nobody is.

awaitsPlayer

method source
Game_Fight.prototype.awaitsPlayer()

Awaits player. (Same as the RPG Maker MZ method of this name.)

cursor

method source
Game_Fight.prototype.cursor()

Cursor. (Same as the RPG Maker MZ method of this name.)

cursorLevel

method source
Game_Fight.prototype.cursorLevel(x, y, near)

The level the cursor takes on a cell when nobody names one: a unit standing there (the one nearest near), else, while a move is chosen, the level the unit can stop on nearest near, else the ground nearest it.

Details

The level the cursor takes on a cell when nobody names one: a unit standing there (the one nearest near), else, while a move is chosen, the level the unit can stop on nearest near, else the ground nearest it. near is the level the cursor was on (the acting unit's without one). 0 on a 2D map.

cycleCursorLevel

method source
Game_Fight.prototype.cycleCursorLevel(step)

The cursor to the next level of its cell (a cell with more than one place to stand: the Control key).

Details

The cursor to the next level of its cell (a cell with more than one place to stand: the Control key). While a move is chosen, the levels the unit can stop on; otherwise where anyone stands and the cell's own.

focusOn

method source
Game_Fight.prototype.focusOn(x, y)

Where the view should look: the camera eases there.

focusedUnit

method source
Game_Fight.prototype.focusedUnit()

Focused unit. (Same as the RPG Maker MZ method of this name.)

unitInfo

method source
Game_Fight.prototype.unitInfo(unit)

Unit info. (Same as the RPG Maker MZ method of this name.)

hintText

method source
Game_Fight.prototype.hintText()

The tip for the HUD's hint line now, or "" (the HUD then writes the stage's plain line).

strikeFor

method source
Game_Fight.prototype.strikeFor(run, action, target)

The blow run's action lands on target (the base applies it): its side, cover and height.

afterHit

method source
Game_Fight.prototype.afterHit(run, targets)

After hits land (the base calls this): a fallen party member brought back stands again, and the HUD redraws.

preview

method source
Game_Fight.prototype.preview(target)

Preview. (Same as the RPG Maker MZ method of this name.)

aim

method source
Game_Fight.prototype.aim(kind, id, via)

Aim a skill or an item: the range shows and the cursor goes to the nearest target it has.

targetsOf

method source
Game_Fight.prototype.targetsOf(unit, kind, id, cx, cy, via)

The units an action by unit (a skill or an item, via "vehicle" for its vehicle's) would land on, aimed at a cell from where the unit stands: a new array, the party's vehicles among them.

Details

The units an action by unit (a skill or an item, via "vehicle" for its vehicle's) would land on, aimed at a cell from where the unit stands: a new array, the party's vehicles among them. Nothing is used or begun.

targetPair

method source
Game_Fight.prototype.targetPair(x, y)

A rider and its vehicle on a cell an action for one target is aimed at: [rider's unit, vehicle's], else null.

Details

A rider and its vehicle on a cell an action for one target is aimed at: [rider's unit, vehicle's], else null. Whose it is to be is the player's to say (commandWhom).

unactedCount

method source
Game_Fight.prototype.unactedCount()

How many of the player's units would lose their turn if the side's turn ended now (the unit whose menu is open waits, and does not count).

threatOf

method source
Game_Fight.prototype.threatOf(unit)

Where a unit can stand after its next move and what it can strike from there: { tread: [{ x, y, h }], reach: [{ x, y }] }, kept until anyone moves.

threatOfAll

method source
Game_Fight.prototype.threatOfAll()

Every cell any enemy can stand on or strike next turn, as one list (kept until anyone moves).

showsThreat

method source
Game_Fight.prototype.showsThreat()

Shows threat. (Same as the RPG Maker MZ method of this name.)