Namespace in reactor_fight.js

Game_Fight

113 functions in 7 groups · hide internal

A Tactical battle: climbing onto a roof.

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 2

initialize() Sets up a new instance.
prepareParty() Followers stand and walk on their own during a fight; they were hidden, they show.

Getting Information 1

heightAt() The height whoever stands on a cell stands at (the player, a unit, an event); NaN when nobody does.

Checks (True / False) 5

isActive() Whether it is active.
isHere() Whether the fight runs on the map the party stands on (one left with "keep" waits there).
isAlive() Whether it is alive.
isBusy() Whether the battle waits: a message, choice or number input, an event the map is running (an autorun, a touch…
isFading() Whether a fallen unit is still on its way out (one that stays for the battle is not, until the battle is deci…

Actions 36

clear() Clear.
turn() Turn.
endKept() A battle kept on a map the party left gives way to a battle that begins elsewhere (on the map the party is on…
addUnit() Adds the unit.
start() Start an on-map battle here.
takeParty() The party joins: every battle member, the leader and the followers who stand for them.
takeNewMembers() A battle member the battle running here has no unit for (one Change Party Member adds, a reserve member moved…
takeUnits() Who is in the battle as it starts.
takeEvent() An event of the map becomes the unit it is now (F.eventUnit); null when it is none, or already has one.
takeTroop() A troop's members come into the battle as spawned units round the party; returns how many came.
startAround() What goes on round a battle as it starts: the game's battle BGM plays, the map's own kept for the end.
setEventDefeated() An event is remembered as defeated (defeated), or no longer; mapId: this map unless given.
setEventSide() Change Unit Side: an event of this map fights as an ally, an enemy or a bystander from now on (in the battle…
setObjective() A new goal for the battle that is running; it is judged at once and from then on.
restoreParty() Restores the party.
spawn() Spawn.
removeUnit() A unit leaves the fight; an event unit is erased unless keep.
startRound() Starts the round.
finishAct() Finish act.
startAction() Starts the action.
runAction() Run action.
runCues() The resolved sequence's cues, by start frame; null when there is none to play.
runContext() The run's action, subject and targets, made once per run (and again after a load) and kept off the save: the…
endStage() Tells the stage a run is over (interrupted: cut short); once per staged run.
playCue() Plays the cue.
playMotion() A model's motion rule of that name, where the character is a 3D model with one.
playAnimation() Plays the animation.
applyHit() One hit of the run's action, where an Action Sequence lands it; run.hits counts them.
finishHits() The action is done landing: its global effects (a common event), once.
applyRun() Lands whatever of the action has not landed yet (all of it, when no hit was landed one by one), then finishes…
end() Ends the fight: WIN gives the rewards, LOSE the defeat (Game Over unless the battle can be lost), ESCAPE noth…
reviveFallen() Whoever fell in this battle on the party's side gets up with 1 HP: the party's members and the allies that ev…
finish() Finish.
finishUnits() The units as the battle leaves them: nobody holds a weapon, the party's battlers end their battle, and nobody…
finishAround() What goes on round a battle as it ends: the map's music comes back, the troop is emptied, the result is kept…
endTroopTurn() A turn ends: until the next begins, the pages that run as a turn ends may run (updateTroopPages).

Events, Commands & Input 1

onUnitLanded() A unit of this fight came down from a fall of fell tiles (ReactorPhysics.onLand): true when the fight says wh…

Updating & Drawing 11

syncTroop() $gameTroop holds the fight's enemy-record battlers, so Game_Action finds an enemy subject by its index as it…
update() Update.
updateBattle() One frame of a battle that is on this map: what fades, the pages it owes, its ending, else the phase it is in.
updateAct() Updates the act each frame.
updateRun() Advances the run a frame; false when it has ended.
updateNotice() One frame of the notice: counted with the battle's own frames, whatever the battle did in this one.
updateFading() Updates the fading each frame.
updateEnding() Updates the ending each frame.
updateTail() The interpreter of a battle that ended while one of its own pages was still running (_tail, kept with the sav…
updateHooks() Updates the hooks each frame.
updateTroopPages() Between actions: the next troop page that holds is queued (true: the battle waits for it).

Other 57

serial() Serial.
mode() Mode.
mapId() Map id.
resultOf() Result of.
units() Units.
unit() Unit.
unitOfEvent() Unit of event.
battler() Battler.
character() Character.
unitAt() Unit at.
join() An event of this map joins the battle running here as the unit it is now, a full member from this moment: its…
eraseDefeated() The map is entered: the events remembered as defeated on it leave it, as Erase Event has them leave.
sideOverride() Side override.
objective() Objective.
partyAway() The party walks out of a battle that is kept on its map (away), or back into it.
cellTaken() Whether a cell is taken: the player, a unit, or an event that stands in the way.
freeSpotNear() The nearest free cell a body can stand on, at least near from (x, y), searching outward: { x, y, height }, or…
anyFreeCell() The nearest free cell the tiles let a walker onto, whatever is built on it: the last answer of freeSpotNear.
spotFor() Where a unit asked for at (x, y) is put: that cell when it is free and a body can stand there (at the height…
fitBody() A unit bigger than its cell must fit where it stands: its body clear of the party and of every other body (Re…
bodyStands() Whether every cell under a body whose own cell is (x, y) holds a place to stand within F.SPOT_HULL of height.
hookInterpreter() Hook interpreter.
waitingInterpreter() The interpreter of the map's running event that waits for this fight, however deep in the common events it ca…
waitReason() What the battle waits for, in words for the console; "" when nothing holds it.
noteWait() The battle waits this frame.
nextInQueue() Next in queue.
distance() Distance.
bodyRadius() How far a character's body reaches from its cell, in tiles: a 3D model blocks the cells its body covers (Reac…
inReach() Whether two units' bodies are close enough to strike.
nearestOpponent() Nearest opponent.
chooseAction() What a battler does: an enemy by its action patterns, an actor by its skills; the attack otherwise.
actionTargets() The units an action lands on, from the one beside the actor: friends for a friendly skill, an area for "all".
actingBattler() The battler an action of a unit's is made with: its own, or with via "vehicle" the battler of the vehicle it…
landHits() Lands count hits of the action on each target and shows them: the result, one popup with what the hits took t…
hitTotal() How many times the run's action lands: what the stage counted (run.hitTotal), else the skill's Repeats and th…
unitOfCharacter() The unit a character shows in this fight, or null.
hurtByFall() A fall cost a unit loss HP (the fall rule of Database › System 2 › Physics): taken, shown over it with the ha…
popup() Popup.
term() The battle's words for a key, as a HUD asks for them: the reason it gave for a grayed command (commandReason).
goalText() The goal in full: what the battle menu's Goal page and a change of goal say.
objectiveText() The goal as a HUD's line shows it: what is left of it where that can be counted (enemies standing, turns to h…
announce() A line for the HUD's banner (where the phase is announced), in any mode: it stands for F.NOTICE_FRAMES, then…
notice() The notice to show now (a goal that changed), or "" when there is none.
defeat() Defeat.
blowFrom() Where the blow that lands on target comes from: the middle of a blast (a circle, square or cross, for whoever…
fell() A unit an event stands for has fallen: what is left of it (F.remainsOf) is put on the way it goes.
raise() A fallen unit is alive again: it is in the battle as it was, and what was left of it stands.
settleFallen() The battle is over: a body whose battler is alive again stands (the party's side, got up by reviveFallen), an…
eraseFallen() The map of a battle that is still on was read again (the party is back on the map of a battle that was kept,…
checkOutcome() Check outcome.
rememberDefeated() A battle that was not lost: the enemies placed on its map that fell in it are remembered as defeated, unless…
hookMatches() Hook matches.
fireHooks() Fire hooks.
checkEnterHooks() A unit that has just stepped into a hook's area from outside it.
troopPageMet() Whether a troop page's conditions hold now; turnEnding: the turn is ending.
checkTroopPages() Queues the first troop page whose conditions hold and that has not run in its span, as the battle screen star…
adopt() A command that would start a battle while one runs here gives that battle what it brought: whether the party…

Setup & Creation

initialize

method source
Game_Fight.prototype.initialize()

Sets up a new instance. (Same as the RPG Maker MZ method of this name.)

prepareParty

method source
Game_Fight.prototype.prepareParty()

Followers stand and walk on their own during a fight; they were hidden, they show.

Getting Information

heightAt

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

The height whoever stands on a cell stands at (the player, a unit, an event); NaN when nobody does.

Checks (True / False)

isActive

method source
Game_Fight.prototype.isActive()

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

isHere

method source
Game_Fight.prototype.isHere()

Whether the fight runs on the map the party stands on (one left with "keep" waits there).

isAlive

method source
Game_Fight.prototype.isAlive(unit)

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

isBusy

method source
Game_Fight.prototype.isBusy()

Whether the battle waits: a message, choice or number input, an event the map is running (an autorun, a touch or action trigger, a cutscene), a hook page running, a transfer.

Details

Whether the battle waits: a message, choice or number input, an event the map is running (an autorun, a touch or action trigger, a cutscene), a hook page running, a transfer. Parallel events never hold it. The interpreter that started the fight and waits for it does not count; while it waits, events that need it (touch, action, autorun) start after the fight, so a fight meant to be interrupted by them is started with Start Battle on Map, which does not wait.

isFading

method source
Game_Fight.prototype.isFading()

Whether a fallen unit is still on its way out (one that stays for the battle is not, until the battle is decided).

Actions

clear

method source
Game_Fight.prototype.clear()

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

turn

method source
Game_Fight.prototype.turn()

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

endKept

method source
Game_Fight.prototype.endKept()

A battle kept on a map the party left gives way to a battle that begins elsewhere (on the map the party is on, or on the battle screen): it ends as an escape, as leaving its map would have ended it.

Details

A battle kept on a map the party left gives way to a battle that begins elsewhere (on the map the party is on, or on the battle screen): it ends as an escape, as leaving its map would have ended it. Returns whether it ended.

addUnit

method source
Game_Fight.prototype.addUnit(spec)

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

start

method source
Game_Fight.prototype.start(options)

Start an on-map battle here.

Details

Start an on-map battle here. Options: mode, who and taken (which of the map's units are in it: takeUnits), troopId (its members join, spawned round the party), canEscape, canLose, turns ("team" / "initiative"), objective ({ type: "defeatAll" } / { type: "survive", turns } / { type: "defeatUnit", eventId } / { type: "switch", switchId } / { type: "variable", variableId, value }), onTransfer ("escape" / "keep"), bgm ("battle", the game's battle BGM, / "map"). Returns the fight's serial, or 0 when one is already running here (one kept on another map gives way: endKept).

takeParty

method source
Game_Fight.prototype.takeParty()

The party joins: every battle member, the leader and the followers who stand for them.

takeNewMembers

method source
Game_Fight.prototype.takeNewMembers()

A battle member the battle running here has no unit for (one Change Party Member adds, a reserve member moved up) joins it: on a free cell beside the leader, its battler starting its battle.

Details

A battle member the battle running here has no unit for (one Change Party Member adds, a reserve member moved up) joins it: on a free cell beside the leader, its battler starting its battle. One who left the party in the battle and is back is the unit it was.

takeUnits

method source
Game_Fight.prototype.takeUnits(options)

Who is in the battle as it starts.

Details

Who is in the battle as it starts. options.taken: the events handed over; else options.who: "near" takes the units the start rule takes round the party (within the map's start distance of a party member who sees them: F.takenNear, reactor_fight_flow.js), anything else every unit on the map. The unit a goal names is in it wherever it stands. A troop's members (options.troopId) always come, placed round the party; options.troopIfEmpty: only when no enemy unit was taken.

takeEvent

method source
Game_Fight.prototype.takeEvent(event)

An event of the map becomes the unit it is now (F.eventUnit); null when it is none, or already has one.

takeTroop

method source
Game_Fight.prototype.takeTroop(troopId)

A troop's members come into the battle as spawned units round the party; returns how many came.

startAround

method source
Game_Fight.prototype.startAround(options)

What goes on round a battle as it starts: the game's battle BGM plays, the map's own kept for the end.

setEventDefeated

method source
Game_Fight.prototype.setEventDefeated(eventId, defeated, mapId)

An event is remembered as defeated (defeated), or no longer; mapId: this map unless given.

setEventSide

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

Change Unit Side: an event of this map fights as an ally, an enemy or a bystander from now on (in the battle running here at once, and in later ones), or goes back to its own setting (any other team).

Details

Change Unit Side: an event of this map fights as an ally, an enemy or a bystander from now on (in the battle running here at once, and in later ones), or goes back to its own setting (any other team). A bystander with no Database record cannot be made to fight. The party's own members never change sides. A unit standing outside the battle running here joins it first, wherever it stands.

setObjective

method source
Game_Fight.prototype.setObjective(objective)

A new goal for the battle that is running; it is judged at once and from then on.

Details

A new goal for the battle that is running; it is judged at once and from then on. The unit it names joins the battle first, wherever it stands.

restoreParty

method source
Game_Fight.prototype.restoreParty()

Restores the party. (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.)

removeUnit

method source
Game_Fight.prototype.removeUnit(unit, keep)

A unit leaves the fight; an event unit is erased unless keep.

Details

A unit leaves the fight; an event unit is erased unless keep. Removed units give no reward.

startRound

method source
Game_Fight.prototype.startRound()

Starts the round. (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.)

startAction

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

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

runAction

method source
Game_Fight.prototype.runAction(run)

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

runCues

method source
Game_Fight.prototype.runCues(run, action)

The resolved sequence's cues, by start frame; null when there is none to play.

runContext

method source
Game_Fight.prototype.runContext(run)

The run's action, subject and targets, made once per run (and again after a load) and kept off the save: the same Game_Action plays and lands the blow, and the Action Sequence stage reads this.

endStage

method source
Game_Fight.prototype.endStage(run, interrupted)

Tells the stage a run is over (interrupted: cut short); once per staged run.

playCue

method source
Game_Fight.prototype.playCue(step, run, action, character, targets)

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

playMotion

method source
Game_Fight.prototype.playMotion(character, motion)

A model's motion rule of that name, where the character is a 3D model with one.

playAnimation

method source
Game_Fight.prototype.playAnimation(action, targets, id)

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

applyHit

method source
Game_Fight.prototype.applyHit(run, action, targets)

One hit of the run's action, where an Action Sequence lands it; run.hits counts them.

finishHits

method source
Game_Fight.prototype.finishHits(run, action)

The action is done landing: its global effects (a common event), once.

applyRun

method source
Game_Fight.prototype.applyRun(run, action, targets)

Lands whatever of the action has not landed yet (all of it, when no hit was landed one by one), then finishes it.

end

method source
Game_Fight.prototype.end(result, quiet)

Ends the fight: WIN gives the rewards, LOSE the defeat (Game Over unless the battle can be lost), ESCAPE nothing.

reviveFallen

method source
Game_Fight.prototype.reviveFallen()

Whoever fell in this battle on the party's side gets up with 1 HP: the party's members and the allies that events stand for.

Details

Whoever fell in this battle on the party's side gets up with 1 HP: the party's members and the allies that events stand for. One who was already down when it joined (down) stays down: a battle is no free revival.

finish

method source
Game_Fight.prototype.finish()

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

finishUnits

method source
Game_Fight.prototype.finishUnits(result)

The units as the battle leaves them: nobody holds a weapon, the party's battlers end their battle, and nobody keeps its look.

finishAround

method source
Game_Fight.prototype.finishAround(result)

What goes on round a battle as it ends: the map's music comes back, the troop is emptied, the result is kept for whoever asks (resultOf), the feed is told, and the battle is cleared.

Details

What goes on round a battle as it ends: the map's music comes back, the troop is emptied, the result is kept for whoever asks (resultOf), the feed is told, and the battle is cleared. Fallen spawned units are swept last: while the battle stands they are still its units.

endTroopTurn

method source
Game_Fight.prototype.endTroopTurn()

A turn ends: until the next begins, the pages that run as a turn ends may run (updateTroopPages).

Events, Commands & Input

onUnitLanded

method source
Game_Fight.prototype.onUnitLanded(character, fell, settings)

A unit of this fight came down from a fall of fell tiles (ReactorPhysics.onLand): true when the fight says what it costs, so the party is not hurt as when exploring.

Details

A unit of this fight came down from a fall of fell tiles (ReactorPhysics.onLand): true when the fight says what it costs, so the party is not hurt as when exploring. Tactical units lose what their way said (landDrop); in other modes a fall past the safe height costs that unit the fall rule's share of its max HP, where the project's battleFall is "hurt".

Updating & Drawing

syncTroop

method source
Game_Fight.prototype.syncTroop()

$gameTroop holds the fight's enemy-record battlers, so Game_Action finds an enemy subject by its index as it does in a battle.

Details

$gameTroop holds the fight's enemy-record battlers, so Game_Action finds an enemy subject by its index as it does in a battle. The troop is not saved; a load rebuilds it from the units.

update

method source
Game_Fight.prototype.update()

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

updateBattle

method source
Game_Fight.prototype.updateBattle()

One frame of a battle that is on this map: what fades, the pages it owes, its ending, else the phase it is in.

updateAct

method source
Game_Fight.prototype.updateAct()

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

updateRun

method source
Game_Fight.prototype.updateRun()

Advances the run a frame; false when it has ended.

updateNotice

method source
Game_Fight.prototype.updateNotice()

One frame of the notice: counted with the battle's own frames, whatever the battle did in this one.

updateFading

method source
Game_Fight.prototype.updateFading()

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

updateEnding

method source
Game_Fight.prototype.updateEnding()

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

updateTail

method source
Game_Fight.prototype.updateTail()

The interpreter of a battle that ended while one of its own pages was still running (_tail, kept with the save) runs that page to its end, beside whatever the map does, as a parallel event would.

updateHooks

method source
Game_Fight.prototype.updateHooks()

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

updateTroopPages

method source
Game_Fight.prototype.updateTroopPages()

Between actions: the next troop page that holds is queued (true: the battle waits for it).

Details

Between actions: the next troop page that holds is queued (true: the battle waits for it). Once a turn's end has nothing more to run, the next turn is open: pages that run once a turn may run again.

Other

serial

method source
Game_Fight.prototype.serial()

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

mode

method source
Game_Fight.prototype.mode()

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

mapId

method source
Game_Fight.prototype.mapId()

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

resultOf

method source
Game_Fight.prototype.resultOf(serial)

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

units

method source
Game_Fight.prototype.units(filter)

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

unit

method source
Game_Fight.prototype.unit(id)

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

unitOfEvent

method source
Game_Fight.prototype.unitOfEvent(eventId)

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

battler

method source
Game_Fight.prototype.battler(unit)

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

character

method source
Game_Fight.prototype.character(unit)

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

unitAt

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

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

join

method source
Game_Fight.prototype.join(event, named)

An event of this map joins the battle running here as the unit it is now, a full member from this moment: its battler starts its battle, it counts for the goal and gives its reward.

Details

An event of this map joins the battle running here as the unit it is now, a full member from this moment: its battler starts its battle, it counts for the goal and gives its reward. named: a command names it, so one that left this battle earlier comes back; the rule that brings units in by itself never brings one back. Returns its unit (the one it has, when it is in already), or null.

eraseDefeated

method source
Game_Fight.prototype.eraseDefeated(map)

The map is entered: the events remembered as defeated on it leave it, as Erase Event has them leave.

Details

The map is entered: the events remembered as defeated on it leave it, as Erase Event has them leave. One that now comes back (F.staysDefeated), or that is no row any more, stands.

sideOverride

method source
Game_Fight.prototype.sideOverride(mapId, eventId)

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

objective

method source
Game_Fight.prototype.objective()

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

partyAway

method source
Game_Fight.prototype.partyAway(away)

The party walks out of a battle that is kept on its map (away), or back into it.

Details

The party walks out of a battle that is kept on its map (away), or back into it. Away from it the followers trail the leader as on any map, hidden where the game had them hidden; back in it each is a unit on its own again.

cellTaken

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

Whether a cell is taken: the player, a unit, or an event that stands in the way.

Details

Whether a cell is taken: the player, a unit, or an event that stands in the way. An event is on every cell its body covers (a big model, a sized event: Game_Event.prototype.pos), so nobody is put inside a big unit; a body that is only a guess takes its own cell alone, so a formation of models still loading is not scattered.

freeSpotNear

method source
Game_Fight.prototype.freeSpotNear(x, y, near, from)

The nearest free cell a body can stand on, at least near from (x, y), searching outward: { x, y, height }, or null.

Details

The nearest free cell a body can stand on, at least near from (x, y), searching outward: { x, y, height }, or null. from is the height asked from (whoever stands on (x, y) without it). Plain ground on that same level comes first; then anything else stood on at that level (a deck, a bench); then a cell that is a place to stand by its own ground (a hillside has no two cells level); a map where none of these is in reach gives a free cell its tiles let a walker onto.

anyFreeCell

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

The nearest free cell the tiles let a walker onto, whatever is built on it: the last answer of freeSpotNear.

spotFor

method source
Game_Fight.prototype.spotFor(x, y, from)

Where a unit asked for at (x, y) is put: that cell when it is free and a body can stand there (at the height from when one is given, else on its ground: F.groundLevel), else the nearest one that is; the cell as asked when there is none, so a unit a battle needs is never missing.

fitBody

method source
Game_Fight.prototype.fitBody(event, x, y, near, from, free)

A unit bigger than its cell must fit where it stands: its body clear of the party and of every other body (Reactor3D.bodyFits).

Details

A unit bigger than its cell must fit where it stands: its body clear of the party and of every other body (Reactor3D.bodyFits). One that does not is moved to the nearest cell round (x, y), from near cells out, where it does. free: the place was the battle's own choice near (x, y), not the game's cell, so more is asked of it, there and anywhere it is moved to: its body (the rectangle it lies in), not only its own cell, keeps near cells from (x, y), and every cell under it is a place to stand near its own level (not through a wall, a lamp or a pond). What cannot be had is given up in that order, the ground first, and good ground is looked for close by only. The party is never moved for it. Returns whether its body is clear where it is now.

bodyStands

method source
Game_Fight.prototype.bodyStands(body, x, y, height)

Whether every cell under a body whose own cell is (x, y) holds a place to stand within F.SPOT_HULL of height.

hookInterpreter

method source
Game_Fight.prototype.hookInterpreter()

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

waitingInterpreter

method source
Game_Fight.prototype.waitingInterpreter()

The interpreter of the map's running event that waits for this fight, however deep in the common events it called (Battle Processing or Start Battle on Map inside a common event waits there, not in the event that called it); null when the map's event does something else, or nothing.

waitReason

method source
Game_Fight.prototype.waitReason()

What the battle waits for, in words for the console; "" when nothing holds it.

noteWait

method source
Game_Fight.prototype.noteWait()

The battle waits this frame.

Details

The battle waits this frame. A wait that goes on and on is named once in the console, so its cause can be found.

nextInQueue

method source
Game_Fight.prototype.nextInQueue()

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

distance

method source
Game_Fight.prototype.distance(a, b)

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

bodyRadius

method source
Game_Fight.prototype.bodyRadius(character, toward)

How far a character's body reaches from its cell, in tiles: a 3D model blocks the cells its body covers (Reactor3D.eventModelFootprint), so a big one is struck from beside its body, not its middle.

Details

How far a character's body reaches from its cell, in tiles: a 3D model blocks the cells its body covers (Reactor3D.eventModelFootprint), so a big one is struck from beside its body, not its middle. Half a tile for a character on one cell. With toward (a character, or anything with x and y) it is the body's reach that way: a long body's flank is nearer its middle than its ends are, and a standing figure (taller than it is long or wide) is half a tile whatever its arms span. Without it, the furthest the body reaches any way.

inReach

method source
Game_Fight.prototype.inReach(a, b)

Whether two units' bodies are close enough to strike.

nearestOpponent

method source
Game_Fight.prototype.nearestOpponent(unit)

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

chooseAction

method source
Game_Fight.prototype.chooseAction(battler)

What a battler does: an enemy by its action patterns, an actor by its skills; the attack otherwise.

actionTargets

method source
Game_Fight.prototype.actionTargets(unit, action, target)

The units an action lands on, from the one beside the actor: friends for a friendly skill, an area for "all".

actingBattler

method source
Game_Fight.prototype.actingBattler(unit, via)

The battler an action of a unit's is made with: its own, or with via "vehicle" the battler of the vehicle it rides (its weapon, its skills, its strength), where it rides one that has a battler.

landHits

method source
Game_Fight.prototype.landHits(run, action, targets, count, first, total)

Lands count hits of the action on each target and shows them: the result, one popup with what the hits took together, the fightImpact report (hit the first of these hits, from 1; hits the action's total), a defeat.

Details

Lands count hits of the action on each target and shows them: the result, one popup with what the hits took together, the fightImpact report (hit the first of these hits, from 1; hits the action's total), a defeat. A fallen target takes the first hit of an action only (a revival), never a later one.

hitTotal

method source
Game_Fight.prototype.hitTotal(run, action)

How many times the run's action lands: what the stage counted (run.hitTotal), else the skill's Repeats and the battler's Attack Times+.

unitOfCharacter

method source
Game_Fight.prototype.unitOfCharacter(character)

The unit a character shows in this fight, or null.

hurtByFall

method source
Game_Fight.prototype.hurtByFall(unit, loss)

A fall cost a unit loss HP (the fall rule of Database › System 2 › Physics): taken, shown over it with the hard landing sound, and a unit left with nothing is defeated.

term

method source
Game_Fight.prototype.term(key)

The battle's words for a key, as a HUD asks for them: the reason it gave for a grayed command (commandReason).

goalText

method source
Game_Fight.prototype.goalText()

The goal in full: what the battle menu's Goal page and a change of goal say.

objectiveText

method source
Game_Fight.prototype.objectiveText()

The goal as a HUD's line shows it: what is left of it where that can be counted (enemies standing, turns to hold).

announce

method source
Game_Fight.prototype.announce(text)

A line for the HUD's banner (where the phase is announced), in any mode: it stands for F.NOTICE_FRAMES, then is gone.

notice

method source
Game_Fight.prototype.notice()

The notice to show now (a goal that changed), or "" when there is none.

defeat

method source
Game_Fight.prototype.defeat(unit)

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

blowFrom

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

Where the blow that lands on target comes from: the middle of a blast (a circle, square or cross, for whoever is not standing on it), else where the one who struck stands.

Details

Where the blow that lands on target comes from: the middle of a blast (a circle, square or cross, for whoever is not standing on it), else where the one who struck stands. Null when nobody did.

fell

method source
Game_Fight.prototype.fell(unit, event)

A unit an event stands for has fallen: what is left of it (F.remainsOf) is put on the way it goes.

raise

method source
Game_Fight.prototype.raise(unit)

A fallen unit is alive again: it is in the battle as it was, and what was left of it stands.

settleFallen

method source
Game_Fight.prototype.settleFallen()

The battle is over: a body whose battler is alive again stands (the party's side, got up by reviveFallen), and whatever else was still on its way out is off the map as the ones that faded are.

eraseFallen

method source
Game_Fight.prototype.eraseFallen()

The map of a battle that is still on was read again (the party is back on the map of a battle that was kept, or a load read the map anew): every event stands on it as authored, and those of the units that fell in the battle, or left it and the map, are taken off it again.

checkOutcome

method source
Game_Fight.prototype.checkOutcome(roundEnded)

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

rememberDefeated

method source
Game_Fight.prototype.rememberDefeated()

A battle that was not lost: the enemies placed on its map that fell in it are remembered as defeated, unless they come back (F.staysDefeated), so they stay off the map when it is entered again.

Details

A battle that was not lost: the enemies placed on its map that fell in it are remembered as defeated, unless they come back (F.staysDefeated), so they stay off the map when it is entered again. Read from the map's own events, so only while the party is on it.

hookMatches

method source
Game_Fight.prototype.hookMatches(hook, type, info, event)

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

fireHooks

method source
Game_Fight.prototype.fireHooks(type, info)

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

checkEnterHooks

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

A unit that has just stepped into a hook's area from outside it.

troopPageMet

method source
Game_Fight.prototype.troopPageMet(entry, page, turnEnding)

Whether a troop page's conditions hold now; turnEnding: the turn is ending.

Details

Whether a troop page's conditions hold now; turnEnding: the turn is ending. A page with none set never runs.

checkTroopPages

method source
Game_Fight.prototype.checkTroopPages(turnEnding)

Queues the first troop page whose conditions hold and that has not run in its span, as the battle screen starts one page at a time.

Details

Queues the first troop page whose conditions hold and that has not run in its span, as the battle screen starts one page at a time. Returns whether one was queued (the battle then waits for it).

adopt

method source
Game_Fight.prototype.adopt(options)

A command that would start a battle while one runs here gives that battle what it brought: whether the party can escape and can lose, the units it would have taken (who: "near" the party, else every unit on the map), its troop, and its goal, judged at once.

Details

A command that would start a battle while one runs here gives that battle what it brought: whether the party can escape and can lose, the units it would have taken (who: "near" the party, else every unit on the map), its troop, and its goal, judged at once. The battle keeps its mode.