OSDN Git Service

update year to 2020
[jnethack/source.git] / src / minion.c
1 /* NetHack 3.6  minion.c        $NHDT-Date: 1575245071 2019/12/02 00:04:31 $  $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.44 $ */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /*-Copyright (c) Robert Patrick Rankin, 2008. */
4 /* NetHack may be freely redistributed.  See license for details. */
5
6 /* JNetHack Copyright */
7 /* (c) Issei Numata, Naoki Hamada, Shigehiro Miyashita, 1994-2000  */
8 /* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2020            */
9 /* JNetHack may be freely redistributed.  See license for details. */
10
11 #include "hack.h"
12
13 void
14 newemin(mtmp)
15 struct monst *mtmp;
16 {
17     if (!mtmp->mextra)
18         mtmp->mextra = newmextra();
19     if (!EMIN(mtmp)) {
20         EMIN(mtmp) = (struct emin *) alloc(sizeof(struct emin));
21         (void) memset((genericptr_t) EMIN(mtmp), 0, sizeof(struct emin));
22     }
23 }
24
25 void
26 free_emin(mtmp)
27 struct monst *mtmp;
28 {
29     if (mtmp->mextra && EMIN(mtmp)) {
30         free((genericptr_t) EMIN(mtmp));
31         EMIN(mtmp) = (struct emin *) 0;
32     }
33     mtmp->isminion = 0;
34 }
35
36 /* count the number of monsters on the level */
37 int
38 monster_census(spotted)
39 boolean spotted; /* seen|sensed vs all */
40 {
41     struct monst *mtmp;
42     int count = 0;
43
44     for (mtmp = fmon; mtmp; mtmp = mtmp->nmon) {
45         if (DEADMONSTER(mtmp))
46             continue;
47         if (spotted && !canspotmon(mtmp))
48             continue;
49         ++count;
50     }
51     return count;
52 }
53
54 /* mon summons a monster */
55 int
56 msummon(mon)
57 struct monst *mon;
58 {
59     struct permonst *ptr;
60     int dtype = NON_PM, cnt = 0, result = 0, census;
61     aligntyp atyp;
62     struct monst *mtmp;
63
64     if (mon) {
65         ptr = mon->data;
66
67         if (uwep && uwep->oartifact == ART_DEMONBANE && is_demon(ptr)) {
68             if (canseemon(mon))
69 /*JP
70                 pline("%s looks puzzled for a moment.", Monnam(mon));
71 */
72                 pline("%s\82Í\8f­\82µ\8d¢\98f\82µ\82Ä\82¢\82é\82æ\82¤\82¾\81D", Monnam(mon));
73             return 0;
74         }
75
76         atyp = mon->ispriest ? EPRI(mon)->shralign
77                              : mon->isminion ? EMIN(mon)->min_align
78                                              : (ptr->maligntyp == A_NONE)
79                                                    ? A_NONE
80                                                    : sgn(ptr->maligntyp);
81     } else {
82         ptr = &mons[PM_WIZARD_OF_YENDOR];
83         atyp = (ptr->maligntyp == A_NONE) ? A_NONE : sgn(ptr->maligntyp);
84     }
85
86     if (is_dprince(ptr) || (ptr == &mons[PM_WIZARD_OF_YENDOR])) {
87         dtype = (!rn2(20)) ? dprince(atyp) : (!rn2(4)) ? dlord(atyp)
88                                                        : ndemon(atyp);
89         cnt = ((dtype != NON_PM)
90                && !rn2(4) && is_ndemon(&mons[dtype])) ? 2 : 1;
91     } else if (is_dlord(ptr)) {
92         dtype = (!rn2(50)) ? dprince(atyp) : (!rn2(20)) ? dlord(atyp)
93                                                         : ndemon(atyp);
94         cnt = ((dtype != NON_PM)
95                && !rn2(4) && is_ndemon(&mons[dtype])) ? 2 : 1;
96     } else if (is_ndemon(ptr)) {
97         dtype = (!rn2(20)) ? dlord(atyp) : (!rn2(6)) ? ndemon(atyp)
98                                                      : monsndx(ptr);
99         cnt = 1;
100     } else if (is_lminion(mon)) {
101         dtype = (is_lord(ptr) && !rn2(20))
102                     ? llord()
103                     : (is_lord(ptr) || !rn2(6)) ? lminion() : monsndx(ptr);
104         cnt = ((dtype != NON_PM)
105                && !rn2(4) && !is_lord(&mons[dtype])) ? 2 : 1;
106     } else if (ptr == &mons[PM_ANGEL]) {
107         /* non-lawful angels can also summon */
108         if (!rn2(6)) {
109             switch (atyp) { /* see summon_minion */
110             case A_NEUTRAL:
111                 dtype = PM_AIR_ELEMENTAL + rn2(4);
112                 break;
113             case A_CHAOTIC:
114             case A_NONE:
115                 dtype = ndemon(atyp);
116                 break;
117             }
118         } else {
119             dtype = PM_ANGEL;
120         }
121         cnt = ((dtype != NON_PM)
122                && !rn2(4) && !is_lord(&mons[dtype])) ? 2 : 1;
123     }
124
125     if (dtype == NON_PM)
126         return 0;
127
128     /* sanity checks */
129     if (cnt > 1 && (mons[dtype].geno & G_UNIQ))
130         cnt = 1;
131     /*
132      * If this daemon is unique and being re-summoned (the only way we
133      * could get this far with an extinct dtype), try another.
134      */
135     if (mvitals[dtype].mvflags & G_GONE) {
136         dtype = ndemon(atyp);
137         if (dtype == NON_PM)
138             return 0;
139     }
140
141     /* some candidates can generate a group of monsters, so simple
142        count of non-null makemon() result is not sufficient */
143     census = monster_census(FALSE);
144
145     while (cnt > 0) {
146         mtmp = makemon(&mons[dtype], u.ux, u.uy, MM_EMIN);
147         if (mtmp) {
148             result++;
149             /* an angel's alignment should match the summoner */
150             if (dtype == PM_ANGEL) {
151                 mtmp->isminion = 1;
152                 EMIN(mtmp)->min_align = atyp;
153                 /* renegade if same alignment but not peaceful
154                    or peaceful but different alignment */
155                 EMIN(mtmp)->renegade =
156                     (atyp != u.ualign.type) ^ !mtmp->mpeaceful;
157             }
158             if (is_demon(ptr) && canseemon(mtmp))
159 /*JP
160                 pline("%s appears in a cloud of smoke!", Amonnam(mtmp));
161 */
162                 pline("%s\82ª\89\8c\82Ì\92\86\82©\82ç\8c»\82ê\82½\81I", Amonnam(mtmp));
163         }
164         cnt--;
165     }
166
167     /* how many monsters exist now compared to before? */
168     if (result)
169         result = monster_census(FALSE) - census;
170
171     return result;
172 }
173
174 void
175 summon_minion(alignment, talk)
176 aligntyp alignment;
177 boolean talk;
178 {
179     register struct monst *mon;
180     int mnum;
181
182     switch ((int) alignment) {
183     case A_LAWFUL:
184         mnum = lminion();
185         break;
186     case A_NEUTRAL:
187         mnum = PM_AIR_ELEMENTAL + rn2(4);
188         break;
189     case A_CHAOTIC:
190     case A_NONE:
191         mnum = ndemon(alignment);
192         break;
193     default:
194         impossible("unaligned player?");
195         mnum = ndemon(A_NONE);
196         break;
197     }
198     if (mnum == NON_PM) {
199         mon = 0;
200     } else if (mnum == PM_ANGEL) {
201         mon = makemon(&mons[mnum], u.ux, u.uy, MM_EMIN);
202         if (mon) {
203             mon->isminion = 1;
204             EMIN(mon)->min_align = alignment;
205             EMIN(mon)->renegade = FALSE;
206         }
207     } else if (mnum != PM_SHOPKEEPER && mnum != PM_GUARD
208                && mnum != PM_ALIGNED_PRIEST && mnum != PM_HIGH_PRIEST) {
209         /* This was mons[mnum].pxlth == 0 but is this restriction
210            appropriate or necessary now that the structures are separate? */
211         mon = makemon(&mons[mnum], u.ux, u.uy, MM_EMIN);
212         if (mon) {
213             mon->isminion = 1;
214             EMIN(mon)->min_align = alignment;
215             EMIN(mon)->renegade = FALSE;
216         }
217     } else {
218         mon = makemon(&mons[mnum], u.ux, u.uy, NO_MM_FLAGS);
219     }
220     if (mon) {
221         if (talk) {
222             if (!Deaf)
223 /*JP
224                 pline_The("voice of %s booms:", align_gname(alignment));
225 */
226                 pline("%s\82Ì\90º\82ª\8b¿\82¢\82½:", align_gname(alignment));
227             else
228 #if 0 /*JP:T*/
229                 You_feel("%s booming voice:",
230                          s_suffix(align_gname(alignment)));
231 #else
232                 You_feel("%s\82Ì\8b¿\82­\90º\82ð\8a´\82\82½:",
233                          s_suffix(align_gname(alignment)));
234 #endif
235 /*JP
236             verbalize("Thou shalt pay for thine indiscretion!");
237 */
238             verbalize("\93ð\81C\96³\95ª\95Ê\82È\82é\8ds\82¢\82Ì\94±\82ð\8eó\82¯\82é\82×\82µ\81I");
239             if (canspotmon(mon))
240 /*JP
241                 pline("%s appears before you.", Amonnam(mon));
242 */
243                 pline("%s\82ª\82 \82È\82½\82Ì\91O\82É\8c»\82í\82ê\82½\81D", Amonnam(mon));
244             mon->mstrategy &= ~STRAT_APPEARMSG;
245         }
246         mon->mpeaceful = FALSE;
247         /* don't call set_malign(); player was naughty */
248     }
249 }
250
251 #define Athome (Inhell && (mtmp->cham == NON_PM))
252
253 /* returns 1 if it won't attack. */
254 int
255 demon_talk(mtmp)
256 register struct monst *mtmp;
257 {
258     long cash, demand, offer;
259
260     if (uwep && uwep->oartifact == ART_EXCALIBUR) {
261 /*JP
262         pline("%s looks very angry.", Amonnam(mtmp));
263 */
264         pline("%s\82Í\82Æ\82Ä\82à\93{\82Á\82Ä\82¢\82é\82æ\82¤\82É\8c©\82¦\82é\81D", Amonnam(mtmp));
265         mtmp->mpeaceful = mtmp->mtame = 0;
266         set_malign(mtmp);
267         newsym(mtmp->mx, mtmp->my);
268         return 0;
269     }
270
271     if (is_fainted()) {
272         reset_faint(); /* if fainted - wake up */
273     } else {
274         stop_occupation();
275         if (multi > 0) {
276             nomul(0);
277             unmul((char *) 0);
278         }
279     }
280
281     /* Slight advantage given. */
282     if (is_dprince(mtmp->data) && mtmp->minvis) {
283         boolean wasunseen = !canspotmon(mtmp);
284
285         mtmp->minvis = mtmp->perminvis = 0;
286         if (wasunseen && canspotmon(mtmp)) {
287 /*JP
288             pline("%s appears before you.", Amonnam(mtmp));
289 */
290             pline("%s\82ª\96Ú\82Ì\91O\82É\8c»\82í\82ê\82½\81D", Amonnam(mtmp));
291             mtmp->mstrategy &= ~STRAT_APPEARMSG;
292         }
293         newsym(mtmp->mx, mtmp->my);
294     }
295     if (youmonst.data->mlet == S_DEMON) { /* Won't blackmail their own. */
296         if (!Deaf)
297 #if 0 /*JP:T*/
298             pline("%s says, \"Good hunting, %s.\"", Amonnam(mtmp),
299                   flags.female ? "Sister" : "Brother");
300 #else
301         pline("%s\82Í\8c¾\82Á\82½\81u\82æ\82¤\8cZ%s\81I\81v\81D\82»\82µ\82Ä\8fÁ\82¦\82½\81D", Amonnam(mtmp),
302               flags.female ? "\96\85" : "\92í");
303 #endif
304         else if (canseemon(mtmp))
305 /*JP
306             pline("%s says something.", Amonnam(mtmp));
307 */
308             pline("%s\82Í\89½\82©\82ð\8c¾\82Á\82½\81D", Amonnam(mtmp));
309         if (!tele_restrict(mtmp))
310             (void) rloc(mtmp, TRUE);
311         return 1;
312     }
313     cash = money_cnt(invent);
314     demand = (cash * (rnd(80) + 20 * Athome))
315            / (100 * (1 + (sgn(u.ualign.type) == sgn(mtmp->data->maligntyp))));
316
317     if (!demand || multi < 0) { /* you have no gold or can't move */
318         mtmp->mpeaceful = 0;
319         set_malign(mtmp);
320         return 0;
321     } else {
322         /* make sure that the demand is unmeetable if the monster
323            has the Amulet, preventing monster from being satisfied
324            and removed from the game (along with said Amulet...) */
325         /* [actually the Amulet is safe; it would be dropped when
326            mongone() gets rid of the monster; force combat anyway;
327            also make it unmeetable if the player is Deaf, to simplify
328            handling that case as player-won't-pay] */
329         if (mon_has_amulet(mtmp) || Deaf)
330             /* 125: 5*25 in case hero has maximum possible charisma */
331             demand = cash + (long) rn1(1000, 125);
332
333         if (!Deaf)
334 #if 0 /*JP:T*/
335             pline("%s demands %ld %s for safe passage.",
336                   Amonnam(mtmp), demand, currency(demand));
337 #else
338             pline("%s\82Í\92Ê\8ds\97¿\82Æ\82µ\82Ä%ld%s\97v\8b\81\82µ\82½\81D",
339                   Amonnam(mtmp), demand, currency(demand));
340 #endif
341         else if (canseemon(mtmp))
342 /*JP
343             pline("%s seems to be demanding something.", Amonnam(mtmp));
344 */
345             pline("%s\82Í\89½\82©\82ð\97v\8b\81\82µ\82Ä\82¢\82é\82æ\82¤\82¾\81D", Amonnam(mtmp));
346
347         offer = 0L;
348         if (!Deaf && ((offer = bribe(mtmp)) >= demand)) {
349 /*JP
350             pline("%s vanishes, laughing about cowardly mortals.",
351 */
352             pline("\89°\95a\82È\92è\96½\82Ì\82à\82Ì\82ð\8fÎ\82¢\82È\82ª\82ç\81C%s\82Í\8fÁ\82¦\82½\81D",
353                   Amonnam(mtmp));
354         } else if (offer > 0L
355                    && (long) rnd(5 * ACURR(A_CHA)) > (demand - offer)) {
356 /*JP
357             pline("%s scowls at you menacingly, then vanishes.",
358 */
359             pline("%s\82Í\82 \82È\82½\82ð\88Ð\8ad\82µ\81C\8fÁ\82¦\82½\81D",
360                   Amonnam(mtmp));
361         } else {
362 /*JP
363             pline("%s gets angry...", Amonnam(mtmp));
364 */
365             pline("%s\82Í\93{\82Á\82½\81D\81D\81D", Amonnam(mtmp));
366             mtmp->mpeaceful = 0;
367             set_malign(mtmp);
368             return 0;
369         }
370     }
371     mongone(mtmp);
372     return 1;
373 }
374
375 long
376 bribe(mtmp)
377 struct monst *mtmp;
378 {
379     char buf[BUFSZ] = DUMMY;
380     long offer;
381     long umoney = money_cnt(invent);
382
383 /*JP
384     getlin("How much will you offer?", buf);
385 */
386     getlin("\82¨\8bà\82ð\82¢\82­\82ç\97^\82¦\82é\81H", buf);
387     if (sscanf(buf, "%ld", &offer) != 1)
388         offer = 0L;
389
390     /*Michael Paddon -- fix for negative offer to monster*/
391     /*JAR880815 - */
392     if (offer < 0L) {
393 /*JP
394         You("try to shortchange %s, but fumble.", mon_nam(mtmp));
395 */
396         You("%s\82ð\82¾\82Ü\82»\82¤\82Æ\82µ\82½\82ª\81C\8e¸\94s\82µ\82½\81D", mon_nam(mtmp));
397         return 0L;
398     } else if (offer == 0L) {
399 /*JP
400         You("refuse.");
401 */
402         You("\8b\91\82ñ\82¾\81D");
403         return 0L;
404     } else if (offer >= umoney) {
405 /*JP
406         You("give %s all your gold.", mon_nam(mtmp));
407 */
408         You("%s\82É\82¨\8bà\82ð\91S\82Ä\97^\82¦\82½\81D", mon_nam(mtmp));
409         offer = umoney;
410     } else {
411 /*JP
412         You("give %s %ld %s.", mon_nam(mtmp), offer, currency(offer));
413 */
414         You("%s\82É%ld%s\97^\82¦\82½\81D", mon_nam(mtmp), offer, currency(offer));
415     }
416     (void) money2mon(mtmp, offer);
417     context.botl = 1;
418     return offer;
419 }
420
421 int
422 dprince(atyp)
423 aligntyp atyp;
424 {
425     int tryct, pm;
426
427     for (tryct = !In_endgame(&u.uz) ? 20 : 0; tryct > 0; --tryct) {
428         pm = rn1(PM_DEMOGORGON + 1 - PM_ORCUS, PM_ORCUS);
429         if (!(mvitals[pm].mvflags & G_GONE)
430             && (atyp == A_NONE || sgn(mons[pm].maligntyp) == sgn(atyp)))
431             return pm;
432     }
433     return dlord(atyp); /* approximate */
434 }
435
436 int
437 dlord(atyp)
438 aligntyp atyp;
439 {
440     int tryct, pm;
441
442     for (tryct = !In_endgame(&u.uz) ? 20 : 0; tryct > 0; --tryct) {
443         pm = rn1(PM_YEENOGHU + 1 - PM_JUIBLEX, PM_JUIBLEX);
444         if (!(mvitals[pm].mvflags & G_GONE)
445             && (atyp == A_NONE || sgn(mons[pm].maligntyp) == sgn(atyp)))
446             return pm;
447     }
448     return ndemon(atyp); /* approximate */
449 }
450
451 /* create lawful (good) lord */
452 int
453 llord()
454 {
455     if (!(mvitals[PM_ARCHON].mvflags & G_GONE))
456         return PM_ARCHON;
457
458     return lminion(); /* approximate */
459 }
460
461 int
462 lminion()
463 {
464     int tryct;
465     struct permonst *ptr;
466
467     for (tryct = 0; tryct < 20; tryct++) {
468         ptr = mkclass(S_ANGEL, 0);
469         if (ptr && !is_lord(ptr))
470             return monsndx(ptr);
471     }
472
473     return NON_PM;
474 }
475
476 int
477 ndemon(atyp)
478 aligntyp atyp; /* A_NONE is used for 'any alignment' */
479 {
480     struct permonst *ptr;
481
482     /*
483      * 3.6.2:  [fixed #H2204, 22-Dec-2010, eight years later...]
484      * pick a correctly aligned demon in one try.  This used to
485      * use mkclass() to choose a random demon type and keep trying
486      * (up to 20 times) until it got one with the desired alignment.
487      * mkclass_aligned() skips wrongly aligned potential candidates.
488      * [The only neutral demons are djinni and mail daemon and
489      * mkclass() won't pick them, but call it anyway in case either
490      * aspect of that changes someday.]
491      */
492 #if 0
493     if (atyp == A_NEUTRAL)
494         return NON_PM;
495 #endif
496     ptr = mkclass_aligned(S_DEMON, 0, atyp);
497     return (ptr && is_ndemon(ptr)) ? monsndx(ptr) : NON_PM;
498 }
499
500 /* guardian angel has been affected by conflict so is abandoning hero */
501 void
502 lose_guardian_angel(mon)
503 struct monst *mon; /* if null, angel hasn't been created yet */
504 {
505     coord mm;
506     int i;
507
508     if (mon) {
509         if (canspotmon(mon)) {
510             if (!Deaf) {
511 /*JP
512                 pline("%s rebukes you, saying:", Monnam(mon));
513 */
514                 pline("%s\82Í\82 \82È\82½\82ð\94ñ\93ï\82µ\82½\81F", Monnam(mon));
515 /*JP
516                 verbalize("Since you desire conflict, have some more!");
517 */
518                 verbalize("\93¬\91\88\82ð\96]\82ñ\82Å\82¢\82é\82æ\82¤\82¾\82©\82ç\81C\82à\82Á\82Æ\97^\82¦\82Ä\82â\82ë\82¤\81I");
519             } else {
520 /*JP
521                 pline("%s vanishes!", Monnam(mon));
522 */
523                 pline("%s\82Í\8fÁ\82¦\82½\81I", Monnam(mon));
524             }
525         }
526         mongone(mon);
527     }
528     /* create 2 to 4 hostile angels to replace the lost guardian */
529     for (i = rn1(3, 2); i > 0; --i) {
530         mm.x = u.ux;
531         mm.y = u.uy;
532         if (enexto(&mm, mm.x, mm.y, &mons[PM_ANGEL]))
533             (void) mk_roamer(&mons[PM_ANGEL], u.ualign.type, mm.x, mm.y,
534                              FALSE);
535     }
536 }
537
538 /* just entered the Astral Plane; receive tame guardian angel if worthy */
539 void
540 gain_guardian_angel()
541 {
542     struct monst *mtmp;
543     struct obj *otmp;
544     coord mm;
545
546     Hear_again(); /* attempt to cure any deafness now (divine
547                      message will be heard even if that fails) */
548     if (Conflict) {
549         if (!Deaf)
550 /*JP
551             pline("A voice booms:");
552 */
553             pline("\90º\82ª\8b¿\82¢\82½:");
554         else
555 /*JP
556             You_feel("a booming voice:");
557 */
558             You_feel("\8b¿\82­\90º\82ð\8a´\82\82½:");
559 /*JP
560         verbalize("Thy desire for conflict shall be fulfilled!");
561 */
562         verbalize("\81u\93ð\82Ì\93¬\91\88\82Ö\82Ì\96]\82Ý\81C\82©\82È\82¦\82ç\82ê\82é\82×\82µ\81I\81v");
563         /* send in some hostile angels instead */
564         lose_guardian_angel((struct monst *) 0);
565     } else if (u.ualign.record > 8) { /* fervent */
566         if (!Deaf)
567 /*JP
568             pline("A voice whispers:");
569 */
570             pline("\82³\82³\82â\82«\90º\82ª\95·\82±\82¦\82½:");
571         else
572 /*JP
573             You_feel("a soft voice:");
574 */
575             You_feel("\82â\82í\82ç\82©\82¢\90º\82ð\8a´\82\82½:");
576 /*JP
577         verbalize("Thou hast been worthy of me!");
578 */
579         verbalize("\81u\93ð\81C\89ä\82ª\95]\89¿\82ð\93¾\82½\82è\81I\81v");
580         mm.x = u.ux;
581         mm.y = u.uy;
582         if (enexto(&mm, mm.x, mm.y, &mons[PM_ANGEL])
583             && (mtmp = mk_roamer(&mons[PM_ANGEL], u.ualign.type, mm.x, mm.y,
584                                  TRUE)) != 0) {
585             mtmp->mstrategy &= ~STRAT_APPEARMSG;
586             /* guardian angel -- the one case mtame doesn't imply an
587              * edog structure, so we don't want to call tamedog().
588              * [Note: this predates mon->mextra which allows a monster
589              * to have both emin and edog at the same time.]
590              */
591             mtmp->mtame = 10;
592             /* for 'hilite_pet'; after making tame, before next message */
593             newsym(mtmp->mx, mtmp->my);
594             if (!Blind)
595 /*JP
596                 pline("An angel appears near you.");
597 */
598                 pline("\93V\8eg\82ª\82 \82È\82½\82Ì\82»\82Î\82É\8c»\82í\82ê\82½\81D");
599             else
600 /*JP
601                 You_feel("the presence of a friendly angel near you.");
602 */
603                 You("\8bß\82­\82É\97F\8dD\93I\82È\93V\8eg\82Ì\91\8dÝ\82ð\8a´\82\82½\81D");
604             /* make him strong enough vs. endgame foes */
605             mtmp->m_lev = rn1(8, 15);
606             mtmp->mhp = mtmp->mhpmax =
607                 d((int) mtmp->m_lev, 10) + 30 + rnd(30);
608             if ((otmp = select_hwep(mtmp)) == 0) {
609                 otmp = mksobj(SILVER_SABER, FALSE, FALSE);
610                 if (mpickobj(mtmp, otmp))
611                     panic("merged weapon?");
612             }
613             bless(otmp);
614             if (otmp->spe < 4)
615                 otmp->spe += rnd(4);
616             if ((otmp = which_armor(mtmp, W_ARMS)) == 0
617                 || otmp->otyp != SHIELD_OF_REFLECTION) {
618                 (void) mongets(mtmp, AMULET_OF_REFLECTION);
619                 m_dowear(mtmp, TRUE);
620             }
621         }
622     }
623 }
624
625 /*minion.c*/