From the NannyMUD documentation

LAST CHANGE

2000-12-15

FUNCTION


NAME

        query_attack - show what a living object is fighting

LOCATION

	/obj/living.c

SYNTAX

	object query_attack();

DESCRIPTION

        Most of the time, returns the opponent that a living object is
        currently attacking. Obviously, if it is not in combat, this will
        return a 0.

NOTE

	If this function is called in a monster during its attack
	(for example from a hook, remote_weapon_hit, etc), then it is
	possible that query_attack will not return the object that the
	monster is currently attacking.  Rather, query_attack() returns
	the object that most of the monsters hits are directed at.  If
	you need to find out what the monster is actually hitting right
	at that instant, rely on the arguments to the hook or the remote
	function where possible.

SEE ALSO

        hit_player in lfun/living/hit_player