# $Id: by-hand.sac,v 1.1 2002/12/24 10:23:00 mike Exp $ # # coc.sa - Scott Adams source file for _The Causes of Chaos_ # # This is a (so far partial) re-implementation of my 1985 adventure # _The Causes of Chaos_, originally written in BASIC for the Commodore # 64. I want to build at least a little chunk of it as a Scott Adams # data file, just prove the SA compiler I'm writing. # # The syntax should be more or less left-explanatory, but see # http://www.miketaylor.org.uk/tech/advent/sac/ # for more on the Scott Adams compiler. # ---------------------------------------------------------------------------- # Global configuration %ident 18399 %version 1 %wordlen 3 %maxload 6 %start nlake %treasury - # special room-name means "carried" # %lighttime is irrelevant: there are no dark areas in this game # Standard synonyms %valias enter go %valias go run %valias walk enter %valias take get %valias leave drop # ---------------------------------------------------------------------------- # Infrastructure actions (I don't think any game would ever omit these) %action inventory %result inventory %action take inventory %result inventory %action score %result score %action save game %result save_game %occur !flag 1 %result set_flag 1 msg Welcome to `The Causes of Chaos` msg Written by Mike Taylor in 1984/5, reimplemented 2001/2 msg Version $Id: by-hand.sac,v 1.1 2002/12/24 10:23:00 mike Exp $ msg ... This is VERY embryonic, not really worth playing yet. nl msg Your task is to reunite the six crown jewels of Ix: msg silver chain, goblet, ruby, medallion, crown and sceptre. msg See http://www.miketaylor.org.uk/tech/advent/coc/ for more info. # ---------------------------------------------------------------------------- # Use of flags # flag 1: Set forever once welcome message has been printed. # flag 2: Set on "throw axe" until "at what?" is answered. # flag 3: Set on "tie rope" until "to what?" is answered. # # Use of saved locations # location 1: ### not yet # # Use of counters: # counter 1: ### not yet # ---------------------------------------------------------------------------- # Rooms, Items and associated Actions # Items listed before first room are not initially in the game %item barrel_worn a large sturdy Barrel (which you are wearing) %room nlake You're to the North of a very wide lake. The ground is very soft here. %exit e nriver %exit n outcrop %exit w waterfall %item gauntlets *a pair of brown leather Gauntlets* %getdrop gauntlets %item lake a vast Lake stretching out of sight %item bucket a sturdy wooden Bucket %getdrop bucket %room nriver You're to the North of a fast-flowing river which feeds a lake. %exit w nlake %item river a fast-flowing River to the South %item barrel a large sturdy Barrel %getdrop barrel %room waterfall You're by a huge waterfall which plunges majestically over a cliff. %exit e nlake %exit n cliff # Note that it's OK for objects to share names with locations. This # works in the Scott Adams compiler "sac" because the notions of # location and object are so separate. It may not be wise, though, # since it will give problems if this game definition is ported to # more homogenous system such as Herring where location/object # distinctions are blurred. # %item waterfall a vast crashing Waterfall %room cliff You're standing at the top of a cliff with a 2000 feet drop straight down. %exit s waterfall %exit e outcrop %item telescope a Telescope, mounted on a podium %room outcrop You're standing by a rocky outcrop, near to an ornately carved door. %exit s nlake %exit w cliff %item door a locked wooden Door %item steps a set of slimy Steps cut into the rock %item rod a short iron Rod %getdrop rod %room bottom You're at the bottom of a huge waterfall which roars deafeningly. %exit u waterfall # not yet: %exit n beach %item potion a leather bottle containing a Potion %getdrop potion %item cloak a heavy elven Cloak %getdrop cloak %action go waterfall at waterfall carried barrel_worn %result moveto bottom %action go waterfall at waterfall %result msg You crash downwards to your doom ... msg Your character is dead. game_over # We'd like to say you can wear the barrel without having to pick it # up first, but then we'd have to walk through a logic maze to check # that we're not already carrying %maxload items in that case. Much # easier just to require that it's already being carried %action wear barrel carried barrel %result destroy barrel get barrel_worn msg OK. %action remove barrel carried barrel_worn %result destroy barrel_worn get barrel msg OK. %action examine gauntlets accessible gauntlets %result msg OK. msg They fit your hands. %action examine river accessible river %result msg OK. msg It flows strongly to the West. %action examine telescope accessible telescope %result msg OK. msg Looking through it, you can see the sea. msg Beyond that is a dark forest, in which msg you can just make out a castle. %action examine door accessible door %result msg OK. msg Through the keyhole, you see a maze! %action examine steps accessible steps %result msg OK. msg They are covered with slime! %action examine %result msg OK. msg You see nothing special. # ---------------------------------------------------------------------------- # Postamble actions (must fire after body actions) %action help %result msg Sorry - I can't help you. %action examine %result msg OK. msg You see nothing special. %action wait %result msg OK. msg Time passes ... %action panic %result msg OK. msg `Yaaaaaaaarrrrgh!` msg Nothing happens ... %action jump %result msg Wheeeee! %action say %result msg OK print_noun nl msg Nothing happens ...