home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / World_Of_Computer_Software-02-385-Vol-1of3.iso / t / tads2doc.zip / GOLDSKUL.T < prev    next >
Text File  |  1992-11-09  |  2KB  |  60 lines

  1. /* Copyright (c) 1992 by Michael J. Roberts.  All Rights Reserved. */
  2. /*
  3.     This file contains the sample game described in TADS.DOC, and
  4.     chapter 1 of the TADS Author's Manual.  The finished game, with the
  5.     complete "gold skull" puzzle, is included here.  
  6. */
  7.  
  8. /* This is a comment, just like in C */
  9. #include <adv.t>              /* read basic adventure game definitions file */
  10. #include <std.t>                   /* read starting standard functions file */
  11.  
  12. startroom: room                      /* the game always starts in startroom */
  13.    sdesc = "Outside cave"              /* the Short DESCription of the room */
  14.    ldesc = "You're standing in the bright sunlight just
  15.             outside of a large, dark, forboding cave, which
  16.             lies to the north."
  17.    north = cave                 /* the room called "cave" lies to the north */
  18. ;
  19.  
  20. cave: room
  21.    sdesc = "Cave"
  22.    ldesc = "You're inside a dark and musty cave.  Sunlight
  23.             pours in from a passage to the south."
  24.    south = startroom
  25. ;
  26.  
  27. pedestal: surface, fixeditem
  28.    sdesc = "pedestal"
  29.    noun = 'pedestal'
  30.    location = cave
  31. ;
  32.  
  33. goldSkull: item
  34.    sdesc = "gold skull"
  35.    noun = 'skull' 'head'
  36.    adjective = 'gold'
  37.    location = pedestal
  38.    doTake(actor) =
  39.    {
  40.       if (self.location <> pedestal or smallRock.location = pedestal)
  41.       {
  42.          pass doTake;
  43.       }
  44.       else
  45.       {
  46.          "As you lift the skull, a volley of poisonous
  47.          arrows is shot from the walls!  You try to dodge
  48.          the arrows, but they take you by surprise!";
  49.          die();
  50.       }
  51.    }
  52. ;
  53.  
  54. smallRock: item
  55.    sdesc = "small rock"
  56.    noun = 'rock'
  57.    adjective = 'small'
  58.    location = cave
  59. ;
  60.