Blue Lacuna — 93 of 467

Aaron A. Reed

Release 4

Chapter - Bookkeeping

The conversation bookkeeping rule is listed after the checking if the NPC has anything else to say rule in the every turn rules.

last-spoken-turn is a number that varies.

This is the conversation bookkeeping rule:

if conversation is being debugged, say "// Conversation: conversation bookkeeping rule).";

if an attentive other person (called target) is enclosed by location begin;

if conversation is being debugged, say "// Conversation: CBR found something to do.";

if conversation fuse is 0 begin;

now the boredom counter of target is 0;

otherwise;

if the number of exciting available beats is 0 begin;

increase the boredom counter of target by 1;

otherwise;

let Q be a random exciting available beat;

if conversation is being debugged, say "// Conversation: force discuss [Q] (because [target] is enclosed by location and [q] is exciting and available).";

force discuss Q;

end if;

end if;

if the boredom counter of target >= 2 begin;

try getting bored target;

end if;

if the number of available beats > 0 and actual last beat is not ephemeral and actual last beat is not dogged begin;

if conversation is being debugged, say "// Conversation: subtracting 1 from tempfuse of [list of available beats].";

repeat with subtarget running through available beats begin;

decrease tempfuse of subtarget by 1;

end repeat;

end if;

otherwise if the number of attentive people > 0;

post-conversation processing;

end if;

if conversation is being debugged begin;

say "// Conversation: available beats are now ";

repeat with trg running through available beats begin;

say "[trg]:[tempfuse of trg], ";

end repeat;

say "; last beat is [last beat]; penultimate beat is [penultimate beat]; actual last beat is [actual last beat]";

end if.

The increase convo fuse rule is listed before the checking if the NPC has anything else to say rule in the every turn rules. This is the increase convo fuse rule: if last-spoken-turn is not turn count, increase conversation fuse by 1.