Try this.
[code]“Test”
Underlying relates various things to one room. The verb to underlie (he underlies, they underlie, he underlaid, it is underlaid, he is underlying) implies the underlying relation. The verb to be under implies the underlying relation. The verb to be beneath implies the underlying relation.
A diggable room is a kind of room. A diggable room has a number called the dig depth. The dig depth of a diggable room is usually zero.
Definition: A room is dug if it is a diggable room and the dig depth of it is not zero.
Digging is an action applying to nothing. Understand “dig”, “dig hole/here” and “dig in ground/dirt/earth” as digging.
Before digging (this is the set noun to player’s location rule): now the noun is the location of the player.
Check digging (this is the standard check digging rule):
if the noun is not a diggable room, say “The floor here doesn’t exactly invite digging.” instead;
if the dig depth of the noun is greater than four, say “You’ve already dug as deep as you possibly can here, you don’t need to dig again!” instead;
if the player does not hold the rusty spade, say “You have nothing to dig with.” instead.
Carry out digging (this is the standard carry out digging rule):
increment the dig depth of the noun;
if the dig depth of the noun is one, update backdrop positions.
After digging when something is under the noun and the dig depth of the location of the player is greater than four (this is the reveal hidden items rule):
say “You gather up [a list of things which underlie the noun] hidden underneath [the printed name of the noun in lower case].”;
now everything under the noun is in the noun;
now everything under the noun is not under the noun.
Report digging (this is the standard report digging rule):
say “[if the dig depth of the noun is one]You start digging[otherwise]You dig even further[end if].”.
When play begins (this is the set backdrop positions rule):
move the hole backdrop to all dug rooms.
The hole is a backdrop. The hole is not scenery. The initial appearance of the hole is “You have dug a hole here.”. The description of the hole is “A very holey hole.”.
The Forest is A Diggable Room. The description of the forest is “A very foresty forest.”.
The rusty spade is in the forest. The treasure chest is under the forest. The treasure chest is a closed openable container. The description of the chest is “A very chesty chest.”. The map is in the chest. The description of the map is “A very mappy map.”.
Test me with “dig / take spade / dig / l / x hole / dig / dig / dig / dig / x hole / l / take chest / open chest / take map”.[/code]
Hope this helps.