OSDN Git Service

fix #36370
[jnethack/source.git] / src / mhitu.c
1 /* NetHack 3.6  mhitu.c $NHDT-Date: 1446854230 2015/11/06 23:57:10 $  $NHDT-Branch: master $:$NHDT-Revision: 1.130 $ */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /* NetHack may be freely redistributed.  See license for details. */
4
5 /* JNetHack Copyright */
6 /* (c) Issei Numata, Naoki Hamada, Shigehiro Miyashita, 1994-2000  */
7 /* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2016            */
8 /* JNetHack may be freely redistributed.  See license for details. */
9
10 #include "hack.h"
11 #include "artifact.h"
12
13 STATIC_VAR NEARDATA struct obj *otmp;
14
15 STATIC_DCL boolean FDECL(u_slip_free, (struct monst *, struct attack *));
16 STATIC_DCL int FDECL(passiveum,
17                      (struct permonst *, struct monst *, struct attack *));
18
19 STATIC_DCL void FDECL(mayberem, (struct obj *, const char *));
20
21 STATIC_DCL boolean FDECL(diseasemu, (struct permonst *));
22 STATIC_DCL int FDECL(hitmu, (struct monst *, struct attack *));
23 STATIC_DCL int FDECL(gulpmu, (struct monst *, struct attack *));
24 STATIC_DCL int FDECL(explmu, (struct monst *, struct attack *, BOOLEAN_P));
25 STATIC_DCL void FDECL(missmu, (struct monst *, BOOLEAN_P, struct attack *));
26 STATIC_DCL void FDECL(mswings, (struct monst *, struct obj *));
27 STATIC_DCL void FDECL(wildmiss, (struct monst *, struct attack *));
28
29 STATIC_DCL void FDECL(hitmsg, (struct monst *, struct attack *));
30
31 /* See comment in mhitm.c.  If we use this a lot it probably should be */
32 /* changed to a parameter to mhitu. */
33 static int dieroll;
34
35 STATIC_OVL void
36 hitmsg(mtmp, mattk)
37 register struct monst *mtmp;
38 register struct attack *mattk;
39 {
40     int compat;
41
42     /* Note: if opposite gender, "seductively" */
43     /* If same gender, "engagingly" for nymph, normal msg for others */
44     if ((compat = could_seduce(mtmp, &youmonst, mattk)) && !mtmp->mcan
45         && !mtmp->mspec_used) {
46 #if 0 /*JP*/
47         pline("%s %s you %s.", Monnam(mtmp), Blind ? "talks to" : "smiles at",
48               compat == 2 ? "engagingly" : "seductively");
49 #else
50         pline("%s\82Í\82 \82È\82½%s%s\81D", Monnam(mtmp),
51               compat == 2 ? "\82ð\88ø\82«\82Â\82¯\82é\82æ\82¤\82É" : "\82É\8dD\88Ó\82ð\82æ\82¹\82é\82æ\82¤\82É",
52               Blind ? "\98b\82µ\82©\82¯\82½" : "\94÷\8fÎ\82ñ\82¾");
53 #endif
54     } else
55         switch (mattk->aatyp) {
56         case AT_BITE:
57 /*JP
58             pline("%s bites!", Monnam(mtmp));
59 */
60             pline("%s\82Í\8a\9a\82Ý\82Â\82¢\82½\81I", Monnam(mtmp));
61             break;
62         case AT_KICK:
63 #if 0 /*JP*/
64             pline("%s kicks%c", Monnam(mtmp),
65                   thick_skinned(youmonst.data) ? '.' : '!');
66 #else
67             pline("%s\82Í\8fR\82Æ\82Î\82µ\82½%s",Monnam(mtmp), 
68                   thick_skinned(youmonst.data) ? "\81D" : "\81I");
69 #endif
70             break;
71         case AT_STNG:
72 /*JP
73             pline("%s stings!", Monnam(mtmp));
74 */
75             pline("%s\82Í\93Ë\82«\82³\82µ\82½\81I", Monnam(mtmp));
76             break;
77         case AT_BUTT:
78 /*JP
79             pline("%s butts!", Monnam(mtmp));
80 */
81             pline("%s\82Í\93ª\93Ë\82«\82ð\82­\82ç\82í\82µ\82½\81I", Monnam(mtmp));
82             break;
83         case AT_TUCH:
84 /*JP
85             pline("%s touches you!", Monnam(mtmp));
86 */
87             pline("%s\82Í\82 \82È\82½\82É\90G\82ê\82½\81I", Monnam(mtmp));
88             break;
89         case AT_TENT:
90 /*JP
91             pline("%s tentacles suck you!", s_suffix(Monnam(mtmp)));
92 */
93             pline("%s\82Ì\90G\8eè\82ª\82 \82È\82½\82Ì\91Ì\89t\82ð\8bz\82¢\82Æ\82Á\82½\81I", Monnam(mtmp));
94             break;
95         case AT_EXPL:
96         case AT_BOOM:
97 /*JP
98             pline("%s explodes!", Monnam(mtmp));
99 */
100             pline("%s\82Í\94\9a\94­\82µ\82½\81I", Monnam(mtmp));
101             break;
102         default:
103 /*JP
104             pline("%s hits!", Monnam(mtmp));
105 */
106             pline("%s\82Ì\8dU\8c\82\82Í\96½\92\86\82µ\82½\81I", Monnam(mtmp));
107         }
108 }
109
110 /* monster missed you */
111 STATIC_OVL void
112 missmu(mtmp, nearmiss, mattk)
113 struct monst *mtmp;
114 boolean nearmiss;
115 struct attack *mattk;
116 {
117     if (!canspotmon(mtmp))
118         map_invisible(mtmp->mx, mtmp->my);
119
120     if (could_seduce(mtmp, &youmonst, mattk) && !mtmp->mcan)
121 /*JP
122         pline("%s pretends to be friendly.", Monnam(mtmp));
123 */
124         pline("%s\82Í\97F\8dD\93I\82È\82Ó\82è\82ð\82µ\82Ä\82¢\82é\81D",Monnam(mtmp));
125     else
126 #if 0 /*JP*/
127         pline("%s %smisses!", Monnam(mtmp),
128               (nearmiss && flags.verbose) ? "just " : "");
129 #else
130         pline("%s\82Ì\8dU\8c\82\82Í%s\82½\81D", Monnam(mtmp),
131               (nearmiss && flags.verbose) ? "\8bó\82ð\90Ø\82Á" : "\82Í\82¸\82ê");
132 #endif
133
134     stop_occupation();
135 }
136
137 /* monster swings obj */
138 STATIC_OVL void
139 mswings(mtmp, otemp)
140 struct monst *mtmp;
141 struct obj *otemp;
142 {
143     if (flags.verbose && !Blind && mon_visible(mtmp)) {
144 #if 0 /*JP*/
145         pline("%s %s %s%s %s.", Monnam(mtmp),
146               (objects[otemp->otyp].oc_dir & PIERCE) ? "thrusts" : "swings",
147               (otemp->quan > 1L) ? "one of " : "", mhis(mtmp), xname(otemp));
148 #else
149         pline("%s\82Í%s%s\81D", Monnam(mtmp),
150               xname(otemp),
151               (objects[otemp->otyp].oc_dir & PIERCE) ? "\82ð\93Ë\82¢\82½" : "\82ð\90U\82è\82Ü\82í\82µ\82½");
152 #endif
153     }
154 }
155
156 /* return how a poison attack was delivered */
157 const char *
158 mpoisons_subj(mtmp, mattk)
159 struct monst *mtmp;
160 struct attack *mattk;
161 {
162     if (mattk->aatyp == AT_WEAP) {
163         struct obj *mwep = (mtmp == &youmonst) ? uwep : MON_WEP(mtmp);
164         /* "Foo's attack was poisoned." is pretty lame, but at least
165            it's better than "sting" when not a stinging attack... */
166 /*JP
167         return (!mwep || !mwep->opoisoned) ? "attack" : "weapon";
168 */
169         return (!mwep || !mwep->opoisoned) ? "\8dU\8c\82" : "\95\90\8aí";
170     } else {
171 #if 0 /*JP*/
172         return (mattk->aatyp == AT_TUCH) ? "contact"
173                   : (mattk->aatyp == AT_GAZE) ? "gaze"
174                        : (mattk->aatyp == AT_BITE) ? "bite" : "sting";
175 #else
176         return (mattk->aatyp == AT_TUCH) ? "\90Ú\90G"
177                   : (mattk->aatyp == AT_GAZE) ? "\82É\82ç\82Ý"
178                        : (mattk->aatyp == AT_BITE) ? "\8a\9a\82Ý\82Â\82«" : "\93Ë\82«\82³\82µ";
179 #endif
180     }
181 }
182
183 /* called when your intrinsic speed is taken away */
184 void
185 u_slow_down()
186 {
187     HFast = 0L;
188     if (!Fast)
189 /*JP
190         You("slow down.");
191 */
192         You("\93®\82«\82ª\92x\82­\82È\82Á\82½\81D");
193     else /* speed boots */
194 /*JP
195         Your("quickness feels less natural.");
196 */
197         You("\91¬\82³\82É\82Â\82¢\82Ä\82¢\82¯\82È\82­\82È\82Á\82½\81D");
198     exercise(A_DEX, FALSE);
199 }
200
201 /* monster attacked your displaced image */
202 STATIC_OVL void
203 wildmiss(mtmp, mattk)
204 register struct monst *mtmp;
205 register struct attack *mattk;
206 {
207     int compat;
208
209     /* no map_invisible() -- no way to tell where _this_ is coming from */
210
211     if (!flags.verbose)
212         return;
213     if (!cansee(mtmp->mx, mtmp->my))
214         return;
215     /* maybe it's attacking an image around the corner? */
216
217     compat = ((mattk->adtyp == AD_SEDU || mattk->adtyp == AD_SSEX)
218               && could_seduce(mtmp, &youmonst, (struct attack *) 0));
219
220     if (!mtmp->mcansee || (Invis && !perceives(mtmp->data))) {
221 #if 0 /*JP*/
222         const char *swings =
223             mattk->aatyp == AT_BITE
224                 ? "snaps"
225                 : mattk->aatyp == AT_KICK
226                       ? "kicks"
227                       : (mattk->aatyp == AT_STNG || mattk->aatyp == AT_BUTT
228                          || nolimbs(mtmp->data))
229                             ? "lunges"
230                             : "swings";
231 #else
232         const char *swings =
233             mattk->aatyp == AT_BITE
234                 ? "\8a\9a\82Ý\82Â\82­"
235                 : mattk->aatyp == AT_KICK
236                       ? "\8fR\82Æ\82Î\82·"
237                       : (mattk->aatyp == AT_STNG || mattk->aatyp == AT_BUTT
238                          || nolimbs(mtmp->data))
239                             ? "\93Ë\90i\82·\82é"
240                             : "\90U\82è\89ñ\82·";
241 #endif
242
243         if (compat)
244 /*JP
245             pline("%s tries to touch you and misses!", Monnam(mtmp));
246 */
247             pline("%s\82Í\82 \82È\82½\82É\90G\82ë\82¤\82Æ\82µ\82½\82ª\8e¸\94s\82µ\82½\81I", Monnam(mtmp));
248         else
249             switch (rn2(3)) {
250             case 0:
251 /*JP
252                 pline("%s %s wildly and misses!", Monnam(mtmp), swings);
253 */
254                 pline("%s\82Í\8c\83\82µ\82­%s\82ª\81C\82Í\82¸\82µ\82½\81D", Monnam(mtmp), jpast(swings));
255                 break;
256             case 1:
257 /*JP
258                 pline("%s attacks a spot beside you.", Monnam(mtmp));
259 */
260                 pline("%s\82Ì\8dU\8c\82\82Í\82 \82È\82½\82Ì\98e\95 \82ð\82©\82·\82ß\82½\81D", Monnam(mtmp));
261                 break;
262             case 2:
263 #if 0 /*JP*/
264                 pline("%s strikes at %s!", Monnam(mtmp),
265                       levl[mtmp->mux][mtmp->muy].typ == WATER ? "empty water"
266                                                               : "thin air");
267 #else
268                 pline("%s\82Í%s\82ð\91Å\82¿\82Â\82¯\82½\81I", Monnam(mtmp),
269                       levl[mtmp->mux][mtmp->muy].typ == WATER ? "\90\85"
270                                                               : "\89½\82à\82È\82¢\82Æ\82±\82ë");
271 #endif
272                 break;
273             default:
274 /*JP
275                 pline("%s %s wildly!", Monnam(mtmp), swings);
276 */
277                 pline("%s\82Í\8c\83\82µ\82­%s\81I", Monnam(mtmp), jpast(swings));
278                 break;
279             }
280
281     } else if (Displaced) {
282         if (compat)
283 #if 0 /*JP*/
284             pline("%s smiles %s at your %sdisplaced image...", Monnam(mtmp),
285                   compat == 2 ? "engagingly" : "seductively",
286                   Invis ? "invisible " : "");
287 #else
288             pline("%s\82Í%s\82 \82È\82½\82Ì\8c\89e\82É\91Î\82µ\82Ä%s\94÷\8fÎ\82ñ\82¾\81D\81D\81D", Monnam(mtmp),
289                   Invis ? "\93§\96¾\82È" : "",
290                   compat == 2 ? "\96£\97Í\93I\82É" : "\97U\98f\93I\82É");
291 #endif
292         else
293 #if 0 /*JP*/
294             pline("%s strikes at your %sdisplaced image and misses you!",
295                   /* Note: if you're both invisible and displaced,
296                    * only monsters which see invisible will attack your
297                    * displaced image, since the displaced image is also
298                    * invisible.
299                    */
300                   Monnam(mtmp), Invis ? "invisible " : "");
301 #else
302             pline("%s\82Í\82 \82È\82½\82Ì%s\8c\89e\82ð\8dU\8c\82\82µ\81C\82Í\82¸\82µ\82½\81I",
303                   Monnam(mtmp), Invis ? "\93§\96¾\82È" : "");
304 #endif
305
306     } else if (Underwater) {
307         /* monsters may miss especially on water level where
308            bubbles shake the player here and there */
309         if (compat)
310 /*JP
311             pline("%s reaches towards your distorted image.", Monnam(mtmp));
312 */
313             pline("%s\82Í\82 \82È\82½\82Ì\98c\82ñ\82¾\8c\89e\82Ì\95û\82Ö\8cü\82©\82Á\82½\81D", Monnam(mtmp));
314         else
315 /*JP
316             pline("%s is fooled by water reflections and misses!",
317 */
318             pline("%s\82Í\90\85\82Ì\94½\8eË\82É\82¾\82Ü\82³\82ê\81C\82Í\82¸\82µ\82½\81I",
319                   Monnam(mtmp));
320
321     } else
322         impossible("%s attacks you without knowing your location?",
323                    Monnam(mtmp));
324 }
325
326 void
327 expels(mtmp, mdat, message)
328 struct monst *mtmp;
329 struct permonst *mdat; /* if mtmp is polymorphed, mdat != mtmp->data */
330 boolean message;
331 {
332     if (message) {
333         if (is_animal(mdat))
334 /*JP
335             You("get regurgitated!");
336 */
337             You("\93f\82«\82¾\82³\82ê\82½\81I");
338         else {
339             char blast[40];
340             register int i;
341
342             blast[0] = '\0';
343             for (i = 0; i < NATTK; i++)
344                 if (mdat->mattk[i].aatyp == AT_ENGL)
345                     break;
346             if (mdat->mattk[i].aatyp != AT_ENGL)
347                 impossible("Swallower has no engulfing attack?");
348             else {
349                 if (is_whirly(mdat)) {
350                     switch (mdat->mattk[i].adtyp) {
351                     case AD_ELEC:
352 /*JP
353                         Strcpy(blast, " in a shower of sparks");
354 */
355                         Strcpy(blast, "\82Ì\89Î\89Ô\82Ì\89J\82Ì\92\86\82©\82ç");
356                         break;
357                     case AD_COLD:
358 /*JP
359                         Strcpy(blast, " in a blast of frost");
360 */
361                         Strcpy(blast, "\82Ì\97â\8bC\82Ì\95\97\82Ì\92\86\82©\82ç");
362                         break;
363                     }
364                 } else
365 /*JP
366                     Strcpy(blast, " with a squelch");
367 */
368                     Strcpy(blast, "\82©\82ç\93f\82«\8fo\82³\82ê\82é\82æ\82¤\82É");
369 /*JP
370                 You("get expelled from %s%s!", mon_nam(mtmp), blast);
371 */
372                 You("%s%s\92E\8fo\82µ\82½\81I", mon_nam(mtmp), blast);
373             }
374         }
375     }
376     unstuck(mtmp); /* ball&chain returned in unstuck() */
377     mnexto(mtmp);
378     newsym(u.ux, u.uy);
379     spoteffects(TRUE);
380     /* to cover for a case where mtmp is not in a next square */
381     if (um_dist(mtmp->mx, mtmp->my, 1))
382 /*JP
383         pline("Brrooaa...  You land hard at some distance.");
384 */
385         pline("\83u\83\8d\83\8d\83\8d\81D\81D\89\93\82­\82É\92\85\97¤\82·\82é\82Ì\82Í\93ï\82µ\82¢\81D");
386 }
387
388 /* select a monster's next attack, possibly substituting for its usual one */
389 struct attack *
390 getmattk(mptr, indx, prev_result, alt_attk_buf)
391 struct permonst *mptr;
392 int indx, prev_result[];
393 struct attack *alt_attk_buf;
394 {
395     struct attack *attk = &mptr->mattk[indx];
396
397     /* prevent a monster with two consecutive disease or hunger attacks
398        from hitting with both of them on the same turn; if the first has
399        already hit, switch to a stun attack for the second */
400     if (indx > 0 && prev_result[indx - 1] > 0
401         && (attk->adtyp == AD_DISE || attk->adtyp == AD_PEST
402             || attk->adtyp == AD_FAMN)
403         && attk->adtyp == mptr->mattk[indx - 1].adtyp) {
404         *alt_attk_buf = *attk;
405         attk = alt_attk_buf;
406         attk->adtyp = AD_STUN;
407     }
408     return attk;
409 }
410
411 /*
412  * mattacku: monster attacks you
413  *      returns 1 if monster dies (e.g. "yellow light"), 0 otherwise
414  *      Note: if you're displaced or invisible the monster might attack the
415  *              wrong position...
416  *      Assumption: it's attacking you or an empty square; if there's another
417  *              monster which it attacks by mistake, the caller had better
418  *              take care of it...
419  */
420 int
421 mattacku(mtmp)
422 register struct monst *mtmp;
423 {
424     struct attack *mattk, alt_attk;
425     int i, j, tmp, sum[NATTK];
426     struct permonst *mdat = mtmp->data;
427     boolean ranged = (distu(mtmp->mx, mtmp->my) > 3);
428     /* Is it near you?  Affects your actions */
429     boolean range2 = !monnear(mtmp, mtmp->mux, mtmp->muy);
430     /* Does it think it's near you?  Affects its actions */
431     boolean foundyou = (mtmp->mux == u.ux && mtmp->muy == u.uy);
432     /* Is it attacking you or your image? */
433     boolean youseeit = canseemon(mtmp);
434     /* Might be attacking your image around the corner, or
435      * invisible, or you might be blind....
436      */
437     boolean skipnonmagc = FALSE;
438     /* Are further physical attack attempts useless? */
439
440     if (!ranged)
441         nomul(0);
442     if (mtmp->mhp <= 0 || (Underwater && !is_swimmer(mtmp->data)))
443         return 0;
444
445     /* If swallowed, can only be affected by u.ustuck */
446     if (u.uswallow) {
447         if (mtmp != u.ustuck)
448             return 0;
449         u.ustuck->mux = u.ux;
450         u.ustuck->muy = u.uy;
451         range2 = 0;
452         foundyou = 1;
453         if (u.uinvulnerable)
454             return 0; /* stomachs can't hurt you! */
455
456     } else if (u.usteed) {
457         if (mtmp == u.usteed)
458             /* Your steed won't attack you */
459             return 0;
460         /* Orcs like to steal and eat horses and the like */
461         if (!rn2(is_orc(mtmp->data) ? 2 : 4)
462             && distu(mtmp->mx, mtmp->my) <= 2) {
463             /* Attack your steed instead */
464             i = mattackm(mtmp, u.usteed);
465             if ((i & MM_AGR_DIED))
466                 return 1;
467             /* make sure steed is still alive and within range */
468             if ((i & MM_DEF_DIED) || !u.usteed
469                 || distu(mtmp->mx, mtmp->my) > 2)
470                 return 0;
471             /* Let your steed retaliate */
472             return !!(mattackm(u.usteed, mtmp) & MM_DEF_DIED);
473         }
474     }
475
476     if (u.uundetected && !range2 && foundyou && !u.uswallow) {
477         if (!canspotmon(mtmp))
478             map_invisible(mtmp->mx, mtmp->my);
479         u.uundetected = 0;
480         if (is_hider(youmonst.data) && u.umonnum != PM_TRAPPER) {
481             /* ceiling hider */
482             coord cc; /* maybe we need a unexto() function? */
483             struct obj *obj;
484
485 /*JP
486             You("fall from the %s!", ceiling(u.ux, u.uy));
487 */
488             You("%s\82©\82ç\97\8e\82¿\82½\81I", ceiling(u.ux,u.uy));
489             /* take monster off map now so that its location
490                is eligible for placing hero; we assume that a
491                removed monster remembers its old spot <mx,my> */
492             remove_monster(mtmp->mx, mtmp->my);
493             if (!enexto(&cc, u.ux, u.uy, youmonst.data)
494                 /* a fish won't voluntarily swap positions
495                    when it's in water and hero is over land */
496                 || (mtmp->data->mlet == S_EEL
497                     && is_pool(mtmp->mx, mtmp->my)
498                     && !is_pool(u.ux, u.uy))) {
499                 /* couldn't find any spot for hero; this used to
500                    kill off attacker, but now we just give a "miss"
501                    message and keep both mtmp and hero at their
502                    original positions; hero has become unconcealed
503                    so mtmp's next move will be a regular attack */
504                 place_monster(mtmp, mtmp->mx, mtmp->my); /* put back */
505                 newsym(u.ux, u.uy); /* u.uundetected was toggled */
506 /*JP
507                 pline("%s draws back as you drop!", Monnam(mtmp));
508 */
509                 pline("\82 \82È\82½\82ª\97\8e\82¿\82é\82±\82Æ\82Å%s\82Í\88ø\82«\96ß\82³\82ê\82½\81I", Monnam(mtmp));
510                 return 0;
511             }
512
513             /* put mtmp at hero's spot and move hero to <cc.x,.y> */
514             newsym(mtmp->mx, mtmp->my); /* finish removal */
515             place_monster(mtmp, u.ux, u.uy);
516             if (mtmp->wormno) {
517                 worm_move(mtmp);
518                 /* tail hasn't grown, so if it now occupies <cc.x,.y>
519                    then one of its original spots must be free */
520                 if (m_at(cc.x, cc.y))
521                     (void) enexto(&cc, u.ux, u.uy, youmonst.data);
522             }
523             teleds(cc.x, cc.y, TRUE); /* move hero */
524             set_apparxy(mtmp);
525             newsym(u.ux, u.uy);
526
527             if (youmonst.data->mlet != S_PIERCER)
528                 return 0; /* lurkers don't attack */
529
530             obj = which_armor(mtmp, WORN_HELMET);
531             if (obj && is_metallic(obj)) {
532 #if 0 /*JP*/
533                 Your("blow glances off %s %s.", s_suffix(mon_nam(mtmp)),
534                      helm_simple_name(obj));
535 #else
536                 Your("\8dU\8c\82\82Í%s\82Ì%s\82ð\82©\82·\82ß\82½\82¾\82¯\82¾\82Á\82½\81D", mon_nam(mtmp),
537                       helm_simple_name(obj));
538 #endif
539             } else {
540                 if (3 + find_mac(mtmp) <= rnd(20)) {
541 /*JP
542                     pline("%s is hit by a falling piercer (you)!",
543 */
544                     pline("%s\82Í\97\8e\82¿\82Ä\82«\82½\90j(\82 \82È\82½)\82Å\8f\9d\82Â\82¢\82½\81I",
545                           Monnam(mtmp));
546                     if ((mtmp->mhp -= d(3, 6)) < 1)
547                         killed(mtmp);
548                 } else
549 /*JP
550                     pline("%s is almost hit by a falling piercer (you)!",
551 */
552                     pline("%s\82Í\82à\82¤\8f­\82µ\82Å\97\8e\82¿\82Ä\82«\82½\90j(\82 \82È\82½)\82Å\8f\9d\82Â\82­\82Æ\82±\82ë\82¾\82Á\82½\81I",
553                           Monnam(mtmp));
554             }
555
556         } else {
557             /* surface hider */
558             if (!youseeit) {
559 /*JP
560                 pline("It tries to move where you are hiding.");
561 */
562                 pline("\89½\8eÒ\82©\82ª\82 \82È\82½\82ª\89B\82ê\82Ä\82¢\82é\82Æ\82±\82ë\82ð\88Ú\93®\82µ\82æ\82¤\82Æ\82µ\82½\81D");
563             } else {
564                 /* Ugly kludge for eggs.  The message is phrased so as
565                  * to be directed at the monster, not the player,
566                  * which makes "laid by you" wrong.  For the
567                  * parallelism to work, we can't rephrase it, so we
568                  * zap the "laid by you" momentarily instead.
569                  */
570                 struct obj *obj = level.objects[u.ux][u.uy];
571
572                 if (obj || u.umonnum == PM_TRAPPER
573                     || (youmonst.data->mlet == S_EEL
574                         && is_pool(u.ux, u.uy))) {
575                     int save_spe = 0; /* suppress warning */
576
577                     if (obj) {
578                         save_spe = obj->spe;
579                         if (obj->otyp == EGG)
580                             obj->spe = 0;
581                     }
582                     if (youmonst.data->mlet == S_EEL
583                         || u.umonnum == PM_TRAPPER)
584                         pline(
585 #if 0 /*JP*/
586                              "Wait, %s!  There's a hidden %s named %s there!",
587                               m_monnam(mtmp), youmonst.data->mname, plname);
588 #else
589                               "\91Ò\82Ä\81C%s\81I%s\82Æ\82¢\82¤\96¼\82Ì%s\82ª\89B\82ê\82Ä\82¢\82é\81I",
590                               m_monnam(mtmp), plname, youmonst.data->mname);
591 #endif
592                     else
593                         pline(
594 #if 0 /*JP*/
595                           "Wait, %s!  There's a %s named %s hiding under %s!",
596                               m_monnam(mtmp), youmonst.data->mname, plname,
597                               doname(level.objects[u.ux][u.uy]));
598 #else
599                           "\91Ò\82Ä\81C%s\81I%s\82Æ\82¢\82¤\96¼\82Ì%s\82ª%s\82Ì\89º\82É\89B\82ê\82Ä\82¢\82é\81I",
600                               m_monnam(mtmp), plname, youmonst.data->mname, 
601                               doname(level.objects[u.ux][u.uy]));
602 #endif
603                     if (obj)
604                         obj->spe = save_spe;
605                 } else
606                     impossible("hiding under nothing?");
607             }
608             newsym(u.ux, u.uy);
609         }
610         return 0;
611     }
612
613     /* hero might be a mimic, concealed via #monster */
614     if (youmonst.data->mlet == S_MIMIC && youmonst.m_ap_type && !range2
615         && foundyou && !u.uswallow) {
616         boolean sticky = sticks(youmonst.data);
617
618         if (!canspotmon(mtmp))
619             map_invisible(mtmp->mx, mtmp->my);
620         if (sticky && !youseeit)
621 /*JP
622             pline("It gets stuck on you.");
623 */
624             pline("\89½\8eÒ\82©\82ª\82 \82È\82½\82Ì\8fã\82É\82Ì\82µ\82©\82©\82Á\82½\81D");
625         else
626 #if 0 /*JP*/
627             pline("Wait, %s!  That's a %s named %s!", m_monnam(mtmp),
628                   youmonst.data->mname, plname);
629 #else
630             pline("\91Ò\82Ä\81C%s\81I\82»\82ê\82Í%s\82Æ\82¢\82¤\96¼\82Ì%s\82¾\81I", m_monnam(mtmp), 
631                   plname, youmonst.data->mname);
632 #endif
633         if (sticky)
634             u.ustuck = mtmp;
635         youmonst.m_ap_type = M_AP_NOTHING;
636         youmonst.mappearance = 0;
637         newsym(u.ux, u.uy);
638         return 0;
639     }
640
641     /* non-mimic hero might be mimicking an object after eating m corpse */
642     if (youmonst.m_ap_type == M_AP_OBJECT && !range2 && foundyou
643         && !u.uswallow) {
644         if (!canspotmon(mtmp))
645             map_invisible(mtmp->mx, mtmp->my);
646         if (!youseeit)
647 #if 0 /*JP*/
648             pline("%s %s!", Something, (likes_gold(mtmp->data)
649                                         && youmonst.mappearance == GOLD_PIECE)
650                                            ? "tries to pick you up"
651                                            : "disturbs you");
652 #else
653                  pline("%s\82Í%s\81I", Something, (likes_gold(mtmp->data)
654                                         && youmonst.mappearance == GOLD_PIECE)
655                                            ? "\82 \82È\82½\82ð\8fE\82¨\82¤\82Æ\82µ\82½"
656                                            : "\96³\8e\8b\82µ\82½");
657 #endif
658         else
659 #if 0 /*JP*/
660             pline("Wait, %s!  That %s is really %s named %s!", m_monnam(mtmp),
661                   mimic_obj_name(&youmonst), an(mons[u.umonnum].mname),
662                   plname);
663 #else
664             pline("\91Ò\82Ä\81C%s\81I\82»\82Ì%s\82Í%s\82Æ\82¢\82¤\96¼\82Ì%s\82¾\81I", m_monnam(mtmp),
665                   mimic_obj_name(&youmonst), plname,
666                   mons[u.umonnum].mname);
667 #endif
668         if (multi < 0) { /* this should always be the case */
669             char buf[BUFSZ];
670
671 #if 0 /*JP*/
672             Sprintf(buf, "You appear to be %s again.",
673                     Upolyd ? (const char *) an(youmonst.data->mname)
674                            : (const char *) "yourself");
675 #else
676             Sprintf(buf, "\82 \82È\82½\82Í\82Ó\82½\82½\82Ñ%s\82É\82È\82Á\82½\81D",
677                     Upolyd ? (const char *) youmonst.data->mname
678                            : (const char *) "\8e©\95ª\8e©\90g");
679 #endif
680             unmul(buf); /* immediately stop mimicking */
681         }
682         return 0;
683     }
684
685     /*  Work out the armor class differential   */
686     tmp = AC_VALUE(u.uac) + 10; /* tmp ~= 0 - 20 */
687     tmp += mtmp->m_lev;
688     if (multi < 0)
689         tmp += 4;
690     if ((Invis && !perceives(mdat)) || !mtmp->mcansee)
691         tmp -= 2;
692     if (mtmp->mtrapped)
693         tmp -= 2;
694     if (tmp <= 0)
695         tmp = 1;
696
697     /* make eels visible the moment they hit/miss us */
698     if (mdat->mlet == S_EEL && mtmp->minvis && cansee(mtmp->mx, mtmp->my)) {
699         mtmp->minvis = 0;
700         newsym(mtmp->mx, mtmp->my);
701     }
702
703     /*  Special demon handling code */
704     if ((mtmp->cham == NON_PM) && is_demon(mdat) && !range2
705         && mtmp->data != &mons[PM_BALROG] && mtmp->data != &mons[PM_SUCCUBUS]
706         && mtmp->data != &mons[PM_INCUBUS])
707         if (!mtmp->mcan && !rn2(13))
708             (void) msummon(mtmp);
709
710     /*  Special lycanthrope handling code */
711     if ((mtmp->cham == NON_PM) && is_were(mdat) && !range2) {
712         if (is_human(mdat)) {
713             if (!rn2(5 - (night() * 2)) && !mtmp->mcan)
714                 new_were(mtmp);
715         } else if (!rn2(30) && !mtmp->mcan)
716             new_were(mtmp);
717         mdat = mtmp->data;
718
719         if (!rn2(10) && !mtmp->mcan) {
720             int numseen, numhelp;
721             char buf[BUFSZ], genericwere[BUFSZ];
722
723 /*JP
724             Strcpy(genericwere, "creature");
725 */
726             Strcpy(genericwere, "\89½\82©");
727             numhelp = were_summon(mdat, FALSE, &numseen, genericwere);
728             if (youseeit) {
729 /*JP
730                 pline("%s summons help!", Monnam(mtmp));
731 */
732                 pline("%s\82Í\8f\95\82¯\82ð\8cÄ\82ñ\82¾\81I", Monnam(mtmp));
733                 if (numhelp > 0) {
734                     if (numseen == 0)
735 /*JP
736                         You_feel("hemmed in.");
737 */
738                         pline("\89½\8eÒ\82©\82É\88Í\82Ü\82ê\82½\82æ\82¤\82È\8bC\82ª\82·\82é\81D");
739                 } else
740 /*JP
741                     pline("But none comes.");
742 */
743                     pline("\82µ\82©\82µ\89½\82à\97\88\82È\82©\82Á\82½\81D");
744             } else {
745                 const char *from_nowhere;
746
747                 if (!Deaf) {
748 /*JP
749                     pline("%s %s!", Something, makeplural(growl_sound(mtmp)));
750 */
751                     pline("\89½\82©\82ª%s\81I", growl_sound(mtmp));
752                     from_nowhere = "";
753                 } else
754 /*JP
755                     from_nowhere = " from nowhere";
756 */
757                     from_nowhere = "\82Ç\82±\82©\82ç\82Æ\82à\82È\82­";
758                 if (numhelp > 0) {
759                     if (numseen < 1)
760 /*JP
761                         You_feel("hemmed in.");
762 */
763                         pline("\89½\8eÒ\82©\82É\88Í\82Ü\82ê\82½\82æ\82¤\82È\8bC\82ª\82·\82é\81D");
764                     else {
765 #if 0 /*JP*/
766                         if (numseen == 1)
767                             Sprintf(buf, "%s appears", an(genericwere));
768                         else
769                             Sprintf(buf, "%s appear",
770                                     makeplural(genericwere));
771                         pline("%s%s!", upstart(buf), from_nowhere);
772 #else
773                         pline("%s\82ª%s\8c»\82ê\82½\81I",
774                               genericwere, from_nowhere);
775 #endif
776                     }
777                 } /* else no help came; but you didn't know it tried */
778             }
779         }
780     }
781
782     if (u.uinvulnerable) {
783         /* monsters won't attack you */
784         if (mtmp == u.ustuck)
785 /*JP
786             pline("%s loosens its grip slightly.", Monnam(mtmp));
787 */
788             pline("%s\82Í\92÷\82ß\82Â\82¯\82ð\82í\82¸\82©\82É\8aÉ\82ß\82½\81D", Monnam(mtmp));
789         else if (!range2) {
790             if (youseeit || sensemon(mtmp))
791 /*JP
792                 pline("%s starts to attack you, but pulls back.",
793 */
794                 pline("%s\82Í\82 \82È\82½\82ð\8dU\8c\82\82µ\82©\82¯\82½\82ª\81C\82Ð\82Á\82±\82ß\82½\81D",
795                       Monnam(mtmp));
796             else
797 /*JP
798                 You_feel("%s move nearby.", something);
799 */
800                 pline("\89½\8eÒ\82©\82ª\82 \82È\82½\82Ì\82»\82Î\82ð\92Ê\82è\82Ê\82¯\82½\82æ\82¤\82È\8bC\82ª\82µ\82½\81D");
801         }
802         return 0;
803     }
804
805     /* Unlike defensive stuff, don't let them use item _and_ attack. */
806     if (find_offensive(mtmp)) {
807         int foo = use_offensive(mtmp);
808
809         if (foo != 0)
810             return (foo == 1);
811     }
812
813     for (i = 0; i < NATTK; i++) {
814         sum[i] = 0;
815         mattk = getmattk(mdat, i, sum, &alt_attk);
816         if ((u.uswallow && mattk->aatyp != AT_ENGL)
817             || (skipnonmagc && mattk->aatyp != AT_MAGC))
818             continue;
819
820         switch (mattk->aatyp) {
821         case AT_CLAW: /* "hand to hand" attacks */
822         case AT_KICK:
823         case AT_BITE:
824         case AT_STNG:
825         case AT_TUCH:
826         case AT_BUTT:
827         case AT_TENT:
828             if (!range2 && (!MON_WEP(mtmp) || mtmp->mconf || Conflict
829                             || !touch_petrifies(youmonst.data))) {
830                 if (foundyou) {
831                     if (tmp > (j = rnd(20 + i))) {
832                         if (mattk->aatyp != AT_KICK
833                             || !thick_skinned(youmonst.data))
834                             sum[i] = hitmu(mtmp, mattk);
835                     } else
836                         missmu(mtmp, (tmp == j), mattk);
837                 } else {
838                     wildmiss(mtmp, mattk);
839                     /* skip any remaining non-spell attacks */
840                     skipnonmagc = TRUE;
841                 }
842             }
843             break;
844
845         case AT_HUGS: /* automatic if prev two attacks succeed */
846             /* Note: if displaced, prev attacks never succeeded */
847             if ((!range2 && i >= 2 && sum[i - 1] && sum[i - 2])
848                 || mtmp == u.ustuck)
849                 sum[i] = hitmu(mtmp, mattk);
850             break;
851
852         case AT_GAZE: /* can affect you either ranged or not */
853             /* Medusa gaze already operated through m_respond in
854                dochug(); don't gaze more than once per round. */
855             if (mdat != &mons[PM_MEDUSA])
856                 sum[i] = gazemu(mtmp, mattk);
857             break;
858
859         case AT_EXPL: /* automatic hit if next to, and aimed at you */
860             if (!range2)
861                 sum[i] = explmu(mtmp, mattk, foundyou);
862             break;
863
864         case AT_ENGL:
865             if (!range2) {
866                 if (foundyou) {
867                     if (u.uswallow || tmp > (j = rnd(20 + i))) {
868                         /* Force swallowing monster to be
869                          * displayed even when player is
870                          * moving away */
871                         flush_screen(1);
872                         sum[i] = gulpmu(mtmp, mattk);
873                     } else {
874                         missmu(mtmp, (tmp == j), mattk);
875                     }
876                 } else if (is_animal(mtmp->data)) {
877 /*JP
878                     pline("%s gulps some air!", Monnam(mtmp));
879 */
880                     pline("%s\82Í\91§\82ð\8bz\82¢\82±\82ñ\82¾\81I", Monnam(mtmp));
881                 } else {
882                     if (youseeit)
883 /*JP
884                         pline("%s lunges forward and recoils!", Monnam(mtmp));
885 */
886                         pline("%s\82Í\93Ë\90i\82µ\81C\96ß\82Á\82½\81I", Monnam(mtmp));
887                     else
888 #if 0 /*JP*/
889                         You_hear("a %s nearby.",
890                                  is_whirly(mtmp->data) ? "rushing noise"
891                                                        : "splat");
892 #else
893                         You_hear("\82·\82®\82»\82Î\82Å%s\89¹\82ð\95·\82¢\82½\81D",
894                                  is_whirly(mtmp->data) ? "\93Ë\8c\82\82µ\82Ä\82­\82é"
895                                                        : "\83s\83V\83\83\83b\82Æ\82¢\82¤");
896 #endif
897                 }
898             }
899             break;
900         case AT_BREA:
901             if (range2)
902                 sum[i] = breamu(mtmp, mattk);
903             /* Note: breamu takes care of displacement */
904             break;
905         case AT_SPIT:
906             if (range2)
907                 sum[i] = spitmu(mtmp, mattk);
908             /* Note: spitmu takes care of displacement */
909             break;
910         case AT_WEAP:
911             if (range2) {
912                 if (!Is_rogue_level(&u.uz))
913                     thrwmu(mtmp);
914             } else {
915                 int hittmp = 0;
916
917                 /* Rare but not impossible.  Normally the monster
918                  * wields when 2 spaces away, but it can be
919                  * teleported or whatever....
920                  */
921                 if (mtmp->weapon_check == NEED_WEAPON || !MON_WEP(mtmp)) {
922                     mtmp->weapon_check = NEED_HTH_WEAPON;
923                     /* mon_wield_item resets weapon_check as appropriate */
924                     if (mon_wield_item(mtmp) != 0)
925                         break;
926                 }
927                 if (foundyou) {
928                     otmp = MON_WEP(mtmp);
929                     if (otmp) {
930                         hittmp = hitval(otmp, &youmonst);
931                         tmp += hittmp;
932                         mswings(mtmp, otmp);
933                     }
934                     if (tmp > (j = dieroll = rnd(20 + i)))
935                         sum[i] = hitmu(mtmp, mattk);
936                     else
937                         missmu(mtmp, (tmp == j), mattk);
938                     /* KMH -- Don't accumulate to-hit bonuses */
939                     if (otmp)
940                         tmp -= hittmp;
941                 } else {
942                     wildmiss(mtmp, mattk);
943                     /* skip any remaining non-spell attacks */
944                     skipnonmagc = TRUE;
945                 }
946             }
947             break;
948         case AT_MAGC:
949             if (range2)
950                 sum[i] = buzzmu(mtmp, mattk);
951             else
952                 sum[i] = castmu(mtmp, mattk, TRUE, foundyou);
953             break;
954
955         default: /* no attack */
956             break;
957         }
958         if (context.botl)
959             bot();
960         /* give player a chance of waking up before dying -kaa */
961         if (sum[i] == 1) { /* successful attack */
962             if (u.usleep && u.usleep < monstermoves && !rn2(10)) {
963                 multi = -1;
964 /*JP
965                 nomovemsg = "The combat suddenly awakens you.";
966 */
967                 nomovemsg = "\82 \82È\82½\82Í\8bN\82±\82³\82ê\82½\81D";
968             }
969         }
970         if (sum[i] == 2)
971             return 1; /* attacker dead */
972         if (sum[i] == 3)
973             break; /* attacker teleported, no more attacks */
974         /* sum[i] == 0: unsuccessful attack */
975     }
976     return 0;
977 }
978
979 STATIC_OVL boolean
980 diseasemu(mdat)
981 struct permonst *mdat;
982 {
983     if (Sick_resistance) {
984 /*JP
985         You_feel("a slight illness.");
986 */
987         You("\82·\82±\82µ\8bC\95ª\82ª\88«\82­\82È\82Á\82½\82æ\82¤\82È\8bC\82ª\82µ\82½\81D");
988         return FALSE;
989     } else {
990         make_sick(Sick ? Sick / 3L + 1L : (long) rn1(ACURR(A_CON), 20),
991                   mdat->mname, TRUE, SICK_NONVOMITABLE);
992         return TRUE;
993     }
994 }
995
996 /* check whether slippery clothing protects from hug or wrap attack */
997 STATIC_OVL boolean
998 u_slip_free(mtmp, mattk)
999 struct monst *mtmp;
1000 struct attack *mattk;
1001 {
1002     struct obj *obj = (uarmc ? uarmc : uarm);
1003
1004     if (!obj)
1005         obj = uarmu;
1006     if (mattk->adtyp == AD_DRIN)
1007         obj = uarmh;
1008
1009     /* if your cloak/armor is greased, monster slips off; this
1010        protection might fail (33% chance) when the armor is cursed */
1011     if (obj && (obj->greased || obj->otyp == OILSKIN_CLOAK)
1012         && (!obj->cursed || rn2(3))) {
1013 #if 0 /*JP*/
1014         pline("%s %s your %s %s!", Monnam(mtmp),
1015               (mattk->adtyp == AD_WRAP) ? "slips off of"
1016                                         : "grabs you, but cannot hold onto",
1017               obj->greased ? "greased" : "slippery",
1018               /* avoid "slippery slippery cloak"
1019                  for undiscovered oilskin cloak */
1020               (obj->greased || objects[obj->otyp].oc_name_known)
1021                   ? xname(obj)
1022                   : cloak_simple_name(obj));
1023 #else
1024         pline("%s\82Í%s%s%s\81I", Monnam(mtmp),
1025               obj->greased ? "\96û\82Ì\93h\82ç\82ê\82½" : "\8a\8a\82è\82â\82·\82¢",
1026               (obj->greased || objects[obj->otyp].oc_name_known)
1027                   ? xname(obj)
1028                   : cloak_simple_name(obj),
1029               (mattk->adtyp == AD_WRAP) ? "\82Å\8a\8a\82Á\82½"
1030                                         : "\82ð\82Â\82©\82Ü\82¦\82æ\82¤\82Æ\82µ\82½\82ª\81C\82Å\82«\82È\82©\82Á\82½");
1031 #endif
1032
1033         if (obj->greased && !rn2(2)) {
1034 /*JP
1035             pline_The("grease wears off.");
1036 */
1037             pline("\8e\89\82Í\97\8e\82¿\82Ä\82µ\82Ü\82Á\82½\81D");
1038             obj->greased = 0;
1039             update_inventory();
1040         }
1041         return TRUE;
1042     }
1043     return FALSE;
1044 }
1045
1046 /* armor that sufficiently covers the body might be able to block magic */
1047 int
1048 magic_negation(mon)
1049 struct monst *mon;
1050 {
1051     struct obj *o;
1052     long wearmask;
1053     int armpro, mc = 0;
1054     boolean is_you = (mon == &youmonst),
1055             gotprot = is_you ? (EProtection != 0L)
1056                              /* high priests have innate protection */
1057                              : (mon->data == &mons[PM_HIGH_PRIEST]);
1058
1059     for (o = is_you ? invent : mon->minvent; o; o = o->nobj) {
1060         /* a_can field is only applicable for armor (which must be worn) */
1061         if ((o->owornmask & W_ARMOR) != 0L) {
1062             armpro = objects[o->otyp].a_can;
1063             if (armpro > mc)
1064                 mc = armpro;
1065         }
1066         /* if we've already confirmed Protection, skip additional checks */
1067         if (is_you || gotprot)
1068             continue;
1069
1070         /* omit W_SWAPWEP+W_QUIVER; W_ART+W_ARTI handled by protects() */
1071         wearmask = W_ARMOR | W_ACCESSORY;
1072         if (o->oclass == WEAPON_CLASS || is_weptool(o))
1073             wearmask |= W_WEP;
1074         if (protects(o, ((o->owornmask & wearmask) != 0L) ? TRUE : FALSE))
1075             gotprot = TRUE;
1076     }
1077
1078     if (gotprot) {
1079         /* extrinsic Protection increases mc by 1 */
1080         if (mc < 3)
1081             mc += 1;
1082     } else if (mc < 1) {
1083         /* intrinsic Protection is weaker (play balance; obtaining divine
1084            protection is too easy); it confers minimum mc 1 instead of 0 */
1085         if ((is_you && ((HProtection && u.ublessed) || u.uspellprot))
1086             /* aligned priests and angels have innate intrinsic Protection */
1087             || (mon->data == &mons[PM_ALIGNED_PRIEST] || is_minion(mon->data)))
1088             mc = 1;
1089     }
1090     return mc;
1091 }
1092
1093 /*
1094  * hitmu: monster hits you
1095  *        returns 2 if monster dies (e.g. "yellow light"), 1 otherwise
1096  *        3 if the monster lives but teleported/paralyzed, so it can't keep
1097  *             attacking you
1098  */
1099 STATIC_OVL int
1100 hitmu(mtmp, mattk)
1101 register struct monst *mtmp;
1102 register struct attack *mattk;
1103 {
1104     register struct permonst *mdat = mtmp->data;
1105     register int uncancelled, ptmp;
1106     int dmg, armpro, permdmg;
1107     char buf[BUFSZ];
1108     struct permonst *olduasmon = youmonst.data;
1109     int res;
1110
1111     if (!canspotmon(mtmp))
1112         map_invisible(mtmp->mx, mtmp->my);
1113
1114     /*  If the monster is undetected & hits you, you should know where
1115      *  the attack came from.
1116      */
1117     if (mtmp->mundetected && (hides_under(mdat) || mdat->mlet == S_EEL)) {
1118         mtmp->mundetected = 0;
1119         if (!(Blind ? Blind_telepat : Unblind_telepat)) {
1120             struct obj *obj;
1121 #if 0 /*JP*/
1122             const char *what;
1123 #endif
1124
1125             if ((obj = level.objects[mtmp->mx][mtmp->my]) != 0) {
1126 #if 0 /*JP*/
1127                 if (Blind && !obj->dknown)
1128                     what = something;
1129                 else if (is_pool(mtmp->mx, mtmp->my) && !Underwater)
1130                     what = "the water";
1131                 else
1132                     what = doname(obj);
1133
1134                 pline("%s was hidden under %s!", Amonnam(mtmp), what);
1135 #else
1136                 if (Blind && !obj->dknown)
1137                     pline("%s\82ª\89½\82©\82Ì\89º\82É\89B\82ê\82Ä\82¢\82é\81I", Amonnam(mtmp));
1138                 else if (is_pool(mtmp->mx, mtmp->my) && !Underwater)
1139                     pline("%s\82ª\90\85\92\86\82É\89B\82ê\82Ä\82¢\82é\81I", Amonnam(mtmp));
1140                 else
1141                     pline("%s\82ª%s\82Ì\89º\82É\89B\82ê\82Ä\82¢\82é\81I", Amonnam(mtmp), doname(obj));
1142 #endif
1143             }
1144             newsym(mtmp->mx, mtmp->my);
1145         }
1146     }
1147
1148     /*  First determine the base damage done */
1149     dmg = d((int) mattk->damn, (int) mattk->damd);
1150     if ((is_undead(mdat) || is_vampshifter(mtmp)) && midnight())
1151         dmg += d((int) mattk->damn, (int) mattk->damd); /* extra damage */
1152
1153     /*  Next a cancellation factor.
1154      *  Use uncancelled when cancellation factor takes into account certain
1155      *  armor's special magic protection.  Otherwise just use !mtmp->mcan.
1156      */
1157     armpro = magic_negation(&youmonst);
1158     uncancelled = !mtmp->mcan && (rn2(10) >= 3 * armpro);
1159
1160     permdmg = 0;
1161     /*  Now, adjust damages via resistances or specific attacks */
1162     switch (mattk->adtyp) {
1163     case AD_PHYS:
1164         if (mattk->aatyp == AT_HUGS && !sticks(youmonst.data)) {
1165             if (!u.ustuck && rn2(2)) {
1166                 if (u_slip_free(mtmp, mattk)) {
1167                     dmg = 0;
1168                 } else {
1169                     u.ustuck = mtmp;
1170 /*JP
1171                     pline("%s grabs you!", Monnam(mtmp));
1172 */
1173                     pline("%s\82É\82Â\82©\82Ü\82¦\82ç\82ê\82Ä\82¢\82é\81I", Monnam(mtmp));
1174                 }
1175             } else if (u.ustuck == mtmp) {
1176                 exercise(A_STR, FALSE);
1177 #if 0 /*JP*/
1178                 You("are being %s.", (mtmp->data == &mons[PM_ROPE_GOLEM])
1179                                          ? "choked"
1180                                          : "crushed");
1181 #else
1182                 You("%s\82Ä\82¢\82é\81D", (mtmp->data == &mons[PM_ROPE_GOLEM])
1183                                          ? "\8eñ\82ð\8di\82ß\82ç\82ê"
1184                                          : "\89\9f\82µ\82Â\82Ô\82³\82ê");
1185 #endif
1186             }
1187         } else { /* hand to hand weapon */
1188             if (mattk->aatyp == AT_WEAP && otmp) {
1189                 int tmp;
1190
1191                 if (otmp->otyp == CORPSE
1192                     && touch_petrifies(&mons[otmp->corpsenm])) {
1193                     dmg = 1;
1194 #if 0 /*JP*/
1195                     pline("%s hits you with the %s corpse.", Monnam(mtmp),
1196                           mons[otmp->corpsenm].mname);
1197 #else
1198                     pline("%s\82Í%s\82Ì\8e\80\91Ì\82Å\8dU\8c\82\82µ\82½\81D", Monnam(mtmp),
1199                           mons[otmp->corpsenm].mname);
1200 #endif
1201                     if (!Stoned)
1202                         goto do_stone;
1203                 }
1204                 dmg += dmgval(otmp, &youmonst);
1205                 if (dmg <= 0)
1206                     dmg = 1;
1207                 if (!(otmp->oartifact
1208                       && artifact_hit(mtmp, &youmonst, otmp, &dmg, dieroll)))
1209                     hitmsg(mtmp, mattk);
1210                 if (!dmg)
1211                     break;
1212                 if (objects[otmp->otyp].oc_material == SILVER
1213                     && Hate_silver) {
1214 /*JP
1215                     pline_The("silver sears your flesh!");
1216 */
1217                     pline("\82 \82È\82½\82Ì\91Ì\82Í\8bâ\82Å\8fÄ\82©\82ê\82½\81I");
1218                     exercise(A_CON, FALSE);
1219                 }
1220                 /* this redundancy necessary because you have
1221                    to take the damage _before_ being cloned;
1222                    need to have at least 2 hp left to split */
1223                 tmp = dmg;
1224                 if (u.uac < 0)
1225                     tmp -= rnd(-u.uac);
1226                 if (tmp < 1)
1227                     tmp = 1;
1228                 if (u.mh - tmp > 1 && objects[otmp->otyp].oc_material == IRON
1229                     && (u.umonnum == PM_BLACK_PUDDING
1230                         || u.umonnum == PM_BROWN_PUDDING)) {
1231                     if (tmp > 1)
1232                         exercise(A_STR, FALSE);
1233                     /* inflict damage now; we know it can't be fatal */
1234                     u.mh -= tmp;
1235                     context.botl = 1;
1236                     dmg = 0; /* don't inflict more damage below */
1237                     if (cloneu())
1238 /*JP
1239                         You("divide as %s hits you!", mon_nam(mtmp));
1240 */
1241                         pline("%s\82Ì\8dU\8c\82\82É\82æ\82Á\82Ä\82 \82È\82½\82Í\95ª\97ô\82µ\82½\81I", mon_nam(mtmp));
1242                 }
1243                 rustm(&youmonst, otmp);
1244             } else if (mattk->aatyp != AT_TUCH || dmg != 0
1245                        || mtmp != u.ustuck)
1246                 hitmsg(mtmp, mattk);
1247         }
1248         break;
1249     case AD_DISE:
1250         hitmsg(mtmp, mattk);
1251         if (!diseasemu(mdat))
1252             dmg = 0;
1253         break;
1254     case AD_FIRE:
1255         hitmsg(mtmp, mattk);
1256         if (uncancelled) {
1257 /*JP
1258             pline("You're %s!", on_fire(youmonst.data, mattk));
1259 */
1260             pline("\82 \82È\82½\82Í%s\81I", on_fire(youmonst.data, mattk));
1261             if (youmonst.data == &mons[PM_STRAW_GOLEM]
1262                 || youmonst.data == &mons[PM_PAPER_GOLEM]) {
1263 /*JP
1264                 You("roast!");
1265 */
1266                 You("\8fÅ\82°\82½\81I");
1267                 /* KMH -- this is okay with unchanging */
1268                 rehumanize();
1269                 break;
1270             } else if (Fire_resistance) {
1271 /*JP
1272                 pline_The("fire doesn't feel hot!");
1273 */
1274                 pline("\89Î\82Í\82º\82ñ\82º\82ñ\94M\82­\82È\82¢\81I");
1275                 dmg = 0;
1276             }
1277             if ((int) mtmp->m_lev > rn2(20))
1278                 destroy_item(SCROLL_CLASS, AD_FIRE);
1279             if ((int) mtmp->m_lev > rn2(20))
1280                 destroy_item(POTION_CLASS, AD_FIRE);
1281             if ((int) mtmp->m_lev > rn2(25))
1282                 destroy_item(SPBOOK_CLASS, AD_FIRE);
1283             burn_away_slime();
1284         } else
1285             dmg = 0;
1286         break;
1287     case AD_COLD:
1288         hitmsg(mtmp, mattk);
1289         if (uncancelled) {
1290 /*JP
1291             pline("You're covered in frost!");
1292 */
1293             You("\95X\82Å\95¢\82í\82ê\82½\81I");
1294             if (Cold_resistance) {
1295 /*JP
1296                 pline_The("frost doesn't seem cold!");
1297 */
1298                 pline("\95X\82Í\97â\82³\82ð\8a´\82\82³\82¹\82È\82¢\81I");
1299                 dmg = 0;
1300             }
1301             if ((int) mtmp->m_lev > rn2(20))
1302                 destroy_item(POTION_CLASS, AD_COLD);
1303         } else
1304             dmg = 0;
1305         break;
1306     case AD_ELEC:
1307         hitmsg(mtmp, mattk);
1308         if (uncancelled) {
1309 /*JP
1310             You("get zapped!");
1311 */
1312             You("\93d\8c\82\82ð\82­\82ç\82Á\82½\81I");
1313             if (Shock_resistance) {
1314 /*JP
1315                 pline_The("zap doesn't shock you!");
1316 */
1317                 pline("\93d\8c\82\82Í\82µ\82Ñ\82ê\82ð\8a´\82\82³\82¹\82È\82¢\81I");
1318                 dmg = 0;
1319             }
1320             if ((int) mtmp->m_lev > rn2(20))
1321                 destroy_item(WAND_CLASS, AD_ELEC);
1322             if ((int) mtmp->m_lev > rn2(20))
1323                 destroy_item(RING_CLASS, AD_ELEC);
1324         } else
1325             dmg = 0;
1326         break;
1327     case AD_SLEE:
1328         hitmsg(mtmp, mattk);
1329         if (uncancelled && multi >= 0 && !rn2(5)) {
1330             if (Sleep_resistance)
1331                 break;
1332             fall_asleep(-rnd(10), TRUE);
1333             if (Blind)
1334 /*JP
1335                 You("are put to sleep!");
1336 */
1337                 You("\96°\82è\82É\82¨\82¿\82½\81I");
1338             else
1339 /*JP
1340                 You("are put to sleep by %s!", mon_nam(mtmp));
1341 */
1342                 You("%s\82É\96°\82ç\82³\82ê\82½\81I", mon_nam(mtmp));
1343         }
1344         break;
1345     case AD_BLND:
1346         if (can_blnd(mtmp, &youmonst, mattk->aatyp, (struct obj *) 0)) {
1347             if (!Blind)
1348 /*JP
1349                 pline("%s blinds you!", Monnam(mtmp));
1350 */
1351                 pline("%s\82Ì\8dU\8c\82\82Å\96Ú\82ª\8c©\82¦\82È\82­\82È\82Á\82½\81I", Monnam(mtmp));
1352             make_blinded(Blinded + (long) dmg, FALSE);
1353             if (!Blind)
1354                 Your1(vision_clears);
1355         }
1356         dmg = 0;
1357         break;
1358     case AD_DRST:
1359         ptmp = A_STR;
1360         goto dopois;
1361     case AD_DRDX:
1362         ptmp = A_DEX;
1363         goto dopois;
1364     case AD_DRCO:
1365         ptmp = A_CON;
1366     dopois:
1367         hitmsg(mtmp, mattk);
1368         if (uncancelled && !rn2(8)) {
1369 #if 0 /*JP*/
1370             Sprintf(buf, "%s %s", s_suffix(Monnam(mtmp)),
1371                     mpoisons_subj(mtmp, mattk));
1372 #else
1373             Sprintf(buf, "%s\82Ì%s", Monnam(mtmp),
1374                     mpoisons_subj(mtmp, mattk));
1375 #endif
1376             poisoned(buf, ptmp, mdat->mname, 30, FALSE);
1377         }
1378         break;
1379     case AD_DRIN:
1380         hitmsg(mtmp, mattk);
1381         if (defends(AD_DRIN, uwep) || !has_head(youmonst.data)) {
1382 /*JP
1383             You("don't seem harmed.");
1384 */
1385             You("\8f\9d\82Â\82¢\82Ä\82¢\82È\82¢\82æ\82¤\82¾\81D");
1386             /* Not clear what to do for green slimes */
1387             break;
1388         }
1389         if (u_slip_free(mtmp, mattk))
1390             break;
1391
1392         if (uarmh && rn2(8)) {
1393             /* not body_part(HEAD) */
1394 /*JP
1395             Your("%s blocks the attack to your head.",
1396 */
1397             Your("%s\82ª\93ª\82Ö\82Ì\8dU\8c\82\82ð\96h\82¢\82¾\81D",
1398                  helm_simple_name(uarmh));
1399             break;
1400         }
1401         if (Half_physical_damage)
1402             dmg = (dmg + 1) / 2;
1403         mdamageu(mtmp, dmg);
1404
1405         if (!uarmh || uarmh->otyp != DUNCE_CAP) {
1406             /* eat_brains() will miss if target is mindless (won't
1407                happen here; hero is considered to retain his mind
1408                regardless of current shape) or is noncorporeal
1409                (can't happen here; no one can poly into a ghost
1410                or shade) so this check for missing is academic */
1411             if (eat_brains(mtmp, &youmonst, TRUE, (int *) 0) == MM_MISS)
1412                 break;
1413         }
1414         /* adjattrib gives dunce cap message when appropriate */
1415         (void) adjattrib(A_INT, -rnd(2), FALSE);
1416         forget_levels(25);  /* lose memory of 25% of levels */
1417         forget_objects(25); /* lose memory of 25% of objects */
1418         break;
1419     case AD_PLYS:
1420         hitmsg(mtmp, mattk);
1421         if (uncancelled && multi >= 0 && !rn2(3)) {
1422             if (Free_action) {
1423 /*JP
1424                 You("momentarily stiffen.");
1425 */
1426                 You("\88ê\8fu\8dd\92¼\82µ\82½\81D");
1427             } else {
1428                 if (Blind)
1429 /*JP
1430                     You("are frozen!");
1431 */
1432                     You("\93®\82¯\82È\82¢\81I");
1433                 else
1434 /*JP
1435                     You("are frozen by %s!", mon_nam(mtmp));
1436 */
1437                     pline("%s\82É\82æ\82Á\82Ä\93®\82¯\82È\82­\82È\82Á\82½\81I", mon_nam(mtmp));
1438                 nomovemsg = You_can_move_again;
1439                 nomul(-rnd(10));
1440 /*JP
1441                 multi_reason = "paralyzed by a monster";
1442 */
1443                 multi_reason = "\89ö\95¨\82É\96\83á\83\82³\82¹\82ç\82ê\82½\8c\84\82É";
1444                 exercise(A_DEX, FALSE);
1445             }
1446         }
1447         break;
1448     case AD_DRLI:
1449         hitmsg(mtmp, mattk);
1450         if (uncancelled && !rn2(3) && !Drain_resistance) {
1451 /*JP
1452             losexp("life drainage");
1453 */
1454             losexp("\90\96½\97Í\82ð\8bz\8eû\82³\82ê\82Ä");
1455         }
1456         break;
1457     case AD_LEGS: {
1458         register long side = rn2(2) ? RIGHT_SIDE : LEFT_SIDE;
1459 /*JP
1460         const char *sidestr = (side == RIGHT_SIDE) ? "right" : "left";
1461 */
1462         const char *sidestr = (side == RIGHT_SIDE) ? "\89E" : "\8d¶";
1463
1464         /* This case is too obvious to ignore, but Nethack is not in
1465          * general very good at considering height--most short monsters
1466          * still _can_ attack you when you're flying or mounted.
1467          * [FIXME: why can't a flying attacker overcome this?]
1468          */
1469         if (u.usteed || Levitation || Flying) {
1470 #if 0 /*JP*/
1471             pline("%s tries to reach your %s %s!", Monnam(mtmp), sidestr,
1472                   body_part(LEG));
1473 #else
1474             pline("%s\82Í\82 \82È\82½\82Ì%s%s\82É\8dU\8c\82\82µ\82æ\82¤\82Æ\82µ\82½\81I", Monnam(mtmp), sidestr,
1475                   body_part(LEG));
1476 #endif
1477             dmg = 0;
1478         } else if (mtmp->mcan) {
1479 #if 0 /*JP*/
1480             pline("%s nuzzles against your %s %s!", Monnam(mtmp), sidestr,
1481                   body_part(LEG));
1482 #else
1483             pline("%s\82Í\82 \82È\82½\82Ì%s%s\82É\95@\82ð\82·\82è\82æ\82¹\82½\81I", Monnam(mtmp), sidestr,
1484                   body_part(LEG));
1485 #endif
1486             dmg = 0;
1487         } else {
1488             if (uarmf) {
1489                 if (rn2(2) && (uarmf->otyp == LOW_BOOTS
1490                                || uarmf->otyp == IRON_SHOES))
1491 #if 0 /*JP*/
1492                     pline("%s pricks the exposed part of your %s %s!",
1493                           Monnam(mtmp), sidestr, body_part(LEG));
1494 #else
1495                     pline("%s\82Í\82 \82È\82½\82Ì%s%s\82ð\82¿\82­\82è\82Æ\8eh\82µ\82½\81I",
1496                           Monnam(mtmp), sidestr, body_part(LEG));
1497 #endif
1498                 else if (!rn2(5))
1499 #if 0 /*JP*/
1500                     pline("%s pricks through your %s boot!", Monnam(mtmp),
1501                           sidestr);
1502 #else
1503                     pline("%s\82Í\82 \82È\82½\82Ì%s\82Ì\8cC\82²\82µ\82É\82¿\82­\82è\82Æ\8eh\82µ\82½\81I", Monnam(mtmp),
1504                           sidestr);
1505 #endif
1506                 else {
1507 #if 0 /*JP*/
1508                     pline("%s scratches your %s boot!", Monnam(mtmp),
1509                           sidestr);
1510 #else
1511                     pline("%s\82Í\82 \82È\82½\82Ì%s\82Ì\8cC\82ð\82Ð\82Á\82©\82¢\82½\81I", Monnam(mtmp),
1512                           sidestr);
1513 #endif
1514                     dmg = 0;
1515                     break;
1516                 }
1517             } else
1518 #if 0 /*JP*/
1519                 pline("%s pricks your %s %s!", Monnam(mtmp), sidestr,
1520                       body_part(LEG));
1521 #else
1522                 pline("%s\82Í\82 \82È\82½\82Ì%s%s\82ð\82¿\82­\82è\82Æ\8eh\82µ\82½\81I", Monnam(mtmp), sidestr,
1523                       body_part(LEG));
1524 #endif
1525             set_wounded_legs(side, rnd(60 - ACURR(A_DEX)));
1526             exercise(A_STR, FALSE);
1527             exercise(A_DEX, FALSE);
1528         }
1529         break;
1530     }
1531     case AD_STON: /* cockatrice */
1532         hitmsg(mtmp, mattk);
1533         if (!rn2(3)) {
1534             if (mtmp->mcan) {
1535                 if (!Deaf)
1536 /*JP
1537                     You_hear("a cough from %s!", mon_nam(mtmp));
1538 */
1539                     You_hear("%s\82ª\83S\83z\83b\83S\83z\83b\82Æ\82¢\82¤\89¹\82ð\95·\82¢\82½\81I", mon_nam(mtmp));
1540             } else {
1541                 if (!Deaf)
1542 /*JP
1543                     You_hear("%s hissing!", s_suffix(mon_nam(mtmp)));
1544 */
1545                     You_hear("%s\82ª\83V\83\85\81[\83b\82Æ\82¢\82¤\90º\82ð\95·\82¢\82½\81I", mon_nam(mtmp));
1546                 if (!rn2(10)
1547                     || (flags.moonphase == NEW_MOON && !have_lizard())) {
1548                 do_stone:
1549                     if (!Stoned && !Stone_resistance
1550                         && !(poly_when_stoned(youmonst.data)
1551                              && polymon(PM_STONE_GOLEM))) {
1552                         int kformat = KILLED_BY_AN;
1553                         const char *kname = mtmp->data->mname;
1554
1555                         if (mtmp->data->geno & G_UNIQ) {
1556                             if (!type_is_pname(mtmp->data))
1557                                 kname = the(kname);
1558                             kformat = KILLED_BY;
1559                         }
1560                         make_stoned(5L, (char *) 0, kformat, kname);
1561                         return 1;
1562                         /* done_in_by(mtmp, STONING); */
1563                     }
1564                 }
1565             }
1566         }
1567         break;
1568     case AD_STCK:
1569         hitmsg(mtmp, mattk);
1570         if (uncancelled && !u.ustuck && !sticks(youmonst.data))
1571             u.ustuck = mtmp;
1572         break;
1573     case AD_WRAP:
1574         if ((!mtmp->mcan || u.ustuck == mtmp) && !sticks(youmonst.data)) {
1575             if (!u.ustuck && !rn2(10)) {
1576                 if (u_slip_free(mtmp, mattk)) {
1577                     dmg = 0;
1578                 } else {
1579 /*JP
1580                     pline("%s swings itself around you!", Monnam(mtmp));
1581 */
1582                     pline("%s\82Í\82 \82È\82½\82É\91Ì\82ð\97\8d\82Ý\82Â\82©\82¹\82½\81I", Monnam(mtmp));
1583                     u.ustuck = mtmp;
1584                 }
1585             } else if (u.ustuck == mtmp) {
1586                 if (is_pool(mtmp->mx, mtmp->my) && !Swimming && !Amphibious) {
1587                     boolean moat = (levl[mtmp->mx][mtmp->my].typ != POOL)
1588                                    && (levl[mtmp->mx][mtmp->my].typ != WATER)
1589                                    && !Is_medusa_level(&u.uz)
1590                                    && !Is_waterlevel(&u.uz);
1591
1592 /*JP
1593                     pline("%s drowns you...", Monnam(mtmp));
1594 */
1595                     pline("\82 \82È\82½\82Í%s\82É\97\8d\82Ý\82Â\82©\82ê\82Ä\93M\82ê\82½\81D\81D\81D", Monnam(mtmp));
1596                     killer.format = KILLED_BY_AN;
1597 #if 0 /*JP*/
1598                     Sprintf(killer.name, "%s by %s",
1599                             moat ? "moat" : "pool of water",
1600                             an(mtmp->data->mname));
1601 #else
1602                     Sprintf(buf, "%s\82Ì%s\82É\97\8d\82Ý\82Â\82©\82ê\82Ä",
1603                             moat ? "\96x" : "\92r",
1604                             mtmp->data->mname);
1605 #endif
1606                     done(DROWNING);
1607                 } else if (mattk->aatyp == AT_HUGS)
1608 /*JP
1609                     You("are being crushed.");
1610 */
1611                     You("\82Â\82Ô\82³\82ê\82Â\82Â\82 \82é\81D");
1612             } else {
1613                 dmg = 0;
1614                 if (flags.verbose)
1615 #if 0 /*JP*/
1616                     pline("%s brushes against your %s.", Monnam(mtmp),
1617                           body_part(LEG));
1618 #else
1619                     pline("%s\82Í\82 \82È\82½\82Ì%s\82É\90G\82ê\82½\81D", Monnam(mtmp),
1620                           body_part(LEG));
1621 #endif
1622             }
1623         } else
1624             dmg = 0;
1625         break;
1626     case AD_WERE:
1627         hitmsg(mtmp, mattk);
1628         if (uncancelled && !rn2(4) && u.ulycn == NON_PM
1629             && !Protection_from_shape_changers && !defends(AD_WERE, uwep)) {
1630 /*JP
1631             You_feel("feverish.");
1632 */
1633             You("\94M\82ª\82 \82é\82æ\82¤\82È\8bC\82ª\82µ\82½\81D");
1634             exercise(A_CON, FALSE);
1635             u.ulycn = monsndx(mdat);
1636             retouch_equipment(2);
1637         }
1638         break;
1639     case AD_SGLD:
1640         hitmsg(mtmp, mattk);
1641         if (youmonst.data->mlet == mdat->mlet)
1642             break;
1643         if (!mtmp->mcan)
1644             stealgold(mtmp);
1645         break;
1646
1647     case AD_SSEX:
1648         if (SYSOPT_SEDUCE) {
1649             if (could_seduce(mtmp, &youmonst, mattk) == 1 && !mtmp->mcan)
1650                 if (doseduce(mtmp))
1651                     return 3;
1652             break;
1653         }
1654     /* else FALLTHRU */
1655     case AD_SITM: /* for now these are the same */
1656     case AD_SEDU:
1657         if (is_animal(mtmp->data)) {
1658             hitmsg(mtmp, mattk);
1659             if (mtmp->mcan)
1660                 break;
1661             /* Continue below */
1662         } else if (dmgtype(youmonst.data, AD_SEDU)
1663                    || (SYSOPT_SEDUCE && dmgtype(youmonst.data, AD_SSEX))) {
1664 #if 0 /*JP*/
1665             pline("%s %s.", Monnam(mtmp),
1666                   mtmp->minvent
1667                       ? "brags about the goods some dungeon explorer provided"
1668                   : "makes some remarks about how difficult theft is lately");
1669 #else
1670             pline("%s\82Í%s\81D", Monnam(mtmp),
1671                   mtmp->minvent
1672                       ? "\82 \82é\96À\8b{\92T\8c\9f\89Æ\82ª\92u\82¢\82Ä\82Á\82½\95i\95¨\82ð\8e©\96\9d\82µ\82½"
1673                       : "\8dÅ\8bß\90Þ\93\90\82ª\82¢\82©\82É\8d¢\93ï\82©\92W\81X\82Æ\8fq\82×\82½");
1674 #endif
1675             if (!tele_restrict(mtmp))
1676                 (void) rloc(mtmp, TRUE);
1677             return 3;
1678         } else if (mtmp->mcan) {
1679             if (!Blind) {
1680 #if 0 /*JP*/
1681                 pline("%s tries to %s you, but you seem %s.",
1682                       Adjmonnam(mtmp, "plain"),
1683                       flags.female ? "charm" : "seduce",
1684                       flags.female ? "unaffected" : "uninterested");
1685 #else
1686                 pline("%s\82Í\82 \82È\82½\82ð%s\82µ\82æ\82¤\82Æ\82µ\82½\81C\82µ\82©\82µ\82 \82È\82½\82Í%s\81D",
1687                       Adjmonnam(mtmp, "\92n\96¡\82È"),
1688                       flags.female ? "\96£\97¹" : "\97U\98f",
1689                       flags.female ? "\89e\8b¿\82ð\8eó\82¯\82È\82¢" : "\8b»\96¡\82ª\82È\82¢");
1690 #endif
1691             }
1692             if (rn2(3)) {
1693                 if (!tele_restrict(mtmp))
1694                     (void) rloc(mtmp, TRUE);
1695                 return 3;
1696             }
1697             break;
1698         }
1699         buf[0] = '\0';
1700         switch (steal(mtmp, buf)) {
1701         case -1:
1702             return 2;
1703         case 0:
1704             break;
1705         default:
1706             if (!is_animal(mtmp->data) && !tele_restrict(mtmp))
1707                 (void) rloc(mtmp, TRUE);
1708             if (is_animal(mtmp->data) && *buf) {
1709                 if (canseemon(mtmp))
1710 #if 0 /*JP*/
1711                     pline("%s tries to %s away with %s.", Monnam(mtmp),
1712                           locomotion(mtmp->data, "run"), buf);
1713 #else
1714                     pline("%s\82Í%s\82ð\8e\9d\82Á\82Ä\93¦\82°\8fo\82µ\82½\81D", Monnam(mtmp),
1715                           buf);
1716 #endif
1717             }
1718             monflee(mtmp, 0, FALSE, FALSE);
1719             return 3;
1720         }
1721         break;
1722
1723     case AD_SAMU:
1724         hitmsg(mtmp, mattk);
1725         /* when the Wiz hits, 1/20 steals the amulet */
1726         if (u.uhave.amulet || u.uhave.bell || u.uhave.book || u.uhave.menorah
1727             || u.uhave.questart) /* carrying the Quest Artifact */
1728             if (!rn2(20))
1729                 stealamulet(mtmp);
1730         break;
1731
1732     case AD_TLPT:
1733         hitmsg(mtmp, mattk);
1734         if (uncancelled) {
1735             if (flags.verbose)
1736 /*JP
1737                 Your("position suddenly seems very uncertain!");
1738 */
1739                 pline("\8e©\95ª\82Ì\82¢\82é\88Ê\92u\82ª\93Ë\91R\95s\96¾\8am\82É\82È\82Á\82½\81I");
1740             tele();
1741         }
1742         break;
1743     case AD_RUST:
1744         hitmsg(mtmp, mattk);
1745         if (mtmp->mcan)
1746             break;
1747         if (u.umonnum == PM_IRON_GOLEM) {
1748 /*JP
1749             You("rust!");
1750 */
1751             You("\8eK\82Ñ\82Â\82¢\82½\81I");
1752             /* KMH -- this is okay with unchanging */
1753             rehumanize();
1754             break;
1755         }
1756         erode_armor(&youmonst, ERODE_RUST);
1757         break;
1758     case AD_CORR:
1759         hitmsg(mtmp, mattk);
1760         if (mtmp->mcan)
1761             break;
1762         erode_armor(&youmonst, ERODE_CORRODE);
1763         break;
1764     case AD_DCAY:
1765         hitmsg(mtmp, mattk);
1766         if (mtmp->mcan)
1767             break;
1768         if (u.umonnum == PM_WOOD_GOLEM || u.umonnum == PM_LEATHER_GOLEM) {
1769 /*JP
1770             You("rot!");
1771 */
1772             You("\95\85\82Á\82½\81I");
1773             /* KMH -- this is okay with unchanging */
1774             rehumanize();
1775             break;
1776         }
1777         erode_armor(&youmonst, ERODE_ROT);
1778         break;
1779     case AD_HEAL:
1780         /* a cancelled nurse is just an ordinary monster,
1781          * nurses don't heal those that cause petrification */
1782         if (mtmp->mcan || (Upolyd && touch_petrifies(youmonst.data))) {
1783             hitmsg(mtmp, mattk);
1784             break;
1785         }
1786         if (!uwep && !uarmu && !uarm && !uarmh && !uarms && !uarmg && !uarmc
1787             && !uarmf) {
1788             boolean goaway = FALSE;
1789 /*JP
1790             pline("%s hits!  (I hope you don't mind.)", Monnam(mtmp));
1791 */
1792             pline("%s\82Ì\8dU\8c\82\82Í\96½\92\86\82µ\82½\81D(\8bC\82É\82µ\82È\82¢\82æ\82¤\82É\81D)", Monnam(mtmp));
1793             if (Upolyd) {
1794                 u.mh += rnd(7);
1795                 if (!rn2(7)) {
1796                     /* no upper limit necessary; effect is temporary */
1797                     u.mhmax++;
1798                     if (!rn2(13))
1799                         goaway = TRUE;
1800                 }
1801                 if (u.mh > u.mhmax)
1802                     u.mh = u.mhmax;
1803             } else {
1804                 u.uhp += rnd(7);
1805                 if (!rn2(7)) {
1806                     /* hard upper limit via nurse care: 25 * ulevel */
1807                     if (u.uhpmax < 5 * u.ulevel + d(2 * u.ulevel, 10))
1808                         u.uhpmax++;
1809                     if (!rn2(13))
1810                         goaway = TRUE;
1811                 }
1812                 if (u.uhp > u.uhpmax)
1813                     u.uhp = u.uhpmax;
1814             }
1815             if (!rn2(3))
1816                 exercise(A_STR, TRUE);
1817             if (!rn2(3))
1818                 exercise(A_CON, TRUE);
1819             if (Sick)
1820                 make_sick(0L, (char *) 0, FALSE, SICK_ALL);
1821             context.botl = 1;
1822             if (goaway) {
1823                 mongone(mtmp);
1824                 return 2;
1825             } else if (!rn2(33)) {
1826                 if (!tele_restrict(mtmp))
1827                     (void) rloc(mtmp, TRUE);
1828                 monflee(mtmp, d(3, 6), TRUE, FALSE);
1829                 return 3;
1830             }
1831             dmg = 0;
1832         } else {
1833             if (Role_if(PM_HEALER)) {
1834                 if (!Deaf && !(moves % 5))
1835 /*JP
1836                     verbalize("Doc, I can't help you unless you cooperate.");
1837 */
1838                     verbalize("\83h\83N\83^\81[\81I\8b¦\97Í\82ð\82¨\82Ë\82ª\82¢\82µ\82Ü\82·\82í\81D");
1839                 dmg = 0;
1840             } else
1841                 hitmsg(mtmp, mattk);
1842         }
1843         break;
1844     case AD_CURS:
1845         hitmsg(mtmp, mattk);
1846         if (!night() && mdat == &mons[PM_GREMLIN])
1847             break;
1848         if (!mtmp->mcan && !rn2(10)) {
1849             if (!Deaf) {
1850                 if (Blind)
1851 /*JP
1852                     You_hear("laughter.");
1853 */
1854                     You_hear("\8fÎ\82¢\90º\82ð\95·\82¢\82½\81D");
1855                 else
1856 /*JP
1857                     pline("%s chuckles.", Monnam(mtmp));
1858 */
1859                     pline("%s\82Í\83N\83X\83N\83X\8fÎ\82Á\82½\81D", Monnam(mtmp));
1860             }
1861             if (u.umonnum == PM_CLAY_GOLEM) {
1862 /*JP
1863                 pline("Some writing vanishes from your head!");
1864 */
1865                 pline("\82¢\82­\82Â\82©\82Ì\95\8e\9a\82ª\82 \82È\82½\82Ì\93ª\82©\82ç\8fÁ\82¦\82½\81I");
1866                 /* KMH -- this is okay with unchanging */
1867                 rehumanize();
1868                 break;
1869             }
1870             attrcurse();
1871         }
1872         break;
1873     case AD_STUN:
1874         hitmsg(mtmp, mattk);
1875         if (!mtmp->mcan && !rn2(4)) {
1876             make_stunned((HStun & TIMEOUT) + (long) dmg, TRUE);
1877             dmg /= 2;
1878         }
1879         break;
1880     case AD_ACID:
1881         hitmsg(mtmp, mattk);
1882         if (!mtmp->mcan && !rn2(3))
1883             if (Acid_resistance) {
1884 /*JP
1885                 pline("You're covered in acid, but it seems harmless.");
1886 */
1887                 pline("\8e_\82Å\95¢\82í\82ê\82½\81D\82µ\82©\82µ\8f\9d\82Â\82©\82È\82¢\81D");
1888                 dmg = 0;
1889             } else {
1890 /*JP
1891                 pline("You're covered in acid!  It burns!");
1892 */
1893                 You("\8e_\82Å\95¢\82í\82ê\8fÄ\82¯\82½\81I");
1894                 exercise(A_STR, FALSE);
1895             }
1896         else
1897             dmg = 0;
1898         break;
1899     case AD_SLOW:
1900         hitmsg(mtmp, mattk);
1901         if (uncancelled && HFast && !defends(AD_SLOW, uwep) && !rn2(4))
1902             u_slow_down();
1903         break;
1904     case AD_DREN:
1905         hitmsg(mtmp, mattk);
1906         if (uncancelled && !rn2(4))
1907             drain_en(dmg);
1908         dmg = 0;
1909         break;
1910     case AD_CONF:
1911         hitmsg(mtmp, mattk);
1912         if (!mtmp->mcan && !rn2(4) && !mtmp->mspec_used) {
1913             mtmp->mspec_used = mtmp->mspec_used + (dmg + rn2(6));
1914             if (Confusion)
1915 /*JP
1916                 You("are getting even more confused.");
1917 */
1918                 You("\82Ü\82·\82Ü\82·\8d¬\97\90\82µ\82½\81D");
1919             else
1920 /*JP
1921                 You("are getting confused.");
1922 */
1923                 You("\8d¬\97\90\82µ\82Ä\82«\82½\81D");
1924             make_confused(HConfusion + dmg, FALSE);
1925         }
1926         dmg = 0;
1927         break;
1928     case AD_DETH:
1929 /*JP
1930         pline("%s reaches out with its deadly touch.", Monnam(mtmp));
1931 */
1932         pline("%s\82Í\8e\80\82Ì\98r\82ð\82Ì\82Î\82µ\82½\81D", Monnam(mtmp));
1933         if (is_undead(youmonst.data)) {
1934             /* Still does normal damage */
1935 /*JP
1936             pline("Was that the touch of death?");
1937 */
1938             pline("\8d¡\82Ì\82Í\8e\80\82Ì\90é\8d\90\82¾\82Á\82½\82Ì\82©\82È\81H");
1939             break;
1940         }
1941         switch (rn2(20)) {
1942         case 19:
1943         case 18:
1944         case 17:
1945             if (!Antimagic) {
1946                 killer.format = KILLED_BY_AN;
1947 /*JP
1948                 Strcpy(killer.name, "touch of death");
1949 */
1950                 Strcpy(killer.name, "\8e\80\82Ì\90é\8d\90\82Å");
1951                 done(DIED);
1952                 dmg = 0;
1953                 break;
1954             }    /* else FALLTHRU */
1955         default: /* case 16: ... case 5: */
1956 /*JP
1957             You_feel("your life force draining away...");
1958 */
1959             You("\91Ì\97Í\82ª\92D\82í\82ê\82Ä\82¢\82­\82æ\82¤\82È\8bC\82ª\82µ\82½\81D\81D\81D");
1960             permdmg = 1; /* actual damage done below */
1961             break;
1962         case 4:
1963         case 3:
1964         case 2:
1965         case 1:
1966         case 0:
1967             if (Antimagic)
1968                 shieldeff(u.ux, u.uy);
1969 /*JP
1970             pline("Lucky for you, it didn't work!");
1971 */
1972             pline("\89^\82Ì\82æ\82¢\82±\82Æ\82É\82È\82ñ\82Æ\82à\82È\82©\82Á\82½\81I");
1973             dmg = 0;
1974             break;
1975         }
1976         break;
1977     case AD_PEST:
1978 /*JP
1979         pline("%s reaches out, and you feel fever and chills.", Monnam(mtmp));
1980 */
1981         pline("%s\82Í\98r\82ð\82Ì\82Î\82µ\82½\81C\82 \82È\82½\82Í\88«\8a¦\82ð\8a´\82\82½\81D", Monnam(mtmp));
1982         (void) diseasemu(mdat); /* plus the normal damage */
1983         break;
1984     case AD_FAMN:
1985 /*JP
1986         pline("%s reaches out, and your body shrivels.", Monnam(mtmp));
1987 */
1988         pline("%s\82Í\98r\82ð\90L\82Î\82µ\82½\81C\82 \82È\82½\82Ì\91Ì\82Í\82µ\82È\82Ñ\82½\81D", Monnam(mtmp));
1989         exercise(A_CON, FALSE);
1990         if (!is_fainted())
1991             morehungry(rn1(40, 40));
1992         /* plus the normal damage */
1993         break;
1994     case AD_SLIM:
1995         hitmsg(mtmp, mattk);
1996         if (!uncancelled)
1997             break;
1998         if (flaming(youmonst.data)) {
1999 /*JP
2000             pline_The("slime burns away!");
2001 */
2002             pline_The("\83X\83\89\83C\83\80\82Í\94R\82¦\82½\81I");
2003             dmg = 0;
2004         } else if (Unchanging || noncorporeal(youmonst.data)
2005                    || youmonst.data == &mons[PM_GREEN_SLIME]) {
2006 /*JP
2007             You("are unaffected.");
2008 */
2009             You("\89e\8b¿\82ð\8eó\82¯\82È\82¢\81D");
2010             dmg = 0;
2011         } else if (!Slimed) {
2012 /*JP
2013             You("don't feel very well.");
2014 */
2015             You("\8bC\95ª\82ª\88«\82¢\81D");
2016             make_slimed(10L, (char *) 0);
2017             delayed_killer(SLIMED, KILLED_BY_AN, mtmp->data->mname);
2018         } else
2019 /*JP
2020             pline("Yuck!");
2021 */
2022             pline("\83E\83Q\83F\81[\81I");
2023         break;
2024     case AD_ENCH: /* KMH -- remove enchantment (disenchanter) */
2025         hitmsg(mtmp, mattk);
2026         /* uncancelled is sufficient enough; please
2027            don't make this attack less frequent */
2028         if (uncancelled) {
2029             struct obj *obj = some_armor(&youmonst);
2030
2031             if (drain_item(obj)) {
2032 /*JP
2033                 pline("%s less effective.", Yobjnam2(obj, "seem"));
2034 */
2035                 Your("%s\82©\82ç\96\82\97Í\82ª\8fÁ\82¦\82½\82æ\82¤\82¾\81D", xname(obj));
2036             }
2037         }
2038         break;
2039     default:
2040         dmg = 0;
2041         break;
2042     }
2043     if (u.uhp < 1)
2044         done_in_by(mtmp, DIED);
2045
2046     /*  Negative armor class reduces damage done instead of fully protecting
2047      *  against hits.
2048      */
2049     if (dmg && u.uac < 0) {
2050         dmg -= rnd(-u.uac);
2051         if (dmg < 1)
2052             dmg = 1;
2053     }
2054
2055     if (dmg) {
2056         if (Half_physical_damage
2057             /* Mitre of Holiness */
2058             || (Role_if(PM_PRIEST) && uarmh && is_quest_artifact(uarmh)
2059                 && (is_undead(mtmp->data) || is_demon(mtmp->data)
2060                     || is_vampshifter(mtmp))))
2061             dmg = (dmg + 1) / 2;
2062
2063         if (permdmg) { /* Death's life force drain */
2064             int lowerlimit, *hpmax_p;
2065             /*
2066              * Apply some of the damage to permanent hit points:
2067              *  polymorphed         100% against poly'd hpmax
2068              *  hpmax > 25*lvl      100% against normal hpmax
2069              *  hpmax > 10*lvl  50..100%
2070              *  hpmax >  5*lvl  25..75%
2071              *  otherwise        0..50%
2072              * Never reduces hpmax below 1 hit point per level.
2073              */
2074             permdmg = rn2(dmg / 2 + 1);
2075             if (Upolyd || u.uhpmax > 25 * u.ulevel)
2076                 permdmg = dmg;
2077             else if (u.uhpmax > 10 * u.ulevel)
2078                 permdmg += dmg / 2;
2079             else if (u.uhpmax > 5 * u.ulevel)
2080                 permdmg += dmg / 4;
2081
2082             if (Upolyd) {
2083                 hpmax_p = &u.mhmax;
2084                 /* [can't use youmonst.m_lev] */
2085                 lowerlimit = min((int) youmonst.data->mlevel, u.ulevel);
2086             } else {
2087                 hpmax_p = &u.uhpmax;
2088                 lowerlimit = u.ulevel;
2089             }
2090             if (*hpmax_p - permdmg > lowerlimit)
2091                 *hpmax_p -= permdmg;
2092             else if (*hpmax_p > lowerlimit)
2093                 *hpmax_p = lowerlimit;
2094             /* else unlikely...
2095              * already at or below minimum threshold; do nothing */
2096             context.botl = 1;
2097         }
2098
2099         mdamageu(mtmp, dmg);
2100     }
2101
2102     if (dmg)
2103         res = passiveum(olduasmon, mtmp, mattk);
2104     else
2105         res = 1;
2106     stop_occupation();
2107     return res;
2108 }
2109
2110 /* An interface for use when taking a blindfold off, for example,
2111  * to see if an engulfing attack should immediately take affect, like
2112  * a passive attack. TRUE if engulfing blindness occurred */
2113 boolean
2114 gulp_blnd_check()
2115 {
2116     struct attack *mattk;
2117
2118     if (!Blinded && u.uswallow
2119         && (mattk = attacktype_fordmg(u.ustuck->data, AT_ENGL, AD_BLND))
2120         && can_blnd(u.ustuck, &youmonst, mattk->aatyp, (struct obj *) 0)) {
2121         ++u.uswldtim; /* compensate for gulpmu change */
2122         (void) gulpmu(u.ustuck, mattk);
2123         return TRUE;
2124     }
2125     return FALSE;
2126 }
2127
2128 /* monster swallows you, or damage if u.uswallow */
2129 STATIC_OVL int
2130 gulpmu(mtmp, mattk)
2131 register struct monst *mtmp;
2132 register struct attack *mattk;
2133 {
2134     struct trap *t = t_at(u.ux, u.uy);
2135     int tmp = d((int) mattk->damn, (int) mattk->damd);
2136     int tim_tmp;
2137     register struct obj *otmp2;
2138     int i;
2139     boolean physical_damage = FALSE;
2140
2141     if (!u.uswallow) { /* swallows you */
2142         int omx = mtmp->mx, omy = mtmp->my;
2143
2144         if (!engulf_target(mtmp, &youmonst))
2145             return 0;
2146         if ((t && ((t->ttyp == PIT) || (t->ttyp == SPIKED_PIT)))
2147             && sobj_at(BOULDER, u.ux, u.uy))
2148             return 0;
2149
2150         if (Punished)
2151             unplacebc(); /* ball&chain go away */
2152         remove_monster(omx, omy);
2153         mtmp->mtrapped = 0; /* no longer on old trap */
2154         place_monster(mtmp, u.ux, u.uy);
2155         u.ustuck = mtmp;
2156         newsym(mtmp->mx, mtmp->my);
2157         if (is_animal(mtmp->data) && u.usteed) {
2158             char buf[BUFSZ];
2159             /* Too many quirks presently if hero and steed
2160              * are swallowed. Pretend purple worms don't
2161              * like horses for now :-)
2162              */
2163             Strcpy(buf, mon_nam(u.usteed));
2164 #if 0 /*JP*/
2165             pline("%s lunges forward and plucks you off %s!", Monnam(mtmp),
2166                   buf);
2167 #else
2168             pline("%s\82Í\93Ë\90i\82µ\82 \82È\82½\82ð%s\82©\82ç\88ø\82«\97\8e\82µ\82½\81I", Monnam(mtmp),
2169                   buf);
2170 #endif
2171             dismount_steed(DISMOUNT_ENGULFED);
2172         } else
2173 /*JP
2174             pline("%s engulfs you!", Monnam(mtmp));
2175 */
2176             pline("%s\82Í\82 \82È\82½\82ð\88ù\82Ý\82±\82ñ\82¾\81I", Monnam(mtmp));
2177         stop_occupation();
2178         reset_occupations(); /* behave as if you had moved */
2179
2180         if (u.utrap) {
2181 #if 0 /*JP*/
2182             You("are released from the %s!",
2183                 u.utraptype == TT_WEB ? "web" : "trap");
2184 #else
2185             You("%s\82©\82ç\89ð\95ú\82³\82ê\82½\81I",
2186                 u.utraptype == TT_WEB ? "\82­\82à\82Ì\91\83" : "ã©");
2187 #endif
2188             u.utrap = 0;
2189         }
2190
2191         i = number_leashed();
2192         if (i > 0) {
2193 #if 0 /*JP*/
2194             const char *s = (i > 1) ? "leashes" : "leash";
2195             pline_The("%s %s loose.", s, vtense(s, "snap"));
2196 #else
2197             pline("\95R\82Í\83p\83`\83\93\82Æ\90Ø\82ê\82½\81D");
2198 #endif
2199             unleash_all();
2200         }
2201
2202         if (touch_petrifies(youmonst.data) && !resists_ston(mtmp)) {
2203             /* put the attacker back where it started;
2204                the resulting statue will end up there */
2205             remove_monster(mtmp->mx, mtmp->my); /* u.ux,u.uy */
2206             place_monster(mtmp, omx, omy);
2207             minstapetrify(mtmp, TRUE);
2208             /* normally unstuck() would do this, but we're not
2209                fully swallowed yet so that won't work here */
2210             if (Punished)
2211                 placebc();
2212             u.ustuck = 0;
2213             return (mtmp->mhp > 0) ? 0 : 2;
2214         }
2215
2216         display_nhwindow(WIN_MESSAGE, FALSE);
2217         vision_recalc(2); /* hero can't see anything */
2218         u.uswallow = 1;
2219         /* for digestion, shorter time is more dangerous;
2220            for other swallowings, longer time means more
2221            chances for the swallower to attack */
2222         if (mattk->adtyp == AD_DGST) {
2223             tim_tmp = 25 - (int) mtmp->m_lev;
2224             if (tim_tmp > 0)
2225                 tim_tmp = rnd(tim_tmp) / 2;
2226             else if (tim_tmp < 0)
2227                 tim_tmp = -(rnd(-tim_tmp) / 2);
2228             /* having good armor & high constitution makes
2229                it take longer for you to be digested, but
2230                you'll end up trapped inside for longer too */
2231             tim_tmp += -u.uac + 10 + (ACURR(A_CON) / 3 - 1);
2232         } else {
2233             /* higher level attacker takes longer to eject hero */
2234             tim_tmp = rnd((int) mtmp->m_lev + 10 / 2);
2235         }
2236         /* u.uswldtim always set > 1 */
2237         u.uswldtim = (unsigned) ((tim_tmp < 2) ? 2 : tim_tmp);
2238         swallowed(1);
2239         for (otmp2 = invent; otmp2; otmp2 = otmp2->nobj)
2240             (void) snuff_lit(otmp2);
2241     }
2242
2243     if (mtmp != u.ustuck)
2244         return 0;
2245     if (u.uswldtim > 0)
2246         u.uswldtim -= 1;
2247
2248     switch (mattk->adtyp) {
2249     case AD_DGST:
2250         physical_damage = TRUE;
2251         if (Slow_digestion) {
2252             /* Messages are handled below */
2253             u.uswldtim = 0;
2254             tmp = 0;
2255         } else if (u.uswldtim == 0) {
2256 /*JP
2257             pline("%s totally digests you!", Monnam(mtmp));
2258 */
2259             pline("%s\82Í\82 \82È\82½\82ð\8a®\91S\82É\8fÁ\89»\82µ\82½\81I", Monnam(mtmp));
2260             tmp = u.uhp;
2261             if (Half_physical_damage)
2262                 tmp *= 2; /* sorry */
2263         } else {
2264 #if 0 /*JP*/
2265             pline("%s%s digests you!", Monnam(mtmp),
2266                   (u.uswldtim == 2) ? " thoroughly"
2267                                     : (u.uswldtim == 1) ? " utterly" : "");
2268 #else
2269             pline("%s\82Í\82 \82È\82½\82ð%s\8fÁ\89»\82µ\82Ä\82¢\82é\81I", Monnam(mtmp),
2270                   (u.uswldtim == 2) ? "\93O\92ê\93I\82É"
2271                                     : (u.uswldtim == 1) ? "\8a®\91S\82É" : "");
2272 #endif
2273             exercise(A_STR, FALSE);
2274         }
2275         break;
2276     case AD_PHYS:
2277         physical_damage = TRUE;
2278         if (mtmp->data == &mons[PM_FOG_CLOUD]) {
2279 #if 0 /*JP*/
2280             You("are laden with moisture and %s",
2281                 flaming(youmonst.data)
2282                     ? "are smoldering out!"
2283                     : Breathless ? "find it mildly uncomfortable."
2284                                  : amphibious(youmonst.data)
2285                                        ? "feel comforted."
2286                                        : "can barely breathe!");
2287 #else
2288             You("\8e¼\8bC\82É\8bê\82µ\82ß\82ç\82ê\81C%s",
2289                 flaming(youmonst.data)
2290                     ? "\82­\82·\82Ô\82Á\82½\81I"
2291                     : Breathless ? "\8f­\81X\95s\89õ\82É\8a´\82\82½\81D"
2292                                  : amphibious(youmonst.data)
2293                                        ? "\88À\82ç\82¬\82ð\8a´\82\82½\81D"
2294                                        : "\91§\82ð\82·\82é\82Ì\82ª\82â\82Á\82Æ\82¾\81I");
2295 #endif
2296             /* NB: Amphibious includes Breathless */
2297             if (Amphibious && !flaming(youmonst.data))
2298                 tmp = 0;
2299         } else {
2300 /*JP
2301             You("are pummeled with debris!");
2302 */
2303             You("\8a¢âI\82Å\92É\82ß\82Â\82¯\82ç\82ê\82½\81I");
2304             exercise(A_STR, FALSE);
2305         }
2306         break;
2307     case AD_ACID:
2308         if (Acid_resistance) {
2309 /*JP
2310             You("are covered with a seemingly harmless goo.");
2311 */
2312             You("\96³\8aQ\82Á\82Û\82¢\82Ë\82Î\82Â\82­\82à\82Ì\82Å\82¨\82¨\82í\82ê\82½\81D");
2313             tmp = 0;
2314         } else {
2315             if (Hallucination)
2316 /*JP
2317                 pline("Ouch!  You've been slimed!");
2318 */
2319                 pline("\82°\82°\82ñ\81I\82 \82È\82½\82Í\82Ê\82é\82Ê\82é\82¾\81I");
2320             else
2321 /*JP
2322                 You("are covered in slime!  It burns!");
2323 */
2324                 You("\82×\82Æ\82×\82Æ\82É\82È\82Á\82½\81D\82»\82µ\82Ä\8e_\82É\8fÄ\82©\82ê\82½\81I");
2325             exercise(A_STR, FALSE);
2326         }
2327         break;
2328     case AD_BLND:
2329         if (can_blnd(mtmp, &youmonst, mattk->aatyp, (struct obj *) 0)) {
2330             if (!Blind) {
2331                 long was_blinded = Blinded;
2332                 if (!Blinded)
2333 /*JP
2334                     You_cant("see in here!");
2335 */
2336                     You("\89½\82à\8c©\82¦\82È\82¢\81I");
2337                 make_blinded((long) tmp, FALSE);
2338                 if (!was_blinded && !Blind)
2339                     Your1(vision_clears);
2340             } else
2341                 /* keep him blind until disgorged */
2342                 make_blinded(Blinded + 1, FALSE);
2343         }
2344         tmp = 0;
2345         break;
2346     case AD_ELEC:
2347         if (!mtmp->mcan && rn2(2)) {
2348 /*JP
2349             pline_The("air around you crackles with electricity.");
2350 */
2351             pline("\82 \82È\82½\82Ì\89ñ\82è\82Ì\8bó\8bC\82Í\93d\8bC\82Å\83s\83\8a\83s\83\8a\82µ\82Ä\82¢\82é\81D");
2352             if (Shock_resistance) {
2353                 shieldeff(u.ux, u.uy);
2354 /*JP
2355                 You("seem unhurt.");
2356 */
2357                 You("\8f\9d\82Â\82©\82È\82¢\82æ\82¤\82¾\81D");
2358                 ugolemeffects(AD_ELEC, tmp);
2359                 tmp = 0;
2360             }
2361         } else
2362             tmp = 0;
2363         break;
2364     case AD_COLD:
2365         if (!mtmp->mcan && rn2(2)) {
2366             if (Cold_resistance) {
2367                 shieldeff(u.ux, u.uy);
2368 /*JP
2369                 You_feel("mildly chilly.");
2370 */
2371                 pline("\82Ð\82ñ\82â\82è\82µ\82½\81D");
2372                 ugolemeffects(AD_COLD, tmp);
2373                 tmp = 0;
2374             } else
2375 /*JP
2376                 You("are freezing to death!");
2377 */
2378                 You("\93\80\8e\80\82µ\82»\82¤\82¾\81I");
2379         } else
2380             tmp = 0;
2381         break;
2382     case AD_FIRE:
2383         if (!mtmp->mcan && rn2(2)) {
2384             if (Fire_resistance) {
2385                 shieldeff(u.ux, u.uy);
2386 /*JP
2387                 You_feel("mildly hot.");
2388 */
2389                 pline("\83|\83J\83|\83J\82µ\82½\81D");
2390                 ugolemeffects(AD_FIRE, tmp);
2391                 tmp = 0;
2392             } else
2393 /*JP
2394                 You("are burning to a crisp!");
2395 */
2396                 You("\94R\82¦\82Ä\83J\83\89\83J\83\89\82É\82È\82Á\82½\81I");
2397             burn_away_slime();
2398         } else
2399             tmp = 0;
2400         break;
2401     case AD_DISE:
2402         if (!diseasemu(mtmp->data))
2403             tmp = 0;
2404         break;
2405     case AD_DREN:
2406         /* AC magic cancellation doesn't help when engulfed */
2407         if (!mtmp->mcan && rn2(4))
2408             drain_en(tmp);
2409         tmp = 0;
2410         break;
2411     default:
2412         physical_damage = TRUE;
2413         tmp = 0;
2414         break;
2415     }
2416
2417     if (physical_damage)
2418         tmp = Maybe_Half_Phys(tmp);
2419
2420     mdamageu(mtmp, tmp);
2421     if (tmp)
2422         stop_occupation();
2423
2424     if (touch_petrifies(youmonst.data) && !resists_ston(mtmp)) {
2425 #if 0 /*JP*/
2426         pline("%s very hurriedly %s you!", Monnam(mtmp),
2427               is_animal(mtmp->data) ? "regurgitates" : "expels");
2428 #else
2429         pline("%s\82Í\8dQ\82Ä\82Ä\82 \82È\82½\82ð%s\82µ\82½\81I", Monnam(mtmp),
2430               is_animal(mtmp->data)? "\93f\82«\96ß" : "\94r\8fo");
2431 #endif
2432         expels(mtmp, mtmp->data, FALSE);
2433     } else if (!u.uswldtim || youmonst.data->msize >= MZ_HUGE) {
2434 /*JP
2435         You("get %s!", is_animal(mtmp->data) ? "regurgitated" : "expelled");
2436 */
2437         You("%s\82³\82ê\82½\81I", is_animal(mtmp->data)? "\93f\82«\96ß" : "\94r\8fo");
2438         if (flags.verbose
2439             && (is_animal(mtmp->data)
2440                 || (dmgtype(mtmp->data, AD_DGST) && Slow_digestion)))
2441 /*JP
2442             pline("Obviously %s doesn't like your taste.", mon_nam(mtmp));
2443 */
2444             You("\82Ç\82¤\82à%s\8dD\82Ý\82Ì\96¡\82\82á\82È\82¢\82æ\82¤\82¾\81D", mon_nam(mtmp));
2445         expels(mtmp, mtmp->data, FALSE);
2446     }
2447     return 1;
2448 }
2449
2450 /* monster explodes in your face */
2451 STATIC_OVL int
2452 explmu(mtmp, mattk, ufound)
2453 register struct monst *mtmp;
2454 register struct attack *mattk;
2455 boolean ufound;
2456 {
2457     boolean physical_damage = TRUE, kill_agr = TRUE;
2458
2459     if (mtmp->mcan)
2460         return 0;
2461
2462     if (!ufound)
2463 #if 0 /*JP*/
2464         pline("%s explodes at a spot in %s!",
2465               canseemon(mtmp) ? Monnam(mtmp) : "It",
2466               levl[mtmp->mux][mtmp->muy].typ == WATER ? "empty water"
2467                                                       : "thin air");
2468 #else
2469         pline("%s\82Í\89½\82à\82È\82¢%s\82Å\94\9a\94­\82µ\82½\81I",
2470               canseemon(mtmp) ? Monnam(mtmp) : "\89½\8eÒ\82©",
2471               levl[mtmp->mux][mtmp->muy].typ == WATER ? "\90\85\92\86"
2472                                                       : "\8bó\8aÔ");
2473 #endif
2474     else {
2475         register int tmp = d((int) mattk->damn, (int) mattk->damd);
2476         register boolean not_affected = defends((int) mattk->adtyp, uwep);
2477
2478         hitmsg(mtmp, mattk);
2479
2480         switch (mattk->adtyp) {
2481         case AD_COLD:
2482             physical_damage = FALSE;
2483             not_affected |= Cold_resistance;
2484             goto common;
2485         case AD_FIRE:
2486             physical_damage = FALSE;
2487             not_affected |= Fire_resistance;
2488             goto common;
2489         case AD_ELEC:
2490             physical_damage = FALSE;
2491             not_affected |= Shock_resistance;
2492         common:
2493
2494             if (!not_affected) {
2495                 if (ACURR(A_DEX) > rnd(20)) {
2496 /*JP
2497                     You("duck some of the blast.");
2498 */
2499                     You("\8fÕ\8c\82\82ð\82³\82¯\82½\81D");
2500                     tmp = (tmp + 1) / 2;
2501                 } else {
2502                     if (flags.verbose)
2503 /*JP
2504                         You("get blasted!");
2505 */
2506                         You("\8fÕ\8c\82\82ð\82­\82ç\82Á\82½\81I");
2507                 }
2508                 if (mattk->adtyp == AD_FIRE)
2509                     burn_away_slime();
2510                 if (physical_damage)
2511                     tmp = Maybe_Half_Phys(tmp);
2512                 mdamageu(mtmp, tmp);
2513             }
2514             break;
2515
2516         case AD_BLND:
2517             not_affected = resists_blnd(&youmonst);
2518             if (!not_affected) {
2519                 /* sometimes you're affected even if it's invisible */
2520                 if (mon_visible(mtmp) || (rnd(tmp /= 2) > u.ulevel)) {
2521 /*JP
2522                     You("are blinded by a blast of light!");
2523 */
2524                     You("\82Ü\82Î\82ä\82¢\8cõ\82É\96Ú\82ª\82­\82ç\82ñ\82¾\81I");
2525                     make_blinded((long) tmp, FALSE);
2526                     if (!Blind)
2527                         Your1(vision_clears);
2528                 } else if (flags.verbose)
2529 /*JP
2530                     You("get the impression it was not terribly bright.");
2531 */
2532                     You("\82»\82ê\82Í\8b°\82ë\82µ\82­\82Ü\82Ô\82µ\82¢\82Æ\82¢\82¤\82Ù\82Ç\82\82á\82È\82¢\82Æ\8ev\82Á\82½\81D");
2533             }
2534             break;
2535
2536         case AD_HALU:
2537             not_affected |= Blind || (u.umonnum == PM_BLACK_LIGHT
2538                                       || u.umonnum == PM_VIOLET_FUNGUS
2539                                       || dmgtype(youmonst.data, AD_STUN));
2540             if (!not_affected) {
2541                 boolean chg;
2542                 if (!Hallucination)
2543 /*JP
2544                     You("are caught in a blast of kaleidoscopic light!");
2545 */
2546                     You("\96\9c\89Ø\8b¾\82Ì\8cõ\82É\95ß\82ç\82¦\82ç\82ê\82½\81I");
2547                 /* avoid hallucinating the black light as it dies */
2548                 mondead(mtmp);    /* remove it from map now */
2549                 kill_agr = FALSE; /* already killed (maybe lifesaved) */
2550                 chg =
2551                     make_hallucinated(HHallucination + (long) tmp, FALSE, 0L);
2552 /*JP
2553                 You("%s.", chg ? "are freaked out" : "seem unaffected");
2554 */
2555                 You("%s\81D", chg ? "\90\8c\82¢\82µ\82ê\82½" : "\89e\8b¿\82ð\8eó\82¯\82È\82©\82Á\82½");
2556             }
2557             break;
2558
2559         default:
2560             break;
2561         }
2562         if (not_affected) {
2563 /*JP
2564             You("seem unaffected by it.");
2565 */
2566             You("\89e\8b¿\82ð\8eó\82¯\82È\82¢\82æ\82¤\82¾\81D");
2567             ugolemeffects((int) mattk->adtyp, tmp);
2568         }
2569     }
2570     if (kill_agr)
2571         mondead(mtmp);
2572     wake_nearto(mtmp->mx, mtmp->my, 7 * 7);
2573     return (mtmp->mhp > 0) ? 0 : 2;
2574 }
2575
2576 /* monster gazes at you */
2577 int
2578 gazemu(mtmp, mattk)
2579 register struct monst *mtmp;
2580 register struct attack *mattk;
2581 {
2582     static const char *const reactions[] = {
2583 #if 0 /*JP*/
2584         "confused",              /* [0] */
2585         "stunned",               /* [1] */
2586         "puzzled",   "dazzled",  /* [2,3] */
2587         "irritated", "inflamed", /* [4,5] */
2588         "tired",                 /* [6] */
2589         "dulled",                /* [7] */
2590 #else
2591         "\8d¬\97\90\82µ\82½",                 /* [0] */
2592         "\9eN\9eO\82Æ\82µ\82½",               /* [1] */
2593         "\8d¢\98f\82µ\82½",   "\8c\98f\82³\82ê\82½", /* [2,3] */
2594         "\83C\83\89\83C\83\89\82µ\82½", "\8b»\95±\82µ\82½", /* [4,5] */
2595         "\94æ\82ê\82½",                   /* [6] */
2596         "\82Ú\82ñ\82â\82è\82µ\82½",             /* [7] */
2597 #endif
2598     };
2599     int react = -1;
2600     boolean cancelled = (mtmp->mcan != 0), already = FALSE;
2601
2602     /* assumes that hero has to see monster's gaze in order to be
2603        affected, rather than monster just having to look at hero;
2604        when hallucinating, hero's brain doesn't register what
2605        it's seeing correctly so the gaze is usually ineffective
2606        [this could be taken a lot farther and select a gaze effect
2607        appropriate to what's currently being displayed, giving
2608        ordinary monsters a gaze attack when hero thinks he or she
2609        is facing a gazing creature, but let's not go that far...] */
2610     if (Hallucination && rn2(4))
2611         cancelled = TRUE;
2612
2613     switch (mattk->adtyp) {
2614     case AD_STON:
2615         if (cancelled || !mtmp->mcansee) {
2616             if (!canseemon(mtmp))
2617                 break; /* silently */
2618 #if 0 /*JP*/
2619             pline("%s %s.", Monnam(mtmp),
2620                   (mtmp->data == &mons[PM_MEDUSA] && mtmp->mcan)
2621                       ? "doesn't look all that ugly"
2622                       : "gazes ineffectually");
2623 #else
2624             pline("%s\82Í%s\81D", Monnam(mtmp),
2625                   (mtmp->data == &mons[PM_MEDUSA] && mtmp->mcan)
2626                       ? "\82»\82ê\82Ù\82Ç\8fX\82­\82È\82¢\82±\82Æ\82É\8bC\82ª\82Â\82¢\82½"
2627                       : "\96³\88Ó\96¡\82É\82É\82ç\82ñ\82¾");
2628 #endif
2629             break;
2630         }
2631         if (Reflecting && couldsee(mtmp->mx, mtmp->my)
2632             && mtmp->data == &mons[PM_MEDUSA]) {
2633             /* hero has line of sight to Medusa and she's not blind */
2634             boolean useeit = canseemon(mtmp);
2635
2636             if (useeit)
2637 /*JP
2638                 (void) ureflects("%s gaze is reflected by your %s.",
2639 */
2640                 (void) ureflects("%s\82Ì\82É\82ç\82Ý\82Í%s\82Å\94½\8eË\82³\82ê\82½\81D",
2641                                  s_suffix(Monnam(mtmp)));
2642             if (mon_reflects(
2643                     mtmp, !useeit ? (char *) 0
2644 /*JP
2645                                   : "The gaze is reflected away by %s %s!"))
2646 */
2647                                   : "\82É\82ç\82Ý\82Í%s\82Ì%s\82É\82æ\82Á\82Ä\94½\8eË\82³\82ê\82½\81I"))
2648                 break;
2649             if (!m_canseeu(mtmp)) { /* probably you're invisible */
2650                 if (useeit)
2651 #if 0 /*JP*/
2652                     pline(
2653                       "%s doesn't seem to notice that %s gaze was reflected.",
2654                           Monnam(mtmp), mhis(mtmp));
2655 #else
2656                     pline("\82É\82ç\82Ý\82ª\94½\8eË\82µ\82Ä\82¢\82é\82±\82Æ\82É%s\82Í\8bC\95t\82¢\82Ä\82¢\82È\82¢\82æ\82¤\82¾\81D",
2657                           Monnam(mtmp));
2658 #endif
2659                 break;
2660             }
2661             if (useeit)
2662 /*JP
2663                 pline("%s is turned to stone!", Monnam(mtmp));
2664 */
2665                 pline("%s\82Í\90Î\82É\82È\82Á\82½\81I", Monnam(mtmp));
2666             stoned = TRUE;
2667             killed(mtmp);
2668
2669             if (mtmp->mhp > 0)
2670                 break;
2671             return 2;
2672         }
2673         if (canseemon(mtmp) && couldsee(mtmp->mx, mtmp->my)
2674             && !Stone_resistance) {
2675 /*JP
2676             You("meet %s gaze.", s_suffix(mon_nam(mtmp)));
2677 */
2678             You("%s\82É\82É\82ç\82Ü\82ê\82½\81D", s_suffix(mon_nam(mtmp)));
2679             stop_occupation();
2680             if (poly_when_stoned(youmonst.data) && polymon(PM_STONE_GOLEM))
2681                 break;
2682 /*JP
2683             You("turn to stone...");
2684 */
2685             You("\90Î\82É\82È\82Á\82½\81D\81D\81D");
2686             killer.format = KILLED_BY;
2687             Strcpy(killer.name, mtmp->data->mname);
2688             done(STONING);
2689         }
2690         break;
2691     case AD_CONF:
2692         if (canseemon(mtmp) && couldsee(mtmp->mx, mtmp->my) && mtmp->mcansee
2693             && !mtmp->mspec_used && rn2(5)) {
2694             if (cancelled) {
2695                 react = 0; /* "confused" */
2696                 already = (mtmp->mconf != 0);
2697             } else {
2698                 int conf = d(3, 4);
2699
2700                 mtmp->mspec_used = mtmp->mspec_used + (conf + rn2(6));
2701                 if (!Confusion)
2702 /*JP
2703                     pline("%s gaze confuses you!", s_suffix(Monnam(mtmp)));
2704 */
2705                     pline("%s\82Ì\82É\82ç\82Ý\82Å\82 \82È\82½\82Í\8d¬\97\90\82µ\82½\81I", s_suffix(Monnam(mtmp)));
2706                 else
2707 /*JP
2708                     You("are getting more and more confused.");
2709 */
2710                     You("\82Ü\82·\82Ü\82·\8d¬\97\90\82µ\82½\81D");
2711                 make_confused(HConfusion + conf, FALSE);
2712                 stop_occupation();
2713             }
2714         }
2715         break;
2716     case AD_STUN:
2717         if (canseemon(mtmp) && couldsee(mtmp->mx, mtmp->my) && mtmp->mcansee
2718             && !mtmp->mspec_used && rn2(5)) {
2719             if (cancelled) {
2720                 react = 1; /* "stunned" */
2721                 already = (mtmp->mstun != 0);
2722             } else {
2723                 int stun = d(2, 6);
2724
2725                 mtmp->mspec_used = mtmp->mspec_used + (stun + rn2(6));
2726 /*JP
2727                 pline("%s stares piercingly at you!", Monnam(mtmp));
2728 */
2729                 pline("%s\82Í\97â\82½\82¢\82Ü\82È\82´\82µ\82ð\82 \82È\82½\82É\8cü\82¯\82½\81I", Monnam(mtmp));
2730                 make_stunned((HStun & TIMEOUT) + (long) stun, TRUE);
2731                 stop_occupation();
2732             }
2733         }
2734         break;
2735     case AD_BLND:
2736         if (canseemon(mtmp) && !resists_blnd(&youmonst)
2737             && distu(mtmp->mx, mtmp->my) <= BOLT_LIM * BOLT_LIM) {
2738             if (cancelled) {
2739                 react = rn1(2, 2); /* "puzzled" || "dazzled" */
2740                 already = (mtmp->mcansee == 0);
2741                 /* Archons gaze every round; we don't want cancelled ones
2742                    giving the "seems puzzled/dazzled" message that often */
2743                 if (mtmp->mcan && mtmp->data == &mons[PM_ARCHON] && rn2(5))
2744                     react = -1;
2745             } else {
2746                 int blnd = d((int) mattk->damn, (int) mattk->damd);
2747
2748 /*JP
2749                 You("are blinded by %s radiance!", s_suffix(mon_nam(mtmp)));
2750 */
2751                 You("%s\82Ì\8cõ\82Å\96Ú\82ª\8c©\82¦\82È\82­\82È\82Á\82½\81I", mon_nam(mtmp));
2752                 make_blinded((long) blnd, FALSE);
2753                 stop_occupation();
2754                 /* not blind at this point implies you're wearing
2755                    the Eyes of the Overworld; make them block this
2756                    particular stun attack too */
2757                 if (!Blind)
2758                     Your1(vision_clears);
2759                 else
2760                     make_stunned((long) d(1, 3), TRUE);
2761             }
2762         }
2763         break;
2764     case AD_FIRE:
2765         if (canseemon(mtmp) && couldsee(mtmp->mx, mtmp->my) && mtmp->mcansee
2766             && !mtmp->mspec_used && rn2(5)) {
2767             if (cancelled) {
2768                 react = rn1(2, 4); /* "irritated" || "inflamed" */
2769             } else {
2770                 int dmg = d(2, 6), lev = (int) mtmp->m_lev;
2771
2772 /*JP
2773                 pline("%s attacks you with a fiery gaze!", Monnam(mtmp));
2774 */
2775                 pline("%s\82Í\89\8a\82Ì\82É\82ç\82Ý\8dU\8c\82\82ð\82µ\82Ä\82«\82½\81I", Monnam(mtmp));
2776                 stop_occupation();
2777                 if (Fire_resistance) {
2778 /*JP
2779                     pline_The("fire doesn't feel hot!");
2780 */
2781                     pline("\89Î\82Í\82º\82ñ\82º\82ñ\94M\82­\82È\82¢\81I");
2782                     dmg = 0;
2783                 }
2784                 burn_away_slime();
2785                 if (lev > rn2(20))
2786                     destroy_item(SCROLL_CLASS, AD_FIRE);
2787                 if (lev > rn2(20))
2788                     destroy_item(POTION_CLASS, AD_FIRE);
2789                 if (lev > rn2(25))
2790                     destroy_item(SPBOOK_CLASS, AD_FIRE);
2791                 if (dmg)
2792                     mdamageu(mtmp, dmg);
2793             }
2794         }
2795         break;
2796 #ifdef PM_BEHOLDER /* work in progress */
2797     case AD_SLEE:
2798         if (canseemon(mtmp) && couldsee(mtmp->mx, mtmp->my) && mtmp->mcansee
2799             && multi >= 0 && !rn2(5) && !Sleep_resistance) {
2800             if (cancelled) {
2801                 react = 6;                      /* "tired" */
2802                 already = (mtmp->mfrozen != 0); /* can't happen... */
2803             } else {
2804                 fall_asleep(-rnd(10), TRUE);
2805 /*JP
2806                 pline("%s gaze makes you very sleepy...",
2807 */
2808                 pline("%s\82Ì\82É\82ç\82Ý\82Å\82 \82È\82½\82Í\96°\82­\82È\82Á\82½\81D\81D\81D",
2809                       s_suffix(Monnam(mtmp)));
2810             }
2811         }
2812         break;
2813     case AD_SLOW:
2814         if (canseemon(mtmp) && couldsee(mtmp->mx, mtmp->my) && mtmp->mcansee
2815             && (HFast & (INTRINSIC | TIMEOUT)) && !defends(AD_SLOW, uwep)
2816             && !rn2(4)) {
2817             if (cancelled) {
2818                 react = 7; /* "dulled" */
2819                 already = (mtmp->mspeed == MSLOW);
2820             } else {
2821                 u_slow_down();
2822                 stop_occupation();
2823             }
2824         }
2825         break;
2826 #endif /* BEHOLDER */
2827     default:
2828         impossible("Gaze attack %d?", mattk->adtyp);
2829         break;
2830     }
2831     if (react >= 0) {
2832         if (Hallucination && rn2(3))
2833             react = rn2(SIZE(reactions));
2834         /* cancelled/hallucinatory feedback; monster might look "confused",
2835            "stunned",&c but we don't actually set corresponding attribute */
2836 #if 0 /*JP*/
2837         pline("%s looks %s%s.", Monnam(mtmp),
2838               !rn2(3) ? "" : already ? "quite "
2839                                      : (!rn2(2) ? "a bit " : "somewhat "),
2840               reactions[react]);
2841 #else
2842         pline("%s\82Í%s%s\82æ\82¤\82¾\81D", Monnam(mtmp),
2843               !rn2(3) ? "" : already ? "\82©\82È\82è"
2844                                      : (!rn2(2) ? "\8f­\82µ" : "\82¢\82­\82ç\82©"),
2845               reactions[react]);
2846 #endif
2847     }
2848     return 0;
2849 }
2850
2851 /* mtmp hits you for n points damage */
2852 void
2853 mdamageu(mtmp, n)
2854 register struct monst *mtmp;
2855 register int n;
2856 {
2857     context.botl = 1;
2858     if (Upolyd) {
2859         u.mh -= n;
2860         if (u.mh < 1)
2861             rehumanize();
2862     } else {
2863         u.uhp -= n;
2864         if (u.uhp < 1)
2865             done_in_by(mtmp, DIED);
2866     }
2867 }
2868
2869 /* returns 0 if seduction impossible,
2870  *         1 if fine,
2871  *         2 if wrong gender for nymph
2872  */
2873 int
2874 could_seduce(magr, mdef, mattk)
2875 struct monst *magr, *mdef;
2876 struct attack *mattk;
2877 {
2878     register struct permonst *pagr;
2879     boolean agrinvis, defperc;
2880     xchar genagr, gendef;
2881
2882     if (is_animal(magr->data))
2883         return 0;
2884     if (magr == &youmonst) {
2885         pagr = youmonst.data;
2886         agrinvis = (Invis != 0);
2887         genagr = poly_gender();
2888     } else {
2889         pagr = magr->data;
2890         agrinvis = magr->minvis;
2891         genagr = gender(magr);
2892     }
2893     if (mdef == &youmonst) {
2894         defperc = (See_invisible != 0);
2895         gendef = poly_gender();
2896     } else {
2897         defperc = perceives(mdef->data);
2898         gendef = gender(mdef);
2899     }
2900
2901     if (agrinvis && !defperc
2902         && (!SYSOPT_SEDUCE || (mattk && mattk->adtyp != AD_SSEX)))
2903         return 0;
2904
2905     if (pagr->mlet != S_NYMPH
2906         && ((pagr != &mons[PM_INCUBUS] && pagr != &mons[PM_SUCCUBUS])
2907             || (SYSOPT_SEDUCE && mattk && mattk->adtyp != AD_SSEX)))
2908         return 0;
2909
2910     if (genagr == 1 - gendef)
2911         return 1;
2912     else
2913         return (pagr->mlet == S_NYMPH) ? 2 : 0;
2914 }
2915
2916 /* Returns 1 if monster teleported */
2917 int
2918 doseduce(mon)
2919 register struct monst *mon;
2920 {
2921     register struct obj *ring, *nring;
2922     boolean fem = (mon->data == &mons[PM_SUCCUBUS]); /* otherwise incubus */
2923     int tried_gloves = 0;
2924     char qbuf[QBUFSZ];
2925
2926     if (mon->mcan || mon->mspec_used) {
2927 #if 0 /*JP*/
2928         pline("%s acts as though %s has got a %sheadache.", Monnam(mon),
2929               mhe(mon), mon->mcan ? "severe " : "");
2930 #else
2931         pline("%s\82Í%s\93ª\82ª\92É\82¢\82Ó\82è\82ð\82µ\82½\81D", Monnam(mon),
2932               mon->mcan ? "\82Ð\82Ç\82­" : "");
2933 #endif
2934         return 0;
2935     }
2936
2937     if (unconscious()) {
2938 /*JP
2939         pline("%s seems dismayed at your lack of response.", Monnam(mon));
2940 */
2941         pline("%s\82Í\95Ô\8e\96\82ª\82È\82¢\82Ì\82Å\8bC\82ª\88Þ\82¦\82½\82æ\82¤\82¾\81D", Monnam(mon));
2942         return 0;
2943     }
2944
2945     if (Blind)
2946 /*JP
2947         pline("It caresses you...");
2948 */
2949         pline("\89½\8eÒ\82©\82ª\82 \82È\82½\82ð\95ø\82«\82µ\82ß\82Ä\82¢\82é\81D\81D\81D");
2950     else
2951 /*JP
2952         You_feel("very attracted to %s.", mon_nam(mon));
2953 */
2954         You("%s\82É\88ø\82«\82Â\82¯\82ç\82ê\82Ä\82é\82æ\82¤\82È\8bC\82ª\82µ\82½\81D", mon_nam(mon));
2955     /* if in the process of putting armor on or taking armor off,
2956        interrupt that activity now */
2957     (void) stop_donning((struct obj *) 0);
2958     /* don't try to take off gloves if cursed weapon blocks them */
2959     if (welded(uwep))
2960         tried_gloves = 1;
2961
2962     for (ring = invent; ring; ring = nring) {
2963         nring = ring->nobj;
2964         if (ring->otyp != RIN_ADORNMENT)
2965             continue;
2966         if (fem) {
2967             if (ring->owornmask && uarmg) {
2968                 /* don't take off worn ring if gloves are in the way */
2969                 if (!tried_gloves++)
2970                     mayberem(uarmg, "gloves");
2971                 if (uarmg)
2972                     continue; /* next ring might not be worn */
2973             }
2974             if (rn2(20) < ACURR(A_CHA)) {
2975 #if 0 /*JP*/
2976                 (void) safe_qbuf(qbuf, "\"That ",
2977                                  " looks pretty.  May I have it?\"", ring,
2978                                  xname, simpleonames, "ring");
2979 #else
2980                 (void) safe_qbuf(qbuf, "\81u\82È\82ñ\82Ä\91f\93G\82È",
2981                                  "\82Å\82µ\82å\82¤\81D\82í\82½\82µ\82É\82­\82ê\82Ü\82¹\82ñ\81H\81v", ring,
2982                                  xname, simpleonames, "\8ew\97Ö");
2983 #endif
2984                 makeknown(RIN_ADORNMENT);
2985                 if (yn(qbuf) == 'n')
2986                     continue;
2987             } else
2988 #if 0 /*JP*/
2989                 pline("%s decides she'd like %s, and takes it.",
2990                       Blind ? "She" : Monnam(mon), yname(ring));
2991 #else
2992                 pline("%s\82Í%s\82ª\82Æ\82Ä\82à\8bC\82É\82¢\82Á\82Ä\81C\82»\82ê\82ð\8eæ\82è\82 \82°\82½\81D",
2993                       Blind ? "\94Þ\8f\97" : Monnam(mon), xname(ring));
2994 #endif
2995             makeknown(RIN_ADORNMENT);
2996             if (ring == uleft || ring == uright)
2997                 Ring_gone(ring);
2998             if (ring == uwep)
2999                 setuwep((struct obj *) 0);
3000             if (ring == uswapwep)
3001                 setuswapwep((struct obj *) 0);
3002             if (ring == uquiver)
3003                 setuqwep((struct obj *) 0);
3004             freeinv(ring);
3005             (void) mpickobj(mon, ring);
3006         } else {
3007             if (uleft && uright && uleft->otyp == RIN_ADORNMENT
3008                 && uright->otyp == RIN_ADORNMENT)
3009                 break;
3010             if (ring == uleft || ring == uright)
3011                 continue;
3012             if (uarmg) {
3013                 /* don't put on ring if gloves are in the way */
3014                 if (!tried_gloves++)
3015 /*JP
3016                     mayberem(uarmg, "gloves");
3017 */
3018                     mayberem(uarmg, "\8f¬\8eè");
3019                 if (uarmg)
3020                     break; /* no point trying further rings */
3021             }
3022             if (rn2(20) < ACURR(A_CHA)) {
3023 #if 0 /*JP*/
3024                 (void) safe_qbuf(qbuf, "\"That ",
3025                                 " looks pretty.  Would you wear it for me?\"",
3026                                  ring, xname, simpleonames, "ring");
3027 #else
3028                 (void) safe_qbuf(qbuf, "\81u\82¨\82â\82È\82ñ\82Ä\82·\82Î\82ç\82µ\82¢",
3029                                 "\82¾\81D\8e\84\82Ì\82½\82ß\82É\8ew\82É\82Í\82ß\82Ä\82­\82ê\82È\82¢\82©\82¢\81H\81v",
3030                                  ring, xname, simpleonames, "\8ew\97Ö");
3031 #endif
3032                 makeknown(RIN_ADORNMENT);
3033                 if (yn(qbuf) == 'n')
3034                     continue;
3035             } else {
3036 #if 0 /*JP*/
3037                 pline("%s decides you'd look prettier wearing %s,",
3038                       Blind ? "He" : Monnam(mon), yname(ring));
3039 #else
3040                 pline("%s\82Í%s\82ð\82Â\82¯\82½\82 \82È\82½\82ª\82æ\82è\96£\97Í\93I\82¾\82Æ\8dl\82¦\81C",
3041                       Blind ? "\94Þ" : Monnam(mon), xname(ring));
3042 #endif
3043 /*JP
3044                 pline("and puts it on your finger.");
3045 */
3046                 pline("\82 \82È\82½\82Ì\8ew\82É\82»\82ê\82ð\82Í\82ß\82½\81D");
3047             }
3048             makeknown(RIN_ADORNMENT);
3049             if (!uright) {
3050 #if 0 /*JP*/
3051                 pline("%s puts %s on your right %s.",
3052                       Blind ? "He" : Monnam(mon), the(xname(ring)),
3053                       body_part(HAND));
3054 #else
3055                 pline("%s\82Í%s\82ð\82 \82È\82½\82Ì\89E%s\82É\82Í\82ß\82½\81D",
3056                       Blind ? "\94Þ" : Monnam(mon), the(xname(ring)),
3057                       body_part(HAND));
3058 #endif
3059                 setworn(ring, RIGHT_RING);
3060             } else if (!uleft) {
3061 #if 0 /*JP*/
3062                 pline("%s puts %s on your left %s.",
3063                       Blind ? "He" : Monnam(mon), the(xname(ring)),
3064                       body_part(HAND));
3065 #else
3066                 pline("%s\82Í%s\82ð\82 \82È\82½\82Ì\8d¶%s\82É\82Í\82ß\82½\81D",
3067                       Blind ? "\94Þ" : Monnam(mon), the(xname(ring)),
3068                       body_part(HAND));
3069 #endif
3070                 setworn(ring, LEFT_RING);
3071             } else if (uright && uright->otyp != RIN_ADORNMENT) {
3072 #if 0 /*JP*/
3073                 pline("%s replaces %s with %s.", Blind ? "He" : Monnam(mon),
3074                       yname(uright), yname(ring));
3075 #else
3076                 pline("%s\82Í%s\82ð%s\82É\82Æ\82è\82©\82¦\82½\81D", Blind ? "\94Þ" : Monnam(mon),
3077                       yname(uright), xname(ring));
3078 #endif
3079                 Ring_gone(uright);
3080                 setworn(ring, RIGHT_RING);
3081             } else if (uleft && uleft->otyp != RIN_ADORNMENT) {
3082 #if 0 /*JP*/
3083                 pline("%s replaces %s with %s.", Blind ? "He" : Monnam(mon),
3084                       yname(uleft), yname(ring));
3085 #else
3086                 pline("%s\82Í%s\82ð%s\82É\82Æ\82è\82©\82¦\82½\81D", Blind ? "\94Þ" : Monnam(mon),
3087                       yname(uleft), xname(ring));
3088 #endif
3089                 Ring_gone(uleft);
3090                 setworn(ring, LEFT_RING);
3091             } else
3092                 impossible("ring replacement");
3093             Ring_on(ring);
3094             prinv((char *) 0, ring, 0L);
3095         }
3096     }
3097
3098     if (!uarmc && !uarmf && !uarmg && !uarms && !uarmh && !uarmu)
3099 #if 0 /*JP*/
3100         pline("%s murmurs sweet nothings into your ear.",
3101               Blind ? (fem ? "She" : "He") : Monnam(mon));
3102 #else
3103         pline("%s\82Í\82 \82È\82½\82Ì\8e¨\82à\82Æ\82Å\8aÃ\82¢\82³\82³\82â\82«\82ð\82Â\82Ô\82â\82¢\82½\81D",
3104               Blind ? (fem ? "\94Þ\8f\97" : "\94Þ") : Monnam(mon));
3105 #endif
3106     else
3107 #if 0 /*JP*/
3108         pline("%s murmurs in your ear, while helping you undress.",
3109               Blind ? (fem ? "She" : "He") : Monnam(mon));
3110 #else
3111         pline("%s\82Í\8e¨\82à\82Æ\82Å\82 \82È\82½\82Ì\95\9e\82ð\92E\82ª\82¹\82È\82ª\82ç\82³\82³\82â\82¢\82½\81D",
3112               Blind ? (fem ? "\94Þ\8f\97" : "\94Þ") : Monnam(mon));
3113 #endif
3114     mayberem(uarmc, cloak_simple_name(uarmc));
3115     if (!uarmc)
3116 /*JP
3117         mayberem(uarm, "suit");
3118 */
3119         mayberem(uarm, "\83X\81[\83c");
3120 /*JP
3121     mayberem(uarmf, "boots");
3122 */
3123     mayberem(uarmf, "\83u\81[\83c");
3124     if (!tried_gloves)
3125 /*JP
3126         mayberem(uarmg, "gloves");
3127 */
3128         mayberem(uarmg, "\8f¬\8eè");
3129 /*JP
3130     mayberem(uarms, "shield");
3131 */
3132     mayberem(uarms, "\8f\82");
3133     mayberem(uarmh, helm_simple_name(uarmh));
3134     if (!uarmc && !uarm)
3135 /*JP
3136         mayberem(uarmu, "shirt");
3137 */
3138         mayberem(uarmu, "\83V\83\83\83c");
3139
3140     if (uarm || uarmc) {
3141 #if 0 /*JP*/
3142         verbalize("You're such a %s; I wish...",
3143                   flags.female ? "sweet lady" : "nice guy");
3144 #else
3145         verbalize("%s\82¾\81D\81D\81D\82Æ\82¢\82¢\82Ì\82É\81D",
3146                   flags.female ? "\83`\83\83\81[\83~\83\93\83O" : "\82·\82Ä\82«");
3147 #endif
3148         if (!tele_restrict(mon))
3149             (void) rloc(mon, TRUE);
3150         return 1;
3151     }
3152     if (u.ualign.type == A_CHAOTIC)
3153         adjalign(1);
3154
3155     /* by this point you have discovered mon's identity, blind or not... */
3156 /*JP
3157     pline("Time stands still while you and %s lie in each other's arms...",
3158 */
3159     pline("\82 \82È\82½\82Æ%s\82ª\95ø\82«\8d\87\82¤\82Æ\81C\8e\9e\82ª\8e~\82Ü\82Á\82½\82æ\82¤\82É\8a´\82\82½\81D\81D\81D",
3160           noit_mon_nam(mon));
3161     if (rn2(35) > ACURR(A_CHA) + ACURR(A_INT)) {
3162         /* Don't bother with mspec_used here... it didn't get tired! */
3163 /*JP
3164         pline("%s seems to have enjoyed it more than you...",
3165 */
3166         pline("%s\82Í\82 \82È\82½\82æ\82è\8ay\82µ\82ñ\82¾\82æ\82¤\82¾\81D\81D\81D",
3167               noit_Monnam(mon));
3168         switch (rn2(5)) {
3169         case 0:
3170 /*JP
3171             You_feel("drained of energy.");
3172 */
3173             You("\91Ì\97Í\82ª\8fÁ\96Õ\82µ\82½\82æ\82¤\82È\8bC\82ª\82µ\82½\81D");
3174             u.uen = 0;
3175             u.uenmax -= rnd(Half_physical_damage ? 5 : 10);
3176             exercise(A_CON, FALSE);
3177             if (u.uenmax < 0)
3178                 u.uenmax = 0;
3179             break;
3180         case 1:
3181 /*JP
3182             You("are down in the dumps.");
3183 */
3184             You("\88Ó\8bC\8fÁ\92¾\82µ\82½\81D");
3185             (void) adjattrib(A_CON, -1, TRUE);
3186             exercise(A_CON, FALSE);
3187             context.botl = 1;
3188             break;
3189         case 2:
3190 /*JP
3191             Your("senses are dulled.");
3192 */
3193             Your("\8cÜ\8a´\82Í\93Ý\82Á\82½\81D");
3194             (void) adjattrib(A_WIS, -1, TRUE);
3195             exercise(A_WIS, FALSE);
3196             context.botl = 1;
3197             break;
3198         case 3:
3199             if (!resists_drli(&youmonst)) {
3200 /*JP
3201                 You_feel("out of shape.");
3202 */
3203                 You("\82­\82½\82Ñ\82ê\82½\81D");
3204 /*JP
3205                 losexp("overexertion");
3206 */
3207                 losexp("\89ß\98J\82Å");
3208             } else {
3209 /*JP
3210                 You("have a curious feeling...");
3211 */
3212                 You("\95Ï\82È\8a´\82\82ª\82µ\82½\81D\81D\81D");
3213             }
3214             break;
3215         case 4: {
3216             int tmp;
3217 /*JP
3218             You_feel("exhausted.");
3219 */
3220             You("\94æ\82ê\82ð\8a´\82\82½\81D");
3221             exercise(A_STR, FALSE);
3222             tmp = rn1(10, 6);
3223 /*JP
3224             losehp(Maybe_Half_Phys(tmp), "exhaustion", KILLED_BY);
3225 */
3226             losehp(Maybe_Half_Phys(tmp), "\90¸\97Í\82Ì\8eg\82¢\82·\82¬\82Å", KILLED_BY);
3227             break;
3228         }
3229         }
3230     } else {
3231         mon->mspec_used = rnd(100); /* monster is worn out */
3232 /*JP
3233         You("seem to have enjoyed it more than %s...", noit_mon_nam(mon));
3234 */
3235         You("%s\82æ\82è\82à\8ay\82µ\82ñ\82¾\82æ\82¤\82¾\81D\81D\81D", noit_mon_nam(mon));
3236         switch (rn2(5)) {
3237         case 0:
3238 /*JP
3239             You_feel("raised to your full potential.");
3240 */
3241             You("\90ö\8dÝ\94\\97Í\82ª\8d\82\82Ü\82Á\82½\82æ\82¤\82É\8a´\82\82½\81D");
3242             exercise(A_CON, TRUE);
3243             u.uen = (u.uenmax += rnd(5));
3244             break;
3245         case 1:
3246 /*JP
3247             You_feel("good enough to do it again.");
3248 */
3249             You("\82à\82¤\88ê\93x\82Å\82«\82é\82Æ\8ev\82Á\82½\81D");
3250             (void) adjattrib(A_CON, 1, TRUE);
3251             exercise(A_CON, TRUE);
3252             context.botl = 1;
3253             break;
3254         case 2:
3255 /*JP
3256             You("will always remember %s...", noit_mon_nam(mon));
3257 */
3258             You("\82¢\82Â\82Ü\82Å\82à%s\82ð\8ao\82¦\82Ä\82é\82¾\82ë\82¤\81D\81D\81D", mon_nam(mon));
3259             (void) adjattrib(A_WIS, 1, TRUE);
3260             exercise(A_WIS, TRUE);
3261             context.botl = 1;
3262             break;
3263         case 3:
3264 /*JP
3265             pline("That was a very educational experience.");
3266 */
3267             pline("\82Æ\82Ä\82à\8bM\8fd\82È\8co\8c±\82¾\82Á\82½\81D");
3268             pluslvl(FALSE);
3269             exercise(A_WIS, TRUE);
3270             break;
3271         case 4:
3272 /*JP
3273             You_feel("restored to health!");
3274 */
3275             You("\82Æ\82Ä\82à\8c\92\8dN\82É\82È\82Á\82½\81I");
3276             u.uhp = u.uhpmax;
3277             if (Upolyd)
3278                 u.mh = u.mhmax;
3279             exercise(A_STR, TRUE);
3280             context.botl = 1;
3281             break;
3282         }
3283     }
3284
3285     if (mon->mtame) /* don't charge */
3286         ;
3287     else if (rn2(20) < ACURR(A_CHA)) {
3288 #if 0 /*JP*/
3289         pline("%s demands that you pay %s, but you refuse...",
3290               noit_Monnam(mon), Blind ? (fem ? "her" : "him") : mhim(mon));
3291 #else
3292         pline("%s\82Í\82 \82È\82½\82É\8bà\82ð\95¥\82¤\82æ\82¤\97v\8b\81\82µ\82½\82ª\81C\82 \82È\82½\82Í\8b\91\82ñ\82¾\81D\81D\81D",
3293               Monnam(mon));
3294 #endif
3295     } else if (u.umonnum == PM_LEPRECHAUN)
3296 /*JP
3297         pline("%s tries to take your money, but fails...", noit_Monnam(mon));
3298 */
3299         pline("%s\82Í\8bà\82ð\8eæ\82ë\82¤\82Æ\82µ\82½\82ª\81C\8e¸\94s\82µ\82½\81D\81D\81D", noit_Monnam(mon));
3300     else {
3301         long cost;
3302         long umoney = money_cnt(invent);
3303
3304         if (umoney > (long) LARGEST_INT - 10L)
3305             cost = (long) rnd(LARGEST_INT) + 500L;
3306         else
3307             cost = (long) rnd((int) umoney + 10) + 500L;
3308         if (mon->mpeaceful) {
3309             cost /= 5L;
3310             if (!cost)
3311                 cost = 1L;
3312         }
3313         if (cost > umoney)
3314             cost = umoney;
3315         if (!cost)
3316 /*JP
3317             verbalize("It's on the house!");
3318 */
3319             verbalize("\82±\82ê\82Í\82¨\82²\82è%s\81I", fem ? "\82æ" : "\82³");
3320         else {
3321 #if 0 /*JP*/
3322             pline("%s takes %ld %s for services rendered!", noit_Monnam(mon),
3323                   cost, currency(cost));
3324 #else
3325             pline("%s\82Í\83T\81[\83r\83X\97¿\82Æ\82µ\82Ä%ld%s\92D\82¢\8eæ\82Á\82½\81I", noit_Monnam(mon),
3326                   cost, currency(cost));
3327 #endif
3328             money2mon(mon, cost);
3329             context.botl = 1;
3330         }
3331     }
3332     if (!rn2(25))
3333         mon->mcan = 1; /* monster is worn out */
3334     if (!tele_restrict(mon))
3335         (void) rloc(mon, TRUE);
3336     return 1;
3337 }
3338
3339 STATIC_OVL void
3340 mayberem(obj, str)
3341 register struct obj *obj;
3342 const char *str;
3343 {
3344     char qbuf[QBUFSZ];
3345
3346     if (!obj || !obj->owornmask)
3347         return;
3348
3349     if (rn2(20) < ACURR(A_CHA)) {
3350 #if 0 /*JP*/
3351         Sprintf(qbuf, "\"Shall I remove your %s, %s?\"", str,
3352                 (!rn2(2) ? "lover" : !rn2(2) ? "dear" : "sweetheart"));
3353 #else
3354         Sprintf(qbuf,"\81u%s\82ð\8eæ\82Á\82Ä\82¢\82¢\81C%s\81H\81v", str,
3355                 (!rn2(2) ? "\82Ë\82¥" : flags.female ? "\83n\83j\81[" : "\83_\81[\83\8a\83\93" ));
3356 #endif
3357         if (yn(qbuf) == 'n')
3358             return;
3359     } else {
3360         char hairbuf[BUFSZ];
3361
3362 #if 0 /*JP*/
3363         Sprintf(hairbuf, "let me run my fingers through your %s",
3364                 body_part(HAIR));
3365 #else
3366         Sprintf(hairbuf,
3367                 flags.female ? "\82È\82ñ\82ÄãY\97í\82È%s\82È\82ñ\82¾" : "\8a\95\82ð\8eæ\82Á\82½\82ç\82È\82©\82È\82©\83C\83J\83X\82\82á\82È\82¢",
3368                 body_part(HAIR));
3369 #endif
3370 #if 0 /*JP*/
3371         verbalize("Take off your %s; %s.", str,
3372                   (obj == uarm)
3373                      ? "let's get a little closer"
3374                      : (obj == uarmc || obj == uarms)
3375                         ? "it's in the way"
3376                         : (obj == uarmf)
3377                            ? "let me rub your feet"
3378                            : (obj == uarmg)
3379                               ? "they're too clumsy"
3380                               : (obj == uarmu)
3381                                  ? "let me massage you"
3382                                  /* obj == uarmh */
3383                                  : hairbuf);
3384 #else
3385         verbalize("%s\82ð\92E\82¢\82Å\81D\81D\81D%s\81D", str,
3386                   (obj == uarm)
3387                   ? "\82à\82¤\82¿\82å\82Á\82Æ\8añ\82è\82»\82Á\82Ä"
3388                   : (obj == uarmc || obj == uarms)
3389                   ? "\82»\82¤\82»\82¤"
3390                   : (obj == uarmf)
3391                   ? (flags.female ? "ãY\97í\82È\91«\82¾\82Ë" : "\82¤\82Ó\82Á\81C\82½\82­\82Ü\82µ\82¢\91«\82Ë")
3392                   : (obj == uarmg)
3393                   ? (flags.female ? "\82È\82ñ\82Ä\91f\93G\82È\8eè\82¾" : "\82½\82­\82Ü\82µ\82¢\98r\82Ë")
3394                   : (obj == uarmu)
3395                   ? (flags.female ? "\82«\82ê\82¢\82È\91Ì\82¾" : "\82½\82­\82Ü\82µ\82¢\82Ì\82Ë")
3396                   /* obj == uarmh */
3397                   : hairbuf);
3398 #endif
3399     }
3400     remove_worn_item(obj, TRUE);
3401 }
3402
3403 STATIC_OVL int
3404 passiveum(olduasmon, mtmp, mattk)
3405 struct permonst *olduasmon;
3406 register struct monst *mtmp;
3407 register struct attack *mattk;
3408 {
3409     int i, tmp;
3410
3411     for (i = 0;; i++) {
3412         if (i >= NATTK)
3413             return 1;
3414         if (olduasmon->mattk[i].aatyp == AT_NONE
3415             || olduasmon->mattk[i].aatyp == AT_BOOM)
3416             break;
3417     }
3418     if (olduasmon->mattk[i].damn)
3419         tmp =
3420             d((int) olduasmon->mattk[i].damn, (int) olduasmon->mattk[i].damd);
3421     else if (olduasmon->mattk[i].damd)
3422         tmp = d((int) olduasmon->mlevel + 1, (int) olduasmon->mattk[i].damd);
3423     else
3424         tmp = 0;
3425
3426     /* These affect the enemy even if you were "killed" (rehumanized) */
3427     switch (olduasmon->mattk[i].adtyp) {
3428     case AD_ACID:
3429         if (!rn2(2)) {
3430 /*JP
3431             pline("%s is splashed by your acid!", Monnam(mtmp));
3432 */
3433             pline("%s\82Í\82 \82È\82½\82Ì\8e_\82ð\82­\82ç\82Á\82½\81I", Monnam(mtmp));
3434             if (resists_acid(mtmp)) {
3435 /*JP
3436                 pline("%s is not affected.", Monnam(mtmp));
3437 */
3438                 pline("%s\82Í\89e\8b¿\82ð\8eó\82¯\82È\82¢\81D", Monnam(mtmp));
3439                 tmp = 0;
3440             }
3441         } else
3442             tmp = 0;
3443         if (!rn2(30))
3444             erode_armor(mtmp, ERODE_CORRODE);
3445         if (!rn2(6))
3446             acid_damage(MON_WEP(mtmp));
3447         goto assess_dmg;
3448     case AD_STON: /* cockatrice */
3449     {
3450         long protector = attk_protection((int) mattk->aatyp),
3451              wornitems = mtmp->misc_worn_check;
3452
3453         /* wielded weapon gives same protection as gloves here */
3454         if (MON_WEP(mtmp) != 0)
3455             wornitems |= W_ARMG;
3456
3457         if (!resists_ston(mtmp)
3458             && (protector == 0L
3459                 || (protector != ~0L
3460                     && (wornitems & protector) != protector))) {
3461             if (poly_when_stoned(mtmp->data)) {
3462                 mon_to_stone(mtmp);
3463                 return 1;
3464             }
3465 /*JP
3466             pline("%s turns to stone!", Monnam(mtmp));
3467 */
3468             pline("%s\82Í\90Î\82É\82È\82Á\82½\81I", Monnam(mtmp));
3469             stoned = 1;
3470             xkilled(mtmp, 0);
3471             if (mtmp->mhp > 0)
3472                 return 1;
3473             return 2;
3474         }
3475         return 1;
3476     }
3477     case AD_ENCH: /* KMH -- remove enchantment (disenchanter) */
3478         if (otmp) {
3479             (void) drain_item(otmp);
3480             /* No message */
3481         }
3482         return 1;
3483     default:
3484         break;
3485     }
3486     if (!Upolyd)
3487         return 1;
3488
3489     /* These affect the enemy only if you are still a monster */
3490     if (rn2(3))
3491         switch (youmonst.data->mattk[i].adtyp) {
3492         case AD_PHYS:
3493             if (youmonst.data->mattk[i].aatyp == AT_BOOM) {
3494 /*JP
3495                 You("explode!");
3496 */
3497                 pline("\82 \82È\82½\82Í\94\9a\94­\82µ\82½\81I");
3498                 /* KMH, balance patch -- this is okay with unchanging */
3499                 rehumanize();
3500                 goto assess_dmg;
3501             }
3502             break;
3503         case AD_PLYS: /* Floating eye */
3504             if (tmp > 127)
3505                 tmp = 127;
3506             if (u.umonnum == PM_FLOATING_EYE) {
3507                 if (!rn2(4))
3508                     tmp = 127;
3509                 if (mtmp->mcansee && haseyes(mtmp->data) && rn2(3)
3510                     && (perceives(mtmp->data) || !Invis)) {
3511                     if (Blind)
3512 /*JP
3513                         pline("As a blind %s, you cannot defend yourself.",
3514 */
3515                         pline("%s\82Í\96Ú\82ª\8c©\82¦\82È\82¢\82Ì\82Å\81C\82 \82È\82½\82Í\82É\82ç\82Ý\82Å\96h\8cä\82Å\82«\82È\82¢\81D",
3516                               youmonst.data->mname);
3517                     else {
3518                         if (mon_reflects(mtmp,
3519 /*JP
3520                                          "Your gaze is reflected by %s %s."))
3521 */
3522                                          "\82 \82È\82½\82Ì\82É\82ç\82Ý\82Í%s\82Ì%s\82Å\94½\8eË\82µ\82½\81D"))
3523                             return 1;
3524 /*JP
3525                         pline("%s is frozen by your gaze!", Monnam(mtmp));
3526 */
3527                         pline("%s\82Í\82 \82È\82½\82Ì\82É\82ç\82Ý\82Å\93®\82¯\82È\82­\82È\82Á\82½\81I", Monnam(mtmp));
3528                         paralyze_monst(mtmp, tmp);
3529                         return 3;
3530                     }
3531                 }
3532             } else { /* gelatinous cube */
3533 /*JP
3534                 pline("%s is frozen by you.", Monnam(mtmp));
3535 */
3536                 pline("%s\82Í\93®\82¯\82È\82¢\81D", Monnam(mtmp));
3537                 paralyze_monst(mtmp, tmp);
3538                 return 3;
3539             }
3540             return 1;
3541         case AD_COLD: /* Brown mold or blue jelly */
3542             if (resists_cold(mtmp)) {
3543                 shieldeff(mtmp->mx, mtmp->my);
3544 /*JP
3545                 pline("%s is mildly chilly.", Monnam(mtmp));
3546 */
3547                 pline("%s\82Í\97â\82¦\82½\81D", Monnam(mtmp));
3548                 golemeffects(mtmp, AD_COLD, tmp);
3549                 tmp = 0;
3550                 break;
3551             }
3552 /*JP
3553             pline("%s is suddenly very cold!", Monnam(mtmp));
3554 */
3555             pline("%s\82Í\93Ë\91R\93\80\82è\82Ã\82¯\82É\82È\82Á\82½\81I", Monnam(mtmp));
3556             u.mh += tmp / 2;
3557             if (u.mhmax < u.mh)
3558                 u.mhmax = u.mh;
3559             if (u.mhmax > ((youmonst.data->mlevel + 1) * 8))
3560                 (void) split_mon(&youmonst, mtmp);
3561             break;
3562         case AD_STUN: /* Yellow mold */
3563             if (!mtmp->mstun) {
3564                 mtmp->mstun = 1;
3565 #if 0 /*JP*/
3566                 pline("%s %s.", Monnam(mtmp),
3567                       makeplural(stagger(mtmp->data, "stagger")));
3568 #else
3569                 pline("%s\82Í\82­\82ç\82­\82ç\82µ\82½\81D", Monnam(mtmp));
3570 #endif
3571             }
3572             tmp = 0;
3573             break;
3574         case AD_FIRE: /* Red mold */
3575             if (resists_fire(mtmp)) {
3576                 shieldeff(mtmp->mx, mtmp->my);
3577 #if 0 /*JP*/
3578                 pline("%s is mildly warm.", Monnam(mtmp));
3579 #else
3580                 pline("%s\82Í\92g\82©\82­\82È\82Á\82½\81D", Monnam(mtmp));
3581 #endif
3582                 golemeffects(mtmp, AD_FIRE, tmp);
3583                 tmp = 0;
3584                 break;
3585             }
3586 #if 0 /*JP*/
3587             pline("%s is suddenly very hot!", Monnam(mtmp));
3588 #else
3589             pline("%s\82Í\93Ë\91R\94M\82­\82È\82Á\82½\81I", Monnam(mtmp));
3590 #endif
3591             break;
3592         case AD_ELEC:
3593             if (resists_elec(mtmp)) {
3594                 shieldeff(mtmp->mx, mtmp->my);
3595 #if 0 /*JP*/
3596                 pline("%s is slightly tingled.", Monnam(mtmp));
3597 #else
3598                 pline("%s\82Í\82¿\82å\82Á\82Æ\83s\83\8a\83s\83\8a\82µ\82½\81D", Monnam(mtmp));
3599 #endif
3600                 golemeffects(mtmp, AD_ELEC, tmp);
3601                 tmp = 0;
3602                 break;
3603             }
3604 #if 0 /*JP*/
3605             pline("%s is jolted with your electricity!", Monnam(mtmp));
3606 #else
3607             pline("%s\82Í\93d\8bC\83V\83\87\83b\83N\82ð\82¤\82¯\82½\81I", Monnam(mtmp));
3608 #endif
3609             break;
3610         default:
3611             tmp = 0;
3612             break;
3613         }
3614     else
3615         tmp = 0;
3616
3617 assess_dmg:
3618     if ((mtmp->mhp -= tmp) <= 0) {
3619 /*JP
3620         pline("%s dies!", Monnam(mtmp));
3621 */
3622         pline("%s\82Í\8e\80\82ñ\82¾\81I", Monnam(mtmp));
3623         xkilled(mtmp, 0);
3624         if (mtmp->mhp > 0)
3625             return 1;
3626         return 2;
3627     }
3628     return 1;
3629 }
3630
3631 struct monst *
3632 cloneu()
3633 {
3634     register struct monst *mon;
3635     int mndx = monsndx(youmonst.data);
3636
3637     if (u.mh <= 1)
3638         return (struct monst *) 0;
3639     if (mvitals[mndx].mvflags & G_EXTINCT)
3640         return (struct monst *) 0;
3641     mon = makemon(youmonst.data, u.ux, u.uy, NO_MINVENT | MM_EDOG);
3642     if (!mon)
3643         return NULL;
3644     mon->mcloned = 1;
3645     mon = christen_monst(mon, plname);
3646     initedog(mon);
3647     mon->m_lev = youmonst.data->mlevel;
3648     mon->mhpmax = u.mhmax;
3649     mon->mhp = u.mh / 2;
3650     u.mh -= mon->mhp;
3651     context.botl = 1;
3652     return mon;
3653 }
3654
3655 /*mhitu.c*/