Five Gods Exiled — 77 of 191

Carolyn VanEseltine

Release 1

Book 3 - Crime-Related Memories

10 crime-related memories are in Z1.

A crime-related memory can be alibi, sympathy, or suspicion. A crime-related memory is usually alibi.

A crime-related memory has a person called the secondary NPC.

The player has a person called the suspect.

An NPC has a person called the suspect.

The player has a person called the alibi-provider.

An NPC has a person called the alibi-provider.

To prepare crime-related memories:

DM "Crime-related memories are mostly shut down at the moment while the crime system gets reworked.[line break]".

[say "Preparing crime-related memories. The murderer is [given name of the murderer] [surname of the murderer] and the victim is [given name of the victim] [surname of the victim].".

now the potential NPC list is {}; [Setting up alibis and suspicions.]

repeat with target NPC running through the NPCs:

if the target NPC is not the victim and the target NPC is not the murderer:

add the target NPC to the potential NPC list;

sort the potential NPC list in random order;

let NPC A be entry 1 of the potential NPC list;

let NPC B be entry 2 of the potential NPC list;

let NPC C be entry 3 of the potential NPC list;

now the alibi-provider of NPC A is NPC B;

now the alibi-provider of NPC B is NPC A;

say "[Given name of NPC A] [surname of NPC A] and [Given name of NPC B] [surname of NPC B] have alibis for each other.";

now the alibi-provider of NPC C is the player;

now the alibi-provider of the player is NPC C;

say "[Given name of NPC C] [surname of NPC C] and [Given name of the player] [surname of the player] (the player) have alibis for each other.";

now the alibi-provider of the murderer is the murderer;

add the murderer to the potential NPC list;

add the player to the potential NPC list;

repeat with target NPC running through the NPCs:

let the second potential list be the potential NPC list;

remove the alibi-provider of the target NPC from the second potential list, if present;

remove the target NPC from the second potential list, if present;

sort the second potential list in random order;

now the suspect of the target NPC is entry 1 of the second potential list;

say "[Given name of the target NPC] [surname of the target NPC] suspects [given name of the suspect of the target NPC] [surname of the suspect of the target NPC].";

remove the player from the potential NPC list;

remove the murderer from the potential NPC list;

while the number of entries in the potential NPC list is not 0:

let the target NPC be entry 1 of the potential NPC list;

say "[Given name of the target NPC] [surname of the target NPC] has an alibi from [given name of the alibi-provider of the target NPC] [surname of the alibi-provider of the target NPC]. [Given name of the target NPC] [surname of the target NPC] suspects [given name of the suspect of the target NPC] [surname of the suspect of the target NPC].";

remove the target NPC from the potential NPC list;

repeat with target NPC running through the NPCs:

if the target NPC is not the victim:

add the target NPC to the potential NPC list;

repeat with target memory running through the crime-related memories:

now the current memory is the target memory;

sort the potential NPC list in random order;

now the associated NPC of the current memory is entry 1 of the potential NPC list;

let K be a random number between 1 and 10;

if K < 3 and the associated NPC of the current memory is not the murderer:

now the current memory is alibi;

now the secondary NPC of the current memory is the alibi-provider of the associated NPC of the current memory;

if K < 6:

now the current memory is sympathy;

otherwise if K < 9:

now the current memory is suspicion;

now the secondary NPC of the current memory is the suspect of the associated NPC of the current memory.]

To remember a crime-related memory:

if the current memory is sympathy:

remember a sympathy memory;

otherwise if the current memory is alibi:

remember an alibi memory;

otherwise if the current memory is suspicion:

remember a suspicion memory.

To remember a sympathy memory:

say "(Remembering a sympathy memory associated with [given name of the associated NPC of the current memory] [surname of the associated NPC of the current memory] ([relationship of the associated NPC of the current memory]).)".

To remember an alibi memory:

say "(Remembering an alibi memory: alibi for [given name of the associated NPC of the current memory] [surname of the associated NPC of the current memory] provided by [given name of the secondary NPC of the current memory] [surname of the secondary NPC of the current memory].)".

To remember a suspicion memory:

say "(Remembering a suspicion memory: [given name of the associated NPC of the current memory] [surname of the associated NPC of the current memory] ([relationship of the associated NPC of the current memory]) suspects [given name of the secondary NPC of the current memory] [surname of the secondary NPC of the current memory].)".