Protagonists

version 1/120327 by Kevin Norris

  • Home page
  • Beginning
  • Previous



  • Section P4.2 - Ordering action and related activities

    Printing the failure to comply of something is an activity on people.
    Printing the compliance list of something is an activity on lists of people.
    Ordering a group to something is an activity on orders.
    The relevant order is an order that varies.
    The relevant order is null-order.
    The order prompt is some text that varies. The order prompt is "Order what action?"
    Ordering is an action out of world applying to nothing.
    The specification of the ordering action is "Prompts the player for an order and then passes it off to the ordering a group to activity, with a brief detour to the menu question rules. The prompt will automatically advance the turn counter (or not, as appropriate), so this action is out of world. The check rules decide which orders to present to the player; if there are no available orders or no obedient people present in the first place, this is reported."
    Understand "order" or "give order/orders" or "orders" as ordering.
    The ordering action has a list of people called the people ordered.
    Setting action variables for ordering (this is the decide who to order rule):
        Now the people ordered is the list of visible obedient other people;
        Now the available orders is {}.
    Check ordering (this is the can't order what you can't see rule):
        If the people ordered is empty, say "You can't see anyone willing to take your orders." instead.
    Last check ordering (this is the can't give orders that aren't reasonable rule):
        Repeat with O running through orders:
            If O targets someone, add O to the available orders;
        If the available orders is empty, say "None of the available orders seem to make much sense right now." instead.

    Carry out ordering (this is the ask what to order rule):
        Now the current question is the order prompt;
        Let L be a list of texts;
        Repeat with O running through the available orders:
            Add the printed description of O to L;
        Now the current question menu is L;
        Ask an open question, in menu mode.
    A menu question rule when the current question is the order prompt (this is the default order handling rule):
        Let the selected order be entry the number understood of the available orders;
        Carry out the ordering a group to activity with the selected order;
        Exit.
    The giving an order to rules are a person based rulebook.
    The giving an order to rulebook has outcomes it is complied with (success), it is not complied with (failure), it is silently ignored (failure), and it is incomplete (no outcome - default).
    Giving an order to someone (called P) when the relevant order is stop (this is the standard ordering it to stop rule):
        Silently try P waiting;
        If P is ready to follow, it is not complied with;
        Otherwise it is complied with.
    Giving an order to someone (called P) when the relevant order is continue (this is the standard ordering it to continue rule):
        Silently try P following the player;
        If P is ready to follow, it is complied with;
        Otherwise it is not complied with.
    Giving an order to someone (called P) when the relevant order is regroup (this is the standard ordering it to regroup rule):
        While the holder of P is not the location of P:
            Silently try P exiting;
            If rule failed, it is not complied with;
        It is complied with.

    [To actively print (prefix - some text) then (X - a value of kind K) then (suffix - some text) via (A - an activity on K):
        Begin the A activity with X;
        If handling A activity:
            Say prefix;
            Say X;
            Say suffix;
        End the A activity with X.
    To actively print (prefix - some text) then (X - a list of values of kind K) then (suffix - some text) via (A - an activity on lists of K):
        Begin the A activity with X;
        If handling A activity and X is not empty:
            Now the current list length is the number of entries in X;
            Say prefix;
            Say X;
            Say suffix;
        End the A activity with X.
    The current list length is a number that varies.]
    Last for printing the failure to comply of someone (called P) when the relevant order is stop (this is the standard print failure to stop rule):
        Say "For some reason, [the P] do[es] not seem amenable to this."
    Last for printing the failure to comply of someone (called P) when the relevant order is continue (this is the standard print failure to continue rule):
        Say "For some reason, [the P] do[es] not seem amenable to this."
    Last for printing the failure to comply of someone (called P) when the relevant order is regroup (this is the standard print failure to regroup rule):
        Say "[The P] appears to be stuck."
    Last for printing the compliance list of a list of people (called A) when the relevant order is stop (this is the standard print stop list rule):
        Say "[The list of things which are included by A] wait[list-based s of A].";
    Last for printing the compliance list of a list of people (called A) when the relevant order is continue (this is the standard print continue list rule):
        Say "[The list of things which are included by A] [list-based is-are of A] now following you."
    Last for printing the compliance list of a list of people (called A) when the relevant order is regroup (this is the standard print regroup list rule):
        Say "[The list of things which are included by A] regroup[list-based s of A], out in the open."
    First before ordering a group to an order (called O) (this is the set relevant order rule):
        Now the relevant order is O.
    Last after ordering a group to an order (called O) (this is the unset relevant order rule):
        Now the relevant order is null-order.
    For ordering a group to null-order (this is the null-order does nothing rule):
        Do nothing.
    Last for ordering a group to an order (called O) (this is the group ordering rule):
        Let L be a list of people;
        Repeat with P running through people targeted by O:
            Add P to L;
        Let A be L;
        Repeat with P running through L:
            Consider the giving an order to rules for P;
            Let X be the outcome of the rulebook;
            If X is the it is not complied with outcome:
                remove P from A;
                Begin the printing the failure to comply activity with P;
                If handling the printing the failure to comply activity with P, say "For some reason, [P] do[es] not seem amenable to this.";
                End the printing the failure to comply activity with P;
            Otherwise if X is the it is silently ignored outcome:
                remove P from A;
        If A is not empty:
            Begin the printing the compliance list activity with A;
            If handling the printing the compliance list activity with A, say "[A] obey[list-based s of A] the order to [O].";
            End the printing the compliance list activity with A.
        
    Protagonists ends here.