Release Version

This commit is contained in:
historicalsource 2019-04-16 09:35:32 -04:00
commit 7edfae6d56
25 changed files with 31012 additions and 0 deletions

1
README.md Normal file
View File

@ -0,0 +1 @@
# shogun

80
a5.zil Normal file
View File

@ -0,0 +1,80 @@
"A5 for
SHOGUN
(c) Copyright 1988 Infocom, Inc. All Rights Reserved."
<PRINC "
*** SHOGUN: A Story of Japan ***
">
<VERSION YZIP>
<ZIP-OPTIONS BIG COLOR UNDO MOUSE DISPLAY>
<SETG NEW-PARSER? T> ;"use new parser"
<FREQUENT-WORDS?> ;"include frequent words"
<SET REDEFINE T> ;"don't stop and ask"
<ORDER-OBJECTS? ROOMS-FIRST>
<NEVER-ZAP-TO-SOURCE-DIRECTORY?>
;"segments"
<DEFINE-SEGMENT STARTUP T>
<DEFINE-SEGMENT RECORD <>>
<DEFINE-SEGMENT ERASMUS <> ANJIRO>
<DEFINE-SEGMENT ANJIRO <> ERASMUS YABU>
<DEFINE-SEGMENT YABU <> ANJIRO PIT>
<DEFINE-SEGMENT PIT <> YABU RODRIGUES>
<DEFINE-SEGMENT RODRIGUES <> PIT VOYAGE>
<DEFINE-SEGMENT VOYAGE <> RODRIGUES AUDIENCE>
<DEFINE-SEGMENT AUDIENCE <> VOYAGE PRISON>
<DEFINE-SEGMENT PRISON <> AUDIENCE MARIKO>
<DEFINE-SEGMENT MARIKO <> PRISON ESCAPE>
<DEFINE-SEGMENT ESCAPE <> MARIKO MAZE>
<DEFINE-SEGMENT MAZE <> ESCAPE QUAKE>
<DEFINE-SEGMENT QUAKE <> MAZE ZATAKI>
<DEFINE-SEGMENT ZATAKI <> QUAKE YOKOSE>
<DEFINE-SEGMENT YOKOSE <> ZATAKI OCHIBA>
<DEFINE-SEGMENT OCHIBA <> YOKOSE DEPARTURE>
<DEFINE-SEGMENT DEPARTURE <> OCHIBA SEPPUKU>
<DEFINE-SEGMENT SEPPUKU <> DEPARTURE NINJA>
<DEFINE-SEGMENT NINJA <> SEPPUKU YOKOHAMA>
<DEFINE-SEGMENT YOKOHAMA <> NINJA AFTERMATH>
<DEFINE-SEGMENT AFTERMATH <> YOKOHAMA SEKIGAHARA>
<DEFINE-SEGMENT SEKIGAHARA <> AFTERMATH>
<DEFINE-SEGMENT HINTS <>>
<INSERT-FILE "DEFS"> ;"redefinitions"
<XFLOAD "~INTERLOGIC/ZILLIB/PARSER/PARSER.SHOGUN"> ;"new parser"
;"game substrate"
<INSERT-FILE "PICDEF"> ;"picture constants"
<INSERT-FILE "MISC">
<INSERT-FILE "~INTERLOGIC/ZILLIB/SOFT"> ;"function key stuff"
<INSERT-FILE "~INTERLOGIC/ZILLIB/MENU"> ;"menu stuff"
<INSERT-FILE "STATUS"> ;"status line"
<INSERT-FILE "PIC"> ;"picture stuff"
<INSERT-FILE "DESC"> ;"describers"
<INSERT-FILE "SYNTAX">
<INSERT-FILE "RECORD">
<INSERT-FILE "VERBS">
<INSERT-FILE "~INTERLOGIC/ZILLIB/PARSER/PRARE">
<INSERT-FILE "QVERBS">
<INSERT-FILE "GLOBALS">
;"game files"
<INSERT-FILE "CAST"> ;"characters"
<INSERT-FILE "ERASMUS"> ;"arrival in japan"
<INSERT-FILE "ANJIRO"> ;"arrival at village"
<INSERT-FILE "VOYAGE"> ;"voyage to osaka/saving rodrigues"
<INSERT-FILE "AUDIENCE"> ;"audience with toranaga"
<INSERT-FILE "OSAKA"> ;"escape from osaka"
<INSERT-FILE "MAZE"> ;"maze of alleys in osaka"
<INSERT-FILE "QUAKE"> ;"earthquake"
<INSERT-FILE "MARIKO"> ;"framing story"
<INSERT-FILE "ATTACK"> ;"ninja attack on castle"
<XFLOAD "~INTERLOGIC/ZILLIB/CLUES.XFLOAD">
<INSERT-FILE "HINTS">
<PROPDEF SIZE 5>
<PROPDEF CAPACITY 0>

3530
anjiro.zil Normal file

File diff suppressed because it is too large Load Diff

3070
attack.zil Normal file

File diff suppressed because it is too large Load Diff

2121
audience.zil Normal file

File diff suppressed because it is too large Load Diff

29
cartoon.zil Normal file
View File

@ -0,0 +1,29 @@
<VERSION YZIP>
<SINGLE-FILE? T>
<ROUTINE ANIMATE (CELS)
<REPEAT ()
<SETG CARTOON .CELS>
<SETG CARTOON-N 0>
<INPUT 1 1 ,NEXT-CEL>>>
<GLOBAL CARTOON <>>
<GLOBAL CARTOON-N 0>
<ROUTINE NEXT-CEL ("AUX" (N <GET ,CARTOON 1>))
<COND (<IGRTR? CARTOON-N <GET ,CARTOON 0>>
<SET N 1>)>
<SCREEN 1>
<DISPLAY <GET ,CARTOON .N> 1 1>
<SCREEN 0>
<RFALSE>>
<ROUTINE GO
<CLEAR -1>
<SPLIT </ <WINGET 0 ,WHIGH> 4>>
<ANIMATE ,CEL-TABLE>
<QUIT>>
<CONSTANT CEL-TABLE
<LTABLE 1 2 3 4 5 6 7 8>>

769
cast.zil Normal file
View File

@ -0,0 +1,769 @@
"CAST for
SHOGUN
(c) Copyright 1988 Infocom, Inc. All Rights Reserved."
<FILE-FLAGS SENTENCE-ENDS?>
<BEGIN-SEGMENT 0>
<CONSTANT J-HEAD 1>
<CONSTANT J-KILL-MARIKO 2>
<CONSTANT J-SEPPUKU 3>
<CONSTANT J-CALL-YABU 4>
<CONSTANT J-SHOOT-YABU 5>
<CONSTANT J-ATTACK-ISHIDO 6>
<CONSTANT J-LAUGH-AT-TORANAGA 7>
<CONSTANT J-SWITCH 8>
<CONSTANT J-WRONG-ANSWER 9>
<ROUTINE NEW-SDESC (OBJ STR "OPT" (IMPROPER? <>))
<COND (.IMPROPER?
<FSET .OBJ ,THE>
<FCLEAR .OBJ ,NOTHEBIT>
<FCLEAR .OBJ ,NOABIT>)
(ELSE
<FCLEAR .OBJ ,THE>
<FSET .OBJ ,NOTHEBIT>
<FSET .OBJ ,NOABIT>)>
<PUTP .OBJ ,P?SDESC .STR>>
<ROUTINE WAKARIMASEN ()
<COND (<OR <P? KONNICHI-WA ROOMS>
<P? KONBANWA>>
<TELL
I"\"Domo, genki desu,\"" " " THE ,WINNER " answers politely." CR>)
(<P? NIHON-GO-GA HANASE-MASEN>
<TELL
CTHE ,WINNER " seems to understand, but is at a loss what to say next." CR>)
(<JAPANESE-VERB?>
<TELL
CTHE ,WINNER " seems impressed that you know some Japanese, but apparently
isn't sure what you are getting at." CR>)
(ELSE
<TELL
"\""I"Wakarimasen, Anjin-san.""\" " CTHE ,WINNER " doesn't appear to
understand you." CR>)>>
<VOC "ANJIN" NOUN>
<VOC "ANJIN-SAN" NOUN>
<OBJECT BLACKTHORNE
(LOC BRIDGE-OF-ERASMUS)
(OWNER LG-ERASMUS)
(DESC "Blackthorne")
(SYNONYM JOHN BLACKTHORNE
PILOT PILOT-MAJOR
PILOT ;ANJIN PILOT-MAJOR ;ANJIN-SAN)
(ADJECTIVE JOHN)
(FLAGS PERSON ENGLISHBIT NOABIT NOTHEBIT OPENBIT CONTBIT SEARCHBIT)
(HEALTH 3) ;"0=ERASMUS, 1=ANJIRO, 2=ANJIRO, 3 otherwise"
(GENERIC GENERIC-PILOT-F)
(ACTION BLACKTHORNE-F)>
<ROUTINE GENERIC-PILOT-F (R F)
<COND (<SCENE? ,S-RODRIGUES> ,RODRIGUES)
(ELSE ,BLACKTHORNE)>>
<ROUTINE BLACKTHORNE-F ("OPT" (RARG <>))
<COND (<RARG? <>>
<COND (<P? (BE BE?) (ME BLACKTHORNE)>
<COND (<PRSI? BLACKTHORNE>
<TELL
"That's correct." CR>)
(<PRSI? ENGLISH>
<TELL
"That's right, although your mother was Dutch." CR>)>)
(<VERB? BE? BE WHERE HOW>
<RFALSE>)
(<PRSO? BLACKTHORNE>
<PERFORM ,PRSA ,ME ,PRSI>
<RTRUE>)>)
(<RARG? WINNER>
<COND (<AND <B-NOT-STANDING?>
<OR <MOTION-VERB?>
<AND <HOSTILE-VERB?>
,OPPONENT
<EQUAL? ,OPPONENT ,PRSO ,PRSI>>
<AND <VERB? OPEN CLOSE>
<FSET? ,PRSO ,DOORBIT>>>
<NOT <PAST-TENSE?>>>
<COND (<HERE? ,MURA-HOUSE> <RFALSE>)
(<FSET? <LOC ,WINNER> ,VEHBIT>
<RFALSE>)
(<AND <SCENE? ,S-NINJA>
<FSET? ,MARIKO ,RMUNGBIT>>
<COND (<NOT <IN? ,YABU ,SECRET-REDOUBT>>
<TELL
"You are too shaken to stand." CR>)
(ELSE
<B-STAND>
<FCLEAR ,BLACKTHORNE ,RMUNGBIT>
<TELL
"You lurch up, Yabu helping you, and painfully approach Mariko." CR>)>)
(<SCENE? ,S-TORANAGA> <RFALSE>)
(<AND <SCENE? ,S-QUAKE>
<OR ,QUAKE?
<QUEUED? I-CRAWL>>>
<RFALSE>)
(ELSE
<B-STAND>
<TELL "You stand up">
<COND (<OR <P? STAND> <P? WALK ,P?UP>>
<TELL "." CR>)
(ELSE
<TELL " first." CR>)>)>)
(<AND <FSET? ,WINNER ,RMUNGBIT>
<SCENE? ,S-NINJA>>
<COND (<GAME-VERB?> <RFALSE>)
(<AND <NOT <ABSTRACT-VERB?>>
<OR <PRSO? MARIKO>
<PRSI? MARIKO>>>
<YOULL-HAVE-TO "get closer to her">)
(<NOT <PASSIVE-VERB?>>
<TELL
"The explosion has left you too dazed to do anything." CR>)>)>)>>
<ROUTINE I-DONT-KNOW? ()
<AND <VERB? KNOW>
<EQUAL? ,PRSS ,ME>
<EQUAL? ,PRSQ ,V?DO?>
<NOT <BTST <PARSE-FLAGS ,PARSE-RESULT> ,PARSE-QUESTION>>
<BTST <PARSE-FLAGS ,PARSE-RESULT> ,PARSE-NOT>>>
<OBJECT BOOTS
(OWNER BLACKTHORNE)
(DESC "your boots")
(FDESC "Sitting at the bottom of the steps are your boots.")
(SYNONYM BOOTS PAIR)
(FLAGS TAKEBIT WEARABLE PLURAL NOTHEBIT NOABIT)
(ACTION BOOTS-F)>
<ROUTINE BOOTS-F ()
<COND (<VERB? EXAMINE>
<COND (<SCENE? ,S-ERASMUS>
<TELL
"They are salt-encrusted and worn." CR>)
(ELSE
<TELL
"They have been cleaned and shined." CR>)>)
(<VERB? LOOK-INSIDE SMELL>
<TELL
"They are the same boots you've been wearing for two years now. Let's
just say they aren't in perfect condition any more." CR>)
(<AND <VERB? TAKE-OFF>
<FSET? ,BOOTS ,WEARBIT>>
<COND (<SCENE? S-ERASMUS>
<TELL
"You'd be crazy to remove your boots in this weather!" CR>)>)
(<VERB? WEAR>
<COND (<AND <NOT <HELD? ,PRSO>>
<NOT <EQUAL? <ITAKE> T>>>
<RTRUE>)
(<NOT <FSET? ,BOOTS ,WEARBIT>>
<FSET ,BOOTS ,WEARBIT>
<TELL
"You put on your boots." CR>)>)>>
<OBJECT CLOTHES
(OWNER BLACKTHORNE)
(DESC "your clothes")
(SYNONYM CLOTHES)
(ADJECTIVE ;MY PILE)
(FLAGS TAKEBIT WEARABLE PLURAL NOTHEBIT NOABIT)
(ACTION CLOTHES-F)>
<ROUTINE CLOTHES-F ()
<COND (<VERB? EXAMINE>
<COND (<SCENE? ,S-ERASMUS>
<TELL
"They are filthy, torn, and wet." CR>)
(<NOT <FSET? ,CLOTHES ,TOUCHBIT>>
<TELL
"They are in a neat pile, washed and pressed and mended with tiny,
exquisite stitching. But your knife is gone, and so are your
keys. Your boots are nowhere to be found. Worst of all, there is no sign
of your precious rutters!" CR>)>)
(<VERB? TAKE>
<COND (<AND <SCENE? ,S-ANJIRO>
<L? <GETP ,WINNER ,P?HEALTH> 3>>
<QUEUE I-COLLAPSE 4>
<TELL
"You are still too weak to stand and go over to the clothes." CR>)>)
(<VERB? WEAR>
<COND (<AND <NOT <HELD? ,PRSO>>
<L? <GETP ,WINNER ,P?HEALTH> 3>>
<PERFORM ,V?TAKE ,CLOTHES>
<RTRUE>)
(<AND <NOT <FSET? ,CLOTHES ,WEARBIT>>
<OR <IN? ,CLOTHES ,WINNER>
<ITAKE>>>
<FSET ,CLOTHES ,WEARBIT>
<TELL "You ">
<COND (<IN? ,WINNER ,QUILT>
<MOVE ,WINNER ,HERE>)>
<COND (<B-NOT-STANDING?>
<B-STAND>
<TELL "stand shakily and ">)>
<TELL "put on your clothes">
<COND (<NOT <HELD? ,BOOTS>>
<TELL ", feeling strange without your boots">)>
<TELL "." CR>)>)
(<VERB? TAKE-OFF>
<COND (<SCENE? S-ERASMUS>
<TELL
"You would freeze, or at least take a terrible chill." CR>)
(<FSET? ,BOOTS ,WEARBIT>
<YOULL-HAVE-TO "take off your boots">)
(<AND <VERB? TAKE-OFF> <FORMAL-SCENE?>>
<TELL
"You would expose yourself to ridicule." CR>)
(ELSE
<FCLEAR ,CLOTHES ,WEARBIT>
<TELL
"You remove your clothes." CR>)>)
(<VERB? TEAR>
<COND (<SCENE? ,S-ERASMUS>
<TELL
"You are in desperate straits, but rending your garments seems like an odd
reaction." CR>)
(ELSE
<TELL
"Your clothes are thick, strong European fabrics and don't tear at all
easily." CR>)>)>>
<OBJECT SEBASTIO
(SDESC "priest")
;(DESC "Father Sebastio")
(SYNONYM PRIEST SEBASTIO MAN FATHER JESUIT EUROPEAN)
(ADJECTIVE FATHER TONSURED)
(FLAGS PERSON PORTUGUESEBIT OPENBIT CONTBIT SEARCHBIT NOABIT
THE)
(ACTION SEBASTIO-F)>
<ROUTINE SEBASTIO-F ("OPT" (RARG <>) "AUX" OW)
<COND (<RARG? SUBJ>
<RFALSE>)
(<RARG? WINNER>
<COND (<P? HELP ME>
<TELL
"\"Ah, help!\" he says with icy contempt. \"Help a heretic pirate!\"" CR>)
(<VERB? HELLO>
<TELL
CTHE ,SEBASTIO " ignores your greeting." CR>)
(<P? FIND ;WHERE (ME THIS)>
<COND (,YABU-QUESTION
<SPEAK-ONLY-TO-YABU>)
(ELSE
<TELL
"\"The Japans, pirate.\" the priest says angrily." CR>)>)
(<P? BE THIS JAPAN>
<COND (,YABU-QUESTION
<SPEAK-ONLY-TO-YABU>)
(ELSE
<TELL
"\"Yes, Japan. Nippon,\" the priest says impatiently." CR>)>)
(<VERB? WHO>
<COND (<PRSO? YOU>
<COND (,YABU-QUESTION <SPEAK-ONLY-TO-YABU>)
(ELSE
<NEW-SDESC ,SEBASTIO "Father Sebastio">
<TELL
"\"Father Sebastio. I'm from Portugal. I'm a Jesuit.\"" CR>)>)
(<AND <PRSO? ,YABU ,GLOBAL-DAIMYO>
<NOUN-USED? ,PRSO ,W?DAIMYO>>
<TELL
"\"The "I"daimyo"" is Kasigi Yabu."G" He owns this whole province.\"" CR>)
(<PRSO? ,OMI>
<COND (,YABU-QUESTION <SPEAK-ONLY-TO-YABU>)
(ELSE
<TELL "\"">
<COND (<NOT <FSET? ,OMI ,NOTHEBIT>>
<TELL
"Who told you about Kasigi Omi-san? ">)>
<TELL
"Kasigi Omi-san is the samurai in charge of this village. He is
the Lord Yabu's nephew.\"" CR>)>)
(<PRSO? ,MURA>
<COND (,YABU-QUESTION <SPEAK-ONLY-TO-YABU>)
(ELSE
<TELL
"\"He is the headman of this village. He, at least, is a good
Christian.\"" CR>)>)
(ELSE
<TELL
G"\"I'm not here to answer your questions, pirate!\"" CR>)>)
(<VERB? WHAT>
<COND (<PRSO? YOU>
<PERFORM ,V?WHO ,YOU>
<RTRUE>)
(<PRSO? ,GLOBAL-DAIMYO ,YABU>
<COND (<NOUN-USED? ,PRSO ,W?DAIMYO>
<TELL
"\"The "I"daimyo"" is a feudal lord."G" He owns this whole province.\"" CR>)
(ELSE
<TELL
"\"Who told you about " D ,YABU "?\"" CR>)>)
(<PRSO? ,GLOBAL-SAMURAI>
<TELL
"\"Warriors -- soldiers -- members of the warrior caste.\"" CR>)
(ELSE
<TELL
G"\"I'm not here to answer your questions, pirate!\"" CR>)>)
(,OMI-QUESTION
<SET OW ,WINNER>
<SETG WINNER ,OMI>
<PERFORM ,PRSA ,PRSO ,PRSI>
<SETG WINNER .OW>
<RTRUE>)
(,YABU-QUESTION
<COND (<VERB? TRANSLATE>
<TELL
"You harden your voice. \""I"Que va!"" First translate what I
said. Now!\" The priest reddens, and you see that the exchange has not gone
unnoticed by the "I"daimyo""." CR>)
(ELSE
<SET OW ,WINNER>
<SETG WINNER ,YABU>
<PERFORM ,PRSA ,PRSO ,PRSI>
<SETG WINNER .OW>
<RTRUE>)>)
(<VERB? TRANSLATE>
<TELL
"\"It's not your place to command me, heretic!\"" CR>)
(<P? BE ME>
<COND (<AND <PRSI? ,HERETIC ,PIRATE>
<P-NEGATIVE?>>
<TELL
"\"Liar!\" storms the priest." CR>)
(<PRSI? ,BLACKTHORNE>
<TELL
"He doesn't seem to have heard of you before." CR>)
(ELSE
<TELL
"\"I'll know who and what you are soon enough!\"" CR>)>)
(ELSE
<TELL
CTHE ,SEBASTIO " looks at you with contempt." CR>)>)
(<VERB? EXAMINE>
<TELL
CTHE ,SEBASTIO " is a short, thick man with dark hair and a long
beard. His robe is travel-stained and his boots are besmirched with
mud. He is
obviously a Portuguese or Spanish priest, and though his flowing robe is
orange, there is no mistaking the ">
<COND (<IN? ,SEBASTIO-CRUCIFIX ,PRSO>
<TELL "crucifix and ">)>
<TELL "rosary at his
belt, or the cold hostility on his face." CR>)
(<AND <P? TELL-ABOUT SEBASTIO STRAIT-OF-MAGELLAN>
<EQUAL? ,YABU-QUESTION 4>>
<PERFORM ,PRSA ,YABU ,PRSI>
<RTRUE>)
(<VERB? ANSWER REPLY>
<TELL
"\"That's no response, pirate!\" rages " THE ,SEBASTIO "." CR>)
(<VERB? BOW>
<TELL
"\"You learn fast, pirate!\" he says, surprised, but he doesn't return
your bow." CR>)
(<P? THROW SEBASTIO-CRUCIFIX SEBASTIO>
<RFALSE>)
(<HOSTILE-VERB?>
<TELL "You ">
<COND (<B-NOT-STANDING?>
<B-STAND>
<TELL "storm to your feet, ">)>
<COND (<VERB? THROW>
<MOVE ,PRSO ,HERE>
<TELL "throw " THE ,PRSO " at">)
(<VERB? SPIT>
<TELL "spit at">)
(<VERB? KICK>
<TELL "kick">)
(<VERB? PISS>
<TELL "piss on">)
(ELSE
<TELL "strike">)>
<TELL " " THE ,SEBASTIO ", and he curses at you
but turns the other cheek." CR>
<COND (<AND <IN? ,OMI ,HERE> <IN? ,YABU ,HERE>>
<QUEUE I-BOW? 2>
<TELL CR
"Omi and Yabu look at each other in surprise." CR>)>
<RTRUE>)>>
<OBJECT OMI
;(SDESC "Omi")
(SDESC "young man")
(SYNONYM MAN OMI OMI-SAN SAMURAI)
(ADJECTIVE YOUNG KASIGI)
(PICTURE P-OMI)
(FLAGS PERSON JAPANESEBIT SCOREBIT THE ;NOTHEBIT)
(GENERIC GENERIC-SAMURAI-F)
(ACTION OMI-F)>
<ROUTINE OMI-F ("OPT" (RARG <>))
<COND (<RARG? SUBJ>
<RFALSE>)
(<RARG? WINNER>
<COND (<OR <VERB? PISS CURSE FUCK>
<AND <VERB? NO IYE>
<QUEUED? I-TAKE-CROOCQ>>>
<SETG WINNER ,PLAYER>
<PERFORM ,V?CURSE ,OMI>
<RTRUE>)
(<OR <QUESTION-VERB?>
<VERB? ASK-ABOUT TELL-ME-ABOUT>>
<TELL
CTHE ,SEBASTIO " snaps, \"You're to answer questions, not ask
them.\" He says something to the samurai, who scowls." CR>)
(<AND ,OMI-QUESTION
<I-DONT-KNOW?>>
<TELL
"\"Liar!\" screams " THE ,SEBASTIO ". \"They use torture here. They can
find out anything!\"" CR>)
(<AND <EQUAL? ,OMI-QUESTION 1>
<P? BE (ME BLACKTHORNE)> ,PRSI>
<COND (<AND <OR <ENGLISH?> <DUTCH?>>
<NOT <P-NEGATIVE?>>>
<SETG QCONTEXT <>>
<SETG OMI-QUESTION 0>
<TELL CTHE ,SEBASTIO>
<COND (<ENGLISH?>
<TELL
" steps back as though struck. \"English! England">)
(ELSE
<TELL
" nods suspiciously. \"Dutch! Holland">)>
<TELL
"!\" He begins to explain to Omi but the samurai cuts him short." CR>)
(ELSE
<SETUP-ANSWER "i am">
<SEBASTIO-SCREAMS>
<COND (<PRSI? ,BLACKTHORNE>
<TELL
"I want to know your nationality, not your name, heretic!\"" CR>)
(ELSE
<TELL
"I know you aren't what you say you are!\"" CR>)>)>)
(<AND <EQUAL? ,OMI-QUESTION 2>
<OR <P? BE (BLACKTHORNE ME) INTPP>
<P? COME-FROM>>>
<COND (<OR <P? COME-FROM HOLLAND>
<PP? ,W?FROM ,HOLLAND>>
<SETG QCONTEXT <>>
<SETG OMI-QUESTION 0>
<TELL
CTHE ,SEBASTIO "'s anger is obvious. \"A Dutch pirate ship!\" he
gasps. He says something haltingly to Omi-san." CR>)
(ELSE
<SEBASTIO-SCREAMS>
<TELL "That's a
Dutch pirate ship! Admit you're a heretic, murdering Dutchman!\"" CR>)>)
(<AND <EQUAL? ,OMI-QUESTION 3>
<VERB? YES NO IYE BE HAI>>
<COND (<OR <VERB? YES HAI>
<AND <P? BE (BLACKTHORNE ME) LEADER>
<NOT <P-NEGATIVE?>>>>
<SETG QCONTEXT <>>
<SETG OMI-QUESTION 0>
<SETG ORPHAN-ANSWER <>>
<TELL CTHE ,SEBASTIO>
<COND (<VERB? HAI>
<TELL
" looks surprised at your knowledge of Japanese, and
speaks rapidly and excitedly to Omi." CR>)
(ELSE
<TELL
" translates for Omi, still digesting what you have
told him." CR>)>
<SCORE-OBJECT ,OMI>)
(ELSE
<SETUP-ANSWER "i am">
<TELL
CTHE ,SEBASTIO " screams, \"Coward, I know you're the leader! The
villagers have already told me so!\"" CR>)>)
(,OMI-QUESTION
<COND (<VERB? SAY REPLY>
<PERFORM ,V?BE ,ME ,PRSO>
<RTRUE>)
(ELSE
<TELL
CTHE ,OMI " doesn't respond, but the priest says, \"You'd better learn to be
polite -- and find some manners quickly. Here they don't tolerate lack
of manners.\" His voice edges. \"Hurry up and answer!\"" CR>)>)
(<AND <VERB? STOP>
<NOT ,ANSWER-HAI?>
<HERE? ,VILLAGE-SQUARE>
<QUEUED? I-TAKE-CROOCQ>>
<SETG QCONTEXT ,OMI>
<TELL
"\"Omi-san says, you agree to behave? You will obey all orders?\"" CR>)
(<AND <VERB? HAI YES>
<NOT ,ANSWER-HAI?>
<HERE? ,VILLAGE-SQUARE>
<QUEUED? I-TAKE-CROOCQ>>
<COND (<VERB? YES>
<TELL
"\"You must speak to him in Japanese, heretic! You must say 'hai.'\" "
D ,SEBASTIO " is sweating and nervous." CR>)
(ELSE
<SETG ANSWER-HAI? T>
<SETG DELAY-CNT 0>
<THIS-IS-IT ,ORDERS>
<TELL
"\"Omi-san says, lie down. Immediately.\"" CR>
<SCORE-OBJECT ,VILLAGE-SQUARE>)>)
(ELSE
<TELL
CTHE ,OMI " ignores you, for now." CR>)>)
(<VERB? EXAMINE>
<TELL
"The young man is a head shorter and much younger than you, his
handsome face slightly pockmarked though. He wears breeches and clogs
and a light kimono with two scabbarded swords stuck into the belt. One
is daggerlike, the other, a two-handed killing sword, is long and
slightly curved." CR>)
(<VERB? WHO>
<TELL
CTHE ,OMI " is an ambitious young man. He serves his masters well, but
himself better." CR>)
(<VERB? THANK>
<COND (<IN? ,SEBASTIO ,HERE>
<TELL
CTHE ,SEBASTIO " translates. Omi seems pleased by your politeness." CR>)
(ELSE
<TELL
"Omi responds with a curt bow, and says \"Domo.\"" CR>)>)
(<OR <VERB? PISS CURSE FUCK>
<AND <OR <VERB? NO IYE> <HOSTILE-VERB?>>
<QUEUED? I-TAKE-CROOCQ>>>
<COND (<SCENE? S-PIT>
<COND (<NOT ,PISS-FLAG>
<SETG PISS-FLAG T>
<TELL
"You lose your composure. \"Tell him to go to hell. Tell him I piss on
him and his whole country. Tell him exactly what I said! Exactly, by
God!\" you yell at the priest. Omi listens, then the knuckles on his
sword hand whiten. You can see he is trying not to give way to his
emotions." CR>)
(ELSE
<TELL
"You continue to scream abuse at Omi." CR>)>)>)
(<OR <HOSTILE-VERB?> <VERB? STOP>>
<REMOVES-YOUR-HEAD ,OMI>)>>
<ROUTINE SEBASTIO-SCREAMS ()
<TELL
CTHE ,SEBASTIO " screams, \"Lying pig of a heretic! ">>
<ROUTINE REMOVES-YOUR-HEAD (WHO)
<COND (<JIGS-UP? ,J-HEAD>
<TELL
CTHE .WHO " responds to your feeble attack by removing your head." CR>
<JIGS-UP>)
(ELSE <RTRUE>)>>
<OBJECT MURA
(LOC GENERIC-OBJECTS)
(DESC "Mura")
(SYNONYM MURA HEADMAN MAN)
(FLAGS PERSON JAPANESEBIT NOABIT NOTHEBIT OPENBIT CONTBIT SEARCHBIT)
(GENERIC GENERIC-MAN-F)
(ACTION MURA-F)>
<ROUTINE GENERIC-MAN-F (R F)
<TELL "You'll have to be more specific." CR>
,ROOMS ;"means 'handled'">
<ROUTINE MURA-F ("OPT" (RARG <>))
<COND ;(<RARG? SUBJ>
<RFALSE>)
(<RARG? WINNER>
<COND (<AND <VERB? TAKE>
<IN? ,PRSO ,PLAYER>
<NOT <FSET? ,PRSO ,WEARBIT>>>
<SETG WINNER ,PLAYER>
<PERFORM ,V?GIVE ,PRSO ,MURA>)
(<AND <VERB? NO IYE>
<EQUAL? ,QCONTEXT ,MURA>
<SCENE? ,S-RODRIGUES>>
<TELL
"Mura replies in halting Portuguese, \"So sorry, Anjin-san, you must
go.\"" CR>)
(<P? (TELL-ME-ABOUT FIND) ONNA>
<NEW-SDESC ,ONNA "Haku">
<REPLACE-SYNONYM ,ONNA ,W?ONNA ,W?HAKU>
<TELL
"\"Where's Onna?\" you ask. \"I want Onna!\" Mura replies in heavily-accented
Portuguese, \""I"Onna"" mean 'woman.' Her name Haku.\"" CR>)
(ELSE
<WAKARIMASEN>)>)
(<RARG? <>>
<COND (<VERB? EXAMINE>
<TELL
"Mura is a short, wiry, middle-aged man. You realize there's more
to him than the simple fisherman he appears to be." CR>)
(<AND <P? GIVE * MURA>
<HERE? ,BATH-HOUSE>
<NOT <FSET? ,PRSO ,WEARBIT>>>
<MOVE ,PRSO ,MURA>
<TELL
"Mura takes " THE ,PRSO "." CR>)
(<VERB? ATTACK HIT>
<TELL
"Mura is unarmed, but the moment you get within reach, he chops your
elbow with the side of his hand and your arm hangs down, momentarily
paralyzed. \"Please excuse me, Captain-san,\" he says in very
bad Portuguese." CR>)
(<VERB? WHO>
<TELL
"Mura is the headman of the village of Anjiro." CR>)>)>>
<OBJECT MARIKO
;(DESC "Mariko")
(SDESC "Mariko")
(PICTURE P-MARIKO)
(SYNONYM MARIKO TODA WOMAN)
(ADJECTIVE LADY TODA)
(FLAGS PERSON JAPANESEBIT FEMALE NOABIT NOTHEBIT
OPENBIT CONTBIT SEARCHBIT SCOREBIT)
(DESCFCN MARIKO-DESC)
(ACTION MARIKO-F)>
<ROUTINE MARIKO-DESC (RARG OBJ)
<COND (<RARG? OBJDESC?>
<COND (<AND <SCENE? ,S-SEPPUKU>
<HERE? ,TEA-HOUSE ,FORECOURT>>
<RTRUE>)
(<AND <SCENE? ,S-NINJA>
<OR <FSET? ,MARIKO ,DEAD>
<FSET? ,MARIKO ,RMUNGBIT>>>
<RTRUE>)>)
(<RARG? OBJDESC>
<TELL "Mariko ">
<COND (<HERE? ,TEA-HOUSE>
<TELL
"kneels here, facing the doorway.">)
(<HERE? ,FORECOURT>
<COND (<FSET? ,MARIKO ,SITTING>
<TELL
"kneels serenely in the center of the crimson coverlet.">)
(ELSE
<TELL
"is standing in the center of the main gate.">)>)
(<SCENE? ,S-NINJA>
<TELL "lies ">
<COND (<FSET? ,MARIKO ,DEAD>
<TELL "dead">)
(ELSE
<TELL "dying">)>
<TELL " on the floor.">)>)>>
<ROUTINE MARIKO-F ("OPT" (RARG <>))
<COND (<RARG? SUBJ>
<RFALSE>)
(<RARG? WINNER>
<COND (<OR <FSET? ,MARIKO ,DEAD>
<FSET? ,MARIKO ,RMUNGBIT>>
<TELL
"Mariko can no longer respond." CR>)
(<P? (WHO TELL-ME-ABOUT) (YOU MARIKO)>
<TELL
"\"I am Lady Toda Mariko-noh-Buntaro. The priests know me as Lady Maria,
as I am Christian.\"" CR>)
(<P? (WHAT TELL-ME-ABOUT) PROPHECY>
<COND (<HERE? ,MAPLE-GLADE>
<TELL
"Mariko asks permission of Toranaga, who nods. ">)>
<TELL
"\"Six years ago a Chinese embassy came to the Taiko to try to settle the
Japanese-Chinese-Korean war. A famous astrologer was among them. He forecast
many things which have since come true. The Taiko asked him to predict the
deaths of certain of his counselors. The astrologer said that Toranaga would
die by the sword when he was middle-aged. Ishido, the famous conqueror of
Korea, would die undiseased, an old man, his feet firm in the earth, the
most famous man of his day. The Taiko himself would die in his bed, respected,
revered, of old age, leaving a healthy son to follow him. At this time Yaemon
had not yet been born, so that part of the prophecy has already come to
pass.\"" CR>
<SCORE-OBJECT ,PROPHECY>)
(<SCENE? ,S-MARIKO>
<COND (<OR <P? KONNICHI-WA ROOMS>
<P? NIHON-GO-GA HANASE-MASEN>>
<COND (<FSET? ,MAPLE-GLADE ,SCOREBIT>
<SETG WINNER ,PLAYER>
<PERFORM ,V?KONNICHI-WA ,MARIKO>
<RTRUE>)>)
(<AND <EQUAL? ,QCONTEXT ,MARIKO>
<VERB? LEARN TRAIN TEACH>
<PAST-TENSE?>>
<COND (<OR <AND <EQUAL? ,PRSS ,DOMINGO>
<PRSO? ME>>
<PRSO? PRISON DOMINGO>>
<HOW-I-LEARNED>)
(ELSE
<TELL
"She doesn't seem to believe you." CR>)>)
(<P? TEACH ME JAPANESE>
<TELL
"\"If my master wishes,\" she answers, turning to Toranaga. They converse
for a while. \"My Master says that only a few bar -- foreigners have been
able to learn our language, and these are all priests. But he would like to
be able to talk to you directly, without the need for an interpreter. He will
consider this request.\"" CR>)
(<P? (WHO TELL-ME-ABOUT) YAEMON>
<NEW-SDESC ,YAEMON "Yaemon">
<TELL
"\"This is the Heir, the only son of the Taiko. His name is Yaemon.\"" CR>)
(<P? (WHO TELL-ME-ABOUT) (YOU MARIKO)>
<TELL
"\"My name is Toda Mariko noh-Buntaro. I am a 'senhora,' not a 'senhorita,'
if you please.\"" CR>)
(<OR <QUESTION-VERB?>
<VERB? ASK-ABOUT TELL-ME-ABOUT>>
<TELL
"\"Lord Toranaga has instructed me to say that ">
<COND (<EQUAL? ,LG-CREWMEN ,PRSO ,PRSI>
<TELL
"your crewmen are being treated well. They will given a place to live, and
to learn to be civilized.\"" CR>)
(ELSE
<TELL
"you will please confine yourself
to answering questions only, for the moment.\" Then she says, \"I'm sure, if
you are patient, Pilot-Captain B'ackthon, that you'll be given an opportunity
to ask anything you wish later.\"" CR>)>)
(<JAPANESE-VERB?>
<TELL
"\"If you will excuse me, senhor, my Master orders me to say your accent is a
little wrong.\" She repeats the word several times slowly, showing you how to
say it." CR>)
(ELSE
<I-DONT-UNDERSTAND>)>)
(<VERB? THOU>
<I-LOVE-YOU>)
(<VERB? TELL-ME-ABOUT>
<COND (<PRSO? ,SUICIDE>
<TELL
"\"If the shame is too great, or if our liege Lord commands, we
take our lives. I have been trained to do so, as have all samurai.\"" CR>
<RTRUE>)
(<PRSO? ,KIYAMA>
<TELL
"\"Lord Kiyama is a member of the Council of Regents, and the most powerful
of the Christian daimyos.\"" CR>)
(<SCENE? ,S-NINJA>
<COND (<PRSO? ,YABU>
<TELL
"\"He is very angry with me for confronting Lord Ishido, and even
angrier that I did not go through with my seppuku, but that was my
"I"karma"", Anjin-san.\"" CR>
<RTRUE>)
(<PRSO? ,ACHIKO>
<TELL
"\"Her grandfather-in-law, Lord Kiyama, opposes Lord Toranaga. He has
disowned her for her presumption in joining us.\"" CR>
<RTRUE>)>)>
<TELL
"\"I cannot tell you

339
defs.zil Normal file
View File

@ -0,0 +1,339 @@
"DEFS for
SHOGUN
(c) Copyright 1988 Infocom, Inc. All Rights Reserved."
;"see if we can save some space"
<CHRSET 0 "abcdefghiklmnoprstuwyT .,\"">
<CHRSET 1 "jqvxzABCEGHIJLMNOPRSWY?!'-">
<CHRSET 2 "DFKQUVXZ123[]:;=*()#}>/ ">
<INCLUDE "SYMBOLS">
<COMPILATION-FLAG P-DEBUGGING-PARSER T>
<TELL-TOKENS (CRLF CR) <CRLF>
(NUM N) * <PRINTN .X>
(CHAR CHR C) * <PRINTC .X>
G *:STRING <PRINT .X>
D ,PRSO <DPRINT-PRSO>
D ,PRSI <DPRINT-PRSI>
D * <DPRINT .X>
CD ,PRSO <CDPRINT-PRSO>
CD ,PRSI <CDPRINT-PRSI>
CD * <CDPRINT .X>
THE ,PRSO <THE-PRINT-PRSO>
THE ,PRSI <THE-PRINT-PRSI>
THE * <THE-PRINT .X>
CTHE ,PRSO <CTHE-PRINT-PRSO>
CTHE ,PRSI <CTHE-PRINT-PRSI>
CTHE * <CTHE-PRINT .X>
(A AN) ,PRSO <PRINTA-PRSO>
(A AN) ,PRSI <PRINTA-PRSI>
(A AN) * <PRINTA .X>
(CA CAN) ,PRSO <CPRINTA-PRSO>
(CA CAN) ,PRSI <CPRINTA-PRSI>
(CA CAN) * <CPRINTA .X>
I *:STRING <PRINTUNDER .X>
HIM/HER * <PRINT-HIM/HER .X>
CHE/SHE * <CPRINT-HE/SHE .X>
HE/SHE * <PRINT-HE/SHE .X>
HIS/HER * <PRINT-HIS/HER .X>
IS/ARE * <PRINT-IS/ARE .X>
S * <PRINT-PLURAL .X>>
<REPLACE-DEFINITION BUZZER-WORD?
<ROUTINE BUZZER-WORD? (WD PTR) <>>>
<REPLACE-DEFINITION DIR-VERB-PRSI?
<ROUTINE DIR-VERB-PRSI? (NP) <>>>
<DELAY-DEFINITION GAME-VERB?> ;"to replace parser's versions"
<BLOCK (<ROOT>)>
TELL-CTHE
TELL-THE
THINGS
<ENDBLOCK>
<REPLACE-DEFINITION TELL-THE
<DEFMAC TELL-THE ("ARGS" X) <FORM THE-PRINT !.X>>>
<REPLACE-DEFINITION TELL-CTHE
<DEFMAC TELL-CTHE ("ARGS" X) <FORM CTHE-PRINT !.X>>>
<REPLACE-DEFINITION OWNERS
<CONSTANT OWNERS
<TABLE (PURE LENGTH)
BLACKTHORNE
CHOPSTICKS
CITY
CREWMEN
CROWD
GALLEY
GOD
GRUEL
GYOKO
ISHIDO
KIRITSUBO
LG-ERASMUS
LIZARD
MAPLE-GLADE
MARIKO
MATES
MURA
OMI
PARCHMENT
REEF
SEARCH-PARTY
SEBASTIO
SIGN-OF-CROSS
SPILLBERGEN
STRAIT-OF-MAGELLAN
TORANAGA
VINCK
YABU
YOSHINAKA>>>
<DELAY-DEFINITION READ-INPUT>
<REPLACE-DEFINITION PERSONBIT <CONSTANT PERSONBIT PERSON>>
<REPLACE-DEFINITION NARTICLEBIT <CONSTANT NARTICLEBIT NOTHEBIT>>
<REPLACE-DEFINITION REFRESH
<ROUTINE V-$REFRESH ()
<SETG SHERE <>>
<COND (<NOT <EQUAL? ,P-CAN-UNDO 2>>
<REPAINT-DISPLAY>)
(<EQUAL? ,P-CAN-UNDO 2>
<COLOR ,FG-COLOR ,BG-COLOR>
<RESET-MARGIN>
<CLEAR 0>
<UPDATE-STATUS-LINE>
<COND (<EQUAL? ,HERE ,MAZE>
<DISPLAY-MAZE>)>
<COND (<QUEUED? I-SETUP-ANSWER>
<I-SETUP-ANSWER>
;"interrupts won't run")>
<TELL "[UNDO done.]" CR>)>>>
<REPLACE-DEFINITION ROOMSBIT
<CONSTANT ROOMSBIT RLANDBIT>>
<REPLACE-DEFINITION SETUP-ORPHAN-NP
<CONSTANT SETUP-ORPHAN-NP 0>>
<DELAY-DEFINITION STATUS-LINE>
<DELAY-DEFINITION YES?>
<COMPILATION-FLAG P-PS-COMMA T>
<TERMINALS VERB NOUN ADJ
;ADV QUANT MISCWORD
DIR TOBE QWORD CANDO COMMA
PARTICLE PREP ;"keep these two in order! -- SWG"
ASKWORD
COMMA APOSTR OFWORD ARTICLE QUOTE>
<PROPDEF DIRECTIONS <> ;"direction defs for 'rooms-first'"
(DIR TO R:ROOM =
(UEXIT 1) ;444 #SEMI "UNCONDITIONAL EXIT"
(REXIT <ROOM .R>) #SEMI "TO ROOM")
(DIR S:STRING =
(NEXIT 2) ;99 #SEMI "IMPOSSIBLE EXIT"
(NEXITSTR <STRING .S>) #SEMI "FAILURE MESSAGE")
(DIR SORRY S:STRING =
(NEXIT 2) #SEMI "IMPOSSIBLE EXIT"
(NEXITSTR <STRING .S>) #SEMI "FAILURE MESSAGE")
(DIR PER F:FCN =
(FEXIT 3) ;53 #SEMI "CONDITIONAL EXIT"
(FEXITFCN <WORD .F>) #SEMI "PER FUNCTION"
<BYTE 0>)
(DIR TO R:ROOM IF F:GLOBAL "OPT" ELSE S:STRING =
(CEXIT 4) ;7 #SEMI "CONDITIONAL EXIT"
(REXIT <ROOM .R>) #SEMI "TO ROOM"
(CEXITFLAG <GLOBAL .F>) #SEMI "IF FLAG IS TRUE"
(CEXITSTR <STRING .S>) #SEMI "FAILURE MESSAGE")
(DIR TO R:ROOM IF O:OBJECT IS OPEN "OPT" ELSE S:STRING =
(DEXIT 5) ;15 #SEMI "CONDITIONAL EXIT"
(DEXITOBJ <OBJECT .O>) #SEMI "IF DOOR IS OPEN"
(DEXITSTR <STRING .S>) #SEMI "FAILURE MESSAGE"
(DEXITRM <ROOM .R>) #SEMI "TO ROOM")>
<DIRECTIONS NORTH NE EAST SE SOUTH SW WEST NW
UP DOWN IN OUT FORE AFT PORT STARBOARD>
<SETG L-SEARCH-PATH (["P" ""] !,L-SEARCH-PATH)>
<REPLACE-DEFINITION WINNER-SAYS-WHICH?
<ROUTINE WINNER-SAYS-WHICH? (NP)
<RFATAL>>>
<REPLACE-DEFINITION INVALID-OBJECT?
<ROUTINE INVALID-OBJECT? (OBJ)
<COND (<NOT <LOC .OBJ>> <RTRUE>)
(<AND <NOT <IN? .OBJ ,GLOBAL-OBJECTS>>
<NOT <IN? .OBJ ,GENERIC-OBJECTS>>
<NOT <IN-SCENE? .OBJ>>>
<RTRUE>)
(ELSE <RFALSE>)>>>
<REPLACE-DEFINITION VERB-ALL-TEST
<DEFINE VERB-ALL-TEST (O I "AUX" L) ;"O=PRSO I=PRSI"
<SET L <LOC .O>>
<COND (<EQUAL? ,PRSA ,V?DROP ,V?GIVE>
<COND (<AND <EQUAL? .L ,WINNER>
<NOT <FSET? .L ,WEARBIT>>>
<RTRUE>)
(T <RFALSE>)>)
(<EQUAL? ,PRSA ,V?PUT>
<COND (<EQUAL? .O .I>
<RFALSE>)
(<NOT <IN? .O .I>>
<RTRUE>)
(T <RFALSE>)>)
(<EQUAL? ,PRSA ,V?TAKE>
<COND (<FSET? .O ,DONT-ALL> <RFALSE>)
(<FSET? .O ,WEARBIT> <RFALSE>)
(<AND <NOT <FSET? .O ,TAKEBIT>>
<NOT <FSET? .O ,TRYTAKEBIT>>>
<RFALSE>)>
<COND (<NOT <ZERO? .I>>
<COND (<NOT <EQUAL? .L .I>>
<RFALSE>)>)
(<EQUAL? .L ;,WINNER ,HERE>
<RTRUE>)>
<COND (<OR <FSET? .L ,PERSONBIT>
<FSET? .L ,SURFACEBIT>>
<RTRUE>)
(<AND <FSET? .L ,CONTBIT>
<FSET? .L ,OPENBIT>>
<RTRUE>)
(T <RFALSE>)>)
(<AND <EQUAL? ,PRSA ,V?WEAR>
<NOT <FSET? .O ,WEARABLE>>>
<RFALSE>)
(<NOT <ZERO? .I>>
<COND (<NOT <EQUAL? .O .I>>
<RTRUE>)
(T <RFALSE>)>)
(T <RTRUE>)>>>
<REPLACE-DEFINITION SPECIAL-CONTRACTION?
<VOC "FO">
<VOC "C">
<VOC "FOC">
<VOC "SLE">
<ROUTINE SPECIAL-CONTRACTION? (PTR)
<COND (<AND <EQUAL? <ZGET .PTR 0> ,W?FO>
<EQUAL? <ZGET .PTR ,P-LEXELEN> ,W?APOSTROPHE>
<EQUAL? <ZGET .PTR <* 2 ,P-LEXELEN>> ,W?C>>
,W?FOC)
(<AND <EQUAL? <ZGET .PTR 0> ,W?FOC>
<EQUAL? <ZGET .PTR ,P-LEXELEN> ,W?APOSTROPHE>
<EQUAL? <ZGET .PTR <* 2 ,P-LEXELEN>> ,W?SLE>>
,W?FOCSLE)>>>
<REPLACE-DEFINITION SPEAKING-VERB?
<DEFINE SPEAKING-VERB? ("OPT" (A ,PRSA) ;(PER 0))
<COND (<EQUAL? .A ,V?ANSWER ,V?ASK-ABOUT ,V?ASK-FOR ,V?CURSE ,V?HELLO
,V?NO ,V?REPLY ,V?SAY ,V?SPEAK ,V?TELL ,V?TELL-ABOUT
,V?THANK ,V?THOU ,V?YELL ,V?YELL-AT ,V?YES>
<COND (T ;<EQUAL? .PER 0 ,PRSO>
<RTRUE>)>)>>>
<REPLACE-DEFINITION CAPITAL-NOUN?
<ROUTINE CAPITAL-NOUN? (WD)
<EQUAL? .WD
,W?ACHIKO
,W?AKABO
,W?ALVITO
,W?BACCUS
,W?BLACKTHORNE
,W?BROWN
,W?BROWNS
,W?BUNTARO
,W?CAPTAIN
,W?CAPTAIN-GENERAL
,W?CHIMMOKO
,W?CROOCQ
,W?DANZENJI
,W?DOMINGO
,W?ENGLAND
,W?ERASMUS
,W?ETSU
,W?GINSEL
,W?GONZALEZ
,W?GORODA
,W?GRAY
,W?GRAYS
,W?GYOKO
,W?HENDRIK
,W?HIRO-MATSU
,W?HOLLAND
,W?I
,W?ISHIDO
,W?JAN
,W?JOHANN
,W?JOHN
,W?KASIGI
,W?KAZUNARI
,W?KIKU
,W?KIRI
,W?KIRITSUBO
,W?KIYAMA
,W?KOJIMA
,W?KWAMPAKU
,W?MAETSUKKER
,W?MARIKO
,W?MARTIN
,W?MAXIMILIAN
,W?MURA
,W?NAKAMURA
,W?NEKK
,W?OCHIBA
,W?OMI
,W?ONNA
,W?PAULUS
,W?PIETERZOON
,W?POPE,W?RODRIGUES
,W?ROPER
,W?SAIGAWA
,W?SALAMON
,W?SAZUKO
,W?SEBASTIO
,W?SHOGUN
,W?SONK
,W?SPECZ
,W?SPILLBERGEN
,W?SUMIYORI
,W?TAIKO
,W?TODA
,W?TORANAGA
,W?VASCO
,W?VINCK
,W?YABU
,W?YAEMON
,W?YAMAZAKI
,W?YOSHI
,W?YOSHINAKA
,W?ZATAKI
>>>
<REPLACE-DEFINITION SOFT-KEY-DEFINITIONS
<SOFT-KEYS
,UP-ARROW "n"
,DOWN-ARROW "s"
,LEFT-ARROW "w"
,RIGHT-ARROW "e"
;"vt100 keypad keys"
,F1 "sw"
,F2 "s"
,F3 "se"
,F4 "w"
,F5 ""
,F6 "e"
,F7 "nw"
,F8 "n"
,F9 "ne"
,F10 ""
-1 0
-1 <TABLE "Save Definition File" SOFT-SAVE-DEFS>
-1 <TABLE "Restore Definition File" SOFT-RESTORE-DEFS>
-1 <TABLE "Reset Defaults" SOFT-RESET-DEFAULTS>
-1 <TABLE "Exit" SOFT-EXIT>>>

308
desc.zil Normal file
View File

@ -0,0 +1,308 @@
"DESC for
Your Game
(c) Copyright 1986 Infocom, Inc. All Rights Reserved."
<BEGIN-SEGMENT 0>
"The fabled new describers, as updated and modified to conform to the
latest bug fixes. See ZD:DESC.DOC for details. See Z:DESC.ZIL for
the source."
<GLOBAL DESCRIBED-ROOM? <>>
<ROUTINE DESCRIBE-ROOM ("OPTIONAL" (LOOK? <>) "AUX" V? STR AV)
<COND (<NOT ,LIT>
<TELL "It is pitch black." CR>
<RFALSE>)>
<COND (<IN? ,HERE ,ROOMS>
<HLIGHT ,H-BOLD>
<TELL 'HERE>
<HLIGHT ,H-NORMAL>)>
<SET AV <LOC ,WINNER>>
<COND (<FSET? .AV ,VEHBIT>
<COND (<FSET? .AV ,SURFACEBIT>
<TELL ", on ">)
(ELSE
<TELL ", in ">)>
<TELL THE .AV>)>
<CRLF>
<SET V? <OR .LOOK? <EQUAL? ,VERBOSITY 2>>>
<COND (<NOT <FSET? ,HERE ,TOUCHBIT>>
<FSET ,HERE ,TOUCHBIT>
<COND (,VERBOSITY <SET V? T>)>)>
<SETG DESCRIBED-ROOM? .V?>
<COND (.V?
<COND (<AND <NOT <EQUAL? ,HERE .AV>>
<FSET? .AV ,VEHBIT>
<APPLY <GETP .AV ,P?ACTION> ,M-LOOK>>
<RTRUE>)
(<APPLY <GETP ,HERE ,P?ACTION> ,M-LOOK>
<RTRUE>)
(<SET STR <GETP ,HERE ,P?LDESC>>
<TELL .STR CR>)>)>
T>
<ROUTINE DESCRIBE-OBJECTS ("AUX" O STR (AV <LOC ,WINNER>) TMP)
<SET O <FIRST? ,HERE>>
<COND (<NOT .O> <RFALSE>)>
<REPEAT () ;"FDESCS and MISC."
<COND (<NOT .O> <RETURN>)
(<AND <DESCRIBABLE? .O>
<NOT <FSET? .O ,TOUCHBIT>>
<SET STR <GETP .O ,P?FDESC>>>
<THIS-IS-IT .O>
<CRLF>
<TELL .STR>
<COND (<FSET? .O ,CONTBIT>
<DESCRIBE-CONTENTS .O
T
<+ ,D-ALL?
,D-PARA?>>)>
<CRLF>)>
<SET O <NEXT? .O>>>
<SET O <FIRST? ,HERE>>
<REPEAT () ;"DESCFCNS and LDESCS"
<COND (<NOT .O> <RETURN>)
(<OR <NOT <DESCRIBABLE? .O>>
<AND <GETP .O ,P?FDESC>
<NOT <FSET? .O ,TOUCHBIT>>>>
T)
(<AND <SET STR <GETP .O ,P?DESCFCN>>
<SET TMP <APPLY .STR ,M-OBJDESC? .O>>>
<COND (<NOT <EQUAL? .TMP ,M-FATAL>>
<THIS-IS-IT .O>
<CRLF>
<COND (<SET STR <APPLY .STR ,M-OBJDESC .O>>
<COND (<AND <FSET? .O ,CONTBIT>
<N==? .STR ,M-FATAL>>
<DESCRIBE-CONTENTS
.O
T
<+ ,D-ALL?
,D-PARA?>>)>)>
<CRLF>)>)
(<SET STR <GETP .O ,P?LDESC>>
<THIS-IS-IT .O>
<CRLF>
<TELL .STR>
<COND (<FSET? .O ,CONTBIT>
<DESCRIBE-CONTENTS .O
T
<+ ,D-ALL?
,D-PARA?>>)>
<CRLF>)>
<SET O <NEXT? .O>>>
<SETG D-BIT <- ,PERSON>>
<DESCRIBE-CONTENTS ,HERE <> <>>
<SETG D-BIT ,PERSON>
<DESCRIBE-CONTENTS ,HERE <> <>>
<SETG D-BIT <>>
<COND (<AND .AV <NOT <EQUAL? ,HERE .AV>>>
<DESCRIBE-CONTENTS .AV <> <>>)>>
<CONSTANT D-ALL? 1> ;"print everything?"
<CONSTANT D-PARA? 2> ;"started paragraph yet?"
"<DESCRIBE-CONTENTS object-whose-contents-to-describe
level: -1 means only top level (default)
<> means top-level (include crlf)
T for all other levels
or string to print
all?: t if not being called from room-desc >
Prints nothing and rfalses if there was nothing to list.
'The wall crumbles to dust, revealing ' <DESCRIBE-CONTENTS .OBJ> "
<ROUTINE DESCRIBE-CONTENTS (OBJ "OPTIONAL" (LEVEL -1) (ALL? ,D-ALL?)
"AUX" (F <>) N (1ST? T) (IT? <>) (TWO? <>)
(START? <>) (PARA? <>) DB)
<COND (<EQUAL? .LEVEL 2>
<SET LEVEL T>
<SET PARA? T>
<SET START? T>)
(<BTST .ALL? ,D-PARA?>
<SET PARA? T>)>
<SET N <FIRST? .OBJ>>
<COND (<OR .START?
<IN? .OBJ ,ROOMS>
<FSET? .OBJ ,PERSON>
<AND .N
<FSET? .OBJ ,CONTBIT>
<OR <FSET? .OBJ ,OPENBIT>
<FSET? .OBJ ,TRANSBIT>>
<OR <EQUAL? .LEVEL -1>
<FSET? .OBJ ,SEARCHBIT>>>>
<REPEAT ()
<COND (<OR <NOT .N>
<AND <DESCRIBABLE? .N>
<OR <BTST .ALL? ,D-ALL?>
<SIMPLE-DESC? .N>>>>
<COND (.F
<COND (.1ST?
<SET 1ST? <>>
<COND (<EQUAL? .LEVEL <> T>
<COND (<NOT .START?>
<COND (<NOT .PARA?>
<SET PARA? T>
<CRLF>)
(<EQUAL? .LEVEL T>
<TELL " ">)>
<DESCRIBE-START
.OBJ
<COND (<FSET? .F ,PLURAL>
T)
(ELSE .N)>>)>)
(<NOT <EQUAL? .LEVEL -1>>
<TELL .LEVEL>)>)
(.N
<TELL ", ">)
(ELSE
<TELL " and ">)>
<TELL A .F>
<DESCRIBE-SPECIAL .F>
<COND (<AND <NOT .IT?> <NOT .TWO?>>
<SET IT? .F>)
(T
<SET TWO? T>
<SET IT? <>>)>)>
<SET F .N>)>
<COND (.N <SET N <NEXT? .N>>)>
<COND (<AND <NOT .F> <NOT .N>>
<COND (<AND .IT? <NOT .TWO?>>
<THIS-IS-IT .IT?>)>
<COND (<AND .1ST? .START?>
<TELL " nothing">
<RFALSE>)
(<AND <NOT .1ST?>
<EQUAL? .LEVEL <> T>>
<COND (<EQUAL? .OBJ ,HERE>
<TELL " here">)>
<TELL ".">)>
<RETURN>)>>
<COND (<EQUAL? .LEVEL <> T>
<SET F <FIRST? .OBJ>>
<REPEAT ()
<COND (<NOT .F> <RETURN>)
(<AND <OR <FSET? .F ,CONTBIT>
<EQUAL? .F ,HERE>>
<DESCRIBABLE? .F T>
<OR <BTST .ALL? ,D-ALL?>
<SIMPLE-DESC? .F>>>
<SET DB ,D-BIT>
<SETG D-BIT <>>
<COND (<DESCRIBE-CONTENTS
.F
T
<COND (.PARA?
<+ ,D-ALL?
,D-PARA?>)
(ELSE ,D-ALL?)>>
<SET 1ST? <>>
<SET PARA? T>)>
<SETG D-BIT .DB>)>
<SET F <NEXT? .F>>>)>
<COND (<AND <NOT .1ST?>
<EQUAL? .LEVEL <> T>
<EQUAL? .OBJ ,HERE <LOC ,WINNER>>>
<CRLF>)>
<NOT .1ST?>)>>
"DESCRIBE-START -- add starters for special classes of objects here"
<ROUTINE DESCRIBE-START (OBJ N)
<COND (<EQUAL? .OBJ ,HERE>
<COND (<EQUAL? ,D-BIT ,PERSON>
<TELL "You see ">)
(ELSE
<TELL "There ">
<COND (.N <TELL "are ">)
(ELSE <TELL "is ">)>)>)
(<EQUAL? .OBJ ,PLAYER>
<COND (<EQUAL? ,D-BIT ,WEARBIT>
<TELL " You are wearing ">)
(T
<TELL "You are carrying ">)>)
(<FSET? .OBJ ,PERSON>
;<COND (<NOT <FSET? .OBJ ,NOTHEBIT>>
<TELL "The ">)> ;"hand is only one this clause catches"
<TELL CTHE .OBJ " has ">)
(<FSET? .OBJ ,SURFACEBIT>
<COND (<EQUAL? .OBJ ,LADDER> <TELL "Stand">)
(ELSE <TELL "Sitt">)>
<TELL "ing on " THE .OBJ>
<COND (.N <TELL " are ">)
(ELSE <TELL " is ">)>)
(ELSE
<TELL CTHE .OBJ " contains ">)>>
"DESCRIBE-SPECIAL -- add special trailers to object descriptions here"
<ROUTINE DESCRIBE-SPECIAL (OBJ)
<COND (<FSET? .OBJ ,ONBIT>
<TELL " (providing light)">)>>
"determines if an object is describable at all."
<GLOBAL D-BIT <>> ;"bit to screen objects"
<ROUTINE DESCRIBABLE? (OBJ "OPT" (CONT? <>))
<COND (<FSET? .OBJ ,INVISIBLE> <RFALSE>)
(<EQUAL? .OBJ ,WINNER> <RFALSE>)
(<AND <EQUAL? .OBJ <LOC ,WINNER>>
<NOT <EQUAL? ,HERE <LOC ,WINNER>>>>
<RFALSE>)
(<AND <NOT .CONT?> <FSET? .OBJ ,NDESCBIT>>
<RFALSE>)
(,D-BIT
<COND (<G? ,D-BIT 0>
<COND (<FSET? .OBJ ,D-BIT> <RTRUE>)
(ELSE <RFALSE>)>)
(<NOT <FSET? .OBJ <- ,D-BIT>>>
<RTRUE>)
(ELSE <RFALSE>)>)
(ELSE
<RTRUE>)>>
"Determines, for DESCRIBE-OBJECTS, if an object has a simple description
(not a FDESC, LDESC, or whatever)."
<ROUTINE SIMPLE-DESC? (OBJ "AUX" STR)
<COND (<AND <GETP .OBJ ,P?FDESC>
<NOT <FSET? .OBJ ,TOUCHBIT>>>
<RFALSE>)
(<AND <SET STR <GETP .OBJ ,P?DESCFCN>>
<APPLY .STR ,M-OBJDESC? .OBJ>>
<RFALSE>)
(<GETP .OBJ ,P?LDESC> <RFALSE>)
(ELSE <RTRUE>)>>
"DESCRIBE-REST finishes 'Opening the crocodile's mouth reveals '"
<ROUTINE DESCRIBE-REST (OBJ)
<COND (<NOT <DESCRIBE-CONTENTS .OBJ>>
<TELL "nothing">)>
<RTRUE>>
"DESCRIBE-SENT does the whole ball of wax"
<ROUTINE DESCRIBE-SENT (OBJ)
<COND (<NOT <DESCRIBE-CONTENTS .OBJ <> <+ ,D-ALL? ,D-PARA?>>>
<TELL "The " D .OBJ " is empty.">)>
<RTRUE>>
"DESCRIBE-NOTHING returns false if nothing was described"
;<ROUTINE DESCRIBE-NOTHING ()
<COND (<DESCRIBE-CONTENTS ,PRSO 2>
<COND (<NOT <IN? ,WINNER ,PRSO>>
<CRLF>)>
<RTRUE>)
(T ;"nothing"
<RFALSE>)>>
<END-SEGMENT>
;"END"

3097
erasmus.zil Normal file

File diff suppressed because it is too large Load Diff

1515
globals.zil Normal file

File diff suppressed because it is too large Load Diff

722
hints.zil Normal file
View File

@ -0,0 +1,722 @@
"HINTS for
SHOGUN
(c) Copyright 1988 Infocom, Inc. All Rights Reserved."
<FILE-FLAGS SENTENCE-ENDS?>
<BEGIN-SEGMENT HINTS>
;"longest hint topic can be 17 chars"
;"longest question can be 36 chars."
;"question can't have more than 32 answers"
<CONSTANT HINTS
<CONSTRUCT-HINTS HINT-COUNTS ;"Put topics in Quotes - followed by PLTABLEs
of Questions and Answers in quotes"
;"17 character wide"
;"this set of quotes is 36 chars. wide"
"Erasmus"
<PLTABLE "What must I do to survive?"
"You have to do everything you can to keep your ship from sinking before you
get to Japan."
"You should try to find something to eat as soon as possible."
"You should help the sick men as best you can."
"It would be a good idea to keep updating the record of your voyage in your
rutter."
"You must keep your demoralized crew in order and continue to assert your
authority."
"You must pilot the ship into a safe harbor in Japan.">
<PLTABLE "How do I steer the ship?"
"To change direction, turn the wheel to PORT (left) or STARBOARD (right)."
"Compass directions won't work, you're in the middle of a storm!"
"If you turn the wheel to PORT or STARBOARD, the ship will continue
turning in that direction and you will flounder."
"STRAIGHTEN THE WHEEL once the ship has turned, to maintain course and to
avoid capsizing.">
<PLTABLE "I'm tired!"
"You're tired and hungry."
"Better not lay down on your bunk, though. You'll fall asleep."
"Maybe you could find something to eat.">
<PLTABLE "I'm hungry!"
"An experienced seaman like yourself would probably keep a secret stash of
emergency food somewhere."
"Perhaps in your cabin?"
"Check your desk."
"That's right, they're gone. Someone must have taken them!"
"Didn't you just see Jan Roper come out of your cabin?"
"Roper took your apples! Why don't you go into the Mate's Cabin and get them?">
<PLTABLE "How can I get the crew on watch?"
"Go to the crew's quarters, Below Decks."
"LOOK AT THE CREWMEN to decide who's fit to take a watch."
"Send those men out on watch."
"Vinck, Ginsel and Maetsukker are strong enough to go out."
"Show some authority if any of them balk!">
<PLTABLE "What about my rutters?"
"They're valuable, so you keep them in your sea chest."
"You'll need a key to unlock it. Have you seen one around?"
"The key is in your desk, which also holds the quill pen you'll need to
write in it.">
<PLTABLE "How can I help Spillbergen?"
"He keeps asking for water, doesn't he?"
"Try looking for water."
"There's a flagon of water hidden in the cabin."
"Did you search his desk?"
"There's a secret compartment in the desk. The flagon is inside.">
<PLTABLE "What about my pet rat?"
"Oh, do you mean Gerald?"
"You don't have a pet rat named Gerald!"
"It's a joke! Now, stop reading the hints and play the game!">
<PLTABLE "How do I get through the reef?"
"Sail due west after straightening the wheel."
"When the reef is sighted, turn to Port to avoid hitting it."
"Soon after, you will see a gap to Starboard, so turn towards it."
"You'll be aimed very close to the gap, but you've lost some speed, so
turn to port to get a boost from the wind."
"Once you've done that, turn to Starboard to enter the gap.">
<PLTABLE "We've lost our foresails!"
"Is the crew on deck?"
"If not, get them! This is an emergency!"
"Try ringing the bell. That ought to wake them up."
"Now that they're on deck, order them to repair the foresails.">
<PLTABLE "I can't hold onto the wheel!"
"You're too weak to fight the waves and current."
"Maybe you could use some help."
"Is anyone nearby?"
"Vinck should be nearby. Ask him to help you.">
"Anjiro"
<PLTABLE "I'm hungry!"
"You won't live very long without getting something to eat."
"So eat the food that's on the tray!"
"After you do that, a woman will come in."
"Indicate to her that you're still hungry."
"POINT TO THE TRAY or POINT TO MY STOMACH will suffice."
"She'll bring you more food and your clothes!"
"Eat the second tray of food and you'll survive!">
<PLTABLE "I was clumsy and I'm sorry!"
"Tell the woman that. She'll appreciate it."
"Just do your best to apologize.">
<PLTABLE "How can I fight off these henchmen?"
"You can't beat them, but don't worry, you won't be killed."
"At least not if you fight back.">
<PLTABLE "How can I avoid being killed by Omi?"
"Be polite."
"Answer his questions!"
"Address your answers to the priest. He's translating."
"You should know the answers already."
"Question 1: I AM ENGLISH"
"Question 2: I AM FROM HOLLAND"
"Question 3: I'M THE LEADER"
"Once you've answered the questions and Omi kills the henchman,
get out of there!">
<PLTABLE "Where are my rutters?"
"Have you looked on your ship?"
"It's at anchor in the harbor!"
"There's a rowboat at the waterfront."
"Just row out and climb aboard."
"You're the pilot. Just go aft towards your quarters."
"Nope, the samurai guards won't let you in. Maybe some other time.">
"Yabu"
<PLTABLE "What do I say to Yabu?"
"Answer the questions he asks. Some are the same as Omi's."
"It's also very important to notice how Yabu and Father Sebastio
are getting along with each other."
"Question 1: I'M JOHN BLACKTHORNE."
"Question 2: I SAILED FROM HOLLAND."
"Question 3: I'M THE PILOT."
"Question 4: I SAILED THROUGH THE STRAIT OF MAGELLAN.">
<PLTABLE "Yabu orders me killed!"
"You need to show him there is a reason to keep you alive."
"You can't tell him anything, because you don't speak Japanese
and Sebastio would lie about anything really useful."
"Demonstrate that you are not the same sort of 'barbarian' as
Sebastio."
"Sebastio is a Catholic, you are a Protestant. In the year 1600,
this is significant."
"In the year 1600, crosses would be an abomination to a good English
Protestant."
"When Sebastio's crucifix dangles near you, grab it..."
"Then break it or throw it on the ground."
"Then remember that courtesy is very important in this culture."
"Better bow to Yabu to show you didn't mean him any insult by
that action.">
"Pit"
<PLTABLE "How can I get out of the pit?"
"You might try yelling."
"Oh, well, I guess that didn't work.">
<PLTABLE "Help, I've been picked!"
"Relax, there was only a fifty percent chance you'd be picked."
"Better to resist than be boiled, eh?"
"Now they've taken poor Pieterzoon?"
"There's nothing you can do -- someone is going to die. Pragmatism
argues it ought not be you.">
<PLTABLE "Help, Vinck's been picked!"
"Relax, there was only a fifty percent chance he'd be picked."
"On the other hand, you're the other fifty percent."
"Prevent him from going."
"Stop him or shake the ladder."
"Fight the attacking samurai who descend!"
"Now they've taken poor Pieterzoon?"
"There's nothing you can do -- someone is going to die.">
<PLTABLE "Now Omi wants me to come up!"
"You could fight, or refuse."
"... but the right thing to do is come up.">
<PLTABLE "Should I agree?"
"If you refuse, you will die."
"If you agree, the results will be unpleasant."
"... but you will survive."
"'Better to be a live dog than a dead lion.'">
"Rodrigues"
<PLTABLE "How can I get Rodrigues' help?"
"He asks you specific questions any English Pilot would know the
answers to."
"If you study the map that came in your game package, you will find
the answers."
"If you don't have a map, perhaps you really ARE a pirate!">
<PLTABLE "What can Rodrigues do for me?"
"He's obviously a respected person, maybe he has privileges you don't."
"Perhaps he can get you into your ship to search for your rutters."
"First, you should engage his interest. Talk to him about your ship."
"Then just follow his lead!">
<PLTABLE "What about the archers?"
"If you don't watch out, they'll think you're trying to escape, and shoot you!"
"You could explain yourself...if you could speak Japanese."
"Rodrigues could explain, but he can't watch the archers while he's rowing."
"That's why he asked you to!"
"Watch the archers, and when they act hostile, tell Rodrigues!">
<PLTABLE "We're back on the Erasmus."
"This may be your ship, but the samurai are in charge now."
"This is Rodrigues' show. Just follow his lead, and let him do the talking.">
<PLTABLE "How do I defeat the attacking guards?"
"Find your pistol."
"Then find your powder horn."
"...and blow them away!"
"Of course, they aren't attacking, there is no pistol, and no powder horn."
"Hint-browsing is considered barbaric in Japan.">
"Voyage to Osaka"
<PLTABLE "I'm tied down!"
"Just untie your safety line."
"It's dangerous but necessary.">
<PLTABLE "Now I'm getting washed overboard!"
"Grab something!"
"What's near at hand?"
"Grab the gunwale!">
<PLTABLE "The oarsmen are confused!"
"Help them, or tell them to ship their oars. Be useful!"
"Once they're settled down and awaiting orders, tell them to row!">
<PLTABLE "I can't make it to the bay!"
"Steer towards it."
"Rodrigues will tell you to stop, but ignore him."
"You'll die if you steer out to sea.">
<PLTABLE "Rodrigues went overboard!"
"He can't swim!"
"He needs something to cling to!"
"There's a life ring nearby."
"Throw it to him."
"Damn! Maybe there's something else..."
"Throw the oar to him."
"Maybe he has a chance, and maybe not. You've done all you can.">
<PLTABLE "How can I secure the galley?"
"Are you in the bay yet?"
"It's being washed around by the current."
"Dropping the anchor would help!">
<PLTABLE "Poor Rodrigues. What can I do?"
"You can at least try to recover his body."
"You might be in for a surprise!">
<PLTABLE "They won't let me ashore!"
"Lower the skiff, they'll permit that."
"Get in it."
"Keep trying! Insist! You'll get your way eventually.">
<PLTABLE "I can't find Rodrigues' body!"
"Be persistent. Keep searching."
"Keep heading south from the beach."
"You can go all the way around the headland, but then you can't
go any further."
"Keep searching on the way back."
"He's in the rocks below the Cliff Path.">
<PLTABLE "How can I get to him?"
"Try climbing down the cliff."
"You can't get to him..."
"But Yabu can!"
"So get Yabu to climb down.">
<PLTABLE "How can I save Yabu?"
"Are you sure you want to save that sadistic monster?"
"Yes, you should -- besides, he has Rodrigues."
"You need a rope."
"You need a long rope!">
<PLTABLE "Where can I find a rope?"
"There's rope back at the galley."
"But there's no time to get it."
"Kimonos might make a good rope."
"They need to be torn up and tied together."
"They're still too short!"
"Look at the remaining members of the search party."
"How about using their loincloths!">
<PLTABLE "Yabu won't pay attention!"
"Everyone seems to think the situation is hopeless."
"If only there were some way of getting Yabu and Rodrigues to higher ground!"
"A ledge, perhaps?"
"Try searching the cliff. There's a ledge just beyond Yabu's reach."
"Point it out to the samurai. They'll get his attention."
"Don't forget to keep the rope lowered!">
"Toranaga"
<PLTABLE "Why does Toranaga have me killed?"
"Courtesy, respect, politeness. You are lacking in these."
"You could emulate Hiro-matsu, and kneel as he did."
"Or you could show some courage. Bow and then sit as an equal would!"
"You can look at Toranaga, which is disrespectful: \"A cat can
look at a king.\" Beyond that, you are in grave danger.">
<PLTABLE "What should I do with Alvito?"
"Choose a language in which to speak to Alvito."
"Tell Toranaga that Alvito is your enemy."
"And remember that while he is your enemy, he is also not a fool.">
<PLTABLE "Why should I obey Alvito?"
"Because you were asked to."
"Because you are in the way if a fight starts!"
"Toranaga and Ishido hate each other, so you don't want to be
between them.">
<PLTABLE "How do I prevent Ishido from killing Toranaga?"
"You could try punching him out."
"Or kicking him."
"Or do nothing, since he isn't going to kill Toranaga."
"Not now, at any rate.">
"Prison"
<PLTABLE "That guy stole my food!"
"Take it back."
"I'm afraid you'll have to fight him."
"... but don't attack him first. If you do, he'll win.">
<PLTABLE "Why won't the old friar talk to me?"
"He's Spanish. All the Europeans you've met so far are Portuguese."
"He's a Dominican friar. All the priests you've met so far are
Portuguese Jesuits."
"The Portuguese Jesuits threw him in prison. He hates the Portuguese."
"So speak Spanish to him.">
<PLTABLE "What use is Domingo?"
"He's been here a long time and he speaks Japanese."
"Ask him about things."
"For example, ask him about Toranaga or Japan or the Jesuits."
"Ask him to teach you Japanese. He knows a lot."
"He can't do much in a few days, but it's a start!">
<PLTABLE "I'm being attacked!"
"You are unarmed, and cannot defend yourself."
"Duck, you fool!">
<PLTABLE "Yabu wants me to go with him."
"He's one of Toranaga's men."
"It's either him or Ishido."
"'Better the devil you know...'"
"GET IN LITTER.">
"Mariko"
<PLTABLE "What do I do in this scene?"
"Bow to Toranaga or greet Mariko."
"Ask Mariko about the prophecy."
"Try to amuse Yaemon. Smile or wink or act silly.">
"Escape (Part I)"
<PLTABLE "What's going on in this scene?"
"Kiritsubo is preparing to leave Osaka."
"There is also a rather rancorous argument going on."
"But maybe something else as well..."
"Watch closely what happens as the cortege is preparing to move out.">
<PLTABLE "What about Ishido?"
"Ignore him, he's just being a pest."
"Hiro-matsu, Buntaro and Yabu will take care of him."
"You might try wandering around as much as they'll let you."
"The garden is particularly pretty this time of year...">
<PLTABLE "What happened to Sazuko?"
"She seemed to fall and possibly endanger herself and her baby."
"But then she seemed to be all right again."
"But was that all that was going on?">
<PLTABLE "What's in the garden?"
"A little cha-no-yu (tea house)."
"There's someone inside."
"A veiled figure: a woman?"
"No, it's Toranaga!">
<PLTABLE "What did Kiri do?"
"She yelled something, probably a warning about Sazuko."
"And then she ran into the garden, and out again..."
"...and when she came out she was Toranaga!">
<PLTABLE "Here's Ishido again!"
"He only wants to give Kiri a parchment."
"But if he does, he'll discover that Kiri is really Toranaga in disguise!"
"Ishido will kill you all!"
"If you want to live, you'd better stop him!">
<PLTABLE "How can I stop Ishido?"
"Well, he wants to give Kiri the parchment."
"If he didn't have it he couldn't give it to her."
"Of course, he won't like it if you just take it."
"The time must be right."
"And you'd better come up with some way of mollifying him afterward."
"You could apologize."
"You could bow, since your Japanese is still rather weak."
"Or you could try to convince him you've gone crazy.">
<PLTABLE "How crazy am I?"
"You could babble."
"Of course, your speech sounds like babbling to the Japanese already."
"You could sing; that would worry them."
"You could dance around."
"You could just act crazy.">
<PLTABLE "How do I get out of here?"
"Just walk south across the bridge."
"Of course, you better let Ishido know you're under control."
"He has strong views about madness."
"Do exactly what Mariko tells you to!">
<PLTABLE "I can't move!"
"You're pretty tired."
"Maybe you should follow Mariko's advice."
"Get in Mariko's litter.">
"Escape (Part II)"
<PLTABLE "Now I'm really lost!"
"You have to find your way out of the maze of city streets."
"You start at the castle, and are headed for the docks."
"Use your mouse, arrow keys, or function keys to move the glyph representing
the party."
"Or you can just type directions, but that's more tedious."
"The dock is at the right edge of the display of mazelike city streets.">
<PLTABLE "We're under attack!"
"You can't fight, you have no weapons."
"You can't see the archers anyways."
"Better get out of the way."
"There's a litter to hide behind.">
<PLTABLE "Mariko's dead!"
"You should try to save her."
"When the attack starts, try to get her behind the litter, too.">
<PLTABLE "We're at the dock, now what?"
"Agree to Toranaga's plan."
"Follow Mariko when she runs for the galley."
"You ought to board the galley."
"You have any better ideas?">
<PLTABLE "Mariko seems to be in trouble!"
"You should help her."
"She seems to have fainted."
"Maybe she needs water..."
"... or 'mizu' as they say here.">
<PLTABLE "Now I'm under attack."
"You have two knives."
"Fight back!"
"Of course, their swords are a lot longer than your knives..."
"...so you can't fight at close quarters."
"Throw your knives at them!"
"Don't forget Mariko- she'll need your help!"
"Just get out of the way of those flashing swords."
"...and keep those knives flying.">
"Earthquake"
<PLTABLE "Can I save myself?"
"Just get out of the way of the fissure as it approaches."
"MOVE or ROLL, for example.">
<PLTABLE "Can I save Toranaga?"
"He's close by."
"Try grabbing him.">
<PLTABLE "Can I save Mariko?"
"She's close by."
"Try grabbing her."
"You didn't really think that would work twice, did you?"
"You'll have to climb down into the fissure."
"...and then lift her out to Toranaga."
"...and then climb out yourself."
"...and you should hurry!">
<PLTABLE "What should I do then?"
"Well, you could emulate Toranaga."
"He has sort of a coarse sense of humor, doesn't he?"
"He's also lost something he values highly."
"You have something almost as good."
"Give Toranaga your swords!">
"Journey to Yedo"
<PLTABLE "What an embarassing situation!"
"When in Rome..."
"There is little taboo against nakedness here."
"...and everyone around is a friend."
"...so go with the situation."
"Undress, and then get in the tub."
"Have some fun, ask Mariko to help bathe you.">
<PLTABLE "How do I avoid the thief?"
"Hide under the bed until he comes in."
"What bed? What thief?"
"Read your dictionary, not the fake hint questions!">
<PLTABLE "What can I do in the nighttime?"
"You could sleep."
"But it isn't very helpful."
"You could read your dictionary."
"You can try to visit Mariko."
"Watch out, though. If Yoshi catches you with her, he'll kill you.">
<PLTABLE "How can I avoid getting caught?"
"You need to avoid being seen going into Mariko's room."
"Watch for and listen to Yoshinaka as he makes his rounds."
"Then time your excursion to avoid him."
"And do the same on the way back.">
<PLTABLE "What can I do with Mariko?"
"Doesn't your imagination suggest something?"
"You are in love, after all."
"And no one is here to bother you."
"Well, this is a family hint question."
"You figure it out."
"But don't take too long! Remember, Yoshi is still out there.">
"Ochiba"
<PLTABLE "How do I avoid embarassment?"
"What were you worrying about mere seconds ago?"
"Check your swords!">
<PLTABLE "How do I avoid offending?"
"Ochiba is a very important person, so bow to her!"
"Then greet her.">
<PLTABLE "How can I make her like me?"
"It's her birthday."
"What do people expect on their birthday?"
"A gift! Have you anything to give her?"
"Give her the camellia blossom."
"It's not the custom here, but she will understand and appreciate it.">
<PLTABLE "Ishido is certainly being nasty."
"You, therefore, should be polite."
"Correct his mistake."
"You are no longer a barbarian, you are a samurai!"
"Tell him so!"
"It will expose his rudeness, and put him in an embarassing position.">
"Departure"
<PLTABLE "What can I do to help Mariko?"
"When she directs you to fight, do so."
"Kill the Captain of the Grays."
"Just keep attacking him."
"You will realize he doesn't want to kill you, although the Grays
will kill everyone else in Mariko's escort.">
<PLTABLE "Now Mariko is fighting!"
"She is samurai; it is her right."
"Don't try to help her, or you'll bring great shame upon her.">
"Seppuku"
<PLTABLE "What do I do in the garden?"
"Do what Chimmoko asks."
"Go in the cha-no-yu house and see Mariko."
"Kiss her, if you wish.">
<PLTABLE "How can I help Mariko?"
"First, realize you can't stop her without shaming her even more than
Ishido has shamed her."
"Then realize you must just wait until Ishido gives in."
"Then, when she has won, you can carry her away.">
"Ninja"
<PLTABLE "What should I do about Yabu?"
"First, notice that he's nervous."
"Ask him about the 'plan.'"
"Maybe he's up to something!"
"Perhaps you should follow him and find out."
"Discretion, discretion! Don't follow too close.">
<PLTABLE "How can I survive the ninja attack?"
"You could try fighting them off."
"Well, first you will need some weapons."
"Your swords and powder horn are in your quarters."
"The ninja haven't much experience with firearms, so your pistol will
help a lot."
"They will slow down, confused and scared, each time you fire the
pistol."
"But your pistol takes time to reload, so you're going to have to
retreat and hope for help."
"And each time you use it, they get less scared of it.">
<PLTABLE "They've taken Mariko!"
"You can usually avoid this by telling Mariko to follow you."
"If they have her, firing the pistol will give her a chance to
escape.">
<PLTABLE "I can't get away from the ninja!"
"You'll have to block them and slow them down."
"Firing the pistol at them slows them down."
"Closing and barring doors in their way slows them down."
"The iron-bound door between the Audience Chamber and the Inner Corridor can be
closed and barred."
"You can also slow them down by shooting at them through the crack they
make in that door."
"But you'll be better off finding a safer place to retreat to."
"Have you been back to the Private Quarters?"
"When you go back, Kiritsubo will show you the way into a secret room."
"Once you're in there with the women, you should close the bolts!">
<PLTABLE "How can I escape the explosion?"
"You can go out onto the balcony."
"First you have to open the catches on the balcony door."
"They're rusty, so hit them with something."
"...the pistol, for example.">
<PLTABLE "How can I prevent Mariko's death?"
"Get her into the Secret Redoubt."
"Then convince her to go onto the Balcony."
"But she won't go, will she?"
"She thinks her death is inevitable."
"So force her!"
"But if you do that the ninja will capture her."
"She's right. Your love is doomed, and if she's captured by Ishido,
the hostages will never be freed."
"It's tragic, but there is no way out for her."
"Honor her faith, and bless her after she dies.">
"Yokohama"
<PLTABLE "Vinck certainly is acting weird!"
"Humor him."
"Don't get him too upset."
"...as he's armed and dangerous."
"Wait for him to die."
"...and then carry him away.">
<PLTABLE "What can I do about the Erasmus?"
"You can look at it."
"...and that's about it.">
"Aftermath"
<PLTABLE "What's the scroll good for?"
"It gives you something to read."
"It also reminds you that you can get a new ship."
"You should tell Toranaga that.">
<PLTABLE "What does Toranaga want?"
"He wants you to tell him what you know."
"What did you find out during the attack on the castle?"
"What did Yabu do before the attack?"
"Did you try to follow him?"
"You ought to try that!"
"Tell Toranaga that Yabu betrayed him."
">TORANAGA, YABU BETRAYED YOU"
"Tell Toranaga how Yabu betrayed him."
">TORANAGA, YABU LET IN THE NINJA"
"Tell Toranaga what Yabu said to the ninja."
">TORANAGA, I AM KASIGI YABU">
"As a Last Resort (Part I)"
<PLTABLE "Read me first."
"This section tells you how the points in each scene are scored. You
get five points for each correct action listed. It is possible to
finish some scenes without getting all the points.|
|
Think twice before reading further! Don't spoil the game for yourself!">
<PLTABLE "Erasmus (11 actions)"
;WHEEL "Straightening the wheel."
;ROPER "Getting your apple back from Roper."
;APPLE "Eating the apple."
;KEY "Finding the key to the sea chest."
;RUTTER "Writing in your rutter."
;CAPTAINS-DESK "Finding the flagon in the Captain's desk."
;FLAGON "Giving the Captain water."
;MAETSUKKER "Sending Vinck, Ginsel, and Maetsukker out on watch."
;BELL "Ringing the bell to get the crew on deck."
;FORESAILS "Fixing the foresails."
;REEF "Getting through the reef into the harbor.">
<PLTABLE "Anjiro (4 actions)"
;FOOD "Eating both trays of food."
;SEBASTIO-HENCHMEN "Fighting back against Sebastio's henchmen."
;OMI "Getting through Omi's interrogation."
;SAMURAI-GUARDS "Trying to get your rutters back.">
<PLTABLE "Yabu (2 actions)"
;SEBASTIO-CRUCIFIX "Breaking Sebastio's crucifix."
;STRAIT-OF-MAGELLAN "Telling Yabu about your voyage.">
<PLTABLE "Pit (5 actions)"
;LADDER "Saving Vinck if he's the one picked to die, or saving
yourself if you are picked."
;LOSING-SAMURAI "Fighting the samurai, taking one as a hostage."
;VILLAGE-SQUARE "Agreeing to behave."
;CROOCQ "Lying down."
;BATHTUB "Taking a bath.">
<PLTABLE "Rodrigues (4 actions)"
;TRINITY-HOUSE "Answering Rodrigues about where you trained."
;LIZARD "Answering Rodrigues about the Lizard."
;LG-ERASMUS "Telling Rodrigues about the Erasmus."
;ARCHERS "Warning Rodrigues about the archers.">
<PLTABLE "Voyage to Osaka (11 actions)"
;GUNWALE "Grabbing the gunwale."
;MAIN-DECK "Restoring order on the oar deck."
;OARSMEN "Getting the oarsmen to row again."
;OAR "Throwing oar to Rodrigues."
;ANCHOR "Dropping anchor once in the bay."
;SKIFF "Getting into the skiff."
;LEDGE-4 "Finding Rodrigues."
;YABU-KIMONO "Making a rope of kimonos."
;LOINCLOTH "Adding loincloths to rope."
;LEDGE "Finding the ledge."
;SEARCH-PARTY "Getting Yabu's attention.">
<PLTABLE "Toranaga (3 actions)"
;AUDIENCE-CHAMBER "Defying convention by bowing but not kneeling."
;DAIS "Moving to the dais when Ishido arrives."
;ALVITO "Telling Toranaga Alvito is your enemy.">
<PLTABLE "Prison (6 actions)"
;THUG "Defeating the thug."
;DOMINGO "Speaking Spanish to Domingo."
;JAPANESE "Asking Domingo to teach you Japanese."
;LG-LINE "Joining the line of prisoners."
;BANDITS "Avoiding the bandit's attack."
;YABU-PALANQUIN "Getting in Yabu's palanquin.">
<PLTABLE "Mariko (3 actions)"
;MAPLE-GLADE "Greeting or bowing to Mariko or Toranaga."
;YAEMON "Smiling or winking at Yaemon."
;PROPHECY "Asking Mariko about the prophecy.">
"As a Last Resort (Part II)"
<PLTABLE "Escape (13 actions)"
;TORANAGA-IN-DRAG "Seeing Toranaga in the hut."
;KIRITSUBO "Seeing Toranaga and Kiritsubo switch."
;PARCHMENT "Grabbing the parchment from Ishido."
;CURTAINS "Giving the parchment to 'Kiri.'"
;CRAZY "Distracting Ishido by acting nuts."
;WOODS "Reaching the woods successfully."
;MARIKOS-LITTER "Saving Mariko during ambush."
;FISH-GATE "Finding the ronin."
;MESSENGER "Slowing down the messenger so Buntaro can kill him."
;WHARF "Helping Mariko when she 'faints.'"
;GLOBAL-WATER "Remembering the word for 'water.'"
;GRAY-LEADER "Killing the Gray leader."
;SECOND-GRAY "Killing the second Gray.">
<PLTABLE "Earthquake (4 actions)"
;MAIN-FISSURE "Saving Toranaga."
;SIDE-FISSURE "Saving Mariko."
;PLATEAU "Pissing in the fissure."
;SWORDS "Giving swords to Toranaga after his are lost.">
<PLTABLE "Journey to Yedo (3 actions)"
;YOKOSE-BATHTUB "Bathing with Mariko."
;YOKOSE-SPA-3 "Making love to Mariko."
;YOKOSE-SPA-1 "Getting back to your room safely.">
<PLTABLE "Ochiba (3 actions)"
;SWORDS "Checking your swords."
;CAMELLIA "Giving the camellia to Ochiba."
;GLOBAL-BARBARIAN "Telling Ishido you are not a barbarian.">
<PLTABLE "Departure (1 action)"
;YAMAZAKI "Killing Yamazaki.">
<PLTABLE "Seppuku (1 action)"
;MARIKO "Carrying Mariko away.">
<PLTABLE "Ninja (6 actions)"
;PLAN "Asking Yabu about the plan."
;BARRELS "Hiding from the ninja in the cellars."
;CELLARS "Seeing Yabu in the cellars let in the ninja."
;NINJA "Shooting the ninja leader."
;MARIKO "Telling Mariko to follow you."
;MARIKO "Blessing Mariko.">
<PLTABLE "Yokohama (1 action)"
;YOKOHAMA "Picking up Vinck.">
<PLTABLE "Aftermath (3 actions)"
;SEALED-SCROLL "Reading the sealed scroll."
;TRAITOR "Reporting that you saw Yabu."
;YABU "Reporting the password.">
"Have you tried?"
<PLTABLE "Amusing things to try..."
">HUG VINCK (or any other of your crew)"
">BOW TO VINCK (or any other Dutchman)"
"Wandering around Anjiro naked."
">KICK HEAD (of Sebastio's disrespectful henchman)"
">WHAT ARE COJONES (since Rodrigues wonders if you have any)"
">DRAW THE WORLD (for Yaemon)"
">SING (other than during the escape)"
"Find out the name of your sword (after the Earthquake scene)."
">LOOK UP \"TSURU\" IN DICTIONARY">
<PLTABLE "To find out who worked on the game."
"Type 'CREDITS' at any time in the story.">
>>
<END-SEGMENT>

1026
mariko.zil Normal file

File diff suppressed because it is too large Load Diff

756
maze.zil Normal file
View File

@ -0,0 +1,756 @@
"MAZE for
SHOGUN
(c) Copyright 1988 Infocom, Inc. All Rights Reserved."
<FILE-FLAGS SENTENCE-ENDS?>
<BEGIN-SEGMENT MAZE>
<CONSTANT MAZE-WINDOW 3>
<CONSTANT MWALL 128>
<DEFMAC MSTREET? ('VAL)
<FORM ZERO? <FORM BAND .VAL ,MWALL>>>
<OBJECT HOUSE
(LOC LOCAL-GLOBALS)
(SYNONYM HOUSE HOUSES SHOP SHOPS)
(DESC "house")
(FLAGS NDESCBIT)
(ACTION HOUSE-F)>
<ROUTINE HOUSE-F ()
<COND (<VERB? EXAMINE>
<TELL
"Houses and shops crowd the street on all sides, some dark and some
lit by oil lamps flickering through the paper panels of the shojis." CR>)
(<VERB? ENTER BOARD THROUGH>
<TELL
"As you start to move off from the cortege, Mariko calls you back,
speaking in Latin. \"No, Pilot, that is not the way.\"" CR>)>>
<OBJECT RONIN
(SYNONYM RONIN DETACHMENT)
(DESC "detachment of ronin")
(FLAGS PERSON PLURAL JAPANESEBIT)
(ACTION RONIN-F)>
<ROUTINE RONIN-F ("OPT" (RARG <>))
<COND (<RARG? WINNER>
<TELL
"The ronin take orders only from Toranaga." CR>
<END-QUOTE>)>>
<OBJECT FISH-GATE
(SYNONYM GATE FISH)
(ADJECTIVE BATTERED ETCHED)
(DESC "gate")
(FLAGS NDESCBIT SCOREBIT)
(ACTION FISH-GATE-F)>
<ROUTINE FISH-GATE-F ()
<COND (<VERB? EXAMINE>
<TELL
"It's just a weathered old gate with a fish carved on it." CR>)>>
<OBJECT AMBUSHERS
(SYNONYM AMBUSHER BOWMAN FIGURE SHAPE
AMBUSHERS BOWMEN FIGURES SHAPES)
(ADJECTIVE SHADOWY DIM)
(DESC "dim figures")
(FLAGS PERSON JAPANESEBIT PLURAL)
(DESCFCN AMBUSHERS-DESC)
(ACTION AMBUSHERS-F)>
<ROUTINE AMBUSHERS-DESC (RARG OBJ)
<COND (<RARG? OBJDESC?> <RTRUE>)
(ELSE
<TELL
"Dim figures can be seen on one of the tiled roofs of a nearby house.">)>>
<ROUTINE AMBUSHERS-F ("OPT" RARG)
<COND (<RARG? SUBJ>
<RFALSE>)
(<RARG? WINNER>
<TELL G"There is no response." CR>)
(<VERB? EXAMINE>
<TELL
"From here, in the dark, they are merely dim dark outlines." CR>)>>
<OBJECT MESSENGER
(SYNONYM MESSENGER MAN SAMURAI GRAY)
(ADJECTIVE GRAY)
(DESC "messenger")
(FLAGS PERSON JAPANESEBIT INVISIBLE SCOREBIT)
(GENERIC GENERIC-MAN-F)
(ACTION MESSENGER-F)>
<ROUTINE MESSENGER-F ("OPT" (RARG <>))
<COND (<AND <IN? ,MESSENGER ,LOCAL-GLOBALS>
<NOT <PASSIVE-VERB?>>>
<TELL "He's gone!" CR>)
(<RARG? SUBJ>
<RFALSE>)
(<RARG? WINNER>
<WAKARIMASEN>)
(<OR <VERB? STOP>
<HOSTILE-VERB?>>
<COND (<FSET? ,MESSENGER ,DEAD>
<TELL "Buntaro hacked him to pieces." CR>)
(<NOT <FSET? ,MESSENGER ,RMUNGBIT>>
<FSET ,MESSENGER ,RMUNGBIT>
<TELL
"You stretch to intercept the man, grabbing and nearly tackling him, and he
tumbles to the ground." CR>)
(ELSE
<TELL
"Desperately you struggle with the messenger and manage to knock him down
a second time." CR>
<SCORE-OBJECT ,MESSENGER>)>)>>
<ROOM AMBUSH-SITE
(LOC ROOMS)
(DESC "City Street")
(LDESC
"This is a dark, deserted street in the middle of Osaka.")
(SYNONYM STREET)
(ADJECTIVE CITY)
(FLAGS ONBIT OUTSIDE)
(GLOBAL MESSENGER)
(ACTION AMBUSH-SITE-F)>
<ROUTINE AMBUSH-SITE-F ("OPT" (RARG <>))
<COND (<RARG? BEG>
<COND (<VERB? WALK>
<TELL
"You are pinned down by the attack. To run would be suicidal!" CR>)
(<AND <P? (PUSH TAKE HELP PULL-BEHIND) MARIKO>
<FSET? ,MARIKOS-LITTER ,SCOREBIT>>
<B-LIE-DOWN>
<TELL
"You roll for cover, taking Mariko with you into the lee of the tumbled
litter." CR>
<SCORE-OBJECT ,MARIKOS-LITTER>)
(<AND <OR <VERB? DODGE>
<P? (HIDE-BEHIND HIDE-UNDER) MARIKOS-LITTER>>
<FSET? ,MARIKOS-LITTER ,SCOREBIT>>
<B-LIE-DOWN>
<TELL
"You roll for cover into the lee of the tumbled litter." CR>)>)>>
<GLOBAL AMBUSH-PROB 2>
<GLOBAL XAMBUSH 0>
<GLOBAL YAMBUSH 0>
<ROUTINE I-AMBUSH-START ()
<COND (<OR <G? ,AMBUSH-PROB 100>
<PROB ,AMBUSH-PROB>>
<SETG XAMBUSH ,X>
<SETG YAMBUSH ,Y>
<MOVE-ALL ,MAZE ,AMBUSH-SITE>
<COND (<IN? ,BLACKTHORNE ,MARIKOS-LITTER>
<MOVE ,MARIKOS-LITTER ,MAZE>)
(ELSE
<MOVE ,BLACKTHORNE ,MAZE>)>
<MOVE ,AMBUSHERS ,AMBUSH-SITE>
<QUEUE I-AMBUSH -1>
<TELL CR
"The arrows come out of the night, the first impaling the captain
through the throat. His lungs fill with molten fire and death
swallows him. His last thought is one of wonder, for did not Lord
Kiyama, his master, tell him the ambush was to be later, beside
the wharves, and directed at the pirate?" CR CR>
<GOTO ,AMBUSH-SITE>)
(ELSE
<QUEUE I-AMBUSH-START 5>
<SETG AMBUSH-PROB <+ ,AMBUSH-PROB 6>>
<RFALSE>)>>
<ROUTINE I-AMBUSH ()
<ZLINES ,AMBUSH-CNT
(<TELL CR
"An arrow slams into the litter post an inch from your head! Two
arrows pierce the curtains of Kiritsubo's litter, and another strikes
one of the maids in the waist. As she screams, the litter bearers
take to their heels into the darkness. Mariko ">
<COND (<FSET? ,MARIKOS-LITTER ,SCOREBIT>
<TELL "stands in the open">)
(ELSE
<TELL "clings to you">)>
<TELL ",
staring in shock at the dying maid." CR>)
(<TELL CR
"A shower of arrows straddles both litters.">
<COND (<FSET? ,MARIKOS-LITTER ,SCOREBIT>
<FSET ,MARIKO ,DEAD>
<TELL
" One strikes Mariko in the back as she starts to run for cover. She
falls to the ground and is still." CR>
<FAILED-SCENE>)
(ELSE
<TELL
" One thuds into the ground where Mariko was an instant ago." CR>)>)
(<MOVE ,TORANAGA ,HERE>
<REMOVE ,TORANAGA-IN-DRAG>
<FSET ,CURTAINS ,OPENBIT>
<MARGINAL-PIC ,P-IN-DRAG T ,P-IN-DRAG-CORNER T>
<TELL CR
"Buntaro shields Toranaga's litter with his body as best he can, then
whips open the curtains. Two arrows are imbedded in Toranaga's chest and
side,
and he jerks them out of the armor he wears beneath the kimono. He
fights his way out of the litter and stands in the street, sword
drawn, an incongruous figure in kimono and hat." CR>)
(<REMOVE ,AMBUSHERS>
<TELL CR
"Another volley of arrows comes out of the darkness, one missing you
so narrowly that it takes skin off of your cheek, and then all is silent.|
|
Buntaro and some of his men are near the wall in pursuit but the
ambushers vanish into the blackness. A dozen men race in pursuit but
all know it's hopeless." CR>)
(<MOVE ,MESSENGER ,HERE>
<FCLEAR ,MESSENGER ,INVISIBLE>
<THIS-IS-IT ,MESSENGER>
<SETG OPPONENT ,MESSENGER>
<TELL CR
"One of the officer Grays says, \"Toranaga!\" and though it is said
quietly, everyone hears. Here, incredibly, is the enemy of his
master, free, outside the castle walls. \"You will wait here, Lord
Toranaga. You,\" he snaps at one of his men, \"report to Lord Ishido
at once!\" The man races toward you, heading back toward the castle!" CR>)
(DELAY
<COND (<FSET? ,MESSENGER ,SCOREBIT>
<COND (<AND <FSET? ,MESSENGER ,RMUNGBIT>
<NOT <FSET? ,MESSENGER ,SURFACEBIT>>>
<FSET ,MESSENGER ,SURFACEBIT>
<TELL CR
"Immediately he rolls and is on his feet again!" CR>)
(ELSE
<MOVE ,MESSENGER ,LOCAL-GLOBALS>
<FCLEAR ,MESSENGER ,SCOREBIT>
<TELL CR
"This time the messenger scuttles away from you and is off like a hare
chased by hounds." CR>)>
<RTRUE>)
(<AND <NOT <IN? ,MESSENGER ,LOCAL-GLOBALS>>
<NOT <FSET? ,MESSENGER ,DEAD>>>
<FSET ,MESSENGER ,DEAD>
<TELL CR
"This time Buntaro, with a vicious chop of his sword, cuts the man down." CR>
<RTRUE>)>)
(<REPLACE-SYNONYM ,CORTEGE ,W?GRAYS ,W?BROWNS>
<MOVE ,GRAYS ,HERE>
<THIS-IS-IT ,GRAYS>
<TELL CR
"The rest of the Grays attack, trying to reach Toranaga. One officer
whips out his two-handed sword and leaps for Toranaga but Buntaro
parries. The Browns and Grays, all intermixed, erupt into a swirling
melee.|
|
The Grays fight courageously. Four join in a suicidal charge at
Toranaga. The Browns break it and the Grays regroup and charge
again. Then a senior officer orders three to retreat for help and the
rest to guard the retreat." CR>)
(<DEQUEUE I-AMBUSH>
<COND (<FSET? ,MESSENGER ,DEAD> <REMOVE ,MESSENGER>)
(ELSE <QUEUE I-CAUGHT 150>)>
<REMOVE ,GRAYS>
<MOVE-ALL ,AMBUSH-SITE ,MAZE>
<MOVE ,BLACKTHORNE ,AMBUSH-SITE>
<TELL CR
"The three Grays tear off, and though Buntaro kills one, the other two
are only wounded. The rest die." CR CR>
<GOTO ,MAZE>)>>
<ROUTINE I-CAUGHT ()
<COND (<HERE? MAZE>
<LEAVE-MAZE>
<TELL CR
"Ahead of you, a mass of Gray archers materializes out of the night. Above,
a mass of fireworks blooms in warning from the castle. Toranaga turns,
ordering the cortege to retreat down an alley, but there are Grays there
too. The party is surrounded!" CR>
<JIGS-UP>
<RFATAL>)>>
<ROOM MAZE
(LOC ROOMS)
(SYNONYM STREETS)
(ADJECTIVE CITY)
(DESC "City Streets")
(FLAGS OUTSIDE ONBIT)
(GLOBAL HOUSE)
(MOUSE MAZE-MOUSE-F)
(ACTION MAZE-F)>
<ROUTINE MAZE-F (RARG "AUX" XX YY OXX OYY)
<COND (<RARG? LOOK>
<TELL
"This maze of streets and alleys extends from the great castle to the
harbor. At night, it is a nightmare of blind alleys, twisting overhung
streets, and shadowy hurrying shapes." CR>)
(<RARG? ENTER>
<PICSET ,MAZE-PICS>
<COND (<NOT <FSET? ,HERE ,TOUCHBIT>>
<MOVE-ALL ,CITY ,MAZE>
<TELL
"The cortege continues through the winding, curling city streets,
the pedestrians bowing and the very poor on their knees until you
pass." CR CR>
<QUEUE I-AMBUSH-START 5>
<TELL "[Building Osaka.]" CR CR>
<BUILDMAZE>)>
<COND (<EQUAL? ,OHERE ,WAREHOUSE>
<SET XX ,XGOAL>
<SET YY ,YGOAL>
<TELL
"You have returned to the"G" maze of back streets and alleys." CR>)
(<EQUAL? ,OHERE ,AMBUSH-SITE>
<SET XX ,XAMBUSH>
<SET YY ,YAMBUSH>
<TELL
"The cortege re-forms and prepares to continue the escape. The urgency is
now great, as the escaped grays will spread the alarm." CR>)
(ELSE
<SET XX ,XSTART>
<SET YY ,YSTART>
<TELL
"You have entered a"G" maze of back streets and alleys." CR>)>
<CRLF>
<TYPE-ANY-KEY>
<DISPLAY-MAZE>
<MAZE-MOVE .XX .YY>
<RTRUE>)
(<RARG? LEAVE>
<LEAVE-MAZE>)
(<RARG? BEG>
<COND (<VERB? DEFINE>
<CLEAR ,MAZE-WINDOW>
<RFALSE>)
(<VERB? WALK>
<REPEAT ((MOVED? <>))
<SET XX ,X>
<SET YY ,Y>
<SET OXX ,X>
<SET OYY ,Y>
<COND (<AND <EQUAL? ,P-WALK-DIR ,P?NORTH>
<G? .YY 0>>
<SET YY <- .YY 1>>)
(<AND <EQUAL? ,P-WALK-DIR ,P?EAST>
<L? .XX <- ,MAZE-WIDTH 1>>>
<SET XX <+ .XX 1>>)
(<AND <EQUAL? ,P-WALK-DIR ,P?WEST>
<G? .XX 0>>
<SET XX <- .XX 1>>)
(<AND <EQUAL? ,P-WALK-DIR ,P?SOUTH>
<L? .YY <- ,MAZE-HEIGHT 1>>>
<SET YY <+ .YY 1>>)
(<AND <EQUAL? ,P-WALK-DIR ,P?NE>
<L? .XX <- ,MAZE-WIDTH 1>>
<G? .YY 0>>
<SET XX <+ .XX 1>>
<SET YY <- .YY 1>>)
(<AND <EQUAL? ,P-WALK-DIR ,P?SE>
<L? .XX <- ,MAZE-WIDTH 1>>
<L? .YY <- ,MAZE-HEIGHT 1>>>
<SET XX <+ .XX 1>>
<SET YY <+ .YY 1>>)
(<AND <EQUAL? ,P-WALK-DIR ,P?SW>
<G? .XX 0>
<L? .YY <- ,MAZE-HEIGHT 1>>>
<SET XX <- .XX 1>>
<SET YY <+ .YY 1>>)
(<AND <EQUAL? ,P-WALK-DIR ,P?NW>
<G? .XX 0>
<G? .YY 0>>
<SET XX <- .XX 1>>
<SET YY <- .YY 1>>)
(ELSE
<TELL "You can't go that way." CR>
<RTRUE>)>
<COND (<AND <EQUAL? .XX ,XSTART>
<EQUAL? .YY ,YSTART>>
<GOTO ,CITY>
<RTRUE>)
(<AND <EQUAL? .XX ,XGOAL>
<EQUAL? .YY ,YGOAL>>
<GOTO ,WAREHOUSE>
<RTRUE>)
(<AND <MSTREET? <MGETB .XX .YY>>
<OR <EQUAL? .XX .OXX>
<EQUAL? .YY .OYY>
<MSTREET? <MGETB .XX .OYY>>
<MSTREET? <MGETB .OXX .YY>>>>
<MAZE-MOVE .XX .YY>
<COND (<AND <EQUAL? .XX ,XFISH>
<EQUAL? .YY ,YFISH>
<NOT <LOC ,FISH-GATE>>>
<MOVE ,FISH-GATE ,HERE>
<COND (<FSET? ,FISH-GATE ,SCOREBIT>
<MOVE ,RONIN ,HERE>
<SCORE-OBJECT ,FISH-GATE>
<TELL
G"You make your way through the deserted streets.">
<TELL
" Toranaga stops the cortege outside a battered gate. A fish is etched
into its timbers. He knocks in code. The door opens at once, and an
ill-kempt samurai bows. \"Bring your men and follow me,\" Toranaga
says. Fifteen men, dressed as "I"ronin"" follow him and slip into
place as advance and rear guard. Others spread the alarm to other
secret cadres. Soon there are fifty troops with you and a hundred
guarding your flanks." CR>)>)
(<AND <EQUAL? .OXX ,XFISH>
<EQUAL? .OYY ,YFISH>>
<REMOVE ,FISH-GATE>)>
<COND (<EQUAL? ,P-WALK-DIR ,P?NORTH ,P?SOUTH>
<COND (<OR <MSTREET?
<MGETB <- .XX 1> .YY>>
<MSTREET?
<MGETB <+ .XX 1> .YY>>>
<RETURN>)
(ELSE
<SET MOVED? T>)>)
(<EQUAL? ,P-WALK-DIR ,P?EAST ,P?WEST>
<COND (<OR <MSTREET?
<MGETB .XX <- .YY 1>>>
<MSTREET?
<MGETB .XX <+ .YY 1>>>>
<RETURN>)
(ELSE
<SET MOVED? T>)>)>)
(.MOVED? <RETURN>)
(ELSE
<TELL "There's a house there." CR>
<RTRUE>)>>
<TELL
G"You make your way through the deserted streets." CR>)
(<AND <VERB? DROP>
<IN? ,WINNER ,MAZE>>
<COND (<IDROP>
<REMOVE ,PRSO>
<TELL
CTHE ,PRSO " drops to the ground and is lost from sight in the dark and
confusion." CR>)
(ELSE <RTRUE>)>)>)>>
<ROUTINE LEAVE-MAZE ("AUX" YY)
<SET YY <+ <WINGET ,S-TEXT ,WYPOS> <WINGET ,S-TEXT ,WTOP>>>
<SETUP-TEXT-AND-STATUS>
<SCREEN ,S-TEXT>
<CURSET <- .YY <WINGET ,S-TEXT ,WTOP>> 1>>
<CONSTANT MAZE-PICS
<TABLE P-MAZE-WALL
P-MAZE-STREET
P-MAZE-PARTY
P-MAZE-CASTLE
P-MAZE-DOCK
P-MAZE-FISH
P-MAZE-BACKGROUND
0>>
<ROUTINE MAZE-MOUSE-F (TRM "AUX" (DIR <>) WX WY
(BX <GET ,MAZE-BOX-TBL 1>) (BY <GET ,MAZE-BOX-TBL 0>))
<SET WY
<+ <WINGET ,MAZE-WINDOW ,WTOP>
,YOFFSET
<* ,Y .BY>
</ .BY 2>>>
<SET WX
<+ <WINGET ,MAZE-WINDOW ,WLEFT>
,XOFFSET
<* ,X .BX>
</ .BX 2>>>
<SET WY <- ,MOUSE-LOC-Y .WY>>
<SET WX <- ,MOUSE-LOC-X .WX>>
<COND (<G=? .WX 0> ;"right side"
<COND (<L? .WY 0> ;"top right"
<SET WY <- .WY>>
<COND (<G? .WX <* .WY 3>>
<SET DIR ,EAST-STR>)
(<G? .WY <* .WX 3>>
<SET DIR ,NORTH-STR>)
(ELSE
<SET DIR ,NE-STR>)>)
(ELSE ;"bottom right"
<COND (<G? .WX <* .WY 3>>
<SET DIR ,EAST-STR>)
(<G? .WY <* .WX 3>>
<SET DIR ,SOUTH-STR>)
(ELSE
<SET DIR ,SE-STR>)>)>)
(<L? .WY 0> ;"top left"
<SET WY <- .WY>>
<SET WX <- .WX>>
<COND (<G? .WX <* .WY 3>>
<SET DIR ,WEST-STR>)
(<G? .WY <* .WX 3>>
<SET DIR ,NORTH-STR>)
(ELSE
<SET DIR ,NW-STR>)>)
(ELSE ;"bottom left"
<SET WX <- .WX>>
<COND (<G? .WX <* .WY 3>>
<SET DIR ,WEST-STR>)
(<G? .WY <* .WX 3>>
<SET DIR ,SOUTH-STR>)
(ELSE
<SET DIR ,SW-STR>)>)>
<COND (<AND <L=? .WX </ .BX 2>> <L=? .WY </ .BY 2>>>
<RFALSE>)
(.DIR
<ADD-TO-INPUT .DIR 13>
<RETURN 13>)
(ELSE
<RFALSE>)>>
<CONSTANT NORTH-STR <LTABLE (PURE STRING) "north">>
<CONSTANT SOUTH-STR <LTABLE (PURE STRING) "south">>
<CONSTANT EAST-STR <LTABLE (PURE STRING) "east">>
<CONSTANT WEST-STR <LTABLE (PURE STRING) "west">>
<CONSTANT SE-STR <LTABLE (PURE STRING) "se">>
<CONSTANT SW-STR <LTABLE (PURE STRING) "sw">>
<CONSTANT NE-STR <LTABLE (PURE STRING) "ne">>
<CONSTANT NW-STR <LTABLE (PURE STRING) "nw">>
<CONSTANT MAZE-BOX-TBL <TABLE 0 0>>
"Mechanics of building and displaying maze."
<ROUTINE MGETB (X Y)
<GETB ,MAZE-MAP <+ <* .Y ,MAZE-WIDTH> .X>>>
<ROUTINE MPUTB (X Y VAL)
<PUTB ,MAZE-MAP <+ <* .Y ,MAZE-WIDTH> .X> .VAL>>
<GLOBAL YOFFSET 0>
<GLOBAL XOFFSET 0>
<ROUTINE DISPLAY-MAZE-PIC (VAL Y X "AUX" BY BX OY OX)
<COND (<NOT <ZERO? .VAL>> ;<EQUAL? .VAL ;!\#>
<SET BY <GET ,MAZE-BOX-TBL 0>>
<SET BX <GET ,MAZE-BOX-TBL 1>>
<DISPLAY .VAL ;<MAZE-PIC .VAL>
<+ 1 ,YOFFSET <* .Y .BY>>
<+ 1 ,XOFFSET <* .X .BX>>>)>>
;<ROUTINE MAZE-PIC (VAL)
<COND (<EQUAL? .VAL !\B> ,P-MAZE-PARTY)
(<EQUAL? .VAL !\*> ,P-MAZE-WALL)
(<EQUAL? .VAL !\ > ,P-MAZE-STREET)
(<EQUAL? .VAL !\C> ,P-MAZE-CASTLE)
(<EQUAL? .VAL !\D> ,P-MAZE-DOCK)
(<EQUAL? .VAL !\F> ,P-MAZE-FISH)>>
<ROUTINE MAZE-MOVE (X Y)
<SCREEN ,MAZE-WINDOW>
<SETG X .X>
<SETG Y .Y>
<MPUTC <- .X 1> <- .Y 1>>
<MPUTC .X <- .Y 1>>
<MPUTC <+ .X 1> <- .Y 1>>
<MPUTC <- .X 1> .Y>
<MPUTC <+ .X 1> .Y>
<MPUTC <- .X 1> <+ .Y 1>>
<MPUTC .X <+ .Y 1>>
<MPUTC <+ .X 1> <+ .Y 1>>
<MPUTC .X .Y ,P-MAZE-PARTY ;!\B>
<SCREEN ,S-TEXT>>
<ROUTINE MPUTC (X Y "OPT" (VAL <>) "AUX" OVAL)
<COND (<VALID .X .Y>
<SET OVAL <MGETB .X .Y>>
<COND (<NOT .VAL>
<SET VAL .OVAL>
<COND (<MSTREET? .VAL>
<COND (<AND <EQUAL? .X ,XSTART>
<EQUAL? .Y ,YSTART>>
<SET VAL ,P-MAZE-CASTLE ;!\C>)
(<AND <EQUAL? .X ,XGOAL>
<EQUAL? .Y ,YGOAL>>
<SET VAL ,P-MAZE-DOCK ;!\D>)
(<AND <EQUAL? .X ,XFISH>
<EQUAL? .Y ,YFISH>>
<SET VAL ,P-MAZE-FISH ;!\F>)
(ELSE <SET VAL ,P-MAZE-STREET ;!\ >)>)
(ELSE
<SET VAL ,P-MAZE-WALL ;!\*>)>)>
<SET VAL <BOR .VAL <BAND .OVAL ,MWALL>>>
<COND (<NOT <EQUAL? .VAL .OVAL>>
<MPUTB .X .Y .VAL>
<DISPLAY-MAZE-PIC <BAND .VAL 127> .Y .X>)>)>>
<ROUTINE DISPLAY-MAZE ("AUX" Y BY BX MH TH SH)
<RESET-MARGIN>
<CLEAR ,S-TEXT>
<PICINF ,P-MAZE-BACKGROUND ,YX-TBL>
<SET SH <WINGET ,S-STATUS ,WHIGH>>
<WINDEF ,MAZE-WINDOW
<SET Y <+ <WINGET ,S-STATUS ,WTOP> .SH>>
<WINGET ,S-TEXT ,WLEFT>
<SET MH <GET ,YX-TBL 0>>
<GET ,YX-TBL 1>>
<SET TH <- <WINGET ,S-FULL ,WHIGH> .SH>>
<WINDEF ,S-TEXT
<+ .Y .MH> <WINGET ,S-TEXT ,WLEFT>
<- .TH .MH> <WINGET ,S-TEXT ,WWIDE>>
<CLEAR ,S-TEXT>
<SCREEN ,MAZE-WINDOW>
<PICINF ,P-MAZE-BOX ,MAZE-BOX-TBL>
<SET BY <GET ,MAZE-BOX-TBL 0>>
<SET BX <GET ,MAZE-BOX-TBL 1>>
<SETG YOFFSET
</ <- <WINGET ,MAZE-WINDOW ,WHIGH>
<* ,MAZE-HEIGHT .BY>>
2>>
<SETG XOFFSET
</ <- <WINGET ,MAZE-WINDOW ,WWIDE>
<* ,MAZE-WIDTH .BX>>
2>>
<PRINTM>
<SCREEN ,S-TEXT>>
<ROUTINE PRINTM ("AUX" M (OFFS 0))
<DISPLAY ,P-MAZE-BACKGROUND 1 1>
<FOR ((Y 0) <L? .Y ,MAZE-HEIGHT> <SET Y <+ .Y 1>>)
<FOR ((X 0) <L? .X ,MAZE-WIDTH> <SET X <+ .X 1>>)
<DISPLAY-MAZE-PIC <SET M <BAND <GETB ,MAZE-MAP .OFFS> 127>>
.Y .X>
<SET OFFS <+ .OFFS 1>>>>>
<CONSTANT MAZE-WIDTH 37>
<CONSTANT MAZE-HEIGHT 17>
<GLOBAL SIZE 0>
<GLOBAL PMAX 0>
<GLOBAL MAZE-MAP <ITABLE <* ,MAZE-WIDTH ,MAZE-HEIGHT> (BYTE) 128>>
<CONSTANT DIR
<TABLE <TABLE (BYTE) 0 1 2 3> <TABLE (BYTE) 0 1 3 2>
<TABLE (BYTE) 0 2 1 3> <TABLE (BYTE) 0 2 3 1>
<TABLE (BYTE) 0 3 1 2> <TABLE (BYTE) 0 3 2 1>
<TABLE (BYTE) 1 0 2 3> <TABLE (BYTE) 1 0 3 2>
<TABLE (BYTE) 1 2 0 3> <TABLE (BYTE) 1 2 3 0>
<TABLE (BYTE) 1 3 0 2> <TABLE (BYTE) 1 3 2 0>
<TABLE (BYTE) 2 0 1 3> <TABLE (BYTE) 2 0 3 1>
<TABLE (BYTE) 2 1 0 3> <TABLE (BYTE) 2 1 3 0>
<TABLE (BYTE) 2 3 0 1> <TABLE (BYTE) 2 3 1 0>
<TABLE (BYTE) 3 0 1 2> <TABLE (BYTE) 3 0 2 1>
<TABLE (BYTE) 3 1 0 2> <TABLE (BYTE) 3 1 2 0>
<TABLE (BYTE) 3 2 0 1> <TABLE (BYTE) 3 2 1 0>>>
<CONSTANT XOFF1 <TABLE 0 0 1 -1>>
<CONSTANT YOFF1 <TABLE -1 1 0 0>>
<CONSTANT XOFF2 <TABLE 0 0 2 -2>>
<CONSTANT YOFF2 <TABLE -2 2 0 0>>
<GLOBAL X 0>
<GLOBAL Y 0>
<GLOBAL XSTART 0>
<GLOBAL YSTART 0>
<GLOBAL XGOAL 0>
<GLOBAL YGOAL 0>
<GLOBAL LEN 0>
<GLOBAL LMAX 0>
<GLOBAL FLEN 0>
<GLOBAL XFISH 0>
<GLOBAL YFISH 0>
<ROUTINE BUILDMAZE ("AUX" LEFT PLEN D)
<SETG SIZE <* </ ,MAZE-WIDTH 2> </ ,MAZE-HEIGHT 2>>>
<SETG PMAX ,SIZE>
<SET LEFT ,SIZE>
<SETG FLEN <+ 10 <RANDOM 5>>>
<FOR ((YY 0) <L? .YY ,MAZE-HEIGHT> <SET YY <+ .YY 1>>)
<FOR ((XX 0) <L? .XX ,MAZE-WIDTH> <SET XX <+ .XX 1>>)
<MPUTB .XX .YY ,MWALL>>>
<FOR ((YY 1) <L? .YY ,MAZE-HEIGHT> <SET YY <+ .YY 2>>)
<FOR ((XX 1) <L? .XX ,MAZE-WIDTH> <SET XX <+ .XX 2>>)
<MPUTB .XX .YY 0>>>
<SETG XGOAL <- ,MAZE-WIDTH 2>
;<+ <* <RANDOM <- </ ,MAZE-WIDTH 2> 1>> 2> 1>>
<SETG XSTART ,XGOAL>
<SETG X ,XGOAL>
<SETG YGOAL <+ <* <RANDOM <- </ ,MAZE-HEIGHT 2> 1>> 2> 1>>
<SETG YSTART ,YGOAL>
<SETG Y ,YGOAL>
<MPUTB ,X ,Y 1>
<SETG LEN 1>
<SETG LMAX 1>
<FOR ((PLEN 0) <G? <SET LEFT <- .LEFT 1>> 0> <SET PLEN <+ .PLEN 1>>)
<REPEAT ()
<COND (<OR <ZERO? <MGETB ,X ,Y>>
<G=? .PLEN ,PMAX>
<L? <SET D <FINDMOVE ,X ,Y>> 0>>
<BACKUP>
<SET PLEN 0>)
(ELSE <RETURN>)>>
<REMOVEWALL .D>>
<FOR ((YY 1) <L? .YY ,MAZE-HEIGHT> <SET YY <+ .YY 2>>)
<FOR ((XX 1) <L? .XX ,MAZE-WIDTH> <SET XX <+ .XX 2>>)
<MPUTB .XX .YY 0>>>
<FOR ((XX 0) <L? .XX ,MAZE-WIDTH> <SET XX <+ .XX 1>>)
<MPUTB .XX 0 ,MWALL>
<MPUTB .XX <- ,MAZE-HEIGHT 1> ,MWALL>>
<FOR ((YY 1) <L? .YY <- ,MAZE-HEIGHT 1>> <SET YY <+ .YY 1>>)
<MPUTB 0 .YY ,MWALL>
<MPUTB <- ,MAZE-WIDTH 1> .YY ,MWALL>>
<SETG XGOAL <+ ,XGOAL 1>>
;<REPEAT ()
<SETG XFISH <RANDOM ,MAZE-WIDTH>>
<SETG YFISH <RANDOM ,MAZE-HEIGHT>>
<COND (<ZERO? <BAND <MGETB ,XFISH ,YFISH> ,MWALL>>
<RETURN>)>>
<MPUTB ,XGOAL ,YGOAL 0> ;"make the exit">
<ROUTINE VISITED (XLOC YLOC)
<COND (<NOT <VALID .XLOC .YLOC>>)
(<N==? <MGETB .XLOC .YLOC> 0>)>>
<ROUTINE VALID (XLOC YLOC)
<COND (<OR <L? .XLOC 0> <G=? .XLOC ,MAZE-WIDTH>
<L? .YLOC 0> <G=? .YLOC ,MAZE-HEIGHT>>
<>)
(ELSE T)>>
<ROUTINE FINDMOVE (XLOC YLOC "AUX" (DV <RANDOM 23>) D I)
<FOR ((I 0) <L? .I 4> <SET I <+ .I 1>>)
<SET D <GETB <GET ,DIR .DV> .I>>
<COND (<NOT <VISITED <+ .XLOC <GET ,XOFF2 .D>>
<+ .YLOC <GET ,YOFF2 .D>>>>
<RETURN .D>)
(ELSE <SET D -1>)>>
.D>
<ROUTINE BACKUP ("AUX" D XX YY)
<SETG LEN <- ,LEN 1>>
<FOR ((D 0) <L? .D 4> <SET D <+ .D 1>>)
<SET XX <+ ,X <GET ,XOFF2 .D>>>
<SET YY <+ ,Y <GET ,YOFF2 .D>>>
<COND (<AND <VALID .XX .YY>
<==? <MGETB .XX .YY> ,LEN>>
<RETURN>)>>
<SETG X .XX>
<SETG Y .YY>
<RTRUE>>
<ROUTINE REMOVEWALL (D)
<MPUTB <+ ,X <GET ,XOFF1 .D>>
<+ ,Y <GET ,YOFF1 .D>>
0>
<SETG LEN <+ <MGETB ,X ,Y> 1>>
<SETG X <+ ,X <GET ,XOFF2 .D>>>
<SETG Y <+ ,Y <GET ,YOFF2 .D>>>
<MPUTB ,X ,Y ,LEN>
<COND (<EQUAL? ,LEN ,FLEN>
<SETG XFISH ,X>
<SETG YFISH ,Y>)>
<COND (<G? ,LEN ,LMAX>
<SETG LMAX ,LEN>
<SETG XSTART ,X>
<SETG YSTART ,Y>)>
<RTRUE>>
<END-SEGMENT>

1056
misc.zil Normal file

File diff suppressed because it is too large Load Diff

1842
osaka.zil Normal file

File diff suppressed because it is too large Load Diff

205
pic.zil Normal file
View File

@ -0,0 +1,205 @@
"PIC for
Library
(c) Copyright 1988 Infocom, Inc. All Rights Reserved."
<BEGIN-SEGMENT 0>
<CONSTANT P-TITLE 1> ;"standard number for title pic"
<CONSTANT YX-TBL <TABLE 0 0>>
<ROUTINE YCEILING (Y)
<SET Y <+ .Y ,FONT-Y -1>>
<- .Y <MOD .Y ,FONT-Y>>>
<ROUTINE XCEILING (X)
<SET X <+ .X ,FONT-X -1>>
<- .X <MOD .X ,FONT-X>>>
<END-SEGMENT>
<BEGIN-SEGMENT STARTUP>
<ROUTINE TITLE-SCREEN ()
<CLEAR ,S-FULL>
<COND (<PICINF ,P-TITLE ,YX-TBL>
<CURSOR-OFF>
<SCREEN ,S-FULL>
<DISPLAY ,P-TITLE 1 1>
<CURSET <WINGET ,S-TEXT ,WHIGH> 1>
<INPUT 1>
<CLEAR ,S-FULL>
<CURSOR-ON>)>
<DISPLAY-BORDER ,P-BORDER>
<V-VERSION T>>
<END-SEGMENT>
<BEGIN-SEGMENT 0>
<GLOBAL CURRENT-BORDER 0>
<ROUTINE DISPLAY-BORDER ("OPT" (B ,CURRENT-BORDER))
<COND (<APPLE?> <RFALSE>)
(<PICINF .B ,YX-TBL>
<SCREEN ,S-FULL>
<DISPLAY .B 1 1>
<SETG CURRENT-BORDER .B>
<SCREEN ,S-TEXT>)>>
<ROUTINE CENTER-PIC-X (P "AUX" X Y)
<COND (<PICINF .P ,YX-TBL>
<FLUSH-OLD-PICTURE>
<MAKE-ROOM-FOR <SET Y <GET ,YX-TBL 0>>>
<SET X <- <WINGET -3 ,WWIDE> <GET ,YX-TBL 1>>>
<COND (<G? .X 1> <SET X </ .X 2>>)
(ELSE <SET X 1>)>
<DISPLAY .P 0 .X>
<N-CRLF </ <+ .Y ,FONT-Y -1> ,FONT-Y>>
<RTRUE>)>>
"display a picture centered in the current window"
<ROUTINE CENTER-PIC (P "AUX" X Y)
<COND (<PICINF .P ,YX-TBL>
<SET Y <- <WINGET -3 ,WHIGH> <GET ,YX-TBL 0>>>
<SET X <- <WINGET -3 ,WWIDE> <GET ,YX-TBL 1>>>
<COND (<G? .Y 1> <SET Y </ .Y 2>>)
(ELSE <SET Y 1>)>
<COND (<G? .X 1> <SET X </ .X 2>>)
(ELSE <SET X 1>)>
<DISPLAY .P .Y .X>)>>
<CONSTANT TEXT-MARGIN 2> ;"left and right text margins in pixels"
<ROUTINE FLUSH-OLD-PICTURE ("AUX" Y)
<COND (<SET Y <WINGET ,S-TEXT ,WCRCNT>>
<N-CRLF .Y>
<RESET-MARGIN>)>>
<ROUTINE N-CRLF (Y)
<REPEAT ((CNT 0))
<COND (<IGRTR? CNT .Y> <RETURN>)>
<CRLF>>>
<ROUTINE MARGINAL-PIC (P "OPT" (RIGHT? T) (C <>) (CTOP? <>)
"AUX" TMP X Y YLEFT HIGH WIDE (CENTER? <>))
<COND (<PICINF .P ,YX-TBL>
<SET HIGH <WINGET ,S-TEXT ,WHIGH>>
<SET WIDE <WINGET ,S-TEXT ,WWIDE>>
<FLUSH-OLD-PICTURE>
<SET Y <YCEILING <GET ,YX-TBL 0>>> ;"pic height rounded up"
<SET X <GET ,YX-TBL 1>> ;"pic width"
<COND (<AND .C <PICINF .C ,YX-TBL>>
<SETG NEXT-PIC-CRCNT <GET ,YX-TBL 0>>
<SETG NEXT-PIC-WIDTH <GET ,YX-TBL 1>>)
(ELSE
<SET C 0>
<SETG NEXT-PIC-CRCNT 0>
<SETG NEXT-PIC-WIDTH 0>)>
<SET YLEFT <MAKE-ROOM-FOR .Y>>
<COND (<G=? <+ .X <* ,FONT-X 10>> .WIDE>
<SET CENTER? T>)>
<DISPLAY .P
0
<COND (.CENTER?
<+ 1 </ <- .WIDE .X> 2>>)
(<AND .RIGHT?
<L? .X .WIDE>>
<+ 1 <- .WIDE .X>>)
(ELSE 1)>>
<COND (.CENTER?
<CURSET .YLEFT 1>
<CURSOR-OFF>
<INPUT 1>
<CURSOR-ON>
<SET Y <- <YCEILING .HIGH> ,FONT-Y>>
<COND (<L? <- .HIGH .Y> ,FONT-Y>
<SET Y <- .Y ,FONT-Y>>)>
<SET Y <+ .Y 1>>
<COND (<G? .YLEFT .Y>
<SCROLL ,S-TEXT <- .YLEFT .Y>>
<CURSET .Y 1>)>
<CRLF>)
(ELSE
<SET-MARGIN <COND (<AND .C .CTOP?> ,NEXT-PIC-WIDTH)
(ELSE .X)>
.RIGHT?>
<SET Y </ .Y ,FONT-Y>>
<COND (.C ;"does this picture have a corner?"
<COND (.CTOP? <SETG NEXT-PIC-WIDTH .X>)>
<SETG PIC-SIDE .RIGHT?>
<SET TMP
<- </ <YCEILING ,NEXT-PIC-CRCNT>
,FONT-Y>
1>>
<COND (.CTOP?
<SETG NEXT-PIC-CRCNT <- .Y .TMP 1>>
<WINPUT 0 ,WCRCNT <+ .TMP 1>>)
(ELSE
<SETG NEXT-PIC-CRCNT <+ .TMP 1>>
<WINPUT 0 ,WCRCNT <- .Y .TMP 1>>)>
<WINPUT 0 ,WCRFUNC ,NEXT-MARGIN>)
(ELSE
<WINPUT 0 ,WCRFUNC ,RESET-MARGIN>
<COND (<EQUAL? .P ,P-OAR>
<SET Y <+ .Y 1>>)>
<WINPUT 0 ,WCRCNT .Y>)>)>)>>
<ROUTINE SET-MARGIN (X RIGHT? "AUX" WIDE)
<SET WIDE <WINGET ,S-TEXT ,WWIDE>>
<SET X </ <XCEILING <+ .X 2>> ,FONT-X>>
<COND (.RIGHT?
<MARGIN ,TEXT-MARGIN <* .X ,FONT-X>>)
(ELSE
<MARGIN <* .X ,FONT-X> ,TEXT-MARGIN>)>
<SET WIDE <- </ .WIDE ,FONT-X> .X>>
<PUTB ,P-INBUF 0
<COND (<G? .WIDE ,INBUF-LENGTH>
,INBUF-LENGTH)
(T
.WIDE)>>>
<GLOBAL PIC-SIDE <>>
<GLOBAL NEXT-PIC-WIDTH 0>
<GLOBAL NEXT-PIC-CRCNT 0>
<ROUTINE NEXT-MARGIN ()
<COND (,NEXT-PIC-CRCNT
<SET-MARGIN ,NEXT-PIC-WIDTH ,PIC-SIDE>
<WINPUT ,S-TEXT ,WCRCNT ,NEXT-PIC-CRCNT>
<WINPUT ,S-TEXT ,WCRFUNC ,RESET-MARGIN>
<SETG NEXT-PIC-CRCNT 0>)>
<RTRUE>>
<ROUTINE RESET-MARGIN ()
<WINPUT ,S-TEXT ,WCRCNT 0>
<WINPUT ,S-TEXT ,WCRFUNC 0>
<MARGIN ,TEXT-MARGIN ,TEXT-MARGIN>
<PUTB ,P-INBUF 0 ,INBUF-LENGTH>>
"make sure room for Y pixels, by scrolling and moreing if necessary"
<ROUTINE MAKE-ROOM-FOR (Y "AUX" YLEFT LLEFT (HIGH <WINGET ,S-TEXT ,WHIGH>)
(YLOC <WINGET ,S-TEXT ,WYPOS>)
(XLOC <WINGET ,S-TEXT ,WXPOS>))
<COND (<G? .Y .HIGH> <SET Y .HIGH>)>
<SET YLEFT <+ 1 <- .HIGH .YLOC>>> ;"pixels left to eos"
<COND (<G? .Y .YLEFT> ;"picture won't fit in rest of screen?"
<SET YLEFT <YCEILING <- .Y .YLEFT>>> ;"won't fit by this much"
<SET LLEFT ;"what yloc was when lncnt last was 1"
<- .YLOC
<* <- <WINGET ,S-TEXT ,WLCNT> 1>
,FONT-Y>>>
<COND (<G? .YLEFT .LLEFT> ;"would lose info?"
<WINPUT ,S-TEXT ,WLCNT </ .HIGH ,FONT-Y>>
<CRLF>
<CURSET <- <WINGET ,S-TEXT ,WYPOS> ,FONT-Y> 1>)>
<SCROLL ,S-TEXT .YLEFT>
<SET YLOC <- .YLOC .YLEFT>>
<COND (<L=? .YLOC 0> <SET YLOC 1>)>
<CURSET .YLOC .XLOC>)>
<SET YLEFT <+ .Y <WINGET ,S-TEXT ,WYPOS>>>
<RETURN .YLEFT>>
<END-SEGMENT>

51
picdef.zil Normal file
View File

@ -0,0 +1,51 @@
<CONSTANT P-TITLE 1>
<CONSTANT P-BORDER-LOC 2>
<CONSTANT P-BORDER 3>
<CONSTANT P-BORDER2 4>
<CONSTANT P-TIME 5>
<CONSTANT P-BORDER-3 6>
<CONSTANT P-STORM 7>
<CONSTANT P-BELOW-DECKS 8>
<CONSTANT P-GARDEN 9>
<CONSTANT P-ANJIRO 10>
<CONSTANT P-OMI 11>
<CONSTANT P-YABU 12>
<CONSTANT P-PIT 13>
<CONSTANT P-RODRIGUES 14>
<CONSTANT P-CONFUSION 15>
<CONSTANT P-OVERBOARD 16>
<CONSTANT P-OAR 17>
<CONSTANT P-CLIFF 18>
<CONSTANT P-OSAKA 19>
<CONSTANT P-FALCON 20>
<CONSTANT P-ALVITO 21>
<CONSTANT P-ISHIDO 22>
<CONSTANT P-PROCESSION 23>
<CONSTANT P-MAD-SCENE 24>
<CONSTANT P-IN-DRAG 25>
<CONSTANT P-QUAKE 26>
<CONSTANT P-SWORDS 27>
<CONSTANT P-SEPPUKU 28>
<CONSTANT P-NINJA 29>
<CONSTANT P-EXPLOSION 30>
<CONSTANT P-CREST 31>
<CONSTANT P-MARIKO 32>
<CONSTANT P-BATH 33>
<CONSTANT P-BEACH 34>
<CONSTANT P-BURNED-ERASMUS 35>
<CONSTANT P-VINCK 36>
<CONSTANT P-WARRIOR 37>
<CONSTANT P-MAZE-WALL 38>
<CONSTANT P-MAZE-STREET 39>
<CONSTANT P-MAZE-PARTY 40>
<CONSTANT P-MAZE-CASTLE 41>
<CONSTANT P-MAZE-DOCK 42>
<CONSTANT P-MAZE-FISH 43>
<CONSTANT P-MAZE-BACKGROUND 44>
<CONSTANT P-MAZE-BOX 45>
<CONSTANT P-IN-DRAG-CORNER 46>
<CONSTANT P-EXPLOSION-CORNER 47>
<CONSTANT P-WARRIOR-CORNER 48>
<CONSTANT P-HINT-LOC 49>
<CONSTANT P-HINT-BORDER 50>

1740
quake.zil Normal file

File diff suppressed because it is too large Load Diff

663
qverbs.zil Normal file
View File

@ -0,0 +1,663 @@
"QVERBS for
SHOGUN
(c) Copyright 1988 Infocom, Inc. All Rights Reserved."
<FILE-FLAGS MDL-ZIL?>
<DEFAULTS-DEFINED
PRINT-IS/ARE>
<BEGIN-SEGMENT 0>
<OBJECT WHAT
(LOC GLOBAL-OBJECTS)
(DESC "what")
(SYNONYM WHAT WHO ;WHOM)
(FLAGS NOTHEBIT)
(ACTION WHAT-F)>
<DEFINE WHAT-F ("AUX" OBJ TMP NOT? LOC?)
<SET NOT? <ANDB ,PARSE-NOT <PARSE-FLAGS ,PARSE-RESULT>>>
<SET LOC? <PARSE-LOC ,PARSE-RESULT>>
<COND (<VERB? BE?>
<RFALSE>)
(<EQUAL? <SET OBJ <PARSE-QW ,PARSE-RESULT>>
,W?WHO ,W?WHAT ,W?WHERE ,W?WHY ,W?WHEN ,W?HOW>
<RFALSE>)
(<NOT <EVERYWHERE-VERB?> ;<ABSTRACT-VERB?>>
<TELL
"That's precisely the sort of question you'll have to answer for
yourself." CR>
<RTRUE>)
(<EQUAL? ,PRSI ,INTPP>
<COND (<AND <SET OBJ <P-PP-OBJ>>
<NOT .NOT?>>
<SET TMP <OR <P-PP-PREP> <PP-PREP .LOC?>>>
<COND (<EQUAL? .TMP ,W?BEHIND>
<PERFORM ,V?LOOK-BEHIND .OBJ>
<RTRUE>)
(<EQUAL? .TMP ,W?DOWN>
<PERFORM ,V?LOOK-DOWN .OBJ>
<RTRUE>)
(<EQUAL? .TMP ,W?IN ,W?ON ,W?THROUGH>
<PERFORM ,V?LOOK-INSIDE .OBJ>
<RTRUE>)
(<EQUAL? .TMP ,W?UNDER>
<PERFORM ,V?LOOK-UNDER .OBJ>
<RTRUE>)>)>)
;(<EQUAL? ,PRSI ,INTADJ>
<SET ADJ? <PARSE-ADJ ,PARSE-RESULT>>
<COND (<IS-PRSO-ADJ? .ADJ?>
<COND (.NOT? <TELL "Wrong,">)
(ELSE <TELL "Right,">)>
<PRSO-IS <>>)
(ELSE
<COND (.NOT? <TELL "Right,">)
(ELSE <TELL "Wrong,">)>
<PRSO-IS T>)>
<TELL " ">
<PRINTB .ADJ?>
<TELL "." CR>)
;(ELSE
<TELL "So you think">
<PRSO-IS .NOT?>
<COND (,PRSI <TELL " " A ,PRSI>)>
<TELL "." CR>)>>
<DEFINE TELL-Q-WORD ("AUX" WD)
<COND (<VERB? BE?>
<TELL "if">)
(<EQUAL? <SET WD <PARSE-QW ,PARSE-RESULT>>
,W?WHO ,W?WHAT ,W?WHERE ,W?WHY ,W?WHEN ,W?HOW>
<PRINTB .WD>)
(T
<TELL "whether">)>>
<DEFINE P-NEGATIVE? ()
<ANDB ,PARSE-NOT <PARSE-FLAGS ,PARSE-RESULT>>>
<DEFINE TRY-QCONTEXT? ("AUX" W)
<COND (<AND ,QCONTEXT
<IN? ,QCONTEXT ,HERE>
<NOT <EQUAL? ,QCONTEXT ,WINNER>>
<OR <PAST-TENSE?>
<AND <NOT <EQUAL? ,QCONTEXT ,PRSO>>
<NOT <VERB? ASK-ABOUT>>
<NOT <AND <VERB? TELL-ABOUT>
<EQUAL? ,PRSO ,ME>>>>>>
<SET W ,WINNER>
<SETG WINNER ,QCONTEXT>
<PERFORM ,PRSA ,PRSO ,PRSI>
<SETG WINNER .W ;,PLAYER>
<RTRUE>)>>
<DEFINE PRE-BE ()
<COND (<TRY-QCONTEXT?>
<RTRUE>)>>
<SYNTAX BE OBJECT (MOBY) = V-BE PRE-BE>
<SYNTAX BE OBJECT (MOBY) OBJECT (MOBY) = V-BE PRE-BE>
<SYNTAX BE? OBJECT (MOBY) = V-BE?>
<SYNTAX BE? OBJECT (MOBY) OBJECT (MOBY) = V-BE?>
<DEFINE V-BE ("AUX" TMP NOT? ADJ? LOC? OBJ PREP)
<SET NOT? <ANDB ,PARSE-NOT <PARSE-FLAGS ,PARSE-RESULT>>>
<SET ADJ? <PARSE-ADJ ,PARSE-RESULT>>
<SET LOC? <PARSE-LOC ,PARSE-RESULT>>
<COND (<OR <VERB? BE? WHO WHAT WHERE WHY WHEN HOW>
<EQUAL? <SET TMP <PARSE-QW ,PARSE-RESULT>>
,W?WHO ,W?WHAT ,W?WHERE ,W?WHY ,W?WHEN ,W?HOW>>
<COND (<TRY-QCONTEXT?>
<RTRUE>)>
<COND (<EQUAL? ,PRSI ,INTADJ>
<COND (<EQUAL? ,PRSO ,ME ,PLAYER>
<COND (<VERB? BE?>
<TELL "You">)
(T
<PRINT ,WHO-KNOWS-STRING>
<TELL-Q-WORD>
<TELL " you">)>
<COND (<IS-PRSO-ADJ? .ADJ?>
<TELL " are ">)
(ELSE <TELL " aren't ">)>)
(ELSE
<COND (<VERB? BE?>
<TELL-CTHE ,PRSO>)
(T
<PRINT ,WHO-KNOWS-STRING>
<TELL-Q-WORD>
<TELL " ">
<TELL-THE ,PRSO>)>
<PRINT-IS/ARE ,PRSO>
<COND (<NOT <IS-PRSO-ADJ? .ADJ?>>
<TELL "n't">)>
<TELL " ">)>
<PRINTB .ADJ?>
<TELL "." CR>)
(<EQUAL? ,PRSI ,INTPP>
<COND (<AND <SET PREP <P-PP-PREP>>
<SET OBJ <P-PP-OBJ>>>
<COND (<VERB? BE?>
<PRSO-IS <NOT <RIGHT-PREP? .PREP ,PRSO .OBJ>>
T>
<TELL " ">
<PRINTB .PREP>
<TELL " ">
<TELL-THE .OBJ>
<TELL "." CR>)
(ELSE
<PRINT ,WHO-KNOWS-STRING>
<TELL-Q-WORD>
<PRSO-IS .NOT?>
<TELL " ">
<PRINTB .PREP>
<TELL " ">
<TELL-THE .OBJ>
<TELL "." CR>)>)
(ELSE
<PRINT ,WHO-KNOWS-STRING>
<TELL-Q-WORD>
<PRSO-IS .NOT?>
<TELL " ">
<PRINTB <PP-PREP .LOC?>>
<TELL " ">
<NP-PRINT <PP-NOUN .LOC?>>
<TELL "." CR>)>)
(<PARSE-SUBJ ,PARSE-RESULT>
<WHO-KNOWS>)
(<AND <NOT ,PRSI> <EQUAL? <PARSE-QW ,PARSE-RESULT> ,W?WHERE>>
<COND (<NOT <EQUAL? ,PRSO <> ,ROOMS>>
<SET LOC? <LOC ,PRSO>>)
(T <SET LOC? <>>)>
<COND (<NOT .LOC?>
<TELL "That's an excellent question." CR>)
(<IN? ,PRSO ,HERE>
<PRSO-IS <> T>
<TELL " here." CR>)
(<EQUAL? .LOC? ,GENERIC-OBJECTS>
<TELL "You don't know where ">
<TELL-THE ,PRSO>
<PRINT-IS/ARE ,PRSO>
<TELL "." CR>)
(<EQUAL? .LOC? ,GLOBAL-OBJECTS>
<TELL "No doubt ">
<TELL-THE ,PRSO>
<PRINT-IS/ARE ,PRSO>
<TELL " around here somewhere." CR>)
(<AND <EQUAL? .LOC? ,LOCAL-GLOBALS>
<GLOBAL-IN? ,PRSO ,HERE>>
<TELL-CTHE ,PRSO>
<PRINT-IS/ARE ,PRSO>
<TELL " nearby." CR>)
(<FSET? .LOC? ,PERSONBIT>
<TELL-CTHE .LOC?>
<TELL " has ">
<TELL-THE ,PRSO>
<TELL "." CR>)
(<EQUAL? <META-LOC ,PRSO> ,HERE>
<TELL-CTHE ,PRSO>
<PRINT-IS/ARE ,PRSO>
<TELL " in ">
<TELL-THE .LOC?>
<TELL "." CR>)
(<IN? .LOC? ,ROOMS>
<TELL-CTHE ,PRSO>
<PRINT-IS/ARE ,PRSO>
<TELL " probably ">
<COND (<FSET? ,PRSO ,TOUCHBIT>
<TELL
"still in the place called \"" D .LOC? ".\"" CR>)
(ELSE
<COND (<NOT <FSET? ,PRSO ,PERSONBIT>>
<TELL "lying ">)>
<TELL "around somewhere." CR>)>)
(ELSE
<PRINT ,WHO-KNOWS-STRING>
<TELL "where ">
<TELL-THE ,PRSO>
<PRINT-IS/ARE ,PRSO>
<TELL "." CR>)>)
(ELSE
<PRINT ,WHO-KNOWS-STRING>
<TELL-Q-WORD>
<COND (<NOT <EQUAL? ,PRSO <> ,ROOMS>>
<PRSO-IS .NOT?>
<COND (,PRSI <TELL " " A ,PRSI>)>)>
<TELL "." CR>)>)
(ELSE
<COND (<EQUAL? ,PRSI ,INTADJ>
<COND (<IS-PRSO-ADJ? .ADJ?>
<COND (.NOT? <TELL "Wrong,">)
(ELSE <TELL "Right,">)>
<PRSO-IS <>>)
(ELSE
<COND (.NOT? <TELL "Right,">)
(ELSE <TELL "Wrong,">)>
<PRSO-IS T>)>
<TELL " ">
<PRINTB .ADJ?>
<TELL "." CR>)
(<EQUAL? ,PRSI ,INTPP>
<TELL "So, you say">
<PRSO-IS .NOT?>
<TELL " ">
<COND (<SET TMP <P-PP-PREP>>
<PRINTB .TMP>)
(ELSE
<PRINTB <PP-PREP .LOC?>>)>
<TELL " ">
<COND (<SET TMP <P-PP-OBJ>>
<TELL-THE .TMP>)
(ELSE <NP-PRINT <PP-NOUN .LOC?>>)>
<TELL "." CR>)
(<EQUAL? ,P-PRSA-WORD ,W?BE>
<COND (<EQUAL? ,PRSO ,WINNER>
<TELL-CTHE ,PRSO>
<TELL " is already " "that" "." CR>)
(T <TELL "That would take a bit of magic." CR>)>)
(ELSE
<TELL "So you think">
<PRSO-IS .NOT?>
<COND (,PRSI <TELL " " A ,PRSI>)>
<TELL "." CR>)>)>>
<DEFINE RIGHT-PREP? (PREP OBJ CONT)
<COND (<NOT <IN? .OBJ .CONT>> <RFALSE>)
(<EQUAL? .PREP ,W?IN ,W?INSIDE>
<COND (<SEE-INSIDE? .CONT>
<RTRUE>)
(ELSE <RFALSE>)>)
(<AND <EQUAL? .PREP ,W?ON>
<OR <FSET? .CONT ,SURFACEBIT>
;<FSET? .CONT ,FURNITURE>>>
<RTRUE>)>>
<DEFINE V-BE? ()
<V-BE>>
<SYNTAX HOW OBJECT (MOBY) (FIND RLANDBIT) = V-HOW>
<SYNTAX HOW OBJECT (MOBY) OBJECT (MOBY) = V-HOW>
<SYNTAX WHAT OBJECT (MOBY) (FIND RLANDBIT) = V-WHAT>
<SYNTAX WHAT OBJECT (MOBY) OBJECT (MOBY) = V-WHAT>
<SYNTAX WHEN OBJECT (MOBY) (FIND RLANDBIT) = V-WHEN>
<SYNTAX WHEN OBJECT (MOBY) OBJECT (MOBY) = V-WHEN>
<SYNTAX WHERE OBJECT (MOBY) (FIND RLANDBIT) = V-WHERE PRE-WHERE>
<SYNTAX WHERE OBJECT (MOBY) OBJECT (MOBY) = V-WHERE PRE-WHERE>
<SYNTAX WHO OBJECT (MOBY) (FIND RLANDBIT) = V-WHO>
<SYNTAX WHO OBJECT (MOBY) OBJECT (MOBY) = V-WHO>
<SYNONYM WHO WHOM>
<SYNTAX WHY OBJECT (MOBY) (FIND RLANDBIT) = V-WHY>
<SYNTAX WHY OBJECT (MOBY) OBJECT (MOBY) = V-WHY>
<SYNTAX WILL OBJECT (MOBY) ;(FIND RLANDBIT) = V-WILL?>
<SYNTAX WOULD OBJECT (MOBY) ;(FIND RLANDBIT) = V-WOULD?>
<DEFINE V-WHO ()
<COND (<PRSO? ,ROOMS>
<MORE-SPECIFIC>)
(<NOT ,PRSI>
<TELL
"You don't know anything special about " THE ,PRSO "." CR>)
(ELSE <V-BE>)>>
<DEFINE V-WHAT ()
<V-WHO>>
<DEFINE PRE-WHERE ()
<COND (<AND <ZERO? ,PRSS> <ZERO? ,PRSQ>>
<PERFORM ,V?FIND ,PRSO ,PRSI>
<RTRUE>)>>
<DEFINE V-WHERE ()
<COND (<PRSO? ,ROOMS>
<MORE-SPECIFIC>)
(ELSE <V-BE>)>>
<DEFINE V-WHEN ()
<COND (<PRSO? ,ROOMS>
<MORE-SPECIFIC>)
(ELSE <V-BE>)>>
<DEFINE V-WHY ()
<COND (<PRSO? ,ROOMS>
<MORE-SPECIFIC>)
(ELSE <V-BE>)>>
<DEFINE V-HOW ()
<COND (<PRSO? ,ROOMS>
<MORE-SPECIFIC>)
(ELSE <V-BE>)>>
<CONSTANT ADJ-TABLE
<LTABLE <VOC "OUTSIDE" <> ;ADJ>
OUTSIDE?
;<VOC "INSIDE" ADJ>
;INSIDE?
<VOC "OPEN" ADJ>
OPEN?
<VOC "CLOSED" ADJ>
Q-CLOSED?
<VOC "LOCKED" ADJ>
LOCKED?
<VOC "UNLOCKED" ADJ>
UNLOCKED?
<VOC "DEAD" ADJ>
DEAD?
<VOC "ALIVE" ADJ>
ALIVE?
<VOC "QUIET" ADJ>
QUIET?>>
<DEFINE QUIET? (OBJ)
<RTRUE>>
<DEFINE OUTSIDE? (OBJ)
<FSET? ,HERE ,OUTSIDE>>
;<DEFINE INSIDE? (OBJ)
<NOT <FSET? ,HERE ,OUTSIDE>>>
<DEFINE OPEN? (OBJ)
<AND <OR <FSET? .OBJ ,OPENABLE>
<FSET? .OBJ ,DOORBIT>>
<FSET? .OBJ ,OPENBIT>>>
<DEFINE Q-CLOSED? (OBJ)
<AND <OR <FSET? .OBJ ,OPENABLE>
<FSET? .OBJ ,DOORBIT>>
<NOT <FSET? .OBJ ,OPENBIT>>>>
<DEFINE LOCKED? (OBJ)
<AND <FSET? .OBJ ,DOORBIT>
<FSET? .OBJ ,LOCKED>>>
<DEFINE UNLOCKED? (OBJ)
<AND <FSET? .OBJ ,DOORBIT>
<NOT <FSET? .OBJ ,LOCKED>>>>
<DEFINE DEAD? (OBJ)
<OR <NOT <FSET? .OBJ ,PERSONBIT>>
<FSET? .OBJ ,DEAD>>>
<DEFINE ALIVE? (OBJ)
<AND <FSET? .OBJ ,PERSONBIT>
<NOT <FSET? .OBJ ,DEAD>>>>
<DEFINE PRSO-IS (NOT? "OPT" (CAP? <>))
<COND (<EQUAL? ,PRSO ,ME ,PLAYER>
<COND (.CAP? <TELL "You">)
(ELSE <TELL " you">)>
<TELL " are">
<COND (.NOT? <TELL "n't">)>)
(ELSE
<COND (.CAP? <TELL-CTHE ,PRSO>)
(T <TELL " "> <TELL-THE ,PRSO>)>
<PRINT-IS/ARE ,PRSO>
<COND (.NOT? <TELL "n't">)>)>>
<DEFAULT-DEFINITION PRINT-IS/ARE
<DEFINE PRINT-IS/ARE (OBJ)
<COND (<OR <FSET? .OBJ ,PLURAL>
<EQUAL? .OBJ ,BLACKTHORNE ,ME ,YOU>>
<TELL " are">)
(ELSE <TELL " is">)>>>
<DEFINE IS-PRSO-ADJ? (ADJ "AUX" TMP)
<COND (<AND <SET TMP <GETPT ,PRSO ,P?ADJECTIVE>>
<INTBL? .ADJ .TMP </ <PTSIZE .TMP> 2>>>
<RTRUE>)
(<AND <SET TMP <INTBL? .ADJ ,ADJ-TABLE <GET ,ADJ-TABLE 0>>>
<APPLY <GET .TMP 1> ,PRSO>>
<RTRUE>)>>
<DEFINE PP? (P N "AUX" (TMP <PARSE-LOC ,PARSE-RESULT>))
<COND (<NOT .TMP> <RFALSE>)
(<NOT <AND .P <EQUAL? .P <P-PP-PREP>>>>
<RFALSE>)
(<NOT <AND .N <EQUAL? .N <P-PP-OBJ>>>>
<RFALSE>)
(ELSE <RTRUE>)>>
"does a bear shit in the woods?"
"RLANDBIT would allow single-word sentence!"
<SYNTAX CAN OBJECT (MOBY) ;(FIND RLANDBIT) = V-CAN?>
<SYNTAX COULD OBJECT (MOBY) ;(FIND RLANDBIT) = V-COULD?>
<SYNTAX DO OBJECT (MOBY) ;(FIND RLANDBIT) = V-DO?>
<SYNTAX MAY OBJECT (MOBY) ;(FIND RLANDBIT) = V-MAY?>
<SYNTAX MIGHT OBJECT (MOBY) ;(FIND RLANDBIT) = V-MIGHT?>
<SYNTAX MUST OBJECT (MOBY) ;(FIND RLANDBIT) = V-MUST?>
<SYNTAX SHOULD OBJECT (MOBY) ;(FIND RLANDBIT) = V-SHOULD?>
<DEFINE V-STATEMENT () <V-DO?>>
<CONSTANT WHO-KNOWS-STRING "It's not easy to tell "
;"The \"narrator\" can't tell you ">
<DEFINE WHO-KNOWS ("OPT" (WD <PARSE-QUERY ,PARSE-RESULT>) "AUX" OBJ SUBJ)
<COND (<AND <EQUAL? <PARSE-QW ,PARSE-RESULT> ,W?WHO ,W?WHAT>
<SET OBJ <VERB-ONE <WORD-VERB-STUFF ,P-PRSA-WORD>>>
<GET-SYNTAX .OBJ 1 0 T>
<SET OBJ <DETERMINE-OBJ <> 1 T>>
<SET OBJ <NOUN-PHRASE-OBJ1 .OBJ>>>
<TELL "Perhaps">)
(T
<SET OBJ <>>
<PRINT ,WHO-KNOWS-STRING>
<TELL-Q-WORD>)>
<SET SUBJ <PARSE-SUBJ ,PARSE-RESULT>>
<COND (<T? .SUBJ>
<SET SUBJ <NOUN-PHRASE-OBJ1 .SUBJ>>)
(<NOT <EQUAL? ,PRSO <> ,ROOMS>>
<SET SUBJ ,PRSO>)
(T
<TELL "." CR>
<RTRUE>)>
<TELL " ">
<COND (<EQUAL? .SUBJ ,ME ,PLAYER>
<TELL "you">)
(ELSE
<TELL-THE .SUBJ>)>
<COND (<T? .WD>
<COND (<OR <NOT <EQUAL? .WD ,W?DO ,W?DOES ,W?DID>>
<NOT <PARSE-SUBJ ,PARSE-RESULT>>>
<TELL " ">
<PRINTB .WD>)>)>
<COND (<T? <PARSE-SUBJ ,PARSE-RESULT>>
<TELL " ">
;<PRINT-VOCAB-WORD ,P-PRSA-WORD>
<COND (<T? .WD>
<COND (<EQUAL? .WD ,W?DID>
;<BAND ,PAST-TENSE <WORD-FLAGS .WD>>
;"Look for past-tense form in vocabulary:"
<PROG ((V <ZREST ,VOCAB <+ 1 <GETB ,VOCAB 0>>>)
(M <BOR *200* <GETB .V 0>>) N)
<COND (<EQUAL? ,P-PRSA-WORD ,W?GET>
<TELL "got">)
(<AND <SET N <INTBL? ,P-PRSA-WORD <ZREST .V 9 ;3>
<ZGET <ZREST .V 1> 0> .M>>
<BTST <ZGET .N 1> ,PAST-TENSE>>
<PRINT-VOCAB-WORD .N>)
(T
<PRINT-VOCAB-WORD ,P-PRSA-WORD>
<TELL "ed">)>>)
(T
<PRINT-VOCAB-WORD ,P-PRSA-WORD>
<COND (<AND <EQUAL? .WD ,W?DO ,W?DOES>
<NOT <EQUAL? .SUBJ ,ME ,PLAYER>>
<NOT <FSET? .SUBJ ,PLURAL>>>
<TELL "s">)>)>
<COND (<T? .OBJ>
<TELL " ">
<COND (<EQUAL? .OBJ .SUBJ>
<COND (<NOT <FSET? .OBJ ,PERSONBIT>>
<TELL "it">)
(<FSET? .OBJ ,FEMALE>
<TELL "her">)
(T
<TELL "him">)>
<TELL "self">)
(T
<TELL-THE .OBJ>)>)
(T
<ECHO-NOUNS>)>)
(T <PRINT-VOCAB-WORD ,P-PRSA-WORD>)>)>
<TELL "." CR>>
<DEFINE ECHO-NOUNS ("AUX" WD)
<COND (<NOT <EQUAL? ,PRSO 0 ,WHAT ,NOT-HERE-OBJECT>>
<COND (<SET WD <PARSE-PARTICLE1 ,PARSE-RESULT>>
<TELL " ">
<PRINTB .WD>)>
<TELL " ">
<TELL-THE ,PRSO>)>
<COND (<NOT <EQUAL? ,PRSI 0 ,WHAT ,NOT-HERE-OBJECT>>
<COND (<SET WD <PARSE-PARTICLE2 ,PARSE-RESULT>>
<TELL " ">
<PRINTB .WD>)>
<TELL " ">
<TELL-THE ,PRSI>)>>
<DEFINE V-CAN? () <WHO-KNOWS ,W?CAN>>
<DEFINE V-MAY? () <WHO-KNOWS ,W?MAY>>
<DEFINE V-DO? ()
<COND (<TRY-QCONTEXT?>
<RTRUE>)
(<NOT <BTST <PARSE-FLAGS ,PARSE-RESULT> ,PARSE-QUESTION>>
<COND (<NOT ,PRSS>
<MORE-SPECIFIC>
<RTRUE>)
(ELSE
<TELL "So you think">
<COND (<EQUAL? ,PRSS ,ME ,PLAYER>
<TELL " you ">
<COND (<ANDB ,PARSE-NOT <PARSE-FLAGS ,PARSE-RESULT>>
<TELL "don't ">)>)
(T
<COND ;(.CAP? <TELL-CTHE ,PRSS>)
(T <TELL " "> <TELL-THE ,PRSS> <TELL " ">)>
<COND (<ANDB ,PARSE-NOT <PARSE-FLAGS ,PARSE-RESULT>>
<TELL "doesn't ">)>)>
<PRINT-VOCAB-WORD ,P-PRSA-WORD>
<ECHO-NOUNS>
<TELL "." CR>)>)
(T
<WHO-KNOWS ;<COND ;(<BAND ,PAST-TENSE <PARSE-FLAGS ,PARSE-RESULT>>
,W?DID)
(T ,W?DOES)>>)>>
<DEFINE V-COULD? () <WHO-KNOWS ,W?COULD>>
<DEFINE V-WOULD? () <WHO-KNOWS ,W?WOULD>>
<DEFINE V-SHOULD? () <WHO-KNOWS ,W?SHOULD>>
<DEFINE V-MIGHT? () <WHO-KNOWS ,W?MIGHT>>
<DEFINE V-WILL? () <WHO-KNOWS ,W?WILL>>
<DEFINE V-MUST? () <WHO-KNOWS ,W?MUST>>
<DEFINE QUESTION-VERB? ("AUX" TMP) ;"add more later..."
<OR <EQUAL? <SET TMP <PARSE-QW ,PARSE-RESULT>>
,W?WHO ,W?WHAT ,W?WHERE ,W?WHY ,W?WHEN ,W?HOW>
<VERB? BE? CAN? COULD? DO? MAY? MIGHT? MUST? SHOULD? WILL? WOULD?>>>
"PERFORM uses two additional GLOBALs, 'q-verb' and subject, each of
which can be false. Examples:
'IS THE POPE CATHOLIC'
becomes
<SETG PRSQ T>
<PERFORM ,V?BE ,POPE ,INTADJ ;T>
'DOES THE GOVERNMENT TAKE MONEY FROM ME'
becomes
<SETG PRSQ ,V?DO>
<SETG PRSS ,GOVERNMENT>
<PERFORM ,V?TAKE ,MONEY ,ME>
'WHY DOES THE GOVERNMENT TAKE MONEY FROM ME'
becomes
<SETG PRSQ ,V?WHY>
<SETG PRSS ,GOVERNMENT>
<PERFORM ,V?TAKE ,MONEY ,ME>
When PERFORM notices the presence of a q-verb, it calls action routines
in this order:
WINNER
SUBJECT
; M-BEG
Q-PREACTION (from the following table)
; OBJECT #2
; OBJECT #1
Q-ACTION (ditto) or V-STATEMENT
PERFORM also handles statements, for example:
'MY NAME IS ARTHUR DENT'
becomes
<PERFORM ,V?IS ,NAME ,ARTHUR>
"
<CONSTANT QACTIONS <PLTABLE
V-BE V-BE? 0
V-DISEMBARK V-DISEMBARK? 0
V-DROP V-DROP? PRE-DROP?
V-TAKE V-TAKE? PRE-TAKE?
;"and so on">>
<DEFINE PRE-DROP? ()
<COND (<EQUAL? ,PRSO <LOC ,PRSS>>
;<SETG PRSQ ,V?DISEMBARK>
<PERFORM ,V?DISEMBARK ;,PRSA ,PRSO ,PRSI ;,V?DISEMBARK ;,PRSS>
<RTRUE>)>>
<DEFINE V-DROP? ()
<COND (<EQUAL? ,PRSO ,ROOMS>
<PRINT "You aren't ">
<TELL "hanging from anything." CR>)>>
<DEFINE V-DISEMBARK? ("AUX" AV)
<SET AV <LOC ,PRSS>>
<COND (<EQUAL? ,PRSO <> ,ROOMS>
<COND (<AND .AV <NOT <IN? .AV ,ROOMS>>>
<PERFORM ,PRSA .AV ,PRSI ;,PRSQ ;,PRSS>
<RTRUE>)
(ELSE
<PRINT "You aren't ">
<TELL "in anything." CR>)>)
(<AND .AV <NOT <IN? .AV ,ROOMS>>>
<COND (<AND <NOT <EQUAL? .AV ,PRSO>>
<NOT <HELD? .AV ,PRSO>>>
<PRINT "You already are">
<COND (<FSET? .AV ,SURFACEBIT> <TELL " on ">)
(ELSE <TELL " in ">)>
<TELL-THE .AV>
<TELL "!" CR>
<RTRUE>)>)
(<LOC ,PRSO>
;<SETG PRSQ ,V?TAKE>
<PERFORM ,V?TAKE ;,PRSA ,PRSO ,PRSI ;,V?TAKE ;,PRSS>
<RTRUE>)
(ELSE
<PRINT "It's not in anything.">
<CRLF>)>>
<DEFINE PRE-TAKE? ()
<COND (<NOT ,PRSI>
<PRE-TAKE>)>>
<DEFINE V-TAKE? ()
<COND (<ZERO? <PARSE-QW ,PARSE-RESULT>>
<TELL "Seems reasonable." CR>)>>
<END-SEGMENT>

277
record.zil Normal file
View File

@ -0,0 +1,277 @@
"RECORD for
SHOGUN
(c) Copyright 1988 Infocom, Inc. All Rights Reserved."
<BEGIN-SEGMENT RECORD>
<SYNTAX \#RANDOM OBJECT = V-$RANDOM>
<SYNTAX \#COMMAND = V-$COMMAND>
<SYNTAX \#RECORD = V-$RECORD>
<SYNTAX \#UNRECORD = V-$UNRECORD>
<ROUTINE V-$COMMAND ()
<DIRIN ,D-COMMAND-FILE>
<RTRUE>>
<ROUTINE V-$RANDOM ()
<COND (<NOT <PRSO? ,INTNUM>>
<TELL "Illegal call to #RANDOM." CR>)
(T
<RANDOM <- 0 ,P-NUMBER>>
<RTRUE>)>>
<ROUTINE V-$RECORD ()
<DIROUT ,D-RECORD-ON> ;"all READS and INPUTS get sent to command file"
<RTRUE>>
<ROUTINE V-$UNRECORD ()
<DIROUT ,D-RECORD-OFF>
<RTRUE>>
"debugging help"
;<SYNTAX $P OBJECT = V-$P>
;<ROUTINE V-$P ()
<COND (<PICINF ,P-NUMBER ,YX-TBL>
<TELL N <GET ,YX-TBL 0> "x" N <GET ,YX-TBL 1> CR>)
(ELSE <TELL "No such picture." CR>)>>
;<SYNTAX $D OBJECT = V-$D>
;<ROUTINE V-$D ()
<COND (<PICINF ,P-NUMBER ,YX-TBL>
<RESET-MARGIN>
<CLEAR ,S-TEXT>
<CENTER-PIC ,P-NUMBER>
<INPUT 1>)
(ELSE <TELL "No such picture." CR>)>>
;<SYNTAX $W OBJECT = V-$W>
;<ROUTINE V-$W ("AUX" WIN ATTRS TMP)
<SET WIN ,P-NUMBER>
<TELL "#" N .WIN
" at " N <WINGET .WIN ,WTOP>
"," N <WINGET .WIN ,WLEFT>
"; size " N <WINGET .WIN ,WHIGH>
"x" N <WINGET .WIN ,WWIDE>>
<COND (<OR <NOT <ZERO? <WINGET .WIN ,WLMARGIN>>>
<NOT <ZERO? <WINGET .WIN ,WRMARGIN>>>>
<TELL " (" N <WINGET .WIN ,WLMARGIN>
"<->" N <WINGET .WIN ,WRMARGIN> ")">)>
<COND (<NOT <ZERO? <SET TMP <WINGET .WIN ,WHLIGHT>>>>
<TELL "; HL=" N .TMP>)>
<COND (<NOT <EQUAL? <SET TMP <WINGET .WIN ,WCOLOR>> 257>>
<TELL "; f,b=" N <LOW-BYTE .TMP> "," N <HIGH-BYTE .TMP>>)>
<COND (<NOT <EQUAL? <SET TMP <WINGET .WIN ,WFONT>> 0>>
<TELL "; F=" N .TMP>)>
<SET TMP <WINGET .WIN ,WFSIZE>>
<COND (<OR <EQUAL? .WIN ,S-FULL>
<NOT <EQUAL? <HIGH-BYTE .TMP> ,FONT-Y>>
<NOT <EQUAL? <LOW-BYTE .TMP> ,FONT-X>>>
<TELL "; FS=" N <HIGH-BYTE .TMP> "x" N <HIGH-BYTE .TMP>>)>
<TELL "; cursor " N <WINGET .WIN ,WYPOS>
"," N <WINGET .WIN ,WXPOS>
"; line " N <WINGET .WIN ,WLCNT>
"; ">
<COND (<AND <NOT <ZERO? <SET TMP <WINGET .WIN ,WCRCNT>>>>
<NOT <ZERO? <WINGET .WIN ,WCRFUNC>>>>
<TELL " CR=" N .TMP>)>
<SET ATTRS <WINGET .WIN ,WATTRS>>
<COND (<ZERO? <BAND .ATTRS ,A-WRAP>> <TELL "-">)
(ELSE <TELL "+">)>
<TELL "W,">
<COND (<ZERO? <BAND .ATTRS ,A-SCROLL>> <TELL "-">)
(ELSE <TELL "+">)>
<TELL "S,">
<COND (<ZERO? <BAND .ATTRS ,A-SCRIPT>> <TELL "-">)
(ELSE <TELL "+">)>
<TELL "P,">
<COND (<ZERO? <BAND .ATTRS ,A-BUFFER>> <TELL "-">)
(ELSE <TELL "+">)>
<TELL "B">
<CRLF>>
;<DEFMAC TELLBIT ('BIT)
<FORM COND (<FORM FSET? ',PRSO <CHTYPE .BIT GVAL>>
<FORM TELL <STRING " " <SPNAME .BIT>>>)>>
;<SYNTAX $X OBJECT (MOBY) = V-$X>
;<ROUTINE V-$X ("AUX" TMP)
<COND (<PRSO? INTNUM>
<TELL N ,P-NUMBER "/ " N <GETB ,P-NUMBER 0>>)
(ELSE <TELL "??">)>
<CRLF>>
;<SYNTAX $G OBJECT (MOBY) = V-$G PRE-$G>
;<ROUTINE PRE-$G ("AUX" TMP)
<COND (<AND <PRSO? INTNUM>
<G? ,P-NUMBER 15>
<L? ,P-NUMBER 256>>
<TELL "Global " N ,P-NUMBER "/ " N <VALUE ,P-NUMBER>>)
(ELSE <TELL "??">)>
<CRLF>>
;<ROUTINE V-$G () <RTRUE>>
;<SYNTAX $I OBJECT (MOBY) = V-$I PRE-$I>
;<ROUTINE PRE-$I ("AUX" TMP)
<COND (<PRSO? INTNUM> <SETG PRSO ,P-NUMBER>)>
<TELL-OBJ ,PRSO>
<TELL "; in ">
<COND (<SET TMP <LOC ,PRSO>>
<TELL-OBJ .TMP>)
(ELSE <TELL "limbo">)>
<COND (<FIRST? ,PRSO>
<TELL "; contains">
<REPEAT ((F <FIRST? ,PRSO>))
<TELL " ">
<TELL-OBJ .F>
<COND (<NOT <SET F <NEXT? .F>>>
<RETURN>)>>)>
<TELL "; flags">
<TELLBIT AN>
<TELLBIT BODY-PART>
<TELLBIT CANT-HOLD>
<TELLBIT CONTBIT>
<TELLBIT DEAD>
<TELLBIT DONT-ALL>
<TELLBIT DONT-IT>
<TELLBIT DOORBIT>
<TELLBIT DUTCHBIT>
<TELLBIT ENGLISHBIT>
<TELLBIT FEMALE>
<TELLBIT FOODBIT>
<TELLBIT FURNITURE>
<TELLBIT INVISIBLE>
<TELLBIT JAPANESEBIT>
<TELLBIT LIGHTBIT>
<TELLBIT LOCKABLE>
<TELLBIT LOCKED>
<TELLBIT NDESCBIT>
<TELLBIT NOABIT>
<TELLBIT NOTHEBIT>
<TELLBIT ONBIT>
<TELLBIT OPENABLE>
<TELLBIT OPENBIT>
<TELLBIT OUTSIDE>
<TELLBIT PERSON>
<TELLBIT PLURAL>
<TELLBIT PORTUGUESEBIT>
<TELLBIT READBIT>
<TELLBIT RLANDBIT>
<TELLBIT RMUNGBIT>
<TELLBIT SCOREBIT>
<TELLBIT SEARCHBIT>
<TELLBIT SITTING>
<TELLBIT SPANISHBIT>
<TELLBIT SURFACEBIT>
<TELLBIT TAKEBIT>
<TELLBIT THE>
<TELLBIT TOOLBIT>
<TELLBIT TOUCHBIT>
<TELLBIT TRANSBIT>
<TELLBIT TRYTAKEBIT>
<TELLBIT VEHBIT>
<TELLBIT WEAPONBIT>
<TELLBIT WEARABLE>
<TELLBIT WEARBIT>
<TELL ";">
<REPEAT ((P 0))
<COND (<ZERO? <SET P <NEXTP ,PRSO .P>>> <RETURN>)
(ELSE
<TELL " ">
<TELLPROP .P>
<TELL "(" N <PTSIZE <GETPT ,PRSO .P>> ")">)>>
<CRLF>>
;<ROUTINE V-$I () <RTRUE>>
;<ROUTINE TELL-OBJ (TMP)
<TELL N .TMP ":\"">
<COND (<EQUAL? .TMP ,ROOMS>
<TELL "ROOMS">)
(<EQUAL? .TMP ,GLOBAL-OBJECTS>
<TELL "GLOBAL-OBJECTS">)
(<EQUAL? .TMP ,LOCAL-GLOBALS>
<TELL "LOCAL-GLOBALS">)
(<EQUAL? .TMP ,GENERIC-OBJECTS>
<TELL "GENERIC-OBJECTS">)
(ELSE <TELL D .TMP>)>
<TELL "\"">>
;<ROUTINE TELLPROP (P)
<COND (<EQUAL? .P ,P?NORTH> <TELL "NORTH">) ;63
(<EQUAL? .P ,P?NE> <TELL "NE">) ;62
(<EQUAL? .P ,P?EAST> <TELL "EAST">) ;61
(<EQUAL? .P ,P?SE> <TELL "SE">) ;60
(<EQUAL? .P ,P?SOUTH> <TELL "SOUTH">) ;59
(<EQUAL? .P ,P?SW> <TELL "SW">) ;58
(<EQUAL? .P ,P?WEST> <TELL "WEST">) ;57
(<EQUAL? .P ,P?NW> <TELL "NW">) ;56
(<EQUAL? .P ,P?UP> <TELL "UP">) ;55
(<EQUAL? .P ,P?DOWN> <TELL "DOWN">) ;54
(<EQUAL? .P ,P?IN> <TELL "IN">) ;53
(<EQUAL? .P ,P?OUT> <TELL "OUT">) ;52
(<EQUAL? .P ,P?FORE> <TELL "FORE">) ;51
(<EQUAL? .P ,P?AFT> <TELL "AFT">) ;50
(<EQUAL? .P ,P?PORT> <TELL "PORT">) ;49
(<EQUAL? .P ,P?STARBOARD> <TELL "STARBOARD">) ;48
(<EQUAL? .P ,P?ACTION> <TELL "ACTION">) ;47
(<EQUAL? .P ,P?ADJACENT> <TELL "ADJACENT">) ;46
(<EQUAL? .P ,P?SYNONYM> <TELL "SYNONYM">) ;45
(<EQUAL? .P ,P?CONTFCN> <TELL "CONTFCN">) ;44
(<EQUAL? .P ,P?THINGS> <TELL "THINGS">) ;43
(<EQUAL? .P ,P?DESCFCN> <TELL "DESCFCN">) ;42
(<EQUAL? .P ,P?GLOBAL> <TELL "GLOBAL">) ;41
(<EQUAL? .P ,P?FDESC> <TELL "FDESC">) ;40
(<EQUAL? .P ,P?LDESC> <TELL "LDESC">) ;39
(<EQUAL? .P ,P?COUNT> <TELL "COUNT">) ;38
(<EQUAL? .P ,P?SIZE> <TELL "SIZE">) ;37
(<EQUAL? .P ,P?TEXT> <TELL "TEXT">) ;36
(<EQUAL? .P ,P?VALUE> <TELL "VALUE">) ;35
(<EQUAL? .P ,P?CAPACITY> <TELL "CAPACITY">) ;34
(<EQUAL? .P ,P?ADJECTIVE> <TELL "ADJECTIVE">) ;33
(<EQUAL? .P ,P?OWNER> <TELL "OWNER">) ;32
(<EQUAL? .P ,P?GENERIC> <TELL "GENERIC">) ;31
(<EQUAL? .P ,P?HEALTH> <TELL "HEALTH">) ;30
(<EQUAL? .P ,P?PICTURE> <TELL "PICTURE">) ;29
(<EQUAL? .P ,P?SCENE> <TELL "SCENE">) ;28
(<EQUAL? .P ,P?SDESC> <TELL "SDESC">) ;27
(<EQUAL? .P ,P?SCORE> <TELL "SCORE">) ;26
(<EQUAL? .P ,P?MOUSE> <TELL "MOUSE">) ;25
(<EQUAL? .P ,P?AFTER> <TELL "AFTER">) ;24
(ELSE <TELL N .P>)>>
;<SYNTAX $M = V-$M>
;<ROUTINE V-$M ("AUX" S (X 0) (Y 0))
<REPEAT ((N <GET ,SCENE-LOCS 0>) (CNT 0))
<COND (<G? <SET CNT <+ .CNT 1>> .N> <RETURN>)
(ELSE
<SET S <GETPT <GET ,SCENE-LOCS .CNT> ,P?SCORE>>
<PRINT <GET ,SCENE-NAMES .CNT>>
<SET X <+ .X <GETB .S 0>>>
<SET Y <+ .Y <GETB .S 1>>>
<TELL ": "
N <* ,SCORE-FACTOR <GETB .S 0>>
"/"
N <* ,SCORE-FACTOR <GETB .S 1>>
CR>)>>
<TELL "Total: " N <* ,SCORE-FACTOR .X>
"/"
N <* ,SCORE-FACTOR .Y>
CR CR
"Missing">
<REPEAT ((CNT 0))
<COND (<G? <SET CNT <+ .CNT 1>> ,LAST-OBJECT> <RETURN>)
(<FSET? .CNT ,SCOREBIT>
<TELL ", " D .CNT>)>>
<CRLF>>
<END-SEGMENT>

156
status.zil Normal file
View File

@ -0,0 +1,156 @@
"STATUS for
SHOGUN
(c) Copyright 1988 Infocom, Inc. All Rights Reserved."
<BEGIN-SEGMENT 0>
<CONSTANT S-STATUS 1>
<CONSTANT STATUS-LINES 2>
<ROUTINE SETUP-TEXT-AND-STATUS ("OPT" (P ,P-BORDER-LOC)
"AUX" X (HIGH <LOWCORE VWRD>)
(WIDE <LOWCORE HWRD>) (SLEFT 1)
(SHIGH <* ,STATUS-LINES ,FONT-Y>))
<COND (<NOT <APPLE?>> ;"only apples have no borders"
<PICINF .P ,YX-TBL>
<SET X <GET ,YX-TBL 1>>
<SET SLEFT <+ .X .SLEFT>>
<COND (<NOT <EQUAL? .P ,P-BORDER-LOC>>
<SET SHIGH <GET ,YX-TBL 0>>)>
<SET WIDE <- .WIDE <* .X 2>>>)>
<WINDEF ,S-STATUS 1 .SLEFT .SHIGH .WIDE>
<WINDEF ,S-TEXT
<+ 1 .SHIGH> .SLEFT
<- .HIGH .SHIGH> .WIDE>>
<ROUTINE INIT-STATUS-LINE ("OPT" (NO-STS? <>))
<RESET-MARGIN>
<CLEAR ,S-TEXT>
<COND (<NOT .NO-STS?> <SETUP-TEXT-AND-STATUS>)>
<SCREEN ,S-STATUS>
<DIROUT ,D-TABLE-ON ,DIROUT-TABLE>
<PRINTI "0">
<DIROUT ,D-TABLE-OFF>
<SETG SCORE-WIDTH <LOWCORE TWID>>
<COLOR ,BG-COLOR ,FG-COLOR>
<CLEAR ,S-STATUS>
<UPDATE-STATUS-LINE T>>
<GLOBAL SCORE-WIDTH 0>
<GLOBAL SHERE <>>
<ROUTINE UPDATE-STATUS-LINE ("OPT" (REF? <>) "AUX" WIDE TMP)
<COND (<FLAG-ON? ,F-REFRESH>
<DISPLAY-BORDER>)>
<COND (<OR <FLAG-ON? ,F-REFRESH>
<NOT <EQUAL? ,HERE ,SHERE>>>
<SET REF? T>)>
<COND (<OR .REF?
<NOT <EQUAL? ,SCORE ,OSCORE>>
<NOT <EQUAL? ,MOVES ,OMOVES>>>
<SCREEN ,S-STATUS>
<COLOR ,BG-COLOR ,FG-COLOR>
<SET WIDE </ <WINGET ,S-STATUS ,WWIDE> ,FONT-X>>
<COND (.REF?
<CURSET 1 1>
<ERASE 1>
<COND (,SCENE
<CURSET 1 1>
<PRINT <GET ,SCENE-NAMES ,SCENE>>
<TELL ":">)>
<COND (<NOT <EQUAL? ,MACHINE
,DEBUGGING-ZIP ,MACINTOSH>>
<CURSET 1
<- </ <WINGET ,S-STATUS ,WWIDE> 2>
<* ,SCORE-WIDTH 3>>>
<TELL "SHOGUN">)>
<LOWCORE FLAGS
<BAND <LOWCORE FLAGS> <BCOM ,F-REFRESH>>>)>
<COND (<OR .REF?
<AND <SCENE? ,S-ERASMUS>
<HERE? ,BRIDGE-OF-ERASMUS>>
<AND <SCENE? ,S-VOYAGE>
<HERE? ,GALLEY>>>
<COND (.REF?
<CCURSET 2 1>
<ERASE 1>)>
<COND (,HERE
<CCURSET 2 1>
<SETG SHERE ,HERE>
<TELL 'HERE>
<SET TMP <LOC ,WINNER>>
<COND (<FSET? .TMP ,VEHBIT>
<SETG SHERE .TMP>
<COND (<FSET? .TMP ,SURFACEBIT>
<TELL ", on ">)
(ELSE
<TELL ", in ">)>
<TELL THE .TMP>)>
<COND (<HERE? ,BRIDGE-OF-ERASMUS ,GALLEY>
<ERASE-ALL-BUT 12>
<COND (<OR <AND <HERE? ,BRIDGE-OF-ERASMUS>
<FSET? ,WHEEL ,ONBIT>>
<AND <HERE? ,GALLEY>
<FSET? ,GALLEY-WHEEL ,ONBIT>>>
<TELL "; course ">
<TELL-DIRECTION ,SHIP-DIRECTION>
<TELL "; wheel ">
<TELL-DIRECTION ,SHIP-COURSE>)>)>)>)>
<COND (<OR .REF? <NOT <EQUAL? ,SCORE ,OSCORE>>>
<COND (.REF?
<CCURSET 1 <- .WIDE 10>>
<TELL "Score:">
<ERASE 1>)>
<SET TMP <* ,SCORE ,SCORE-FACTOR>>
<RJNUM .TMP 1>
<SETG OSCORE ,SCORE>)>
<COND (<OR .REF? <NOT <EQUAL? ,MOVES ,OMOVES>>>
<COND (.REF?
<CCURSET 2 <- .WIDE 10>>
<TELL "Moves:">
<ERASE 1>)>
<RJNUM ,MOVES 2>
<SETG OMOVES ,MOVES>)>
<SCREEN ,S-TEXT>)>>
<ROUTINE ERASE-ALL-BUT (N)
<ERASE <- <WINGET ,S-STATUS ,WWIDE>
<WINGET ,S-STATUS ,WXPOS>
<* .N ,FONT-X>>>>
<ROUTINE INTERLUDE-STATUS-LINE ()
<DISPLAY-BORDER ,P-BORDER2>
<SETG SHERE <>>
<SCREEN ,S-STATUS>
<COLOR ,BG-COLOR ,FG-COLOR>
<CURSET 1 1>
<ERASE-ALL-BUT 12>
<CURSET 1 1>
<PRINT <GET ,SCENE-NAMES ,SCENE>>
<TELL ":">
<COND (<NOT <EQUAL? ,MACHINE ,DEBUGGING-ZIP ,MACINTOSH>>
<CURSET 1
<- </ <WINGET ,S-STATUS ,WWIDE> 2>
<* ,SCORE-WIDTH 3>>>
<TELL "SHOGUN">)>
<LOWCORE FLAGS <BAND <LOWCORE FLAGS> <BCOM ,F-REFRESH>>>
<CCURSET 2 1>
<ERASE-ALL-BUT 12>
<CCURSET 2 1>
<TELL "Interlude">
<SCREEN ,S-TEXT>>
<ROUTINE RJNUM (NUM LINE "AUX" (WIDE <WINGET ,S-STATUS ,WWIDE>) (N <>))
<SET LINE <+ 1 <* <- .LINE 1> ,FONT-Y>>>
<COND (<L? .NUM 10> <SET N 1>)
(<L? .NUM 100> <SET N 2>)
(<L? .NUM 1000> <SET N 3>)
(<L? .NUM 10000> <SET N 4>)>
<CURSET .LINE <- .WIDE <* ,SCORE-WIDTH 4>>>
<ERASE 1>
<CURSET .LINE <- .WIDE <* ,SCORE-WIDTH .N>>>
<COND (.N <TELL N .NUM>)
(ELSE <TELL "****">)>>
<END-SEGMENT>

1176
syntax.zil Normal file

File diff suppressed because it is too large Load Diff

4180
verbs.zil Normal file

File diff suppressed because it is too large Load Diff

2303
voyage.zil Normal file

File diff suppressed because it is too large Load Diff