InventoryAn interactive fiction by Christopher Armstrong (2008) - the Inform 7 source text | |
| Home page Contents Previous Next Complete text | Chapter 2 - Game rules
After printing the banner text: say "Please type HELP." Asking for help is an action out of world. Understand "help" as asking for help. Report asking for help: say "Welcome to my interactive blog post. The inspiration for this was Glyph Lefkowitz's blog post [italic type]Memeventory! Inventomeme? Uh, how about 'inventory meme'[roman type], which is available at the following URL. http://glyph.twistedmatrix.com/2008/06/memeventory-inventomeme-uh-how-about.html I decided to go a bit further than just create an inventory listing. This is a re-enactment of some of the packing I had to do before heading to London for a meeting at the headquarters of my employer, Canonical. I apologize for the poor implementation of this little piece of interactive non-fiction; it hasn't been beta-tested and it's not really a game, apart from taking part of the big game that is the [italic type]memeosphere[roman type] (Yeah, I really did just say that word). Type SCORE to find out how much more loot you need to grab." Understand the command "score" as something new. Checking the score is an action applying to nothing. Understand "score" as checking the score. Instead of checking the score: say "I check my checklist to see what I still need."; try examining the checklist. A thing can be accounted for. To decide whether I've got everything: Repeat through the Table of Things What Need Accounting: if the thing entry is not accounted for: decide no; decide yes. To account for (X - a thing): say "I check off '[the description corresponding to a thing of X in the Table of Things What Need Accounting]' on my checklist."; now X is accounted for; If I've got everything: say "... and that seems to be everything. I can leave now!" to check if I can win: If I've got everything: say "Off to the airport! Off to old London town, for eating, drinking, and merrymaking! Oh, and writing software."; end the game in victory; otherwise: say "No, no! I haven't got everything in my checklist yet.". Instead of exiting: check if I can win. Instead of going outside: check if I can win. To say the checklist: Repeat through the Table of Things What Need Accounting: say "[description entry]"; if the thing entry is accounted for: say " - CHECK"; say "[line break]". test winning with "take all / open bag / close bag / open backpack / put chargers in backpack / put kindle in backpack / put laptop in backpack / wear cap / leave" Understand the command "leave" as something new. Understand "leave" as exiting. When play begins: change the library message person to first person; say "Time to go! Off to the train station! Chop chop, buddy! Time waits for no man, and neither does my employer!"; |