CONCEPT
  levels


LAST UPDATE
  Mateese, 14-Jul-96, 02:30 MET


DESCRIPTION
  The basic idea is that players are measured just by their experience and
  skills. A 'level' (P_Level) exists, but is computed dynamically and to be
  used just for comparisons.

  The hierarchy system of micro is based on the 'wiz level', which is no
  player-property but instead maintained by the /secure/info. Wizards have
  a non-zero wizlevel, and have additionally their Wizard Bit set. Reason
  for a hierarchy is not to enable a few to control a lot, but to openly
  delegate responsibilities.

  The basic system (with symbolic names defined in /i/sys/config.h) looks
  as following:

    PLAYER_LVL  = 0 : Players
    LEARNER_LVL = 1 : Learners, apprentice wizards, guest wizards,
    WIZARD_LVL  = 2 : Wizards
    ARCH_LVL    = 3 : Archwizards, Domainlords
    ADMIN_LVL   = 4 : Sourcerors, "Janitors", Gods

  Within domains, additional wizard levels are needed:

    MEMBER_LVL = 1 : Domainmembers
    LORD_LVL   = 2 : Domainlords and -vices


  If a player wants to become a wizard, it has to ask for promotion
  to 'apprentice wizardhood'. The promotion can't happen automatically,
  but must be approved by a domain-wizard. The 'appentrice wizard' or
  'learner' has full wizard powers, but has to be educated and supervised
  by its sponsor. It is a game decision if the player has to reach
  a certain level before becoming a wizard, or not.

  The learner can become a full-fledged 'wizard' by promotion of a second
  wizard, with approval by its former sponsor. Reason is to provide new
  wizards with a background he can rely on in case of problems.

  A wizard can join a domain, and even become its 'lord' by approval of
  the 'domain lord'. The internal domain organization is up to the domain.

  Archwizards have to be promoted by admins. Their tasks are globally, like
  the coordination of building. As the task of domain lords is as global,
  domainlords dynamically get archwizard permissions as well.

  The domain levels are parallel to the normal levels: an admin may be domain
  member, with a wizard being its domainlord.


  Between the wizlevel and the players/wizards permissions the
  following relation exists:

    player : PLAYERID:<username>
    learner: WIZARDID:<username>
    wizard : WIZARDID:<username>
    arch   : ARCHID
    admin  : ADMINID

  For domains, the relation is this:

    member: MEMBERID:<domain>:<username>
    lord  : LORDID:<domain>:<username>


  Wizard level and permissions for a given player object are obtainable from
  the SECUREINFO.
  Additional efuns help in handling these:

    int wizardp (object ob)  [MACRO]
      Returns non-zero if the wizard bit is set for <ob>.

    int wizlevel (object ob)  [MACRO]
      Returns the wizard level of <ob>.

    int domainlevel (string d, object ob)
      Returns the level of <obj> within domain <d>.

    int isPlayer  (object ob)  [MACRO]
    int isLearner (object ob)  [MACRO]
    int isWizard  (object ob)  [MACRO]
    int isArch    (object ob)  [MACRO]
    int isAdmin   (object ob)  [MACRO]
      Returns non-zero if <ob> is of appropriate level.

    int isMemberOf (object ob, string d)  [MACRO]
    int isLordOf   (object ob, string d)  [MACRO]
      Returns non-zero if the object <ob> is of appropriate
      level with domain <d>.

TODO
  Learnerhood should be a voluntary state.
  Having an NPC for wizard promotion would be athmospheric.
