benilla-re systems structs docs

s_spellHostilityTargetBIndex

global · spell

Address
0x6ea378 · 53 bytes, up to 0x6ea3ac
Type
uint8_t[53]
Meaning
Maps implicit target B values 2 to 54 to cases of 0x6ea370
Confidence
verified, proof one
Finding
spell/handlers#hostility-classifier

Finding: Hostility classifier in spell: handlers

0x6ea280 classifies a spell record as 2 (harmful), 1 (helpful) or 0. The targets dword +0x34 decides first: bit 8 gives 1, bit 7 gives 2. Then for each effect slot 0 to 2, implicit target A (+0x148) or B (+0x154) in {2, 6, 15, 16, 24, 28, 53, 54} gives 2. Then for each slot, A or B in {3, 4, 5, 7, 8, 20, 21, 27, 29, 30, 31, 33, 34, 35, 45, 56, 57, 58, 59, 61, 62} gives 1, and A or B equal to 1 gives 1 unless the slot's dword at +0x16c is 4. Anything else is 0.

The derivation is in the doc.