An item that is visible in a container, only reachable using a tool, & rewards exactly 1 point

The crack is a transparent container in the Cavernous Chamber.  
The crack requires the grabber.  Understand "in the floor" as the crack.
Description of the crack is "The concrete floor has a large crack in it, almost big enough to fit your hand inside...  but not quite."
Understand "smoke crack" as a mistake ("Just say no.")

Rule for reaching inside the crack:
	if the player does not carry the grabber:
		say "Your hand will not quite reach inside.";
		deny access;
	if the player carries the grabber:
		increase score by 1;
		say "You shove the grabber into the crack in the floor...  you strike [a list of things in the crack]!";
		allow access.

The brass key is a thing in the crack.  Description of the brass key is "A small brass key."

The above code is not desirable for several reasons, but I’m at a loss for how to fix it.

I want the brass key to be visible when the crack is examined, but only reachable when the player uses the grabber tool (“grab key with grabber” or something similar, NOT “take key” as it currently behaves). I assume I will need to say something like “Grabbing it with is an action applying to two things.”

The above code also allows the player to drop items into the crack, retrieve them, and score additional points, which is undesirable.

Any advice or wisdom on how to execute this correctly?

Here’s one bit:

Scenery containers do not behave in this way: their contents are assumed to be less immediately visible, and will be mentioned only if the player looks inside them.

Make the crack a scenery container (it doesn’t need to be transparent) and you automatically get the effect that its contents won’t be mentioned until the player examines or searches the crack. You’ll have to mention the crack in the room description, though; another effect of it being scenery is that it doesn’t get its own sentence saying it’s there. (So long as the brass key is in the crack, it won’t be mentioned in the room description after discovery either, but only when the player searches or examines the crack.)

1 Like

Thanks for the help. This works as far as I can tell?!

Grabbing it with is an action applying to two things.  Understand "grab [something] with [something preferably held]" as grabbing it with.

Before taking the brass key when the brass key is in the crack:
	say "Your hand will not quite reach inside the crack.";
	stop the action.
	
After grabbing the brass key with the grabber for the first time:
	increase score by 1;
	say "You shove the grabber into the crack in the floor...  you strike a [brass key]!";
	move the brass key to the player.

After grabbing the brass key with the grabber:
	say "You shove the grabber into the crack in the floor...  you strike a [brass key]!";
	move the brass key to the player.

Instead of grabbing the brass key with the grabber when the player carries the brass key:
	say "You already have the brass key."

The brass key is a thing in the crack.  Description of the brass key is "A small brass key."