Blue Lacuna — 87 of 467

Aaron A. Reed

Release 4

Section - Discussing

The topics-window is a g-window with type g-text-buffer. The main-window spawns the topics-window. The position of the topics-window is g-placebelow. The scale method of the topics-window is g-fixed-size. The measurement of the topics-window is 3.

Discussing is an action with past participle discussed, applying to one thing. [ Discussing is the conversation verb in this system. ]

Understand "discuss" as vague discussing. Vague discussing is an action out of world applying to nothing. Understand the command "subject" as "discuss".

A puzz-unfinished rule: [ This is to help out Intelligent Hinting]

if temp-act is discussing something and noun part of temp-act is spoken, rule fails.

A puzz-possibility rule:

if temp-act is discussing something and noun part of temp-act is unavailable, rule fails.

Carry out vague discussing:

let joe be a random other conversing person enclosed by location;

if the number of entries in list of convo stuff is 0 or last beat is insistent begin;

if joe is a person, let ua-beat be the unavailable-beat of joe;

if joe is Progue and the number of entries in list of convo stuff is 0, now ua-beat is the naughttosay_beat of Progue;

if ua-beat is a beat begin;

if conversation is being debugged, say "// Conversation: force discussing [ua-beat] (because nothing to change subject to (num: [number of entries in list of convo stuff]/[list of convo stuff]) or last beat [last beat] insistent ([if last beat is insistent]yes[otherwise]no[end if]).";

now vague-dis-beat is ua-beat;

now tempfuse of ua-beat is 0;

now vague-dis-hack is true;

stop;

otherwise;

speak as the parser "There's no one here to talk to.";

end if;

otherwise;

if joe is not a person begin;

if an other nonbestial person is enclosed by the location, speak as the parser "You're not talking to anyone right now."; otherwise speak as the parser "There's no one here to talk to.";

otherwise;

if Joe is Progue begin;

add denial animii to tl; [ let the player ask about what Progue's doing]

end if;

now showing-offtopics is true;

if topics-window is g-present, follow the drawing rule of topics-window;

say "What do you want to discuss?";

change the command prompt to ">>";

repeat with item running through list of convo stuff begin;

now tempfuse of item is 2;

end repeat;

stop the action;

end if;

end if.

vague-dis-hack is a truth state that varies. vague-dis-beat is a beat that varies.

Rule for reading a command when vague-dis-hack is true: [ This is unfortunately necessary since "vague discussing" is meta, meaning action rules attached to something we tried to discuss wouldn't fire. ]

if conversation is being debugged, say "// Conversation: vague-dis-hack (changing command to 'discuss [vague-dis-beat]').";

now vague-dis-hack is false;

force discuss vague-dis-beat;

change the text of the player's command to "do#nothing".

Understand "do#nothing" as doingnothing. Doingnothing is an action out of world applying to nothing. Carry out doingnothing: do nothing.

After reading a command while showing-offtopics is true:

now showing-offtopics is false;

change the command prompt to ">";

let pcmd be indexed text;

let pcmd be the player's command;

if the player's command matches "cancel" begin;

replace the player's command with "cancel";

otherwise if the player's command matches "bye" or the player's command matches "goodbye";

replace the player's command with "goodbye";

otherwise;

replace the regular expression "^(.*)$" in pcmd with "discuss \1";

change the text of the player's command to pcmd;

end if.

Nothing-doing is an action out of world applying to nothing. Understand "cancel" as nothing-doing. Carry out nothing-doing: say "Ok.".

Check discussing (this is the can only discuss things with attentive people rule):

if skip_conversing_check is false and no conversing person is enclosed by location:

if location is regionally in Dreamlands:

say "You can't focus on that." instead;

else if an other nonbestial person is enclosed by location:

speak as the parser "You aren't talking to [a random other nonbestial person enclosed by the location] right now; type HELLO to begin conversing." instead;

otherwise:

say "[if final release mode is false]4[end if][as the parser][notsurewhatyoumeant].[as normal]" instead. [ We need this, since otherwise the game tries to talk when conversations have ended. ]

Original beat is a beat that varies. Original beat is silence.

Every turn (this is the reset the discussion recursion brake rule): now original beat is silence.

To force discuss (target - a beat):

if conversation is being debugged, say "// Conversation: making [target] available.";

now tempfuse of target is fuse of target;

now skip_conversing_check is true;

try discussing target.

skip_conversing_check is a truth state that varies.

Carry out discussing:

now skip_conversing_check is false;

if conversation is being debugged, say "// Conversation: Carry out discussing ([noun] ([if noun is available]available[otherwise]unavailable[end if]/[if noun is insistent]insistent[otherwise if noun is dogged]dogged[otherwise]casual[end if]/[if noun is ephemeral]ephemeral[otherwise]substantial[end if])).";

[ if next beat is noun, now next beat is silence; ]

let target be noun;

let keep_going be true;

if target is Silence, do nothing instead;

if target is spoken and target is unrepeatable:

if original beat is target: [ we have recursed back to starting ]

if conversation is being debugged, say "// Conversation: we have recursed back to starting (because original beat ([original beat]) is target ([target]).";

if target suggests a beat (called new target):

force discuss new target;

otherwise:

if target is insistent, now target is casual;

try exhausting target instead;

otherwise:

if conversation is being debugged, say "// Conversation: target spoken and unrepeatable; setting original beat to target ([target]).";

if original beat is silence, now original beat is target;

if a beat (called new target) replaces target:

if conversation is being debugged, say "// Conversation: force discussing [new target] (because [target] is spoken and it is unrepeatable).";

now tempfuse of target is 0; [ make the beat we're skipping unavailable again. ]

force discuss new target; [ ok-- has to be force discuss because otherwise it may be unavailable and we'll get rerouted to the unavailable-beat instead. ]

stop the action;

otherwise:

if conversation is being debugged, say "// Conversation: exhausting [target] (because [target] is spoken and it is unrepeatable and no beat replaces [target]).";

if target is insistent, now target is casual;

try exhausting target instead;

let joe be a random conversing person enclosed by the location;

if target is unavailable:

if joe is not a person:

if conversation is being debugged, say "// Conversation: error-- there are no attentive other people enclosed by the location.";

otherwise:

if conversation is being debugged, say "// Conversation: force discuss [the unavailable-beat of a random attentive other person enclosed by the location] (the unavailable-beat of [a random attentive other person enclosed by the location]) because [target] is unavailable.";

force discuss the unavailable-beat of joe;

stop the action;

if noun is substantial and noun is not dogged:

now penultimate beat is last beat;

now last beat is target;

now actual last beat is target; [ stores even an ephemeral beat. ]

if reaction of target is not "":

now highlight topics is true;

now nicename topics is true;

if Progue is enclosed by location, adjust Progue's social standing;

say "[reaction of target][line break]";

now target is spoken;

now nicename topics is false;

now highlight topics is false;

if joe is a person, now the boredom counter of joe is 0;

now last-spoken-turn is turn count;

now conversation fuse is 0;

follow the reset the discussion recursion brake rule;

if conversation is being debugged and target summons at least 1 beat, say "// Conversation: making [list of beats summoned by target] available.";

repeat with arrival running through beats summoned by target:

now tempfuse of arrival is fuse of arrival;

if yes-beat of target is not silence:

if conversation is being debugged, say "// Conversation: making yes-beat ([yes-beat of target]) of target ([target]) available.";

now tempfuse of yes-beat of target is fuse of yes-beat of target;

if no-beat of target is not silence:

if conversation is being debugged, say "// Conversation: making no-beat ([no-beat of target]) of target ([target]) available.";

now tempfuse of no-beat of target is fuse of no-beat of target;

if maybe-beat of target is not silence:

if conversation is being debugged, say "// Conversation: making maybe-beat ([maybe-beat of target]) of target ([target]) available.";

now tempfuse of maybe-beat of target is fuse of maybe-beat of target;

if neither-beat of target is not silence:

if conversation is being debugged, say "// Conversation: making neither-beat ([neither-beat of target]) of target ([target]) available.";

now tempfuse of neither-beat of target is fuse of neither-beat of target;

if both-beat of target is not silence:

if conversation is being debugged, say "// Conversation: making both-beat ([both-beat of target]) of target ([target]) available.";

now tempfuse of both-beat of target is fuse of both-beat of target;

[ now tempfuse of target is fuse of target;] [?]

if conversation is being debugged and the number of beats canceled by target > 0, say "// Conversation: cancelling [list of beats canceled by target].";

repeat with leper running through beats canceled by target:

now tempfuse of leper is 0;

if target is dogged: [ If we're trying to get an answer to a question, make sure answers don't expire.]

if conversation is being debugged, say "// Conversation: extending [list of available beats] (because [target] is dogged).";

repeat with dude running through available beats:

increase tempfuse of dude by 1;

otherwise if target is insistent or penultimate beat is insistent: [ If we're asking a question, kill all previous topics.] [ if we remove reference to penultimate beat here, then insistent questions break. (answers still hang around.)]

if conversation is being debugged, say "// Conversation: cancelling [list of nonnow beats] (because target [target] is insistent ([if target is insistent]y[otherwise]n[end if]) or penultimate beat [penultimate beat] is insistent ([if penultimate beat is insistent]y[otherwise]n[end if]). List of available beats: ";

repeat with leper running through nonnow beats:

now tempfuse of leper is 0;

if target enqueues a beat (called new target) :

if conversation is being debugged, say "// Conversation: enqueues [new target].";

force discuss new target;

now nicename topics is false;

[ if target is unrepeatable begin;

if conversation is being debugged, say "//Conversation: making [target] unavailable (because its unrepeatable).";

now tempfuse of target is 0;

end if; ]

if conversation is being debugged, say "// Conversation: making [target] unavailable.";

now tempfuse of target is 0;

remove target from list of convo stuff, if present.

After discussing a terminal beat (this is the trigger post-conversation processing after discussing a terminal beat rule): if conversation is being debugged, say "// Conversation: After discussing a terminal beat (pcp)."; post-conversation processing; continue the action.

The last every turn rule (this is the look after convos end rule):

if ( we are discussing a terminal beat or we are saying farewell to someone ) and Finishing-the-Prologue is complete and only-look-once is false and Epilogue is not happening:

try looking;

now only-look-once is true.

Before reading a command (this is the reset only look once variable rule): now only-look-once is false.

only-look-once is a truth state that varies.

Check looking (this is the only look once rule): if only-look-once is true, do nothing instead; else continue the action.

After looking (this is the after looking mark only look once as true rule): now only-look-once is true; continue the action.

Definition: a beat is nonnow if it is available and its tempfuse is not its fuse and its fuse < 100.