Blue Lacuna — 101 of 467

Aaron A. Reed

Release 4

Chapter - Beginning and Ending

To begin (ep - an episode):

if drama manager is being debugged, say "// Drama manager: beginning [ep].";

now ep is running;

now current episode is ep;

unless an unimportant episode is playing, now last episode is current episode;

consider the commencement rules for ep;

the episode expires in the expiration date of ep from now.

To complete (ep - an episode), succeeding, failing:

if drama manager is being debugged, say "// Drama manager: completing [ep].";

if ep is running and ep is not expired, now ep is completed;

if succeeding, now ep is successful;

if failing, now ep is failed;

consider the completion rules for ep;

now current episode is no-episode;

if ep is expired and icebreaker of ep is not silence and icebreaker of ep is not spoken:

now the episodic status of ep is unaired;

if drama manager is being debugged, say "// Drama manager: [ep] expired without [icebreaker of ep] being spoken; resetting to unaired.";

otherwise:

if there is a eptitle of ep in episode schedule and ( icebreaker of ep is not silence and icebreaker of ep is not spoken ):

if ep is one-shot:

choose row with a eptitle of ep in episode schedule;

blank out the whole row;

sort episode schedule in random order.

At the time when the episode expires:

if an episode is playing and Progue is idle:

if drama manager is being debugged, say "// Drama Manager: episode [current episode] expires.";

now current episode is expired;

complete current episode;