Quick Reference
Setup & Creation 1
| installFightSeams() | Give the Tactical grid its vertical movement, once it exists and nobody else has. |
Getting Information 1
| atRest() | Whether character is at rest as rest recorded it, at update tick. |
Checks (True / False) 8
| isAirborne() | Whether a character is in the air (a jump, a fall); a swimmer, a vehicle's rider and a walker coming down a s… |
| isSwimming() | Whether a character is swimming. |
| isUnderwater() | Whether a swimmer is under the surface (diving), not treading water at it. |
| isPartyCharacter() | A party member of the map: the player or a follower. |
| canStandAt() | Whether a body can stand on a cell at about a height: standingAt answered yes or no. |
| isMantling() | Whether a character is pulling itself up a ledge. |
| isGroundTop() | Whether the place to stand at top on a cell is the ground itself, the terrain or a rock, and nothing built. |
| isGrappling() | Whether a character is on a grapple's line: it flies, or the body is pulled. |
Actions 9
| jumpAllowed() | Jump allowed. |
| jumpSpeed() | The upward speed whose jump tops out at rise tiles under gravity g (tiles per frame squared), counted in whol… |
| jump() | A jump from the ground: the upward speed that reaches the jump height under this gravity. |
| playSe() | A sound effect from the settings, played as authored. |
| forgetEdges() | Forget what was read of a map (the editor, after an edit made in place). |
| openGround() | Whether a place to stand is ground the walk goes on over, and not the top of a thing that stands on it (a cou… |
| startMantle() | Put a character into the climb from where it stands at height from onto cell (x, y) at height to, facing d: u… |
| playStep() | Play a grid step that is a climb: a mantle up, a wall climbed, a ladder up or down, a grapple. |
| startGrapple() | Begin a grapple step { x, y, d, height } (the top's cell, the way onto it, its height), hanging over bx, by w… |
Events, Commands & Input 2
| onSplash() | Into the water: the splash the 3D view draws, and the project's splash sound for the player. |
| onLand() | Landing: the landing sound; a long fall hurts (a share of max HP per tile past the safe height, or the projec… |
Updating & Drawing 8
| stepUpCap() | The highest ledge a walker climbs by walking into it, whatever stepUpReach says: a hop, the rise a jump of ju… |
| update() | Update. |
| stepRate() | The most a walker's feet rise or sink in a frame while they keep the ground: STEP_SPEED, or what the steepest… |
| updateFatalFall() | A fatal fall ends the game once its bodies have lain long enough. |
| stepUpReach() | How high a ledge is climbed by walking into it, in tiles: the project's setting, never over a hop (stepUpCap)… |
| stepUp() | Climb the low ledge toward d that a walker stands against: a top that rises no more than the step-up reach (t… |
| updateMantle() | One frame of a mantle: up beside the wall, then over the edge onto the top. |
| updateGrapple() | One frame of a grapple: the line flies, the body is pulled to hang under the edge, then it climbs over (a man… |
Other 55
| settings() | The project's physics, with the map's own over them. |
| readSettings() | Read settings. |
| gravityPerFrame() | Gravity in tiles per frame squared (the game runs 60 frames a second). |
| air() | How far above a character's ground it is: the height the 3D view adds. |
| fellOff() | Whether a character is falling without having jumped: it walked off an edge (or the ground went from under it… |
| floatHeight() | The height a swimmer floats at over a point (the surface less the swim depth), or null where the water is sha… |
| drift() | Drift. |
| ladderHeld() | The ladder a character holds: on a ladder's cell, between its foot and its top, off the ground. |
| leaderOf() | The character a follower walks behind: the nearest one before it in the line that follows and is seen, or the… |
| followerLadderTarget() | A follower on a ladder climbs to where its leader is (the roof it went up to, the ground it went down to), an… |
| followerMantle() | A follower whose next step toward its leader is up a ledge takes it as its leader did: a hop or a mantle, not… |
| followerClimbing() | Whether a follower is still on its way up or down a ladder. |
| lookDive() | How a swimmer's forward stroke follows the camera, from -1 (rising) to 1 (diving): in third or first person,… |
| steerDive() | A swimmer's depth control, once a frame: down while down is held, up while up is; it holds its depth otherwis… |
| settle() | On the ground, still: no height, no speed, not swimming, climbing or diving. |
| groundPoint() | The point of the map a character's ground is read at, [x, z] in tiles: its own middle. |
| groundUnder() | The ground under a character where it is now, on the floor it is on: read at its groundPoint, nearest the gro… |
| ride() | A vehicle on a 3D map, and the player aboard it: a boat or ship rides the water's surface, an airship rises w… |
| underGround() | Whether a body standing at height that has come onto cell (x, y) has walked into the ground itself: the lowes… |
| headroom() | How far a character can rise where it stands before its head meets what is over it, in tiles: Infinity under… |
| noteJumpRefused() | Why a Jump press did nothing, on the console (and in lastJumpRefusal). |
| goLimp() | A character goes limp: the 3D view hands its model to a ragdoll from this frame on, carrying the speed it had. |
| fallShare() | The share of max HP a fall of fell tiles takes by the fall rule (0 up to the safe fall, at most all of it). |
| fallHp() | The HP a share of max HP is to a battler of mhp: at least 1 when the share is more than nothing. |
| impactSpeed() | The speed (tiles a frame) of a body that fell this far under these settings. |
| airBlocks() | Whether a step is blocked for a character in the air: anything it is above (by the step it could take on the… |
| wideEnough() | Whether a piece's top is wide enough to stand on. |
| levelsAt() | The places to stand on a cell, from the ground up: top (world height at the cell's middle), ceiling (the foot… |
| ceilingAbove() | The foot of the lowest thing over a height on a cell: Infinity under the sky. |
| standingAt() | Where a body can be put on a cell: the height of its place to stand nearest near (the lowest when near is not… |
| cornerBlocks() | Whether a diagonal step is stopped by what stands at the corner it passes over: the point where its two cells… |
| squareCorners() | Whether a character's diagonal steps answer to the corner they pass: on a 3D map, for anything a wall stops. |
| edgeRules() | The limits an edge is judged by: the project's and the map's physics, with overrides over them (jump on or of… |
| mantleOverlap() | Frames of the pull's end that the step onto the top shares: a quarter of it, 4 to 8. |
| mantleFrames() | Frames a mantle's pull takes for a rise. |
| edges() | Every way a body at height on cell (x, y) can go toward d (2, 4, 6, 8), best first: one entry for each place… |
| edge() | The one thing a body pressing toward d does: the first of edges. |
| mantleAllowed() | Whether ledges are mantled here: the project's switch, and jumping allowed on this map. |
| mantleTopTaken() | Whether the cell a mantle ends on is taken by somebody solid. |
| tryMantle() | Take hold of the ledge toward d, if there is one within reach from where the character is (on the ground: a j… |
| battleClimbs() | Whether walls are climbed here: a battle on the map other than a Tactical one (its grid climbs by itself), an… |
| lowLedge() | Of the ways edges gave, the low ledge a walker climbs by walking into it: the first hop or mantle, when its t… |
| mantleLookAhead() | Mantle look ahead. |
| mantleAhead() | How many steps on from a cell toward d a ledge is there to take: 1 from the cell itself (an eave over the way… |
| walksOff() | Whether a walker steps off the edge toward d: a party member standing on something built (a roof, a wall top,… |
| climbs() | An event that climbs (<climb> in its note): a step of its route that a ledge stops is taken as a hop or a man… |
| cancelMantle() | Let go of the ledge: the body is in the air where it was, and gravity has it again. |
| tacticalRules() | The limits a Tactical unit of that jump is judged by: it hops its jump, mantles a little over it and climbs w… |
| climbCostFor() | Move points a climb of rise tiles costs: climbCost a tile, rounded up, and never less than a mantle. |
| tacticalDrop() | A drop as a Tactical unit of that jump takes it: { cost, harm } (harm the share of max HP the fall takes), or… |
| tacticalEdge() | The Tactical grid's edge: { kind, cost, height, harm } for a mantle, a climb, a ladder or a long drop from ce… |
| tacticalEdges() | Every way on for a unit, for a grid that keeps more than one height on a cell (the ground under an eave and t… |
| grappleTargets() | Every edge a grapple from cell (x, y) at from takes hold of: tops a body stands on (level, or a roof's pitch)… |
| grapplePhase() | The beat a grapple is at: "aim", "fly", "tight" or "pull" (the climb over is a mantle). |
| grappleHook() | Where a grapple's hook is now, in tiles (x, y across the map, z up), how much of the line is out (out, 0 to 1… |
Setup & Creation
installFightSeams
static sourceReactorPhysics.installFightSeams()
Give the Tactical grid its vertical movement, once it exists and nobody else has.
Getting Information
atRest
static sourceReactorPhysics.atRest(character, rest, tick)
Whether character is at rest as rest recorded it, at update tick.
Details
Whether character is at rest as rest recorded it, at update tick.
Checks (True / False)
isAirborne
static sourceReactorPhysics.isAirborne(character)
Whether a character is in the air (a jump, a fall); a swimmer, a vehicle's rider and a walker coming down a step are not.
isSwimming
static sourceReactorPhysics.isSwimming(character)
Whether a character is swimming.
isUnderwater
static sourceReactorPhysics.isUnderwater(character)
Whether a swimmer is under the surface (diving), not treading water at it.
isPartyCharacter
static sourceReactorPhysics.isPartyCharacter(character)
A party member of the map: the player or a follower.
canStandAt
static sourceReactorPhysics.canStandAt(mapData, x, y, near, options)
Whether a body can stand on a cell at about a height: standingAt answered yes or no.
isMantling
static sourceReactorPhysics.isMantling(character)
Whether a character is pulling itself up a ledge.
isGroundTop
static sourceReactorPhysics.isGroundTop(mapData, x, y, top)
Whether the place to stand at top on a cell is the ground itself, the terrain or a rock, and nothing built.
isGrappling
static sourceReactorPhysics.isGrappling(character)
Whether a character is on a grapple's line: it flies, or the body is pulled.
Actions
jumpAllowed
static sourceReactorPhysics.jumpAllowed()
Jump allowed.
jumpSpeed
static sourceReactorPhysics.jumpSpeed(rise, g)
The upward speed whose jump tops out at rise tiles under gravity g (tiles per frame squared), counted in whole frames as the game moves: the height is reached exactly on the frame the rise ends.
jump
static sourceReactorPhysics.jump(character)
A jump from the ground: the upward speed that reaches the jump height under this gravity.
Details
A jump from the ground: the upward speed that reaches the jump height under this gravity. From the water it reaches the jump height over the surface, so a swimmer can make a bank a walker could jump onto.
playSe
static sourceReactorPhysics.playSe(se)
A sound effect from the settings, played as authored.
forgetEdges
static sourceReactorPhysics.forgetEdges(mapData)
Forget what was read of a map (the editor, after an edit made in place).
openGround
static sourceReactorPhysics.openGround(mapData, x, y, top)
Whether a place to stand is ground the walk goes on over, and not the top of a thing that stands on it (a counter, a table, a crate, a boulder): walking on from it, without a hop or a drop, comes to the ground itself or to OPEN_GROUND_PLACES places.
Details
Whether a place to stand is ground the walk goes on over, and not the
top of a thing that stands on it (a counter, a table, a crate, a
boulder): walking on from it, without a hop or a drop, comes to the
ground itself or to OPEN_GROUND_PLACES places. A pond's rim the
square steps onto is ground; a bar's top, from which every way on is a
drop, is not. The walk is read from the cells' kept levels (a place
within a step of this one on the next cell), and from the terrain's
own rule on and beside a stair: its run is climbed a whole tile a
cell, and its side is a wall.
startMantle
static sourceReactorPhysics.startMantle(character, d, x, y, from, to, pull)
Put a character into the climb from where it stands at height from onto cell (x, y) at height to, facing d: up beside the wall and over when to is higher, over the edge and down it when lower (the way down a ladder).
Details
Put a character into the climb from where it stands at height from
onto cell (x, y) at height to, facing d: up beside the wall and
over when to is higher, over the edge and down it when lower (the way
down a ladder). pull is the frames the rise or the descent takes.
playStep
static sourceReactorPhysics.playStep(character, step)
Play a grid step that is a climb: a mantle up, a wall climbed, a ladder up or down, a grapple.
Details
Play a grid step that is a climb: a mantle up, a wall climbed, a ladder up or down, a grapple. Other kinds are the grid's (false).
startGrapple
static sourceReactorPhysics.startGrapple(character, step)
Begin a grapple step { x, y, d, height } (the top's cell, the way onto it, its height), hanging over bx, by with the hook at hx, hy and lip where the target gave them (else over the cell beside the top, at its edge).
Details
Begin a grapple step { x, y, d, height } (the top's cell, the way onto it, its height), hanging over bx, by
with the hook at hx, hy and lip where the target gave them (else over the cell beside the top, at its edge).
False when there is no edge there.
Events, Commands & Input
onSplash
static sourceReactorPhysics.onSplash(character, speed)
Into the water: the splash the 3D view draws, and the project's splash sound for the player.
onLand
static sourceReactorPhysics.onLand(character, fell, settings)
Landing: the landing sound; a long fall hurts (a share of max HP per tile past the safe height, or the project's common event); a fall that kills the whole party leaves the bodies limp on the ground for a moment before the game ends, and a follower still falling goes limp where it lands.
Updating & Drawing
stepUpCap
static sourceReactorPhysics.stepUpCap(jumpHeight)
The highest ledge a walker climbs by walking into it, whatever stepUpReach says: a hop, the rise a jump of jumpHeight carries a body onto (the jump height and a step: 2 tiles at the stock jump).
Details
The highest ledge a walker climbs by walking into it, whatever
stepUpReach says: a hop, the rise a jump of jumpHeight carries a
body onto (the jump height and a step: 2 tiles at the stock jump).
Anything higher is a mantle and takes the Jump key. Never under the
stock reach, so a game with a low jump still walks out of a pond; and
a game with no jump at all (a jump height of 0) keeps the stock hop.
update
static sourceReactorPhysics.update(character)
Update.
stepRate
static sourceReactorPhysics.stepRate(character)
The most a walker's feet rise or sink in a frame while they keep the ground: STEP_SPEED, or what the steepest slope makes of the character's own pace where that is more.
Details
The most a walker's feet rise or sink in a frame while they keep the
ground: STEP_SPEED, or what the steepest slope makes of the
character's own pace where that is more. A stair taken at any move
speed is under the walker every frame; only a step is eased.
updateFatalFall
static sourceReactorPhysics.updateFatalFall()
A fatal fall ends the game once its bodies have lain long enough.
stepUpReach
static sourceReactorPhysics.stepUpReach()
How high a ledge is climbed by walking into it, in tiles: the project's setting, never over a hop (stepUpCap), 0 where the project switches that off.
stepUp
static sourceReactorPhysics.stepUp(character, d, highest)
Climb the low ledge toward d that a walker stands against: a top that rises no more than the step-up reach (the project's, never over a hop: stepUpCap) over where it stands, and is ground the walk goes on over (a pond's rim from inside, a bank, a terrace), taken without Jump and whether or not jumping is on.
Details
Climb the low ledge toward d that a walker stands against: a top
that rises no more than the step-up reach (the project's, never over
a hop: stepUpCap) over where it stands, and is ground the walk goes
on over (a pond's rim from inside, a bank, a terrace), taken without
Jump and whether or not jumping is on. A bank of the ground or of a
rock is taken by its edge: the edge within the reach, its top no more
than a hop up. The top of a thing standing on the floor (a counter, a
table, a crate) and anything higher (a roof whose eave is within the
reach, a wall) are left to Jump. Or step down a ledge of the ground
as low, where a push the other way climbs back: what a push leaves, a
push returns to. highest leaves alone anything that ends above that
height. Returns whether it took hold.
updateMantle
static sourceReactorPhysics.updateMantle(character)
One frame of a mantle: up beside the wall, then over the edge onto the top.
updateGrapple
static sourceReactorPhysics.updateGrapple(character)
One frame of a grapple: the line flies, the body is pulled to hang under the edge, then it climbs over (a mantle).
Other
settings
static sourceReactorPhysics.settings()
The project's physics, with the map's own over them.
readSettings
static sourceReactorPhysics.readSettings()
Read settings.
gravityPerFrame
static sourceReactorPhysics.gravityPerFrame(settings = this.settings()
Gravity in tiles per frame squared (the game runs 60 frames a second).
air
static sourceReactorPhysics.air(character)
How far above a character's ground it is: the height the 3D view adds.
fellOff
static sourceReactorPhysics.fellOff(character)
Whether a character is falling without having jumped: it walked off an edge (or the ground went from under it) and is more than a step over what is below.
Details
Whether a character is falling without having jumped: it walked off an edge (or the ground went from under it) and is more than a step over what is below. It takes no step on through the air.
floatHeight
static sourceReactorPhysics.floatHeight(mapData, x, y, ground, settings = this.settings()
The height a swimmer floats at over a point (the surface less the swim depth), or null where the water is shallow enough to stand in, there is none, or swimming is off.
Details
The height a swimmer floats at over a point (the surface less the swim
depth), or null where the water is shallow enough to stand in, there is
none, or swimming is off. ground is the bottom under the point.
drift
static sourceReactorPhysics.drift(character, asked)
Drift.
ladderHeld
static sourceReactorPhysics.ladderHeld(character)
The ladder a character holds: on a ladder's cell, between its foot and its top, off the ground.
leaderOf
static sourceReactorPhysics.leaderOf(character)
The character a follower walks behind: the nearest one before it in the line that follows and is seen, or the player.
Details
The character a follower walks behind: the nearest one before it in the line that follows and is seen, or the player. One out of the line (told to stay, sent somewhere, on a route, hidden) leads nobody up a ladder or a ledge, and one under such an order follows nobody: null.
followerLadderTarget
static sourceReactorPhysics.followerLadderTarget(character)
A follower on a ladder climbs to where its leader is (the roof it went up to, the ground it went down to), and its next step waits until it is there: the party goes up a ladder one after another, never through the wall.
Details
A follower on a ladder climbs to where its leader is (the roof it went up to, the ground it went down to), and its next step waits until it is there: the party goes up a ladder one after another, never through the wall. Returns the height it is making for, or null off a ladder.
followerMantle
static sourceReactorPhysics.followerMantle(character, lead)
A follower whose next step toward its leader is up a ledge takes it as its leader did: a hop or a mantle, not a walk through the wall.
Details
A follower whose next step toward its leader is up a ledge takes it as its leader did: a hop or a mantle, not a walk through the wall. Returns whether it took hold.
followerClimbing
static sourceReactorPhysics.followerClimbing(character)
Whether a follower is still on its way up or down a ladder.
lookDive
static sourceReactorPhysics.lookDive(character)
How a swimmer's forward stroke follows the camera, from -1 (rising) to 1 (diving): in third or first person, swimming forward while looking down past the view's own resting pitch dives, looking up rises, and backing up does the opposite.
Details
How a swimmer's forward stroke follows the camera, from -1 (rising) to 1 (diving): in third or first person, swimming forward while looking down past the view's own resting pitch dives, looking up rises, and backing up does the opposite. 0 in the fixed views and when not moving.
steerDive
static sourceReactorPhysics.steerDive(character, down, up, pitch = 0)
A swimmer's depth control, once a frame: down while down is held, up while up is; it holds its depth otherwise, and never goes below the bottom.
Details
A swimmer's depth control, once a frame: down while down is held,
up while up is; it holds its depth otherwise, and never goes below
the bottom. Returns whether the swimmer is under the surface.
settle
static sourceReactorPhysics.settle(character)
On the ground, still: no height, no speed, not swimming, climbing or diving.
groundPoint
static sourceReactorPhysics.groundPoint(character, out)
The point of the map a character's ground is read at, [x, z] in tiles: its own middle.
Details
The point of the map a character's ground is read at, [x, z] in tiles:
its own middle. On a diagonal step the middle passes over the corner
where four cells meet, and that point floors into a cell the step never
enters; there the point is kept inside the cell being left until
half-way and inside the cell being entered from then on. out receives
the point; without it a shared scratch is returned, to be read before
the next call.
groundUnder
static sourceReactorPhysics.groundUnder(character, near)
The ground under a character where it is now, on the floor it is on: read at its groundPoint, nearest the ground it last stood on.
Details
The ground under a character where it is now, on the floor it is on:
read at its groundPoint, nearest the ground it last stood on. For
anything that needs a moving body's ground outside the physics' own
frame (an aim, a marker, a camera).
ride
static sourceReactorPhysics.ride(character, craft)
A vehicle on a 3D map, and the player aboard it: a boat or ship rides the water's surface, an airship rises with its altitude over the top of what is under it (a roof as much as the ground).
Details
A vehicle on a 3D map, and the player aboard it: a boat or ship rides the water's surface, an airship rises with its altitude over the top of what is under it (a roof as much as the ground). No gravity, and not airborne.
underGround
static sourceReactorPhysics.underGround(character, x, y, height)
Whether a body standing at height that has come onto cell (x, y) has walked into the ground itself: the lowest place of the cell is the terrain or a rock, more than a step over the body, and no further over it than a walked step leaves one (it kept its footing down a level and a step, and the step's edge and far end are each a step over where it left: a level and two steps).
Details
Whether a body standing at height that has come onto cell (x, y)
has walked into the ground itself: the lowest place of the cell is
the terrain or a rock, more than a step over the body, and no further
over it than a walked step leaves one (it kept its footing down a
level and a step, and the step's edge and far end are each a step
over where it left: a level and two steps). Deeper, a body is
crossing a rock or a hill and keeps its own level; update holds the
ground at the body's own point to the same depth. A wall, a post, a
block or a shut door a body stands in or beside is not ground. Nor is
anything to a body that passes through things: an event or the
player set Through, the player holding the playtest's walk-through
key, and a follower (always set Through) while the player does or the
party gathers.
headroom
static sourceReactorPhysics.headroom(character)
How far a character can rise where it stands before its head meets what is over it, in tiles: Infinity under the sky.
noteJumpRefused
static sourceReactorPhysics.noteJumpRefused(character, reason)
Why a Jump press did nothing, on the console (and in lastJumpRefusal).
goLimp
static sourceReactorPhysics.goLimp(character, impact)
A character goes limp: the 3D view hands its model to a ragdoll from this frame on, carrying the speed it had.
Details
A character goes limp: the 3D view hands its model to a ragdoll from this frame on, carrying the speed it had. Input stops for the player.
fallHp
static sourceReactorPhysics.fallHp(mhp, share)
The HP a share of max HP is to a battler of mhp: at least 1 when the share is more than nothing.
impactSpeed
static sourceReactorPhysics.impactSpeed(fell, settings = this.settings()
The speed (tiles a frame) of a body that fell this far under these settings.
airBlocks
static sourceReactorPhysics.airBlocks(character, x2, y2)
Whether a step is blocked for a character in the air: anything it is above (by the step it could take on the ground) it moves over, and a drop never stops it.
Details
Whether a step is blocked for a character in the air: anything it is above (by the step it could take on the ground) it moves over, and a drop never stops it. On the ground the terrain's own rule stands. What it would come down on has to be somewhere a body stands: a fence, a post or a spire is a wall to a jumper as to a walker.
wideEnough
static sourceReactorPhysics.wideEnough(piece)
Whether a piece's top is wide enough to stand on.
Details
Whether a piece's top is wide enough to stand on. Asked of the shapes that stand upright; a cell piece, a rock's column and a slab laid at a tilt (an eave) answer by their kind.
levelsAt
static sourceReactorPhysics.levelsAt(mapData, x, y)
The places to stand on a cell, from the ground up: top (world height at the cell's middle), ceiling (the foot of what hangs over it, Infinity under the sky), slope (rise per tile across the cell), kind (the piece on top, or "ground"), level (no steeper than a walk), roof (a roof's slope, no steeper than a roof is walked), narrow (a top of a kind nobody stands on, or less than STAND_WIDTH across)…
Details
The places to stand on a cell, from the ground up: top (world height at
the cell's middle), ceiling (the foot of what hangs over it, Infinity
under the sky), slope (rise per tile across the cell), kind (the piece
on top, or "ground"), level (no steeper than a walk), roof (a
roof's slope, no steeper than a roof is walked), narrow (a top of a
kind nobody stands on, or less than STAND_WIDTH across) and stand
(a body can stop there: not narrow, and no steeper than it is walked).
Kept per map until its pieces, terrain or water change.
ceilingAbove
static sourceReactorPhysics.ceilingAbove(mapData, x, y, height)
The foot of the lowest thing over a height on a cell: Infinity under the sky.
standingAt
static sourceReactorPhysics.standingAt(mapData, x, y, near, options)
Where a body can be put on a cell: the height of its place to stand nearest near (the lowest when near is not given), or null when the cell has none.
Details
Where a body can be put on a cell: the height of its place to stand
nearest near (the lowest when near is not given), or null when the
cell has none. A place to stand is a level of levelsAt that is
stand (wide enough, no fence, post, spire or lamp's top), with a
body's room over it, out of a bush that blocks, and not under water
deeper than a wade. options: within (how far from near it may be,
in tiles), body (the room needed, BODY_HEIGHT by default), water
("wade" by default; "swim" also takes water the map's swimmers swim
in; "any" does not ask). The map's data only: tile passability and who
stands there are the caller's.
cornerBlocks
static sourceReactorPhysics.cornerBlocks(character, x, y, horz, vert)
Whether a diagonal step is stopped by what stands at the corner it passes over: the point where its two cells and the two beside them meet.
Details
Whether a diagonal step is stopped by what stands at the corner it
passes over: the point where its two cells and the two beside them
meet. A body is as wide as its cell, so part of it crosses each of the
four; ground there more than a step over the walker, in any of them (a
wall's corner, a post, a crate, a rock, a spike of the ground), is in
its way. The two cells the step passes between have to be open to walk
as well, which is the caller's to ask (canPassDiagonally).
squareCorners
static sourceReactorPhysics.squareCorners(character)
Whether a character's diagonal steps answer to the corner they pass: on a 3D map, for anything a wall stops.
edgeRules
static sourceReactorPhysics.edgeRules(overrides)
The limits an edge is judged by: the project's and the map's physics, with overrides over them (jump on or off, jumpHeight, hop the highest rise hopped, reach the highest mantled, mantle, mantleReach, body, the fall rule, climb the highest edge a wall is climbed to without a ladder, 0 for none).
Details
The limits an edge is judged by: the project's and the map's physics,
with overrides over them (jump on or off, jumpHeight, hop the
highest rise hopped, reach the highest mantled, mantle,
mantleReach, body, the fall rule, climb the highest edge a wall
is climbed to without a ladder, 0 for none). A Tactical unit passes its
own hop, reach and climb.
mantleOverlap
static sourceReactorPhysics.mantleOverlap(pull)
Frames of the pull's end that the step onto the top shares: a quarter of it, 4 to 8.
mantleFrames
static sourceReactorPhysics.mantleFrames(rise)
Frames a mantle's pull takes for a rise.
edges
static sourceReactorPhysics.edges(mapData, x, y, d, height, rules)
Every way a body at height on cell (x, y) can go toward d (2, 4, 6, 8), best first: one entry for each place to stand on the neighbour that it can reach, or a single blocked entry saying why not.
Details
Every way a body at height on cell (x, y) can go toward d (2, 4, 6,
8), best first: one entry for each place to stand on the neighbour that
it can reach, or a single blocked entry saying why not. An entry is
{ kind, x, y, d, from, to, rise, frames, cost }: kind is "walk",
"ladder", "hop", "mantle", "climb" (a wall too high to mantle, within
rules.climb), "drop" or "blocked"; x, y the cell it
ends on; to the height it ends at and rise the height gained
(negative down); frames the time it takes and cost the same in
tiles walked. A drop adds fell, hurts and harm (the share of max
HP the fall rule takes) and water when it ends in deep water; a
blocked entry adds reason: "offmap", "edge" (a ridge, a stair's
side, deep water, a bush), "steep", "thin", "headroom" (no room to
stand on top), "overhead" (something over the climber), "high".
rules are edgeRules() or overrides for them.
edge
static sourceReactorPhysics.edge(mapData, x, y, d, height, rules)
The one thing a body pressing toward d does: the first of edges.
mantleAllowed
static sourceReactorPhysics.mantleAllowed()
Whether ledges are mantled here: the project's switch, and jumping allowed on this map.
mantleTopTaken
static sourceReactorPhysics.mantleTopTaken(character, x, y)
Whether the cell a mantle ends on is taken by somebody solid.
tryMantle
static sourceReactorPhysics.tryMantle(character, d, hops, highest)
Take hold of the ledge toward d, if there is one within reach from where the character is (on the ground: a jump and raised hands; in the air or the water: raised hands).
Details
Take hold of the ledge toward d, if there is one within reach from
where the character is (on the ground: a jump and raised hands; in the
air or the water: raised hands). hops also takes a rise a jump would
make (a follower going up after its leader), highest leaves alone
anything that ends above that height. Returns whether it took hold.
battleClimbs
static sourceReactorPhysics.battleClimbs(settings = this.settings()
Whether walls are climbed here: a battle on the map other than a Tactical one (its grid climbs by itself), and the project's switch.
lowLedge
static sourceReactorPhysics.lowLedge(mapData, options, highest)
Of the ways edges gave, the low ledge a walker climbs by walking into it: the first hop or mantle, when its top is open ground (openGround) and no stair (a stair is climbed along its run: its side is a wall to a walker).
Details
Of the ways edges gave, the low ledge a walker climbs by walking
into it: the first hop or mantle, when its top is open ground
(openGround) and no stair (a stair is climbed along its run: its
side is a wall to a walker). highest leaves alone anything that ends
above that height. Null where there is none.
mantleLookAhead
static sourceReactorPhysics.mantleLookAhead(character)
Mantle look ahead.
mantleAhead
static sourceReactorPhysics.mantleAhead(character, x, y, d)
How many steps on from a cell toward d a ledge is there to take: 1 from the cell itself (an eave over the way on, as much as a wall in it), 2 from the next cell after a plain step and so on as far as the character's pace looks (mantleLookAhead), 0 for none.
walksOff
static sourceReactorPhysics.walksOff(character, x, y, d)
Whether a walker steps off the edge toward d: a party member standing on something built (a roof, a wall top, a crate) whose fall is safe (no deeper than the safe fall, not into deep water).
Details
Whether a walker steps off the edge toward d: a party member standing
on something built (a roof, a wall top, a crate) whose fall is safe (no
deeper than the safe fall, not into deep water). A cliff of the ground
itself, and a fall that would hurt, still take a Jump.
climbs
static sourceReactorPhysics.climbs(character)
An event that climbs (<climb> in its note): a step of its route that a ledge stops is taken as a hop or a mantle, where one is within reach.
cancelMantle
static sourceReactorPhysics.cancelMantle(character)
Let go of the ledge: the body is in the air where it was, and gravity has it again.
tacticalRules
static sourceReactorPhysics.tacticalRules(hop, settings = this.settings()
The limits a Tactical unit of that jump is judged by: it hops its jump, mantles a little over it and climbs walls to the project's height.
climbCostFor
static sourceReactorPhysics.climbCostFor(rise, settings = this.settings()
Move points a climb of rise tiles costs: climbCost a tile, rounded up, and never less than a mantle.
tacticalDrop
static sourceReactorPhysics.tacticalDrop(option, hop, settings = this.settings()
A drop as a Tactical unit of that jump takes it: { cost, harm } (harm the share of max HP the fall takes), or null when it is not taken (into deep water, or deeper than battleFall allows).
Details
A drop as a Tactical unit of that jump takes it: { cost, harm } (harm the share of max HP the fall takes),
or null when it is not taken (into deep water, or deeper than battleFall allows). A drop within the unit's
own (one level further than it climbs) costs a step.
tacticalEdge
static sourceReactorPhysics.tacticalEdge(x, y, d, height, jump)
The Tactical grid's edge: { kind, cost, height, harm } for a mantle, a climb, a ladder or a long drop from cell (x, y) at height toward d by a unit of that jump, or null where the grid's own rule (a walk, a hop, a short safe drop) should decide.
Details
The Tactical grid's edge: { kind, cost, height, harm } for a mantle,
a climb, a ladder or a long drop from cell (x, y) at height toward d
by a unit of that jump, or null where the grid's own rule (a walk, a
hop, a short safe drop) should decide.
tacticalEdges
static sourceReactorPhysics.tacticalEdges(x, y, d, height, jump)
Every way on for a unit, for a grid that keeps more than one height on a cell (the ground under an eave and the eave over it; a room and the roof over it): [{ kind, cost, height, harm }], a walk and a hop at 1, the rest as tacticalEdge costs them, a drop battleFall does not allow left out.
Details
Every way on for a unit, for a grid that keeps more than one height on a
cell (the ground under an eave and the eave over it; a room and the
roof over it): [{ kind, cost, height, harm }], a walk and a hop at 1,
the rest as tacticalEdge costs them, a drop battleFall does not
allow left out. Empty where nothing can be done.
grappleTargets
static sourceReactorPhysics.grappleTargets(mapData, x, y, from, range, most, least = this.GRAPPLE_LEAST)
Every edge a grapple from cell (x, y) at from takes hold of: tops a body stands on (level, or a roof's pitch), no further than range tiles (cell middle to cell middle), whose edge toward the climber stands more than least and no more than most over the feet.
Details
Every edge a grapple from cell (x, y) at from takes hold of: tops a body
stands on (level, or a roof's pitch), no further than range tiles
(cell middle to cell middle), whose edge toward the climber stands more
than least and no more than most over the feet. The hook is caught
on the edge of the top itself, or of an eave or a verge that hangs out
past it, with open sky under the hook down to ground well below it,
where the body hangs. Each is { x, y, d, to, lip, bx, by, hx, hy }:
the top's cell and height, the way the body comes onto it, the edge's
height, the cell the body hangs over, and where the hook holds (across
the map). The map's data only: who stands where, tiles and the line of
sight are the caller's.
grapplePhase
static sourceReactorPhysics.grapplePhase(g)
The beat a grapple is at: "aim", "fly", "tight" or "pull" (the climb over is a mantle).
grappleHook
static sourceReactorPhysics.grappleHook(character, out)
Where a grapple's hook is now, in tiles (x, y across the map, z up), how much of the line is out (out, 0 to 1), how slack it hangs (slack, 0 taut to 1: it trails as it flies, hangs loose as the hook bites and is drawn up straight before the pull) and the beat (phase); null off one.
Details
Where a grapple's hook is now, in tiles (x, y across the map, z up), how much of the line is out (out, 0
to 1), how slack it hangs (slack, 0 taut to 1: it trails as it flies, hangs loose as the hook bites and is drawn
up straight before the pull) and the beat (phase); null off one.