@Robert: The actual jetpack seems to work fine.
A couple of points of style:
Code:
Report wearing the jetpack:
Say "You slip the harness over your shoulders. It does not seem to fit quite right.";
Stop the action.
You probably want to use an "after" rule here.
Code:
End the game in death.
This is deprecated; use "End the story saying..." instead (yes, it is less convenient, but the old form may be withdrawn eventually)
To check for deprecated code like that, write this at the top of your program:
Code:
Use no deprecated features.
At least one of the ocean rooms has a description not matching the physical layout of the rooms, leading to this:
Quote:
South of Nowhere
You are in the air above a completely nondescript piece of land. The land extends to your north, and there is apparently endless water on all other sides.
>w
Ocean
You are in the air above a large body of water. You can see land to the west.
>w
You can't go that way.
For a large number of oceans, it might make more sense to have a single "dead end ocean" room and track where the player came from, instead of having lots of separate rooms that you have to keep identical. For a medium sized case (a typical game), you can create a kind of room and have it automagically generate its name and description:
Code:
Leading-from relates a direction (called D) to a room (called R) when the room-or-door D from R is not nothing.
The verb to lead from (it leads from, they lead from, it led from, it is led from, it is leading from) implies the leading-from relation.
An ocean is a kind of room. An ocean is always wet. The printed name of an ocean is usually "Ocean". The description of an ocean is usually "You are in the air above a large body of water. You can see land to [the list of directions which lead from the location]."
Just make sure every ocean is connected to
something and it will produce sensible output. If you're going to allow the player to go up and down as well, just change the "list of directions" to "list of horizontal directions" and add this:
Code:
A direction can be horizontal or vertical. A direction is usually horizontal. The up and the down are vertical.
And finally, a somewhat less relevant issue:
You could not realistically use this code in a "real" game of IF, because it's far too easy to produce unwinnable situations (by running out of fuel), unless you provide a refueling station of some kind. Ultimately, the fuel mechanic may overly complicate the gameplay.
But that's okay, because this is just a demo. It's not supposed to be dropped wholesale into a "real" game, and as an implementation of flight, it's quite good.