Ok, my check for untying the rope was redirecting to a check for taking the rope, because taking the rope is necessary to untie the rope. I got rid of the check for taking the rope, and tried to block the player from going in a direction from the alleyway while the rope is still attached to the spool. This isn’t working though. Nor does my check for untying the rope from the spool when the bucket is attached to the rope.
Section 4(f) - Alleyway
The Alleyway is northwest from the Village Square.
The description of the Alleyway is "Tucked in a corner of this alleyway is an old stone [well] with a [winch] at the top.[if the golden bucket is in the Alleyway and the hemp rope is attached to the golden bucket and the hemp rope is attached to the spool] A [golden bucket] hangs from the [winch] by a piece of [hemp rope].[end if][paragraph break]The village square lies to the southeast."
Instead of going down in the Alleyway:
say "You jump down into the well...";
wait for any key;
say "You fall for what seems like an eternity, then everything is dark and wet. Consciousness fades and never returns.";
end the story.
Check climbing the hemp rope:
if the hemp rope is attached to the spool:
say "Descending that rope will not end [i]well[/i].";
stop the action.
Check going in a direction from the Alleyway:
if T'sino carries the hemp rope:
if the hemp rope is attached to the spool:
say "The hemp rope is still attached to the winch. You'll have to drop the rope if you want to go anywhere.";
stop the action;
otherwise:
continue the action;
otherwise:
continue the action.
[WELL]
The well is in the Alleyway.
The well is fixed in place.
The description of the well is "This little stone well is the only source of water for the entirety of Drytown. At the top of the well head is winch."
The winch is part of the well.
The description of the winch is "The well's simple winch consists of a spool that is turned by a crank."
The spool is part of the winch.
The description of the spool is "The winch has a cylindrical spindle[if the rope is attached to the spool], to which is attached a length of sturdy hemp rope.[end if][if the golden bucket is in the Abyss and the hemp rope is attached to the spool] The hemp rope dangles into the well, and you can't see the other end.[end if][if the golden bucket is in the Alleyway and the golden bucket is attached to the hemp rope and the hemp rope is attached to the spool] At the end of the hemp rope is a golden bucket.[end if]"
The crank is part of the winch.
Understand "handle" or "hand crank" as the crank.
The description of the crank is "Attached to the spool of the winch is a hand crank, which can be turned to raise or lower the bucket.[if the crank is broken] The hand crank seems to be broken."
Brokenness is a kind of value. The brokennesses are unbroken and broken. A thing has a brokenness. A thing is usually unbroken.
After turning the crank:
if the hemp rope is attached to the spool:
if the golden bucket is in the Abyss:
say "The crank seems a bit stiff, unable to turn the spool, so you force it with all your might. Suddenly there's a loud snap, and the bucket rockets to the top of the winch with a metallic clang! The crank appears to be broken now.";
now the crank is broken;
now the golden bucket is in the Alleyway;
otherwise:
say "The crank appears to be broken."
Check turning the crank:
if the crank is broken:
say "The crank appears to be broken.";
stop the action;
otherwise:
continue the action.
Instead of turning the spool:
try turning the crank.
Instead of turning the winch:
try turning the crank.
[HEMP ROPE]
The hemp rope is a rope in the Alleyway.
Understand "rope" as the hemp rope.
The hemp rope is attached to the spool.
The hemp rope is attached to the golden bucket.
The description of the hemp rope is "A length of sturdy hemp rope."
[Check taking the hemp rope:
if the hemp rope is attached to the spool:
say "The hemp rope is still tied to the spool of the winch.";
stop the action;
otherwise:
continue the action.]
Check untying the hemp rope from the spool:
if the hemp rope is attached to the golden bucket:
if the golden bucket is in the Abyss:
say "If you untie the rope while the bucket is still in the well, the rope and bucket will be lost forever into the abyss.";
stop the action;
otherwise:
say "You need to get the bucket off the rope first.";
stop the action;
otherwise:
continue the action.
After untying the hemp rope from the spool:
say "You untie the hemp rope from the spool and pocket the rope.";
now the player carries the hemp rope.
[ABYSS]
The Abyss is down from the Alleyway.
The printed name of the Abyss is "abyss".
[GOLDEN BUCKET]
The golden bucket is a thing in the Abyss.
The golden bucket is unevenly shaped.
The description of the golden bucket is "An open-top cylindrical pail, apparently made of gold."
Check taking the golden bucket:
if the golden bucket is attached to the hemp rope:
if the hemp rope is attached to the spool:
say "You need to untie the bucket from the rope first.";
stop the action;
otherwise:
continue the action;
otherwise:
continue the action.
yields:
Alleyway
Tucked in a corner of this alleyway is an old stone well with a winch at the top.
The village square lies to the southeast.
The hemp rope runs down into the abyss.
>take rope
Taken.
>se
Village Square
You are standing in the Drytown village square.
A temple stands to the north, the sheriff's office to the northeast, an old tenement building to the southeast, an inn to the south, and the bazaar to the southwest.
A dirt road leads out of town to the east and west.
>i
You are carrying:
one hundred shiny rocks
a hemp rope (attached to the spool and the golden bucket)
a work shirt (being worn)
trousers (being worn)
a raincoat (being worn)
boots (being worn)
>nw
Alleyway
Tucked in a corner of this alleyway is an old stone well with a winch at the top.
The village square lies to the southeast.
>untie rope from spool
Untied.
>i
You are carrying:
one hundred shiny rocks
a hemp rope (attached to the golden bucket)
a work shirt (being worn)
trousers (being worn)
a raincoat (being worn)
boots (being worn)
>