benilla-re systems structs docs

IsDeadOrGhost

function · objectlayer · primitive

Address
0x605f30 · 52 bytes, up to 0x605f63
Meaning
Returns 1 for a unit with health 0 or below or a player whose PLAYER_FLAGS has 0x10
Confidence
verified, proof one
Finding
spell/checks#usability-predicate

Finding: Usability predicate in spell: checks

0x6e3d60(rec, &noPower) returns 1 when the active player can use the spell now, else 0, and reports nothing. It clears noPower, returns 0 when there is no active player object, and returns 1 at once when the first effect is 47. Otherwise it applies these gates in order; the first that fails returns 0:

#fails when
10x605f30 is true and Attributes & 0x800000 is clear
20xb4b3e4 is zero and no scan exempts the spell (Lost control exemption)
30x6e4000(player, rec, 0) returns 0
40x6e40e0(player, rec, ammo 1, report 0) returns 0
5AttributesEx & 0x500000 and PLAYER_FIELD_BYTES byte 1 is 0
6the form test 0x612480 returns 0
7Attributes & 0x20000 and UNIT_FIELD_BYTES_1 byte 3 lacks 2
8Attributes & 0x10000000 and UNIT_FIELD_FLAGS & 0x80000
9CasterAuraState n is nonzero and bit n−1 of UNIT_FIELD_AURASTATE is clear
10TargetAuraState n is nonzero and: no unit at 0xb4e2d8, its bit n−1 clear, first implicit target 6 and 0x606980 false, or 21 and 0x6066f0 false
11Attributes & 0x2000000 and 0x6e2fa0(rec, 0) is nonzero
12the cost 0x6e31b0(id, 0) exceeds the power (signed); sets noPower to 1

The power is UNIT_FIELD_HEALTH for power type −2, else UNIT_FIELD_POWER1 plus the type.

The derivation is in the doc.

Callers 27

Callees 0

None by a direct call or jump.

Calls and jumps by a bare address, from tables/calls.tsv.