The game is defined in three files. cloak.acd is a generic top-level program, while cldefs.acd and clcode.acd contain the actual source.
DBNAME cloakdb * * First, the definitions * INCLUDE SKDEF INCLUDE SKVAR INCLUDE SKTEXT INCLUDE cldefs * * Now the code * INCLUDE SKPLACE INCLUDE SKOBJECT INCLUDE SKVERB INCLUDE SKPROC INCLUDE SKACTION INCLUDE SKAT INCLUDE SKINIT INCLUDE clcode * * And the main loop. * INCLUDE SKMAIN
TEXT HERE.WE.ARE / The Cloak of Darkness Hurrying through the rainswept November night, you're glad that there aren't more people about but, hey, what do you expect in a cheap demo game...? TEXT NO.GO.OUT You've only just arrived, and besides, the weather outside seems to be getting worse. TEXT CLOAK.HUNG You hang the cloak on the hook. TEXT THE.OUTCOME The message[ has been carelessly trampled, making it difficult to read. You can just distinguish the words.../, neatly marked in the sawdust, reads...] / YOU HAVE [LOST/WON] !!! TEXT NO.HANG.CLOAK There is nowhere to hang the cloak around here! TEXT ITS.ALREADY.HANGING The cloak is already hung up! TEXT MIGHT.DISTURB.THINGS I have a better idea: let's get out of here before you disturb anything. TEXT NO.DROP.CLOAK On reflection, you decide the floor is not a fitting place for such a handsome piece of clothing, and so you pick it up again. PLACE +HALL You are in the hall. %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. PLACE CLOAKROOM You are in the 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. PLACE +BAR You are in the 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. OBJECT HOOK, =BRASS, PEG %There is a brass hook here. &It's just a small brass hook, screwed into the wall.[/ Your velvet cloak is now hung upon it.] OBJECT CLOAK, =VELVET, =HANDSOME !`A velvet cloak %A black velvet cloak hangs on the hook. &It is 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. OBJECT MESSAGE, SAWDUST, FLOOR * VERB HANG * STATE 1, HUNG
AT BAR MOVE N, OUT, HALL, HALL BIT HERE, LIT IFKEY LOOK OR IFKEY READ AND IFKEY MESSAGE SAY THE.OUTCOME, MESSAGE CALL FINIS FIN ELSE SUB MESSAGE, 1 IFKEY QUIT ELSE QUIP MIGHT.DISTURB.THINGS FIN FIN AT CLOAKROOM MOVE E, OUT, HALL, HALL KEYWORD HANG, CLOAK IFEQ CLOAK, HUNG QUIP ITS.ALREADY.HANGING FIN BIT CLOAK, WORN QUIP REMOVE.IT.FIRST, CLOAK FIN SET CLOAK, HUNG SET HOOK, HUNG DROP CLOAK BIS BAR, LIT BIC BAR, BEEN.HERE QUIP CLOAK.HUNG AT HALL MOVE W, CLOAKROOM MOVE S, BAR ANYOF N, OUT QUIP NO.GO.OUT * * The skeleton does not provide for HANG, so need to add the relevant action. * ACTION HANG CLOAK IFNEAR CLOAK QUIP NO.HANG.CLOAK FIN * INIT APPORT MESSAGE, BAR APPORT HOOK, CLOAKROOM SET MESSAGE, 3 BIS MESSAGE, FEATURE BIS CLOAK, PORTABLE BIS CLOAK, WEARABLE BIS CLOAK, WORN GET CLOAK BIS HALL, LIT BIS CLOAKROOM, LIT GOTO HALL SAY HERE.WE.ARE * REPEAT IFHERE CLOAK AND NOT IFEQ CLOAK, HUNG SAY NO.DROP.CLOAK GET CLOAK FIN