A Tactical battle on a 2D map.

Battle

Tactical Battles on the Map

reactor_fight_tactical.js · 8,844 lines · 327 public functions

A Tactical battle on a 2D map.

What This Module Does

The Tactical mode of battles on the live map (reactor_fight.js): the player picks a unit, sees where it can walk, walks it, chooses Attack, a skill or an item from an ordinary command window and a target inside its range; the other side decides with the same ranges. Works on a plain 2D map and on a 3D map under any camera (docs/BATTLE-MODES.md).

Classes & Namespaces

Design Notes from the Source Code

The Tactical mode of battles on the live map (reactor_fight.js): the player picks a unit, sees where it can walk, walks it, chooses Attack, a skill or an item from an ordinary command window and a target inside its range; the other side decides with the same ranges. Works on a plain 2D map and on a 3D map under any camera (docs/BATTLE-MODES.md).

  • Ranges, areas, move and jump come from note tags (<range: 2-5>, <area: circle 1>, <los: no>, <move: 5>, <jump: 2>); a record with none plays by defaults taken from its Scope and weapon type.
  • Movement is a cost flood over the cells: tile passability, other units, and on a 3D map the ground's heights (terrain, pieces, rocks, shut doors, water), a rise up to the unit's jump taken as a hop.
  • Line of sight, cover, height and the side a blow lands on change the hit chance and the damage; the damage itself is the Database formula.
  • Everything here is inert in a Classic battle and in any other on-map mode: each wrapper falls through unless $gameFight.isTactical().

View reactor_fight_tactical.js on GitHub · Show internal (_) functions