Home » Archimedes archive » Acorn User » AU 1995-04.adf » !StarInfo_StarInfo » Miskin/!CompInfo/Zcode/h/VERBLIB
Miskin/!CompInfo/Zcode/h/VERBLIB
This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.
Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.
Tape/disk: | Home » Archimedes archive » Acorn User » AU 1995-04.adf » !StarInfo_StarInfo |
Filename: | Miskin/!CompInfo/Zcode/h/VERBLIB |
Read OK: | ✔ |
File size: | 9A3E bytes |
Load address: | 0000 |
Exec address: | 0000 |
File contents
! ---------------------------------------------------------------------------- ! VERBLIB: A library of standard verb routines which run the universe... ! ! Supplied for use with Inform 5 Serial number 941007 ! Release 5/5 ! (c) Graham Nelson, 1993/4, but freely usable ! ! The actions provided are: ! ! Quit, Restart, Restore, Verify, Save, ScriptOn/Off, NotifyOn/Off, ! Verbose, etc., ! Inv, Take, Drop, Remove, PutOn, Insert, Transfer, Empty, ! Enter, Exit, GetOff, Go, Look, Examine, Give, Show, ! Unlock, Lock, SwitchOn, SwitchOff, Open, Close, Disrobe, Wear, Eat; ! ! and routines for verbs which by default only print a suitable reply: ! ! Yes, No, Burn, Pray, Wake, WakeOther [person], ! Kiss, Think, Smell, Listen, Taste, Touch, TouchThing, Dig, ! Cut, Jump [jump on the spot], JumpOver, Tie, Drink, ! Fill, Sorry, Strong [swear word], Mild [swear word], Attack, Swim, ! Swing [something], Blow, Rub, Set, SetTo, WaveHands [ie, just "wave"], ! Wave [something], Pull, Push, PushDir [push something in a direction], ! Turn, Squeeze, LookUnder [look underneath something], Search, ! ThrowAt, Answer, Buy, Ask, Sing, Climb, Wait, Sleep, Consult ! ! and the following routines may be of particular use: ! ! EnglishNumber Print out a number in English (lower case) ! WriteListFrom The amazing list-writer ! PlayerTo Safely move the player somewhere else ! YesOrNo Ask the player a yes/no question, returning true if yes ! ! ---------------------------------------------------------------------------- ! ---------------------------------------------------------------------------- System_file; Default MAX_CARRIED 100; Default MAX_SCORE 0; Default NUMBER_TASKS 1; Default OBJECT_SCORE 4; Default ROOM_SCORE 5; Default SACK_OBJECT 0; Default AMUSING_PROVIDED 1; Default TASKS_PROVIDED 1; ! ---------------------------------------------------------------------------- ! First, printing a number n in English. ! It's this sort of thing which makes you realise just what an irregular ! language English is... ! ---------------------------------------------------------------------------- [ EnglishNumber n m; if (n==0) { print "zero"; rfalse; } if (n<0) { print "minus "; n=-n; } if (n>=100) { EnglishNumber(n/100); n=n%100; if (n==0) rfalse; print " and "; ! Americans may want to delete this line } if (n<10) { EnglishDigit(n); rfalse; } if (n>=20) { m=n/10; if (m==2) print "twenty"; if (m==3) print "thirty"; if (m==4) print "fourty"; if (m==5) print "fifty"; if (m==6) print "sixty"; if (m==7) print "seventy"; if (m==8) print "eighty"; if (m==9) print "ninety"; if (n%10==0) rfalse; print "-"; EnglishDigit(n%10); rfalse; } if (n==10) { print "ten"; rfalse; } if (n==11) { print "eleven"; rfalse; } if (n==12) { print "twelve"; rfalse; } if (n==13) { print "thirteen"; rfalse; } if (n==14) { print "fourteen"; rfalse; } if (n==15) { print "fifteen"; rfalse; } if (n==16) { print "sixteen"; rfalse; } if (n==17) { print "seventeen"; rfalse; } if (n==18) { print "eighteen"; rfalse; } print "nineteen"; ]; [ EnglishDigit n; if (n==1) { print "one"; rfalse; } if (n==2) { print "two"; rfalse; } if (n==3) { print "three"; rfalse; } if (n==4) { print "four"; rfalse; } if (n==5) { print "five"; rfalse; } if (n==6) { print "six"; rfalse; } if (n==7) { print "seven"; rfalse; } if (n==8) { print "eight"; rfalse; } if (n==9) { print "nine"; rfalse; } ]; ! ---------------------------------------------------------------------------- ! Next the WriteListFrom routine, a flexible object-lister taking care of ! plurals, inventory information, various formats and so on. This is used ! by everything in the library which ever wants to list anything. ! ! If there were no objects to list, it prints nothing and returns false; ! otherwise it returns true. ! ! o is the object, and style is a bitmap, whose bits are given by: ! ---------------------------------------------------------------------------- Constant NEWLINE_BIT 1; ! New-line after each entry Constant INDENT_BIT 2; ! Indent each entry by depth Constant FULLINV_BIT 4; ! Full inventory information after entry Constant ENGLISH_BIT 8; ! English sentence style, with commas and and Constant RECURSE_BIT 16; ! Recurse downwards with usual rules Constant ALWAYS_BIT 32; ! Always recurse downwards Constant TERSE_BIT 64; ! More terse English style Constant PARTINV_BIT 128; ! Only brief inventory information after entry Constant DEFART_BIT 256; ! Use the definite article in list Constant WORKFLAG_BIT 512; ! At top level (only), only list objects ! which have the "workflag" attribute global c_style; [ NextEntry o depth; o=sibling(o); if (depth>0 || c_style & WORKFLAG_BIT == 0) return o; while (o~=0 && o hasnt workflag) o=sibling(o); return o; ]; [ WillRecurs o; if (c_style & ALWAYS_BIT ~= 0) rtrue; if (c_style & RECURSE_BIT == 0) rfalse; if (o has transparent || o has supporter || (o has container && o has open)) rtrue; rfalse; ]; [ ListEqual o1 o2; if (child(o1)~=0 && WillRecurs(o1)~=0) rfalse; if (child(o2)~=0 && WillRecurs(o2)~=0) rfalse; if (c_style & (FULLINV_BIT + PARTINV_BIT) ~= 0) { if ((o1 hasnt worn && o2 has worn) || (o2 hasnt worn && o1 has worn)) rfalse; if ((o1 hasnt light && o2 has light) || (o2 hasnt light && o1 has light)) rfalse; } return Identical(o1,o2); ]; [ WriteListFrom o style depth; c_style=style; if (style & WORKFLAG_BIT ~= 0) { while (o~=0 && o hasnt workflag) o=sibling(o); } if (o==0) rfalse; WriteListR(o,depth); rtrue; ]; [ WriteListR o depth stack_pointer classes_p sizes_p i j k l m n; classes_p = match_classes + stack_pointer; sizes_p = match_list + stack_pointer; for (i=o,j=0:i~=0 && (j+stack_pointer)<128:i=NextEntry(i,depth),j++) { classes_p->j=0; if (i.plural~=0) k++; } ! print "(",j," obj; sp=",stack_pointer,") "; stack_pointer = stack_pointer+j+1; if (k<2) jump EconomyVersion; ! It takes two to plural n=1; for (i=o,k=0:k<j:i=NextEntry(i,depth),k++) if (classes_p->k==0) { classes_p->k=n; sizes_p->n=1; for (l=NextEntry(i,depth), m=k+1:l~=0 && m<j: l=NextEntry(l,depth), m++) if (classes_p->m==0 && i.plural~=0 && l.plural~=0) { if (ListEqual(i,l)==1) { sizes_p->n = sizes_p->n + 1; classes_p->m = n; } } n++; } n--; ! print "List of ", n, "^"; ! for (i=1:i<=n:i++) print "Class ", i, " has ", sizes_p->i, ".^"; ! for (i=o,j=0:i~=0 && j<64:i=NextEntry(i,depth),j++) ! print object i, " in class ", classes_p->j, "^"; for (i=1, j=o, k=0: i<=n: i++) { while (((classes_p->k) ~= i) && ((classes_p->k) ~= -i)) { k++; j=NextEntry(j,depth); } m=sizes_p->i; WriteBeforeEntry(j,depth); if (m==1) { if (c_style & DEFART_BIT ~= 0) DefArt(j); else InDefArt(j); } else { if (c_style & DEFART_BIT ~= 0) print "the "; EnglishNumber(m); print " "; if ((j.plural-#strings_offset)>=0) print_paddr j.plural; else RunRoutines(j,plural); } WriteAfterEntry(j,depth,stack_pointer); if (c_style & ENGLISH_BIT ~= 0) { if (i==n-1) print " and "; if (i<n-1) print ", "; } } rtrue; .EconomyVersion; n=j; for (i=1, j=o: i<=n: j=NextEntry(j,depth), i++) { WriteBeforeEntry(j,depth); if (c_style & DEFART_BIT ~= 0) DefArt(j); else InDefArt(j); WriteAfterEntry(j,depth,stack_pointer); if (c_style & ENGLISH_BIT ~= 0) { if (i==n-1) print " and "; if (i<n-1) print ", "; } } ]; [ WriteBeforeEntry o depth flag; if (c_style & INDENT_BIT ~= 0) spaces 2*depth; if (c_style & FULLINV_BIT ~= 0) { if (o.invent~=0) { if ((o.invent-#strings_offset) >= 0) { print_paddr o.invent; flag=1; } else { inventory_stage=1; flag=RunRoutines(o,invent); } } } return flag; ]; [ WriteAfterEntry o depth stack_p flag; if (c_style & PARTINV_BIT ~= 0) { if (o has light && location hasnt light) print " (providing light)"; if (o has container && o hasnt open) print " (which is closed)"; if ((o has container && (o has open || o has transparent)) && (child(o)==0)) print " (which is empty)"; } if (c_style & FULLINV_BIT ~= 0) { if (o.invent ~= 0) { inventory_stage=2; if (RunRoutines(o,invent)~=0) { if (c_style & NEWLINE_BIT ~= 0) new_line; rtrue; } } if (o has light) print " (providing light)"; if (o has worn) print " (being worn)"; if (o has container) { print " (which is "; if (o has open) { print "open"; if (child(o)==0) print " but empty"; } else print "closed"; if (o has lockable && o has locked) print " and locked"; print ")"; } } if (c_style & ALWAYS_BIT ~= 0 && child(o)~=0) { if (c_style & ENGLISH_BIT ~= 0) print " containing "; flag=1; } if (c_style & RECURSE_BIT ~= 1 && child(o)~=0) { if (o has supporter) { if (c_style & ENGLISH_BIT ~= 0) { if (c_style & TERSE_BIT ~= 0) print " (on "; else print ", on top of "; if (o has animate) print "whom "; else print "which "; } flag=1; } if (o has container && (o has open || o has transparent)) { if (c_style & ENGLISH_BIT ~= 0) { if (c_style & TERSE_BIT ~= 0) print " (in "; else print ", inside "; if (o has animate) print "whom "; else print "which "; } flag=1; } } if (flag==1 && c_style & ENGLISH_BIT ~= 0) { if (children(o) > 1) print "are "; else print "is "; } if (c_style & NEWLINE_BIT ~= 0) new_line; if (flag==1) WriteListR(child(o),depth+1,stack_p); if (flag==1 && c_style & TERSE_BIT ~= 0) print ")"; ]; ! ---------------------------------------------------------------------------- ! A cunning routine (which could have been a daemon, but isn't, for the ! sake of efficiency) to move objects which could be in many rooms about ! so that the player never catches one not in place ! ---------------------------------------------------------------------------- [ MoveFloatingObjects place i k l address; for (i=selfobj+1: i<=top_object: i++) { address=i.&found_in; if (address~=0 && i hasnt absent) { k=i.#found_in; for (l=0: l<k/2: l++) if (place==address-->l) move i to place; } } ]; ! ---------------------------------------------------------------------------- ! Two little routines for moving the player safely. ! ---------------------------------------------------------------------------- [ PlayerTo newplace flag; move player to newplace; location=newplace; real_location=location; AdjustLight(1); if (flag==0) <Look>; ]; [ MovePlayer direc; <Go direc>; <Look>; ]; ! ---------------------------------------------------------------------------- ! The handy YesOrNo routine, and some "meta" verbs ! ---------------------------------------------------------------------------- [ YesOrNo i; for (::) { read buffer parse; i=parse-->1; if (i=='yes' or #n$y) rtrue; if (i=='no' or #n$n) rfalse; print "Please answer yes or no.> "; } ]; [ QuitSub; print "Are you sure you want to quit? "; if (YesOrNo()~=0) quit; ]; [ RestartSub; print "Are you sure you want to restart? "; if (YesOrNo()~=0) { restart; "Failed."; } ]; [ RestoreSub; restore Rmaybe; "Restore failed."; .RMaybe; print "Ok.^"; ]; [ SaveSub; save Smaybe; "Save failed."; .Smaybe; print "Ok.^"; ]; [ VerifySub; verify Vmaybe; jump Vwrong; .Vmaybe; "The game file has verified as intact."; .Vwrong; "The game file did not verify properly, and may be corrupted \ (unless you are running it on a primitive interpreter which \ does not properly implement the VERIFY code)."; ]; [ ScriptOnSub; if (transcript_mode==1) "Transcripting is already on."; transcript_mode=1; 0-->8 = (0-->8)|1; print "Start of a transcript of^"; Banner(); ]; [ ScriptOffSub; if (transcript_mode==0) "Transcripting is already off."; print "^End of transcript.^"; transcript_mode=0; 0-->8 = (0-->8)&$fffe; ]; [ NotifyOnSub; notify_mode=1; "Score notification on."; ]; [ NotifyOffSub; notify_mode=0; "Score notification off."; ]; ! ---------------------------------------------------------------------------- ! The scoring system ! ---------------------------------------------------------------------------- #IFNDEF task_scores; Global task_scores initial 0; #ENDIF; [ ScoreSub; if (deadflag==0) print "You have so far scored "; else print "In that game you scored "; print score, " out of a possible ", MAX_SCORE, ", in ", turns, " turns"; PrintRank(); ]; Global task_done data NUMBER_TASKS; [ Achieved num; if (task_done->num==0) { task_done->num=1; score=score+task_scores->num; } ]; [ PANum m n; print " "; n=m; if (n<0) { n=-m; n=n*10; } if (n<10) { print " "; jump panuml; } if (n<100) { print " "; jump panuml; } if (n<1000) { print " "; } .panuml; print m, " "; ]; [ FullScoreSub i; ScoreSub(); if (score==0 || TASKS_PROVIDED==1) rfalse; new_line; if (deadflag==0) print "The score is "; else print "The score was "; print "made up as follows:^^"; for (i=0:i<NUMBER_TASKS:i++) if (task_done->i==1) { PANum(task_scores->i); PrintTaskName(i); } if (things_score~=0) { PANum(things_score); print "finding sundry items^"; } if (places_score~=0) { PANum(places_score); print "visiting various places^"; } new_line; PANum(score); print "total (out of ", MAX_SCORE, ")^"; ]; ! ---------------------------------------------------------------------------- ! Real verbs start here: Inventory ! ---------------------------------------------------------------------------- global inventory_style; [ InvWideSub; inventory_style = FULLINV_BIT + ENGLISH_BIT + RECURSE_BIT; <Inv>; ]; [ InvTallSub; inventory_style = FULLINV_BIT + INDENT_BIT + NEWLINE_BIT + RECURSE_BIT; <Inv>; ]; [ InvSub; if (child(player)==0) "You are carrying nothing."; if (inventory_style==0) <<InvTall>>; print "You are carrying"; if (inventory_style & NEWLINE_BIT ~= 0) print ":^"; else print " "; WriteListFrom(child(player), inventory_style, 1); if (inventory_style & ENGLISH_BIT ~= 0) print ".^"; AfterRoutines(); ]; ! ---------------------------------------------------------------------------- ! Object movement verbs ! ---------------------------------------------------------------------------- [ TakeSub; if (onotheld_mode==0 || parent(noun)~=player) { if (location==thedark) { if (RTakeSub(real_location)~=0) rtrue; } else { if (RTakeSub(location)~=0) rtrue; } } if (AfterRoutines()==1) rtrue; notheld_mode=onotheld_mode; if (notheld_mode==0) print "Taken.^"; ]; [ RTakeSub fromobj i j k postonobj; if (noun==player) "As the bishop said to the actress."; if (noun has animate) { print "I don't suppose "; DefArt(noun); " would care for that."; } i=parent(noun); if (i==player) "You already have that."; if (i has container || i has supporter) { postonobj=i; k=action; action=##LetGo; if (RunRoutines(i,before)~=0) { action=k; rtrue; } action=k; } while (i~=fromobj) { if (i hasnt container && i hasnt supporter) { if (i has animate) { print "That seems to belong to "; DefArt(i); "."; } if (i has transparent) { print "That seems to be part of "; DefArt(i); "."; } "That isn't available."; } if (i has container && i hasnt open) { print "Unfortunately "; DefArt(i); " isn't open."; } i=parent(i); if (i==player) i=fromobj; } if (noun has scenery) "That's hardly portable."; if (noun has static) "Fixed in place."; k=0; objectloop (j in player) if (j hasnt worn) k++; if (k >= player.capacity) { if (SACK_OBJECT~=0) { if (parent(SACK_OBJECT)~=player) "You're carrying too many things already."; j=0; objectloop (k in player) if (k~=SACK_OBJECT && k hasnt worn && k hasnt light) j=k; if (j~=0) { print "(putting "; DefArt(j); print " into "; DefArt(SACK_OBJECT); print " to make room)^"; move j to SACK_OBJECT; } else "You're carrying too many things already."; } else "You're carrying too many things already."; } move noun to player; if (postonobj~=0) { k=action; action=##LetGo; if (RunRoutines(postonobj,after)~=0) { action=k; rtrue; } action=k; } rfalse; ]; [ DropSub i; i=parent(noun); if (i==location) "Already on the floor."; if (i~=player) "You haven't got that."; if (noun has worn) { print "(First taking "; DefArt(noun); print " off)^"; <Disrobe noun>; if (noun has worn) rtrue; } move noun to parent(player); if (AfterRoutines()==1) rtrue; print "Dropped.^"; ]; [ RemoveSub i; i=parent(noun); if (i has container && i hasnt open) "Alas, it is closed."; if (i~=second) "But it isn't there now."; if (second has worn) "You'll need to take it off first."; if (RTakeSub(second)~=0) rtrue; action=##Take; if (AfterRoutines()==1) rtrue; action=##Remove; if (AfterRoutines()==1) rtrue; print "Removed.^"; ]; [ PutOnSub; if (second==d_obj) { <Drop noun>; rfalse; } if (parent(noun)~=player) "You need to be holding it before you can put it onto \ something else."; if (second>1) { action=##Receive; if (RunRoutines(second,before)~=0) { action=##PutOn; rtrue; } action=##PutOn; } if (second==noun) "You can't put something on top of itself."; if (second hasnt supporter) { print "Putting things on "; DefArt(second); " would achieve nothing."; } if (parent(second)==player) "You lack the dexterity."; if (noun has worn) { print "(first taking it off)^"; <Disrobe noun>; if (noun has worn) rtrue; } if (children(second)>=prop(second,capacity)) { print "There is no more room on "; DefArt(second); "."; } move noun to second; if (AfterRoutines()==1) rtrue; if (second>1) { action=##Receive; if (RunRoutines(second,after)~=0) { action=##PutOn; rtrue; } action=##PutOn; } if (multiflag==1) "Done."; print "You put "; DefArt(noun); print " on "; DefArt(second); "."; ]; [ InsertSub; if (second==d_obj ) <<Drop noun>>; if (parent(noun)~=player) "You need to be holding it before you can put it into \ something else."; if (second>1) { action=##Receive; if (RunRoutines(second,before)~=0) { action=##Insert; rtrue; } action=##Insert; } if (second hasnt container) "That can't contain things."; if (second hasnt open) "Alas, it is closed."; if (second has worn) "You'll need to take it off first."; if (second==noun) "You can't put something inside itself."; if (noun has worn) { print "(first taking it off)^"; <Disrobe noun>; if (noun has worn) rtrue; } if (children(second)>=prop(second,capacity)) { print "There is no more room in "; DefArt(second); "."; } move noun to second; if (AfterRoutines()==1) rtrue; if (second>1) { action=##Receive; if (RunRoutines(second,after)~=0) { action=##Insert; rtrue; } action=##Insert; } if (multiflag==1) "Done."; print "You put "; DefArt(noun); print " into "; DefArt(second); "."; ]; [ TransferSub i act_needed k postonobj par; act_needed=##Drop; if (second has container) act_needed=##Insert; else if (second has supporter) act_needed=##PutOn; i=parent(noun); if (i~=player) { while (i~=0) { if (i hasnt open) "That isn't in your possession."; i=parent(i); if (i==player) jump DoTransfer; } "First pick that up."; } .DoTransfer; if (noun notin player) { par = parent(noun); if (par has container || par has supporter) { postonobj=par; k=action; action=##LetGo; if (RunRoutines(par,before)~=0) { action=k; rtrue; } action=k; } move noun to player; if (postonobj~=0) { k=action; action=##LetGo; if (RunRoutines(postonobj,after)~=0) { action=k; rtrue; } action=k; } } if (act_needed==##Drop) <<Drop noun>>; if (act_needed==##Insert) <<Insert noun second>>; if (act_needed==##PutOn) <<PutOn noun second>>; ]; [ EmptySub; second=d_obj; EmptyTSub(); ]; [ EmptyTSub i j; if (noun hasnt container) { CDefArt(noun); " can't contain things."; } if (noun hasnt open) { CDefArt(noun); " is closed."; } if (second~=d_obj) { if (second hasnt container) { CDefArt(second); " can't contain things."; } if (second hasnt open) { CDefArt(second); " is closed."; } } i=child(noun); if (i==0) { DefArt(noun); " is empty already."; } while (i~=0) { j=sibling(i); PrintShortName(i); print ": "; <Transfer i second>; i=j; } ]; [ GiveSub; if (parent(noun)~=player) { print "You aren't holding "; DefArt(noun); "."; } if (second==player) { print "You juggle "; DefArt(noun); " for a while, but don't achieve much."; } if (RunLife(second,##Give)~=0) rfalse; CDefArt(second); " doesn't seem interested."; ]; [ GiveRSub; <Give second noun>; ]; [ ShowSub; if (parent(noun)~=player) { print "You aren't holding "; DefArt(noun); "."; } if (second==player) <<Examine noun>>; if (RunLife(second,##Show)~=0) rfalse; CDefArt(second); " is unimpressed."; ]; [ ShowRSub; <Show second noun>; ]; ! ---------------------------------------------------------------------------- ! Travelling around verbs ! ---------------------------------------------------------------------------- [ EnterSub i; if (noun has door) <<Go noun>>; i=parent(player); if (i~=location) { print "But you're already in "; DefArt(i); "."; } if (noun hasnt enterable) "A surreal idea."; i=parent(noun); if (i==compass) <<Go noun>>; if (i~=location) "You can only get into something on the floor."; move player to noun; print "You get into "; DefArt(noun); print ".^"; Locale(noun); ]; [ GetOffSub; if (parent(player)==noun) <<Exit>>; print "But you aren't on "; DefArt(noun); " at the moment."; ]; [ ExitSub; if (parent(player)==location || (location==thedark && parent(player)==real_location)) { if (location.out_to~=0) <<Go out_obj>>; "But you're aren't in anything at the moment."; } move player to location; print "You are on your own two feet again.^"; LookSub(1); AfterRoutines(); ]; [ VagueGoSub; "You'll have to say which compass direction to go in."; ]; [ GoInSub; <<Go in_obj>>; ]; [ GoSub i j df movewith thedir; movewith=0; i=parent(player); if ((location~=thedark && i~=location) || (location==thedark && i~=real_location)) { j=location; location=real_location; if (RunRoutines(i,before)~=0) { movewith=i; i=parent(i); location=j; jump gotroom; } location=j; print "You'll have to get "; if (i has supporter) print "off "; else print "out of "; DefArt(i); " first."; } .gotroom; thedir=noun.door_dir; if ((thedir-#code_offset)>=0) thedir=RunRoutines(noun,door_dir); j=i.thedir; if (j>#largest_object) { if ((j-#strings_offset)>=0) { print_paddr j; new_line; rfalse; } j=RunRoutines(i,thedir); if (j==1) rtrue; } if (j==0) { j=i.cant_go; if ((j-#strings_offset)>=0) print_paddr j; else RunRoutines(i,cant_go); new_line; rfalse; } if (j has door) { if (j has concealed) "You can't go that way."; if (j hasnt open) { if (noun==u_obj) { print "You are unable to climb "; Defart(j); "."; } if (noun==d_obj) { print "You are unable to descend "; Defart(j); "."; } print "You can't, since "; Defart(j); " is in the way."; } if ((j.door_to-#code_offset)>=0) j=RunRoutines(j,door_to); else j=j.door_to; if (j==0) { print "You can't, since "; Defart(j); " leads nowhere."; } } if (movewith==0) move player to j; else move movewith to j; df=OffersLight(j); if (df~=0) { location=j; lightflag=1; } else { if (location==thedark) DarkToDark(); real_location=j; location=thedark; lightflag=0; } if (LAfterRoutines()==1) rtrue; LookSub(1); ]; ! ---------------------------------------------------------------------------- ! Describing the world. SayWhatsOn(object) does just that (producing ! foolish output if nothing is). Locale(object) runs through the "tail end" ! of a Look-style room description for the contents of the object, printing ! up suitable descriptions as it goes. ! ---------------------------------------------------------------------------- [ SayWhatsOn descon k; if (descon==parent(player)) rfalse; print "^On "; DefArt(descon); k=children(descon); if (k==1) print " is "; else print " are "; WriteListFrom(child(descon), ENGLISH_BIT + RECURSE_BIT + PARTINV_BIT + TERSE_BIT); print ".^"; ]; [ Locale descin o p k j flag f2; objectloop (o in descin) give o ~workflag; k=0; objectloop (o in descin) if (o hasnt concealed && o~=parent(player)) { if (o hasnt scenery) { give o workflag; k++; p=initial; f2=0; if (o has door && o hasnt open) { p=when_closed; f2=1; } if (o has switchable && o hasnt on) { p=when_off; f2=1; } if (o has container && o hasnt open && o.&when_closed~=0) { p=when_closed; f2=1; } if (o hasnt moved || o.describe~=$ffff || f2==1) { if (o.describe~=$ffff && RunRoutines(o,describe)~=0) { flag=1; give o ~workflag; k--; } else { j=o.p; if (j~=0) { new_line; if ((j-#strings_offset)>=0) print_paddr j; else RunRoutines(o,p); new_line; flag=1; give o ~workflag; k--; if (o has supporter && child(o)~=0) SayWhatsOn(o); } } } } else if (o has supporter && child(o)~=0) SayWhatsOn(o); } if (k==0) return; if (descin~=location) { print "^In "; DefArt(descin); print " you"; } else print "^You"; print " can "; if (flag==1) print "also "; print "see "; WriteListFrom(child(descin), ENGLISH_BIT + WORKFLAG_BIT + RECURSE_BIT + PARTINV_BIT + TERSE_BIT); if (descin~=location) print ".^"; if (descin==location) print " here.^"; ]; ! ---------------------------------------------------------------------------- ! Looking. LookSub(1) is allowed to abbreviate long descriptions, but ! LookSub(0) (which is what happens when the Look action is generated) ! isn't. (Except that these are over-ridden by the player-set lookmode.) ! ---------------------------------------------------------------------------- [ LMode1Sub; lookmode=1; print_paddr #Story; " is now in its normal ~brief~ printing mode, which gives \ long descriptions of \ places never before visited and short descriptions otherwise."; ]; [ LMode2Sub; lookmode=2; print_paddr #Story; " is now in its ~verbose~ mode, which always gives long \ descriptions of locations (even if you've been there before)."; ]; [ LMode3Sub; lookmode=3; print_paddr #Story; " is now in its ~superbrief~ mode, which always gives short \ descriptions of locations (even if you haven't been there \ before)."; ]; [ LookSub allow_abbrev i descin j; descin=location; if (descin~=lastdesc) { j=descin.initial; if ((j-#strings_offset)>0) print_paddr j; else { if (j>0 && RunRoutines(descin,initial)~=0) NewRoom(); } MoveFloatingObjects(location); } new_line; #IFV5; style bold; #ENDIF; PrintShortName(location); #IFV5; style roman; #ENDIF; i=parent(player); if (location~=thedark && i~=location) { if (i has supporter) print " (on "; else print " (in "; DefArt(i); print ")"; descin=i; } if (print_player_flag==1) print " (as ", object player, ")"; new_line; if (lookmode<3) { if ((allow_abbrev~=1) || (lookmode==2) || (location hasnt visited)) { if (location.describe~=$ffff) RunRoutines(location,describe); else { j=location.description; if ((j-#strings_offset)>0) { print_paddr j; new_line; } else RunRoutines(location,description); } } } if (location hasnt visited) { give location visited; if (location has scored) { score=score+ROOM_SCORE; places_score=places_score+ROOM_SCORE; } } if (descin~=location) Locale(location); Locale(descin); LookRoutine(); action=##Look; if (LAfterRoutines()==1) rtrue; ]; [ ExamineSub i; if (location==thedark) "Darkness, noun. An absence of light to see by."; i=noun.description; if (i==0) { if (noun has container) { SearchSub(); rfalse; } print "You see nothing special about "; Defart(noun); "."; } if ((i-#strings_offset)>0) { print_paddr i; new_line; } else RunRoutines(noun,description); if (noun has switchable) { print "It is currently switched "; if (noun has on) print "on.^"; else print "off.^"; } if (AfterRoutines()==1) rtrue; ]; [ LookUnderSub; if (location==thedark) "But it's dark."; "You find nothing of interest."; ]; [ SearchSub i; if (location==thedark) "But it's dark."; if (noun has supporter) { i=children(noun); if (i==0) { print "There is nothing on "; DefArt(noun); "."; } print "On "; DefArt(noun); if (i>1) print " are "; else print " is "; WriteListFrom(child(noun), TERSE_BIT + ENGLISH_BIT); "."; } if (noun hasnt container) "You find nothing of interest."; if (noun hasnt transparent && noun hasnt open) "You can't see inside, since it is closed."; if (AfterRoutines()==1) rtrue; i=children(noun); if (i==0) { CDefArt(noun); " is empty."; } print "In "; DefArt(noun); if (i>1) print " are "; else print " is "; WriteListFrom(child(noun), TERSE_BIT + ENGLISH_BIT); "."; ]; ! ---------------------------------------------------------------------------- ! Verbs which change the state of objects without moving them ! ---------------------------------------------------------------------------- [ UnlockSub; if (noun hasnt lockable) "I can't see how to unlock that."; if (noun hasnt locked) "It is in fact unlocked now."; if (noun.with_key~=second) "That doesn't seem to fit the lock."; give noun ~locked; if (AfterRoutines()==1) rtrue; print "You unlock "; DefArt(noun); "."; ]; [ LockSub; if (noun hasnt lockable) "I can't see how to lock that."; if (noun has locked) "It is in fact locked now."; if (noun has open) "First you'll have to close it."; if (noun.with_key~=second) "That doesn't seem to fit the lock."; give noun locked; if (AfterRoutines()==1) rtrue; print "You lock "; DefArt(noun); "."; ]; [ SwitchonSub; if (noun hasnt switchable) "That's not something you can switch."; if (noun has on) "It's already on."; give noun on; if (AfterRoutines()==1) rtrue; print "You switch "; DefArt(noun); " on."; ]; [ SwitchoffSub; if (noun hasnt switchable) "That's not something you can switch."; if (noun hasnt on) "It's already off."; give noun ~on; if (AfterRoutines()==1) rtrue; print "You switch "; DefArt(noun); " off."; ]; [ OpenSub; if (noun hasnt openable) "That's not something you can open."; if (noun has locked) "It seems to be locked."; if (noun has open) "It's already open."; give noun open; if (AfterRoutines()==1) rtrue; print "You open "; DefArt(noun); "."; ]; [ CloseSub; if (noun hasnt openable) "That's not something you can close."; if (noun hasnt open) "It's already closed."; give noun ~open; if (AfterRoutines()==1) rtrue; print "You close "; DefArt(noun); "."; ]; [ DisrobeSub; if (noun hasnt worn) "You're not wearing that."; give noun ~worn; if (AfterRoutines()==1) rtrue; print "You take off "; DefArt(noun); print ".^"; ]; [ WearSub; if (noun hasnt clothing) "You can't wear that!"; if (parent(noun)~=player) "You're not holding that!"; if (noun has worn) "You're already wearing that!"; give noun worn; if (AfterRoutines()==1) rtrue; print "You put on "; DefArt(noun); print ".^"; ]; [ EatSub; if (noun hasnt edible) "No, it's plainly inedible."; remove noun; if (AfterRoutines()==1) rtrue; print "You eat "; DefArt(noun); ". Not bad."; ]; ! ---------------------------------------------------------------------------- ! Verbs which are really just stubs (anything which happens for these ! actions must happen in before rules) ! ---------------------------------------------------------------------------- [ YesSub; "That was a rhetorical question."; ]; [ NoSub; "That was a rhetorical question."; ]; [ BurnSub; "In this game, arson is (usually) forbidden."; ]; [ PraySub; "Spooky! For a moment there, a deep voice seemed \ to say ~you're on your own~."; ]; [ WakeSub; "The dreadful truth is, this is not a dream."; ]; [ WakeOtherSub; "That seems unnecessary."; ]; [ KissSub; if (RunLife(noun,##Kiss)~=0) rfalse; "Keep your mind on the game."; ]; [ ThinkSub; "What a good idea."; ]; [ SmellSub; "You smell nothing unexpected."; ]; [ ListenSub; "You hear nothing unexpected."; ]; [ TasteSub; "You taste nothing unexpected."; ]; [ TouchSub; "You feel nothing unexpected."; ]; [ TouchThingSub; if (noun has animate) "Keep your hands to yourself!"; "You feel nothing unexpected."; ]; [ DigSub; "The ground is unsuitable for digging here."; ]; [ CutSub; "In this game, cutting things up is never helpful."; ]; [ JumpSub; "You jump on the spot, fruitlessly."; ]; [ JumpOverSub; "You would achieve nothing by this."; ]; [ TieSub; "You would achieve nothing by this."; ]; [ DrinkSub; "There's nothing suitable to drink here."; ]; [ FillSub; "But there's no water here to carry."; ]; [ SorrySub; "Oh, don't apologise."; ]; [ StrongSub; "Disgraceful! Once upon a time adventurers had moral standards."; ]; [ MildSub; "Quite."; ]; [ AttackSub; if (noun has animate && RunLife(noun,##Attack)~=0) rfalse; "Violence isn't the answer, you know."; ]; [ SwimSub; "There's not enough water to swim in."; ]; [ SwingSub; "There's nothing sensible to swing here."; ]; [ BlowSub; "You can't usefully blow that."; ]; [ RubSub; "You achieve nothing by this."; ]; [ SetSub; "No, you can't set that."; ]; [ SetToSub; "No, you can't set that to anything."; ]; [ WaveHandsSub; "You wave, feeling foolish."; ]; [ WaveSub; if (parent(noun)~=player) "But you aren't holding that."; print "You look ridiculous waving "; DefArt(noun); "."; ]; [ PullSub; if (noun has static) "It is fixed in place."; if (noun has scenery) "You are unable to."; "Nothing obvious happens."; ]; [ PushSub; if (noun has static) "It is fixed in place."; if (noun has scenery) "You are unable to."; "Nothing obvious happens."; ]; [ AllowPushDir i; if (parent(second)~=compass) "That's not a direction."; if (second==u_obj or d_obj) "Not that way you can't."; AfterRoutines(); i=noun; <Go second>; move i to location; ]; [ PushDirSub; "Is that the best you can think of?"; ]; [ TurnSub; if (noun has static) "It is fixed in place."; if (noun has scenery) "You are unable to."; "Nothing obvious happens."; ]; [ SqueezeSub; if (noun has animate) "Keep your hands to yourself."; "You achieve nothing by this."; ]; [ ThrowAtSub; if (second hasnt animate) "Futile."; if (RunLife(second,##ThrowAt)~=0) rfalse; "You lack the nerve when it comes to the crucial moment."; ]; [ AnswerSub; inp1=special_word; if (RunLife(second,##Answer)~=0) rfalse; "No reply."; ]; [ BuySub; "Nothing is on sale."; ]; [ AskSub; inp1=special_word; if (RunLife(noun,##Ask)~=0) rfalse; "No reply."; ]; [ SingSub; if (random(2)==1) print "Your yodelling "; else print "Your singing "; "is atrocious, if you say so yourself."; ]; [ ClimbSub; "I don't think much is to be achieved by that."; ]; [ WaitSub; if (LAfterRoutines()==1) rtrue; "Time passes."; ]; [ SleepSub; "You must have slept yourself out. \ You certainly aren't drowsy now."; ]; [ ConsultSub; print "There's nothing to be discovered"; if (noun==0) "."; print " by consulting "; DefArt(noun); "."; ]; ! ---------------------------------------------------------------------------- ! Debugging verbs ! ---------------------------------------------------------------------------- #ifdef DEBUG; [ TraceOnSub; parser_trace=1; "Trace on."; ]; [ TraceLevelSub; parser_trace=noun; print "Parser tracing set to level ", parser_trace, ".^"; ]; [ TraceOffSub; parser_trace=0; "Trace off."; ]; [ RoutinesOnSub; debug_flag=debug_flag | 1; "Routine listing on."; ]; [ RoutinesOffSub; debug_flag=debug_flag & 6; "Routine listing off."; ]; [ ActionsOnSub; debug_flag=debug_flag | 2; "Action listing on."; ]; [ ActionsOffSub; debug_flag=debug_flag & 5; "Action listing off."; ]; [ TimersOnSub; debug_flag=debug_flag | 4; "Timers listing on."; ]; [ TimersOffSub; debug_flag=debug_flag & 3; "Timers listing off."; ]; [ XPurloinSub; move noun to player; give noun moved; "Purloined."; ]; [ XAbstractSub; move noun to second; "Abstracted."; ]; [ XObj obj; CDefArt(obj); print " (", obj, ") "; if (child(obj)==0) { new_line; rtrue; } print " contains:^"; WriteListFrom(child(obj), FULLINV_BIT + INDENT_BIT + NEWLINE_BIT + ALWAYS_BIT, 1); ]; [ XTreeSub i; if (noun==0) { for (i=selfobj+1:i<=top_object:i++) { if (parent(i)==0) XObj(i); } rfalse; } XObj(noun); ]; [ GotoSub; if (noun>top_object || noun<=selfobj || parent(noun)~=0) "Not a safe place to go."; PlayerTo(noun); ]; #endif; ! ----------------------------------------------------------------------------
00000000 21 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |! --------------| 00000010 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000040 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 21 |--------------.!| 00000050 20 20 56 45 52 42 4c 49 42 3a 20 20 41 20 6c 69 | VERBLIB: A li| 00000060 62 72 61 72 79 20 6f 66 20 73 74 61 6e 64 61 72 |brary of standar| 00000070 64 20 76 65 72 62 20 72 6f 75 74 69 6e 65 73 20 |d verb routines | 00000080 77 68 69 63 68 20 72 75 6e 20 74 68 65 20 75 6e |which run the un| 00000090 69 76 65 72 73 65 2e 2e 2e 0a 21 0a 21 20 20 53 |iverse....!.! S| 000000a0 75 70 70 6c 69 65 64 20 66 6f 72 20 75 73 65 20 |upplied for use | 000000b0 77 69 74 68 20 49 6e 66 6f 72 6d 20 35 20 20 20 |with Inform 5 | 000000c0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000000d0 20 20 20 20 20 20 53 65 72 69 61 6c 20 6e 75 6d | Serial num| 000000e0 62 65 72 20 39 34 31 30 30 37 0a 21 20 20 20 20 |ber 941007.! | 000000f0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | * 00000120 20 20 20 20 20 20 20 20 20 20 20 20 20 20 52 65 | Re| 00000130 6c 65 61 73 65 20 35 2f 35 0a 21 20 20 28 63 29 |lease 5/5.! (c)| 00000140 20 47 72 61 68 61 6d 20 4e 65 6c 73 6f 6e 2c 20 | Graham Nelson, | 00000150 31 39 39 33 2f 34 2c 20 62 75 74 20 66 72 65 65 |1993/4, but free| 00000160 6c 79 20 75 73 61 62 6c 65 0a 21 0a 21 20 20 54 |ly usable.!.! T| 00000170 68 65 20 61 63 74 69 6f 6e 73 20 70 72 6f 76 69 |he actions provi| 00000180 64 65 64 20 61 72 65 3a 0a 21 0a 21 20 20 20 20 |ded are:.!.! | 00000190 51 75 69 74 2c 20 52 65 73 74 61 72 74 2c 20 52 |Quit, Restart, R| 000001a0 65 73 74 6f 72 65 2c 20 56 65 72 69 66 79 2c 20 |estore, Verify, | 000001b0 53 61 76 65 2c 20 53 63 72 69 70 74 4f 6e 2f 4f |Save, ScriptOn/O| 000001c0 66 66 2c 20 4e 6f 74 69 66 79 4f 6e 2f 4f 66 66 |ff, NotifyOn/Off| 000001d0 2c 0a 21 20 20 20 20 56 65 72 62 6f 73 65 2c 20 |,.! Verbose, | 000001e0 65 74 63 2e 2c 0a 21 20 20 20 20 49 6e 76 2c 20 |etc.,.! Inv, | 000001f0 54 61 6b 65 2c 20 44 72 6f 70 2c 20 52 65 6d 6f |Take, Drop, Remo| 00000200 76 65 2c 20 50 75 74 4f 6e 2c 20 49 6e 73 65 72 |ve, PutOn, Inser| 00000210 74 2c 20 54 72 61 6e 73 66 65 72 2c 20 45 6d 70 |t, Transfer, Emp| 00000220 74 79 2c 0a 21 20 20 20 20 45 6e 74 65 72 2c 20 |ty,.! Enter, | 00000230 45 78 69 74 2c 20 47 65 74 4f 66 66 2c 20 47 6f |Exit, GetOff, Go| 00000240 2c 20 4c 6f 6f 6b 2c 20 45 78 61 6d 69 6e 65 2c |, Look, Examine,| 00000250 20 47 69 76 65 2c 20 53 68 6f 77 2c 0a 21 20 20 | Give, Show,.! | 00000260 20 20 55 6e 6c 6f 63 6b 2c 20 4c 6f 63 6b 2c 20 | Unlock, Lock, | 00000270 53 77 69 74 63 68 4f 6e 2c 20 53 77 69 74 63 68 |SwitchOn, Switch| 00000280 4f 66 66 2c 20 4f 70 65 6e 2c 20 43 6c 6f 73 65 |Off, Open, Close| 00000290 2c 20 44 69 73 72 6f 62 65 2c 20 57 65 61 72 2c |, Disrobe, Wear,| 000002a0 20 45 61 74 3b 0a 21 0a 21 20 20 61 6e 64 20 72 | Eat;.!.! and r| 000002b0 6f 75 74 69 6e 65 73 20 66 6f 72 20 76 65 72 62 |outines for verb| 000002c0 73 20 77 68 69 63 68 20 62 79 20 64 65 66 61 75 |s which by defau| 000002d0 6c 74 20 6f 6e 6c 79 20 70 72 69 6e 74 20 61 20 |lt only print a | 000002e0 73 75 69 74 61 62 6c 65 20 72 65 70 6c 79 3a 0a |suitable reply:.| 000002f0 21 0a 21 20 20 20 20 59 65 73 2c 20 4e 6f 2c 20 |!.! Yes, No, | 00000300 42 75 72 6e 2c 20 50 72 61 79 2c 20 57 61 6b 65 |Burn, Pray, Wake| 00000310 2c 20 57 61 6b 65 4f 74 68 65 72 20 5b 70 65 72 |, WakeOther [per| 00000320 73 6f 6e 5d 2c 0a 21 20 20 20 20 4b 69 73 73 2c |son],.! Kiss,| 00000330 20 54 68 69 6e 6b 2c 20 53 6d 65 6c 6c 2c 20 4c | Think, Smell, L| 00000340 69 73 74 65 6e 2c 20 54 61 73 74 65 2c 20 54 6f |isten, Taste, To| 00000350 75 63 68 2c 20 54 6f 75 63 68 54 68 69 6e 67 2c |uch, TouchThing,| 00000360 20 44 69 67 2c 0a 21 20 20 20 20 43 75 74 2c 20 | Dig,.! Cut, | 00000370 4a 75 6d 70 20 5b 6a 75 6d 70 20 6f 6e 20 74 68 |Jump [jump on th| 00000380 65 20 73 70 6f 74 5d 2c 20 4a 75 6d 70 4f 76 65 |e spot], JumpOve| 00000390 72 2c 20 54 69 65 2c 20 44 72 69 6e 6b 2c 0a 21 |r, Tie, Drink,.!| 000003a0 20 20 20 20 46 69 6c 6c 2c 20 53 6f 72 72 79 2c | Fill, Sorry,| 000003b0 20 53 74 72 6f 6e 67 20 5b 73 77 65 61 72 20 77 | Strong [swear w| 000003c0 6f 72 64 5d 2c 20 4d 69 6c 64 20 5b 73 77 65 61 |ord], Mild [swea| 000003d0 72 20 77 6f 72 64 5d 2c 20 41 74 74 61 63 6b 2c |r word], Attack,| 000003e0 20 53 77 69 6d 2c 0a 21 20 20 20 20 53 77 69 6e | Swim,.! Swin| 000003f0 67 20 5b 73 6f 6d 65 74 68 69 6e 67 5d 2c 20 42 |g [something], B| 00000400 6c 6f 77 2c 20 52 75 62 2c 20 53 65 74 2c 20 53 |low, Rub, Set, S| 00000410 65 74 54 6f 2c 20 57 61 76 65 48 61 6e 64 73 20 |etTo, WaveHands | 00000420 5b 69 65 2c 20 6a 75 73 74 20 22 77 61 76 65 22 |[ie, just "wave"| 00000430 5d 2c 0a 21 20 20 20 20 57 61 76 65 20 5b 73 6f |],.! Wave [so| 00000440 6d 65 74 68 69 6e 67 5d 2c 20 50 75 6c 6c 2c 20 |mething], Pull, | 00000450 50 75 73 68 2c 20 50 75 73 68 44 69 72 20 5b 70 |Push, PushDir [p| 00000460 75 73 68 20 73 6f 6d 65 74 68 69 6e 67 20 69 6e |ush something in| 00000470 20 61 20 64 69 72 65 63 74 69 6f 6e 5d 2c 0a 21 | a direction],.!| 00000480 20 20 20 20 54 75 72 6e 2c 20 53 71 75 65 65 7a | Turn, Squeez| 00000490 65 2c 20 4c 6f 6f 6b 55 6e 64 65 72 20 5b 6c 6f |e, LookUnder [lo| 000004a0 6f 6b 20 75 6e 64 65 72 6e 65 61 74 68 20 73 6f |ok underneath so| 000004b0 6d 65 74 68 69 6e 67 5d 2c 20 53 65 61 72 63 68 |mething], Search| 000004c0 2c 0a 21 20 20 20 20 54 68 72 6f 77 41 74 2c 20 |,.! ThrowAt, | 000004d0 41 6e 73 77 65 72 2c 20 42 75 79 2c 20 41 73 6b |Answer, Buy, Ask| 000004e0 2c 20 53 69 6e 67 2c 20 43 6c 69 6d 62 2c 20 57 |, Sing, Climb, W| 000004f0 61 69 74 2c 20 53 6c 65 65 70 2c 20 43 6f 6e 73 |ait, Sleep, Cons| 00000500 75 6c 74 0a 21 0a 21 20 20 61 6e 64 20 74 68 65 |ult.!.! and the| 00000510 20 66 6f 6c 6c 6f 77 69 6e 67 20 72 6f 75 74 69 | following routi| 00000520 6e 65 73 20 6d 61 79 20 62 65 20 6f 66 20 70 61 |nes may be of pa| 00000530 72 74 69 63 75 6c 61 72 20 75 73 65 3a 0a 21 0a |rticular use:.!.| 00000540 21 20 20 20 20 45 6e 67 6c 69 73 68 4e 75 6d 62 |! EnglishNumb| 00000550 65 72 20 20 20 20 20 50 72 69 6e 74 20 6f 75 74 |er Print out| 00000560 20 61 20 6e 75 6d 62 65 72 20 69 6e 20 45 6e 67 | a number in Eng| 00000570 6c 69 73 68 20 28 6c 6f 77 65 72 20 63 61 73 65 |lish (lower case| 00000580 29 0a 21 20 20 20 20 57 72 69 74 65 4c 69 73 74 |).! WriteList| 00000590 46 72 6f 6d 20 20 20 20 20 54 68 65 20 61 6d 61 |From The ama| 000005a0 7a 69 6e 67 20 6c 69 73 74 2d 77 72 69 74 65 72 |zing list-writer| 000005b0 0a 21 20 20 20 20 50 6c 61 79 65 72 54 6f 20 20 |.! PlayerTo | 000005c0 20 20 20 20 20 20 20 20 53 61 66 65 6c 79 20 6d | Safely m| 000005d0 6f 76 65 20 74 68 65 20 70 6c 61 79 65 72 20 73 |ove the player s| 000005e0 6f 6d 65 77 68 65 72 65 20 65 6c 73 65 0a 21 20 |omewhere else.! | 000005f0 20 20 20 59 65 73 4f 72 4e 6f 20 20 20 20 20 20 | YesOrNo | 00000600 20 20 20 20 20 41 73 6b 20 74 68 65 20 70 6c 61 | Ask the pla| 00000610 79 65 72 20 61 20 79 65 73 2f 6e 6f 20 71 75 65 |yer a yes/no que| 00000620 73 74 69 6f 6e 2c 20 72 65 74 75 72 6e 69 6e 67 |stion, returning| 00000630 20 74 72 75 65 20 69 66 20 79 65 73 0a 21 0a 21 | true if yes.!.!| 00000640 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | ---------------| 00000650 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000680 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 21 20 |-------------.! | 00000690 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000006d0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 53 79 |------------..Sy| 000006e0 73 74 65 6d 5f 66 69 6c 65 3b 0a 0a 44 65 66 61 |stem_file;..Defa| 000006f0 75 6c 74 20 4d 41 58 5f 43 41 52 52 49 45 44 20 |ult MAX_CARRIED | 00000700 20 31 30 30 3b 0a 44 65 66 61 75 6c 74 20 4d 41 | 100;.Default MA| 00000710 58 5f 53 43 4f 52 45 20 20 20 20 30 3b 0a 44 65 |X_SCORE 0;.De| 00000720 66 61 75 6c 74 20 4e 55 4d 42 45 52 5f 54 41 53 |fault NUMBER_TAS| 00000730 4b 53 20 31 3b 0a 44 65 66 61 75 6c 74 20 4f 42 |KS 1;.Default OB| 00000740 4a 45 43 54 5f 53 43 4f 52 45 20 34 3b 0a 44 65 |JECT_SCORE 4;.De| 00000750 66 61 75 6c 74 20 52 4f 4f 4d 5f 53 43 4f 52 45 |fault ROOM_SCORE| 00000760 20 20 20 35 3b 0a 44 65 66 61 75 6c 74 20 53 41 | 5;.Default SA| 00000770 43 4b 5f 4f 42 4a 45 43 54 20 20 30 3b 20 20 20 |CK_OBJECT 0; | 00000780 0a 44 65 66 61 75 6c 74 20 41 4d 55 53 49 4e 47 |.Default AMUSING| 00000790 5f 50 52 4f 56 49 44 45 44 20 31 3b 0a 44 65 66 |_PROVIDED 1;.Def| 000007a0 61 75 6c 74 20 54 41 53 4b 53 5f 50 52 4f 56 49 |ault TASKS_PROVI| 000007b0 44 45 44 20 20 20 31 3b 0a 0a 21 20 2d 2d 2d 2d |DED 1;..! ----| 000007c0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000800 2d 2d 2d 2d 2d 2d 2d 2d 0a 21 20 20 46 69 72 73 |--------.! Firs| 00000810 74 2c 20 70 72 69 6e 74 69 6e 67 20 61 20 6e 75 |t, printing a nu| 00000820 6d 62 65 72 20 6e 20 69 6e 20 45 6e 67 6c 69 73 |mber n in Englis| 00000830 68 2e 0a 21 20 20 49 74 27 73 20 74 68 69 73 20 |h..! It's this | 00000840 73 6f 72 74 20 6f 66 20 74 68 69 6e 67 20 77 68 |sort of thing wh| 00000850 69 63 68 20 6d 61 6b 65 73 20 79 6f 75 20 72 65 |ich makes you re| 00000860 61 6c 69 73 65 20 6a 75 73 74 20 77 68 61 74 20 |alise just what | 00000870 61 6e 20 69 72 72 65 67 75 6c 61 72 0a 21 20 20 |an irregular.! | 00000880 6c 61 6e 67 75 61 67 65 20 45 6e 67 6c 69 73 68 |language English| 00000890 20 69 73 2e 2e 2e 0a 21 20 2d 2d 2d 2d 2d 2d 2d | is....! -------| 000008a0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000008e0 2d 2d 2d 2d 2d 0a 0a 5b 20 45 6e 67 6c 69 73 68 |-----..[ English| 000008f0 4e 75 6d 62 65 72 20 6e 20 6d 3b 0a 20 20 69 66 |Number n m;. if| 00000900 20 28 6e 3d 3d 30 29 20 7b 20 70 72 69 6e 74 20 | (n==0) { print | 00000910 22 7a 65 72 6f 22 3b 20 72 66 61 6c 73 65 3b 20 |"zero"; rfalse; | 00000920 7d 0a 20 20 69 66 20 28 6e 3c 30 29 20 7b 20 70 |}. if (n<0) { p| 00000930 72 69 6e 74 20 22 6d 69 6e 75 73 20 22 3b 20 6e |rint "minus "; n| 00000940 3d 2d 6e 3b 20 7d 0a 20 20 69 66 20 28 6e 3e 3d |=-n; }. if (n>=| 00000950 31 30 30 29 20 7b 20 45 6e 67 6c 69 73 68 4e 75 |100) { EnglishNu| 00000960 6d 62 65 72 28 6e 2f 31 30 30 29 3b 0a 20 20 20 |mber(n/100);. | 00000970 20 20 20 20 20 20 20 20 20 20 20 20 20 6e 3d 6e | n=n| 00000980 25 31 30 30 3b 20 69 66 20 28 6e 3d 3d 30 29 20 |%100; if (n==0) | 00000990 72 66 61 6c 73 65 3b 0a 20 20 20 20 20 20 20 20 |rfalse;. | 000009a0 20 20 20 20 20 20 20 20 70 72 69 6e 74 20 22 20 | print " | 000009b0 61 6e 64 20 22 3b 20 20 20 20 20 21 20 41 6d 65 |and "; ! Ame| 000009c0 72 69 63 61 6e 73 20 6d 61 79 20 77 61 6e 74 20 |ricans may want | 000009d0 74 6f 20 64 65 6c 65 74 65 20 74 68 69 73 20 6c |to delete this l| 000009e0 69 6e 65 0a 20 20 20 20 20 20 20 20 20 20 20 20 |ine. | 000009f0 20 20 7d 0a 20 20 69 66 20 28 6e 3c 31 30 29 20 | }. if (n<10) | 00000a00 7b 20 45 6e 67 6c 69 73 68 44 69 67 69 74 28 6e |{ EnglishDigit(n| 00000a10 29 3b 20 72 66 61 6c 73 65 3b 20 7d 0a 20 20 69 |); rfalse; }. i| 00000a20 66 20 28 6e 3e 3d 32 30 29 0a 20 20 7b 20 20 20 |f (n>=20). { | 00000a30 6d 3d 6e 2f 31 30 3b 0a 20 20 20 20 20 20 69 66 |m=n/10;. if| 00000a40 20 28 6d 3d 3d 32 29 20 70 72 69 6e 74 20 22 74 | (m==2) print "t| 00000a50 77 65 6e 74 79 22 3b 0a 20 20 20 20 20 20 69 66 |wenty";. if| 00000a60 20 28 6d 3d 3d 33 29 20 70 72 69 6e 74 20 22 74 | (m==3) print "t| 00000a70 68 69 72 74 79 22 3b 0a 20 20 20 20 20 20 69 66 |hirty";. if| 00000a80 20 28 6d 3d 3d 34 29 20 70 72 69 6e 74 20 22 66 | (m==4) print "f| 00000a90 6f 75 72 74 79 22 3b 0a 20 20 20 20 20 20 69 66 |ourty";. if| 00000aa0 20 28 6d 3d 3d 35 29 20 70 72 69 6e 74 20 22 66 | (m==5) print "f| 00000ab0 69 66 74 79 22 3b 0a 20 20 20 20 20 20 69 66 20 |ifty";. if | 00000ac0 28 6d 3d 3d 36 29 20 70 72 69 6e 74 20 22 73 69 |(m==6) print "si| 00000ad0 78 74 79 22 3b 0a 20 20 20 20 20 20 69 66 20 28 |xty";. if (| 00000ae0 6d 3d 3d 37 29 20 70 72 69 6e 74 20 22 73 65 76 |m==7) print "sev| 00000af0 65 6e 74 79 22 3b 0a 20 20 20 20 20 20 69 66 20 |enty";. if | 00000b00 28 6d 3d 3d 38 29 20 70 72 69 6e 74 20 22 65 69 |(m==8) print "ei| 00000b10 67 68 74 79 22 3b 0a 20 20 20 20 20 20 69 66 20 |ghty";. if | 00000b20 28 6d 3d 3d 39 29 20 70 72 69 6e 74 20 22 6e 69 |(m==9) print "ni| 00000b30 6e 65 74 79 22 3b 0a 20 20 20 20 20 20 69 66 20 |nety";. if | 00000b40 28 6e 25 31 30 3d 3d 30 29 20 72 66 61 6c 73 65 |(n%10==0) rfalse| 00000b50 3b 0a 20 20 20 20 20 20 70 72 69 6e 74 20 22 2d |;. print "-| 00000b60 22 3b 20 45 6e 67 6c 69 73 68 44 69 67 69 74 28 |"; EnglishDigit(| 00000b70 6e 25 31 30 29 3b 20 72 66 61 6c 73 65 3b 0a 20 |n%10); rfalse;. | 00000b80 20 7d 0a 20 20 69 66 20 28 6e 3d 3d 31 30 29 20 | }. if (n==10) | 00000b90 7b 20 70 72 69 6e 74 20 22 74 65 6e 22 3b 20 72 |{ print "ten"; r| 00000ba0 66 61 6c 73 65 3b 20 7d 0a 20 20 69 66 20 28 6e |false; }. if (n| 00000bb0 3d 3d 31 31 29 20 7b 20 70 72 69 6e 74 20 22 65 |==11) { print "e| 00000bc0 6c 65 76 65 6e 22 3b 20 72 66 61 6c 73 65 3b 20 |leven"; rfalse; | 00000bd0 7d 0a 20 20 69 66 20 28 6e 3d 3d 31 32 29 20 7b |}. if (n==12) {| 00000be0 20 70 72 69 6e 74 20 22 74 77 65 6c 76 65 22 3b | print "twelve";| 00000bf0 20 72 66 61 6c 73 65 3b 20 7d 0a 20 20 69 66 20 | rfalse; }. if | 00000c00 28 6e 3d 3d 31 33 29 20 7b 20 70 72 69 6e 74 20 |(n==13) { print | 00000c10 22 74 68 69 72 74 65 65 6e 22 3b 20 72 66 61 6c |"thirteen"; rfal| 00000c20 73 65 3b 20 7d 0a 20 20 69 66 20 28 6e 3d 3d 31 |se; }. if (n==1| 00000c30 34 29 20 7b 20 70 72 69 6e 74 20 22 66 6f 75 72 |4) { print "four| 00000c40 74 65 65 6e 22 3b 20 72 66 61 6c 73 65 3b 20 7d |teen"; rfalse; }| 00000c50 0a 20 20 69 66 20 28 6e 3d 3d 31 35 29 20 7b 20 |. if (n==15) { | 00000c60 70 72 69 6e 74 20 22 66 69 66 74 65 65 6e 22 3b |print "fifteen";| 00000c70 20 72 66 61 6c 73 65 3b 20 7d 0a 20 20 69 66 20 | rfalse; }. if | 00000c80 28 6e 3d 3d 31 36 29 20 7b 20 70 72 69 6e 74 20 |(n==16) { print | 00000c90 22 73 69 78 74 65 65 6e 22 3b 20 72 66 61 6c 73 |"sixteen"; rfals| 00000ca0 65 3b 20 7d 0a 20 20 69 66 20 28 6e 3d 3d 31 37 |e; }. if (n==17| 00000cb0 29 20 7b 20 70 72 69 6e 74 20 22 73 65 76 65 6e |) { print "seven| 00000cc0 74 65 65 6e 22 3b 20 72 66 61 6c 73 65 3b 20 7d |teen"; rfalse; }| 00000cd0 0a 20 20 69 66 20 28 6e 3d 3d 31 38 29 20 7b 20 |. if (n==18) { | 00000ce0 70 72 69 6e 74 20 22 65 69 67 68 74 65 65 6e 22 |print "eighteen"| 00000cf0 3b 20 72 66 61 6c 73 65 3b 20 7d 0a 20 20 70 72 |; rfalse; }. pr| 00000d00 69 6e 74 20 22 6e 69 6e 65 74 65 65 6e 22 3b 0a |int "nineteen";.| 00000d10 5d 3b 0a 0a 5b 20 45 6e 67 6c 69 73 68 44 69 67 |];..[ EnglishDig| 00000d20 69 74 20 6e 3b 0a 20 20 69 66 20 28 6e 3d 3d 31 |it n;. if (n==1| 00000d30 29 20 7b 20 70 72 69 6e 74 20 22 6f 6e 65 22 3b |) { print "one";| 00000d40 20 72 66 61 6c 73 65 3b 20 7d 0a 20 20 69 66 20 | rfalse; }. if | 00000d50 28 6e 3d 3d 32 29 20 7b 20 70 72 69 6e 74 20 22 |(n==2) { print "| 00000d60 74 77 6f 22 3b 20 72 66 61 6c 73 65 3b 20 7d 0a |two"; rfalse; }.| 00000d70 20 20 69 66 20 28 6e 3d 3d 33 29 20 7b 20 70 72 | if (n==3) { pr| 00000d80 69 6e 74 20 22 74 68 72 65 65 22 3b 20 72 66 61 |int "three"; rfa| 00000d90 6c 73 65 3b 20 7d 0a 20 20 69 66 20 28 6e 3d 3d |lse; }. if (n==| 00000da0 34 29 20 7b 20 70 72 69 6e 74 20 22 66 6f 75 72 |4) { print "four| 00000db0 22 3b 20 72 66 61 6c 73 65 3b 20 7d 0a 20 20 69 |"; rfalse; }. i| 00000dc0 66 20 28 6e 3d 3d 35 29 20 7b 20 70 72 69 6e 74 |f (n==5) { print| 00000dd0 20 22 66 69 76 65 22 3b 20 72 66 61 6c 73 65 3b | "five"; rfalse;| 00000de0 20 7d 0a 20 20 69 66 20 28 6e 3d 3d 36 29 20 7b | }. if (n==6) {| 00000df0 20 70 72 69 6e 74 20 22 73 69 78 22 3b 20 72 66 | print "six"; rf| 00000e00 61 6c 73 65 3b 20 7d 0a 20 20 69 66 20 28 6e 3d |alse; }. if (n=| 00000e10 3d 37 29 20 7b 20 70 72 69 6e 74 20 22 73 65 76 |=7) { print "sev| 00000e20 65 6e 22 3b 20 72 66 61 6c 73 65 3b 20 7d 0a 20 |en"; rfalse; }. | 00000e30 20 69 66 20 28 6e 3d 3d 38 29 20 7b 20 70 72 69 | if (n==8) { pri| 00000e40 6e 74 20 22 65 69 67 68 74 22 3b 20 72 66 61 6c |nt "eight"; rfal| 00000e50 73 65 3b 20 7d 0a 20 20 69 66 20 28 6e 3d 3d 39 |se; }. if (n==9| 00000e60 29 20 7b 20 70 72 69 6e 74 20 22 6e 69 6e 65 22 |) { print "nine"| 00000e70 3b 20 72 66 61 6c 73 65 3b 20 7d 0a 5d 3b 0a 0a |; rfalse; }.];..| 00000e80 21 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |! --------------| 00000e90 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00000ec0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 21 |--------------.!| 00000ed0 20 20 4e 65 78 74 20 74 68 65 20 57 72 69 74 65 | Next the Write| 00000ee0 4c 69 73 74 46 72 6f 6d 20 72 6f 75 74 69 6e 65 |ListFrom routine| 00000ef0 2c 20 61 20 66 6c 65 78 69 62 6c 65 20 6f 62 6a |, a flexible obj| 00000f00 65 63 74 2d 6c 69 73 74 65 72 20 74 61 6b 69 6e |ect-lister takin| 00000f10 67 20 63 61 72 65 20 6f 66 0a 21 20 20 70 6c 75 |g care of.! plu| 00000f20 72 61 6c 73 2c 20 69 6e 76 65 6e 74 6f 72 79 20 |rals, inventory | 00000f30 69 6e 66 6f 72 6d 61 74 69 6f 6e 2c 20 76 61 72 |information, var| 00000f40 69 6f 75 73 20 66 6f 72 6d 61 74 73 20 61 6e 64 |ious formats and| 00000f50 20 73 6f 20 6f 6e 2e 20 20 54 68 69 73 20 69 73 | so on. This is| 00000f60 20 75 73 65 64 0a 21 20 20 62 79 20 65 76 65 72 | used.! by ever| 00000f70 79 74 68 69 6e 67 20 69 6e 20 74 68 65 20 6c 69 |ything in the li| 00000f80 62 72 61 72 79 20 77 68 69 63 68 20 65 76 65 72 |brary which ever| 00000f90 20 77 61 6e 74 73 20 74 6f 20 6c 69 73 74 20 61 | wants to list a| 00000fa0 6e 79 74 68 69 6e 67 2e 0a 21 0a 21 20 20 49 66 |nything..!.! If| 00000fb0 20 74 68 65 72 65 20 77 65 72 65 20 6e 6f 20 6f | there were no o| 00000fc0 62 6a 65 63 74 73 20 74 6f 20 6c 69 73 74 2c 20 |bjects to list, | 00000fd0 69 74 20 70 72 69 6e 74 73 20 6e 6f 74 68 69 6e |it prints nothin| 00000fe0 67 20 61 6e 64 20 72 65 74 75 72 6e 73 20 66 61 |g and returns fa| 00000ff0 6c 73 65 3b 0a 21 20 20 6f 74 68 65 72 77 69 73 |lse;.! otherwis| 00001000 65 20 69 74 20 72 65 74 75 72 6e 73 20 74 72 75 |e it returns tru| 00001010 65 2e 0a 21 0a 21 20 20 6f 20 69 73 20 74 68 65 |e..!.! o is the| 00001020 20 6f 62 6a 65 63 74 2c 20 61 6e 64 20 73 74 79 | object, and sty| 00001030 6c 65 20 69 73 20 61 20 62 69 74 6d 61 70 2c 20 |le is a bitmap, | 00001040 77 68 6f 73 65 20 62 69 74 73 20 61 72 65 20 67 |whose bits are g| 00001050 69 76 65 6e 20 62 79 3a 0a 21 20 2d 2d 2d 2d 2d |iven by:.! -----| 00001060 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000010a0 2d 2d 2d 2d 2d 2d 2d 0a 0a 43 6f 6e 73 74 61 6e |-------..Constan| 000010b0 74 20 4e 45 57 4c 49 4e 45 5f 42 49 54 20 20 20 |t NEWLINE_BIT | 000010c0 31 3b 20 20 20 20 20 21 20 20 4e 65 77 2d 6c 69 |1; ! New-li| 000010d0 6e 65 20 61 66 74 65 72 20 65 61 63 68 20 65 6e |ne after each en| 000010e0 74 72 79 0a 43 6f 6e 73 74 61 6e 74 20 49 4e 44 |try.Constant IND| 000010f0 45 4e 54 5f 42 49 54 20 20 20 20 32 3b 20 20 20 |ENT_BIT 2; | 00001100 20 20 21 20 20 49 6e 64 65 6e 74 20 65 61 63 68 | ! Indent each| 00001110 20 65 6e 74 72 79 20 62 79 20 64 65 70 74 68 0a | entry by depth.| 00001120 43 6f 6e 73 74 61 6e 74 20 46 55 4c 4c 49 4e 56 |Constant FULLINV| 00001130 5f 42 49 54 20 20 20 34 3b 20 20 20 20 20 21 20 |_BIT 4; ! | 00001140 20 46 75 6c 6c 20 69 6e 76 65 6e 74 6f 72 79 20 | Full inventory | 00001150 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 66 74 65 |information afte| 00001160 72 20 65 6e 74 72 79 0a 43 6f 6e 73 74 61 6e 74 |r entry.Constant| 00001170 20 45 4e 47 4c 49 53 48 5f 42 49 54 20 20 20 38 | ENGLISH_BIT 8| 00001180 3b 20 20 20 20 20 21 20 20 45 6e 67 6c 69 73 68 |; ! English| 00001190 20 73 65 6e 74 65 6e 63 65 20 73 74 79 6c 65 2c | sentence style,| 000011a0 20 77 69 74 68 20 63 6f 6d 6d 61 73 20 61 6e 64 | with commas and| 000011b0 20 61 6e 64 0a 43 6f 6e 73 74 61 6e 74 20 52 45 | and.Constant RE| 000011c0 43 55 52 53 45 5f 42 49 54 20 20 31 36 3b 20 20 |CURSE_BIT 16; | 000011d0 20 20 20 21 20 20 52 65 63 75 72 73 65 20 64 6f | ! Recurse do| 000011e0 77 6e 77 61 72 64 73 20 77 69 74 68 20 75 73 75 |wnwards with usu| 000011f0 61 6c 20 72 75 6c 65 73 0a 43 6f 6e 73 74 61 6e |al rules.Constan| 00001200 74 20 41 4c 57 41 59 53 5f 42 49 54 20 20 20 33 |t ALWAYS_BIT 3| 00001210 32 3b 20 20 20 20 20 21 20 20 41 6c 77 61 79 73 |2; ! Always| 00001220 20 72 65 63 75 72 73 65 20 64 6f 77 6e 77 61 72 | recurse downwar| 00001230 64 73 0a 43 6f 6e 73 74 61 6e 74 20 54 45 52 53 |ds.Constant TERS| 00001240 45 5f 42 49 54 20 20 20 20 36 34 3b 20 20 20 20 |E_BIT 64; | 00001250 20 21 20 20 4d 6f 72 65 20 74 65 72 73 65 20 45 | ! More terse E| 00001260 6e 67 6c 69 73 68 20 73 74 79 6c 65 0a 43 6f 6e |nglish style.Con| 00001270 73 74 61 6e 74 20 50 41 52 54 49 4e 56 5f 42 49 |stant PARTINV_BI| 00001280 54 20 31 32 38 3b 20 20 20 20 20 21 20 20 4f 6e |T 128; ! On| 00001290 6c 79 20 62 72 69 65 66 20 69 6e 76 65 6e 74 6f |ly brief invento| 000012a0 72 79 20 69 6e 66 6f 72 6d 61 74 69 6f 6e 20 61 |ry information a| 000012b0 66 74 65 72 20 65 6e 74 72 79 0a 43 6f 6e 73 74 |fter entry.Const| 000012c0 61 6e 74 20 44 45 46 41 52 54 5f 42 49 54 20 20 |ant DEFART_BIT | 000012d0 32 35 36 3b 20 20 20 20 20 21 20 20 55 73 65 20 |256; ! Use | 000012e0 74 68 65 20 64 65 66 69 6e 69 74 65 20 61 72 74 |the definite art| 000012f0 69 63 6c 65 20 69 6e 20 6c 69 73 74 0a 43 6f 6e |icle in list.Con| 00001300 73 74 61 6e 74 20 57 4f 52 4b 46 4c 41 47 5f 42 |stant WORKFLAG_B| 00001310 49 54 20 35 31 32 3b 20 20 20 20 21 20 20 41 74 |IT 512; ! At| 00001320 20 74 6f 70 20 6c 65 76 65 6c 20 28 6f 6e 6c 79 | top level (only| 00001330 29 2c 20 6f 6e 6c 79 20 6c 69 73 74 20 6f 62 6a |), only list obj| 00001340 65 63 74 73 0a 20 20 20 20 20 20 20 20 20 20 20 |ects. | 00001350 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001360 20 20 20 21 20 20 77 68 69 63 68 20 68 61 76 65 | ! which have| 00001370 20 74 68 65 20 22 77 6f 72 6b 66 6c 61 67 22 20 | the "workflag" | 00001380 61 74 74 72 69 62 75 74 65 0a 0a 67 6c 6f 62 61 |attribute..globa| 00001390 6c 20 63 5f 73 74 79 6c 65 3b 0a 0a 5b 20 4e 65 |l c_style;..[ Ne| 000013a0 78 74 45 6e 74 72 79 20 6f 20 64 65 70 74 68 3b |xtEntry o depth;| 000013b0 0a 20 20 6f 3d 73 69 62 6c 69 6e 67 28 6f 29 3b |. o=sibling(o);| 000013c0 0a 20 20 69 66 20 28 64 65 70 74 68 3e 30 20 7c |. if (depth>0 || 000013d0 7c 20 63 5f 73 74 79 6c 65 20 26 20 57 4f 52 4b || c_style & WORK| 000013e0 46 4c 41 47 5f 42 49 54 20 3d 3d 20 30 29 20 72 |FLAG_BIT == 0) r| 000013f0 65 74 75 72 6e 20 6f 3b 0a 20 20 77 68 69 6c 65 |eturn o;. while| 00001400 20 28 6f 7e 3d 30 20 26 26 20 6f 20 68 61 73 6e | (o~=0 && o hasn| 00001410 74 20 77 6f 72 6b 66 6c 61 67 29 20 6f 3d 73 69 |t workflag) o=si| 00001420 62 6c 69 6e 67 28 6f 29 3b 0a 20 20 72 65 74 75 |bling(o);. retu| 00001430 72 6e 20 6f 3b 0a 5d 3b 0a 0a 5b 20 57 69 6c 6c |rn o;.];..[ Will| 00001440 52 65 63 75 72 73 20 6f 3b 0a 20 20 69 66 20 28 |Recurs o;. if (| 00001450 63 5f 73 74 79 6c 65 20 26 20 41 4c 57 41 59 53 |c_style & ALWAYS| 00001460 5f 42 49 54 20 7e 3d 20 30 29 20 72 74 72 75 65 |_BIT ~= 0) rtrue| 00001470 3b 0a 20 20 69 66 20 28 63 5f 73 74 79 6c 65 20 |;. if (c_style | 00001480 26 20 52 45 43 55 52 53 45 5f 42 49 54 20 3d 3d |& RECURSE_BIT ==| 00001490 20 30 29 20 72 66 61 6c 73 65 3b 0a 20 20 69 66 | 0) rfalse;. if| 000014a0 20 28 6f 20 68 61 73 20 74 72 61 6e 73 70 61 72 | (o has transpar| 000014b0 65 6e 74 0a 20 20 20 20 20 20 7c 7c 20 6f 20 68 |ent. || o h| 000014c0 61 73 20 73 75 70 70 6f 72 74 65 72 0a 20 20 20 |as supporter. | 000014d0 20 20 20 7c 7c 20 28 6f 20 68 61 73 20 63 6f 6e | || (o has con| 000014e0 74 61 69 6e 65 72 20 26 26 20 6f 20 68 61 73 20 |tainer && o has | 000014f0 6f 70 65 6e 29 29 20 72 74 72 75 65 3b 0a 20 20 |open)) rtrue;. | 00001500 72 66 61 6c 73 65 3b 0a 5d 3b 0a 0a 5b 20 4c 69 |rfalse;.];..[ Li| 00001510 73 74 45 71 75 61 6c 20 6f 31 20 6f 32 3b 0a 20 |stEqual o1 o2;. | 00001520 20 69 66 20 28 63 68 69 6c 64 28 6f 31 29 7e 3d | if (child(o1)~=| 00001530 30 20 26 26 20 57 69 6c 6c 52 65 63 75 72 73 28 |0 && WillRecurs(| 00001540 6f 31 29 7e 3d 30 29 20 72 66 61 6c 73 65 3b 0a |o1)~=0) rfalse;.| 00001550 20 20 69 66 20 28 63 68 69 6c 64 28 6f 32 29 7e | if (child(o2)~| 00001560 3d 30 20 26 26 20 57 69 6c 6c 52 65 63 75 72 73 |=0 && WillRecurs| 00001570 28 6f 32 29 7e 3d 30 29 20 72 66 61 6c 73 65 3b |(o2)~=0) rfalse;| 00001580 0a 0a 20 20 69 66 20 28 63 5f 73 74 79 6c 65 20 |.. if (c_style | 00001590 26 20 28 46 55 4c 4c 49 4e 56 5f 42 49 54 20 2b |& (FULLINV_BIT +| 000015a0 20 50 41 52 54 49 4e 56 5f 42 49 54 29 20 7e 3d | PARTINV_BIT) ~=| 000015b0 20 30 29 0a 20 20 7b 20 20 20 69 66 20 28 28 6f | 0). { if ((o| 000015c0 31 20 68 61 73 6e 74 20 77 6f 72 6e 20 26 26 20 |1 hasnt worn && | 000015d0 6f 32 20 68 61 73 20 77 6f 72 6e 29 0a 20 20 20 |o2 has worn). | 000015e0 20 20 20 20 20 20 20 7c 7c 20 28 6f 32 20 68 61 | || (o2 ha| 000015f0 73 6e 74 20 77 6f 72 6e 20 26 26 20 6f 31 20 68 |snt worn && o1 h| 00001600 61 73 20 77 6f 72 6e 29 29 20 72 66 61 6c 73 65 |as worn)) rfalse| 00001610 3b 0a 20 20 20 20 20 20 69 66 20 28 28 6f 31 20 |;. if ((o1 | 00001620 68 61 73 6e 74 20 6c 69 67 68 74 20 26 26 20 6f |hasnt light && o| 00001630 32 20 68 61 73 20 6c 69 67 68 74 29 0a 20 20 20 |2 has light). | 00001640 20 20 20 20 20 20 20 7c 7c 20 28 6f 32 20 68 61 | || (o2 ha| 00001650 73 6e 74 20 6c 69 67 68 74 20 26 26 20 6f 31 20 |snt light && o1 | 00001660 68 61 73 20 6c 69 67 68 74 29 29 20 72 66 61 6c |has light)) rfal| 00001670 73 65 3b 0a 20 20 7d 0a 0a 20 20 72 65 74 75 72 |se;. }.. retur| 00001680 6e 20 49 64 65 6e 74 69 63 61 6c 28 6f 31 2c 6f |n Identical(o1,o| 00001690 32 29 3b 0a 5d 3b 0a 0a 5b 20 57 72 69 74 65 4c |2);.];..[ WriteL| 000016a0 69 73 74 46 72 6f 6d 20 6f 20 73 74 79 6c 65 20 |istFrom o style | 000016b0 64 65 70 74 68 3b 0a 20 20 63 5f 73 74 79 6c 65 |depth;. c_style| 000016c0 3d 73 74 79 6c 65 3b 0a 20 20 69 66 20 28 73 74 |=style;. if (st| 000016d0 79 6c 65 20 26 20 57 4f 52 4b 46 4c 41 47 5f 42 |yle & WORKFLAG_B| 000016e0 49 54 20 7e 3d 20 30 29 0a 20 20 7b 20 20 20 77 |IT ~= 0). { w| 000016f0 68 69 6c 65 20 28 6f 7e 3d 30 20 26 26 20 6f 20 |hile (o~=0 && o | 00001700 68 61 73 6e 74 20 77 6f 72 6b 66 6c 61 67 29 20 |hasnt workflag) | 00001710 6f 3d 73 69 62 6c 69 6e 67 28 6f 29 3b 0a 20 20 |o=sibling(o);. | 00001720 7d 0a 20 20 69 66 20 28 6f 3d 3d 30 29 20 72 66 |}. if (o==0) rf| 00001730 61 6c 73 65 3b 0a 20 20 57 72 69 74 65 4c 69 73 |alse;. WriteLis| 00001740 74 52 28 6f 2c 64 65 70 74 68 29 3b 0a 20 20 72 |tR(o,depth);. r| 00001750 74 72 75 65 3b 0a 5d 3b 0a 0a 5b 20 57 72 69 74 |true;.];..[ Writ| 00001760 65 4c 69 73 74 52 20 6f 20 64 65 70 74 68 20 73 |eListR o depth s| 00001770 74 61 63 6b 5f 70 6f 69 6e 74 65 72 20 20 63 6c |tack_pointer cl| 00001780 61 73 73 65 73 5f 70 20 73 69 7a 65 73 5f 70 20 |asses_p sizes_p | 00001790 69 20 6a 20 6b 20 6c 20 6d 20 6e 3b 0a 0a 20 20 |i j k l m n;.. | 000017a0 63 6c 61 73 73 65 73 5f 70 20 3d 20 6d 61 74 63 |classes_p = matc| 000017b0 68 5f 63 6c 61 73 73 65 73 20 2b 20 73 74 61 63 |h_classes + stac| 000017c0 6b 5f 70 6f 69 6e 74 65 72 3b 0a 20 20 73 69 7a |k_pointer;. siz| 000017d0 65 73 5f 70 20 20 20 3d 20 6d 61 74 63 68 5f 6c |es_p = match_l| 000017e0 69 73 74 20 2b 20 73 74 61 63 6b 5f 70 6f 69 6e |ist + stack_poin| 000017f0 74 65 72 3b 0a 0a 20 20 66 6f 72 20 28 69 3d 6f |ter;.. for (i=o| 00001800 2c 6a 3d 30 3a 69 7e 3d 30 20 26 26 20 28 6a 2b |,j=0:i~=0 && (j+| 00001810 73 74 61 63 6b 5f 70 6f 69 6e 74 65 72 29 3c 31 |stack_pointer)<1| 00001820 32 38 3a 69 3d 4e 65 78 74 45 6e 74 72 79 28 69 |28:i=NextEntry(i| 00001830 2c 64 65 70 74 68 29 2c 6a 2b 2b 29 0a 20 20 7b |,depth),j++). {| 00001840 20 20 20 63 6c 61 73 73 65 73 5f 70 2d 3e 6a 3d | classes_p->j=| 00001850 30 3b 0a 20 20 20 20 20 20 69 66 20 28 69 2e 70 |0;. if (i.p| 00001860 6c 75 72 61 6c 7e 3d 30 29 20 6b 2b 2b 3b 0a 20 |lural~=0) k++;. | 00001870 20 7d 0a 21 20 20 70 72 69 6e 74 20 22 28 22 2c | }.! print "(",| 00001880 6a 2c 22 20 6f 62 6a 3b 20 73 70 3d 22 2c 73 74 |j," obj; sp=",st| 00001890 61 63 6b 5f 70 6f 69 6e 74 65 72 2c 22 29 20 22 |ack_pointer,") "| 000018a0 3b 0a 20 20 73 74 61 63 6b 5f 70 6f 69 6e 74 65 |;. stack_pointe| 000018b0 72 20 3d 20 73 74 61 63 6b 5f 70 6f 69 6e 74 65 |r = stack_pointe| 000018c0 72 2b 6a 2b 31 3b 0a 0a 20 20 69 66 20 28 6b 3c |r+j+1;.. if (k<| 000018d0 32 29 20 6a 75 6d 70 20 45 63 6f 6e 6f 6d 79 56 |2) jump EconomyV| 000018e0 65 72 73 69 6f 6e 3b 20 20 20 21 20 49 74 20 74 |ersion; ! It t| 000018f0 61 6b 65 73 20 74 77 6f 20 74 6f 20 70 6c 75 72 |akes two to plur| 00001900 61 6c 0a 0a 20 20 6e 3d 31 3b 0a 20 20 66 6f 72 |al.. n=1;. for| 00001910 20 28 69 3d 6f 2c 6b 3d 30 3a 6b 3c 6a 3a 69 3d | (i=o,k=0:k<j:i=| 00001920 4e 65 78 74 45 6e 74 72 79 28 69 2c 64 65 70 74 |NextEntry(i,dept| 00001930 68 29 2c 6b 2b 2b 29 0a 20 20 20 20 20 20 69 66 |h),k++). if| 00001940 20 28 63 6c 61 73 73 65 73 5f 70 2d 3e 6b 3d 3d | (classes_p->k==| 00001950 30 29 0a 20 20 20 20 20 20 7b 20 20 20 63 6c 61 |0). { cla| 00001960 73 73 65 73 5f 70 2d 3e 6b 3d 6e 3b 20 73 69 7a |sses_p->k=n; siz| 00001970 65 73 5f 70 2d 3e 6e 3d 31 3b 0a 20 20 20 20 20 |es_p->n=1;. | 00001980 20 20 20 20 20 66 6f 72 20 28 6c 3d 4e 65 78 74 | for (l=Next| 00001990 45 6e 74 72 79 28 69 2c 64 65 70 74 68 29 2c 20 |Entry(i,depth), | 000019a0 6d 3d 6b 2b 31 3a 6c 7e 3d 30 20 26 26 20 6d 3c |m=k+1:l~=0 && m<| 000019b0 6a 3a 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |j:. | 000019c0 20 20 6c 3d 4e 65 78 74 45 6e 74 72 79 28 6c 2c | l=NextEntry(l,| 000019d0 64 65 70 74 68 29 2c 20 6d 2b 2b 29 0a 20 20 20 |depth), m++). | 000019e0 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 63 | if (c| 000019f0 6c 61 73 73 65 73 5f 70 2d 3e 6d 3d 3d 30 20 26 |lasses_p->m==0 &| 00001a00 26 20 69 2e 70 6c 75 72 61 6c 7e 3d 30 20 26 26 |& i.plural~=0 &&| 00001a10 20 6c 2e 70 6c 75 72 61 6c 7e 3d 30 29 0a 20 20 | l.plural~=0). | 00001a20 20 20 20 20 20 20 20 20 20 20 20 20 7b 20 20 20 | { | 00001a30 69 66 20 28 4c 69 73 74 45 71 75 61 6c 28 69 2c |if (ListEqual(i,| 00001a40 6c 29 3d 3d 31 29 0a 20 20 20 20 20 20 20 20 20 |l)==1). | 00001a50 20 20 20 20 20 20 20 20 20 7b 20 20 20 73 69 7a | { siz| 00001a60 65 73 5f 70 2d 3e 6e 20 3d 20 73 69 7a 65 73 5f |es_p->n = sizes_| 00001a70 70 2d 3e 6e 20 2b 20 31 3b 0a 20 20 20 20 20 20 |p->n + 1;. | 00001a80 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00001a90 63 6c 61 73 73 65 73 5f 70 2d 3e 6d 20 3d 20 6e |classes_p->m = n| 00001aa0 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |;. | 00001ab0 20 20 20 20 7d 0a 20 20 20 20 20 20 20 20 20 20 | }. | * 00001ad0 6e 2b 2b 3b 0a 20 20 20 20 20 20 7d 0a 20 20 6e |n++;. }. n| 00001ae0 2d 2d 3b 0a 0a 21 20 20 70 72 69 6e 74 20 22 4c |--;..! print "L| 00001af0 69 73 74 20 6f 66 20 22 2c 20 6e 2c 20 22 5e 22 |ist of ", n, "^"| 00001b00 3b 0a 21 20 20 66 6f 72 20 28 69 3d 31 3a 69 3c |;.! for (i=1:i<| 00001b10 3d 6e 3a 69 2b 2b 29 20 70 72 69 6e 74 20 22 43 |=n:i++) print "C| 00001b20 6c 61 73 73 20 22 2c 20 69 2c 20 22 20 68 61 73 |lass ", i, " has| 00001b30 20 22 2c 20 73 69 7a 65 73 5f 70 2d 3e 69 2c 20 | ", sizes_p->i, | 00001b40 22 2e 5e 22 3b 0a 21 20 20 66 6f 72 20 28 69 3d |".^";.! for (i=| 00001b50 6f 2c 6a 3d 30 3a 69 7e 3d 30 20 26 26 20 6a 3c |o,j=0:i~=0 && j<| 00001b60 36 34 3a 69 3d 4e 65 78 74 45 6e 74 72 79 28 69 |64:i=NextEntry(i| 00001b70 2c 64 65 70 74 68 29 2c 6a 2b 2b 29 0a 21 20 20 |,depth),j++).! | 00001b80 20 20 20 20 70 72 69 6e 74 20 6f 62 6a 65 63 74 | print object| 00001b90 20 69 2c 20 22 20 69 6e 20 63 6c 61 73 73 20 22 | i, " in class "| 00001ba0 2c 20 63 6c 61 73 73 65 73 5f 70 2d 3e 6a 2c 20 |, classes_p->j, | 00001bb0 22 5e 22 3b 0a 0a 20 20 66 6f 72 20 28 69 3d 31 |"^";.. for (i=1| 00001bc0 2c 20 6a 3d 6f 2c 20 6b 3d 30 3a 20 69 3c 3d 6e |, j=o, k=0: i<=n| 00001bd0 3a 20 69 2b 2b 29 0a 20 20 7b 20 20 20 0a 20 20 |: i++). { . | 00001be0 20 20 20 20 77 68 69 6c 65 20 28 28 28 63 6c 61 | while (((cla| 00001bf0 73 73 65 73 5f 70 2d 3e 6b 29 20 7e 3d 20 69 29 |sses_p->k) ~= i)| 00001c00 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 26 26 |. &&| 00001c10 20 28 28 63 6c 61 73 73 65 73 5f 70 2d 3e 6b 29 | ((classes_p->k)| 00001c20 20 7e 3d 20 2d 69 29 29 20 7b 20 6b 2b 2b 3b 20 | ~= -i)) { k++; | 00001c30 6a 3d 4e 65 78 74 45 6e 74 72 79 28 6a 2c 64 65 |j=NextEntry(j,de| 00001c40 70 74 68 29 3b 20 7d 0a 20 20 20 20 20 20 6d 3d |pth); }. m=| 00001c50 73 69 7a 65 73 5f 70 2d 3e 69 3b 0a 0a 20 20 20 |sizes_p->i;.. | 00001c60 20 20 20 57 72 69 74 65 42 65 66 6f 72 65 45 6e | WriteBeforeEn| 00001c70 74 72 79 28 6a 2c 64 65 70 74 68 29 3b 0a 0a 20 |try(j,depth);.. | 00001c80 20 20 20 20 20 69 66 20 28 6d 3d 3d 31 29 0a 20 | if (m==1). | 00001c90 20 20 20 20 20 7b 20 20 20 69 66 20 28 63 5f 73 | { if (c_s| 00001ca0 74 79 6c 65 20 26 20 44 45 46 41 52 54 5f 42 49 |tyle & DEFART_BI| 00001cb0 54 20 7e 3d 20 30 29 20 44 65 66 41 72 74 28 6a |T ~= 0) DefArt(j| 00001cc0 29 3b 20 65 6c 73 65 20 49 6e 44 65 66 41 72 74 |); else InDefArt| 00001cd0 28 6a 29 3b 0a 20 20 20 20 20 20 7d 0a 20 20 20 |(j);. }. | 00001ce0 20 20 20 65 6c 73 65 0a 20 20 20 20 20 20 7b 20 | else. { | 00001cf0 20 20 69 66 20 28 63 5f 73 74 79 6c 65 20 26 20 | if (c_style & | 00001d00 44 45 46 41 52 54 5f 42 49 54 20 7e 3d 20 30 29 |DEFART_BIT ~= 0)| 00001d10 20 70 72 69 6e 74 20 22 74 68 65 20 22 3b 0a 20 | print "the ";. | 00001d20 20 20 20 20 20 20 20 20 20 45 6e 67 6c 69 73 68 | English| 00001d30 4e 75 6d 62 65 72 28 6d 29 3b 20 70 72 69 6e 74 |Number(m); print| 00001d40 20 22 20 22 3b 0a 0a 20 20 20 20 20 20 20 20 20 | " ";.. | 00001d50 20 69 66 20 28 28 6a 2e 70 6c 75 72 61 6c 2d 23 | if ((j.plural-#| 00001d60 73 74 72 69 6e 67 73 5f 6f 66 66 73 65 74 29 3e |strings_offset)>| 00001d70 3d 30 29 20 70 72 69 6e 74 5f 70 61 64 64 72 20 |=0) print_paddr | 00001d80 6a 2e 70 6c 75 72 61 6c 3b 0a 20 20 20 20 20 20 |j.plural;. | 00001d90 20 20 20 20 65 6c 73 65 20 52 75 6e 52 6f 75 74 | else RunRout| 00001da0 69 6e 65 73 28 6a 2c 70 6c 75 72 61 6c 29 3b 0a |ines(j,plural);.| 00001db0 20 20 20 20 20 20 7d 0a 0a 20 20 20 20 20 20 57 | }.. W| 00001dc0 72 69 74 65 41 66 74 65 72 45 6e 74 72 79 28 6a |riteAfterEntry(j| 00001dd0 2c 64 65 70 74 68 2c 73 74 61 63 6b 5f 70 6f 69 |,depth,stack_poi| 00001de0 6e 74 65 72 29 3b 0a 0a 20 20 20 20 20 20 69 66 |nter);.. if| 00001df0 20 28 63 5f 73 74 79 6c 65 20 26 20 45 4e 47 4c | (c_style & ENGL| 00001e00 49 53 48 5f 42 49 54 20 7e 3d 20 30 29 0a 20 20 |ISH_BIT ~= 0). | 00001e10 20 20 20 20 7b 20 20 20 69 66 20 28 69 3d 3d 6e | { if (i==n| 00001e20 2d 31 29 20 70 72 69 6e 74 20 22 20 61 6e 64 20 |-1) print " and | 00001e30 22 3b 0a 20 20 20 20 20 20 20 20 20 20 69 66 20 |";. if | 00001e40 28 69 3c 6e 2d 31 29 20 70 72 69 6e 74 20 22 2c |(i<n-1) print ",| 00001e50 20 22 3b 0a 20 20 20 20 20 20 7d 0a 20 20 7d 0a | ";. }. }.| 00001e60 20 20 72 74 72 75 65 3b 0a 0a 20 20 2e 45 63 6f | rtrue;.. .Eco| 00001e70 6e 6f 6d 79 56 65 72 73 69 6f 6e 3b 0a 0a 20 20 |nomyVersion;.. | 00001e80 6e 3d 6a 3b 0a 0a 20 20 66 6f 72 20 28 69 3d 31 |n=j;.. for (i=1| 00001e90 2c 20 6a 3d 6f 3a 20 69 3c 3d 6e 3a 20 6a 3d 4e |, j=o: i<=n: j=N| 00001ea0 65 78 74 45 6e 74 72 79 28 6a 2c 64 65 70 74 68 |extEntry(j,depth| 00001eb0 29 2c 20 69 2b 2b 29 0a 20 20 7b 20 20 20 0a 20 |), i++). { . | 00001ec0 20 20 20 20 20 57 72 69 74 65 42 65 66 6f 72 65 | WriteBefore| 00001ed0 45 6e 74 72 79 28 6a 2c 64 65 70 74 68 29 3b 0a |Entry(j,depth);.| 00001ee0 0a 20 20 20 20 20 20 69 66 20 28 63 5f 73 74 79 |. if (c_sty| 00001ef0 6c 65 20 26 20 44 45 46 41 52 54 5f 42 49 54 20 |le & DEFART_BIT | 00001f00 7e 3d 20 30 29 20 44 65 66 41 72 74 28 6a 29 3b |~= 0) DefArt(j);| 00001f10 20 65 6c 73 65 20 49 6e 44 65 66 41 72 74 28 6a | else InDefArt(j| 00001f20 29 3b 0a 0a 20 20 20 20 20 20 57 72 69 74 65 41 |);.. WriteA| 00001f30 66 74 65 72 45 6e 74 72 79 28 6a 2c 64 65 70 74 |fterEntry(j,dept| 00001f40 68 2c 73 74 61 63 6b 5f 70 6f 69 6e 74 65 72 29 |h,stack_pointer)| 00001f50 3b 0a 0a 20 20 20 20 20 20 69 66 20 28 63 5f 73 |;.. if (c_s| 00001f60 74 79 6c 65 20 26 20 45 4e 47 4c 49 53 48 5f 42 |tyle & ENGLISH_B| 00001f70 49 54 20 7e 3d 20 30 29 0a 20 20 20 20 20 20 7b |IT ~= 0). {| 00001f80 20 20 20 69 66 20 28 69 3d 3d 6e 2d 31 29 20 70 | if (i==n-1) p| 00001f90 72 69 6e 74 20 22 20 61 6e 64 20 22 3b 0a 20 20 |rint " and ";. | 00001fa0 20 20 20 20 20 20 20 20 69 66 20 28 69 3c 6e 2d | if (i<n-| 00001fb0 31 29 20 70 72 69 6e 74 20 22 2c 20 22 3b 0a 20 |1) print ", ";. | 00001fc0 20 20 20 20 20 7d 0a 20 20 7d 0a 5d 3b 0a 0a 5b | }. }.];..[| 00001fd0 20 57 72 69 74 65 42 65 66 6f 72 65 45 6e 74 72 | WriteBeforeEntr| 00001fe0 79 20 6f 20 64 65 70 74 68 20 20 66 6c 61 67 3b |y o depth flag;| 00001ff0 0a 20 20 69 66 20 28 63 5f 73 74 79 6c 65 20 26 |. if (c_style &| 00002000 20 49 4e 44 45 4e 54 5f 42 49 54 20 7e 3d 20 30 | INDENT_BIT ~= 0| 00002010 29 20 73 70 61 63 65 73 20 32 2a 64 65 70 74 68 |) spaces 2*depth| 00002020 3b 0a 0a 20 20 69 66 20 28 63 5f 73 74 79 6c 65 |;.. if (c_style| 00002030 20 26 20 46 55 4c 4c 49 4e 56 5f 42 49 54 20 7e | & FULLINV_BIT ~| 00002040 3d 20 30 29 0a 20 20 7b 20 20 20 69 66 20 28 6f |= 0). { if (o| 00002050 2e 69 6e 76 65 6e 74 7e 3d 30 29 0a 20 20 20 20 |.invent~=0). | 00002060 20 20 7b 20 20 20 69 66 20 28 28 6f 2e 69 6e 76 | { if ((o.inv| 00002070 65 6e 74 2d 23 73 74 72 69 6e 67 73 5f 6f 66 66 |ent-#strings_off| 00002080 73 65 74 29 20 3e 3d 20 30 29 0a 20 20 20 20 20 |set) >= 0). | 00002090 20 20 20 20 20 7b 20 20 20 70 72 69 6e 74 5f 70 | { print_p| 000020a0 61 64 64 72 20 6f 2e 69 6e 76 65 6e 74 3b 0a 20 |addr o.invent;. | 000020b0 20 20 20 20 20 20 20 20 20 20 20 20 20 66 6c 61 | fla| 000020c0 67 3d 31 3b 0a 20 20 20 20 20 20 20 20 20 20 7d |g=1;. }| 000020d0 0a 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 0a |. else.| 000020e0 20 20 20 20 20 20 20 20 20 20 7b 20 20 20 69 6e | { in| 000020f0 76 65 6e 74 6f 72 79 5f 73 74 61 67 65 3d 31 3b |ventory_stage=1;| 00002100 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 66 |. f| 00002110 6c 61 67 3d 52 75 6e 52 6f 75 74 69 6e 65 73 28 |lag=RunRoutines(| 00002120 6f 2c 69 6e 76 65 6e 74 29 3b 0a 20 20 20 20 20 |o,invent);. | 00002130 20 20 20 20 20 7d 0a 20 20 20 20 20 20 7d 0a 20 | }. }. | 00002140 20 7d 0a 20 20 72 65 74 75 72 6e 20 66 6c 61 67 | }. return flag| 00002150 3b 0a 5d 3b 0a 0a 5b 20 57 72 69 74 65 41 66 74 |;.];..[ WriteAft| 00002160 65 72 45 6e 74 72 79 20 6f 20 64 65 70 74 68 20 |erEntry o depth | 00002170 73 74 61 63 6b 5f 70 20 20 66 6c 61 67 3b 0a 0a |stack_p flag;..| 00002180 20 20 69 66 20 28 63 5f 73 74 79 6c 65 20 26 20 | if (c_style & | 00002190 50 41 52 54 49 4e 56 5f 42 49 54 20 7e 3d 20 30 |PARTINV_BIT ~= 0| 000021a0 29 0a 20 20 7b 20 20 20 69 66 20 28 6f 20 68 61 |). { if (o ha| 000021b0 73 20 6c 69 67 68 74 20 26 26 20 6c 6f 63 61 74 |s light && locat| 000021c0 69 6f 6e 20 68 61 73 6e 74 20 6c 69 67 68 74 29 |ion hasnt light)| 000021d0 20 70 72 69 6e 74 20 22 20 28 70 72 6f 76 69 64 | print " (provid| 000021e0 69 6e 67 20 6c 69 67 68 74 29 22 3b 0a 20 20 20 |ing light)";. | 000021f0 20 20 20 69 66 20 28 6f 20 68 61 73 20 63 6f 6e | if (o has con| 00002200 74 61 69 6e 65 72 20 26 26 20 6f 20 68 61 73 6e |tainer && o hasn| 00002210 74 20 6f 70 65 6e 29 20 70 72 69 6e 74 20 22 20 |t open) print " | 00002220 28 77 68 69 63 68 20 69 73 20 63 6c 6f 73 65 64 |(which is closed| 00002230 29 22 3b 0a 20 20 20 20 20 20 69 66 20 28 28 6f |)";. if ((o| 00002240 20 68 61 73 20 63 6f 6e 74 61 69 6e 65 72 20 26 | has container &| 00002250 26 20 28 6f 20 68 61 73 20 6f 70 65 6e 20 7c 7c |& (o has open ||| 00002260 20 6f 20 68 61 73 20 74 72 61 6e 73 70 61 72 65 | o has transpare| 00002270 6e 74 29 29 0a 20 20 20 20 20 20 20 20 20 20 26 |nt)). &| 00002280 26 20 28 63 68 69 6c 64 28 6f 29 3d 3d 30 29 29 |& (child(o)==0))| 00002290 20 70 72 69 6e 74 20 22 20 28 77 68 69 63 68 20 | print " (which | 000022a0 69 73 20 65 6d 70 74 79 29 22 3b 0a 20 20 7d 0a |is empty)";. }.| 000022b0 0a 20 20 69 66 20 28 63 5f 73 74 79 6c 65 20 26 |. if (c_style &| 000022c0 20 46 55 4c 4c 49 4e 56 5f 42 49 54 20 7e 3d 20 | FULLINV_BIT ~= | 000022d0 30 29 0a 20 20 7b 20 20 20 69 66 20 28 6f 2e 69 |0). { if (o.i| 000022e0 6e 76 65 6e 74 20 7e 3d 20 30 29 0a 20 20 20 20 |nvent ~= 0). | 000022f0 20 20 7b 20 20 20 69 6e 76 65 6e 74 6f 72 79 5f | { inventory_| 00002300 73 74 61 67 65 3d 32 3b 0a 20 20 20 20 20 20 20 |stage=2;. | 00002310 20 20 20 69 66 20 28 52 75 6e 52 6f 75 74 69 6e | if (RunRoutin| 00002320 65 73 28 6f 2c 69 6e 76 65 6e 74 29 7e 3d 30 29 |es(o,invent)~=0)| 00002330 0a 20 20 20 20 20 20 20 20 20 20 7b 20 20 20 69 |. { i| 00002340 66 20 28 63 5f 73 74 79 6c 65 20 26 20 4e 45 57 |f (c_style & NEW| 00002350 4c 49 4e 45 5f 42 49 54 20 7e 3d 20 30 29 20 6e |LINE_BIT ~= 0) n| 00002360 65 77 5f 6c 69 6e 65 3b 0a 20 20 20 20 20 20 20 |ew_line;. | 00002370 20 20 20 20 20 20 20 72 74 72 75 65 3b 0a 20 20 | rtrue;. | 00002380 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 | }. | 00002390 7d 0a 20 20 20 20 20 20 69 66 20 28 6f 20 68 61 |}. if (o ha| 000023a0 73 20 6c 69 67 68 74 29 20 70 72 69 6e 74 20 22 |s light) print "| 000023b0 20 28 70 72 6f 76 69 64 69 6e 67 20 6c 69 67 68 | (providing ligh| 000023c0 74 29 22 3b 0a 20 20 20 20 20 20 69 66 20 28 6f |t)";. if (o| 000023d0 20 68 61 73 20 77 6f 72 6e 29 20 20 70 72 69 6e | has worn) prin| 000023e0 74 20 22 20 28 62 65 69 6e 67 20 77 6f 72 6e 29 |t " (being worn)| 000023f0 22 3b 0a 20 20 20 20 20 20 69 66 20 28 6f 20 68 |";. if (o h| 00002400 61 73 20 63 6f 6e 74 61 69 6e 65 72 29 0a 20 20 |as container). | 00002410 20 20 20 20 7b 20 20 20 70 72 69 6e 74 20 22 20 | { print " | 00002420 28 77 68 69 63 68 20 69 73 20 22 3b 0a 20 20 20 |(which is ";. | 00002430 20 20 20 20 20 20 20 69 66 20 28 6f 20 68 61 73 | if (o has| 00002440 20 6f 70 65 6e 29 0a 20 20 20 20 20 20 20 20 20 | open). | 00002450 20 7b 20 20 20 70 72 69 6e 74 20 22 6f 70 65 6e | { print "open| 00002460 22 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |";. | 00002470 20 69 66 20 28 63 68 69 6c 64 28 6f 29 3d 3d 30 | if (child(o)==0| 00002480 29 20 70 72 69 6e 74 20 22 20 62 75 74 20 65 6d |) print " but em| 00002490 70 74 79 22 3b 0a 20 20 20 20 20 20 20 20 20 20 |pty";. | 000024a0 7d 0a 20 20 20 20 20 20 20 20 20 20 65 6c 73 65 |}. else| 000024b0 20 70 72 69 6e 74 20 22 63 6c 6f 73 65 64 22 3b | print "closed";| 000024c0 0a 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6f |. if (o| 000024d0 20 68 61 73 20 6c 6f 63 6b 61 62 6c 65 20 26 26 | has lockable &&| 000024e0 20 6f 20 68 61 73 20 6c 6f 63 6b 65 64 29 20 70 | o has locked) p| 000024f0 72 69 6e 74 20 22 20 61 6e 64 20 6c 6f 63 6b 65 |rint " and locke| 00002500 64 22 3b 0a 20 20 20 20 20 20 20 20 20 20 70 72 |d";. pr| 00002510 69 6e 74 20 22 29 22 3b 0a 20 20 20 20 20 20 7d |int ")";. }| 00002520 0a 20 20 7d 0a 0a 20 20 69 66 20 28 63 5f 73 74 |. }.. if (c_st| 00002530 79 6c 65 20 26 20 41 4c 57 41 59 53 5f 42 49 54 |yle & ALWAYS_BIT| 00002540 20 7e 3d 20 30 20 26 26 20 63 68 69 6c 64 28 6f | ~= 0 && child(o| 00002550 29 7e 3d 30 29 0a 20 20 7b 20 20 20 69 66 20 28 |)~=0). { if (| 00002560 63 5f 73 74 79 6c 65 20 26 20 45 4e 47 4c 49 53 |c_style & ENGLIS| 00002570 48 5f 42 49 54 20 7e 3d 20 30 29 20 70 72 69 6e |H_BIT ~= 0) prin| 00002580 74 20 22 20 63 6f 6e 74 61 69 6e 69 6e 67 20 22 |t " containing "| 00002590 3b 0a 20 20 20 20 20 20 66 6c 61 67 3d 31 3b 0a |;. flag=1;.| 000025a0 20 20 7d 0a 0a 20 20 69 66 20 28 63 5f 73 74 79 | }.. if (c_sty| 000025b0 6c 65 20 26 20 52 45 43 55 52 53 45 5f 42 49 54 |le & RECURSE_BIT| 000025c0 20 7e 3d 20 31 20 26 26 20 63 68 69 6c 64 28 6f | ~= 1 && child(o| 000025d0 29 7e 3d 30 29 0a 20 20 7b 20 20 20 69 66 20 28 |)~=0). { if (| 000025e0 6f 20 68 61 73 20 73 75 70 70 6f 72 74 65 72 29 |o has supporter)| 000025f0 0a 20 20 20 20 20 20 7b 20 20 20 69 66 20 28 63 |. { if (c| 00002600 5f 73 74 79 6c 65 20 26 20 45 4e 47 4c 49 53 48 |_style & ENGLISH| 00002610 5f 42 49 54 20 7e 3d 20 30 29 0a 20 20 20 20 20 |_BIT ~= 0). | 00002620 20 20 20 20 20 7b 20 20 20 69 66 20 28 63 5f 73 | { if (c_s| 00002630 74 79 6c 65 20 26 20 54 45 52 53 45 5f 42 49 54 |tyle & TERSE_BIT| 00002640 20 7e 3d 20 30 29 0a 20 20 20 20 20 20 20 20 20 | ~= 0). | 00002650 20 20 20 20 20 70 72 69 6e 74 20 22 20 28 6f 6e | print " (on| 00002660 20 22 3b 20 65 6c 73 65 20 70 72 69 6e 74 20 22 | "; else print "| 00002670 2c 20 6f 6e 20 74 6f 70 20 6f 66 20 22 3b 0a 20 |, on top of ";. | 00002680 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 20 | if | 00002690 28 6f 20 68 61 73 20 61 6e 69 6d 61 74 65 29 20 |(o has animate) | 000026a0 70 72 69 6e 74 20 22 77 68 6f 6d 20 22 3b 20 65 |print "whom "; e| 000026b0 6c 73 65 20 70 72 69 6e 74 20 22 77 68 69 63 68 |lse print "which| 000026c0 20 22 3b 0a 20 20 20 20 20 20 20 20 20 20 7d 0a | ";. }.| 000026d0 20 20 20 20 20 20 20 20 20 20 66 6c 61 67 3d 31 | flag=1| 000026e0 3b 0a 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 |;. }. | 000026f0 69 66 20 28 6f 20 68 61 73 20 63 6f 6e 74 61 69 |if (o has contai| 00002700 6e 65 72 20 26 26 20 28 6f 20 68 61 73 20 6f 70 |ner && (o has op| 00002710 65 6e 20 7c 7c 20 6f 20 68 61 73 20 74 72 61 6e |en || o has tran| 00002720 73 70 61 72 65 6e 74 29 29 0a 20 20 20 20 20 20 |sparent)). | 00002730 7b 20 20 20 69 66 20 28 63 5f 73 74 79 6c 65 20 |{ if (c_style | 00002740 26 20 45 4e 47 4c 49 53 48 5f 42 49 54 20 7e 3d |& ENGLISH_BIT ~=| 00002750 20 30 29 0a 20 20 20 20 20 20 20 20 20 20 7b 20 | 0). { | 00002760 20 20 69 66 20 28 63 5f 73 74 79 6c 65 20 26 20 | if (c_style & | 00002770 54 45 52 53 45 5f 42 49 54 20 7e 3d 20 30 29 0a |TERSE_BIT ~= 0).| 00002780 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00002790 20 20 70 72 69 6e 74 20 22 20 28 69 6e 20 22 3b | print " (in ";| 000027a0 20 65 6c 73 65 20 70 72 69 6e 74 20 22 2c 20 69 | else print ", i| 000027b0 6e 73 69 64 65 20 22 3b 0a 20 20 20 20 20 20 20 |nside ";. | 000027c0 20 20 20 20 20 20 20 69 66 20 28 6f 20 68 61 73 | if (o has| 000027d0 20 61 6e 69 6d 61 74 65 29 20 70 72 69 6e 74 20 | animate) print | 000027e0 22 77 68 6f 6d 20 22 3b 20 65 6c 73 65 20 70 72 |"whom "; else pr| 000027f0 69 6e 74 20 22 77 68 69 63 68 20 22 3b 0a 20 20 |int "which ";. | 00002800 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 | }. | 00002810 20 20 20 20 66 6c 61 67 3d 31 3b 0a 20 20 20 20 | flag=1;. | 00002820 20 20 7d 0a 20 20 7d 0a 0a 20 20 69 66 20 28 66 | }. }.. if (f| 00002830 6c 61 67 3d 3d 31 20 26 26 20 63 5f 73 74 79 6c |lag==1 && c_styl| 00002840 65 20 26 20 45 4e 47 4c 49 53 48 5f 42 49 54 20 |e & ENGLISH_BIT | 00002850 7e 3d 20 30 29 0a 20 20 7b 20 20 20 69 66 20 28 |~= 0). { if (| 00002860 63 68 69 6c 64 72 65 6e 28 6f 29 20 3e 20 31 29 |children(o) > 1)| 00002870 20 70 72 69 6e 74 20 22 61 72 65 20 22 3b 20 65 | print "are "; e| 00002880 6c 73 65 20 70 72 69 6e 74 20 22 69 73 20 22 3b |lse print "is ";| 00002890 0a 20 20 7d 0a 0a 20 20 69 66 20 28 63 5f 73 74 |. }.. if (c_st| 000028a0 79 6c 65 20 26 20 4e 45 57 4c 49 4e 45 5f 42 49 |yle & NEWLINE_BI| 000028b0 54 20 7e 3d 20 30 29 20 6e 65 77 5f 6c 69 6e 65 |T ~= 0) new_line| 000028c0 3b 0a 0a 20 20 69 66 20 28 66 6c 61 67 3d 3d 31 |;.. if (flag==1| 000028d0 29 20 57 72 69 74 65 4c 69 73 74 52 28 63 68 69 |) WriteListR(chi| 000028e0 6c 64 28 6f 29 2c 64 65 70 74 68 2b 31 2c 73 74 |ld(o),depth+1,st| 000028f0 61 63 6b 5f 70 29 3b 0a 0a 20 20 69 66 20 28 66 |ack_p);.. if (f| 00002900 6c 61 67 3d 3d 31 20 26 26 20 63 5f 73 74 79 6c |lag==1 && c_styl| 00002910 65 20 26 20 54 45 52 53 45 5f 42 49 54 20 7e 3d |e & TERSE_BIT ~=| 00002920 20 30 29 20 70 72 69 6e 74 20 22 29 22 3b 0a 5d | 0) print ")";.]| 00002930 3b 0a 0a 21 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |;..! -----------| 00002940 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002980 2d 0a 21 20 20 20 41 20 63 75 6e 6e 69 6e 67 20 |-.! A cunning | 00002990 72 6f 75 74 69 6e 65 20 28 77 68 69 63 68 20 63 |routine (which c| 000029a0 6f 75 6c 64 20 68 61 76 65 20 62 65 65 6e 20 61 |ould have been a| 000029b0 20 64 61 65 6d 6f 6e 2c 20 62 75 74 20 69 73 6e | daemon, but isn| 000029c0 27 74 2c 20 66 6f 72 20 74 68 65 0a 21 20 20 20 |'t, for the.! | 000029d0 73 61 6b 65 20 6f 66 20 65 66 66 69 63 69 65 6e |sake of efficien| 000029e0 63 79 29 20 74 6f 20 6d 6f 76 65 20 6f 62 6a 65 |cy) to move obje| 000029f0 63 74 73 20 77 68 69 63 68 20 63 6f 75 6c 64 20 |cts which could | 00002a00 62 65 20 69 6e 20 6d 61 6e 79 20 72 6f 6f 6d 73 |be in many rooms| 00002a10 20 61 62 6f 75 74 0a 21 20 20 20 73 6f 20 74 68 | about.! so th| 00002a20 61 74 20 74 68 65 20 70 6c 61 79 65 72 20 6e 65 |at the player ne| 00002a30 76 65 72 20 63 61 74 63 68 65 73 20 6f 6e 65 20 |ver catches one | 00002a40 6e 6f 74 20 69 6e 20 70 6c 61 63 65 0a 21 20 2d |not in place.! -| 00002a50 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002a90 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 5b 20 4d |-----------..[ M| 00002aa0 6f 76 65 46 6c 6f 61 74 69 6e 67 4f 62 6a 65 63 |oveFloatingObjec| 00002ab0 74 73 20 70 6c 61 63 65 20 69 20 6b 20 6c 20 61 |ts place i k l a| 00002ac0 64 64 72 65 73 73 3b 0a 20 20 66 6f 72 20 28 69 |ddress;. for (i| 00002ad0 3d 73 65 6c 66 6f 62 6a 2b 31 3a 20 69 3c 3d 74 |=selfobj+1: i<=t| 00002ae0 6f 70 5f 6f 62 6a 65 63 74 3a 20 69 2b 2b 29 0a |op_object: i++).| 00002af0 20 20 7b 20 20 20 61 64 64 72 65 73 73 3d 69 2e | { address=i.| 00002b00 26 66 6f 75 6e 64 5f 69 6e 3b 0a 20 20 20 20 20 |&found_in;. | 00002b10 20 69 66 20 28 61 64 64 72 65 73 73 7e 3d 30 20 | if (address~=0 | 00002b20 26 26 20 69 20 68 61 73 6e 74 20 61 62 73 65 6e |&& i hasnt absen| 00002b30 74 29 0a 20 20 20 20 20 20 7b 20 20 20 6b 3d 69 |t). { k=i| 00002b40 2e 23 66 6f 75 6e 64 5f 69 6e 3b 0a 20 20 20 20 |.#found_in;. | 00002b50 20 20 20 20 20 20 66 6f 72 20 28 6c 3d 30 3a 20 | for (l=0: | 00002b60 6c 3c 6b 2f 32 3a 20 6c 2b 2b 29 0a 20 20 20 20 |l<k/2: l++). | 00002b70 20 20 20 20 20 20 20 20 20 20 69 66 20 28 70 6c | if (pl| 00002b80 61 63 65 3d 3d 61 64 64 72 65 73 73 2d 2d 3e 6c |ace==address-->l| 00002b90 29 20 6d 6f 76 65 20 69 20 74 6f 20 70 6c 61 63 |) move i to plac| 00002ba0 65 3b 0a 20 20 20 20 20 20 7d 0a 20 20 7d 0a 5d |e;. }. }.]| 00002bb0 3b 0a 0a 21 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |;..! -----------| 00002bc0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002c00 2d 0a 21 20 20 20 54 77 6f 20 6c 69 74 74 6c 65 |-.! Two little| 00002c10 20 72 6f 75 74 69 6e 65 73 20 66 6f 72 20 6d 6f | routines for mo| 00002c20 76 69 6e 67 20 74 68 65 20 70 6c 61 79 65 72 20 |ving the player | 00002c30 73 61 66 65 6c 79 2e 0a 21 20 2d 2d 2d 2d 2d 2d |safely..! ------| 00002c40 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002c80 2d 2d 2d 2d 2d 2d 0a 0a 5b 20 50 6c 61 79 65 72 |------..[ Player| 00002c90 54 6f 20 6e 65 77 70 6c 61 63 65 20 66 6c 61 67 |To newplace flag| 00002ca0 3b 0a 20 20 6d 6f 76 65 20 70 6c 61 79 65 72 20 |;. move player | 00002cb0 74 6f 20 6e 65 77 70 6c 61 63 65 3b 20 6c 6f 63 |to newplace; loc| 00002cc0 61 74 69 6f 6e 3d 6e 65 77 70 6c 61 63 65 3b 0a |ation=newplace;.| 00002cd0 20 20 72 65 61 6c 5f 6c 6f 63 61 74 69 6f 6e 3d | real_location=| 00002ce0 6c 6f 63 61 74 69 6f 6e 3b 0a 20 20 41 64 6a 75 |location;. Adju| 00002cf0 73 74 4c 69 67 68 74 28 31 29 3b 0a 20 20 69 66 |stLight(1);. if| 00002d00 20 28 66 6c 61 67 3d 3d 30 29 20 3c 4c 6f 6f 6b | (flag==0) <Look| 00002d10 3e 3b 0a 5d 3b 0a 0a 5b 20 4d 6f 76 65 50 6c 61 |>;.];..[ MovePla| 00002d20 79 65 72 20 64 69 72 65 63 3b 20 3c 47 6f 20 64 |yer direc; <Go d| 00002d30 69 72 65 63 3e 3b 20 3c 4c 6f 6f 6b 3e 3b 20 5d |irec>; <Look>; ]| 00002d40 3b 0a 0a 21 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |;..! -----------| 00002d50 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002d90 2d 0a 21 20 20 20 54 68 65 20 68 61 6e 64 79 20 |-.! The handy | 00002da0 59 65 73 4f 72 4e 6f 20 72 6f 75 74 69 6e 65 2c |YesOrNo routine,| 00002db0 20 61 6e 64 20 73 6f 6d 65 20 22 6d 65 74 61 22 | and some "meta"| 00002dc0 20 76 65 72 62 73 0a 21 20 2d 2d 2d 2d 2d 2d 2d | verbs.! -------| 00002dd0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00002e10 2d 2d 2d 2d 2d 0a 0a 5b 20 59 65 73 4f 72 4e 6f |-----..[ YesOrNo| 00002e20 20 69 3b 0a 20 20 66 6f 72 20 28 3a 3a 29 0a 20 | i;. for (::). | 00002e30 20 7b 20 20 20 72 65 61 64 20 62 75 66 66 65 72 | { read buffer| 00002e40 20 70 61 72 73 65 3b 0a 20 20 20 20 20 20 69 3d | parse;. i=| 00002e50 70 61 72 73 65 2d 2d 3e 31 3b 0a 20 20 20 20 20 |parse-->1;. | 00002e60 20 69 66 20 28 69 3d 3d 27 79 65 73 27 20 6f 72 | if (i=='yes' or| 00002e70 20 23 6e 24 79 29 20 72 74 72 75 65 3b 0a 20 20 | #n$y) rtrue;. | 00002e80 20 20 20 20 69 66 20 28 69 3d 3d 27 6e 6f 27 20 | if (i=='no' | 00002e90 6f 72 20 23 6e 24 6e 29 20 72 66 61 6c 73 65 3b |or #n$n) rfalse;| 00002ea0 0a 20 20 20 20 20 20 70 72 69 6e 74 20 22 50 6c |. print "Pl| 00002eb0 65 61 73 65 20 61 6e 73 77 65 72 20 79 65 73 20 |ease answer yes | 00002ec0 6f 72 20 6e 6f 2e 3e 20 22 3b 0a 20 20 7d 0a 5d |or no.> ";. }.]| 00002ed0 3b 0a 0a 5b 20 51 75 69 74 53 75 62 3b 0a 20 20 |;..[ QuitSub;. | 00002ee0 70 72 69 6e 74 20 22 41 72 65 20 79 6f 75 20 73 |print "Are you s| 00002ef0 75 72 65 20 79 6f 75 20 77 61 6e 74 20 74 6f 20 |ure you want to | 00002f00 71 75 69 74 3f 20 22 3b 0a 20 20 69 66 20 28 59 |quit? ";. if (Y| 00002f10 65 73 4f 72 4e 6f 28 29 7e 3d 30 29 20 71 75 69 |esOrNo()~=0) qui| 00002f20 74 3b 0a 5d 3b 0a 0a 5b 20 52 65 73 74 61 72 74 |t;.];..[ Restart| 00002f30 53 75 62 3b 0a 20 20 70 72 69 6e 74 20 22 41 72 |Sub;. print "Ar| 00002f40 65 20 79 6f 75 20 73 75 72 65 20 79 6f 75 20 77 |e you sure you w| 00002f50 61 6e 74 20 74 6f 20 72 65 73 74 61 72 74 3f 20 |ant to restart? | 00002f60 22 3b 0a 20 20 69 66 20 28 59 65 73 4f 72 4e 6f |";. if (YesOrNo| 00002f70 28 29 7e 3d 30 29 20 7b 20 72 65 73 74 61 72 74 |()~=0) { restart| 00002f80 3b 20 22 46 61 69 6c 65 64 2e 22 3b 20 7d 0a 5d |; "Failed."; }.]| 00002f90 3b 0a 0a 5b 20 52 65 73 74 6f 72 65 53 75 62 3b |;..[ RestoreSub;| 00002fa0 0a 20 20 72 65 73 74 6f 72 65 20 52 6d 61 79 62 |. restore Rmayb| 00002fb0 65 3b 0a 20 20 22 52 65 73 74 6f 72 65 20 66 61 |e;. "Restore fa| 00002fc0 69 6c 65 64 2e 22 3b 0a 20 20 2e 52 4d 61 79 62 |iled.";. .RMayb| 00002fd0 65 3b 20 70 72 69 6e 74 20 22 4f 6b 2e 5e 22 3b |e; print "Ok.^";| 00002fe0 0a 5d 3b 0a 0a 5b 20 53 61 76 65 53 75 62 3b 0a |.];..[ SaveSub;.| 00002ff0 20 20 73 61 76 65 20 53 6d 61 79 62 65 3b 0a 20 | save Smaybe;. | 00003000 20 22 53 61 76 65 20 66 61 69 6c 65 64 2e 22 3b | "Save failed.";| 00003010 0a 20 20 2e 53 6d 61 79 62 65 3b 20 70 72 69 6e |. .Smaybe; prin| 00003020 74 20 22 4f 6b 2e 5e 22 3b 0a 5d 3b 0a 0a 5b 20 |t "Ok.^";.];..[ | 00003030 56 65 72 69 66 79 53 75 62 3b 0a 20 20 76 65 72 |VerifySub;. ver| 00003040 69 66 79 20 56 6d 61 79 62 65 3b 0a 20 20 6a 75 |ify Vmaybe;. ju| 00003050 6d 70 20 56 77 72 6f 6e 67 3b 0a 20 20 2e 56 6d |mp Vwrong;. .Vm| 00003060 61 79 62 65 3b 20 22 54 68 65 20 67 61 6d 65 20 |aybe; "The game | 00003070 66 69 6c 65 20 68 61 73 20 76 65 72 69 66 69 65 |file has verifie| 00003080 64 20 61 73 20 69 6e 74 61 63 74 2e 22 3b 0a 20 |d as intact.";. | 00003090 20 2e 56 77 72 6f 6e 67 3b 0a 20 20 22 54 68 65 | .Vwrong;. "The| 000030a0 20 67 61 6d 65 20 66 69 6c 65 20 64 69 64 20 6e | game file did n| 000030b0 6f 74 20 76 65 72 69 66 79 20 70 72 6f 70 65 72 |ot verify proper| 000030c0 6c 79 2c 20 61 6e 64 20 6d 61 79 20 62 65 20 63 |ly, and may be c| 000030d0 6f 72 72 75 70 74 65 64 20 5c 0a 20 20 20 20 20 |orrupted \. | 000030e0 20 20 20 20 20 20 20 20 28 75 6e 6c 65 73 73 20 | (unless | 000030f0 79 6f 75 20 61 72 65 20 72 75 6e 6e 69 6e 67 20 |you are running | 00003100 69 74 20 6f 6e 20 61 20 70 72 69 6d 69 74 69 76 |it on a primitiv| 00003110 65 20 69 6e 74 65 72 70 72 65 74 65 72 20 77 68 |e interpreter wh| 00003120 69 63 68 20 5c 0a 20 20 20 20 20 20 20 20 20 20 |ich \. | 00003130 20 20 20 64 6f 65 73 20 6e 6f 74 20 70 72 6f 70 | does not prop| 00003140 65 72 6c 79 20 69 6d 70 6c 65 6d 65 6e 74 20 74 |erly implement t| 00003150 68 65 20 56 45 52 49 46 59 20 63 6f 64 65 29 2e |he VERIFY code).| 00003160 22 3b 0a 5d 3b 0a 0a 5b 20 53 63 72 69 70 74 4f |";.];..[ ScriptO| 00003170 6e 53 75 62 3b 0a 20 20 69 66 20 28 74 72 61 6e |nSub;. if (tran| 00003180 73 63 72 69 70 74 5f 6d 6f 64 65 3d 3d 31 29 20 |script_mode==1) | 00003190 22 54 72 61 6e 73 63 72 69 70 74 69 6e 67 20 69 |"Transcripting i| 000031a0 73 20 61 6c 72 65 61 64 79 20 6f 6e 2e 22 3b 0a |s already on.";.| 000031b0 20 20 74 72 61 6e 73 63 72 69 70 74 5f 6d 6f 64 | transcript_mod| 000031c0 65 3d 31 3b 0a 20 20 30 2d 2d 3e 38 20 3d 20 28 |e=1;. 0-->8 = (| 000031d0 30 2d 2d 3e 38 29 7c 31 3b 0a 20 20 70 72 69 6e |0-->8)|1;. prin| 000031e0 74 20 22 53 74 61 72 74 20 6f 66 20 61 20 74 72 |t "Start of a tr| 000031f0 61 6e 73 63 72 69 70 74 20 6f 66 5e 22 3b 0a 20 |anscript of^";. | 00003200 20 42 61 6e 6e 65 72 28 29 3b 0a 5d 3b 0a 0a 5b | Banner();.];..[| 00003210 20 53 63 72 69 70 74 4f 66 66 53 75 62 3b 0a 20 | ScriptOffSub;. | 00003220 20 69 66 20 28 74 72 61 6e 73 63 72 69 70 74 5f | if (transcript_| 00003230 6d 6f 64 65 3d 3d 30 29 20 22 54 72 61 6e 73 63 |mode==0) "Transc| 00003240 72 69 70 74 69 6e 67 20 69 73 20 61 6c 72 65 61 |ripting is alrea| 00003250 64 79 20 6f 66 66 2e 22 3b 0a 20 20 70 72 69 6e |dy off.";. prin| 00003260 74 20 22 5e 45 6e 64 20 6f 66 20 74 72 61 6e 73 |t "^End of trans| 00003270 63 72 69 70 74 2e 5e 22 3b 0a 20 20 74 72 61 6e |cript.^";. tran| 00003280 73 63 72 69 70 74 5f 6d 6f 64 65 3d 30 3b 0a 20 |script_mode=0;. | 00003290 20 30 2d 2d 3e 38 20 3d 20 28 30 2d 2d 3e 38 29 | 0-->8 = (0-->8)| 000032a0 26 24 66 66 66 65 3b 0a 5d 3b 0a 0a 5b 20 4e 6f |&$fffe;.];..[ No| 000032b0 74 69 66 79 4f 6e 53 75 62 3b 20 6e 6f 74 69 66 |tifyOnSub; notif| 000032c0 79 5f 6d 6f 64 65 3d 31 3b 20 22 53 63 6f 72 65 |y_mode=1; "Score| 000032d0 20 6e 6f 74 69 66 69 63 61 74 69 6f 6e 20 6f 6e | notification on| 000032e0 2e 22 3b 20 5d 3b 0a 5b 20 4e 6f 74 69 66 79 4f |."; ];.[ NotifyO| 000032f0 66 66 53 75 62 3b 20 6e 6f 74 69 66 79 5f 6d 6f |ffSub; notify_mo| 00003300 64 65 3d 30 3b 20 22 53 63 6f 72 65 20 6e 6f 74 |de=0; "Score not| 00003310 69 66 69 63 61 74 69 6f 6e 20 6f 66 66 2e 22 3b |ification off.";| 00003320 20 5d 3b 0a 0a 21 20 2d 2d 2d 2d 2d 2d 2d 2d 2d | ];..! ---------| 00003330 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00003370 2d 2d 2d 0a 21 20 20 20 54 68 65 20 73 63 6f 72 |---.! The scor| 00003380 69 6e 67 20 73 79 73 74 65 6d 0a 21 20 2d 2d 2d |ing system.! ---| 00003390 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000033d0 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 23 49 46 4e 44 |---------..#IFND| 000033e0 45 46 20 74 61 73 6b 5f 73 63 6f 72 65 73 3b 0a |EF task_scores;.| 000033f0 47 6c 6f 62 61 6c 20 74 61 73 6b 5f 73 63 6f 72 |Global task_scor| 00003400 65 73 20 69 6e 69 74 69 61 6c 20 30 3b 0a 23 45 |es initial 0;.#E| 00003410 4e 44 49 46 3b 0a 0a 5b 20 53 63 6f 72 65 53 75 |NDIF;..[ ScoreSu| 00003420 62 3b 0a 20 20 69 66 20 28 64 65 61 64 66 6c 61 |b;. if (deadfla| 00003430 67 3d 3d 30 29 0a 20 20 20 20 20 20 20 70 72 69 |g==0). pri| 00003440 6e 74 20 22 59 6f 75 20 68 61 76 65 20 73 6f 20 |nt "You have so | 00003450 66 61 72 20 73 63 6f 72 65 64 20 22 3b 0a 20 20 |far scored ";. | 00003460 65 6c 73 65 20 70 72 69 6e 74 20 22 49 6e 20 74 |else print "In t| 00003470 68 61 74 20 67 61 6d 65 20 79 6f 75 20 73 63 6f |hat game you sco| 00003480 72 65 64 20 22 3b 0a 0a 20 20 70 72 69 6e 74 20 |red ";.. print | 00003490 73 63 6f 72 65 2c 20 22 20 6f 75 74 20 6f 66 20 |score, " out of | 000034a0 61 20 70 6f 73 73 69 62 6c 65 20 22 2c 20 4d 41 |a possible ", MA| 000034b0 58 5f 53 43 4f 52 45 2c 20 22 2c 20 69 6e 20 22 |X_SCORE, ", in "| 000034c0 2c 20 74 75 72 6e 73 2c 20 22 20 74 75 72 6e 73 |, turns, " turns| 000034d0 22 3b 0a 0a 20 20 50 72 69 6e 74 52 61 6e 6b 28 |";.. PrintRank(| 000034e0 29 3b 0a 5d 3b 0a 0a 47 6c 6f 62 61 6c 20 74 61 |);.];..Global ta| 000034f0 73 6b 5f 64 6f 6e 65 20 64 61 74 61 20 4e 55 4d |sk_done data NUM| 00003500 42 45 52 5f 54 41 53 4b 53 3b 0a 0a 5b 20 41 63 |BER_TASKS;..[ Ac| 00003510 68 69 65 76 65 64 20 6e 75 6d 3b 0a 20 20 69 66 |hieved num;. if| 00003520 20 28 74 61 73 6b 5f 64 6f 6e 65 2d 3e 6e 75 6d | (task_done->num| 00003530 3d 3d 30 29 0a 20 20 7b 20 20 20 74 61 73 6b 5f |==0). { task_| 00003540 64 6f 6e 65 2d 3e 6e 75 6d 3d 31 3b 20 73 63 6f |done->num=1; sco| 00003550 72 65 3d 73 63 6f 72 65 2b 74 61 73 6b 5f 73 63 |re=score+task_sc| 00003560 6f 72 65 73 2d 3e 6e 75 6d 3b 0a 20 20 7d 0a 5d |ores->num;. }.]| 00003570 3b 0a 0a 5b 20 50 41 4e 75 6d 20 6d 20 6e 3b 0a |;..[ PANum m n;.| 00003580 20 20 70 72 69 6e 74 20 22 20 20 22 3b 0a 20 20 | print " ";. | 00003590 6e 3d 6d 3b 0a 20 20 69 66 20 28 6e 3c 30 29 20 |n=m;. if (n<0) | 000035a0 20 20 20 7b 20 6e 3d 2d 6d 3b 20 6e 3d 6e 2a 31 | { n=-m; n=n*1| 000035b0 30 3b 20 7d 0a 20 20 69 66 20 28 6e 3c 31 30 29 |0; }. if (n<10)| 000035c0 20 20 20 7b 20 70 72 69 6e 74 20 22 20 20 20 22 | { print " "| 000035d0 3b 20 6a 75 6d 70 20 70 61 6e 75 6d 6c 3b 20 7d |; jump panuml; }| 000035e0 0a 20 20 69 66 20 28 6e 3c 31 30 30 29 20 20 7b |. if (n<100) {| 000035f0 20 70 72 69 6e 74 20 22 20 20 22 3b 20 6a 75 6d | print " "; jum| 00003600 70 20 70 61 6e 75 6d 6c 3b 20 7d 0a 20 20 69 66 |p panuml; }. if| 00003610 20 28 6e 3c 31 30 30 30 29 20 7b 20 70 72 69 6e | (n<1000) { prin| 00003620 74 20 22 20 22 3b 20 7d 0a 2e 70 61 6e 75 6d 6c |t " "; }..panuml| 00003630 3b 0a 20 20 70 72 69 6e 74 20 6d 2c 20 22 20 22 |;. print m, " "| 00003640 3b 0a 5d 3b 0a 0a 5b 20 46 75 6c 6c 53 63 6f 72 |;.];..[ FullScor| 00003650 65 53 75 62 20 69 3b 0a 20 20 53 63 6f 72 65 53 |eSub i;. ScoreS| 00003660 75 62 28 29 3b 0a 20 20 69 66 20 28 73 63 6f 72 |ub();. if (scor| 00003670 65 3d 3d 30 20 7c 7c 20 54 41 53 4b 53 5f 50 52 |e==0 || TASKS_PR| 00003680 4f 56 49 44 45 44 3d 3d 31 29 20 72 66 61 6c 73 |OVIDED==1) rfals| 00003690 65 3b 0a 20 20 6e 65 77 5f 6c 69 6e 65 3b 0a 20 |e;. new_line;. | 000036a0 20 69 66 20 28 64 65 61 64 66 6c 61 67 3d 3d 30 | if (deadflag==0| 000036b0 29 20 70 72 69 6e 74 20 22 54 68 65 20 73 63 6f |) print "The sco| 000036c0 72 65 20 69 73 20 22 3b 0a 20 20 65 6c 73 65 20 |re is ";. else | 000036d0 20 20 20 20 20 20 20 20 20 20 20 20 70 72 69 6e | prin| 000036e0 74 20 22 54 68 65 20 73 63 6f 72 65 20 77 61 73 |t "The score was| 000036f0 20 22 3b 0a 20 20 70 72 69 6e 74 20 22 6d 61 64 | ";. print "mad| 00003700 65 20 75 70 20 61 73 20 66 6f 6c 6c 6f 77 73 3a |e up as follows:| 00003710 5e 5e 22 3b 0a 0a 20 20 66 6f 72 20 28 69 3d 30 |^^";.. for (i=0| 00003720 3a 69 3c 4e 55 4d 42 45 52 5f 54 41 53 4b 53 3a |:i<NUMBER_TASKS:| 00003730 69 2b 2b 29 0a 20 20 20 20 20 20 69 66 20 28 74 |i++). if (t| 00003740 61 73 6b 5f 64 6f 6e 65 2d 3e 69 3d 3d 31 29 0a |ask_done->i==1).| 00003750 20 20 20 20 20 20 7b 20 20 20 50 41 4e 75 6d 28 | { PANum(| 00003760 74 61 73 6b 5f 73 63 6f 72 65 73 2d 3e 69 29 3b |task_scores->i);| 00003770 0a 20 20 20 20 20 20 20 20 20 20 50 72 69 6e 74 |. Print| 00003780 54 61 73 6b 4e 61 6d 65 28 69 29 3b 0a 20 20 20 |TaskName(i);. | 00003790 20 20 20 7d 0a 20 20 0a 20 20 69 66 20 28 74 68 | }. . if (th| 000037a0 69 6e 67 73 5f 73 63 6f 72 65 7e 3d 30 29 0a 20 |ings_score~=0). | 000037b0 20 7b 20 20 20 50 41 4e 75 6d 28 74 68 69 6e 67 | { PANum(thing| 000037c0 73 5f 73 63 6f 72 65 29 3b 0a 20 20 20 20 20 20 |s_score);. | 000037d0 70 72 69 6e 74 20 22 66 69 6e 64 69 6e 67 20 73 |print "finding s| 000037e0 75 6e 64 72 79 20 69 74 65 6d 73 5e 22 3b 0a 20 |undry items^";. | 000037f0 20 7d 0a 20 20 69 66 20 28 70 6c 61 63 65 73 5f | }. if (places_| 00003800 73 63 6f 72 65 7e 3d 30 29 0a 20 20 7b 20 20 20 |score~=0). { | 00003810 50 41 4e 75 6d 28 70 6c 61 63 65 73 5f 73 63 6f |PANum(places_sco| 00003820 72 65 29 3b 0a 20 20 20 20 20 20 70 72 69 6e 74 |re);. print| 00003830 20 22 76 69 73 69 74 69 6e 67 20 76 61 72 69 6f | "visiting vario| 00003840 75 73 20 70 6c 61 63 65 73 5e 22 3b 0a 20 20 7d |us places^";. }| 00003850 0a 20 20 6e 65 77 5f 6c 69 6e 65 3b 20 50 41 4e |. new_line; PAN| 00003860 75 6d 28 73 63 6f 72 65 29 3b 20 70 72 69 6e 74 |um(score); print| 00003870 20 22 74 6f 74 61 6c 20 28 6f 75 74 20 6f 66 20 | "total (out of | 00003880 22 2c 20 4d 41 58 5f 53 43 4f 52 45 2c 20 22 29 |", MAX_SCORE, ")| 00003890 5e 22 3b 0a 5d 3b 0a 0a 21 20 2d 2d 2d 2d 2d 2d |^";.];..! ------| 000038a0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000038e0 2d 2d 2d 2d 2d 2d 0a 21 20 20 20 52 65 61 6c 20 |------.! Real | 000038f0 76 65 72 62 73 20 73 74 61 72 74 20 68 65 72 65 |verbs start here| 00003900 3a 20 49 6e 76 65 6e 74 6f 72 79 0a 21 20 2d 2d |: Inventory.! --| 00003910 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00003950 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 67 6c 6f 62 |----------..glob| 00003960 61 6c 20 69 6e 76 65 6e 74 6f 72 79 5f 73 74 79 |al inventory_sty| 00003970 6c 65 3b 0a 0a 5b 20 49 6e 76 57 69 64 65 53 75 |le;..[ InvWideSu| 00003980 62 3b 0a 20 20 69 6e 76 65 6e 74 6f 72 79 5f 73 |b;. inventory_s| 00003990 74 79 6c 65 20 3d 20 46 55 4c 4c 49 4e 56 5f 42 |tyle = FULLINV_B| 000039a0 49 54 20 2b 20 45 4e 47 4c 49 53 48 5f 42 49 54 |IT + ENGLISH_BIT| 000039b0 20 2b 20 52 45 43 55 52 53 45 5f 42 49 54 3b 0a | + RECURSE_BIT;.| 000039c0 20 20 3c 49 6e 76 3e 3b 0a 5d 3b 0a 0a 5b 20 49 | <Inv>;.];..[ I| 000039d0 6e 76 54 61 6c 6c 53 75 62 3b 0a 20 20 69 6e 76 |nvTallSub;. inv| 000039e0 65 6e 74 6f 72 79 5f 73 74 79 6c 65 20 3d 20 46 |entory_style = F| 000039f0 55 4c 4c 49 4e 56 5f 42 49 54 20 2b 20 49 4e 44 |ULLINV_BIT + IND| 00003a00 45 4e 54 5f 42 49 54 20 2b 20 4e 45 57 4c 49 4e |ENT_BIT + NEWLIN| 00003a10 45 5f 42 49 54 20 2b 20 52 45 43 55 52 53 45 5f |E_BIT + RECURSE_| 00003a20 42 49 54 3b 0a 20 20 3c 49 6e 76 3e 3b 0a 5d 3b |BIT;. <Inv>;.];| 00003a30 0a 0a 5b 20 49 6e 76 53 75 62 3b 0a 20 20 69 66 |..[ InvSub;. if| 00003a40 20 28 63 68 69 6c 64 28 70 6c 61 79 65 72 29 3d | (child(player)=| 00003a50 3d 30 29 20 22 59 6f 75 20 61 72 65 20 63 61 72 |=0) "You are car| 00003a60 72 79 69 6e 67 20 6e 6f 74 68 69 6e 67 2e 22 3b |rying nothing.";| 00003a70 0a 20 20 69 66 20 28 69 6e 76 65 6e 74 6f 72 79 |. if (inventory| 00003a80 5f 73 74 79 6c 65 3d 3d 30 29 20 3c 3c 49 6e 76 |_style==0) <<Inv| 00003a90 54 61 6c 6c 3e 3e 3b 0a 0a 20 20 70 72 69 6e 74 |Tall>>;.. print| 00003aa0 20 22 59 6f 75 20 61 72 65 20 63 61 72 72 79 69 | "You are carryi| 00003ab0 6e 67 22 3b 0a 20 20 69 66 20 28 69 6e 76 65 6e |ng";. if (inven| 00003ac0 74 6f 72 79 5f 73 74 79 6c 65 20 26 20 4e 45 57 |tory_style & NEW| 00003ad0 4c 49 4e 45 5f 42 49 54 20 7e 3d 20 30 29 20 70 |LINE_BIT ~= 0) p| 00003ae0 72 69 6e 74 20 22 3a 5e 22 3b 20 65 6c 73 65 20 |rint ":^"; else | 00003af0 70 72 69 6e 74 20 22 20 22 3b 0a 0a 20 20 57 72 |print " ";.. Wr| 00003b00 69 74 65 4c 69 73 74 46 72 6f 6d 28 63 68 69 6c |iteListFrom(chil| 00003b10 64 28 70 6c 61 79 65 72 29 2c 20 69 6e 76 65 6e |d(player), inven| 00003b20 74 6f 72 79 5f 73 74 79 6c 65 2c 20 31 29 3b 0a |tory_style, 1);.| 00003b30 20 20 69 66 20 28 69 6e 76 65 6e 74 6f 72 79 5f | if (inventory_| 00003b40 73 74 79 6c 65 20 26 20 45 4e 47 4c 49 53 48 5f |style & ENGLISH_| 00003b50 42 49 54 20 7e 3d 20 30 29 20 70 72 69 6e 74 20 |BIT ~= 0) print | 00003b60 22 2e 5e 22 3b 0a 0a 20 20 41 66 74 65 72 52 6f |".^";.. AfterRo| 00003b70 75 74 69 6e 65 73 28 29 3b 0a 5d 3b 0a 0a 21 20 |utines();.];..! | 00003b80 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00003bc0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 21 20 20 |------------.! | 00003bd0 20 4f 62 6a 65 63 74 20 6d 6f 76 65 6d 65 6e 74 | Object movement| 00003be0 20 76 65 72 62 73 0a 21 20 2d 2d 2d 2d 2d 2d 2d | verbs.! -------| 00003bf0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00003c30 2d 2d 2d 2d 2d 0a 0a 5b 20 54 61 6b 65 53 75 62 |-----..[ TakeSub| 00003c40 3b 0a 20 20 69 66 20 28 6f 6e 6f 74 68 65 6c 64 |;. if (onotheld| 00003c50 5f 6d 6f 64 65 3d 3d 30 20 7c 7c 20 70 61 72 65 |_mode==0 || pare| 00003c60 6e 74 28 6e 6f 75 6e 29 7e 3d 70 6c 61 79 65 72 |nt(noun)~=player| 00003c70 29 0a 20 20 7b 20 20 20 69 66 20 28 6c 6f 63 61 |). { if (loca| 00003c80 74 69 6f 6e 3d 3d 74 68 65 64 61 72 6b 29 0a 20 |tion==thedark). | 00003c90 20 20 20 20 20 7b 20 20 20 69 66 20 28 52 54 61 | { if (RTa| 00003ca0 6b 65 53 75 62 28 72 65 61 6c 5f 6c 6f 63 61 74 |keSub(real_locat| 00003cb0 69 6f 6e 29 7e 3d 30 29 20 72 74 72 75 65 3b 0a |ion)~=0) rtrue;.| 00003cc0 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 65 6c | }. el| 00003cd0 73 65 0a 20 20 20 20 20 20 7b 20 20 20 69 66 20 |se. { if | 00003ce0 28 52 54 61 6b 65 53 75 62 28 6c 6f 63 61 74 69 |(RTakeSub(locati| 00003cf0 6f 6e 29 7e 3d 30 29 20 72 74 72 75 65 3b 0a 20 |on)~=0) rtrue;. | 00003d00 20 20 20 20 20 7d 0a 20 20 7d 0a 20 20 69 66 20 | }. }. if | 00003d10 28 41 66 74 65 72 52 6f 75 74 69 6e 65 73 28 29 |(AfterRoutines()| 00003d20 3d 3d 31 29 20 72 74 72 75 65 3b 0a 20 20 6e 6f |==1) rtrue;. no| 00003d30 74 68 65 6c 64 5f 6d 6f 64 65 3d 6f 6e 6f 74 68 |theld_mode=onoth| 00003d40 65 6c 64 5f 6d 6f 64 65 3b 0a 20 20 69 66 20 28 |eld_mode;. if (| 00003d50 6e 6f 74 68 65 6c 64 5f 6d 6f 64 65 3d 3d 30 29 |notheld_mode==0)| 00003d60 20 70 72 69 6e 74 20 22 54 61 6b 65 6e 2e 5e 22 | print "Taken.^"| 00003d70 3b 0a 5d 3b 0a 0a 5b 20 52 54 61 6b 65 53 75 62 |;.];..[ RTakeSub| 00003d80 20 66 72 6f 6d 6f 62 6a 20 69 20 6a 20 6b 20 70 | fromobj i j k p| 00003d90 6f 73 74 6f 6e 6f 62 6a 3b 0a 20 20 69 66 20 28 |ostonobj;. if (| 00003da0 6e 6f 75 6e 3d 3d 70 6c 61 79 65 72 29 20 22 41 |noun==player) "A| 00003db0 73 20 74 68 65 20 62 69 73 68 6f 70 20 73 61 69 |s the bishop sai| 00003dc0 64 20 74 6f 20 74 68 65 20 61 63 74 72 65 73 73 |d to the actress| 00003dd0 2e 22 3b 0a 0a 20 20 69 66 20 28 6e 6f 75 6e 20 |.";.. if (noun | 00003de0 68 61 73 20 61 6e 69 6d 61 74 65 29 0a 20 20 7b |has animate). {| 00003df0 20 20 20 70 72 69 6e 74 20 22 49 20 64 6f 6e 27 | print "I don'| 00003e00 74 20 73 75 70 70 6f 73 65 20 22 3b 20 44 65 66 |t suppose "; Def| 00003e10 41 72 74 28 6e 6f 75 6e 29 3b 0a 20 20 20 20 20 |Art(noun);. | 00003e20 20 22 20 77 6f 75 6c 64 20 63 61 72 65 20 66 6f | " would care fo| 00003e30 72 20 74 68 61 74 2e 22 3b 0a 20 20 7d 0a 0a 20 |r that.";. }.. | 00003e40 20 69 3d 70 61 72 65 6e 74 28 6e 6f 75 6e 29 3b | i=parent(noun);| 00003e50 0a 20 20 69 66 20 28 69 3d 3d 70 6c 61 79 65 72 |. if (i==player| 00003e60 29 20 22 59 6f 75 20 61 6c 72 65 61 64 79 20 68 |) "You already h| 00003e70 61 76 65 20 74 68 61 74 2e 22 3b 0a 0a 20 20 69 |ave that.";.. i| 00003e80 66 20 28 69 20 68 61 73 20 63 6f 6e 74 61 69 6e |f (i has contain| 00003e90 65 72 20 7c 7c 20 69 20 68 61 73 20 73 75 70 70 |er || i has supp| 00003ea0 6f 72 74 65 72 29 0a 20 20 7b 20 20 20 70 6f 73 |orter). { pos| 00003eb0 74 6f 6e 6f 62 6a 3d 69 3b 0a 20 20 20 20 20 20 |tonobj=i;. | 00003ec0 6b 3d 61 63 74 69 6f 6e 3b 20 61 63 74 69 6f 6e |k=action; action| 00003ed0 3d 23 23 4c 65 74 47 6f 3b 0a 20 20 20 20 20 20 |=##LetGo;. | 00003ee0 69 66 20 28 52 75 6e 52 6f 75 74 69 6e 65 73 28 |if (RunRoutines(| 00003ef0 69 2c 62 65 66 6f 72 65 29 7e 3d 30 29 20 7b 20 |i,before)~=0) { | 00003f00 61 63 74 69 6f 6e 3d 6b 3b 20 72 74 72 75 65 3b |action=k; rtrue;| 00003f10 20 7d 0a 20 20 20 20 20 20 61 63 74 69 6f 6e 3d | }. action=| 00003f20 6b 3b 0a 20 20 7d 0a 0a 20 20 77 68 69 6c 65 20 |k;. }.. while | 00003f30 28 69 7e 3d 66 72 6f 6d 6f 62 6a 29 0a 20 20 7b |(i~=fromobj). {| 00003f40 20 20 20 69 66 20 28 69 20 68 61 73 6e 74 20 63 | if (i hasnt c| 00003f50 6f 6e 74 61 69 6e 65 72 20 26 26 20 69 20 68 61 |ontainer && i ha| 00003f60 73 6e 74 20 73 75 70 70 6f 72 74 65 72 29 0a 20 |snt supporter). | 00003f70 20 20 20 20 20 7b 20 20 20 69 66 20 28 69 20 68 | { if (i h| 00003f80 61 73 20 61 6e 69 6d 61 74 65 29 0a 20 20 20 20 |as animate). | 00003f90 20 20 20 20 20 20 7b 20 20 20 70 72 69 6e 74 20 | { print | 00003fa0 22 54 68 61 74 20 73 65 65 6d 73 20 74 6f 20 62 |"That seems to b| 00003fb0 65 6c 6f 6e 67 20 74 6f 20 22 3b 20 44 65 66 41 |elong to "; DefA| 00003fc0 72 74 28 69 29 3b 20 22 2e 22 3b 20 7d 0a 20 20 |rt(i); "."; }. | 00003fd0 20 20 20 20 20 20 20 20 69 66 20 28 69 20 68 61 | if (i ha| 00003fe0 73 20 74 72 61 6e 73 70 61 72 65 6e 74 29 0a 20 |s transparent). | 00003ff0 20 20 20 20 20 20 20 20 20 7b 20 20 20 70 72 69 | { pri| 00004000 6e 74 20 22 54 68 61 74 20 73 65 65 6d 73 20 74 |nt "That seems t| 00004010 6f 20 62 65 20 70 61 72 74 20 6f 66 20 22 3b 20 |o be part of "; | 00004020 44 65 66 41 72 74 28 69 29 3b 20 22 2e 22 3b 20 |DefArt(i); "."; | 00004030 7d 0a 20 20 20 20 20 20 20 20 20 20 22 54 68 61 |}. "Tha| 00004040 74 20 69 73 6e 27 74 20 61 76 61 69 6c 61 62 6c |t isn't availabl| 00004050 65 2e 22 3b 0a 20 20 20 20 20 20 7d 0a 20 20 20 |e.";. }. | 00004060 20 20 20 69 66 20 28 69 20 68 61 73 20 63 6f 6e | if (i has con| 00004070 74 61 69 6e 65 72 20 26 26 20 69 20 68 61 73 6e |tainer && i hasn| 00004080 74 20 6f 70 65 6e 29 0a 20 20 20 20 20 20 7b 20 |t open). { | 00004090 20 20 70 72 69 6e 74 20 22 55 6e 66 6f 72 74 75 | print "Unfortu| 000040a0 6e 61 74 65 6c 79 20 22 3b 20 44 65 66 41 72 74 |nately "; DefArt| 000040b0 28 69 29 3b 20 22 20 69 73 6e 27 74 20 6f 70 65 |(i); " isn't ope| 000040c0 6e 2e 22 3b 20 7d 0a 20 20 20 20 20 20 69 3d 70 |n."; }. i=p| 000040d0 61 72 65 6e 74 28 69 29 3b 0a 20 20 20 20 20 20 |arent(i);. | 000040e0 69 66 20 28 69 3d 3d 70 6c 61 79 65 72 29 20 69 |if (i==player) i| 000040f0 3d 66 72 6f 6d 6f 62 6a 3b 0a 20 20 7d 0a 20 20 |=fromobj;. }. | 00004100 69 66 20 28 6e 6f 75 6e 20 68 61 73 20 73 63 65 |if (noun has sce| 00004110 6e 65 72 79 29 20 20 22 54 68 61 74 27 73 20 68 |nery) "That's h| 00004120 61 72 64 6c 79 20 70 6f 72 74 61 62 6c 65 2e 22 |ardly portable."| 00004130 3b 0a 20 20 69 66 20 28 6e 6f 75 6e 20 68 61 73 |;. if (noun has| 00004140 20 73 74 61 74 69 63 29 20 20 20 22 46 69 78 65 | static) "Fixe| 00004150 64 20 69 6e 20 70 6c 61 63 65 2e 22 3b 0a 0a 20 |d in place.";.. | 00004160 20 6b 3d 30 3b 20 6f 62 6a 65 63 74 6c 6f 6f 70 | k=0; objectloop| 00004170 20 28 6a 20 69 6e 20 70 6c 61 79 65 72 29 20 69 | (j in player) i| 00004180 66 20 28 6a 20 68 61 73 6e 74 20 77 6f 72 6e 29 |f (j hasnt worn)| 00004190 20 6b 2b 2b 3b 0a 0a 20 20 69 66 20 28 6b 20 3e | k++;.. if (k >| 000041a0 3d 20 70 6c 61 79 65 72 2e 63 61 70 61 63 69 74 |= player.capacit| 000041b0 79 29 0a 20 20 7b 20 20 20 69 66 20 28 53 41 43 |y). { if (SAC| 000041c0 4b 5f 4f 42 4a 45 43 54 7e 3d 30 29 0a 20 20 20 |K_OBJECT~=0). | 000041d0 20 20 20 7b 20 20 20 69 66 20 28 70 61 72 65 6e | { if (paren| 000041e0 74 28 53 41 43 4b 5f 4f 42 4a 45 43 54 29 7e 3d |t(SACK_OBJECT)~=| 000041f0 70 6c 61 79 65 72 29 0a 20 20 20 20 20 20 20 20 |player). | 00004200 20 20 20 20 20 20 22 59 6f 75 27 72 65 20 63 61 | "You're ca| 00004210 72 72 79 69 6e 67 20 74 6f 6f 20 6d 61 6e 79 20 |rrying too many | 00004220 74 68 69 6e 67 73 20 61 6c 72 65 61 64 79 2e 22 |things already."| 00004230 3b 0a 20 20 20 20 20 20 20 20 20 20 6a 3d 30 3b |;. j=0;| 00004240 0a 20 20 20 20 20 20 20 20 20 20 6f 62 6a 65 63 |. objec| 00004250 74 6c 6f 6f 70 20 28 6b 20 69 6e 20 70 6c 61 79 |tloop (k in play| 00004260 65 72 29 20 0a 20 20 20 20 20 20 20 20 20 20 20 |er) . | 00004270 20 20 20 69 66 20 28 6b 7e 3d 53 41 43 4b 5f 4f | if (k~=SACK_O| 00004280 42 4a 45 43 54 20 26 26 20 6b 20 68 61 73 6e 74 |BJECT && k hasnt| 00004290 20 77 6f 72 6e 20 26 26 20 6b 20 68 61 73 6e 74 | worn && k hasnt| 000042a0 20 6c 69 67 68 74 29 20 6a 3d 6b 3b 0a 0a 20 20 | light) j=k;.. | 000042b0 20 20 20 20 20 20 20 20 69 66 20 28 6a 7e 3d 30 | if (j~=0| 000042c0 29 0a 20 20 20 20 20 20 20 20 20 20 7b 20 20 20 |). { | 000042d0 70 72 69 6e 74 20 22 28 70 75 74 74 69 6e 67 20 |print "(putting | 000042e0 22 3b 20 44 65 66 41 72 74 28 6a 29 3b 20 70 72 |"; DefArt(j); pr| 000042f0 69 6e 74 20 22 20 69 6e 74 6f 20 22 3b 0a 20 20 |int " into ";. | 00004300 20 20 20 20 20 20 20 20 20 20 20 20 44 65 66 41 | DefA| 00004310 72 74 28 53 41 43 4b 5f 4f 42 4a 45 43 54 29 3b |rt(SACK_OBJECT);| 00004320 20 70 72 69 6e 74 20 22 20 74 6f 20 6d 61 6b 65 | print " to make| 00004330 20 72 6f 6f 6d 29 5e 22 3b 0a 20 20 20 20 20 20 | room)^";. | 00004340 20 20 20 20 20 20 20 20 6d 6f 76 65 20 6a 20 74 | move j t| 00004350 6f 20 53 41 43 4b 5f 4f 42 4a 45 43 54 3b 0a 20 |o SACK_OBJECT;. | 00004360 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 20 20 | }. | 00004370 20 20 20 20 20 65 6c 73 65 20 22 59 6f 75 27 72 | else "You'r| 00004380 65 20 63 61 72 72 79 69 6e 67 20 74 6f 6f 20 6d |e carrying too m| 00004390 61 6e 79 20 74 68 69 6e 67 73 20 61 6c 72 65 61 |any things alrea| 000043a0 64 79 2e 22 3b 0a 20 20 20 20 20 20 7d 0a 20 20 |dy.";. }. | 000043b0 20 20 20 20 65 6c 73 65 20 22 59 6f 75 27 72 65 | else "You're| 000043c0 20 63 61 72 72 79 69 6e 67 20 74 6f 6f 20 6d 61 | carrying too ma| 000043d0 6e 79 20 74 68 69 6e 67 73 20 61 6c 72 65 61 64 |ny things alread| 000043e0 79 2e 22 3b 0a 20 20 7d 0a 20 20 6d 6f 76 65 20 |y.";. }. move | 000043f0 6e 6f 75 6e 20 74 6f 20 70 6c 61 79 65 72 3b 0a |noun to player;.| 00004400 0a 20 20 69 66 20 28 70 6f 73 74 6f 6e 6f 62 6a |. if (postonobj| 00004410 7e 3d 30 29 0a 20 20 7b 20 20 20 6b 3d 61 63 74 |~=0). { k=act| 00004420 69 6f 6e 3b 20 61 63 74 69 6f 6e 3d 23 23 4c 65 |ion; action=##Le| 00004430 74 47 6f 3b 0a 20 20 20 20 20 20 69 66 20 28 52 |tGo;. if (R| 00004440 75 6e 52 6f 75 74 69 6e 65 73 28 70 6f 73 74 6f |unRoutines(posto| 00004450 6e 6f 62 6a 2c 61 66 74 65 72 29 7e 3d 30 29 20 |nobj,after)~=0) | 00004460 7b 20 61 63 74 69 6f 6e 3d 6b 3b 20 72 74 72 75 |{ action=k; rtru| 00004470 65 3b 20 7d 0a 20 20 20 20 20 20 61 63 74 69 6f |e; }. actio| 00004480 6e 3d 6b 3b 0a 20 20 7d 0a 20 20 72 66 61 6c 73 |n=k;. }. rfals| 00004490 65 3b 0a 5d 3b 0a 0a 5b 20 44 72 6f 70 53 75 62 |e;.];..[ DropSub| 000044a0 20 69 3b 0a 20 20 69 3d 70 61 72 65 6e 74 28 6e | i;. i=parent(n| 000044b0 6f 75 6e 29 3b 0a 20 20 69 66 20 28 69 3d 3d 6c |oun);. if (i==l| 000044c0 6f 63 61 74 69 6f 6e 29 0a 20 20 20 20 20 20 22 |ocation). "| 000044d0 41 6c 72 65 61 64 79 20 6f 6e 20 74 68 65 20 66 |Already on the f| 000044e0 6c 6f 6f 72 2e 22 3b 0a 20 20 69 66 20 28 69 7e |loor.";. if (i~| 000044f0 3d 70 6c 61 79 65 72 29 0a 20 20 20 20 20 20 22 |=player). "| 00004500 59 6f 75 20 68 61 76 65 6e 27 74 20 67 6f 74 20 |You haven't got | 00004510 74 68 61 74 2e 22 3b 0a 20 20 69 66 20 28 6e 6f |that.";. if (no| 00004520 75 6e 20 68 61 73 20 77 6f 72 6e 29 0a 20 20 7b |un has worn). {| 00004530 20 20 20 70 72 69 6e 74 20 22 28 46 69 72 73 74 | print "(First| 00004540 20 74 61 6b 69 6e 67 20 22 3b 20 44 65 66 41 72 | taking "; DefAr| 00004550 74 28 6e 6f 75 6e 29 3b 20 70 72 69 6e 74 20 22 |t(noun); print "| 00004560 20 6f 66 66 29 5e 22 3b 0a 20 20 20 20 20 20 3c | off)^";. <| 00004570 44 69 73 72 6f 62 65 20 6e 6f 75 6e 3e 3b 0a 20 |Disrobe noun>;. | 00004580 20 20 20 20 20 69 66 20 28 6e 6f 75 6e 20 68 61 | if (noun ha| 00004590 73 20 77 6f 72 6e 29 20 72 74 72 75 65 3b 0a 20 |s worn) rtrue;. | 000045a0 20 7d 0a 20 20 6d 6f 76 65 20 6e 6f 75 6e 20 74 | }. move noun t| 000045b0 6f 20 70 61 72 65 6e 74 28 70 6c 61 79 65 72 29 |o parent(player)| 000045c0 3b 0a 20 20 69 66 20 28 41 66 74 65 72 52 6f 75 |;. if (AfterRou| 000045d0 74 69 6e 65 73 28 29 3d 3d 31 29 20 72 74 72 75 |tines()==1) rtru| 000045e0 65 3b 0a 20 20 70 72 69 6e 74 20 22 44 72 6f 70 |e;. print "Drop| 000045f0 70 65 64 2e 5e 22 3b 0a 5d 3b 0a 0a 5b 20 52 65 |ped.^";.];..[ Re| 00004600 6d 6f 76 65 53 75 62 20 69 3b 0a 0a 20 20 69 3d |moveSub i;.. i=| 00004610 70 61 72 65 6e 74 28 6e 6f 75 6e 29 3b 0a 20 20 |parent(noun);. | 00004620 69 66 20 28 69 20 68 61 73 20 63 6f 6e 74 61 69 |if (i has contai| 00004630 6e 65 72 20 26 26 20 69 20 68 61 73 6e 74 20 6f |ner && i hasnt o| 00004640 70 65 6e 29 20 22 41 6c 61 73 2c 20 69 74 20 69 |pen) "Alas, it i| 00004650 73 20 63 6c 6f 73 65 64 2e 22 3b 0a 20 20 69 66 |s closed.";. if| 00004660 20 28 69 7e 3d 73 65 63 6f 6e 64 29 20 22 42 75 | (i~=second) "Bu| 00004670 74 20 69 74 20 69 73 6e 27 74 20 74 68 65 72 65 |t it isn't there| 00004680 20 6e 6f 77 2e 22 3b 0a 20 20 69 66 20 28 73 65 | now.";. if (se| 00004690 63 6f 6e 64 20 68 61 73 20 77 6f 72 6e 29 20 22 |cond has worn) "| 000046a0 59 6f 75 27 6c 6c 20 6e 65 65 64 20 74 6f 20 74 |You'll need to t| 000046b0 61 6b 65 20 69 74 20 6f 66 66 20 66 69 72 73 74 |ake it off first| 000046c0 2e 22 3b 0a 20 20 69 66 20 28 52 54 61 6b 65 53 |.";. if (RTakeS| 000046d0 75 62 28 73 65 63 6f 6e 64 29 7e 3d 30 29 20 72 |ub(second)~=0) r| 000046e0 74 72 75 65 3b 0a 20 20 61 63 74 69 6f 6e 3d 23 |true;. action=#| 000046f0 23 54 61 6b 65 3b 20 20 20 69 66 20 28 41 66 74 |#Take; if (Aft| 00004700 65 72 52 6f 75 74 69 6e 65 73 28 29 3d 3d 31 29 |erRoutines()==1)| 00004710 20 72 74 72 75 65 3b 0a 20 20 61 63 74 69 6f 6e | rtrue;. action| 00004720 3d 23 23 52 65 6d 6f 76 65 3b 20 69 66 20 28 41 |=##Remove; if (A| 00004730 66 74 65 72 52 6f 75 74 69 6e 65 73 28 29 3d 3d |fterRoutines()==| 00004740 31 29 20 72 74 72 75 65 3b 0a 0a 20 20 70 72 69 |1) rtrue;.. pri| 00004750 6e 74 20 22 52 65 6d 6f 76 65 64 2e 5e 22 3b 0a |nt "Removed.^";.| 00004760 5d 3b 0a 0a 5b 20 50 75 74 4f 6e 53 75 62 3b 0a |];..[ PutOnSub;.| 00004770 20 20 69 66 20 28 73 65 63 6f 6e 64 3d 3d 64 5f | if (second==d_| 00004780 6f 62 6a 29 20 7b 20 3c 44 72 6f 70 20 6e 6f 75 |obj) { <Drop nou| 00004790 6e 3e 3b 20 72 66 61 6c 73 65 3b 20 7d 0a 20 20 |n>; rfalse; }. | 000047a0 69 66 20 28 70 61 72 65 6e 74 28 6e 6f 75 6e 29 |if (parent(noun)| 000047b0 7e 3d 70 6c 61 79 65 72 29 0a 20 20 20 20 20 20 |~=player). | 000047c0 22 59 6f 75 20 6e 65 65 64 20 74 6f 20 62 65 20 |"You need to be | 000047d0 68 6f 6c 64 69 6e 67 20 69 74 20 62 65 66 6f 72 |holding it befor| 000047e0 65 20 79 6f 75 20 63 61 6e 20 70 75 74 20 69 74 |e you can put it| 000047f0 20 6f 6e 74 6f 20 5c 0a 20 20 20 20 20 20 20 20 | onto \. | 00004800 20 20 73 6f 6d 65 74 68 69 6e 67 20 65 6c 73 65 | something else| 00004810 2e 22 3b 0a 0a 20 20 69 66 20 28 73 65 63 6f 6e |.";.. if (secon| 00004820 64 3e 31 29 0a 20 20 7b 20 20 20 61 63 74 69 6f |d>1). { actio| 00004830 6e 3d 23 23 52 65 63 65 69 76 65 3b 0a 20 20 20 |n=##Receive;. | 00004840 20 20 20 69 66 20 28 52 75 6e 52 6f 75 74 69 6e | if (RunRoutin| 00004850 65 73 28 73 65 63 6f 6e 64 2c 62 65 66 6f 72 65 |es(second,before| 00004860 29 7e 3d 30 29 20 7b 20 61 63 74 69 6f 6e 3d 23 |)~=0) { action=#| 00004870 23 50 75 74 4f 6e 3b 20 72 74 72 75 65 3b 20 7d |#PutOn; rtrue; }| 00004880 0a 20 20 20 20 20 20 61 63 74 69 6f 6e 3d 23 23 |. action=##| 00004890 50 75 74 4f 6e 3b 0a 20 20 7d 0a 0a 20 20 69 66 |PutOn;. }.. if| 000048a0 20 28 73 65 63 6f 6e 64 3d 3d 6e 6f 75 6e 29 20 | (second==noun) | 000048b0 22 59 6f 75 20 63 61 6e 27 74 20 70 75 74 20 73 |"You can't put s| 000048c0 6f 6d 65 74 68 69 6e 67 20 6f 6e 20 74 6f 70 20 |omething on top | 000048d0 6f 66 20 69 74 73 65 6c 66 2e 22 3b 0a 20 20 69 |of itself.";. i| 000048e0 66 20 28 73 65 63 6f 6e 64 20 68 61 73 6e 74 20 |f (second hasnt | 000048f0 73 75 70 70 6f 72 74 65 72 29 0a 20 20 7b 20 20 |supporter). { | 00004900 20 70 72 69 6e 74 20 22 50 75 74 74 69 6e 67 20 | print "Putting | 00004910 74 68 69 6e 67 73 20 6f 6e 20 22 3b 20 44 65 66 |things on "; Def| 00004920 41 72 74 28 73 65 63 6f 6e 64 29 3b 0a 20 20 20 |Art(second);. | 00004930 20 20 20 22 20 77 6f 75 6c 64 20 61 63 68 69 65 | " would achie| 00004940 76 65 20 6e 6f 74 68 69 6e 67 2e 22 3b 0a 20 20 |ve nothing.";. | 00004950 7d 0a 20 20 69 66 20 28 70 61 72 65 6e 74 28 73 |}. if (parent(s| 00004960 65 63 6f 6e 64 29 3d 3d 70 6c 61 79 65 72 29 20 |econd)==player) | 00004970 22 59 6f 75 20 6c 61 63 6b 20 74 68 65 20 64 65 |"You lack the de| 00004980 78 74 65 72 69 74 79 2e 22 3b 0a 20 20 69 66 20 |xterity.";. if | 00004990 28 6e 6f 75 6e 20 68 61 73 20 77 6f 72 6e 29 0a |(noun has worn).| 000049a0 20 20 7b 20 20 20 70 72 69 6e 74 20 22 28 66 69 | { print "(fi| 000049b0 72 73 74 20 74 61 6b 69 6e 67 20 69 74 20 6f 66 |rst taking it of| 000049c0 66 29 5e 22 3b 0a 20 20 20 20 20 20 3c 44 69 73 |f)^";. <Dis| 000049d0 72 6f 62 65 20 6e 6f 75 6e 3e 3b 0a 20 20 20 20 |robe noun>;. | 000049e0 20 20 69 66 20 28 6e 6f 75 6e 20 68 61 73 20 77 | if (noun has w| 000049f0 6f 72 6e 29 20 72 74 72 75 65 3b 0a 20 20 7d 0a |orn) rtrue;. }.| 00004a00 20 20 69 66 20 28 63 68 69 6c 64 72 65 6e 28 73 | if (children(s| 00004a10 65 63 6f 6e 64 29 3e 3d 70 72 6f 70 28 73 65 63 |econd)>=prop(sec| 00004a20 6f 6e 64 2c 63 61 70 61 63 69 74 79 29 29 0a 20 |ond,capacity)). | 00004a30 20 7b 20 20 20 70 72 69 6e 74 20 22 54 68 65 72 | { print "Ther| 00004a40 65 20 69 73 20 6e 6f 20 6d 6f 72 65 20 72 6f 6f |e is no more roo| 00004a50 6d 20 6f 6e 20 22 3b 20 44 65 66 41 72 74 28 73 |m on "; DefArt(s| 00004a60 65 63 6f 6e 64 29 3b 20 22 2e 22 3b 0a 20 20 7d |econd); ".";. }| 00004a70 0a 20 20 6d 6f 76 65 20 6e 6f 75 6e 20 74 6f 20 |. move noun to | 00004a80 73 65 63 6f 6e 64 3b 0a 0a 20 20 69 66 20 28 41 |second;.. if (A| 00004a90 66 74 65 72 52 6f 75 74 69 6e 65 73 28 29 3d 3d |fterRoutines()==| 00004aa0 31 29 20 72 74 72 75 65 3b 0a 0a 20 20 69 66 20 |1) rtrue;.. if | 00004ab0 28 73 65 63 6f 6e 64 3e 31 29 0a 20 20 7b 20 20 |(second>1). { | 00004ac0 20 61 63 74 69 6f 6e 3d 23 23 52 65 63 65 69 76 | action=##Receiv| 00004ad0 65 3b 0a 20 20 20 20 20 20 69 66 20 28 52 75 6e |e;. if (Run| 00004ae0 52 6f 75 74 69 6e 65 73 28 73 65 63 6f 6e 64 2c |Routines(second,| 00004af0 61 66 74 65 72 29 7e 3d 30 29 20 7b 20 61 63 74 |after)~=0) { act| 00004b00 69 6f 6e 3d 23 23 50 75 74 4f 6e 3b 20 72 74 72 |ion=##PutOn; rtr| 00004b10 75 65 3b 20 7d 0a 20 20 20 20 20 20 61 63 74 69 |ue; }. acti| 00004b20 6f 6e 3d 23 23 50 75 74 4f 6e 3b 0a 20 20 7d 0a |on=##PutOn;. }.| 00004b30 0a 20 20 69 66 20 28 6d 75 6c 74 69 66 6c 61 67 |. if (multiflag| 00004b40 3d 3d 31 29 20 22 44 6f 6e 65 2e 22 3b 0a 20 20 |==1) "Done.";. | 00004b50 70 72 69 6e 74 20 22 59 6f 75 20 70 75 74 20 22 |print "You put "| 00004b60 3b 20 44 65 66 41 72 74 28 6e 6f 75 6e 29 3b 20 |; DefArt(noun); | 00004b70 70 72 69 6e 74 20 22 20 6f 6e 20 22 3b 20 44 65 |print " on "; De| 00004b80 66 41 72 74 28 73 65 63 6f 6e 64 29 3b 0a 20 20 |fArt(second);. | 00004b90 22 2e 22 3b 0a 5d 3b 0a 0a 5b 20 49 6e 73 65 72 |".";.];..[ Inser| 00004ba0 74 53 75 62 3b 0a 20 20 69 66 20 28 73 65 63 6f |tSub;. if (seco| 00004bb0 6e 64 3d 3d 64 5f 6f 62 6a 20 29 20 3c 3c 44 72 |nd==d_obj ) <<Dr| 00004bc0 6f 70 20 6e 6f 75 6e 3e 3e 3b 0a 20 20 69 66 20 |op noun>>;. if | 00004bd0 28 70 61 72 65 6e 74 28 6e 6f 75 6e 29 7e 3d 70 |(parent(noun)~=p| 00004be0 6c 61 79 65 72 29 0a 20 20 20 20 20 22 59 6f 75 |layer). "You| 00004bf0 20 6e 65 65 64 20 74 6f 20 62 65 20 68 6f 6c 64 | need to be hold| 00004c00 69 6e 67 20 69 74 20 62 65 66 6f 72 65 20 79 6f |ing it before yo| 00004c10 75 20 63 61 6e 20 70 75 74 20 69 74 20 69 6e 74 |u can put it int| 00004c20 6f 20 5c 0a 20 20 20 20 20 20 20 20 20 20 73 6f |o \. so| 00004c30 6d 65 74 68 69 6e 67 20 65 6c 73 65 2e 22 3b 0a |mething else.";.| 00004c40 0a 20 20 69 66 20 28 73 65 63 6f 6e 64 3e 31 29 |. if (second>1)| 00004c50 0a 20 20 7b 20 20 20 61 63 74 69 6f 6e 3d 23 23 |. { action=##| 00004c60 52 65 63 65 69 76 65 3b 0a 20 20 20 20 20 20 69 |Receive;. i| 00004c70 66 20 28 52 75 6e 52 6f 75 74 69 6e 65 73 28 73 |f (RunRoutines(s| 00004c80 65 63 6f 6e 64 2c 62 65 66 6f 72 65 29 7e 3d 30 |econd,before)~=0| 00004c90 29 20 7b 20 61 63 74 69 6f 6e 3d 23 23 49 6e 73 |) { action=##Ins| 00004ca0 65 72 74 3b 20 72 74 72 75 65 3b 20 7d 0a 20 20 |ert; rtrue; }. | 00004cb0 20 20 20 20 61 63 74 69 6f 6e 3d 23 23 49 6e 73 | action=##Ins| 00004cc0 65 72 74 3b 0a 20 20 7d 0a 0a 20 20 69 66 20 28 |ert;. }.. if (| 00004cd0 73 65 63 6f 6e 64 20 68 61 73 6e 74 20 63 6f 6e |second hasnt con| 00004ce0 74 61 69 6e 65 72 29 20 22 54 68 61 74 20 63 61 |tainer) "That ca| 00004cf0 6e 27 74 20 63 6f 6e 74 61 69 6e 20 74 68 69 6e |n't contain thin| 00004d00 67 73 2e 22 3b 0a 20 20 69 66 20 28 73 65 63 6f |gs.";. if (seco| 00004d10 6e 64 20 68 61 73 6e 74 20 6f 70 65 6e 29 20 20 |nd hasnt open) | 00004d20 20 20 20 20 22 41 6c 61 73 2c 20 69 74 20 69 73 | "Alas, it is| 00004d30 20 63 6c 6f 73 65 64 2e 22 3b 0a 20 20 69 66 20 | closed.";. if | 00004d40 28 73 65 63 6f 6e 64 20 68 61 73 20 77 6f 72 6e |(second has worn| 00004d50 29 20 20 20 20 20 20 20 20 22 59 6f 75 27 6c 6c |) "You'll| 00004d60 20 6e 65 65 64 20 74 6f 20 74 61 6b 65 20 69 74 | need to take it| 00004d70 20 6f 66 66 20 66 69 72 73 74 2e 22 3b 0a 20 20 | off first.";. | 00004d80 69 66 20 28 73 65 63 6f 6e 64 3d 3d 6e 6f 75 6e |if (second==noun| 00004d90 29 20 20 20 20 20 20 20 20 20 20 20 22 59 6f 75 |) "You| 00004da0 20 63 61 6e 27 74 20 70 75 74 20 73 6f 6d 65 74 | can't put somet| 00004db0 68 69 6e 67 20 69 6e 73 69 64 65 20 69 74 73 65 |hing inside itse| 00004dc0 6c 66 2e 22 3b 0a 20 20 69 66 20 28 6e 6f 75 6e |lf.";. if (noun| 00004dd0 20 68 61 73 20 77 6f 72 6e 29 0a 20 20 7b 20 20 | has worn). { | 00004de0 20 70 72 69 6e 74 20 22 28 66 69 72 73 74 20 74 | print "(first t| 00004df0 61 6b 69 6e 67 20 69 74 20 6f 66 66 29 5e 22 3b |aking it off)^";| 00004e00 0a 20 20 20 20 20 20 3c 44 69 73 72 6f 62 65 20 |. <Disrobe | 00004e10 6e 6f 75 6e 3e 3b 20 69 66 20 28 6e 6f 75 6e 20 |noun>; if (noun | 00004e20 68 61 73 20 77 6f 72 6e 29 20 72 74 72 75 65 3b |has worn) rtrue;| 00004e30 0a 20 20 7d 0a 0a 20 20 69 66 20 28 63 68 69 6c |. }.. if (chil| 00004e40 64 72 65 6e 28 73 65 63 6f 6e 64 29 3e 3d 70 72 |dren(second)>=pr| 00004e50 6f 70 28 73 65 63 6f 6e 64 2c 63 61 70 61 63 69 |op(second,capaci| 00004e60 74 79 29 29 0a 20 20 7b 20 20 20 70 72 69 6e 74 |ty)). { print| 00004e70 20 22 54 68 65 72 65 20 69 73 20 6e 6f 20 6d 6f | "There is no mo| 00004e80 72 65 20 72 6f 6f 6d 20 69 6e 20 22 3b 20 44 65 |re room in "; De| 00004e90 66 41 72 74 28 73 65 63 6f 6e 64 29 3b 20 22 2e |fArt(second); ".| 00004ea0 22 3b 20 7d 0a 0a 20 20 6d 6f 76 65 20 6e 6f 75 |"; }.. move nou| 00004eb0 6e 20 74 6f 20 73 65 63 6f 6e 64 3b 0a 0a 20 20 |n to second;.. | 00004ec0 69 66 20 28 41 66 74 65 72 52 6f 75 74 69 6e 65 |if (AfterRoutine| 00004ed0 73 28 29 3d 3d 31 29 20 72 74 72 75 65 3b 0a 0a |s()==1) rtrue;..| 00004ee0 20 20 69 66 20 28 73 65 63 6f 6e 64 3e 31 29 0a | if (second>1).| 00004ef0 20 20 7b 20 20 20 61 63 74 69 6f 6e 3d 23 23 52 | { action=##R| 00004f00 65 63 65 69 76 65 3b 0a 20 20 20 20 20 20 69 66 |eceive;. if| 00004f10 20 28 52 75 6e 52 6f 75 74 69 6e 65 73 28 73 65 | (RunRoutines(se| 00004f20 63 6f 6e 64 2c 61 66 74 65 72 29 7e 3d 30 29 20 |cond,after)~=0) | 00004f30 7b 20 61 63 74 69 6f 6e 3d 23 23 49 6e 73 65 72 |{ action=##Inser| 00004f40 74 3b 20 72 74 72 75 65 3b 20 7d 0a 20 20 20 20 |t; rtrue; }. | 00004f50 20 20 61 63 74 69 6f 6e 3d 23 23 49 6e 73 65 72 | action=##Inser| 00004f60 74 3b 0a 20 20 7d 0a 0a 20 20 69 66 20 28 6d 75 |t;. }.. if (mu| 00004f70 6c 74 69 66 6c 61 67 3d 3d 31 29 20 22 44 6f 6e |ltiflag==1) "Don| 00004f80 65 2e 22 3b 0a 20 20 70 72 69 6e 74 20 22 59 6f |e.";. print "Yo| 00004f90 75 20 70 75 74 20 22 3b 20 44 65 66 41 72 74 28 |u put "; DefArt(| 00004fa0 6e 6f 75 6e 29 3b 20 70 72 69 6e 74 20 22 20 69 |noun); print " i| 00004fb0 6e 74 6f 20 22 3b 20 44 65 66 41 72 74 28 73 65 |nto "; DefArt(se| 00004fc0 63 6f 6e 64 29 3b 20 22 2e 22 3b 0a 5d 3b 0a 0a |cond); ".";.];..| 00004fd0 5b 20 54 72 61 6e 73 66 65 72 53 75 62 20 69 20 |[ TransferSub i | 00004fe0 61 63 74 5f 6e 65 65 64 65 64 20 6b 20 70 6f 73 |act_needed k pos| 00004ff0 74 6f 6e 6f 62 6a 20 70 61 72 3b 0a 20 20 61 63 |tonobj par;. ac| 00005000 74 5f 6e 65 65 64 65 64 3d 23 23 44 72 6f 70 3b |t_needed=##Drop;| 00005010 0a 20 20 69 66 20 28 73 65 63 6f 6e 64 20 68 61 |. if (second ha| 00005020 73 20 63 6f 6e 74 61 69 6e 65 72 29 20 61 63 74 |s container) act| 00005030 5f 6e 65 65 64 65 64 3d 23 23 49 6e 73 65 72 74 |_needed=##Insert| 00005040 3b 0a 20 20 65 6c 73 65 0a 20 20 20 20 20 20 69 |;. else. i| 00005050 66 20 28 73 65 63 6f 6e 64 20 68 61 73 20 73 75 |f (second has su| 00005060 70 70 6f 72 74 65 72 29 20 61 63 74 5f 6e 65 65 |pporter) act_nee| 00005070 64 65 64 3d 23 23 50 75 74 4f 6e 3b 0a 0a 20 20 |ded=##PutOn;.. | 00005080 69 3d 70 61 72 65 6e 74 28 6e 6f 75 6e 29 3b 0a |i=parent(noun);.| 00005090 20 20 69 66 20 28 69 7e 3d 70 6c 61 79 65 72 29 | if (i~=player)| 000050a0 0a 20 20 7b 20 20 20 77 68 69 6c 65 20 28 69 7e |. { while (i~| 000050b0 3d 30 29 0a 20 20 20 20 20 20 7b 20 20 20 69 66 |=0). { if| 000050c0 20 28 69 20 68 61 73 6e 74 20 6f 70 65 6e 29 20 | (i hasnt open) | 000050d0 22 54 68 61 74 20 69 73 6e 27 74 20 69 6e 20 79 |"That isn't in y| 000050e0 6f 75 72 20 70 6f 73 73 65 73 73 69 6f 6e 2e 22 |our possession."| 000050f0 3b 0a 20 20 20 20 20 20 20 20 20 20 69 3d 70 61 |;. i=pa| 00005100 72 65 6e 74 28 69 29 3b 0a 20 20 20 20 20 20 20 |rent(i);. | 00005110 20 20 20 69 66 20 28 69 3d 3d 70 6c 61 79 65 72 | if (i==player| 00005120 29 20 6a 75 6d 70 20 44 6f 54 72 61 6e 73 66 65 |) jump DoTransfe| 00005130 72 3b 0a 20 20 20 20 20 20 7d 0a 20 20 20 20 20 |r;. }. | 00005140 20 22 46 69 72 73 74 20 70 69 63 6b 20 74 68 61 | "First pick tha| 00005150 74 20 75 70 2e 22 3b 0a 20 20 7d 0a 20 20 2e 44 |t up.";. }. .D| 00005160 6f 54 72 61 6e 73 66 65 72 3b 0a 20 20 69 66 20 |oTransfer;. if | 00005170 28 6e 6f 75 6e 20 6e 6f 74 69 6e 20 70 6c 61 79 |(noun notin play| 00005180 65 72 29 0a 20 20 7b 20 20 20 70 61 72 20 3d 20 |er). { par = | 00005190 70 61 72 65 6e 74 28 6e 6f 75 6e 29 3b 0a 20 20 |parent(noun);. | 000051a0 20 20 20 20 69 66 20 28 70 61 72 20 68 61 73 20 | if (par has | 000051b0 63 6f 6e 74 61 69 6e 65 72 20 7c 7c 20 70 61 72 |container || par| 000051c0 20 68 61 73 20 73 75 70 70 6f 72 74 65 72 29 0a | has supporter).| 000051d0 20 20 20 20 20 20 7b 20 20 20 70 6f 73 74 6f 6e | { poston| 000051e0 6f 62 6a 3d 70 61 72 3b 0a 20 20 20 20 20 20 20 |obj=par;. | 000051f0 20 20 20 6b 3d 61 63 74 69 6f 6e 3b 20 61 63 74 | k=action; act| 00005200 69 6f 6e 3d 23 23 4c 65 74 47 6f 3b 0a 20 20 20 |ion=##LetGo;. | 00005210 20 20 20 20 20 20 20 69 66 20 28 52 75 6e 52 6f | if (RunRo| 00005220 75 74 69 6e 65 73 28 70 61 72 2c 62 65 66 6f 72 |utines(par,befor| 00005230 65 29 7e 3d 30 29 20 7b 20 61 63 74 69 6f 6e 3d |e)~=0) { action=| 00005240 6b 3b 20 72 74 72 75 65 3b 20 7d 0a 20 20 20 20 |k; rtrue; }. | 00005250 20 20 20 20 20 20 61 63 74 69 6f 6e 3d 6b 3b 0a | action=k;.| 00005260 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 6d 6f | }. mo| 00005270 76 65 20 6e 6f 75 6e 20 74 6f 20 70 6c 61 79 65 |ve noun to playe| 00005280 72 3b 0a 20 20 20 20 20 20 69 66 20 28 70 6f 73 |r;. if (pos| 00005290 74 6f 6e 6f 62 6a 7e 3d 30 29 0a 20 20 20 20 20 |tonobj~=0). | 000052a0 20 7b 20 20 20 6b 3d 61 63 74 69 6f 6e 3b 20 61 | { k=action; a| 000052b0 63 74 69 6f 6e 3d 23 23 4c 65 74 47 6f 3b 0a 20 |ction=##LetGo;. | 000052c0 20 20 20 20 20 20 20 20 20 69 66 20 28 52 75 6e | if (Run| 000052d0 52 6f 75 74 69 6e 65 73 28 70 6f 73 74 6f 6e 6f |Routines(postono| 000052e0 62 6a 2c 61 66 74 65 72 29 7e 3d 30 29 20 7b 20 |bj,after)~=0) { | 000052f0 61 63 74 69 6f 6e 3d 6b 3b 20 72 74 72 75 65 3b |action=k; rtrue;| 00005300 20 7d 0a 20 20 20 20 20 20 20 20 20 20 61 63 74 | }. act| 00005310 69 6f 6e 3d 6b 3b 0a 20 20 20 20 20 20 7d 0a 20 |ion=k;. }. | 00005320 20 7d 0a 20 20 69 66 20 28 61 63 74 5f 6e 65 65 | }. if (act_nee| 00005330 64 65 64 3d 3d 23 23 44 72 6f 70 29 20 20 20 3c |ded==##Drop) <| 00005340 3c 44 72 6f 70 20 6e 6f 75 6e 3e 3e 3b 0a 20 20 |<Drop noun>>;. | 00005350 69 66 20 28 61 63 74 5f 6e 65 65 64 65 64 3d 3d |if (act_needed==| 00005360 23 23 49 6e 73 65 72 74 29 20 3c 3c 49 6e 73 65 |##Insert) <<Inse| 00005370 72 74 20 6e 6f 75 6e 20 73 65 63 6f 6e 64 3e 3e |rt noun second>>| 00005380 3b 0a 20 20 69 66 20 28 61 63 74 5f 6e 65 65 64 |;. if (act_need| 00005390 65 64 3d 3d 23 23 50 75 74 4f 6e 29 20 20 3c 3c |ed==##PutOn) <<| 000053a0 50 75 74 4f 6e 20 6e 6f 75 6e 20 73 65 63 6f 6e |PutOn noun secon| 000053b0 64 3e 3e 3b 0a 0a 5d 3b 0a 0a 5b 20 45 6d 70 74 |d>>;..];..[ Empt| 000053c0 79 53 75 62 3b 0a 20 20 73 65 63 6f 6e 64 3d 64 |ySub;. second=d| 000053d0 5f 6f 62 6a 3b 20 45 6d 70 74 79 54 53 75 62 28 |_obj; EmptyTSub(| 000053e0 29 3b 0a 5d 3b 0a 0a 5b 20 45 6d 70 74 79 54 53 |);.];..[ EmptyTS| 000053f0 75 62 20 69 20 6a 3b 0a 20 20 69 66 20 28 6e 6f |ub i j;. if (no| 00005400 75 6e 20 68 61 73 6e 74 20 63 6f 6e 74 61 69 6e |un hasnt contain| 00005410 65 72 29 0a 20 20 7b 20 20 20 43 44 65 66 41 72 |er). { CDefAr| 00005420 74 28 6e 6f 75 6e 29 3b 20 22 20 63 61 6e 27 74 |t(noun); " can't| 00005430 20 63 6f 6e 74 61 69 6e 20 74 68 69 6e 67 73 2e | contain things.| 00005440 22 3b 20 7d 0a 20 20 69 66 20 28 6e 6f 75 6e 20 |"; }. if (noun | 00005450 68 61 73 6e 74 20 6f 70 65 6e 29 0a 20 20 7b 20 |hasnt open). { | 00005460 20 20 43 44 65 66 41 72 74 28 6e 6f 75 6e 29 3b | CDefArt(noun);| 00005470 20 22 20 69 73 20 63 6c 6f 73 65 64 2e 22 3b 20 | " is closed."; | 00005480 7d 0a 20 20 69 66 20 28 73 65 63 6f 6e 64 7e 3d |}. if (second~=| 00005490 64 5f 6f 62 6a 29 0a 20 20 7b 20 20 20 69 66 20 |d_obj). { if | 000054a0 28 73 65 63 6f 6e 64 20 68 61 73 6e 74 20 63 6f |(second hasnt co| 000054b0 6e 74 61 69 6e 65 72 29 0a 20 20 20 20 20 20 7b |ntainer). {| 000054c0 20 20 20 43 44 65 66 41 72 74 28 73 65 63 6f 6e | CDefArt(secon| 000054d0 64 29 3b 20 22 20 63 61 6e 27 74 20 63 6f 6e 74 |d); " can't cont| 000054e0 61 69 6e 20 74 68 69 6e 67 73 2e 22 3b 20 7d 0a |ain things."; }.| 000054f0 20 20 20 20 20 20 69 66 20 28 73 65 63 6f 6e 64 | if (second| 00005500 20 68 61 73 6e 74 20 6f 70 65 6e 29 20 7b 20 43 | hasnt open) { C| 00005510 44 65 66 41 72 74 28 73 65 63 6f 6e 64 29 3b 20 |DefArt(second); | 00005520 22 20 69 73 20 63 6c 6f 73 65 64 2e 22 3b 20 7d |" is closed."; }| 00005530 0a 20 20 7d 0a 20 20 69 3d 63 68 69 6c 64 28 6e |. }. i=child(n| 00005540 6f 75 6e 29 3b 0a 20 20 69 66 20 28 69 3d 3d 30 |oun);. if (i==0| 00005550 29 20 7b 20 44 65 66 41 72 74 28 6e 6f 75 6e 29 |) { DefArt(noun)| 00005560 3b 20 22 20 69 73 20 65 6d 70 74 79 20 61 6c 72 |; " is empty alr| 00005570 65 61 64 79 2e 22 3b 20 7d 0a 20 20 77 68 69 6c |eady."; }. whil| 00005580 65 20 28 69 7e 3d 30 29 0a 20 20 7b 20 20 20 6a |e (i~=0). { j| 00005590 3d 73 69 62 6c 69 6e 67 28 69 29 3b 0a 20 20 20 |=sibling(i);. | 000055a0 20 20 20 50 72 69 6e 74 53 68 6f 72 74 4e 61 6d | PrintShortNam| 000055b0 65 28 69 29 3b 20 70 72 69 6e 74 20 22 3a 20 22 |e(i); print ": "| 000055c0 3b 0a 20 20 20 20 20 20 3c 54 72 61 6e 73 66 65 |;. <Transfe| 000055d0 72 20 69 20 73 65 63 6f 6e 64 3e 3b 0a 20 20 20 |r i second>;. | 000055e0 20 20 20 69 3d 6a 3b 0a 20 20 7d 0a 5d 3b 0a 0a | i=j;. }.];..| 000055f0 5b 20 47 69 76 65 53 75 62 3b 0a 20 20 69 66 20 |[ GiveSub;. if | 00005600 28 70 61 72 65 6e 74 28 6e 6f 75 6e 29 7e 3d 70 |(parent(noun)~=p| 00005610 6c 61 79 65 72 29 0a 20 20 7b 20 20 20 70 72 69 |layer). { pri| 00005620 6e 74 20 22 59 6f 75 20 61 72 65 6e 27 74 20 68 |nt "You aren't h| 00005630 6f 6c 64 69 6e 67 20 22 3b 20 44 65 66 41 72 74 |olding "; DefArt| 00005640 28 6e 6f 75 6e 29 3b 20 22 2e 22 3b 20 7d 0a 20 |(noun); "."; }. | 00005650 20 69 66 20 28 73 65 63 6f 6e 64 3d 3d 70 6c 61 | if (second==pla| 00005660 79 65 72 29 20 7b 20 70 72 69 6e 74 20 22 59 6f |yer) { print "Yo| 00005670 75 20 6a 75 67 67 6c 65 20 22 3b 20 44 65 66 41 |u juggle "; DefA| 00005680 72 74 28 6e 6f 75 6e 29 3b 0a 20 20 20 20 20 20 |rt(noun);. | 00005690 22 20 66 6f 72 20 61 20 77 68 69 6c 65 2c 20 62 |" for a while, b| 000056a0 75 74 20 64 6f 6e 27 74 20 61 63 68 69 65 76 65 |ut don't achieve| 000056b0 20 6d 75 63 68 2e 22 3b 20 7d 0a 20 20 69 66 20 | much."; }. if | 000056c0 28 52 75 6e 4c 69 66 65 28 73 65 63 6f 6e 64 2c |(RunLife(second,| 000056d0 23 23 47 69 76 65 29 7e 3d 30 29 20 72 66 61 6c |##Give)~=0) rfal| 000056e0 73 65 3b 0a 20 20 43 44 65 66 41 72 74 28 73 65 |se;. CDefArt(se| 000056f0 63 6f 6e 64 29 3b 20 22 20 64 6f 65 73 6e 27 74 |cond); " doesn't| 00005700 20 73 65 65 6d 20 69 6e 74 65 72 65 73 74 65 64 | seem interested| 00005710 2e 22 3b 0a 5d 3b 0a 0a 5b 20 47 69 76 65 52 53 |.";.];..[ GiveRS| 00005720 75 62 3b 20 3c 47 69 76 65 20 73 65 63 6f 6e 64 |ub; <Give second| 00005730 20 6e 6f 75 6e 3e 3b 20 5d 3b 0a 0a 5b 20 53 68 | noun>; ];..[ Sh| 00005740 6f 77 53 75 62 3b 0a 20 20 69 66 20 28 70 61 72 |owSub;. if (par| 00005750 65 6e 74 28 6e 6f 75 6e 29 7e 3d 70 6c 61 79 65 |ent(noun)~=playe| 00005760 72 29 0a 20 20 7b 20 20 20 70 72 69 6e 74 20 22 |r). { print "| 00005770 59 6f 75 20 61 72 65 6e 27 74 20 68 6f 6c 64 69 |You aren't holdi| 00005780 6e 67 20 22 3b 20 44 65 66 41 72 74 28 6e 6f 75 |ng "; DefArt(nou| 00005790 6e 29 3b 20 22 2e 22 3b 20 7d 0a 20 20 69 66 20 |n); "."; }. if | 000057a0 28 73 65 63 6f 6e 64 3d 3d 70 6c 61 79 65 72 29 |(second==player)| 000057b0 20 3c 3c 45 78 61 6d 69 6e 65 20 6e 6f 75 6e 3e | <<Examine noun>| 000057c0 3e 3b 0a 20 20 69 66 20 28 52 75 6e 4c 69 66 65 |>;. if (RunLife| 000057d0 28 73 65 63 6f 6e 64 2c 23 23 53 68 6f 77 29 7e |(second,##Show)~| 000057e0 3d 30 29 20 72 66 61 6c 73 65 3b 0a 20 20 43 44 |=0) rfalse;. CD| 000057f0 65 66 41 72 74 28 73 65 63 6f 6e 64 29 3b 20 22 |efArt(second); "| 00005800 20 69 73 20 75 6e 69 6d 70 72 65 73 73 65 64 2e | is unimpressed.| 00005810 22 3b 0a 5d 3b 0a 0a 5b 20 53 68 6f 77 52 53 75 |";.];..[ ShowRSu| 00005820 62 3b 20 3c 53 68 6f 77 20 73 65 63 6f 6e 64 20 |b; <Show second | 00005830 6e 6f 75 6e 3e 3b 20 5d 3b 0a 0a 21 20 2d 2d 2d |noun>; ];..! ---| 00005840 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00005880 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 21 20 20 20 54 72 |---------.! Tr| 00005890 61 76 65 6c 6c 69 6e 67 20 61 72 6f 75 6e 64 20 |avelling around | 000058a0 76 65 72 62 73 0a 21 20 2d 2d 2d 2d 2d 2d 2d 2d |verbs.! --------| 000058b0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000058f0 2d 2d 2d 2d 0a 0a 5b 20 45 6e 74 65 72 53 75 62 |----..[ EnterSub| 00005900 20 69 3b 0a 20 20 69 66 20 28 6e 6f 75 6e 20 68 | i;. if (noun h| 00005910 61 73 20 64 6f 6f 72 29 20 3c 3c 47 6f 20 6e 6f |as door) <<Go no| 00005920 75 6e 3e 3e 3b 0a 20 20 69 3d 70 61 72 65 6e 74 |un>>;. i=parent| 00005930 28 70 6c 61 79 65 72 29 3b 0a 20 20 69 66 20 28 |(player);. if (| 00005940 69 7e 3d 6c 6f 63 61 74 69 6f 6e 29 0a 20 20 7b |i~=location). {| 00005950 20 20 20 70 72 69 6e 74 20 22 42 75 74 20 79 6f | print "But yo| 00005960 75 27 72 65 20 61 6c 72 65 61 64 79 20 69 6e 20 |u're already in | 00005970 22 3b 20 44 65 66 41 72 74 28 69 29 3b 20 22 2e |"; DefArt(i); ".| 00005980 22 3b 20 7d 0a 20 20 69 66 20 28 6e 6f 75 6e 20 |"; }. if (noun | 00005990 68 61 73 6e 74 20 65 6e 74 65 72 61 62 6c 65 29 |hasnt enterable)| 000059a0 20 22 41 20 73 75 72 72 65 61 6c 20 69 64 65 61 | "A surreal idea| 000059b0 2e 22 3b 0a 20 20 69 3d 70 61 72 65 6e 74 28 6e |.";. i=parent(n| 000059c0 6f 75 6e 29 3b 0a 20 20 69 66 20 28 69 3d 3d 63 |oun);. if (i==c| 000059d0 6f 6d 70 61 73 73 29 20 3c 3c 47 6f 20 6e 6f 75 |ompass) <<Go nou| 000059e0 6e 3e 3e 3b 0a 20 20 69 66 20 28 69 7e 3d 6c 6f |n>>;. if (i~=lo| 000059f0 63 61 74 69 6f 6e 29 20 22 59 6f 75 20 63 61 6e |cation) "You can| 00005a00 20 6f 6e 6c 79 20 67 65 74 20 69 6e 74 6f 20 73 | only get into s| 00005a10 6f 6d 65 74 68 69 6e 67 20 6f 6e 20 74 68 65 20 |omething on the | 00005a20 66 6c 6f 6f 72 2e 22 3b 0a 20 20 6d 6f 76 65 20 |floor.";. move | 00005a30 70 6c 61 79 65 72 20 74 6f 20 6e 6f 75 6e 3b 0a |player to noun;.| 00005a40 20 20 70 72 69 6e 74 20 22 59 6f 75 20 67 65 74 | print "You get| 00005a50 20 69 6e 74 6f 20 22 3b 20 44 65 66 41 72 74 28 | into "; DefArt(| 00005a60 6e 6f 75 6e 29 3b 20 70 72 69 6e 74 20 22 2e 5e |noun); print ".^| 00005a70 22 3b 0a 20 20 4c 6f 63 61 6c 65 28 6e 6f 75 6e |";. Locale(noun| 00005a80 29 3b 0a 5d 3b 0a 0a 5b 20 47 65 74 4f 66 66 53 |);.];..[ GetOffS| 00005a90 75 62 3b 0a 20 20 69 66 20 28 70 61 72 65 6e 74 |ub;. if (parent| 00005aa0 28 70 6c 61 79 65 72 29 3d 3d 6e 6f 75 6e 29 20 |(player)==noun) | 00005ab0 3c 3c 45 78 69 74 3e 3e 3b 0a 20 20 70 72 69 6e |<<Exit>>;. prin| 00005ac0 74 20 22 42 75 74 20 79 6f 75 20 61 72 65 6e 27 |t "But you aren'| 00005ad0 74 20 6f 6e 20 22 3b 20 44 65 66 41 72 74 28 6e |t on "; DefArt(n| 00005ae0 6f 75 6e 29 3b 20 22 20 61 74 20 74 68 65 20 6d |oun); " at the m| 00005af0 6f 6d 65 6e 74 2e 22 3b 0a 5d 3b 0a 0a 5b 20 45 |oment.";.];..[ E| 00005b00 78 69 74 53 75 62 3b 0a 20 20 69 66 20 28 70 61 |xitSub;. if (pa| 00005b10 72 65 6e 74 28 70 6c 61 79 65 72 29 3d 3d 6c 6f |rent(player)==lo| 00005b20 63 61 74 69 6f 6e 0a 20 20 20 20 20 20 7c 7c 20 |cation. || | 00005b30 28 6c 6f 63 61 74 69 6f 6e 3d 3d 74 68 65 64 61 |(location==theda| 00005b40 72 6b 20 26 26 20 70 61 72 65 6e 74 28 70 6c 61 |rk && parent(pla| 00005b50 79 65 72 29 3d 3d 72 65 61 6c 5f 6c 6f 63 61 74 |yer)==real_locat| 00005b60 69 6f 6e 29 29 0a 20 20 7b 20 20 20 69 66 20 28 |ion)). { if (| 00005b70 6c 6f 63 61 74 69 6f 6e 2e 6f 75 74 5f 74 6f 7e |location.out_to~| 00005b80 3d 30 29 20 3c 3c 47 6f 20 6f 75 74 5f 6f 62 6a |=0) <<Go out_obj| 00005b90 3e 3e 3b 0a 20 20 20 20 20 20 22 42 75 74 20 79 |>>;. "But y| 00005ba0 6f 75 27 72 65 20 61 72 65 6e 27 74 20 69 6e 20 |ou're aren't in | 00005bb0 61 6e 79 74 68 69 6e 67 20 61 74 20 74 68 65 20 |anything at the | 00005bc0 6d 6f 6d 65 6e 74 2e 22 3b 0a 20 20 7d 0a 20 20 |moment.";. }. | 00005bd0 6d 6f 76 65 20 70 6c 61 79 65 72 20 74 6f 20 6c |move player to l| 00005be0 6f 63 61 74 69 6f 6e 3b 0a 20 20 70 72 69 6e 74 |ocation;. print| 00005bf0 20 22 59 6f 75 20 61 72 65 20 6f 6e 20 79 6f 75 | "You are on you| 00005c00 72 20 6f 77 6e 20 74 77 6f 20 66 65 65 74 20 61 |r own two feet a| 00005c10 67 61 69 6e 2e 5e 22 3b 20 4c 6f 6f 6b 53 75 62 |gain.^"; LookSub| 00005c20 28 31 29 3b 20 41 66 74 65 72 52 6f 75 74 69 6e |(1); AfterRoutin| 00005c30 65 73 28 29 3b 0a 5d 3b 0a 0a 5b 20 56 61 67 75 |es();.];..[ Vagu| 00005c40 65 47 6f 53 75 62 3b 0a 20 20 22 59 6f 75 27 6c |eGoSub;. "You'l| 00005c50 6c 20 68 61 76 65 20 74 6f 20 73 61 79 20 77 68 |l have to say wh| 00005c60 69 63 68 20 63 6f 6d 70 61 73 73 20 64 69 72 65 |ich compass dire| 00005c70 63 74 69 6f 6e 20 74 6f 20 67 6f 20 69 6e 2e 22 |ction to go in."| 00005c80 3b 0a 5d 3b 0a 0a 5b 20 47 6f 49 6e 53 75 62 3b |;.];..[ GoInSub;| 00005c90 0a 20 20 3c 3c 47 6f 20 69 6e 5f 6f 62 6a 3e 3e |. <<Go in_obj>>| 00005ca0 3b 0a 5d 3b 0a 0a 5b 20 47 6f 53 75 62 20 69 20 |;.];..[ GoSub i | 00005cb0 6a 20 64 66 20 6d 6f 76 65 77 69 74 68 20 74 68 |j df movewith th| 00005cc0 65 64 69 72 3b 0a 0a 20 20 6d 6f 76 65 77 69 74 |edir;.. movewit| 00005cd0 68 3d 30 3b 0a 20 20 69 3d 70 61 72 65 6e 74 28 |h=0;. i=parent(| 00005ce0 70 6c 61 79 65 72 29 3b 0a 20 20 69 66 20 28 28 |player);. if ((| 00005cf0 6c 6f 63 61 74 69 6f 6e 7e 3d 74 68 65 64 61 72 |location~=thedar| 00005d00 6b 20 26 26 20 69 7e 3d 6c 6f 63 61 74 69 6f 6e |k && i~=location| 00005d10 29 0a 20 20 20 20 20 20 7c 7c 20 28 6c 6f 63 61 |). || (loca| 00005d20 74 69 6f 6e 3d 3d 74 68 65 64 61 72 6b 20 26 26 |tion==thedark &&| 00005d30 20 69 7e 3d 72 65 61 6c 5f 6c 6f 63 61 74 69 6f | i~=real_locatio| 00005d40 6e 29 29 0a 20 20 7b 20 20 20 6a 3d 6c 6f 63 61 |n)). { j=loca| 00005d50 74 69 6f 6e 3b 20 6c 6f 63 61 74 69 6f 6e 3d 72 |tion; location=r| 00005d60 65 61 6c 5f 6c 6f 63 61 74 69 6f 6e 3b 0a 20 20 |eal_location;. | 00005d70 20 20 20 20 69 66 20 28 52 75 6e 52 6f 75 74 69 | if (RunRouti| 00005d80 6e 65 73 28 69 2c 62 65 66 6f 72 65 29 7e 3d 30 |nes(i,before)~=0| 00005d90 29 0a 20 20 20 20 20 20 7b 20 20 20 6d 6f 76 65 |). { move| 00005da0 77 69 74 68 3d 69 3b 20 69 3d 70 61 72 65 6e 74 |with=i; i=parent| 00005db0 28 69 29 3b 20 6c 6f 63 61 74 69 6f 6e 3d 6a 3b |(i); location=j;| 00005dc0 20 6a 75 6d 70 20 67 6f 74 72 6f 6f 6d 3b 20 7d | jump gotroom; }| 00005dd0 0a 20 20 20 20 20 20 6c 6f 63 61 74 69 6f 6e 3d |. location=| 00005de0 6a 3b 0a 20 20 20 20 20 20 70 72 69 6e 74 20 22 |j;. print "| 00005df0 59 6f 75 27 6c 6c 20 68 61 76 65 20 74 6f 20 67 |You'll have to g| 00005e00 65 74 20 22 3b 0a 20 20 20 20 20 20 69 66 20 28 |et ";. if (| 00005e10 69 20 68 61 73 20 73 75 70 70 6f 72 74 65 72 29 |i has supporter)| 00005e20 20 70 72 69 6e 74 20 22 6f 66 66 20 22 3b 20 65 | print "off "; e| 00005e30 6c 73 65 20 70 72 69 6e 74 20 22 6f 75 74 20 6f |lse print "out o| 00005e40 66 20 22 3b 0a 20 20 20 20 20 20 44 65 66 41 72 |f ";. DefAr| 00005e50 74 28 69 29 3b 20 22 20 66 69 72 73 74 2e 22 3b |t(i); " first.";| 00005e60 0a 20 20 7d 0a 20 20 2e 67 6f 74 72 6f 6f 6d 3b |. }. .gotroom;| 00005e70 0a 20 20 74 68 65 64 69 72 3d 6e 6f 75 6e 2e 64 |. thedir=noun.d| 00005e80 6f 6f 72 5f 64 69 72 3b 0a 20 20 69 66 20 28 28 |oor_dir;. if ((| 00005e90 74 68 65 64 69 72 2d 23 63 6f 64 65 5f 6f 66 66 |thedir-#code_off| 00005ea0 73 65 74 29 3e 3d 30 29 20 74 68 65 64 69 72 3d |set)>=0) thedir=| 00005eb0 52 75 6e 52 6f 75 74 69 6e 65 73 28 6e 6f 75 6e |RunRoutines(noun| 00005ec0 2c 64 6f 6f 72 5f 64 69 72 29 3b 0a 20 20 0a 20 |,door_dir);. . | 00005ed0 20 6a 3d 69 2e 74 68 65 64 69 72 3b 0a 0a 20 20 | j=i.thedir;.. | 00005ee0 69 66 20 28 6a 3e 23 6c 61 72 67 65 73 74 5f 6f |if (j>#largest_o| 00005ef0 62 6a 65 63 74 29 0a 20 20 7b 20 20 20 69 66 20 |bject). { if | 00005f00 28 28 6a 2d 23 73 74 72 69 6e 67 73 5f 6f 66 66 |((j-#strings_off| 00005f10 73 65 74 29 3e 3d 30 29 0a 20 20 20 20 20 20 7b |set)>=0). {| 00005f20 20 20 20 70 72 69 6e 74 5f 70 61 64 64 72 20 6a | print_paddr j| 00005f30 3b 20 6e 65 77 5f 6c 69 6e 65 3b 20 72 66 61 6c |; new_line; rfal| 00005f40 73 65 3b 20 7d 0a 20 20 20 20 20 20 6a 3d 52 75 |se; }. j=Ru| 00005f50 6e 52 6f 75 74 69 6e 65 73 28 69 2c 74 68 65 64 |nRoutines(i,thed| 00005f60 69 72 29 3b 0a 20 20 20 20 20 20 69 66 20 28 6a |ir);. if (j| 00005f70 3d 3d 31 29 20 72 74 72 75 65 3b 0a 20 20 7d 0a |==1) rtrue;. }.| 00005f80 0a 20 20 69 66 20 28 6a 3d 3d 30 29 0a 20 20 7b |. if (j==0). {| 00005f90 20 20 20 6a 3d 69 2e 63 61 6e 74 5f 67 6f 3b 0a | j=i.cant_go;.| 00005fa0 20 20 20 20 20 20 69 66 20 28 28 6a 2d 23 73 74 | if ((j-#st| 00005fb0 72 69 6e 67 73 5f 6f 66 66 73 65 74 29 3e 3d 30 |rings_offset)>=0| 00005fc0 29 20 70 72 69 6e 74 5f 70 61 64 64 72 20 6a 3b |) print_paddr j;| 00005fd0 20 65 6c 73 65 20 52 75 6e 52 6f 75 74 69 6e 65 | else RunRoutine| 00005fe0 73 28 69 2c 63 61 6e 74 5f 67 6f 29 3b 0a 20 20 |s(i,cant_go);. | 00005ff0 20 20 20 20 6e 65 77 5f 6c 69 6e 65 3b 20 72 66 | new_line; rf| 00006000 61 6c 73 65 3b 0a 20 20 7d 0a 0a 20 20 69 66 20 |alse;. }.. if | 00006010 28 6a 20 68 61 73 20 64 6f 6f 72 29 0a 20 20 7b |(j has door). {| 00006020 20 20 20 69 66 20 28 6a 20 68 61 73 20 63 6f 6e | if (j has con| 00006030 63 65 61 6c 65 64 29 20 22 59 6f 75 20 63 61 6e |cealed) "You can| 00006040 27 74 20 67 6f 20 74 68 61 74 20 77 61 79 2e 22 |'t go that way."| 00006050 3b 0a 20 20 20 20 20 20 69 66 20 28 6a 20 68 61 |;. if (j ha| 00006060 73 6e 74 20 6f 70 65 6e 29 0a 20 20 20 20 20 20 |snt open). | 00006070 7b 20 20 20 69 66 20 28 6e 6f 75 6e 3d 3d 75 5f |{ if (noun==u_| 00006080 6f 62 6a 29 0a 20 20 20 20 20 20 20 20 20 20 7b |obj). {| 00006090 20 20 20 70 72 69 6e 74 20 22 59 6f 75 20 61 72 | print "You ar| 000060a0 65 20 75 6e 61 62 6c 65 20 74 6f 20 63 6c 69 6d |e unable to clim| 000060b0 62 20 22 3b 20 44 65 66 61 72 74 28 6a 29 3b 20 |b "; Defart(j); | 000060c0 22 2e 22 3b 20 7d 0a 20 20 20 20 20 20 20 20 20 |"."; }. | 000060d0 20 69 66 20 28 6e 6f 75 6e 3d 3d 64 5f 6f 62 6a | if (noun==d_obj| 000060e0 29 0a 20 20 20 20 20 20 20 20 20 20 7b 20 20 20 |). { | 000060f0 70 72 69 6e 74 20 22 59 6f 75 20 61 72 65 20 75 |print "You are u| 00006100 6e 61 62 6c 65 20 74 6f 20 64 65 73 63 65 6e 64 |nable to descend| 00006110 20 22 3b 20 44 65 66 61 72 74 28 6a 29 3b 20 22 | "; Defart(j); "| 00006120 2e 22 3b 20 7d 0a 20 20 20 20 20 20 20 20 20 20 |."; }. | 00006130 70 72 69 6e 74 20 22 59 6f 75 20 63 61 6e 27 74 |print "You can't| 00006140 2c 20 73 69 6e 63 65 20 22 3b 20 44 65 66 61 72 |, since "; Defar| 00006150 74 28 6a 29 3b 20 22 20 69 73 20 69 6e 20 74 68 |t(j); " is in th| 00006160 65 20 77 61 79 2e 22 3b 0a 20 20 20 20 20 20 7d |e way.";. }| 00006170 0a 20 20 20 20 20 20 69 66 20 28 28 6a 2e 64 6f |. if ((j.do| 00006180 6f 72 5f 74 6f 2d 23 63 6f 64 65 5f 6f 66 66 73 |or_to-#code_offs| 00006190 65 74 29 3e 3d 30 29 20 6a 3d 52 75 6e 52 6f 75 |et)>=0) j=RunRou| 000061a0 74 69 6e 65 73 28 6a 2c 64 6f 6f 72 5f 74 6f 29 |tines(j,door_to)| 000061b0 3b 0a 20 20 20 20 20 20 65 6c 73 65 20 6a 3d 6a |;. else j=j| 000061c0 2e 64 6f 6f 72 5f 74 6f 3b 0a 20 20 20 20 20 20 |.door_to;. | 000061d0 69 66 20 28 6a 3d 3d 30 29 0a 20 20 20 20 20 20 |if (j==0). | 000061e0 7b 20 20 20 70 72 69 6e 74 20 22 59 6f 75 20 63 |{ print "You c| 000061f0 61 6e 27 74 2c 20 73 69 6e 63 65 20 22 3b 20 44 |an't, since "; D| 00006200 65 66 61 72 74 28 6a 29 3b 20 22 20 6c 65 61 64 |efart(j); " lead| 00006210 73 20 6e 6f 77 68 65 72 65 2e 22 3b 20 7d 0a 20 |s nowhere."; }. | 00006220 20 7d 0a 20 20 69 66 20 28 6d 6f 76 65 77 69 74 | }. if (movewit| 00006230 68 3d 3d 30 29 20 6d 6f 76 65 20 70 6c 61 79 65 |h==0) move playe| 00006240 72 20 74 6f 20 6a 3b 20 65 6c 73 65 20 6d 6f 76 |r to j; else mov| 00006250 65 20 6d 6f 76 65 77 69 74 68 20 74 6f 20 6a 3b |e movewith to j;| 00006260 0a 0a 20 20 64 66 3d 4f 66 66 65 72 73 4c 69 67 |.. df=OffersLig| 00006270 68 74 28 6a 29 3b 0a 20 20 69 66 20 28 64 66 7e |ht(j);. if (df~| 00006280 3d 30 29 20 7b 20 6c 6f 63 61 74 69 6f 6e 3d 6a |=0) { location=j| 00006290 3b 20 6c 69 67 68 74 66 6c 61 67 3d 31 3b 20 7d |; lightflag=1; }| 000062a0 0a 20 20 65 6c 73 65 0a 20 20 7b 20 20 20 69 66 |. else. { if| 000062b0 20 28 6c 6f 63 61 74 69 6f 6e 3d 3d 74 68 65 64 | (location==thed| 000062c0 61 72 6b 29 20 44 61 72 6b 54 6f 44 61 72 6b 28 |ark) DarkToDark(| 000062d0 29 3b 0a 20 20 20 20 20 20 72 65 61 6c 5f 6c 6f |);. real_lo| 000062e0 63 61 74 69 6f 6e 3d 6a 3b 0a 20 20 20 20 20 20 |cation=j;. | 000062f0 6c 6f 63 61 74 69 6f 6e 3d 74 68 65 64 61 72 6b |location=thedark| 00006300 3b 20 6c 69 67 68 74 66 6c 61 67 3d 30 3b 0a 20 |; lightflag=0;. | 00006310 20 7d 0a 20 20 69 66 20 28 4c 41 66 74 65 72 52 | }. if (LAfterR| 00006320 6f 75 74 69 6e 65 73 28 29 3d 3d 31 29 20 72 74 |outines()==1) rt| 00006330 72 75 65 3b 0a 20 20 4c 6f 6f 6b 53 75 62 28 31 |rue;. LookSub(1| 00006340 29 3b 0a 5d 3b 0a 0a 21 20 2d 2d 2d 2d 2d 2d 2d |);.];..! -------| 00006350 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00006390 2d 2d 2d 2d 2d 0a 21 20 20 20 44 65 73 63 72 69 |-----.! Descri| 000063a0 62 69 6e 67 20 74 68 65 20 77 6f 72 6c 64 2e 20 |bing the world. | 000063b0 20 53 61 79 57 68 61 74 73 4f 6e 28 6f 62 6a 65 | SayWhatsOn(obje| 000063c0 63 74 29 20 64 6f 65 73 20 6a 75 73 74 20 74 68 |ct) does just th| 000063d0 61 74 20 28 70 72 6f 64 75 63 69 6e 67 0a 21 20 |at (producing.! | 000063e0 20 20 66 6f 6f 6c 69 73 68 20 6f 75 74 70 75 74 | foolish output| 000063f0 20 69 66 20 6e 6f 74 68 69 6e 67 20 69 73 29 2e | if nothing is).| 00006400 20 20 4c 6f 63 61 6c 65 28 6f 62 6a 65 63 74 29 | Locale(object)| 00006410 20 72 75 6e 73 20 74 68 72 6f 75 67 68 20 74 68 | runs through th| 00006420 65 20 22 74 61 69 6c 20 65 6e 64 22 0a 21 20 20 |e "tail end".! | 00006430 20 6f 66 20 61 20 4c 6f 6f 6b 2d 73 74 79 6c 65 | of a Look-style| 00006440 20 72 6f 6f 6d 20 64 65 73 63 72 69 70 74 69 6f | room descriptio| 00006450 6e 20 66 6f 72 20 74 68 65 20 63 6f 6e 74 65 6e |n for the conten| 00006460 74 73 20 6f 66 20 74 68 65 20 6f 62 6a 65 63 74 |ts of the object| 00006470 2c 20 70 72 69 6e 74 69 6e 67 0a 21 20 20 20 75 |, printing.! u| 00006480 70 20 73 75 69 74 61 62 6c 65 20 64 65 73 63 72 |p suitable descr| 00006490 69 70 74 69 6f 6e 73 20 61 73 20 69 74 20 67 6f |iptions as it go| 000064a0 65 73 2e 0a 21 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |es..! ----------| 000064b0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000064f0 2d 2d 0a 0a 5b 20 53 61 79 57 68 61 74 73 4f 6e |--..[ SayWhatsOn| 00006500 20 64 65 73 63 6f 6e 20 6b 3b 0a 20 20 69 66 20 | descon k;. if | 00006510 28 64 65 73 63 6f 6e 3d 3d 70 61 72 65 6e 74 28 |(descon==parent(| 00006520 70 6c 61 79 65 72 29 29 20 72 66 61 6c 73 65 3b |player)) rfalse;| 00006530 0a 20 20 70 72 69 6e 74 20 22 5e 4f 6e 20 22 3b |. print "^On ";| 00006540 20 44 65 66 41 72 74 28 64 65 73 63 6f 6e 29 3b | DefArt(descon);| 00006550 0a 20 20 6b 3d 63 68 69 6c 64 72 65 6e 28 64 65 |. k=children(de| 00006560 73 63 6f 6e 29 3b 0a 20 20 69 66 20 28 6b 3d 3d |scon);. if (k==| 00006570 31 29 20 70 72 69 6e 74 20 22 20 69 73 20 22 3b |1) print " is ";| 00006580 20 65 6c 73 65 20 70 72 69 6e 74 20 22 20 61 72 | else print " ar| 00006590 65 20 22 3b 0a 20 20 57 72 69 74 65 4c 69 73 74 |e ";. WriteList| 000065a0 46 72 6f 6d 28 63 68 69 6c 64 28 64 65 73 63 6f |From(child(desco| 000065b0 6e 29 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 |n),. | 000065c0 20 20 20 20 45 4e 47 4c 49 53 48 5f 42 49 54 20 | ENGLISH_BIT | 000065d0 2b 20 52 45 43 55 52 53 45 5f 42 49 54 20 2b 20 |+ RECURSE_BIT + | 000065e0 50 41 52 54 49 4e 56 5f 42 49 54 20 2b 20 54 45 |PARTINV_BIT + TE| 000065f0 52 53 45 5f 42 49 54 29 3b 0a 20 20 70 72 69 6e |RSE_BIT);. prin| 00006600 74 20 22 2e 5e 22 3b 0a 5d 3b 0a 0a 5b 20 4c 6f |t ".^";.];..[ Lo| 00006610 63 61 6c 65 20 64 65 73 63 69 6e 20 20 20 6f 20 |cale descin o | 00006620 70 20 6b 20 6a 20 66 6c 61 67 20 66 32 3b 0a 0a |p k j flag f2;..| 00006630 20 20 6f 62 6a 65 63 74 6c 6f 6f 70 20 28 6f 20 | objectloop (o | 00006640 69 6e 20 64 65 73 63 69 6e 29 20 67 69 76 65 20 |in descin) give | 00006650 6f 20 7e 77 6f 72 6b 66 6c 61 67 3b 0a 0a 20 20 |o ~workflag;.. | 00006660 6b 3d 30 3b 0a 20 20 6f 62 6a 65 63 74 6c 6f 6f |k=0;. objectloo| 00006670 70 20 28 6f 20 69 6e 20 64 65 73 63 69 6e 29 0a |p (o in descin).| 00006680 20 20 20 20 20 20 69 66 20 28 6f 20 68 61 73 6e | if (o hasn| 00006690 74 20 63 6f 6e 63 65 61 6c 65 64 20 26 26 20 6f |t concealed && o| 000066a0 7e 3d 70 61 72 65 6e 74 28 70 6c 61 79 65 72 29 |~=parent(player)| 000066b0 29 0a 20 20 20 20 20 20 7b 20 20 69 66 20 28 6f |). { if (o| 000066c0 20 68 61 73 6e 74 20 73 63 65 6e 65 72 79 29 0a | hasnt scenery).| 000066d0 20 20 20 20 20 20 20 20 20 7b 20 20 20 67 69 76 | { giv| 000066e0 65 20 6f 20 77 6f 72 6b 66 6c 61 67 3b 20 6b 2b |e o workflag; k+| 000066f0 2b 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |+;. | 00006700 70 3d 69 6e 69 74 69 61 6c 3b 20 66 32 3d 30 3b |p=initial; f2=0;| 00006710 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 |. if| 00006720 20 28 6f 20 68 61 73 20 64 6f 6f 72 20 26 26 20 | (o has door && | 00006730 6f 20 68 61 73 6e 74 20 6f 70 65 6e 29 20 7b 20 |o hasnt open) { | 00006740 70 3d 77 68 65 6e 5f 63 6c 6f 73 65 64 3b 20 66 |p=when_closed; f| 00006750 32 3d 31 3b 20 7d 0a 20 20 20 20 20 20 20 20 20 |2=1; }. | 00006760 20 20 20 20 69 66 20 28 6f 20 68 61 73 20 73 77 | if (o has sw| 00006770 69 74 63 68 61 62 6c 65 20 26 26 20 6f 20 68 61 |itchable && o ha| 00006780 73 6e 74 20 6f 6e 29 20 7b 20 70 3d 77 68 65 6e |snt on) { p=when| 00006790 5f 6f 66 66 3b 20 66 32 3d 31 3b 20 7d 0a 20 20 |_off; f2=1; }. | 000067a0 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6f | if (o| 000067b0 20 68 61 73 20 63 6f 6e 74 61 69 6e 65 72 20 26 | has container &| 000067c0 26 20 6f 20 68 61 73 6e 74 20 6f 70 65 6e 20 26 |& o hasnt open &| 000067d0 26 20 6f 2e 26 77 68 65 6e 5f 63 6c 6f 73 65 64 |& o.&when_closed| 000067e0 7e 3d 30 29 0a 20 20 20 20 20 20 20 20 20 20 20 |~=0). | 000067f0 20 20 7b 20 20 20 70 3d 77 68 65 6e 5f 63 6c 6f | { p=when_clo| 00006800 73 65 64 3b 20 66 32 3d 31 3b 20 7d 0a 20 20 20 |sed; f2=1; }. | 00006810 20 20 20 20 20 20 20 20 20 20 69 66 20 28 6f 20 | if (o | 00006820 68 61 73 6e 74 20 6d 6f 76 65 64 20 7c 7c 20 6f |hasnt moved || o| 00006830 2e 64 65 73 63 72 69 62 65 7e 3d 24 66 66 66 66 |.describe~=$ffff| 00006840 20 7c 7c 20 66 32 3d 3d 31 29 0a 20 20 20 20 20 | || f2==1). | 00006850 20 20 20 20 20 20 20 20 7b 20 20 20 69 66 20 28 | { if (| 00006860 6f 2e 64 65 73 63 72 69 62 65 7e 3d 24 66 66 66 |o.describe~=$fff| 00006870 66 20 26 26 20 52 75 6e 52 6f 75 74 69 6e 65 73 |f && RunRoutines| 00006880 28 6f 2c 64 65 73 63 72 69 62 65 29 7e 3d 30 29 |(o,describe)~=0)| 00006890 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 000068a0 20 20 7b 20 20 20 66 6c 61 67 3d 31 3b 0a 20 20 | { flag=1;. | 000068b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000068c0 20 20 20 67 69 76 65 20 6f 20 7e 77 6f 72 6b 66 | give o ~workf| 000068d0 6c 61 67 3b 20 6b 2d 2d 3b 0a 20 20 20 20 20 20 |lag; k--;. | 000068e0 20 20 20 20 20 20 20 20 20 20 20 7d 20 20 20 20 | } | 000068f0 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |. | 00006900 20 20 65 6c 73 65 0a 20 20 20 20 20 20 20 20 20 | else. | 00006910 20 20 20 20 20 20 20 20 7b 20 20 20 6a 3d 6f 2e | { j=o.| 00006920 70 3b 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 |p;. | 00006930 20 20 20 20 20 20 20 20 69 66 20 28 6a 7e 3d 30 | if (j~=0| 00006940 29 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |). | 00006950 20 20 20 20 20 20 20 7b 20 20 20 6e 65 77 5f 6c | { new_l| 00006960 69 6e 65 3b 0a 20 20 20 20 20 20 20 20 20 20 20 |ine;. | 00006970 20 20 20 20 20 20 20 20 20 20 20 20 20 20 69 66 | if| 00006980 20 28 28 6a 2d 23 73 74 72 69 6e 67 73 5f 6f 66 | ((j-#strings_of| 00006990 66 73 65 74 29 3e 3d 30 29 20 70 72 69 6e 74 5f |fset)>=0) print_| 000069a0 70 61 64 64 72 20 6a 3b 0a 20 20 20 20 20 20 20 |paddr j;. | 000069b0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000069c0 20 20 65 6c 73 65 20 52 75 6e 52 6f 75 74 69 6e | else RunRoutin| 000069d0 65 73 28 6f 2c 70 29 3b 0a 20 20 20 20 20 20 20 |es(o,p);. | 000069e0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 000069f0 20 20 6e 65 77 5f 6c 69 6e 65 3b 0a 20 20 20 20 | new_line;. | 00006a00 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006a10 20 20 20 20 20 66 6c 61 67 3d 31 3b 0a 20 20 20 | flag=1;. | 00006a20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006a30 20 20 20 20 20 20 67 69 76 65 20 6f 20 7e 77 6f | give o ~wo| 00006a40 72 6b 66 6c 61 67 3b 20 6b 2d 2d 3b 0a 20 20 20 |rkflag; k--;. | 00006a50 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006a60 20 20 20 20 20 20 69 66 20 28 6f 20 68 61 73 20 | if (o has | 00006a70 73 75 70 70 6f 72 74 65 72 20 26 26 20 63 68 69 |supporter && chi| 00006a80 6c 64 28 6f 29 7e 3d 30 29 20 53 61 79 57 68 61 |ld(o)~=0) SayWha| 00006a90 74 73 4f 6e 28 6f 29 3b 0a 20 20 20 20 20 20 20 |tsOn(o);. | 00006aa0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 7d 0a | }.| 00006ab0 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 | | 00006ac0 20 7d 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | }. | 00006ad0 7d 0a 20 20 20 20 20 20 20 20 20 7d 0a 20 20 20 |}. }. | 00006ae0 20 20 20 20 20 20 65 6c 73 65 0a 20 20 20 20 20 | else. | 00006af0 20 20 20 20 20 20 20 20 69 66 20 28 6f 20 68 61 | if (o ha| 00006b00 73 20 73 75 70 70 6f 72 74 65 72 20 26 26 20 63 |s supporter && c| 00006b10 68 69 6c 64 28 6f 29 7e 3d 30 29 20 53 61 79 57 |hild(o)~=0) SayW| 00006b20 68 61 74 73 4f 6e 28 6f 29 3b 0a 20 20 20 20 20 |hatsOn(o);. | 00006b30 20 7d 0a 0a 20 20 69 66 20 28 6b 3d 3d 30 29 20 | }.. if (k==0) | 00006b40 72 65 74 75 72 6e 3b 0a 0a 20 20 69 66 20 28 64 |return;.. if (d| 00006b50 65 73 63 69 6e 7e 3d 6c 6f 63 61 74 69 6f 6e 29 |escin~=location)| 00006b60 20 7b 20 70 72 69 6e 74 20 22 5e 49 6e 20 22 3b | { print "^In ";| 00006b70 20 44 65 66 41 72 74 28 64 65 73 63 69 6e 29 3b | DefArt(descin);| 00006b80 20 70 72 69 6e 74 20 22 20 79 6f 75 22 3b 20 7d | print " you"; }| 00006b90 0a 20 20 65 6c 73 65 20 70 72 69 6e 74 20 22 5e |. else print "^| 00006ba0 59 6f 75 22 3b 0a 0a 20 20 70 72 69 6e 74 20 22 |You";.. print "| 00006bb0 20 63 61 6e 20 22 3b 20 69 66 20 28 66 6c 61 67 | can "; if (flag| 00006bc0 3d 3d 31 29 20 70 72 69 6e 74 20 22 61 6c 73 6f |==1) print "also| 00006bd0 20 22 3b 20 70 72 69 6e 74 20 22 73 65 65 20 22 | "; print "see "| 00006be0 3b 0a 0a 20 20 57 72 69 74 65 4c 69 73 74 46 72 |;.. WriteListFr| 00006bf0 6f 6d 28 63 68 69 6c 64 28 64 65 73 63 69 6e 29 |om(child(descin)| 00006c00 2c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 20 |,. | 00006c10 20 20 45 4e 47 4c 49 53 48 5f 42 49 54 20 2b 20 | ENGLISH_BIT + | 00006c20 57 4f 52 4b 46 4c 41 47 5f 42 49 54 20 2b 20 52 |WORKFLAG_BIT + R| 00006c30 45 43 55 52 53 45 5f 42 49 54 0a 20 20 20 20 20 |ECURSE_BIT. | 00006c40 20 20 20 20 20 20 20 20 20 20 20 2b 20 50 41 52 | + PAR| 00006c50 54 49 4e 56 5f 42 49 54 20 2b 20 54 45 52 53 45 |TINV_BIT + TERSE| 00006c60 5f 42 49 54 29 3b 0a 20 20 69 66 20 28 64 65 73 |_BIT);. if (des| 00006c70 63 69 6e 7e 3d 6c 6f 63 61 74 69 6f 6e 29 20 70 |cin~=location) p| 00006c80 72 69 6e 74 20 22 2e 5e 22 3b 0a 20 20 69 66 20 |rint ".^";. if | 00006c90 28 64 65 73 63 69 6e 3d 3d 6c 6f 63 61 74 69 6f |(descin==locatio| 00006ca0 6e 29 20 70 72 69 6e 74 20 22 20 68 65 72 65 2e |n) print " here.| 00006cb0 5e 22 3b 0a 5d 3b 0a 0a 21 20 2d 2d 2d 2d 2d 2d |^";.];..! ------| 00006cc0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00006d00 2d 2d 2d 2d 2d 2d 0a 21 20 20 20 4c 6f 6f 6b 69 |------.! Looki| 00006d10 6e 67 2e 20 20 4c 6f 6f 6b 53 75 62 28 31 29 20 |ng. LookSub(1) | 00006d20 69 73 20 61 6c 6c 6f 77 65 64 20 74 6f 20 61 62 |is allowed to ab| 00006d30 62 72 65 76 69 61 74 65 20 6c 6f 6e 67 20 64 65 |breviate long de| 00006d40 73 63 72 69 70 74 69 6f 6e 73 2c 20 62 75 74 0a |scriptions, but.| 00006d50 21 20 20 20 20 20 4c 6f 6f 6b 53 75 62 28 30 29 |! LookSub(0)| 00006d60 20 28 77 68 69 63 68 20 69 73 20 77 68 61 74 20 | (which is what | 00006d70 68 61 70 70 65 6e 73 20 77 68 65 6e 20 74 68 65 |happens when the| 00006d80 20 4c 6f 6f 6b 20 61 63 74 69 6f 6e 20 69 73 20 | Look action is | 00006d90 67 65 6e 65 72 61 74 65 64 29 0a 21 20 20 20 20 |generated).! | 00006da0 20 69 73 6e 27 74 2e 20 20 28 45 78 63 65 70 74 | isn't. (Except| 00006db0 20 74 68 61 74 20 74 68 65 73 65 20 61 72 65 20 | that these are | 00006dc0 6f 76 65 72 2d 72 69 64 64 65 6e 20 62 79 20 74 |over-ridden by t| 00006dd0 68 65 20 70 6c 61 79 65 72 2d 73 65 74 20 6c 6f |he player-set lo| 00006de0 6f 6b 6d 6f 64 65 2e 29 0a 21 20 2d 2d 2d 2d 2d |okmode.).! -----| 00006df0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00006e30 2d 2d 2d 2d 2d 2d 2d 0a 0a 5b 20 4c 4d 6f 64 65 |-------..[ LMode| 00006e40 31 53 75 62 3b 0a 20 20 6c 6f 6f 6b 6d 6f 64 65 |1Sub;. lookmode| 00006e50 3d 31 3b 20 70 72 69 6e 74 5f 70 61 64 64 72 20 |=1; print_paddr | 00006e60 23 53 74 6f 72 79 3b 0a 20 20 22 20 69 73 20 6e |#Story;. " is n| 00006e70 6f 77 20 69 6e 20 69 74 73 20 6e 6f 72 6d 61 6c |ow in its normal| 00006e80 20 7e 62 72 69 65 66 7e 20 70 72 69 6e 74 69 6e | ~brief~ printin| 00006e90 67 20 6d 6f 64 65 2c 20 77 68 69 63 68 20 67 69 |g mode, which gi| 00006ea0 76 65 73 20 5c 0a 20 20 20 20 20 20 20 20 20 20 |ves \. | 00006eb0 20 20 20 20 6c 6f 6e 67 20 64 65 73 63 72 69 70 | long descrip| 00006ec0 74 69 6f 6e 73 20 6f 66 20 5c 0a 20 20 20 20 20 |tions of \. | 00006ed0 20 20 20 20 20 20 20 20 20 70 6c 61 63 65 73 20 | places | 00006ee0 6e 65 76 65 72 20 62 65 66 6f 72 65 20 76 69 73 |never before vis| 00006ef0 69 74 65 64 20 61 6e 64 20 73 68 6f 72 74 20 64 |ited and short d| 00006f00 65 73 63 72 69 70 74 69 6f 6e 73 20 6f 74 68 65 |escriptions othe| 00006f10 72 77 69 73 65 2e 22 3b 0a 5d 3b 0a 0a 5b 20 4c |rwise.";.];..[ L| 00006f20 4d 6f 64 65 32 53 75 62 3b 0a 20 20 6c 6f 6f 6b |Mode2Sub;. look| 00006f30 6d 6f 64 65 3d 32 3b 20 70 72 69 6e 74 5f 70 61 |mode=2; print_pa| 00006f40 64 64 72 20 23 53 74 6f 72 79 3b 0a 20 20 22 20 |ddr #Story;. " | 00006f50 69 73 20 6e 6f 77 20 69 6e 20 69 74 73 20 7e 76 |is now in its ~v| 00006f60 65 72 62 6f 73 65 7e 20 6d 6f 64 65 2c 20 77 68 |erbose~ mode, wh| 00006f70 69 63 68 20 61 6c 77 61 79 73 20 67 69 76 65 73 |ich always gives| 00006f80 20 6c 6f 6e 67 20 5c 0a 20 20 20 20 20 20 20 20 | long \. | 00006f90 20 20 20 20 20 20 64 65 73 63 72 69 70 74 69 6f | descriptio| 00006fa0 6e 73 20 6f 66 20 6c 6f 63 61 74 69 6f 6e 73 20 |ns of locations | 00006fb0 28 65 76 65 6e 20 69 66 20 79 6f 75 27 76 65 20 |(even if you've | 00006fc0 62 65 65 6e 20 74 68 65 72 65 20 62 65 66 6f 72 |been there befor| 00006fd0 65 29 2e 22 3b 0a 5d 3b 0a 0a 5b 20 4c 4d 6f 64 |e).";.];..[ LMod| 00006fe0 65 33 53 75 62 3b 0a 20 20 6c 6f 6f 6b 6d 6f 64 |e3Sub;. lookmod| 00006ff0 65 3d 33 3b 20 70 72 69 6e 74 5f 70 61 64 64 72 |e=3; print_paddr| 00007000 20 23 53 74 6f 72 79 3b 0a 20 20 22 20 69 73 20 | #Story;. " is | 00007010 6e 6f 77 20 69 6e 20 69 74 73 20 7e 73 75 70 65 |now in its ~supe| 00007020 72 62 72 69 65 66 7e 20 6d 6f 64 65 2c 20 77 68 |rbrief~ mode, wh| 00007030 69 63 68 20 61 6c 77 61 79 73 20 67 69 76 65 73 |ich always gives| 00007040 20 73 68 6f 72 74 20 5c 0a 20 20 20 20 20 20 20 | short \. | 00007050 20 20 20 20 20 20 20 64 65 73 63 72 69 70 74 69 | descripti| 00007060 6f 6e 73 20 6f 66 20 6c 6f 63 61 74 69 6f 6e 73 |ons of locations| 00007070 20 28 65 76 65 6e 20 69 66 20 79 6f 75 20 68 61 | (even if you ha| 00007080 76 65 6e 27 74 20 62 65 65 6e 20 74 68 65 72 65 |ven't been there| 00007090 20 5c 0a 20 20 20 20 20 20 20 20 20 20 20 20 20 | \. | 000070a0 20 62 65 66 6f 72 65 29 2e 22 3b 0a 5d 3b 0a 0a | before).";.];..| 000070b0 5b 20 4c 6f 6f 6b 53 75 62 20 61 6c 6c 6f 77 5f |[ LookSub allow_| 000070c0 61 62 62 72 65 76 20 20 69 20 64 65 73 63 69 6e |abbrev i descin| 000070d0 20 6a 3b 0a 20 20 64 65 73 63 69 6e 3d 6c 6f 63 | j;. descin=loc| 000070e0 61 74 69 6f 6e 3b 0a 20 20 69 66 20 28 64 65 73 |ation;. if (des| 000070f0 63 69 6e 7e 3d 6c 61 73 74 64 65 73 63 29 0a 20 |cin~=lastdesc). | 00007100 20 7b 20 20 20 6a 3d 64 65 73 63 69 6e 2e 69 6e | { j=descin.in| 00007110 69 74 69 61 6c 3b 0a 20 20 20 20 20 20 69 66 20 |itial;. if | 00007120 28 28 6a 2d 23 73 74 72 69 6e 67 73 5f 6f 66 66 |((j-#strings_off| 00007130 73 65 74 29 3e 30 29 20 70 72 69 6e 74 5f 70 61 |set)>0) print_pa| 00007140 64 64 72 20 6a 3b 20 0a 20 20 20 20 20 20 65 6c |ddr j; . el| 00007150 73 65 0a 20 20 20 20 20 20 7b 20 20 20 69 66 20 |se. { if | 00007160 28 6a 3e 30 20 26 26 20 52 75 6e 52 6f 75 74 69 |(j>0 && RunRouti| 00007170 6e 65 73 28 64 65 73 63 69 6e 2c 69 6e 69 74 69 |nes(descin,initi| 00007180 61 6c 29 7e 3d 30 29 20 4e 65 77 52 6f 6f 6d 28 |al)~=0) NewRoom(| 00007190 29 3b 0a 20 20 20 20 20 20 7d 0a 20 20 20 20 20 |);. }. | 000071a0 20 4d 6f 76 65 46 6c 6f 61 74 69 6e 67 4f 62 6a | MoveFloatingObj| 000071b0 65 63 74 73 28 6c 6f 63 61 74 69 6f 6e 29 3b 0a |ects(location);.| 000071c0 20 20 7d 0a 20 20 6e 65 77 5f 6c 69 6e 65 3b 0a | }. new_line;.| 000071d0 23 49 46 56 35 3b 20 73 74 79 6c 65 20 62 6f 6c |#IFV5; style bol| 000071e0 64 3b 20 23 45 4e 44 49 46 3b 0a 20 20 50 72 69 |d; #ENDIF;. Pri| 000071f0 6e 74 53 68 6f 72 74 4e 61 6d 65 28 6c 6f 63 61 |ntShortName(loca| 00007200 74 69 6f 6e 29 3b 0a 23 49 46 56 35 3b 20 73 74 |tion);.#IFV5; st| 00007210 79 6c 65 20 72 6f 6d 61 6e 3b 20 23 45 4e 44 49 |yle roman; #ENDI| 00007220 46 3b 0a 0a 20 20 69 3d 70 61 72 65 6e 74 28 70 |F;.. i=parent(p| 00007230 6c 61 79 65 72 29 3b 0a 20 20 69 66 20 28 6c 6f |layer);. if (lo| 00007240 63 61 74 69 6f 6e 7e 3d 74 68 65 64 61 72 6b 20 |cation~=thedark | 00007250 26 26 20 69 7e 3d 6c 6f 63 61 74 69 6f 6e 29 0a |&& i~=location).| 00007260 20 20 7b 20 20 20 69 66 20 28 69 20 68 61 73 20 | { if (i has | 00007270 73 75 70 70 6f 72 74 65 72 29 20 70 72 69 6e 74 |supporter) print| 00007280 20 22 20 28 6f 6e 20 22 3b 20 65 6c 73 65 20 70 | " (on "; else p| 00007290 72 69 6e 74 20 22 20 28 69 6e 20 22 3b 0a 20 20 |rint " (in ";. | 000072a0 20 20 20 20 44 65 66 41 72 74 28 69 29 3b 20 70 | DefArt(i); p| 000072b0 72 69 6e 74 20 22 29 22 3b 20 64 65 73 63 69 6e |rint ")"; descin| 000072c0 3d 69 3b 0a 20 20 7d 0a 20 20 69 66 20 28 70 72 |=i;. }. if (pr| 000072d0 69 6e 74 5f 70 6c 61 79 65 72 5f 66 6c 61 67 3d |int_player_flag=| 000072e0 3d 31 29 20 70 72 69 6e 74 20 22 20 28 61 73 20 |=1) print " (as | 000072f0 22 2c 20 6f 62 6a 65 63 74 20 70 6c 61 79 65 72 |", object player| 00007300 2c 20 22 29 22 3b 0a 20 20 6e 65 77 5f 6c 69 6e |, ")";. new_lin| 00007310 65 3b 0a 0a 20 20 69 66 20 28 6c 6f 6f 6b 6d 6f |e;.. if (lookmo| 00007320 64 65 3c 33 29 0a 20 20 7b 20 20 20 69 66 20 28 |de<3). { if (| 00007330 28 61 6c 6c 6f 77 5f 61 62 62 72 65 76 7e 3d 31 |(allow_abbrev~=1| 00007340 29 20 7c 7c 20 28 6c 6f 6f 6b 6d 6f 64 65 3d 3d |) || (lookmode==| 00007350 32 29 20 7c 7c 20 28 6c 6f 63 61 74 69 6f 6e 20 |2) || (location | 00007360 68 61 73 6e 74 20 76 69 73 69 74 65 64 29 29 0a |hasnt visited)).| 00007370 20 20 20 20 20 20 7b 20 20 20 69 66 20 28 6c 6f | { if (lo| 00007380 63 61 74 69 6f 6e 2e 64 65 73 63 72 69 62 65 7e |cation.describe~| 00007390 3d 24 66 66 66 66 29 20 52 75 6e 52 6f 75 74 69 |=$ffff) RunRouti| 000073a0 6e 65 73 28 6c 6f 63 61 74 69 6f 6e 2c 64 65 73 |nes(location,des| 000073b0 63 72 69 62 65 29 3b 0a 20 20 20 20 20 20 20 20 |cribe);. | 000073c0 20 20 65 6c 73 65 0a 20 20 20 20 20 20 20 20 20 | else. | 000073d0 20 7b 20 20 20 6a 3d 6c 6f 63 61 74 69 6f 6e 2e | { j=location.| 000073e0 64 65 73 63 72 69 70 74 69 6f 6e 3b 0a 20 20 20 |description;. | 000073f0 20 20 20 20 20 20 20 20 20 20 20 69 66 20 28 28 | if ((| 00007400 6a 2d 23 73 74 72 69 6e 67 73 5f 6f 66 66 73 65 |j-#strings_offse| 00007410 74 29 3e 30 29 0a 20 20 20 20 20 20 20 20 20 20 |t)>0). | 00007420 20 20 20 20 7b 20 20 20 70 72 69 6e 74 5f 70 61 | { print_pa| 00007430 64 64 72 20 6a 3b 20 6e 65 77 5f 6c 69 6e 65 3b |ddr j; new_line;| 00007440 20 7d 20 0a 20 20 20 20 20 20 20 20 20 20 20 20 | } . | 00007450 20 20 65 6c 73 65 0a 20 20 20 20 20 20 20 20 20 | else. | 00007460 20 20 20 20 20 20 20 20 20 52 75 6e 52 6f 75 74 | RunRout| 00007470 69 6e 65 73 28 6c 6f 63 61 74 69 6f 6e 2c 64 65 |ines(location,de| 00007480 73 63 72 69 70 74 69 6f 6e 29 3b 0a 20 20 20 20 |scription);. | 00007490 20 20 20 20 20 20 7d 0a 20 20 20 20 20 20 7d 0a | }. }.| 000074a0 20 20 7d 0a 0a 20 20 69 66 20 28 6c 6f 63 61 74 | }.. if (locat| 000074b0 69 6f 6e 20 68 61 73 6e 74 20 76 69 73 69 74 65 |ion hasnt visite| 000074c0 64 29 0a 20 20 7b 20 20 20 67 69 76 65 20 6c 6f |d). { give lo| 000074d0 63 61 74 69 6f 6e 20 76 69 73 69 74 65 64 3b 0a |cation visited;.| 000074e0 20 20 20 20 20 20 69 66 20 28 6c 6f 63 61 74 69 | if (locati| 000074f0 6f 6e 20 68 61 73 20 73 63 6f 72 65 64 29 0a 20 |on has scored). | 00007500 20 20 20 20 20 7b 20 20 20 73 63 6f 72 65 3d 73 | { score=s| 00007510 63 6f 72 65 2b 52 4f 4f 4d 5f 53 43 4f 52 45 3b |core+ROOM_SCORE;| 00007520 0a 20 20 20 20 20 20 20 20 20 20 70 6c 61 63 65 |. place| 00007530 73 5f 73 63 6f 72 65 3d 70 6c 61 63 65 73 5f 73 |s_score=places_s| 00007540 63 6f 72 65 2b 52 4f 4f 4d 5f 53 43 4f 52 45 3b |core+ROOM_SCORE;| 00007550 0a 20 20 20 20 20 20 7d 0a 20 20 7d 0a 0a 20 20 |. }. }.. | 00007560 69 66 20 28 64 65 73 63 69 6e 7e 3d 6c 6f 63 61 |if (descin~=loca| 00007570 74 69 6f 6e 29 20 4c 6f 63 61 6c 65 28 6c 6f 63 |tion) Locale(loc| 00007580 61 74 69 6f 6e 29 3b 0a 20 20 4c 6f 63 61 6c 65 |ation);. Locale| 00007590 28 64 65 73 63 69 6e 29 3b 0a 0a 20 20 4c 6f 6f |(descin);.. Loo| 000075a0 6b 52 6f 75 74 69 6e 65 28 29 3b 0a 20 20 61 63 |kRoutine();. ac| 000075b0 74 69 6f 6e 3d 23 23 4c 6f 6f 6b 3b 0a 20 20 69 |tion=##Look;. i| 000075c0 66 20 28 4c 41 66 74 65 72 52 6f 75 74 69 6e 65 |f (LAfterRoutine| 000075d0 73 28 29 3d 3d 31 29 20 72 74 72 75 65 3b 0a 5d |s()==1) rtrue;.]| 000075e0 3b 0a 0a 5b 20 45 78 61 6d 69 6e 65 53 75 62 20 |;..[ ExamineSub | 000075f0 69 3b 0a 20 20 69 66 20 28 6c 6f 63 61 74 69 6f |i;. if (locatio| 00007600 6e 3d 3d 74 68 65 64 61 72 6b 29 0a 20 20 20 20 |n==thedark). | 00007610 20 20 22 44 61 72 6b 6e 65 73 73 2c 20 6e 6f 75 | "Darkness, nou| 00007620 6e 2e 20 20 41 6e 20 61 62 73 65 6e 63 65 20 6f |n. An absence o| 00007630 66 20 6c 69 67 68 74 20 74 6f 20 73 65 65 20 62 |f light to see b| 00007640 79 2e 22 3b 0a 20 20 69 3d 6e 6f 75 6e 2e 64 65 |y.";. i=noun.de| 00007650 73 63 72 69 70 74 69 6f 6e 3b 0a 20 20 69 66 20 |scription;. if | 00007660 28 69 3d 3d 30 29 0a 20 20 7b 20 20 20 69 66 20 |(i==0). { if | 00007670 28 6e 6f 75 6e 20 68 61 73 20 63 6f 6e 74 61 69 |(noun has contai| 00007680 6e 65 72 29 20 7b 20 53 65 61 72 63 68 53 75 62 |ner) { SearchSub| 00007690 28 29 3b 20 72 66 61 6c 73 65 3b 20 7d 0a 20 20 |(); rfalse; }. | 000076a0 20 20 20 20 70 72 69 6e 74 20 22 59 6f 75 20 73 | print "You s| 000076b0 65 65 20 6e 6f 74 68 69 6e 67 20 73 70 65 63 69 |ee nothing speci| 000076c0 61 6c 20 61 62 6f 75 74 20 22 3b 20 44 65 66 61 |al about "; Defa| 000076d0 72 74 28 6e 6f 75 6e 29 3b 20 22 2e 22 3b 0a 20 |rt(noun); ".";. | 000076e0 20 7d 0a 20 20 69 66 20 28 28 69 2d 23 73 74 72 | }. if ((i-#str| 000076f0 69 6e 67 73 5f 6f 66 66 73 65 74 29 3e 30 29 0a |ings_offset)>0).| 00007700 20 20 7b 20 20 20 70 72 69 6e 74 5f 70 61 64 64 | { print_padd| 00007710 72 20 69 3b 20 6e 65 77 5f 6c 69 6e 65 3b 20 7d |r i; new_line; }| 00007720 0a 20 20 65 6c 73 65 0a 20 20 20 20 20 20 52 75 |. else. Ru| 00007730 6e 52 6f 75 74 69 6e 65 73 28 6e 6f 75 6e 2c 64 |nRoutines(noun,d| 00007740 65 73 63 72 69 70 74 69 6f 6e 29 3b 0a 20 20 69 |escription);. i| 00007750 66 20 28 6e 6f 75 6e 20 68 61 73 20 73 77 69 74 |f (noun has swit| 00007760 63 68 61 62 6c 65 29 0a 20 20 7b 20 20 20 70 72 |chable). { pr| 00007770 69 6e 74 20 22 49 74 20 69 73 20 63 75 72 72 65 |int "It is curre| 00007780 6e 74 6c 79 20 73 77 69 74 63 68 65 64 20 22 3b |ntly switched ";| 00007790 0a 20 20 20 20 20 20 69 66 20 28 6e 6f 75 6e 20 |. if (noun | 000077a0 68 61 73 20 6f 6e 29 20 70 72 69 6e 74 20 22 6f |has on) print "o| 000077b0 6e 2e 5e 22 3b 20 65 6c 73 65 20 70 72 69 6e 74 |n.^"; else print| 000077c0 20 22 6f 66 66 2e 5e 22 3b 0a 20 20 7d 0a 20 20 | "off.^";. }. | 000077d0 69 66 20 28 41 66 74 65 72 52 6f 75 74 69 6e 65 |if (AfterRoutine| 000077e0 73 28 29 3d 3d 31 29 20 72 74 72 75 65 3b 0a 5d |s()==1) rtrue;.]| 000077f0 3b 0a 0a 5b 20 4c 6f 6f 6b 55 6e 64 65 72 53 75 |;..[ LookUnderSu| 00007800 62 3b 0a 20 20 69 66 20 28 6c 6f 63 61 74 69 6f |b;. if (locatio| 00007810 6e 3d 3d 74 68 65 64 61 72 6b 29 20 22 42 75 74 |n==thedark) "But| 00007820 20 69 74 27 73 20 64 61 72 6b 2e 22 3b 0a 20 20 | it's dark.";. | 00007830 22 59 6f 75 20 66 69 6e 64 20 6e 6f 74 68 69 6e |"You find nothin| 00007840 67 20 6f 66 20 69 6e 74 65 72 65 73 74 2e 22 3b |g of interest.";| 00007850 0a 5d 3b 0a 0a 5b 20 53 65 61 72 63 68 53 75 62 |.];..[ SearchSub| 00007860 20 69 3b 0a 20 20 69 66 20 28 6c 6f 63 61 74 69 | i;. if (locati| 00007870 6f 6e 3d 3d 74 68 65 64 61 72 6b 29 20 22 42 75 |on==thedark) "Bu| 00007880 74 20 69 74 27 73 20 64 61 72 6b 2e 22 3b 0a 20 |t it's dark.";. | 00007890 20 69 66 20 28 6e 6f 75 6e 20 68 61 73 20 73 75 | if (noun has su| 000078a0 70 70 6f 72 74 65 72 29 0a 20 20 7b 20 20 20 69 |pporter). { i| 000078b0 3d 63 68 69 6c 64 72 65 6e 28 6e 6f 75 6e 29 3b |=children(noun);| 000078c0 0a 20 20 20 20 20 20 69 66 20 28 69 3d 3d 30 29 |. if (i==0)| 000078d0 20 7b 20 70 72 69 6e 74 20 22 54 68 65 72 65 20 | { print "There | 000078e0 69 73 20 6e 6f 74 68 69 6e 67 20 6f 6e 20 22 3b |is nothing on ";| 000078f0 20 44 65 66 41 72 74 28 6e 6f 75 6e 29 3b 20 22 | DefArt(noun); "| 00007900 2e 22 3b 20 7d 0a 20 20 20 20 20 20 70 72 69 6e |."; }. prin| 00007910 74 20 22 4f 6e 20 22 3b 20 44 65 66 41 72 74 28 |t "On "; DefArt(| 00007920 6e 6f 75 6e 29 3b 20 69 66 20 28 69 3e 31 29 20 |noun); if (i>1) | 00007930 70 72 69 6e 74 20 22 20 61 72 65 20 22 3b 20 65 |print " are "; e| 00007940 6c 73 65 20 70 72 69 6e 74 20 22 20 69 73 20 22 |lse print " is "| 00007950 3b 0a 20 20 20 20 20 20 57 72 69 74 65 4c 69 73 |;. WriteLis| 00007960 74 46 72 6f 6d 28 63 68 69 6c 64 28 6e 6f 75 6e |tFrom(child(noun| 00007970 29 2c 20 54 45 52 53 45 5f 42 49 54 20 2b 20 45 |), TERSE_BIT + E| 00007980 4e 47 4c 49 53 48 5f 42 49 54 29 3b 0a 20 20 20 |NGLISH_BIT);. | 00007990 20 20 20 22 2e 22 3b 0a 20 20 7d 0a 20 20 69 66 | ".";. }. if| 000079a0 20 28 6e 6f 75 6e 20 68 61 73 6e 74 20 63 6f 6e | (noun hasnt con| 000079b0 74 61 69 6e 65 72 29 0a 20 20 20 20 20 20 22 59 |tainer). "Y| 000079c0 6f 75 20 66 69 6e 64 20 6e 6f 74 68 69 6e 67 20 |ou find nothing | 000079d0 6f 66 20 69 6e 74 65 72 65 73 74 2e 22 3b 0a 20 |of interest.";. | 000079e0 20 69 66 20 28 6e 6f 75 6e 20 68 61 73 6e 74 20 | if (noun hasnt | 000079f0 74 72 61 6e 73 70 61 72 65 6e 74 20 26 26 20 6e |transparent && n| 00007a00 6f 75 6e 20 68 61 73 6e 74 20 6f 70 65 6e 29 0a |oun hasnt open).| 00007a10 20 20 20 20 20 20 22 59 6f 75 20 63 61 6e 27 74 | "You can't| 00007a20 20 73 65 65 20 69 6e 73 69 64 65 2c 20 73 69 6e | see inside, sin| 00007a30 63 65 20 69 74 20 69 73 20 63 6c 6f 73 65 64 2e |ce it is closed.| 00007a40 22 3b 0a 20 20 69 66 20 28 41 66 74 65 72 52 6f |";. if (AfterRo| 00007a50 75 74 69 6e 65 73 28 29 3d 3d 31 29 20 72 74 72 |utines()==1) rtr| 00007a60 75 65 3b 0a 0a 20 20 69 3d 63 68 69 6c 64 72 65 |ue;.. i=childre| 00007a70 6e 28 6e 6f 75 6e 29 3b 0a 20 20 69 66 20 28 69 |n(noun);. if (i| 00007a80 3d 3d 30 29 20 7b 20 43 44 65 66 41 72 74 28 6e |==0) { CDefArt(n| 00007a90 6f 75 6e 29 3b 20 22 20 69 73 20 65 6d 70 74 79 |oun); " is empty| 00007aa0 2e 22 3b 20 7d 0a 20 20 70 72 69 6e 74 20 22 49 |."; }. print "I| 00007ab0 6e 20 22 3b 20 44 65 66 41 72 74 28 6e 6f 75 6e |n "; DefArt(noun| 00007ac0 29 3b 20 69 66 20 28 69 3e 31 29 20 70 72 69 6e |); if (i>1) prin| 00007ad0 74 20 22 20 61 72 65 20 22 3b 20 65 6c 73 65 20 |t " are "; else | 00007ae0 70 72 69 6e 74 20 22 20 69 73 20 22 3b 0a 20 20 |print " is ";. | 00007af0 57 72 69 74 65 4c 69 73 74 46 72 6f 6d 28 63 68 |WriteListFrom(ch| 00007b00 69 6c 64 28 6e 6f 75 6e 29 2c 20 54 45 52 53 45 |ild(noun), TERSE| 00007b10 5f 42 49 54 20 2b 20 45 4e 47 4c 49 53 48 5f 42 |_BIT + ENGLISH_B| 00007b20 49 54 29 3b 0a 20 20 22 2e 22 3b 0a 5d 3b 0a 0a |IT);. ".";.];..| 00007b30 21 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |! --------------| 00007b40 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00007b70 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 21 |--------------.!| 00007b80 20 20 20 56 65 72 62 73 20 77 68 69 63 68 20 63 | Verbs which c| 00007b90 68 61 6e 67 65 20 74 68 65 20 73 74 61 74 65 20 |hange the state | 00007ba0 6f 66 20 6f 62 6a 65 63 74 73 20 77 69 74 68 6f |of objects witho| 00007bb0 75 74 20 6d 6f 76 69 6e 67 20 74 68 65 6d 0a 21 |ut moving them.!| 00007bc0 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | ---------------| 00007bd0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00007c00 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 5b |-------------..[| 00007c10 20 55 6e 6c 6f 63 6b 53 75 62 3b 0a 20 20 69 66 | UnlockSub;. if| 00007c20 20 28 6e 6f 75 6e 20 68 61 73 6e 74 20 6c 6f 63 | (noun hasnt loc| 00007c30 6b 61 62 6c 65 29 20 22 49 20 63 61 6e 27 74 20 |kable) "I can't | 00007c40 73 65 65 20 68 6f 77 20 74 6f 20 75 6e 6c 6f 63 |see how to unloc| 00007c50 6b 20 74 68 61 74 2e 22 3b 0a 20 20 69 66 20 28 |k that.";. if (| 00007c60 6e 6f 75 6e 20 68 61 73 6e 74 20 6c 6f 63 6b 65 |noun hasnt locke| 00007c70 64 29 20 20 20 22 49 74 20 69 73 20 69 6e 20 66 |d) "It is in f| 00007c80 61 63 74 20 75 6e 6c 6f 63 6b 65 64 20 6e 6f 77 |act unlocked now| 00007c90 2e 22 3b 0a 20 20 69 66 20 28 6e 6f 75 6e 2e 77 |.";. if (noun.w| 00007ca0 69 74 68 5f 6b 65 79 7e 3d 73 65 63 6f 6e 64 29 |ith_key~=second)| 00007cb0 20 22 54 68 61 74 20 64 6f 65 73 6e 27 74 20 73 | "That doesn't s| 00007cc0 65 65 6d 20 74 6f 20 66 69 74 20 74 68 65 20 6c |eem to fit the l| 00007cd0 6f 63 6b 2e 22 3b 0a 20 20 67 69 76 65 20 6e 6f |ock.";. give no| 00007ce0 75 6e 20 7e 6c 6f 63 6b 65 64 3b 0a 20 20 69 66 |un ~locked;. if| 00007cf0 20 28 41 66 74 65 72 52 6f 75 74 69 6e 65 73 28 | (AfterRoutines(| 00007d00 29 3d 3d 31 29 20 72 74 72 75 65 3b 0a 20 20 70 |)==1) rtrue;. p| 00007d10 72 69 6e 74 20 22 59 6f 75 20 75 6e 6c 6f 63 6b |rint "You unlock| 00007d20 20 22 3b 20 44 65 66 41 72 74 28 6e 6f 75 6e 29 | "; DefArt(noun)| 00007d30 3b 20 22 2e 22 3b 0a 5d 3b 0a 0a 5b 20 4c 6f 63 |; ".";.];..[ Loc| 00007d40 6b 53 75 62 3b 0a 20 20 69 66 20 28 6e 6f 75 6e |kSub;. if (noun| 00007d50 20 68 61 73 6e 74 20 6c 6f 63 6b 61 62 6c 65 29 | hasnt lockable)| 00007d60 20 22 49 20 63 61 6e 27 74 20 73 65 65 20 68 6f | "I can't see ho| 00007d70 77 20 74 6f 20 6c 6f 63 6b 20 74 68 61 74 2e 22 |w to lock that."| 00007d80 3b 0a 20 20 69 66 20 28 6e 6f 75 6e 20 68 61 73 |;. if (noun has| 00007d90 20 6c 6f 63 6b 65 64 29 20 20 20 20 20 22 49 74 | locked) "It| 00007da0 20 69 73 20 69 6e 20 66 61 63 74 20 6c 6f 63 6b | is in fact lock| 00007db0 65 64 20 6e 6f 77 2e 22 3b 0a 20 20 69 66 20 28 |ed now.";. if (| 00007dc0 6e 6f 75 6e 20 68 61 73 20 6f 70 65 6e 29 20 20 |noun has open) | 00007dd0 20 20 20 20 20 22 46 69 72 73 74 20 79 6f 75 27 | "First you'| 00007de0 6c 6c 20 68 61 76 65 20 74 6f 20 63 6c 6f 73 65 |ll have to close| 00007df0 20 69 74 2e 22 3b 0a 20 20 69 66 20 28 6e 6f 75 | it.";. if (nou| 00007e00 6e 2e 77 69 74 68 5f 6b 65 79 7e 3d 73 65 63 6f |n.with_key~=seco| 00007e10 6e 64 29 20 22 54 68 61 74 20 64 6f 65 73 6e 27 |nd) "That doesn'| 00007e20 74 20 73 65 65 6d 20 74 6f 20 66 69 74 20 74 68 |t seem to fit th| 00007e30 65 20 6c 6f 63 6b 2e 22 3b 0a 20 20 67 69 76 65 |e lock.";. give| 00007e40 20 6e 6f 75 6e 20 6c 6f 63 6b 65 64 3b 0a 20 20 | noun locked;. | 00007e50 69 66 20 28 41 66 74 65 72 52 6f 75 74 69 6e 65 |if (AfterRoutine| 00007e60 73 28 29 3d 3d 31 29 20 72 74 72 75 65 3b 0a 20 |s()==1) rtrue;. | 00007e70 20 70 72 69 6e 74 20 22 59 6f 75 20 6c 6f 63 6b | print "You lock| 00007e80 20 22 3b 20 44 65 66 41 72 74 28 6e 6f 75 6e 29 | "; DefArt(noun)| 00007e90 3b 20 22 2e 22 3b 0a 5d 3b 0a 0a 5b 20 53 77 69 |; ".";.];..[ Swi| 00007ea0 74 63 68 6f 6e 53 75 62 3b 0a 20 20 69 66 20 28 |tchonSub;. if (| 00007eb0 6e 6f 75 6e 20 68 61 73 6e 74 20 73 77 69 74 63 |noun hasnt switc| 00007ec0 68 61 62 6c 65 29 0a 20 20 20 20 20 20 22 54 68 |hable). "Th| 00007ed0 61 74 27 73 20 6e 6f 74 20 73 6f 6d 65 74 68 69 |at's not somethi| 00007ee0 6e 67 20 79 6f 75 20 63 61 6e 20 73 77 69 74 63 |ng you can switc| 00007ef0 68 2e 22 3b 0a 20 20 69 66 20 28 6e 6f 75 6e 20 |h.";. if (noun | 00007f00 68 61 73 20 6f 6e 29 20 22 49 74 27 73 20 61 6c |has on) "It's al| 00007f10 72 65 61 64 79 20 6f 6e 2e 22 3b 0a 20 20 67 69 |ready on.";. gi| 00007f20 76 65 20 6e 6f 75 6e 20 6f 6e 3b 0a 20 20 69 66 |ve noun on;. if| 00007f30 20 28 41 66 74 65 72 52 6f 75 74 69 6e 65 73 28 | (AfterRoutines(| 00007f40 29 3d 3d 31 29 20 72 74 72 75 65 3b 0a 20 20 70 |)==1) rtrue;. p| 00007f50 72 69 6e 74 20 22 59 6f 75 20 73 77 69 74 63 68 |rint "You switch| 00007f60 20 22 3b 20 44 65 66 41 72 74 28 6e 6f 75 6e 29 | "; DefArt(noun)| 00007f70 3b 20 22 20 6f 6e 2e 22 3b 0a 5d 3b 0a 0a 5b 20 |; " on.";.];..[ | 00007f80 53 77 69 74 63 68 6f 66 66 53 75 62 3b 0a 20 20 |SwitchoffSub;. | 00007f90 69 66 20 28 6e 6f 75 6e 20 68 61 73 6e 74 20 73 |if (noun hasnt s| 00007fa0 77 69 74 63 68 61 62 6c 65 29 0a 20 20 20 20 20 |witchable). | 00007fb0 20 22 54 68 61 74 27 73 20 6e 6f 74 20 73 6f 6d | "That's not som| 00007fc0 65 74 68 69 6e 67 20 79 6f 75 20 63 61 6e 20 73 |ething you can s| 00007fd0 77 69 74 63 68 2e 22 3b 0a 20 20 69 66 20 28 6e |witch.";. if (n| 00007fe0 6f 75 6e 20 68 61 73 6e 74 20 6f 6e 29 20 22 49 |oun hasnt on) "I| 00007ff0 74 27 73 20 61 6c 72 65 61 64 79 20 6f 66 66 2e |t's already off.| 00008000 22 3b 0a 20 20 67 69 76 65 20 6e 6f 75 6e 20 7e |";. give noun ~| 00008010 6f 6e 3b 0a 20 20 69 66 20 28 41 66 74 65 72 52 |on;. if (AfterR| 00008020 6f 75 74 69 6e 65 73 28 29 3d 3d 31 29 20 72 74 |outines()==1) rt| 00008030 72 75 65 3b 0a 20 20 70 72 69 6e 74 20 22 59 6f |rue;. print "Yo| 00008040 75 20 73 77 69 74 63 68 20 22 3b 20 44 65 66 41 |u switch "; DefA| 00008050 72 74 28 6e 6f 75 6e 29 3b 20 22 20 6f 66 66 2e |rt(noun); " off.| 00008060 22 3b 0a 5d 3b 0a 0a 5b 20 4f 70 65 6e 53 75 62 |";.];..[ OpenSub| 00008070 3b 0a 20 20 69 66 20 28 6e 6f 75 6e 20 68 61 73 |;. if (noun has| 00008080 6e 74 20 6f 70 65 6e 61 62 6c 65 29 20 22 54 68 |nt openable) "Th| 00008090 61 74 27 73 20 6e 6f 74 20 73 6f 6d 65 74 68 69 |at's not somethi| 000080a0 6e 67 20 79 6f 75 20 63 61 6e 20 6f 70 65 6e 2e |ng you can open.| 000080b0 22 3b 0a 20 20 69 66 20 28 6e 6f 75 6e 20 68 61 |";. if (noun ha| 000080c0 73 20 6c 6f 63 6b 65 64 29 20 20 20 20 20 22 49 |s locked) "I| 000080d0 74 20 73 65 65 6d 73 20 74 6f 20 62 65 20 6c 6f |t seems to be lo| 000080e0 63 6b 65 64 2e 22 3b 0a 20 20 69 66 20 28 6e 6f |cked.";. if (no| 000080f0 75 6e 20 68 61 73 20 6f 70 65 6e 29 20 20 20 20 |un has open) | 00008100 20 20 20 22 49 74 27 73 20 61 6c 72 65 61 64 79 | "It's already| 00008110 20 6f 70 65 6e 2e 22 3b 0a 20 20 67 69 76 65 20 | open.";. give | 00008120 6e 6f 75 6e 20 6f 70 65 6e 3b 0a 20 20 69 66 20 |noun open;. if | 00008130 28 41 66 74 65 72 52 6f 75 74 69 6e 65 73 28 29 |(AfterRoutines()| 00008140 3d 3d 31 29 20 72 74 72 75 65 3b 0a 20 20 70 72 |==1) rtrue;. pr| 00008150 69 6e 74 20 22 59 6f 75 20 6f 70 65 6e 20 22 3b |int "You open ";| 00008160 20 44 65 66 41 72 74 28 6e 6f 75 6e 29 3b 20 22 | DefArt(noun); "| 00008170 2e 22 3b 0a 5d 3b 0a 0a 5b 20 43 6c 6f 73 65 53 |.";.];..[ CloseS| 00008180 75 62 3b 0a 20 20 69 66 20 28 6e 6f 75 6e 20 68 |ub;. if (noun h| 00008190 61 73 6e 74 20 6f 70 65 6e 61 62 6c 65 29 20 22 |asnt openable) "| 000081a0 54 68 61 74 27 73 20 6e 6f 74 20 73 6f 6d 65 74 |That's not somet| 000081b0 68 69 6e 67 20 79 6f 75 20 63 61 6e 20 63 6c 6f |hing you can clo| 000081c0 73 65 2e 22 3b 0a 20 20 69 66 20 28 6e 6f 75 6e |se.";. if (noun| 000081d0 20 68 61 73 6e 74 20 6f 70 65 6e 29 20 20 20 20 | hasnt open) | 000081e0 20 22 49 74 27 73 20 61 6c 72 65 61 64 79 20 63 | "It's already c| 000081f0 6c 6f 73 65 64 2e 22 3b 0a 20 20 67 69 76 65 20 |losed.";. give | 00008200 6e 6f 75 6e 20 7e 6f 70 65 6e 3b 0a 20 20 69 66 |noun ~open;. if| 00008210 20 28 41 66 74 65 72 52 6f 75 74 69 6e 65 73 28 | (AfterRoutines(| 00008220 29 3d 3d 31 29 20 72 74 72 75 65 3b 0a 20 20 70 |)==1) rtrue;. p| 00008230 72 69 6e 74 20 22 59 6f 75 20 63 6c 6f 73 65 20 |rint "You close | 00008240 22 3b 20 44 65 66 41 72 74 28 6e 6f 75 6e 29 3b |"; DefArt(noun);| 00008250 20 22 2e 22 3b 0a 5d 3b 0a 0a 5b 20 44 69 73 72 | ".";.];..[ Disr| 00008260 6f 62 65 53 75 62 3b 0a 20 20 69 66 20 28 6e 6f |obeSub;. if (no| 00008270 75 6e 20 68 61 73 6e 74 20 77 6f 72 6e 29 20 22 |un hasnt worn) "| 00008280 59 6f 75 27 72 65 20 6e 6f 74 20 77 65 61 72 69 |You're not weari| 00008290 6e 67 20 74 68 61 74 2e 22 3b 0a 20 20 67 69 76 |ng that.";. giv| 000082a0 65 20 6e 6f 75 6e 20 7e 77 6f 72 6e 3b 0a 20 20 |e noun ~worn;. | 000082b0 69 66 20 28 41 66 74 65 72 52 6f 75 74 69 6e 65 |if (AfterRoutine| 000082c0 73 28 29 3d 3d 31 29 20 72 74 72 75 65 3b 0a 20 |s()==1) rtrue;. | 000082d0 20 70 72 69 6e 74 20 22 59 6f 75 20 74 61 6b 65 | print "You take| 000082e0 20 6f 66 66 20 22 3b 20 44 65 66 41 72 74 28 6e | off "; DefArt(n| 000082f0 6f 75 6e 29 3b 20 70 72 69 6e 74 20 22 2e 5e 22 |oun); print ".^"| 00008300 3b 0a 5d 3b 0a 0a 5b 20 57 65 61 72 53 75 62 3b |;.];..[ WearSub;| 00008310 0a 20 20 69 66 20 28 6e 6f 75 6e 20 68 61 73 6e |. if (noun hasn| 00008320 74 20 63 6c 6f 74 68 69 6e 67 29 20 20 22 59 6f |t clothing) "Yo| 00008330 75 20 63 61 6e 27 74 20 77 65 61 72 20 74 68 61 |u can't wear tha| 00008340 74 21 22 3b 0a 20 20 69 66 20 28 70 61 72 65 6e |t!";. if (paren| 00008350 74 28 6e 6f 75 6e 29 7e 3d 70 6c 61 79 65 72 29 |t(noun)~=player)| 00008360 20 22 59 6f 75 27 72 65 20 6e 6f 74 20 68 6f 6c | "You're not hol| 00008370 64 69 6e 67 20 74 68 61 74 21 22 3b 0a 20 20 69 |ding that!";. i| 00008380 66 20 28 6e 6f 75 6e 20 68 61 73 20 77 6f 72 6e |f (noun has worn| 00008390 29 20 20 20 20 20 20 20 20 22 59 6f 75 27 72 65 |) "You're| 000083a0 20 61 6c 72 65 61 64 79 20 77 65 61 72 69 6e 67 | already wearing| 000083b0 20 74 68 61 74 21 22 3b 0a 20 20 67 69 76 65 20 | that!";. give | 000083c0 6e 6f 75 6e 20 77 6f 72 6e 3b 0a 20 20 69 66 20 |noun worn;. if | 000083d0 28 41 66 74 65 72 52 6f 75 74 69 6e 65 73 28 29 |(AfterRoutines()| 000083e0 3d 3d 31 29 20 72 74 72 75 65 3b 0a 20 20 70 72 |==1) rtrue;. pr| 000083f0 69 6e 74 20 22 59 6f 75 20 70 75 74 20 6f 6e 20 |int "You put on | 00008400 22 3b 20 44 65 66 41 72 74 28 6e 6f 75 6e 29 3b |"; DefArt(noun);| 00008410 20 70 72 69 6e 74 20 22 2e 5e 22 3b 0a 5d 3b 0a | print ".^";.];.| 00008420 0a 5b 20 45 61 74 53 75 62 3b 0a 20 20 69 66 20 |.[ EatSub;. if | 00008430 28 6e 6f 75 6e 20 68 61 73 6e 74 20 65 64 69 62 |(noun hasnt edib| 00008440 6c 65 29 20 20 20 20 22 4e 6f 2c 20 69 74 27 73 |le) "No, it's| 00008450 20 70 6c 61 69 6e 6c 79 20 69 6e 65 64 69 62 6c | plainly inedibl| 00008460 65 2e 22 3b 0a 20 20 72 65 6d 6f 76 65 20 6e 6f |e.";. remove no| 00008470 75 6e 3b 0a 20 20 69 66 20 28 41 66 74 65 72 52 |un;. if (AfterR| 00008480 6f 75 74 69 6e 65 73 28 29 3d 3d 31 29 20 72 74 |outines()==1) rt| 00008490 72 75 65 3b 0a 20 20 70 72 69 6e 74 20 22 59 6f |rue;. print "Yo| 000084a0 75 20 65 61 74 20 22 3b 20 44 65 66 41 72 74 28 |u eat "; DefArt(| 000084b0 6e 6f 75 6e 29 3b 20 22 2e 20 20 4e 6f 74 20 62 |noun); ". Not b| 000084c0 61 64 2e 22 3b 0a 5d 3b 0a 0a 21 20 2d 2d 2d 2d |ad.";.];..! ----| 000084d0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00008510 2d 2d 2d 2d 2d 2d 2d 2d 0a 21 20 20 20 56 65 72 |--------.! Ver| 00008520 62 73 20 77 68 69 63 68 20 61 72 65 20 72 65 61 |bs which are rea| 00008530 6c 6c 79 20 6a 75 73 74 20 73 74 75 62 73 20 28 |lly just stubs (| 00008540 61 6e 79 74 68 69 6e 67 20 77 68 69 63 68 20 68 |anything which h| 00008550 61 70 70 65 6e 73 20 66 6f 72 20 74 68 65 73 65 |appens for these| 00008560 0a 21 20 20 20 61 63 74 69 6f 6e 73 20 6d 75 73 |.! actions mus| 00008570 74 20 68 61 70 70 65 6e 20 69 6e 20 62 65 66 6f |t happen in befo| 00008580 72 65 20 72 75 6c 65 73 29 0a 21 20 2d 2d 2d 2d |re rules).! ----| 00008590 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000085d0 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a 5b 20 59 65 73 53 |--------..[ YesS| 000085e0 75 62 3b 0a 20 20 22 54 68 61 74 20 77 61 73 20 |ub;. "That was | 000085f0 61 20 72 68 65 74 6f 72 69 63 61 6c 20 71 75 65 |a rhetorical que| 00008600 73 74 69 6f 6e 2e 22 3b 0a 5d 3b 0a 0a 5b 20 4e |stion.";.];..[ N| 00008610 6f 53 75 62 3b 0a 20 20 22 54 68 61 74 20 77 61 |oSub;. "That wa| 00008620 73 20 61 20 72 68 65 74 6f 72 69 63 61 6c 20 71 |s a rhetorical q| 00008630 75 65 73 74 69 6f 6e 2e 22 3b 0a 5d 3b 0a 0a 5b |uestion.";.];..[| 00008640 20 42 75 72 6e 53 75 62 3b 0a 20 20 22 49 6e 20 | BurnSub;. "In | 00008650 74 68 69 73 20 67 61 6d 65 2c 20 61 72 73 6f 6e |this game, arson| 00008660 20 69 73 20 28 75 73 75 61 6c 6c 79 29 20 66 6f | is (usually) fo| 00008670 72 62 69 64 64 65 6e 2e 22 3b 0a 5d 3b 0a 0a 5b |rbidden.";.];..[| 00008680 20 50 72 61 79 53 75 62 3b 0a 20 20 22 53 70 6f | PraySub;. "Spo| 00008690 6f 6b 79 21 20 20 46 6f 72 20 61 20 6d 6f 6d 65 |oky! For a mome| 000086a0 6e 74 20 74 68 65 72 65 2c 20 61 20 64 65 65 70 |nt there, a deep| 000086b0 20 76 6f 69 63 65 20 73 65 65 6d 65 64 20 5c 0a | voice seemed \.| 000086c0 20 20 20 20 20 20 20 20 20 20 20 20 20 74 6f 20 | to | 000086d0 73 61 79 20 7e 79 6f 75 27 72 65 20 6f 6e 20 79 |say ~you're on y| 000086e0 6f 75 72 20 6f 77 6e 7e 2e 22 3b 0a 5d 3b 0a 0a |our own~.";.];..| 000086f0 5b 20 57 61 6b 65 53 75 62 3b 0a 20 20 22 54 68 |[ WakeSub;. "Th| 00008700 65 20 64 72 65 61 64 66 75 6c 20 74 72 75 74 68 |e dreadful truth| 00008710 20 69 73 2c 20 74 68 69 73 20 69 73 20 6e 6f 74 | is, this is not| 00008720 20 61 20 64 72 65 61 6d 2e 22 3b 0a 5d 3b 0a 0a | a dream.";.];..| 00008730 5b 20 57 61 6b 65 4f 74 68 65 72 53 75 62 3b 0a |[ WakeOtherSub;.| 00008740 20 20 22 54 68 61 74 20 73 65 65 6d 73 20 75 6e | "That seems un| 00008750 6e 65 63 65 73 73 61 72 79 2e 22 3b 0a 5d 3b 0a |necessary.";.];.| 00008760 0a 5b 20 4b 69 73 73 53 75 62 3b 0a 20 20 69 66 |.[ KissSub;. if| 00008770 20 28 52 75 6e 4c 69 66 65 28 6e 6f 75 6e 2c 23 | (RunLife(noun,#| 00008780 23 4b 69 73 73 29 7e 3d 30 29 20 72 66 61 6c 73 |#Kiss)~=0) rfals| 00008790 65 3b 0a 20 20 22 4b 65 65 70 20 79 6f 75 72 20 |e;. "Keep your | 000087a0 6d 69 6e 64 20 6f 6e 20 74 68 65 20 67 61 6d 65 |mind on the game| 000087b0 2e 22 3b 0a 5d 3b 0a 0a 5b 20 54 68 69 6e 6b 53 |.";.];..[ ThinkS| 000087c0 75 62 3b 0a 20 20 22 57 68 61 74 20 61 20 67 6f |ub;. "What a go| 000087d0 6f 64 20 69 64 65 61 2e 22 3b 0a 5d 3b 0a 0a 5b |od idea.";.];..[| 000087e0 20 53 6d 65 6c 6c 53 75 62 3b 0a 20 20 22 59 6f | SmellSub;. "Yo| 000087f0 75 20 73 6d 65 6c 6c 20 6e 6f 74 68 69 6e 67 20 |u smell nothing | 00008800 75 6e 65 78 70 65 63 74 65 64 2e 22 3b 0a 5d 3b |unexpected.";.];| 00008810 0a 0a 5b 20 4c 69 73 74 65 6e 53 75 62 3b 0a 20 |..[ ListenSub;. | 00008820 20 22 59 6f 75 20 68 65 61 72 20 6e 6f 74 68 69 | "You hear nothi| 00008830 6e 67 20 75 6e 65 78 70 65 63 74 65 64 2e 22 3b |ng unexpected.";| 00008840 0a 5d 3b 0a 0a 5b 20 54 61 73 74 65 53 75 62 3b |.];..[ TasteSub;| 00008850 0a 20 20 22 59 6f 75 20 74 61 73 74 65 20 6e 6f |. "You taste no| 00008860 74 68 69 6e 67 20 75 6e 65 78 70 65 63 74 65 64 |thing unexpected| 00008870 2e 22 3b 0a 5d 3b 0a 0a 5b 20 54 6f 75 63 68 53 |.";.];..[ TouchS| 00008880 75 62 3b 0a 20 20 22 59 6f 75 20 66 65 65 6c 20 |ub;. "You feel | 00008890 6e 6f 74 68 69 6e 67 20 75 6e 65 78 70 65 63 74 |nothing unexpect| 000088a0 65 64 2e 22 3b 0a 5d 3b 0a 0a 5b 20 54 6f 75 63 |ed.";.];..[ Touc| 000088b0 68 54 68 69 6e 67 53 75 62 3b 0a 20 20 69 66 20 |hThingSub;. if | 000088c0 28 6e 6f 75 6e 20 68 61 73 20 61 6e 69 6d 61 74 |(noun has animat| 000088d0 65 29 20 22 4b 65 65 70 20 79 6f 75 72 20 68 61 |e) "Keep your ha| 000088e0 6e 64 73 20 74 6f 20 79 6f 75 72 73 65 6c 66 21 |nds to yourself!| 000088f0 22 3b 0a 20 20 22 59 6f 75 20 66 65 65 6c 20 6e |";. "You feel n| 00008900 6f 74 68 69 6e 67 20 75 6e 65 78 70 65 63 74 65 |othing unexpecte| 00008910 64 2e 22 3b 0a 5d 3b 0a 0a 5b 20 44 69 67 53 75 |d.";.];..[ DigSu| 00008920 62 3b 0a 20 20 22 54 68 65 20 67 72 6f 75 6e 64 |b;. "The ground| 00008930 20 69 73 20 75 6e 73 75 69 74 61 62 6c 65 20 66 | is unsuitable f| 00008940 6f 72 20 64 69 67 67 69 6e 67 20 68 65 72 65 2e |or digging here.| 00008950 22 3b 0a 5d 3b 0a 0a 5b 20 43 75 74 53 75 62 3b |";.];..[ CutSub;| 00008960 0a 20 20 22 49 6e 20 74 68 69 73 20 67 61 6d 65 |. "In this game| 00008970 2c 20 63 75 74 74 69 6e 67 20 74 68 69 6e 67 73 |, cutting things| 00008980 20 75 70 20 69 73 20 6e 65 76 65 72 20 68 65 6c | up is never hel| 00008990 70 66 75 6c 2e 22 3b 0a 5d 3b 0a 0a 5b 20 4a 75 |pful.";.];..[ Ju| 000089a0 6d 70 53 75 62 3b 0a 20 20 22 59 6f 75 20 6a 75 |mpSub;. "You ju| 000089b0 6d 70 20 6f 6e 20 74 68 65 20 73 70 6f 74 2c 20 |mp on the spot, | 000089c0 66 72 75 69 74 6c 65 73 73 6c 79 2e 22 3b 0a 5d |fruitlessly.";.]| 000089d0 3b 0a 0a 5b 20 4a 75 6d 70 4f 76 65 72 53 75 62 |;..[ JumpOverSub| 000089e0 3b 0a 20 20 22 59 6f 75 20 77 6f 75 6c 64 20 61 |;. "You would a| 000089f0 63 68 69 65 76 65 20 6e 6f 74 68 69 6e 67 20 62 |chieve nothing b| 00008a00 79 20 74 68 69 73 2e 22 3b 0a 5d 3b 0a 0a 5b 20 |y this.";.];..[ | 00008a10 54 69 65 53 75 62 3b 0a 20 20 22 59 6f 75 20 77 |TieSub;. "You w| 00008a20 6f 75 6c 64 20 61 63 68 69 65 76 65 20 6e 6f 74 |ould achieve not| 00008a30 68 69 6e 67 20 62 79 20 74 68 69 73 2e 22 3b 0a |hing by this.";.| 00008a40 5d 3b 0a 0a 5b 20 44 72 69 6e 6b 53 75 62 3b 0a |];..[ DrinkSub;.| 00008a50 20 20 22 54 68 65 72 65 27 73 20 6e 6f 74 68 69 | "There's nothi| 00008a60 6e 67 20 73 75 69 74 61 62 6c 65 20 74 6f 20 64 |ng suitable to d| 00008a70 72 69 6e 6b 20 68 65 72 65 2e 22 3b 0a 5d 3b 0a |rink here.";.];.| 00008a80 0a 5b 20 46 69 6c 6c 53 75 62 3b 0a 20 20 22 42 |.[ FillSub;. "B| 00008a90 75 74 20 74 68 65 72 65 27 73 20 6e 6f 20 77 61 |ut there's no wa| 00008aa0 74 65 72 20 68 65 72 65 20 74 6f 20 63 61 72 72 |ter here to carr| 00008ab0 79 2e 22 3b 0a 5d 3b 0a 0a 5b 20 53 6f 72 72 79 |y.";.];..[ Sorry| 00008ac0 53 75 62 3b 0a 20 20 22 4f 68 2c 20 64 6f 6e 27 |Sub;. "Oh, don'| 00008ad0 74 20 61 70 6f 6c 6f 67 69 73 65 2e 22 3b 0a 5d |t apologise.";.]| 00008ae0 3b 0a 0a 5b 20 53 74 72 6f 6e 67 53 75 62 3b 0a |;..[ StrongSub;.| 00008af0 20 20 22 44 69 73 67 72 61 63 65 66 75 6c 21 20 | "Disgraceful! | 00008b00 20 4f 6e 63 65 20 75 70 6f 6e 20 61 20 74 69 6d | Once upon a tim| 00008b10 65 20 61 64 76 65 6e 74 75 72 65 72 73 20 68 61 |e adventurers ha| 00008b20 64 20 6d 6f 72 61 6c 20 73 74 61 6e 64 61 72 64 |d moral standard| 00008b30 73 2e 22 3b 0a 5d 3b 0a 0a 5b 20 4d 69 6c 64 53 |s.";.];..[ MildS| 00008b40 75 62 3b 0a 20 20 22 51 75 69 74 65 2e 22 3b 0a |ub;. "Quite.";.| 00008b50 5d 3b 0a 0a 5b 20 41 74 74 61 63 6b 53 75 62 3b |];..[ AttackSub;| 00008b60 0a 20 20 69 66 20 28 6e 6f 75 6e 20 68 61 73 20 |. if (noun has | 00008b70 61 6e 69 6d 61 74 65 20 26 26 20 52 75 6e 4c 69 |animate && RunLi| 00008b80 66 65 28 6e 6f 75 6e 2c 23 23 41 74 74 61 63 6b |fe(noun,##Attack| 00008b90 29 7e 3d 30 29 20 72 66 61 6c 73 65 3b 0a 20 20 |)~=0) rfalse;. | 00008ba0 22 56 69 6f 6c 65 6e 63 65 20 69 73 6e 27 74 20 |"Violence isn't | 00008bb0 74 68 65 20 61 6e 73 77 65 72 2c 20 79 6f 75 20 |the answer, you | 00008bc0 6b 6e 6f 77 2e 22 3b 0a 5d 3b 0a 0a 5b 20 53 77 |know.";.];..[ Sw| 00008bd0 69 6d 53 75 62 3b 0a 20 20 22 54 68 65 72 65 27 |imSub;. "There'| 00008be0 73 20 6e 6f 74 20 65 6e 6f 75 67 68 20 77 61 74 |s not enough wat| 00008bf0 65 72 20 74 6f 20 73 77 69 6d 20 69 6e 2e 22 3b |er to swim in.";| 00008c00 0a 5d 3b 0a 0a 5b 20 53 77 69 6e 67 53 75 62 3b |.];..[ SwingSub;| 00008c10 0a 20 20 22 54 68 65 72 65 27 73 20 6e 6f 74 68 |. "There's noth| 00008c20 69 6e 67 20 73 65 6e 73 69 62 6c 65 20 74 6f 20 |ing sensible to | 00008c30 73 77 69 6e 67 20 68 65 72 65 2e 22 3b 0a 5d 3b |swing here.";.];| 00008c40 0a 0a 5b 20 42 6c 6f 77 53 75 62 3b 0a 20 20 22 |..[ BlowSub;. "| 00008c50 59 6f 75 20 63 61 6e 27 74 20 75 73 65 66 75 6c |You can't useful| 00008c60 6c 79 20 62 6c 6f 77 20 74 68 61 74 2e 22 3b 0a |ly blow that.";.| 00008c70 5d 3b 0a 0a 5b 20 52 75 62 53 75 62 3b 0a 20 20 |];..[ RubSub;. | 00008c80 22 59 6f 75 20 61 63 68 69 65 76 65 20 6e 6f 74 |"You achieve not| 00008c90 68 69 6e 67 20 62 79 20 74 68 69 73 2e 22 3b 0a |hing by this.";.| 00008ca0 5d 3b 0a 0a 5b 20 53 65 74 53 75 62 3b 0a 20 20 |];..[ SetSub;. | 00008cb0 22 4e 6f 2c 20 79 6f 75 20 63 61 6e 27 74 20 73 |"No, you can't s| 00008cc0 65 74 20 74 68 61 74 2e 22 3b 0a 5d 3b 0a 0a 5b |et that.";.];..[| 00008cd0 20 53 65 74 54 6f 53 75 62 3b 0a 20 20 22 4e 6f | SetToSub;. "No| 00008ce0 2c 20 79 6f 75 20 63 61 6e 27 74 20 73 65 74 20 |, you can't set | 00008cf0 74 68 61 74 20 74 6f 20 61 6e 79 74 68 69 6e 67 |that to anything| 00008d00 2e 22 3b 0a 5d 3b 0a 0a 5b 20 57 61 76 65 48 61 |.";.];..[ WaveHa| 00008d10 6e 64 73 53 75 62 3b 0a 20 20 22 59 6f 75 20 77 |ndsSub;. "You w| 00008d20 61 76 65 2c 20 66 65 65 6c 69 6e 67 20 66 6f 6f |ave, feeling foo| 00008d30 6c 69 73 68 2e 22 3b 0a 5d 3b 0a 0a 5b 20 57 61 |lish.";.];..[ Wa| 00008d40 76 65 53 75 62 3b 0a 20 20 69 66 20 28 70 61 72 |veSub;. if (par| 00008d50 65 6e 74 28 6e 6f 75 6e 29 7e 3d 70 6c 61 79 65 |ent(noun)~=playe| 00008d60 72 29 20 22 42 75 74 20 79 6f 75 20 61 72 65 6e |r) "But you aren| 00008d70 27 74 20 68 6f 6c 64 69 6e 67 20 74 68 61 74 2e |'t holding that.| 00008d80 22 3b 0a 20 20 70 72 69 6e 74 20 22 59 6f 75 20 |";. print "You | 00008d90 6c 6f 6f 6b 20 72 69 64 69 63 75 6c 6f 75 73 20 |look ridiculous | 00008da0 77 61 76 69 6e 67 20 22 3b 20 44 65 66 41 72 74 |waving "; DefArt| 00008db0 28 6e 6f 75 6e 29 3b 20 22 2e 22 3b 0a 5d 3b 0a |(noun); ".";.];.| 00008dc0 0a 5b 20 50 75 6c 6c 53 75 62 3b 0a 20 20 69 66 |.[ PullSub;. if| 00008dd0 20 28 6e 6f 75 6e 20 68 61 73 20 73 74 61 74 69 | (noun has stati| 00008de0 63 29 20 20 20 22 49 74 20 69 73 20 66 69 78 65 |c) "It is fixe| 00008df0 64 20 69 6e 20 70 6c 61 63 65 2e 22 3b 0a 20 20 |d in place.";. | 00008e00 69 66 20 28 6e 6f 75 6e 20 68 61 73 20 73 63 65 |if (noun has sce| 00008e10 6e 65 72 79 29 20 20 22 59 6f 75 20 61 72 65 20 |nery) "You are | 00008e20 75 6e 61 62 6c 65 20 74 6f 2e 22 3b 0a 20 20 22 |unable to.";. "| 00008e30 4e 6f 74 68 69 6e 67 20 6f 62 76 69 6f 75 73 20 |Nothing obvious | 00008e40 68 61 70 70 65 6e 73 2e 22 3b 0a 5d 3b 0a 0a 5b |happens.";.];..[| 00008e50 20 50 75 73 68 53 75 62 3b 0a 20 20 69 66 20 28 | PushSub;. if (| 00008e60 6e 6f 75 6e 20 68 61 73 20 73 74 61 74 69 63 29 |noun has static)| 00008e70 20 20 20 22 49 74 20 69 73 20 66 69 78 65 64 20 | "It is fixed | 00008e80 69 6e 20 70 6c 61 63 65 2e 22 3b 0a 20 20 69 66 |in place.";. if| 00008e90 20 28 6e 6f 75 6e 20 68 61 73 20 73 63 65 6e 65 | (noun has scene| 00008ea0 72 79 29 20 20 22 59 6f 75 20 61 72 65 20 75 6e |ry) "You are un| 00008eb0 61 62 6c 65 20 74 6f 2e 22 3b 0a 20 20 22 4e 6f |able to.";. "No| 00008ec0 74 68 69 6e 67 20 6f 62 76 69 6f 75 73 20 68 61 |thing obvious ha| 00008ed0 70 70 65 6e 73 2e 22 3b 0a 5d 3b 0a 0a 5b 20 41 |ppens.";.];..[ A| 00008ee0 6c 6c 6f 77 50 75 73 68 44 69 72 20 69 3b 0a 20 |llowPushDir i;. | 00008ef0 20 69 66 20 28 70 61 72 65 6e 74 28 73 65 63 6f | if (parent(seco| 00008f00 6e 64 29 7e 3d 63 6f 6d 70 61 73 73 29 20 22 54 |nd)~=compass) "T| 00008f10 68 61 74 27 73 20 6e 6f 74 20 61 20 64 69 72 65 |hat's not a dire| 00008f20 63 74 69 6f 6e 2e 22 3b 0a 20 20 69 66 20 28 73 |ction.";. if (s| 00008f30 65 63 6f 6e 64 3d 3d 75 5f 6f 62 6a 20 6f 72 20 |econd==u_obj or | 00008f40 64 5f 6f 62 6a 29 20 20 22 4e 6f 74 20 74 68 61 |d_obj) "Not tha| 00008f50 74 20 77 61 79 20 79 6f 75 20 63 61 6e 27 74 2e |t way you can't.| 00008f60 22 3b 0a 20 20 41 66 74 65 72 52 6f 75 74 69 6e |";. AfterRoutin| 00008f70 65 73 28 29 3b 0a 20 20 69 3d 6e 6f 75 6e 3b 20 |es();. i=noun; | 00008f80 3c 47 6f 20 73 65 63 6f 6e 64 3e 3b 20 6d 6f 76 |<Go second>; mov| 00008f90 65 20 69 20 74 6f 20 6c 6f 63 61 74 69 6f 6e 3b |e i to location;| 00008fa0 0a 5d 3b 0a 0a 5b 20 50 75 73 68 44 69 72 53 75 |.];..[ PushDirSu| 00008fb0 62 3b 20 20 20 20 20 20 20 20 20 20 0a 20 20 22 |b; . "| 00008fc0 49 73 20 74 68 61 74 20 74 68 65 20 62 65 73 74 |Is that the best| 00008fd0 20 79 6f 75 20 63 61 6e 20 74 68 69 6e 6b 20 6f | you can think o| 00008fe0 66 3f 22 3b 0a 5d 3b 0a 0a 5b 20 54 75 72 6e 53 |f?";.];..[ TurnS| 00008ff0 75 62 3b 0a 20 20 69 66 20 28 6e 6f 75 6e 20 68 |ub;. if (noun h| 00009000 61 73 20 73 74 61 74 69 63 29 20 20 22 49 74 20 |as static) "It | 00009010 69 73 20 66 69 78 65 64 20 69 6e 20 70 6c 61 63 |is fixed in plac| 00009020 65 2e 22 3b 0a 20 20 69 66 20 28 6e 6f 75 6e 20 |e.";. if (noun | 00009030 68 61 73 20 73 63 65 6e 65 72 79 29 20 22 59 6f |has scenery) "Yo| 00009040 75 20 61 72 65 20 75 6e 61 62 6c 65 20 74 6f 2e |u are unable to.| 00009050 22 3b 0a 20 20 22 4e 6f 74 68 69 6e 67 20 6f 62 |";. "Nothing ob| 00009060 76 69 6f 75 73 20 68 61 70 70 65 6e 73 2e 22 3b |vious happens.";| 00009070 0a 5d 3b 0a 0a 5b 20 53 71 75 65 65 7a 65 53 75 |.];..[ SqueezeSu| 00009080 62 3b 0a 20 20 69 66 20 28 6e 6f 75 6e 20 68 61 |b;. if (noun ha| 00009090 73 20 61 6e 69 6d 61 74 65 29 20 22 4b 65 65 70 |s animate) "Keep| 000090a0 20 79 6f 75 72 20 68 61 6e 64 73 20 74 6f 20 79 | your hands to y| 000090b0 6f 75 72 73 65 6c 66 2e 22 3b 0a 20 20 22 59 6f |ourself.";. "Yo| 000090c0 75 20 61 63 68 69 65 76 65 20 6e 6f 74 68 69 6e |u achieve nothin| 000090d0 67 20 62 79 20 74 68 69 73 2e 22 3b 0a 5d 3b 0a |g by this.";.];.| 000090e0 0a 5b 20 54 68 72 6f 77 41 74 53 75 62 3b 0a 20 |.[ ThrowAtSub;. | 000090f0 20 69 66 20 28 73 65 63 6f 6e 64 20 68 61 73 6e | if (second hasn| 00009100 74 20 61 6e 69 6d 61 74 65 29 20 22 46 75 74 69 |t animate) "Futi| 00009110 6c 65 2e 22 3b 0a 20 20 69 66 20 28 52 75 6e 4c |le.";. if (RunL| 00009120 69 66 65 28 73 65 63 6f 6e 64 2c 23 23 54 68 72 |ife(second,##Thr| 00009130 6f 77 41 74 29 7e 3d 30 29 20 72 66 61 6c 73 65 |owAt)~=0) rfalse| 00009140 3b 0a 20 20 22 59 6f 75 20 6c 61 63 6b 20 74 68 |;. "You lack th| 00009150 65 20 6e 65 72 76 65 20 77 68 65 6e 20 69 74 20 |e nerve when it | 00009160 63 6f 6d 65 73 20 74 6f 20 74 68 65 20 63 72 75 |comes to the cru| 00009170 63 69 61 6c 20 6d 6f 6d 65 6e 74 2e 22 3b 0a 5d |cial moment.";.]| 00009180 3b 0a 0a 5b 20 41 6e 73 77 65 72 53 75 62 3b 0a |;..[ AnswerSub;.| 00009190 20 20 69 6e 70 31 3d 73 70 65 63 69 61 6c 5f 77 | inp1=special_w| 000091a0 6f 72 64 3b 0a 20 20 69 66 20 28 52 75 6e 4c 69 |ord;. if (RunLi| 000091b0 66 65 28 73 65 63 6f 6e 64 2c 23 23 41 6e 73 77 |fe(second,##Answ| 000091c0 65 72 29 7e 3d 30 29 20 72 66 61 6c 73 65 3b 0a |er)~=0) rfalse;.| 000091d0 20 20 22 4e 6f 20 72 65 70 6c 79 2e 22 3b 0a 5d | "No reply.";.]| 000091e0 3b 20 20 0a 0a 5b 20 42 75 79 53 75 62 3b 0a 20 |; ..[ BuySub;. | 000091f0 20 22 4e 6f 74 68 69 6e 67 20 69 73 20 6f 6e 20 | "Nothing is on | 00009200 73 61 6c 65 2e 22 3b 0a 5d 3b 0a 0a 5b 20 41 73 |sale.";.];..[ As| 00009210 6b 53 75 62 3b 0a 20 20 69 6e 70 31 3d 73 70 65 |kSub;. inp1=spe| 00009220 63 69 61 6c 5f 77 6f 72 64 3b 0a 20 20 69 66 20 |cial_word;. if | 00009230 28 52 75 6e 4c 69 66 65 28 6e 6f 75 6e 2c 23 23 |(RunLife(noun,##| 00009240 41 73 6b 29 7e 3d 30 29 20 72 66 61 6c 73 65 3b |Ask)~=0) rfalse;| 00009250 0a 20 20 22 4e 6f 20 72 65 70 6c 79 2e 22 3b 0a |. "No reply.";.| 00009260 5d 3b 20 20 0a 0a 5b 20 53 69 6e 67 53 75 62 3b |]; ..[ SingSub;| 00009270 0a 20 20 69 66 20 28 72 61 6e 64 6f 6d 28 32 29 |. if (random(2)| 00009280 3d 3d 31 29 20 70 72 69 6e 74 20 22 59 6f 75 72 |==1) print "Your| 00009290 20 79 6f 64 65 6c 6c 69 6e 67 20 22 3b 0a 20 20 | yodelling ";. | 000092a0 65 6c 73 65 20 70 72 69 6e 74 20 22 59 6f 75 72 |else print "Your| 000092b0 20 73 69 6e 67 69 6e 67 20 22 3b 0a 20 20 22 69 | singing ";. "i| 000092c0 73 20 61 74 72 6f 63 69 6f 75 73 2c 20 69 66 20 |s atrocious, if | 000092d0 79 6f 75 20 73 61 79 20 73 6f 20 79 6f 75 72 73 |you say so yours| 000092e0 65 6c 66 2e 22 3b 0a 5d 3b 0a 0a 5b 20 43 6c 69 |elf.";.];..[ Cli| 000092f0 6d 62 53 75 62 3b 0a 20 20 22 49 20 64 6f 6e 27 |mbSub;. "I don'| 00009300 74 20 74 68 69 6e 6b 20 6d 75 63 68 20 69 73 20 |t think much is | 00009310 74 6f 20 62 65 20 61 63 68 69 65 76 65 64 20 62 |to be achieved b| 00009320 79 20 74 68 61 74 2e 22 3b 0a 5d 3b 20 20 0a 0a |y that.";.]; ..| 00009330 5b 20 57 61 69 74 53 75 62 3b 0a 20 20 69 66 20 |[ WaitSub;. if | 00009340 28 4c 41 66 74 65 72 52 6f 75 74 69 6e 65 73 28 |(LAfterRoutines(| 00009350 29 3d 3d 31 29 20 72 74 72 75 65 3b 0a 20 20 22 |)==1) rtrue;. "| 00009360 54 69 6d 65 20 70 61 73 73 65 73 2e 22 3b 0a 5d |Time passes.";.]| 00009370 3b 20 20 0a 0a 5b 20 53 6c 65 65 70 53 75 62 3b |; ..[ SleepSub;| 00009380 0a 20 20 22 59 6f 75 20 6d 75 73 74 20 68 61 76 |. "You must hav| 00009390 65 20 73 6c 65 70 74 20 79 6f 75 72 73 65 6c 66 |e slept yourself| 000093a0 20 6f 75 74 2e 20 20 5c 0a 20 20 20 20 20 20 20 | out. \. | 000093b0 20 20 20 20 20 20 59 6f 75 20 63 65 72 74 61 69 | You certai| 000093c0 6e 6c 79 20 61 72 65 6e 27 74 20 64 72 6f 77 73 |nly aren't drows| 000093d0 79 20 6e 6f 77 2e 22 3b 0a 5d 3b 0a 0a 5b 20 43 |y now.";.];..[ C| 000093e0 6f 6e 73 75 6c 74 53 75 62 3b 0a 20 20 70 72 69 |onsultSub;. pri| 000093f0 6e 74 20 22 54 68 65 72 65 27 73 20 6e 6f 74 68 |nt "There's noth| 00009400 69 6e 67 20 74 6f 20 62 65 20 64 69 73 63 6f 76 |ing to be discov| 00009410 65 72 65 64 22 3b 0a 20 20 69 66 20 28 6e 6f 75 |ered";. if (nou| 00009420 6e 3d 3d 30 29 20 22 2e 22 3b 0a 20 20 70 72 69 |n==0) ".";. pri| 00009430 6e 74 20 22 20 62 79 20 63 6f 6e 73 75 6c 74 69 |nt " by consulti| 00009440 6e 67 20 22 3b 20 44 65 66 41 72 74 28 6e 6f 75 |ng "; DefArt(nou| 00009450 6e 29 3b 20 22 2e 22 3b 0a 5d 3b 0a 0a 21 20 2d |n); ".";.];..! -| 00009460 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 000094a0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 21 20 20 20 |-----------.! | 000094b0 44 65 62 75 67 67 69 6e 67 20 76 65 72 62 73 0a |Debugging verbs.| 000094c0 21 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |! --------------| 000094d0 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00009500 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a 0a |--------------..| 00009510 23 69 66 64 65 66 20 44 45 42 55 47 3b 0a 5b 20 |#ifdef DEBUG;.[ | 00009520 54 72 61 63 65 4f 6e 53 75 62 3b 20 70 61 72 73 |TraceOnSub; pars| 00009530 65 72 5f 74 72 61 63 65 3d 31 3b 20 22 54 72 61 |er_trace=1; "Tra| 00009540 63 65 20 6f 6e 2e 22 3b 20 5d 3b 0a 5b 20 54 72 |ce on."; ];.[ Tr| 00009550 61 63 65 4c 65 76 65 6c 53 75 62 3b 0a 20 20 70 |aceLevelSub;. p| 00009560 61 72 73 65 72 5f 74 72 61 63 65 3d 6e 6f 75 6e |arser_trace=noun| 00009570 3b 0a 20 20 70 72 69 6e 74 20 22 50 61 72 73 65 |;. print "Parse| 00009580 72 20 74 72 61 63 69 6e 67 20 73 65 74 20 74 6f |r tracing set to| 00009590 20 6c 65 76 65 6c 20 22 2c 20 70 61 72 73 65 72 | level ", parser| 000095a0 5f 74 72 61 63 65 2c 20 22 2e 5e 22 3b 0a 5d 3b |_trace, ".^";.];| 000095b0 0a 5b 20 54 72 61 63 65 4f 66 66 53 75 62 3b 20 |.[ TraceOffSub; | 000095c0 70 61 72 73 65 72 5f 74 72 61 63 65 3d 30 3b 20 |parser_trace=0; | 000095d0 22 54 72 61 63 65 20 6f 66 66 2e 22 3b 20 5d 3b |"Trace off."; ];| 000095e0 0a 5b 20 52 6f 75 74 69 6e 65 73 4f 6e 53 75 62 |.[ RoutinesOnSub| 000095f0 3b 20 20 64 65 62 75 67 5f 66 6c 61 67 3d 64 65 |; debug_flag=de| 00009600 62 75 67 5f 66 6c 61 67 20 7c 20 31 3b 20 22 52 |bug_flag | 1; "R| 00009610 6f 75 74 69 6e 65 20 6c 69 73 74 69 6e 67 20 6f |outine listing o| 00009620 6e 2e 22 3b 20 5d 3b 0a 5b 20 52 6f 75 74 69 6e |n."; ];.[ Routin| 00009630 65 73 4f 66 66 53 75 62 3b 20 64 65 62 75 67 5f |esOffSub; debug_| 00009640 66 6c 61 67 3d 64 65 62 75 67 5f 66 6c 61 67 20 |flag=debug_flag | 00009650 26 20 36 3b 20 22 52 6f 75 74 69 6e 65 20 6c 69 |& 6; "Routine li| 00009660 73 74 69 6e 67 20 6f 66 66 2e 22 3b 20 5d 3b 0a |sting off."; ];.| 00009670 5b 20 41 63 74 69 6f 6e 73 4f 6e 53 75 62 3b 20 |[ ActionsOnSub; | 00009680 20 64 65 62 75 67 5f 66 6c 61 67 3d 64 65 62 75 | debug_flag=debu| 00009690 67 5f 66 6c 61 67 20 7c 20 32 3b 20 22 41 63 74 |g_flag | 2; "Act| 000096a0 69 6f 6e 20 6c 69 73 74 69 6e 67 20 6f 6e 2e 22 |ion listing on."| 000096b0 3b 20 5d 3b 0a 5b 20 41 63 74 69 6f 6e 73 4f 66 |; ];.[ ActionsOf| 000096c0 66 53 75 62 3b 20 64 65 62 75 67 5f 66 6c 61 67 |fSub; debug_flag| 000096d0 3d 64 65 62 75 67 5f 66 6c 61 67 20 26 20 35 3b |=debug_flag & 5;| 000096e0 20 22 41 63 74 69 6f 6e 20 6c 69 73 74 69 6e 67 | "Action listing| 000096f0 20 6f 66 66 2e 22 3b 20 5d 3b 0a 5b 20 54 69 6d | off."; ];.[ Tim| 00009700 65 72 73 4f 6e 53 75 62 3b 20 20 64 65 62 75 67 |ersOnSub; debug| 00009710 5f 66 6c 61 67 3d 64 65 62 75 67 5f 66 6c 61 67 |_flag=debug_flag| 00009720 20 7c 20 34 3b 20 22 54 69 6d 65 72 73 20 6c 69 | | 4; "Timers li| 00009730 73 74 69 6e 67 20 6f 6e 2e 22 3b 20 5d 3b 0a 5b |sting on."; ];.[| 00009740 20 54 69 6d 65 72 73 4f 66 66 53 75 62 3b 20 64 | TimersOffSub; d| 00009750 65 62 75 67 5f 66 6c 61 67 3d 64 65 62 75 67 5f |ebug_flag=debug_| 00009760 66 6c 61 67 20 26 20 33 3b 20 22 54 69 6d 65 72 |flag & 3; "Timer| 00009770 73 20 6c 69 73 74 69 6e 67 20 6f 66 66 2e 22 3b |s listing off.";| 00009780 20 5d 3b 0a 5b 20 58 50 75 72 6c 6f 69 6e 53 75 | ];.[ XPurloinSu| 00009790 62 3b 20 6d 6f 76 65 20 6e 6f 75 6e 20 74 6f 20 |b; move noun to | 000097a0 70 6c 61 79 65 72 3b 20 67 69 76 65 20 6e 6f 75 |player; give nou| 000097b0 6e 20 6d 6f 76 65 64 3b 20 22 50 75 72 6c 6f 69 |n moved; "Purloi| 000097c0 6e 65 64 2e 22 3b 20 5d 3b 0a 5b 20 58 41 62 73 |ned."; ];.[ XAbs| 000097d0 74 72 61 63 74 53 75 62 3b 20 6d 6f 76 65 20 6e |tractSub; move n| 000097e0 6f 75 6e 20 74 6f 20 73 65 63 6f 6e 64 3b 20 22 |oun to second; "| 000097f0 41 62 73 74 72 61 63 74 65 64 2e 22 3b 20 5d 3b |Abstracted."; ];| 00009800 0a 5b 20 58 4f 62 6a 20 6f 62 6a 3b 0a 20 20 43 |.[ XObj obj;. C| 00009810 44 65 66 41 72 74 28 6f 62 6a 29 3b 20 70 72 69 |DefArt(obj); pri| 00009820 6e 74 20 22 20 28 22 2c 20 6f 62 6a 2c 20 22 29 |nt " (", obj, ")| 00009830 20 22 3b 0a 20 20 69 66 20 28 63 68 69 6c 64 28 | ";. if (child(| 00009840 6f 62 6a 29 3d 3d 30 29 20 7b 20 6e 65 77 5f 6c |obj)==0) { new_l| 00009850 69 6e 65 3b 20 72 74 72 75 65 3b 20 7d 0a 20 20 |ine; rtrue; }. | 00009860 70 72 69 6e 74 20 22 20 63 6f 6e 74 61 69 6e 73 |print " contains| 00009870 3a 5e 22 3b 0a 20 20 57 72 69 74 65 4c 69 73 74 |:^";. WriteList| 00009880 46 72 6f 6d 28 63 68 69 6c 64 28 6f 62 6a 29 2c |From(child(obj),| 00009890 0a 20 20 20 20 20 20 46 55 4c 4c 49 4e 56 5f 42 |. FULLINV_B| 000098a0 49 54 20 2b 20 49 4e 44 45 4e 54 5f 42 49 54 20 |IT + INDENT_BIT | 000098b0 2b 20 4e 45 57 4c 49 4e 45 5f 42 49 54 20 2b 20 |+ NEWLINE_BIT + | 000098c0 41 4c 57 41 59 53 5f 42 49 54 2c 20 31 29 3b 0a |ALWAYS_BIT, 1);.| 000098d0 5d 3b 0a 5b 20 58 54 72 65 65 53 75 62 20 69 3b |];.[ XTreeSub i;| 000098e0 0a 20 20 69 66 20 28 6e 6f 75 6e 3d 3d 30 29 0a |. if (noun==0).| 000098f0 20 20 7b 20 20 20 66 6f 72 20 28 69 3d 73 65 6c | { for (i=sel| 00009900 66 6f 62 6a 2b 31 3a 69 3c 3d 74 6f 70 5f 6f 62 |fobj+1:i<=top_ob| 00009910 6a 65 63 74 3a 69 2b 2b 29 0a 20 20 20 20 20 20 |ject:i++). | 00009920 7b 20 20 20 69 66 20 28 70 61 72 65 6e 74 28 69 |{ if (parent(i| 00009930 29 3d 3d 30 29 20 58 4f 62 6a 28 69 29 3b 0a 20 |)==0) XObj(i);. | 00009940 20 20 20 20 20 7d 0a 20 20 20 20 20 20 72 66 61 | }. rfa| 00009950 6c 73 65 3b 0a 20 20 7d 0a 20 20 58 4f 62 6a 28 |lse;. }. XObj(| 00009960 6e 6f 75 6e 29 3b 0a 5d 3b 0a 5b 20 47 6f 74 6f |noun);.];.[ Goto| 00009970 53 75 62 3b 0a 20 20 69 66 20 28 6e 6f 75 6e 3e |Sub;. if (noun>| 00009980 74 6f 70 5f 6f 62 6a 65 63 74 20 7c 7c 20 6e 6f |top_object || no| 00009990 75 6e 3c 3d 73 65 6c 66 6f 62 6a 20 7c 7c 20 70 |un<=selfobj || p| 000099a0 61 72 65 6e 74 28 6e 6f 75 6e 29 7e 3d 30 29 0a |arent(noun)~=0).| 000099b0 20 20 20 20 20 20 22 4e 6f 74 20 61 20 73 61 66 | "Not a saf| 000099c0 65 20 70 6c 61 63 65 20 74 6f 20 67 6f 2e 22 3b |e place to go.";| 000099d0 0a 20 20 50 6c 61 79 65 72 54 6f 28 6e 6f 75 6e |. PlayerTo(noun| 000099e0 29 3b 0a 5d 3b 0a 23 65 6e 64 69 66 3b 0a 0a 21 |);.];.#endif;..!| 000099f0 20 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d | ---------------| 00009a00 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d |----------------| * 00009a30 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 2d 0a |-------------.| 00009a3e