magic_action_target_modes
Global of Himegari Dungeon Meister: the cell G:0x156124, of type int[30], data-table, values 1 no target, 2 an allied unit, 3 an enemy unit, 4 an allied unit then a tile; 0 for the rituals.
How a field magic picks its target. After MAGIC returns, FIELD reads the selected action's mode (FIELD@0x24bd): 2 to 4 start a map selection, 2 setting selection bit 9 (FIELD@0x24fc), 3 bit 10 (FIELD@0x2519) and 4 bits 9 and 11 (FIELD@0x2521, 0x2526), which the map cursor tests against the tile masks (FIELD@0x185b-0x1891); 1 casts at once. The words follow MAMES: 闇の治癒, 浄化 and 強制帰還 (2) act on an allied unit, 暗黒槍 (3) on one enemy, 兵士転移 (4) moves a deployed unit to a tile of the occupied area, and 邪神招聘 (1) strikes every unit on the stage (MAMES@0x14-0xa9). Which units bits 9 to 11 admit is not decoded, so the words rest on MAMES.
OME’s registry gives it with med confidence, from investigation. The base mod himegari-base exports the name, so Lua and an event’s fields can use it.
It depends on 0x1560e7.
Record tables
It is a field of the table magic_action, as magic_action.id.target_mode.
Scripts that use it
The game’s scripts whose instructions read, write or index (take as an array’s base) the cell, with how many of their operands do each, from OME’s script index.
| Script | Reads | Writes | Indexes |
|---|---|---|---|
MAINIT | 0 | 6 | 0 |
FIELD | 0 | 0 | 4 |