Sure you can:
Instead of going nothing when compass mode is true:
say "You're on land now, friend, so that direction doesn't make any sense. Use compass directions."
That said, I had some of the original logic backward (should have tested it!) Here’s (what seems to be) a fully working version:
[code]A direction can be compass, nautical, or positional (this is its category property). A direction is usually compass.
A direction has a direction called the counterpart.
Fore is a direction. The opposite is aft.
Aft is a direction. The opposite is fore.
Port is a direction. The opposite is starboard.
Starboard is a direction. The opposite is port.
Fore, aft, port, and starboard are nautical.
The counterpart of north is fore.
The counterpart of south is aft.
The counterpart of east is starboard.
The counterpart of west is port.
Up is positional. [A bug in Inform prevents assigning all four at once.]
Down is positional.
Inside is positional.
Outside is positional.
Compass mode is a truth state variable. Compass mode is false.
Setting action variables for an actor going a compass direction when compass mode is true:
change the noun to the counterpart of the noun.
Setting action variables for the player going a nautical direction when compass mode is true:
change the noun to nothing.
Instead of going a compass direction when compass mode is false:
say “You’re shipboard now, lubber. You’ll use fore, aft, port, and starboard or you’ll walk the plank.”
Instead of going nothing when compass mode is true:
say “You’re on land now, friend, so that direction doesn’t make any sense. Use compass directions.”[/code]
–Erik