Protagonists

version 1/120327 by Kevin Norris

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter P2 - The party

    Use smart following translates as (- Constant PROTAG_PATHFINDING; -).

    Listing relates a value (called T) to a list of values (called L) when T is listed in L.
    The verb to include (it includes, they include, it included, it is included) implies the reversed listing relation.
    To say list-based s of (L - a list of things):
        Unless L is empty, now the prior named noun is entry the number of entries in L of L;
        If the number of entries in L is 1:
            If entry 1 of L is ambiguously plural and the american dialect option is active:
                Say "s";
            Otherwise if entry 1 of L is singular-named:
                Say "s".
    To say list-based is-are of (L - a list of things):
        Unless L is empty, now the prior named noun is entry the number of entries in L of L;
        If the number of entries in L is 1:
            If entry 1 of L is ambiguously plural:
                If the american dialect option is active:
                    Say "is";
                Otherwise:
                    Say "are";
            Otherwise if entry 1 of L is singular-named:
                Say "is";
            Otherwise if entry 1 of L is plural-named:
                Say "are";
        Otherwise:
            Say "are".
    Every turn (this is the followers housekeeping rule):
        If follow pending is true: [can't happen]
            Say "[italic type]Warning: Can't happen in extension Protagonists by Kevin Norris: the follow pending flag was improperly set or never unset. This should [roman type]never[italic type] happen, so please tell someone![roman type][paragraph break]";
        Now follow pending is false; [but we might as well fix it anyway]
        Now the stragglers are {}.
    Every turn when there is an on-stage ready to follow person which is not enclosed by the location and the smart following option is active (this is the smart following rule):
        Repeat with P running through on-stage ready to follow people which are not enclosed by the location:
            While the holder of P is not the location of P:
                Try P exiting;
                If rule failed:
                    Break;
            Let thataway be the best route from the location of P to the location of the player, using doors;
            If thataway is a direction:
                If the door thataway from the location of P is a closed openable unlocked door (called D):
                    Try P opening D;
                Try P going thataway.
    A person can be ready to follow. A person is seldom ready to follow.
    First carry out going (this is the going autofollow rule):
        Now follow pending is true;
        Repeat with P running through ready to follow people:
            If P is the player, next;
            If P cannot see the player, next;
            If P is not in the holder of the player, next; [NB: this also blocks people from following if they're in containers/supporters]
            If going by something which encloses P, next; [skip vehicles which carry us]
            Try P going the noun;
        Now follow pending is false.
    Report going when the stragglers is not empty (this is the list followers going rule):
        Say "[The list of things included by the stragglers] follow[list-based s of stragglers] you."
    First report someone going when follow pending is true (this is the capture reports of followers going rule):
        Add the actor to the stragglers;
        Rule succeeds.
    First carry out exiting (this is the exiting autofollow rule):
        Now follow pending is true;
        Repeat with P running through ready to follow people:
            If P is the player, next;
            If P cannot see the player, next;
            If the holder of P is not the holder of the player, next;
            Try P exiting;
        Now follow pending is false.
    Report exiting when the stragglers is not empty (this is the list followers exiting rule):
        Say "[The list of things included by the stragglers] exit[list-based s of stragglers] [the container exited from] behind you."
    The list followers exiting rule is listed after the standard report exiting rule in the report exiting rulebook.
    First report someone exiting when follow pending is true (this is the capture reports of followers exiting rule):
        Add the actor to the stragglers;
        Rule succeeds.
    First carry out entering (this is the entering autofollow rule):
        Now follow pending is true;
        Repeat with P running through ready to follow people:
            If P is the player, next;
            If P cannot see the player, next;
            If P cannot see the noun, next; [this probably isn't strict enough, but strictness here is more harmful than leniancy]
            Try P entering the noun;
        Now follow pending is false.
    Report entering when the stragglers is not empty (this is the list followers entering rule):
        Say "[The list of things included by the stragglers] [if the noun is a supporter]get[else]enter[end if][list-based s of stragglers][if the noun is a supporter] onto[end if] [the noun] behind you."
    The list followers entering rule is listed after the standard report entering rule in the report entering rulebook.
    First report someone entering when follow pending is true (this is the capture reports of followers entering rule):
        Add the actor to the stragglers;
        Rule succeeds.
    First carry out getting off (this is the getting off autofollow rule):
        Now follow pending is true;
        Repeat with P running through ready to follow people:
            If P is the player, next;
            If P cannot see the player, next;
            If the holder of P is not the holder of the player, next;
            Try P getting off the noun;
        Now follow pending is false.
    Report getting off when the stragglers is not empty (this is the list followers getting off rule):
        Say "[The list of things included by the stragglers] get[list-based s of stragglers] off [the noun] behind you."
    The list followers getting off rule is listed after the standard report getting off rule in the report getting off rulebook.
    First report someone getting off when follow pending is true (this is the capture reports of followers getting off rule):
        Add the actor to the stragglers;
        Rule succeeds.
    For writing a paragraph about a person (called P) while P is listed in the stragglers (this is the skip redundant followers rule):
        Now P is mentioned.