7 /* Limit visibility of ugly globals. Eventually these should go away. */
8 extern long WD1, WD1X, WD2, WD2X;
11 * Action handlers. Eventually we'll do lookup through a method table
15 static int fill(token_t verb, token_t);
17 static int attack(FILE *input, long verb, token_t obj)
18 /* Attack. Assume target if unambiguous. "Throw" also links here.
19 * Attackable objects fall into two categories: enemies (snake,
20 * dwarf, etc.) and others (bird, clam, machine). Ambiguous if 2
21 * enemies, or no enemies but 2 others. */
23 int spk = ACTSPK[verb];
24 int i = ATDWRF(game.loc);
28 if (HERE(SNAKE))obj=obj*NOBJECTS+SNAKE;
29 if (AT(DRAGON) && game.prop[DRAGON] == 0)obj=obj*NOBJECTS+DRAGON;
30 if (AT(TROLL))obj=obj*NOBJECTS+TROLL;
31 if (AT(OGRE))obj=obj*NOBJECTS+OGRE;
32 if (HERE(BEAR) && game.prop[BEAR] == 0)obj=obj*NOBJECTS+BEAR;
33 if (obj > NOBJECTS) return GO_UNKNOWN;
35 /* Can't attack bird or machine by throwing axe. */
36 if (HERE(BIRD) && verb != THROW)obj=BIRD;
37 if (HERE(VEND) && verb != THROW)obj=obj*NOBJECTS+VEND;
38 /* Clam and oyster both treated as clam for intransitive case;
40 if (HERE(CLAM) || HERE(OYSTER))obj=NOBJECTS*obj+CLAM;
41 if (obj > NOBJECTS) return GO_UNKNOWN;
56 PSPEAK(VEND,game.prop[VEND]+2);
57 game.prop[VEND]=3-game.prop[VEND];
61 if (obj == 0)spk=ARB_44;
62 if (obj == CLAM || obj == OYSTER)spk=ARB_150;
63 if (obj == SNAKE)spk=ARB_46;
64 if (obj == DWARF)spk=ARB_49;
65 if (obj == DWARF && game.closed) return GO_DWARFWAKE;
66 if (obj == DRAGON)spk=ARB_167;
67 if (obj == TROLL)spk=ARB_157;
68 if (obj == OGRE)spk=ARB_203;
69 if (obj == OGRE && i > 0) {
74 for (i=1; i < PIRATE; i++) {
75 if (game.dloc[i] == game.loc) {
85 if (obj == BEAR)spk=ARB_165+(game.prop[BEAR]+1)/2;
86 if (obj != DRAGON || game.prop[DRAGON] != 0) {RSPEAK(spk); return GO_CLEAROBJ;}
87 /* Fun stuff for dragon. If he insists on attacking it, win!
88 * Set game.prop to dead, move dragon to central loc (still
89 * fixed), move rug there (not fixed), and move him there,
90 * too. Then do a null motion to get new description. */
92 GETIN(input,&WD1,&WD1X,&WD2,&WD2X);
93 if (WD1 != MAKEWD(25) && WD1 != MAKEWD(250519))
98 int k=(PLAC[DRAGON]+FIXD[DRAGON])/2;
99 MOVE(DRAGON+NOBJECTS,-1);
100 MOVE(RUG+NOBJECTS,0);
104 for (obj=1; obj<=NOBJECTS; obj++) {
105 if (game.place[obj] == PLAC[DRAGON] || game.place[obj] == FIXD[DRAGON])
112 static int bigwords(long foo)
113 /* FEE FIE FOE FOO (AND FUM). Advance to next state if given in proper order.
114 * Look up WD1 in section 3 of vocab to determine which word we've got. Last
115 * word zips the eggs back to the giant room (unless already there). */
119 if (game.foobar != 1-k) {
120 if (game.foobar != 0)spk=ARB_151;
130 if (game.place[EGGS]==PLAC[EGGS] || (TOTING(EGGS) && game.loc==PLAC[EGGS])) {
134 /* Bring back troll if we steal the eggs back from him before
136 if (game.place[EGGS]==0 && game.place[TROLL]==0 && game.prop[TROLL]==0)
140 if (game.loc == PLAC[EGGS])k=0;
141 MOVE(EGGS,PLAC[EGGS]);
148 static int bivalve(token_t verb, token_t obj)
149 /* Clam/oyster actions */
152 if (obj == OYSTER)k=1;
154 if (TOTING(obj))spk=ARB_120+k;
155 if (!TOTING(TRIDNT))spk=ARB_122+k;
156 if (verb == LOCK)spk=ARB_61;
159 DROP(OYSTER,game.loc);
166 static int blast(void)
167 /* Blast. No effect unless you've got dynamite, which is a neat trick! */
169 if (game.prop[ROD2] < 0 || !game.closed)
181 return GO_CLEAROBJ; /* pacify compiler - we never get here */
184 static int vbreak(token_t verb, token_t obj)
185 /* Break. Only works for mirror in repository and, of course, the vase. */
187 int spk = ACTSPK[verb];
188 if (obj == MIRROR)spk=ARB_148;
189 if (obj == VASE && game.prop[VASE] == 0) {
190 if (TOTING(VASE))DROP(VASE,game.loc);
192 game.fixed[VASE]= -1;
195 if (obj == MIRROR && game.closed) {
204 static int brief(void)
205 /* Brief. Intransitive only. Suppress long descriptions after first time. */
213 static int carry(token_t verb, token_t obj)
214 /* Carry an object. Special cases for bird and cage (if bird in cage, can't
215 * take one without the other). Liquids also special, since they depend on
216 * status of bottle. Also various side effects, etc. */
219 if (obj == INTRANSITIVE) {
220 /* Carry, no object given yet. OK if only one object present. */
221 if(game.atloc[game.loc] == 0 ||
222 game.link[game.atloc[game.loc]] != 0 ||
223 ATDWRF(game.loc) > 0)
225 obj=game.atloc[game.loc];
228 if (TOTING(obj)) {RSPEAK(ARB_24); return GO_CLEAROBJ;}
230 if (obj == PLANT && game.prop[PLANT] <= 0)spk=ARB_115;
231 if (obj == BEAR && game.prop[BEAR] == 1)spk=ARB_169;
232 if (obj == CHAIN && game.prop[BEAR] != 0)spk=ARB_170;
233 if (obj == URN)spk=ARB_215;
234 if (obj == CAVITY)spk=ARB_217;
235 if (obj == BLOOD)spk=ARB_239;
236 if (obj == RUG && game.prop[RUG] == 2)spk=ARB_222;
237 if (obj == SIGN)spk=ARB_196;
243 if (game.fixed[obj] != 0) {
247 if (obj == WATER || obj == OIL) {
248 if (!HERE(BOTTLE) || LIQUID() != obj) {
249 if (TOTING(BOTTLE) && game.prop[BOTTLE] == 1)
250 return(fill(verb, BOTTLE));
251 if (game.prop[BOTTLE] != 1)spk=ARB_105;
252 if (!TOTING(BOTTLE))spk=ARB_104;
260 if (game.holdng >= INVLIMIT) {
264 else if (obj == BIRD && game.prop[BIRD] != 1 && -1-game.prop[BIRD] != 1) {
265 if (game.prop[BIRD] == 2) {
270 if (!TOTING(CAGE))spk=ARB_27;
271 if (TOTING(ROD))spk=ARB_26;
278 if ((obj==BIRD || obj==CAGE) && (game.prop[BIRD]==1 || -1-game.prop[BIRD]==1))
279 CARRY(BIRD+CAGE-obj,game.loc);
281 if (obj == BOTTLE && LIQUID() != 0)
282 game.place[LIQUID()] = -1;
283 if (GSTONE(obj) && game.prop[obj] != 0) {
291 static int chain(token_t verb)
292 /* Do something to the bear's chain */
297 if (game.prop[BEAR] == 0)spk=ARB_41;
298 if (game.prop[CHAIN] == 0)spk=ARB_37;
299 if (spk != 171) {RSPEAK(spk); return GO_CLEAROBJ;}
302 if (game.prop[BEAR] != 3)game.prop[BEAR]=2;
303 game.fixed[BEAR]=2-game.prop[BEAR];
306 if (game.prop[CHAIN] != 0)spk=ARB_34;
307 if (game.loc != PLAC[CHAIN])spk=ARB_173;
308 if (spk != 172) {RSPEAK(spk); return GO_CLEAROBJ;}
310 if (TOTING(CHAIN))DROP(CHAIN,game.loc);
311 game.fixed[CHAIN]= -1;
317 static int discard(token_t verb, token_t obj, bool just_do_it)
318 /* Discard object. "Throw" also comes here for most objects. Special cases for
319 * bird (might attack snake or dragon) and cage (might contain bird) and vase.
320 * Drop coins at vending machine for extra batteries. */
322 int spk = ACTSPK[verb];
324 if (TOTING(ROD2) && obj == ROD && !TOTING(ROD))obj=ROD2;
325 if (!TOTING(obj)) {RSPEAK(spk); return GO_CLEAROBJ;}
326 if (obj == BIRD && HERE(SNAKE)) {
328 if (game.closed) return GO_DWARFWAKE;
330 /* Set game.prop for use by travel options */
333 } else if ((GSTONE(obj) && AT(CAVITY) && game.prop[CAVITY] != 0)) {
337 if (HERE(RUG) && ((obj == EMRALD && game.prop[RUG] != 2) || (obj == RUBY &&
338 game.prop[RUG] == 2))) {
340 if (TOTING(RUG))spk=ARB_220;
341 if (obj == RUBY)spk=ARB_221;
344 int k = 2-game.prop[RUG];
346 if (k == 2) k = PLAC[SAPPH];
347 MOVE(RUG+NOBJECTS, k);
350 } else if (obj == COINS && HERE(VEND)) {
352 DROP(BATTER,game.loc);
355 } else if (obj == BIRD && AT(DRAGON) && game.prop[DRAGON] == 0) {
360 } else if (obj == BEAR && AT(TROLL)) {
363 MOVE(TROLL+NOBJECTS,0);
364 MOVE(TROLL2,PLAC[TROLL]);
365 MOVE(TROLL2+NOBJECTS,FIXD[TROLL]);
368 } else if (obj != VASE || game.loc == PLAC[PILLOW]) {
372 if (AT(PILLOW))game.prop[VASE]=0;
373 PSPEAK(VASE,game.prop[VASE]+1);
374 if (game.prop[VASE] != 0)game.fixed[VASE]= -1;
378 if (k == obj)obj=BOTTLE;
379 if (obj == BOTTLE && k != 0)
381 if (obj == CAGE && game.prop[BIRD] == 1)DROP(BIRD,game.loc);
383 if (obj != BIRD) return GO_CLEAROBJ;
385 if (FOREST(game.loc))game.prop[BIRD]=2;
389 static int drink(token_t verb, token_t obj)
390 /* Drink. If no object, assume water and look for it here. If water is in
391 * the bottle, drink that, else must be at a water loc, so drink stream. */
393 int spk = ACTSPK[verb];
394 if (obj == 0 && LIQLOC(game.loc) != WATER && (LIQUID() != WATER || !HERE(BOTTLE)))
397 if (obj != 0 && obj != WATER)spk=ARB_110;
398 if (spk != 110 && LIQUID() == WATER && HERE(BOTTLE)) {
406 OBJSND[BIRD]=OBJSND[BIRD]+3;
413 static int eat(token_t verb, token_t obj)
414 /* Eat. Intransitive: assume food if present, else ask what. Transitive: food
415 * ok, some things lose appetite, rest are ridiculous. */
417 int spk = ACTSPK[verb];
418 if (obj == INTRANSITIVE) {
428 if (obj == BIRD || obj == SNAKE || obj == CLAM || obj == OYSTER || obj ==
429 DWARF || obj == DRAGON || obj == TROLL || obj == BEAR || obj ==
436 static int extinguish(token_t verb, int obj)
437 /* Extinguish. Lamp, urn, dragon/volcano (nice try). */
439 int spk = ACTSPK[verb];
440 if (obj == INTRANSITIVE) {
441 if (HERE(LAMP) && game.prop[LAMP] == 1)obj=LAMP;
442 if (HERE(URN) && game.prop[URN] == 2)obj=obj*NOBJECTS+URN;
443 if (obj == INTRANSITIVE || obj == 0 || obj > NOBJECTS) return GO_UNKNOWN;
447 game.prop[URN]=game.prop[URN]/2;
450 else if (obj == LAMP) {
453 spk = DARK(game.loc) ? 16 : 0;
455 else if (obj == DRAGON || obj == VOLCAN)
461 static int feed(token_t verb, token_t obj)
462 /* Feed. If bird, no seed. Snake, dragon, troll: quip. If dwarf, make him
463 * mad. Bear, special. */
465 int spk = ACTSPK[verb];
470 else if (obj == SNAKE || obj == DRAGON || obj == TROLL) {
472 if (obj == DRAGON && game.prop[DRAGON] != 0)spk=ARB_110;
473 if (obj == TROLL)spk=ARB_182;
474 if (obj == SNAKE && !game.closed && HERE(BIRD)) {
480 else if (obj == DWARF) {
486 else if (obj == BEAR) {
487 if (game.prop[BEAR] == 0)spk=ARB_102;
488 if (game.prop[BEAR] == 3)spk=ARB_110;
497 else if (obj == OGRE) {
507 int fill(token_t verb, token_t obj)
508 /* Fill. Bottle or urn must be empty, and liquid available. (Vase
512 int spk = ACTSPK[verb];
515 if (LIQLOC(game.loc) == 0)spk=ARB_144;
516 if (LIQLOC(game.loc) == 0 || !TOTING(VASE)) {
522 game.fixed[VASE]= -1;
523 return(discard(verb, obj, true));
525 else if (obj == URN) {
527 if (game.prop[URN] != 0) {RSPEAK(spk); return GO_CLEAROBJ;}
530 if (k == 0 || !HERE(BOTTLE)) {RSPEAK(spk); return GO_CLEAROBJ;}
533 if (k == OIL)game.prop[URN]=1;
534 spk=ARB_211+game.prop[URN];
538 else if (obj != 0 && obj != BOTTLE) {
542 else if (obj == 0 && !HERE(BOTTLE))
545 if (LIQLOC(game.loc) == 0)
547 if (HERE(URN) && game.prop[URN] != 0)
552 game.prop[BOTTLE]=MOD(COND[game.loc],4)/2*2;
563 static int find(token_t verb, token_t obj)
564 /* Find. Might be carrying it, or it might be here. Else give caveat. */
566 int spk = ACTSPK[verb];
568 (LIQUID() == obj && AT(BOTTLE)) ||
569 obj == LIQLOC(game.loc) ||
570 (obj == DWARF && ATDWRF(game.loc) > 0))
572 if (game.closed)spk=ARB_138;
573 if (TOTING(obj))spk=ARB_24;
578 static int fly(token_t verb, token_t obj)
579 /* Fly. Snide remarks unless hovering rug is here. */
581 int spk = ACTSPK[verb];
582 if (obj == INTRANSITIVE) {
583 if (game.prop[RUG] != 2)spk=ARB_224;
584 if (!HERE(RUG))spk=ARB_225;
597 if (game.prop[RUG] != 2) {RSPEAK(spk); return GO_CLEAROBJ;}
598 game.oldlc2=game.oldloc;
599 game.oldloc=game.loc;
600 game.newloc=game.place[RUG]+game.fixed[RUG]-game.loc;
602 if (game.prop[SAPPH] >= 0)spk=ARB_227;
607 static int inven(token_t obj)
608 /* Inventory. If object, treat same as find. Else report on current burden. */
612 for (i=1; i<=NOBJECTS; i++) {
613 if (i == BEAR || !TOTING(i))
628 int light(token_t verb, token_t obj)
629 /* Light. Applicable only to lamp and urn. */
631 int spk = ACTSPK[verb];
632 if (obj == INTRANSITIVE) {
633 if (HERE(LAMP) && game.prop[LAMP] == 0 && game.limit >= 0)obj=LAMP;
634 if (HERE(URN) && game.prop[URN] == 1)obj=obj*NOBJECTS+URN;
635 if (obj == INTRANSITIVE || obj == 0 || obj > NOBJECTS) return GO_UNKNOWN;
640 if (game.prop[URN] == 0)
641 {RSPEAK(spk); return GO_CLEAROBJ;}
653 if (game.limit < 0) {
666 static int listen(void)
667 /* Listen. Intransitive only. Print stuff based on objsnd/locsnd. */
674 if (k < 0) return GO_CLEAROBJ;
677 SETPRM(1,game.zzword,0);
678 for (i=1; i<=NOBJECTS; i++) {
679 if (!HERE(i) || OBJSND[i] == 0 || game.prop[i] < 0)
681 PSPEAK(i,OBJSND[i]+game.prop[i]);
683 if (i == BIRD && OBJSND[i]+game.prop[i] == 8)
690 static int lock(token_t verb, token_t obj)
691 /* Lock, unlock, no object given. Assume various things if present. */
693 int spk = ACTSPK[verb];
694 if (obj == INTRANSITIVE) {
696 if (HERE(CLAM))obj=CLAM;
697 if (HERE(OYSTER))obj=OYSTER;
698 if (AT(DOOR))obj=DOOR;
699 if (AT(GRATE))obj=GRATE;
700 if (obj != 0 && HERE(CHAIN)) return GO_UNKNOWN;
701 if (HERE(CHAIN))obj=CHAIN;
702 if (obj == 0) {RSPEAK(spk); return GO_CLEAROBJ;}
705 /* Lock, unlock object. Special stuff for opening clam/oyster
707 if (obj == CLAM || obj == OYSTER)
708 return bivalve(verb, obj);
709 if (obj == DOOR)spk=ARB_111;
710 if (obj == DOOR && game.prop[DOOR] == 1)spk=ARB_54;
711 if (obj == CAGE)spk=ARB_32;
712 if (obj == KEYS)spk=ARB_55;
713 if (obj == GRATE || obj == CHAIN) {
720 if (!game.panic)game.clock2=15;
723 spk=ARB_34+game.prop[GRATE];
725 if (verb == LOCK)game.prop[GRATE]=0;
726 spk=spk+2*game.prop[GRATE];
734 static int pour(token_t verb, token_t obj)
735 /* Pour. If no object, or object is bottle, assume contents of bottle.
736 * special tests for pouring water or oil on plant or rusty door. */
738 int spk = ACTSPK[verb];
739 if (obj == BOTTLE || obj == 0)obj=LIQUID();
740 if (obj == 0) return GO_UNKNOWN;
741 if (!TOTING(obj)) {RSPEAK(spk); return GO_CLEAROBJ;}
743 if (obj != OIL && obj != WATER) {RSPEAK(spk); return GO_CLEAROBJ;}
744 if (HERE(URN) && game.prop[URN] == 0)
745 return fill(verb, URN);
749 if (!(AT(PLANT) || AT(DOOR)))
750 {RSPEAK(spk); return GO_CLEAROBJ;}
753 if (obj != WATER) {RSPEAK(spk); return GO_CLEAROBJ;}
754 PSPEAK(PLANT,game.prop[PLANT]+3);
755 game.prop[PLANT]=MOD(game.prop[PLANT]+1,3);
756 game.prop[PLANT2]=game.prop[PLANT];
760 if (obj == OIL)game.prop[DOOR]=1;
761 spk=ARB_113+game.prop[DOOR];
767 static int quit(FILE *input)
768 /* Quit. Intransitive only. Verify intent and exit if that's what he wants. */
770 if (YES(input,22,54,54))
775 static int read(FILE *input, token_t verb, token_t obj)
776 /* Read. Print stuff based on objtxt. Oyster (?) is special case. */
778 int spk = ACTSPK[verb];
779 if (obj == INTRANSITIVE) {
781 for (int i=1; i<=NOBJECTS; i++) {
782 if (HERE(i) && OBJTXT[i] != 0 && game.prop[i] >= 0)
783 obj = obj * NOBJECTS + i;
785 if (obj > NOBJECTS || obj == 0 || DARK(game.loc)) return GO_UNKNOWN;
788 if (DARK(game.loc)) {
793 if (OBJTXT[obj] == 0 || game.prop[obj] < 0) {
797 if (obj == OYSTER && !game.clshnt) {
798 game.clshnt=YES(input,192,193,54);
801 PSPEAK(obj,OBJTXT[obj]+game.prop[obj]);
805 static int reservoir(void)
806 /* Z'ZZZ (word gets recomputed at startup; different each game). */
808 if (!AT(RESER) && game.loc != game.fixed[RESER]-1) {
812 PSPEAK(RESER,game.prop[RESER]+1);
813 game.prop[RESER]=1-game.prop[RESER];
814 if (AT(RESER)) return GO_CLEAROBJ;
815 game.oldlc2=game.loc;
822 static int rub(token_t verb, token_t obj)
823 /* Rub. Yields various snide remarks except for lit urn. */
825 int spk = ACTSPK[verb];
828 if (obj == URN && game.prop[URN] == 2) {
830 DROP(AMBER,game.loc);
833 DROP(CAVITY,game.loc);
841 /* Say. Echo WD2 (or WD1 if no WD2 (SAY WHAT?, etc.).) Magic words override. */
843 /* FIXME: ugly use of globals */
849 int wd=VOCAB(WD1,-1);
850 if (wd == 62 || wd == 65 || wd == 71 || wd == 2025 || wd == 2034) {
859 static int throw_support(long spk)
866 static int throw(FILE *cmdin, long verb, token_t obj)
867 /* Throw. Same as discard unless axe. Then same as attack except
868 * ignore bird, and if dwarf is present then one might be killed.
869 * (Only way to do so!) Axe also special for dragon, bear, and
870 * troll. Treasures special for troll. */
872 int spk = ACTSPK[verb];
873 if (TOTING(ROD2) && obj == ROD && !TOTING(ROD))obj=ROD2;
878 if (obj >= 50 && obj <= MAXTRS && AT(TROLL)) {
880 /* Snarf a treasure for the troll. */
883 MOVE(TROLL+NOBJECTS,0);
884 DROP(TROLL2,PLAC[TROLL]);
885 DROP(TROLL2+NOBJECTS,FIXD[TROLL]);
890 if (obj == FOOD && HERE(BEAR)) {
891 /* But throwing food is another story. */
893 return(feed(verb, obj));
896 return(discard(verb, obj, false));
897 int i=ATDWRF(game.loc);
899 if (AT(DRAGON) && game.prop[DRAGON] == 0) {
901 return throw_support(spk);
905 return throw_support(spk);
909 return throw_support(spk);
911 if (HERE(BEAR) && game.prop[BEAR] == 0) {
912 /* This'll teach him to throw the axe at the bear! */
918 {RSPEAK(spk); return GO_CLEAROBJ;}
920 return(attack(cmdin, verb, 0));
923 if (randrange(NDWARVES+1) < game.dflag) {
925 return throw_support(spk);
931 if (game.dkill == 1)spk=ARB_149;
933 return throw_support(spk);
936 static int vscore(void)
937 /* Score. Call scoring routine but tell it to return. */
943 static int wake(token_t verb, token_t obj)
944 /* Wake. Only use is to disturb the dwarves. */
946 if (obj != DWARF || !game.closed)
948 RSPEAK(ACTSPK[verb]);
955 static int wave(token_t verb, token_t obj)
956 /* Wave. No effect unless waving rod at fissure or at bird. */
958 int spk = ACTSPK[verb];
959 if ((!TOTING(obj)) && (obj != ROD || !TOTING(ROD2)))spk=ARB_29;
962 (!HERE(BIRD) && (game.closng || !AT(FISSUR)))) {
966 if (HERE(BIRD))spk=ARB_206+MOD(game.prop[BIRD],2);
967 if (spk == 206 && game.loc == game.place[STEPS] && game.prop[JADE] < 0) {
979 if (game.closng || !AT(FISSUR)) {RSPEAK(spk); return GO_CLEAROBJ;}
980 if (HERE(BIRD))RSPEAK(spk);
981 game.prop[FISSUR]=1-game.prop[FISSUR];
982 PSPEAK(FISSUR,2-game.prop[FISSUR]);
987 int action(FILE *input, enum speechpart part, long verb, token_t obj)
988 /* Analyse a verb. Remember what it was, go back for object if second word
989 * unless verb is "say", which snarfs arbitrary second word.
992 token_t spk=ACTSPK[verb];
996 /* Analyse an object word. See if the thing is here, whether
997 * we've got a verb yet, and so on. Object must be here
998 * unless verb is "find" or "invent(ory)" (and no new verb
999 * yet to be analysed). Water and oil are also funny, since
1000 * they are never actually dropped at any location, but might
1001 * be here inside the bottle or urn or as a feature of the
1005 else if (obj == GRATE) {
1006 if (game.loc == 1 || game.loc == 4 || game.loc == 7)
1008 if (game.loc > 9 && game.loc < 15)
1013 else if (obj == DWARF && ATDWRF(game.loc) > 0)
1015 else if ((LIQUID() == obj && HERE(BOTTLE)) || obj == LIQLOC(game.loc))
1017 else if (obj == OIL && HERE(URN) && game.prop[URN] != 0) {
1021 else if (obj == PLANT && AT(PLANT2) && game.prop[PLANT2] != 0) {
1025 else if (obj == KNIFE && game.knfloc == game.loc) {
1031 else if (obj == ROD && HERE(ROD2)) {
1035 else if ((verb == FIND || verb == INVENT) && WD2 <= 0)
1052 if (WD2 > 0 && verb != SAY) return(2800);
1053 if (verb == SAY)obj=WD2;
1054 if (obj == 0 || obj == INTRANSITIVE) {
1055 /* Analyse an intransitive verb (ie, no object given yet). */
1057 case 0: /* CARRY */ return carry(verb, INTRANSITIVE);
1058 case 1: /* DROP */ return GO_UNKNOWN;
1059 case 2: /* SAY */ return GO_UNKNOWN;
1060 case 3: /* UNLOC */ return lock(verb, INTRANSITIVE);
1061 case 4: /* NOTHI */ {RSPEAK(ARB_54); return(GO_CLEAROBJ);}
1062 case 5: /* LOCK */ return lock(verb, INTRANSITIVE);
1063 case 6: /* LIGHT */ return light(verb, INTRANSITIVE);
1064 case 7: /* EXTIN */ return extinguish(verb, INTRANSITIVE);
1065 case 8: /* WAVE */ return GO_UNKNOWN;
1066 case 9: /* CALM */ return GO_UNKNOWN;
1067 case 10: /* WALK */ {RSPEAK(spk); return GO_CLEAROBJ;}
1068 case 11: /* ATTAC */ return attack(input, verb, obj);
1069 case 12: /* POUR */ return pour(verb, obj);
1070 case 13: /* EAT */ return eat(verb, INTRANSITIVE);
1071 case 14: /* DRINK */ return drink(verb, obj);
1072 case 15: /* RUB */ return GO_UNKNOWN;
1073 case 16: /* TOSS */ return GO_UNKNOWN;
1074 case 17: /* QUIT */ return quit(input);
1075 case 18: /* FIND */ return GO_UNKNOWN;
1076 case 19: /* INVEN */ return inven(obj);
1077 case 20: /* FEED */ return GO_UNKNOWN;
1078 case 21: /* FILL */ return fill(verb, obj);
1079 case 22: /* BLAST */ return blast();
1080 case 23: /* SCOR */ return vscore();
1081 case 24: /* FOO */ return bigwords(WD1);
1082 case 25: /* BRIEF */ return brief();
1083 case 26: /* READ */ return read(input, verb, INTRANSITIVE);
1084 case 27: /* BREAK */ return GO_UNKNOWN;
1085 case 28: /* WAKE */ return GO_UNKNOWN;
1086 case 29: /* SUSP */ return saveresume(input, false);
1087 case 30: /* RESU */ return saveresume(input, true);
1088 case 31: /* FLY */ return fly(verb, INTRANSITIVE);
1089 case 32: /* LISTE */ return listen();
1090 case 33: /* ZZZZ */ return reservoir();
1096 /* Analyse a transitive verb. */
1098 case 0: /* CARRY */ return carry(verb, obj);
1099 case 1: /* DROP */ return discard(verb, obj, false);
1100 case 2: /* SAY */ return say();
1101 case 3: /* UNLOC */ return lock(verb, obj);
1102 case 4: /* NOTHI */ {RSPEAK(ARB_54); return(GO_CLEAROBJ);}
1103 case 5: /* LOCK */ return lock(verb, obj);
1104 case 6: /* LIGHT */ return light(verb, obj);
1105 case 7: /* EXTI */ return extinguish(verb, obj);
1106 case 8: /* WAVE */ return wave(verb, obj);
1107 case 9: /* CALM */ {RSPEAK(spk); return GO_CLEAROBJ;}
1108 case 10: /* WALK */ {RSPEAK(spk); return GO_CLEAROBJ;}
1109 case 11: /* ATTAC */ return attack(input, verb, obj);
1110 case 12: /* POUR */ return pour(verb, obj);
1111 case 13: /* EAT */ return eat(verb, obj);
1112 case 14: /* DRINK */ return drink(verb, obj);
1113 case 15: /* RUB */ return rub(verb, obj);
1114 case 16: /* TOSS */ return throw(input, verb, obj);
1115 case 17: /* QUIT */ {RSPEAK(spk); return GO_CLEAROBJ;}
1116 case 18: /* FIND */ return find(verb, obj);
1117 case 19: /* INVEN */ return find(verb, obj);
1118 case 20: /* FEED */ return feed(verb, obj);
1119 case 21: /* FILL */ return fill(verb, obj);
1120 case 22: /* BLAST */ return blast();
1121 case 23: /* SCOR */ {RSPEAK(spk); return GO_CLEAROBJ;}
1122 case 24: /* FOO */ {RSPEAK(spk); return GO_CLEAROBJ;}
1123 case 25: /* BRIEF */ {RSPEAK(spk); return GO_CLEAROBJ;}
1124 case 26: /* READ */ return read(input, verb, obj);
1125 case 27: /* BREAK */ return vbreak(verb, obj);
1126 case 28: /* WAKE */ return wake(verb, obj);
1127 case 29: /* SUSP */ {RSPEAK(spk); return GO_CLEAROBJ;}
1128 case 30: /* RESU */ {RSPEAK(spk); return GO_CLEAROBJ;}
1129 case 31: /* FLY */ return fly(verb, obj);
1130 case 32: /* LISTE */ {RSPEAK(spk); return GO_CLEAROBJ;}
1131 case 33: /* ZZZZ */ return reservoir();
1135 /* Unknown verb, couldn't deduce object - might need hint */
1138 return GO_CHECKHINT;