When in Rome 1: Accounting for Taste — 10 of 31

Emily Short

Release 4

Section 3 - Every Turn Rules for Creature

After entering something in the presence of a contrary creature:

if the creature cannot touch the player, continue the action;

move the creature to the noun;

now the creature is passive;

say "You climb into [the noun]. [The creature], agitated, tries to get you out again, a process at which it is so unsuccessful that it winds up falling in with you."

After exiting in the presence of a contrary creature:

now the creature is passive;

if the creature is in location, say "You climb out. [The creature] tries to push you back, but without success.";

otherwise say "You scramble out. [The creature] tries to pull you into [the holder of the creature] with it, but fails miserably."

[Every turn:

if the number of things carried by the player is greater than 4

begin;

let target be the first thing held by the player;

let next target be the next thing held after target;

while next target is a thing

begin;

let target be the next target;

let next target be the next thing held after the next target;

end while;

silently try dropping the target;

if the target is not carried by the player, say "Because you are carrying so many things, you lose your grip on [the target].";

end if.]

Definition: a thing is inanimate if it is not a person.

To decide whether game has begun:

if we are dead, no;

yes.

[

Every turn:

if Test is happening, follow the Creature Behavior rules;

change last location to location.

]

The creature behavior rules is a rulebook.

The first creature behavior rule:

abide by the creature death rule.

This is the creature death rule:

if the creature is suffocating

begin;

increase the breath count of the creature by 1;

if the breath count of the creature > 3

begin;

say "At this point [the creature] is overwhelmed by lack of whatever it breathes, and collapses.";

end the story saying "Unfortunately, you are unable to revive the thing";

end if;

end if;

if the creature is dying

begin;

say "Too long without sustenance, [the creature] succumbs to a coma and death.";

end the story saying "You have killed your Visitor.";

rule succeeds;

end if.

A creature behavior rule (this is the poisoned creature rule):

if the creature is poisoned

begin;

now the creature is passive;

now the creature is slow;

if the creature is visible, say "[The creature] does not move but simply looks glassy[if the creature is hungry] and hungry[end if][if the creature is starving]. Starving, even -- but too dulled to do anything about it[end if].";

rule succeeds;

end if.

A creature behavior rule (this is the drop heavy things rule):

if the creature is active and the creature carries a tiring thing (called anvil)

begin;

say "[The creature] grimaces at the weight of [the anvil].[line break]";

try the creature trying dropping the anvil;

end if.

Definition: a thing is tiring if it outweighs strength.

A creature behavior rule (this is the placid held creature rule):

if the player is carrying the creature

begin;

if the creature carries a delicious thing and the creature is hungry

begin;

try the creature trying dining;

otherwise;

if the creature is cold, say "[The creature] huddles against you for warmth.";

otherwise say "[The creature] [if a random chance of 1 in 2 succeeds]squirms a little in your grip[otherwise]leans over to look at the floor[end if][if a random chance of 1 in 2 succeeds], but does nothing[end if].";

end if;

rule fails;

end if.

A creature behavior rule (this is the inactivity while blinded rule):

if the creature is blinded and the creature is active

begin;

if the creature is smart

begin;

if the creature can see a lit device (called the target)

begin;

if the target is fixed in place or the target is available,

try the creature trying switching off the target;

otherwise try the creature trying hiding oneself;

if the creature is blinded and the creature is active

begin;

say "[The creature] [if a random chance of 1 in 2 succeeds]obviously does not appreciate the glare of the light[otherwise]huddles by itself, blinking[end if][if the creature is hungry]. It also looks to be getting hungry[end if].";

now the creature is passive;

end if;

end if;

otherwise;

try the creature trying hiding oneself;

if the player cannot see the creature, rule fails;

if the creature is passive, rule fails;

if the creature is visible, say "[The creature] cowers [if the creature is not in the location]in [the holder of the creature][otherwise]in what shadow it can find[end if], sniveling.";

rule fails;

end if;

end if.

A creature behavior rule (this is the food consumption rule):

if the creature is active and the creature is hungry,

try the creature trying dining.

A creature behavior rule (this is the inactivity while starving rule):

if the creature is starving and creature is active

begin;

try the creature trying dining;

if the creature is starving, try the creature trying crying;

end if.

A creature behavior rule (this is the slothful kids don't move rule):

if the creature is slothful and the creature is active

begin;

try the creature trying waiting;

now the creature is passive;

rule succeeds;

end if.

A creature behavior rule (this is the dress when cold rule):

if the creature is active and the creature is cold,

try the creature trying dressing oneself.

A creature behavior rule (this is the inactivity while cold rule):

if the creature is active and the creature is cold,

try the creature trying shivering.

A creature behavior rule (this is the timid creature hides rule):

if the creature is active and the creature is timid and the creature can see the player

begin;

try the creature trying hiding oneself;

end if.

A creature behavior rule (this is the timid creature lurks rule):

if the creature is active and the creature is timid and the creature is visible

begin;

say "[The creature] tries to put [the random fixed in place thing in the location] between itself and you.";

now the creature is passive;

end if.

A creature behavior rule (this is the contrary creature rule):

if the creature is active and the creature is contrary and the noun is a thing

begin;

if the noun is the creature

begin;

now the creature is passive; [because we will count glaring back at the player as its action for this turn]

otherwise;

if the creature is visible, say "[The creature] [if a random chance of 1 in 2 succeeds]watches your attention to[otherwise]observes your interest in[end if] [the noun][if a random chance of 1 in 2 succeeds], its eyes narrowing[otherwise], growling in the back of its throat[end if].[line break]";

if opening, try the creature trying closing the noun;

if closing, try the creature trying opening the noun;

if the creature is active, try the creature trying taking the noun;

end if;

end if.

A creature behavior rule (this is the evil creature rule):

if the creature is secretive and the creature is active and the creature is smart, try the creature trying launching [us].

A creature behavior rule (this is the acquisitive creature environment rule):

if the creature is not visible, make no decision;

if the creature is active and the creature is acquisitive

begin;

if the creature is in a container and the location is rich

begin;

say "[The creature] thoughtfully counts [the number of things in the location in words] things outside its home, as compared to [the number of things in the holder of the creature in words] where it is now, and scratches its head.";

try the creature trying exiting;

otherwise;

if the creature is in the location and the creature can see a rich enterable container (called the target)

begin;

say "[The creature] thoughtfully counts [the number of things in the target in words] things in [the target], as compared to [the number of things in the location in words] out here, and scratches its head. ";

try the creature trying entering the target;

end if;

end if;

end if.

Definition: a container is rich:

if it is closed and it is opaque, no;

if the number of things in it is greater than the number of things in the holder of the creature, yes.

Definition: a room is rich if the number of things in it is greater than the number of things in the holder of the creature.

A creature behavior rule (this is the creature escape rule):

if the player encloses the creature, make no decision;

if the creature is active and the creature is in a container (called home):

if the home contains something (called target) which is wanted by the creature:

try the creature trying taking the target;

otherwise:

if the player carries the home:

make no decision;

if the creature was last fed too long ago:

do nothing;

otherwise:

try the creature trying exiting;

if the active creature is in a closed container (called the trap):

if the creature is friendly and the creature is visible:

say "[The creature] presses its mouth to the inner surface of [the trap] and makes fish faces at you.";

otherwise if the creature is visible:

say "[The creature] knocks on the inner wall of [the trap].";

now the creature is passive;

A creature behavior rule:

if the creature is hostile and the creature is active and the creature is smart, try the creature trying launching [us].

A creature behavior rule (this is the hostile action rule):

if the creature is active and the creature is hostile

begin;

if the creature can see an available papery thing (called the target)

begin;

if the creature can touch the target, try the creature trying attacking the target;

otherwise try the creature trying showing temper;

otherwise;

if the creature can see a papery thing (called the target)

begin;

try the creature trying attacking the target;

end if;

end if;

end if.

A creature behavior rule (this is the smelly thing rule):

if the creature is active and the creature is offended and the creature is stupid

begin;

let problem be a random stinky thing which can be seen by the creature;

try the creature trying disposing of the problem;

end if.

A creature behavior rule (this is the good smelly thing rule):

if the creature is active and the odor sensitivity of the creature is inverse

begin;

let target be a random stinky thing which can be seen by the creature;

try the creature trying taking the target;

end if.

A creature behavior rule (this is the discard trash rule):

if the creature is active and the creature is carrying something (called the target) which is not wanted by the creature

begin;

if the creature is acquisitive, make no decision;

if the creature is vast and the target is unexplored and the target is not a container

begin;

try the creature trying attacking the target;

otherwise;

try the creature trying dropping the target;

end if;

end if.

A creature behavior rule (this is the greedy action rule):

if the creature is active and the creature is acquisitive and the creature is not occupied

begin;

if the creature can see an available grabbable thing (called the target) which is not had by the creature

begin; ;

try the creature trying taking the target;

end if;

end if.

Definition: a thing is grabbable if it is not fixed in place and it is not scenery.

Definition: a creature is occupied if the number of things carried by the creature is the carrying capacity of the creature.

A creature behavior rule (this is the juggling stuff rule):

if the creature is active and the creature is acquisitive and the creature is occupied

begin;

if the creature is visible and a random chance of 1 in 4 succeeds

begin;

now the creature is passive;

say "[The creature] juggles [the list of things carried by the creature] in a colorful arc.";

otherwise;

if a random chance of 1 in 2 succeeds

begin;

now the creature is passive;

if the creature is visible, say "[The creature] gleefully counts its [number of things carried by the creature in words] possession[s].";

otherwise;

try the creature trying playing with a random thing carried by the creature;

end if;

end if;

end if.

A creature behavior rule (this is the bored creature looks around rule):

if the creature is active and the creature is playful

begin;

if the creature can see an unexplored thing, make no decision;

try the creature trying exploring;

end if.

A creature behavior rule (this is the bored action rule):

if the creature is not visible, make no decision;

if the creature is not in location, make no decision;

now every thing which is part of something is explored;

if the creature is active

begin;

if the creature can see something available (called the target) which is not wanted by the creature

begin;

if the creature can touch an unexplored available thing (called the new target)

begin;

try the creature trying playing with the new target;

otherwise;

if the creature can touch an entertaining thing

begin;

try the creature trying playing with a random entertaining thing;

end if;

end if;

end if;

end if.

Definition: a thing is entertaining if creature can touch it and it is not wanted by the creature and it is available and it is not part of something.

The last every turn rule:

now the heart's desire is the creature;

now every animal is active.