TITLE Cloak of Darkness A basic IF demonstration Ported To AGT By Al Golden September 20,1999 END_TITLE INTRODUCTION Hurrying through the rainswept November night, you're glad to see the bright lights of the Opera House. It's surprising that there aren't more people about but, hey, what do you expect in a cheap demo game...? END_INTRODUCTION VERB DUMMY_VERB1 HANG END_VERB VOCABULARY 2 HANG END_VOCABULARY #DEFINE [worn] 1000 #DEFINE [nowhere] 0 FLAG [cloak hung] VARIABLE [time in bar] ROOM [Opera Foyer] Opera Foyer SOUTH [Foyer Bar] WEST [Cloakroom] END_ROOM ROOM_DESCR [Opera Foyer] You are standing in a spacious hall, splendidly decorated in red and gold, with glittering chandeliers overhead. The entrance from the street is to the north, and there are doorways south and west. END_ROOM_DESCR ROOM [Cloakroom] Cloakroom EAST [Opera Foyer] END_ROOM ROOM_DESCR [Cloakroom] The walls of this small room were clearly once lined with hooks, though now only one remains. The exit is a door to the east. END_ROOM_DESCR ROOM [Foyer Bar] Foyer Bar NORTH [Opera Foyer] Light [dumb gizmo] END_ROOM ROOM_DESCR [Foyer Bar] The bar, much rougher than you'd have guessed after the opulence of the foyer to the north, is completely empty. There seems to be some sort of message scrawled in the sawdust on the floor. END_ROOM_DESCR NOUN [Velvet Cloak] Cloak Velvet There is a velvet cloak here. LOCATION [worn] WEARABLE END_NOUN NOUN_DESCR [Velvet Cloak] A handsome cloak, of velvet trimmed with satin, and slightly spattered with raindrops. Its blackness is so deep that it almost seems to suck light from the room. END_NOUN_DESCR NOUN [Brass Hook] Hook Brass There is a brass hook here. LOCATION [CLOAKROOM] END_NOUN NOUN_DESCR [BRASS HOOK] It's just a small brass hook, screwed into the wall. END_NOUN_DESCR NOUN [Game Message] Message Game There is a game message here. LOCATION [Foyer Bar] READABLE END_NOUN NOUN [Dumb Gizmo] Gizmo Dumb There is a dumb gizmo here. !Invisible LOCATION [nowhere] IS_LIGHT END_NOUN COMMAND ANY NEWLIFE SetVariableTo [TIME IN BAR] 0 END_COMMAND COMMAND ANY Atlocation [Foyer bar] addtovariable [time in bar] 1 END_COMMAND COMMAND EXAMINE HOOK AtLocation [CloakRoom] FlagON [Cloak hung] PrintMessage [cloak-hook hung] DoneWithTurn END_COMMAND COMMAND EXAMINE HOOK AtLocation [CloakRoom] FlagOff [Cloak hung] PrintMessage [cloak-hook unhung] DoneWithTurn END_COMMAND COMMAND NORTH AtLocation [Opera Foyer] PrintMessage [no travel] DoneWithTurn END_COMMAND COMMAND HANG CLOAK Not AtLocation [CloakRoom] PrintMessage [not here] DonewithTurn END_COMMAND COMMAND HANG CLOAK AtLocation [CloakRoom] FlagOn [cloak hung] Printmessage [already hung] DonewithTurn END_COMMAND COMMAND HANG CLOAK AtLocation [Cloakroom] IsWearing [Velvet Cloak] or IsCarrying [Velvet Cloak] DropIt [velvet cloak] GetIt [dumb gizmo] PrintMessage [hang message] TurnFlagOn [cloak hung] DoneWithTurn END_COMMAND COMMAND READ MESSAGE AtLocation [Foyer Bar] Present [dumb gizmo] VARIABLEGT [TIME IN BAR] 3 PrintMessage [lose message] EndGame WaitForReturn DoneWithTurn END_COMMAND COMMAND READ MESSAGE AtLocation [Foyer Bar] Present [dumb gizmo] VariableLT [time in bar] 4 PrintMessage [win message] WinGame WaitForReturn DonewithTurn END_COMMAND COMMAND TAKE CLOAK Not IsWearing [Velvet Cloak] or Not IsCarrying [Velvet Cloak] TurnFlagOff [cloak hung] Destroy [dumb gizmo] PrintMessage "You Take the cloak." DonewithTurn END_COMMAND COMMAND WEAR CLOAK Present [velvet cloak] Not IsWearing [Velvet Cloak] Destroy [dumb gizmo] WearIt [velvet cloak] PrintMessage "You wear the cloak" TurnFlagOff [cloak hung] DoneWithTurn END_COMMAND MESSAGE [cloak-hook hung] It's just a small brass hook, screwed into the wall. Your velvet cloak is now hung up on it. END_MESSAGE MESSAGE [cloak-hook unhung] It's just a small brass hook, screwed into the wall. END_MESSAGE MESSAGE [hang message] You hang the cloak on the hook. END_MESSAGE MESSAGE [no travel] You've only just arrived, and besides, the weather outside seems to be getting worse. END_MESSAGE MESSAGE [win message] The message, neatly marked in the sawdust, reads... "YOU HAVE WON! ! ! " END_MESSAGE MESSAGE [lose message] The message has been carelessly trampled, making it difficult to read. You can just distinguish the words... "YOU HAVE LOST ! ! !" END_MESSAGE MESSAGE [not here] There is nowhere to hang the cloak at this location ! END_MESSAGE MESSAGE [already hung] The cloak is already hung up! END_MESSAGE