set_target_location works for the player only, so rename it set_player_target_location.
Drop 'B's.
Expand word_783A array.
Use address of zeroth element rather than of array.
Call varA13E byte_A13E consistently.
Rename functions which react to it to name the condition, e.g. sub_A3F3 -> byte_A13E_is_zero.
Some simplification / mirroring of the functions which react to it.