benilla-re systems structs docs

s_spellTargetFlags

global · spell

Address
0xcecac0 · 2 bytes, up to 0xcecac1
Type
uint16_t
Meaning
Holds the flag word of target kinds the pending spell still needs; 0 at load
Confidence
verified, proof one
Finding
spell/targeting#the-flag-word

Finding: The flag word in spell: targeting

The word 0xcecac0 holds the target kinds the pending spell still needs; targeting is on while it is nonzero. A bind tries the bits below in a fixed order; the first arm that binds clears its own bits and ORs the bound kind into the 16-bit target mask at +0x14 of the pending cast record 0xceac48, storing the target at +0x18 (an object), +0x20 (an item), +0x30 or +0x3c (a position, three floats). Bit 0x1 is never tested; 0x1000 occurs only in the mask; 0x2000 is bound by 0x6e5250 from a pending name (cast), and otherwise read only by unreached code.

bitbindsmask bit, slot
0x2a unit without unit-flag 0x1000x2, +0x18
0x4a unit passing 0x606d20 and 0x6066f00x2, +0x18
0x8a unit passing 0x606c20 and 0x6066f00x2, +0x18
0x10an item, or trade slot 60x10 or 0x1000, +0x20
0x20a position, first0x20, +0x30
0x40a position, when 0x20 is clear0x40, +0x3c
0x80a unit passing 0x6069800x2, +0x18
0x100a unit passing 0x6066f00x2, +0x18
0x200a dead player failing 0x6066f0; a corpse failing 0x6067d00x2 or 0x200, +0x18
0x400nothing: refuses a live unit; cleared by a dead unit's 0x2, 0x4, 0x8, 0x80 or 0x100 bindnone
0x800, 0x4000a game object (either bit); 0x4000 also an item or trade slot 60x800, +0x18
0x8000a dead player, or dead unit with +0x214 set, passing 0x6066f0; a corpse passing 0x6067d00x2 or 0x8000, +0x18

The derivation is in the doc.