Five Gods Exiled — 13 of 191

Carolyn VanEseltine

Release 1

Part 3 - Shrine Deities

Deity is a kind of value. The deities are defined by the Table of Potential Deities.

Table of Potential Deities

deityhealth restore rankattunement restore rankdebuff removal rankID rankmonster locate rankassignment
Inho55555Z1
Muisti53421Z1
Apuraha54312Z1
Ennakointi25143Z1
Kauhusta45231Z1
Yhtenaisyys31245Z1
Arkuus23514Z1
Innostus31452Z1
Taiteellisuus32514Z1
Kohtelias 23145Z1
Ylpea14253Z1
Peloton23451Z1
Holtiton24131Z1
Huolellinen54312Z1
Laakari12345Z1

A monster name is a kind of value. [This used to be in the appropriate section, but it was too far down in the code to make the compiler happy.]

A shrine statue is a kind of container. A shrine statue is usually fixed in place, open, and not openable. A shrine statue is in every shrine room. A shrine statue can be Perceived or Unperceived. A shrine statue is usually Unperceived. A shrine statue has a deity called the shrine deity. A shrine statue usually has shrine deity Hevonen. Understand the shrine deity property as describing a shrine statue. A shrine statue can be known or unknown. A shrine statue is usually unknown. Understand "[deity]" as a shrine statue when the item described is known.

A shrine statue can be previously invoked. A shrine statue is usually not previously invoked.

Definition: A shrine room is Perceived if it contains a Perceived shrine statue.

Definition: A shrine room is Unperceived if it contains an Unperceived shrine statue.

The health restorer is a deity that varies. The health restorer is Inho.

The attunement restorer is a deity that varies. The attunement restorer is Inho.

The debuff remover is a deity that varies. The health restorer is Inho.

The IDer is a deity that varies. The IDer is Inho.

The monster locator is a deity that varies. The monster locator is Inho.

The current statue is a shrine statue that varies.

The current deity is a deity that varies.

The deity color list is a list of adjectives that varies.

A deity has an adjective called the color.

To randomize shrine deities:

DM "Randomizing shrine deities.";

now the current statue is a random shrine statue;

now the current deity is a random deity;

add the color list to the deity color list; [The color list is originally found up by the adjectives.]

sort the deity color list in random order;

let N be 0;

repeat with temporary locale running through shrine rooms:

now N is N + 1;

now the current deity is a random deity;

while the assignment corresponding to a deity of the current deity in the Table of Potential Deities is not Z1:

now the current deity is a random deity;

now the current statue is a random shrine statue in the temporary locale;

now the shrine deity of the current statue is the current deity;

now the assignment corresponding to a deity of the current deity in the Table of Potential Deities is the temporary locale;

DM "The deity of [temporary locale] is [current deity]";

if N is less than 6:

now the current statue is Perceived;

DM ", Perceived";

otherwise:

DM ", Unperceived";

sort the deity color list in random order;

now the color of the current deity is entry 1 of the deity color list;

remove entry 1 from the deity color list;

DM ", associated with [color of the current deity].";

repeat with temporary locale running through Perceived shrine rooms:

now current deity is the shrine deity of a random shrine statue in the temporary locale;

if the health restore rank of the current deity <= the health restore rank of the health restorer:

now the health restorer is the current deity;

repeat with temporary locale running through Perceived shrine rooms:

now current deity is the shrine deity of a random shrine statue in the temporary locale;

if the current deity is not the health restorer:

if the attunement restore rank of the current deity <= the attunement restore rank of the attunement restorer:

now the attunement restorer is the current deity;

repeat with temporary locale running through Perceived shrine rooms:

now current deity is the shrine deity of a random shrine statue in the temporary locale;

if the current deity is not the health restorer and the current deity is not the attunement restorer:

if the debuff removal rank of the current deity <= the debuff removal rank of the debuff remover:

now the debuff remover is the current deity;

repeat with temporary locale running through Perceived shrine rooms:

now current deity is the shrine deity of a random shrine statue in the temporary locale;

if the current deity is not the health restorer and the current deity is not the attunement restorer and the current deity is not the debuff remover:

if the ID rank of the current deity <= the ID rank of the IDer:

now the IDer is the current deity;

repeat with temporary locale running through Perceived shrine rooms:

now current deity is the shrine deity of a random shrine statue in the temporary locale;

if the current deity is not the health restorer and the current deity is not the attunement restorer and the current deity is not the debuff remover and the current deity is not the IDer:

now the monster locator is the current deity;

DM "Health restoral - [health restorer]. Attunement restoral - [attunement restorer]. Debuff removal - [debuff remover]. ID - [IDer]. Monster location - [monster locator].";