Multi-examine

version 3 by Jon Ingold

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter: The Multiexamining Action

    The code will search for a kind that satisfies everything in the set of objects supplied, and pick the most specific it can. If that's "thing", it'll give up and print an error message, telling the player that the objects in question are too varied to be looked at all at once. Otherwise, it'll fire the "group description" property of this kind.

    The following examples show the decisions the logic will make:

        Examining a door, a man and a woman -> No general kind
        Examing two men and three women -> General kind is "person"
        Examining a container, and a jar (which is a kind of container) -> General kind is container
        Examining a staircase (a kind of door) and a ladder (a kind of staircase) -> General kind is staircase.
        Examining three magpies (a kind of bird, which is a kind of animal) and a rockweiler (a kind of animal) -> General kind is animal

    and so on.

    Note that the group description is the only entry point to change what happens: because multiexamining can consider the objects in any order, and because the object it decides on is actually the "kind" object itself (which I7 generally has no access to whatsoever at run-time), checking and carrying out don't make sense.