home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / tads2os2.zip / GOLDSKUL.T < prev    next >
Text File  |  1995-10-28  |  2KB  |  61 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.    isListed = true
  32. ;
  33.  
  34. goldSkull: item
  35.    sdesc = "gold skull"
  36.    noun = 'skull' 'head'
  37.    adjective = 'gold'
  38.    location = pedestal
  39.    doTake(actor) =
  40.    {
  41.       if (self.location <> pedestal or smallRock.location = pedestal)
  42.       {
  43.          pass doTake;
  44.       }
  45.       else
  46.       {
  47.          "As you lift the skull, a volley of poisonous
  48.          arrows is shot from the walls!  You try to dodge
  49.          the arrows, but they take you by surprise!";
  50.          die();
  51.       }
  52.    }
  53. ;
  54.  
  55. smallRock: item
  56.    sdesc = "small rock"
  57.    noun = 'rock'
  58.    adjective = 'small'
  59.    location = cave
  60. ;
  61.