* and if dwarf is present then one might be killed. (Only way to do so!)
* Axe also special for dragon, bear, and troll. Treasures special for troll. */
-int throw(FILE *cmdin) {
- if(TOTING(ROD2) && OBJ == ROD && !TOTING(ROD))OBJ=ROD2;
- if(!TOTING(OBJ)) return(2011);
- if(OBJ >= 50 && OBJ <= MAXTRS && AT(TROLL)) goto L9178;
- if(OBJ == FOOD && HERE(BEAR)) goto L9177;
- if(OBJ != AXE) return(discard(false));
+int throw(FILE *cmdin, long obj) {
+ if(TOTING(ROD2) && obj == ROD && !TOTING(ROD))obj=ROD2;
+ if(!TOTING(obj)) return(2011);
+ if(obj >= 50 && obj <= MAXTRS && AT(TROLL)) goto L9178;
+ if(obj == FOOD && HERE(BEAR)) goto L9177;
+ if(obj != AXE) return(discard(false));
I=ATDWRF(game.loc);
if(I > 0) goto L9172;
SPK=152;
SPK=203;
if(AT(OGRE)) goto L9175;
if(HERE(BEAR) && game.prop[BEAR] == 0) goto L9176;
- OBJ=0;
- return(attack(cmdin, OBJ));
+ obj=0;
+ return(attack(cmdin, obj));
L9172: SPK=48;
if(randrange(NDWARVES+1) < game.dflag) goto L9175;
return(2011);
/* But throwing food is another story. */
-L9177: OBJ=BEAR;
- return(feed());
+L9177: obj=BEAR;
+ return(feed(obj));
L9178: SPK=159;
/* Snarf a treasure for the troll. */
- DROP(OBJ,0);
+ DROP(obj,0);
MOVE(TROLL,0);
MOVE(TROLL+NOBJECTS,0);
DROP(TROLL2,PLAC[TROLL]);
/* Feed. If bird, no seed. Snake, dragon, troll: quip. If dwarf, make him
* mad. Bear, special. */
-int feed() {
- if(OBJ != BIRD) goto L9212;
+int feed(long obj) {
+ if(obj != BIRD) goto L9212;
SPK=100;
return(2011);
-L9212: if(OBJ != SNAKE && OBJ != DRAGON && OBJ != TROLL) goto L9213;
+L9212: if(obj != SNAKE && obj != DRAGON && obj != TROLL) goto L9213;
SPK=102;
- if(OBJ == DRAGON && game.prop[DRAGON] != 0)SPK=110;
- if(OBJ == TROLL)SPK=182;
- if(OBJ != SNAKE || game.closed || !HERE(BIRD)) return(2011);
+ if(obj == DRAGON && game.prop[DRAGON] != 0)SPK=110;
+ if(obj == TROLL)SPK=182;
+ if(obj != SNAKE || game.closed || !HERE(BIRD)) return(2011);
SPK=101;
DSTROY(BIRD);
game.prop[BIRD]=0;
return(2011);
-L9213: if(OBJ != DWARF) goto L9214;
+L9213: if(obj != DWARF) goto L9214;
if(!HERE(FOOD)) return(2011);
SPK=103;
game.dflag=game.dflag+2;
return(2011);
-L9214: if(OBJ != BEAR) goto L9215;
+L9214: if(obj != BEAR) goto L9215;
if(game.prop[BEAR] == 0)SPK=102;
if(game.prop[BEAR] == 3)SPK=110;
if(!HERE(FOOD)) return(2011);
SPK=168;
return(2011);
-L9215: if(OBJ != OGRE) goto L9216;
+L9215: if(obj != OGRE) goto L9216;
if(HERE(FOOD))SPK=202;
return(2011);