"State of the Orange" by John Timmons
The release number is 1. The story creation year is 2007. The story headline is "An example of changing the properties of an object." The story description is "This is a simple demonstration of how we might change an object by changing their properties rather than 'swapping out' objects with another. This is based on Chapter 16.14. 'Understanding things by their properties' in the Inform 7 documentation."
Release along with the source text, a website, and an interpreter.
The Open Field is a room.
An orange is in the Open Field. The description is "It seems like an ordinary orange." The orange can be healthy or bruised. The orange is healthy. Understand the healthy property as describing the orange.
After dropping the orange:
say "The orange falls with a dull thud.";
now the orange is bruised;
change the description of the orange to "Looks like this orange has been dropped."
Garvey is a man in the Open Field. The description is "Garvey is a rather nondescript fellow. He is holding [a list of things carried by garvey]."
Instead of giving the orange to Garvey:
if the orange is healthy begin;
now Garvey has the orange;
say "Garvey thanks you for the gift.";
otherwise if the orange is bruised;
say "Garvey rejects your offer.";
. After creating the orange, setting its location, and providing a description, we declare two possible properties that the orange might possess: healthy or bruised. Then we state that the present property of the orange is healthy.
. Here we make two changes after the orange has been dropped: first we change the property to that of bruised and second the orange will now possess a new description to indicate that it has been dropped (and bruised.)