The best example I could find so far was number 316 in the list of examples.
The main question I have here is what the player is going to do in this set up. In some one-room games the description of the room changes based on where the protagonist is in the room, and where the protagonist is depends on what they last examined, touched, etcetera. So what you’re doing is recording where the objects are located, and assigning the player to that location as well so that the game prints the room description from that viewpoint.
If you actually want the player to type ‘go to bed’, ‘go to window’, etcetera, personally i would question the value of that approach. I think it’s more important to focus on what the player actually is doing in the location.
In many ways these are the same thing, but the important thing is you don’t have to arrange objects spatially, like with coordinates. Just record locations and what is in relation to what. Unless you’re going for some deeper simulation?
See section 5.1 (text with substitutions), and the chapter on Kinds (especially sections 4.6 and up). Also check out tables, in chapter 15, particularly 15.16 and 15.17, and chapter 8 on change, as well as chapter 12 on Advanced Actions.
In this case you want to use I7’s properties (these would be dull, rusty, etc.), When the Armorer cleans the sword, you change the property of the sword so the game prints the correct description. You can embed if statements in an object’s description, or create a description by selecting entries in a table.
Here is a very simple example:
"Rusty Sword"
The Armory is a room. A man called The Armorer is here.
A blade is a kind of thing. A blade can be rusty. A blade can be dull. A blade usually is rusty and dull.
A blade called a sword is here. The description of the sword is "An iron sword [if the sword is rusty]covered in rust[end if][if the sword is dull], with an edge good only for buttering your bread[end if]."
Sharpening the sword is an action applying to one visible thing. Understand "sharpen [something]" as sharpening the sword.
Check sharpening the sword: if the noun is not a blade, say "You can't sharpen that." instead.
Carry out sharpening the sword: now the noun is not dull.
Report sharpening the sword: say "After hours and hours of work, you sharpen the sword.".
A tulip is here.
test me with "x sword / sharpen sword / x sword / sharpen tulip".