Escape From Echo Base — 25 of 54

Alex Gibbins-Stark

Release 1

Section 23 - Climate and Clothing

A room has a number called temperature.

A person has a number called stamina. Stamina is initially 100.

Clothing is a kind of wearable thing. Clothing has a number called warmth.

The boots are clothing. The boots are plural-named. The warmth of the boots is 5. The description of the boots is "Standard Imperial boots for cold climates, trimmed with synthetic womprat fur. Rather muddy."

The fatigues are clothing. The fatigues are plural-named. The warmth of the fatigues is 5. The description of the fatigues is "A one-piece beige coverall with padded knees and plenty of pockets."

The warm jacket is clothing. The warmth of the warm jacket is 10. The description is "Lined with genuine tauntaun fur, this jacket smells bad on both the inside and outside."

The cap is clothing. The warmth of the cap is 5. The description is "A tan and white cap with ear flaps. Not stylish, but warm."

The spacesuit is clothing. The warmth of the spacesuit is 10. The description is "A pressure suit - don't leave your spaceship without it."

Every turn:

let clothes be the list of things worn by the player;

let X be warming applied to clothes;

let W be the summing reduction of X;

let effective temperature be the temperature of the location + W;

now the stamina of the player is the stamina of the player + the effective temperature;

if the stamina of the player is greater than 100:

now the stamina of the player is 100.

To decide what number is warm (L - a clothing) (this is warming):

decide on the warmth of L.

To decide what number is the sum of (N - a number) and (M - a number) (this is summing):

decide on N + M.

To slip is a verb.

Every turn:

let S be the stamina of the player;

let P be a random thing carried by the player;

if S < 0:

say "You freeze to death.";

now the player is dead;

otherwise if S < 25:

say "You are freezing and must find shelter soon.[if P is not nothing] The [P] [regarding P][slip] from your fingers.[end if]";

if P is not nothing:

try silently the player dropping P;

otherwise if S < 50:

say "You are feeling very cold.[if P is not nothing] Your hands are numb and you're finding it difficult to hold onto your [P].[end if]";

if P is not nothing:

try silently the player dropping P;

otherwise if S < 75:

say "You are feeling cold.";

otherwise if S < 100:

say "You are feeling chilly."