Manual:DIL Manual/opponent()

From DikuMUD Wiki
< Manual:DIL Manual
Revision as of 13:08, 27 May 2020 by Nove (talk | contribs) (XML import)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search


integer opponent(u1 : unitptr, u2 : unitptr)
   u1, u2: Two characters
   return: TRUE if u1 is in combat with u2, FALSE otherwise.
   Example: if (opponent(self, victim)) ...
   When in a combat, you are usually only melee-attacking one opponent,
   although you may have many other opponents. This function lets you
   check if you are directly / indirectly an opponent to another unit.
---~---~---~---~---~---~---~---~---