Restrictions

version 2 by Jon Ingold

  • Home page
  • Beginning
  • Previous
  • Next



  • Section - Place the rule in the accessibility rulebook

    The check restrictions rule is listed before the access through barriers rule in the accessibility rulebook.

    Definition: a thing is unreachable if it is not enclosed by the player and it is not the player.

    The last before rule (this is the check restrictions rule):
        if the person asked is the player and not examining and the location is currently restrictive:
            consider the restricted before rules;
            if rule succeeded:
                say "[run paragraph on]";
                continue the action;
            if the rule failed:
                if the action requires a touchable noun and the noun is an unreachable thing, say "[Can't reach the noun]." instead;
                if the action requires a touchable second noun and the second noun is a unreachable thing, say "[Can't reach the second noun]." instead;
                consider the restricted instead rules;
                if rule succeeded:
                    say "[run paragraph on]";
                    continue the action;
            stop the action.

    To say Can't reach (n - a thing):
        say "You can't reach [the n]";
        if the location has a nonzero restriction message, say ", because you are [restriction message of the location]";