OSDN Git Service

update year to 2020
[jnethack/source.git] / src / sit.c
1 /* NetHack 3.6  sit.c   $NHDT-Date: 1559670609 2019/06/04 17:50:09 $  $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.61 $ */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /*-Copyright (c) Robert Patrick Rankin, 2012. */
4 /* NetHack may be freely redistributed.  See license for details. */
5
6 /* JNetHack Copyright */
7 /* (c) Issei Numata, Naoki Hamada, Shigehiro Miyashita, 1994-2000  */
8 /* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2020            */
9 /* JNetHack may be freely redistributed.  See license for details. */
10
11 #include "hack.h"
12 #include "artifact.h"
13
14
15 /* take away the hero's money */
16 void
17 take_gold()
18 {
19     struct obj *otmp, *nobj;
20     int lost_money = 0;
21
22     for (otmp = invent; otmp; otmp = nobj) {
23         nobj = otmp->nobj;
24         if (otmp->oclass == COIN_CLASS) {
25             lost_money = 1;
26             remove_worn_item(otmp, FALSE);
27             delobj(otmp);
28         }
29     }
30     if (!lost_money) {
31 /*JP
32         You_feel("a strange sensation.");
33 */
34         You("\8aï\96­\82È\8a´\8ao\82ð\8ao\82¦\82½\81D");
35     } else {
36 /*JP
37         You("notice you have no money!");
38 */
39         You("\82¨\8bà\82ð\8e\9d\82Á\82Ä\82È\82¢\82±\82Æ\82É\8bC\82ª\82Â\82¢\82½\81I");
40         context.botl = 1;
41     }
42 }
43
44 /* #sit command */
45 int
46 dosit()
47 {
48 /*JP
49     static const char sit_message[] = "sit on the %s.";
50 */
51     static const char sit_message[] = "%s\82É\8dÀ\82Á\82½\81D";
52     register struct trap *trap = t_at(u.ux, u.uy);
53     register int typ = levl[u.ux][u.uy].typ;
54
55     if (u.usteed) {
56 /*JP
57         You("are already sitting on %s.", mon_nam(u.usteed));
58 */
59         You("\82à\82¤%s\82É\8dÀ\82Á\82Ä\82¢\82é\81D", mon_nam(u.usteed));
60         return 0;
61     }
62     if (u.uundetected && is_hider(youmonst.data) && u.umonnum != PM_TRAPPER)
63         u.uundetected = 0; /* no longer on the ceiling */
64
65     if (!can_reach_floor(FALSE)) {
66         if (u.uswallow)
67 /*JP
68             There("are no seats in here!");
69 */
70             pline("\82±\82±\82É\82Í\88Ö\8eq\82ª\82È\82¢\81I");
71         else if (Levitation)
72 /*JP
73             You("tumble in place.");
74 */
75             You("\82»\82Ì\8fê\82Å\92\88\95Ô\82è\82µ\82½\81D");
76         else
77 /*JP
78             You("are sitting on air.");
79 */
80             You("\8bó\92\86\82É\8dÀ\82Á\82½\81D");
81         return 0;
82     } else if (u.ustuck && !sticks(youmonst.data)) {
83         /* holding monster is next to hero rather than beneath, but
84            hero is in no condition to actually sit at has/her own spot */
85         if (humanoid(u.ustuck->data))
86 /*JP
87             pline("%s won't offer %s lap.", Monnam(u.ustuck), mhis(u.ustuck));
88 */
89             pline("%s\82Í\82Ð\82´\82ð\8fo\82³\82È\82©\82Á\82½\81D", Monnam(u.ustuck));
90         else
91 /*JP
92             pline("%s has no lap.", Monnam(u.ustuck));
93 */
94             pline("%s\82É\82Í\82Ð\82´\82ª\82È\82¢\81D", Monnam(u.ustuck));
95         return 0;
96     } else if (is_pool(u.ux, u.uy) && !Underwater) { /* water walking */
97         goto in_water;
98     }
99
100     if (OBJ_AT(u.ux, u.uy)
101         /* ensure we're not standing on the precipice */
102         && !(uteetering_at_seen_pit(trap) || uescaped_shaft(trap))) {
103         register struct obj *obj;
104
105         obj = level.objects[u.ux][u.uy];
106         if (youmonst.data->mlet == S_DRAGON && obj->oclass == COIN_CLASS) {
107 #if 0 /*JP:T*/
108             You("coil up around your %shoard.",
109                 (obj->quan + money_cnt(invent) < u.ulevel * 1000) ? "meager "
110                                                                   : "");
111 #else
112             You("%s\82¨\95ó\82Ì\82Ü\82í\82è\82Å\82Æ\82®\82ë\82ð\8aª\82¢\82½\81D",
113                 (obj->quan + money_cnt(invent) < u.ulevel * 1000) ? "\82í\82¸\82©\82È"
114                                                                   : "");
115 #endif
116         } else {
117 /*JP
118             You("sit on %s.", the(xname(obj)));
119 */
120             You("%s\82É\8dÀ\82Á\82½\81D", the(xname(obj)));
121             if (!(Is_box(obj) || objects[obj->otyp].oc_material == CLOTH))
122 /*JP
123                 pline("It's not very comfortable...");
124 */
125                 pline("\82 \82Ü\82è\8dÀ\82è\82²\82±\82¿\82ª\82æ\82­\82È\82¢\81D\81D\81D");
126         }
127     } else if (trap != 0 || (u.utrap && (u.utraptype >= TT_LAVA))) {
128         if (u.utrap) {
129             exercise(A_WIS, FALSE); /* you're getting stuck longer */
130             if (u.utraptype == TT_BEARTRAP) {
131 /*JP
132                 You_cant("sit down with your %s in the bear trap.",
133 */
134                 pline("%s\82ª\8cF\82Ìã©\82É\82Í\82³\82Ü\82Á\82Ä\82¢\82é\82Ì\82Å\8dÀ\82ê\82È\82¢\81D",
135                          body_part(FOOT));
136                 u.utrap++;
137             } else if (u.utraptype == TT_PIT) {
138                 if (trap && trap->ttyp == SPIKED_PIT) {
139 /*JP
140                     You("sit down on a spike.  Ouch!");
141 */
142                     You("\83g\83Q\82Ì\8fã\82É\8dÀ\82Á\82½\81D\82¢\82Ä\82Á\81I");
143                     losehp(Half_physical_damage ? rn2(2) : 1,
144 /*JP
145                            "sitting on an iron spike", KILLED_BY);
146 */
147                            "\93S\82Ì\83g\83Q\82Ì\8fã\82É\8dÀ\82Á\82Ä", KILLED_BY);
148                     exercise(A_STR, FALSE);
149                 } else
150 /*JP
151                     You("sit down in the pit.");
152 */
153                     You("\97\8e\82µ\8c\8a\82Ì\92\86\82Å\8dÀ\82Á\82½\81D");
154                 u.utrap += rn2(5);
155             } else if (u.utraptype == TT_WEB) {
156 /*JP
157                 You("sit in the spider web and get entangled further!");
158 */
159                 You("\82­\82à\82Ì\91\83\82Ì\92\86\82Å\8dÀ\82Á\82½\82ç\81C\82Ü\82·\82Ü\82·\97\8d\82Ü\82Á\82½\81I");
160                 u.utrap += rn1(10, 5);
161             } else if (u.utraptype == TT_LAVA) {
162                 /* Must have fire resistance or they'd be dead already */
163 /*JP
164                 You("sit in the %s!", hliquid("lava"));
165 */
166                 You("%s\82Ì\92\86\82É\8dÀ\82Á\82½\81I", hliquid("\97n\8aâ"));
167                 if (Slimed)
168                     burn_away_slime();
169                 u.utrap += rnd(4);
170 /*JP
171                 losehp(d(2, 10), "sitting in lava",
172 */
173                 losehp(d(2, 10), "\97n\8aâ\82Ì\92\86\82É\8dÀ\82Á\82Ä",
174                        KILLED_BY); /* lava damage */
175             } else if (u.utraptype == TT_INFLOOR
176                        || u.utraptype == TT_BURIEDBALL) {
177 /*JP
178                 You_cant("maneuver to sit!");
179 */
180                 You("\8dÀ\82é\82æ\82¤\82È\93®\8dì\82ª\82Å\82«\82È\82¢\81I");
181                 u.utrap++;
182             }
183         } else {
184 /*JP
185             You("sit down.");
186 */
187             You("\8dÀ\82Á\82½\81D");
188             dotrap(trap, VIASITTING);
189         }
190     } else if ((Underwater || Is_waterlevel(&u.uz))
191                 && !eggs_in_water(youmonst.data)) {
192         if (Is_waterlevel(&u.uz))
193 /*JP
194             There("are no cushions floating nearby.");
195 */
196             pline("\8bß\82­\82É\95\82\82¢\82Ä\82¢\82é\83N\83b\83V\83\87\83\93\82Í\82È\82¢\81D");
197         else
198 /*JP
199             You("sit down on the muddy bottom.");
200 */
201             You("\82Ç\82ë\82Ç\82ë\82µ\82½\92ê\82É\8dÀ\82Á\82½\81D");
202     } else if (is_pool(u.ux, u.uy) && !eggs_in_water(youmonst.data)) {
203     in_water:
204 /*JP
205         You("sit in the %s.", hliquid("water"));
206 */
207         You("%s\82Ì\92\86\82Å\8dÀ\82Á\82½\81D", hliquid("\90\85"));
208         if (!rn2(10) && uarm)
209 /*JP
210             (void) water_damage(uarm, "armor", TRUE);
211 */
212             (void) water_damage(uarm, "\8aZ", TRUE);
213         if (!rn2(10) && uarmf && uarmf->otyp != WATER_WALKING_BOOTS)
214 /*JP
215             (void) water_damage(uarm, "armor", TRUE);
216 */
217             (void) water_damage(uarm, "\8aZ", TRUE);
218     } else if (IS_SINK(typ)) {
219         You(sit_message, defsyms[S_sink].explanation);
220 /*JP
221         Your("%s gets wet.", humanoid(youmonst.data) ? "rump" : "underside");
222 */
223         Your("%s\82Í\94G\82ê\82½\81D", humanoid(youmonst.data) ? "\90K" : "\89º\95\94");
224     } else if (IS_ALTAR(typ)) {
225         You(sit_message, defsyms[S_altar].explanation);
226         altar_wrath(u.ux, u.uy);
227     } else if (IS_GRAVE(typ)) {
228         You(sit_message, defsyms[S_grave].explanation);
229     } else if (typ == STAIRS) {
230 /*JP
231         You(sit_message, "stairs");
232 */
233         You(sit_message, "\8aK\92i");
234     } else if (typ == LADDER) {
235 /*JP
236         You(sit_message, "ladder");
237 */
238         You(sit_message, "\82Í\82µ\82²");
239     } else if (is_lava(u.ux, u.uy)) {
240         /* must be WWalking */
241 /*JP
242         You(sit_message, hliquid("lava"));
243 */
244         You(sit_message, hliquid("\97n\8aâ"));
245         burn_away_slime();
246         if (likes_lava(youmonst.data)) {
247 /*JP
248             pline_The("%s feels warm.", hliquid("lava"));
249 */
250             pline_The("%s\82Í\92g\82©\82¢\81D", hliquid("\97n\8aâ"));
251             return 1;
252         }
253 /*JP
254         pline_The("%s burns you!", hliquid("lava"));
255 */
256         pline_The("%s\82Å\94R\82¦\82½\81I", hliquid("\97n\8aâ"));
257         losehp(d((Fire_resistance ? 2 : 10), 10), /* lava damage */
258 /*JP
259                "sitting on lava", KILLED_BY);
260 */
261                "\97n\8aâ\82É\8dÀ\82Á\82Ä", KILLED_BY);
262     } else if (is_ice(u.ux, u.uy)) {
263         You(sit_message, defsyms[S_ice].explanation);
264         if (!Cold_resistance)
265 /*JP
266             pline_The("ice feels cold.");
267 */
268             pline("\95X\82Í\97â\82½\82­\8a´\82\82½\81D");
269     } else if (typ == DRAWBRIDGE_DOWN) {
270 /*JP
271         You(sit_message, "drawbridge");
272 */
273         You(sit_message, "\92µ\82Ë\8b´");
274     } else if (IS_THRONE(typ)) {
275         You(sit_message, defsyms[S_throne].explanation);
276         if (rnd(6) > 4) {
277             switch (rnd(13)) {
278             case 1:
279                 (void) adjattrib(rn2(A_MAX), -rn1(4, 3), FALSE);
280 /*JP
281                 losehp(rnd(10), "cursed throne", KILLED_BY_AN);
282 */
283                 losehp(rnd(10), "\8eô\82í\82ê\82½\8bÊ\8dÀ\82Å", KILLED_BY_AN);
284                 break;
285             case 2:
286                 (void) adjattrib(rn2(A_MAX), 1, FALSE);
287                 break;
288             case 3:
289 #if 0 /*JP:T*/
290                 pline("A%s electric shock shoots through your body!",
291                       (Shock_resistance) ? "n" : " massive");
292 #else
293                 pline("%s\93d\8bC\82ª\82 \82È\82½\82Ì\91Ì\82ð\91\96\82è\94²\82¯\82½\81I",
294                       (Shock_resistance) ? "" : "\8c\83\82µ\82¢");
295 #endif
296 /*JP
297                 losehp(Shock_resistance ? rnd(6) : rnd(30), "electric chair",
298 */
299                 losehp(Shock_resistance ? rnd(6) : rnd(30), "\93d\8bC\88Ö\8eq\82Å",
300                        KILLED_BY_AN);
301                 exercise(A_CON, FALSE);
302                 break;
303             case 4:
304 /*JP
305                 You_feel("much, much better!");
306 */
307                 You_feel("\82Æ\82Ä\82à\81C\82Æ\82Ä\82à\8c³\8bC\82É\82È\82Á\82½\82æ\82¤\82È\8bC\82ª\82µ\82½\81I");
308                 if (Upolyd) {
309                     if (u.mh >= (u.mhmax - 5))
310                         u.mhmax += 4;
311                     u.mh = u.mhmax;
312                 }
313                 if (u.uhp >= (u.uhpmax - 5))
314                     u.uhpmax += 4;
315                 u.uhp = u.uhpmax;
316                 u.ucreamed = 0;
317                 make_blinded(0L, TRUE);
318                 make_sick(0L, (char *) 0, FALSE, SICK_ALL);
319                 heal_legs(0);
320                 context.botl = 1;
321                 break;
322             case 5:
323                 take_gold();
324                 break;
325             case 6:
326                 if (u.uluck + rn2(5) < 0) {
327 /*JP
328                     You_feel("your luck is changing.");
329 */
330                     pline("\89^\82ª\8cü\82¢\82Ä\82«\82½\8bC\82ª\82·\82é\81D");
331                     change_luck(1);
332                 } else
333                     makewish();
334                 break;
335             case 7:
336               {
337                 int cnt = rnd(10);
338
339                 /* Magical voice not affected by deafness */
340 /*JP
341                 pline("A voice echoes:");
342 */
343                 pline("\90º\82ª\8b¿\82¢\82½:");
344 #if 0 /*JP:T*/
345                 verbalize("Thy audience hath been summoned, %s!",
346                           flags.female ? "Dame" : "Sire");
347 #else
348                 verbalize("%s\82æ\81I\93ð\82Ì\92®\8fO\8f¢\8a«\82³\82ê\82µ\81D",
349                           flags.female ? "\8f\97" : "\92j");
350 #endif
351                 while (cnt--)
352                     (void) makemon(courtmon(), u.ux, u.uy, NO_MM_FLAGS);
353                 break;
354               }
355             case 8:
356                 /* Magical voice not affected by deafness */
357 /*JP
358                 pline("A voice echoes:");
359 */
360                 pline("\90º\82ª\8b¿\82¢\82½:");
361 #if 0 /*JP:T*/
362                 verbalize("By thine Imperious order, %s...",
363                           flags.female ? "Dame" : "Sire");
364 #else
365                 verbalize("%s\82æ\81I\93ð\82Ì\98ü\96\9d\95·\82«\82¢\82ê\82æ\82¤\82¼\81D",
366                           flags.female ? "\8f\97" : "\92j");
367 #endif
368                 do_genocide(5); /* REALLY|ONTHRONE, see do_genocide() */
369                 break;
370             case 9:
371                 /* Magical voice not affected by deafness */
372 /*JP
373                 pline("A voice echoes:");
374 */
375                 pline("\90º\82ª\8b¿\82¢\82½:");
376                 verbalize(
377 /*JP
378                  "A curse upon thee for sitting upon this most holy throne!");
379 */
380                  "\90¹\82È\82é\8bÊ\8dÀ\82É\8dÀ\82è\82µ\93ð\82É\8eô\82¢\82 \82ê\81I");
381                 if (Luck > 0) {
382                     make_blinded(Blinded + rn1(100, 250), TRUE);
383                     change_luck((Luck > 1) ? -rnd(2) : -1);
384                 } else
385                     rndcurse();
386                 break;
387             case 10:
388                 if (Luck < 0 || (HSee_invisible & INTRINSIC)) {
389                     if (level.flags.nommap) {
390 /*JP
391                         pline("A terrible drone fills your head!");
392 */
393                         pline("\8b°\82µ\82¢\83u\83\93\83u\83\93\82Æ\82¢\82¤\89¹\82ª\93ª\82É\8b¿\82¢\82½\81I");
394                         make_confused((HConfusion & TIMEOUT) + (long) rnd(30),
395                                       FALSE);
396                     } else {
397 /*JP
398                         pline("An image forms in your mind.");
399 */
400                         pline("\82 \82é\83C\83\81\81[\83W\82ª\93ª\82É\95\82\82ñ\82¾\81D");
401                         do_mapping();
402                     }
403                 } else {
404 /*JP
405                     Your("vision becomes clear.");
406 */
407                     Your("\8e\8b\8aE\82Í\8dá\82¦\93n\82Á\82½\81D");
408                     HSee_invisible |= FROMOUTSIDE;
409                     newsym(u.ux, u.uy);
410                 }
411                 break;
412             case 11:
413                 if (Luck < 0) {
414 /*JP
415                     You_feel("threatened.");
416 */
417                     You("\8bº\94\97\82³\82ê\82Ä\82¢\82é\82æ\82¤\82È\8bC\82ª\82µ\82½\81D");
418                     aggravate();
419                 } else {
420 /*JP
421                     You_feel("a wrenching sensation.");
422 */
423                     You("\82Ë\82\82ç\82ê\82½\82æ\82¤\82È\8a´\8ao\82ð\8a´\82\82½\81D");
424                     tele(); /* teleport him */
425                 }
426                 break;
427             case 12:
428 /*JP
429                 You("are granted an insight!");
430 */
431                 You("\93´\8e@\97Í\82ð\93¾\82½\81I");
432                 if (invent) {
433                     /* rn2(5) agrees w/seffects() */
434                     identify_pack(rn2(5), FALSE);
435                 }
436                 break;
437             case 13:
438 /*JP
439                 Your("mind turns into a pretzel!");
440 */
441                 Your("\90S\82Í\83N\83l\83N\83l\82É\82È\82Á\82½\81I");
442                 make_confused((HConfusion & TIMEOUT) + (long) rn1(7, 16),
443                               FALSE);
444                 break;
445             default:
446                 impossible("throne effect");
447                 break;
448             }
449         } else {
450             if (is_prince(youmonst.data))
451 /*JP
452                 You_feel("very comfortable here.");
453 */
454                 You("\82±\82±\82Í\82Æ\82Ä\82à\97\8e\82¿\92\85\82­\81D");
455             else
456 /*JP
457                 You_feel("somehow out of place...");
458 */
459                 You("\89½\82©\8fê\88á\82¢\82Ì\8bC\82ª\82µ\82½\81D\81D\81D");
460         }
461
462         if (!rn2(3) && IS_THRONE(levl[u.ux][u.uy].typ)) {
463             /* may have teleported */
464             levl[u.ux][u.uy].typ = ROOM, levl[u.ux][u.uy].flags = 0;
465 /*JP
466             pline_The("throne vanishes in a puff of logic.");
467 */
468             pline("\8bÊ\8dÀ\82Í\82Ó\82Á\82Æ\8fÁ\82¦\82½\81D");
469             newsym(u.ux, u.uy);
470         }
471     } else if (lays_eggs(youmonst.data)) {
472         struct obj *uegg;
473
474         if (!flags.female) {
475 #if 0 /*JP:T*/
476             pline("%s can't lay eggs!",
477                   Hallucination
478                       ? "You may think you are a platypus, but a male still"
479                       : "Males");
480 #else
481             pline("%s\97Y\82Í\97\91\82ð\8eY\82ß\82È\82¢\81I",
482                   Hallucination
483                       ? "\82 \82È\82½\82Í\8e©\95ª\82ª\83J\83\82\83m\83n\83V\82¾\82Æ\8ev\82Á\82Ä\82¢\82é\82©\82à\82µ\82ê\82È\82¢\82ª\81C\82â\82Á\82Ï\82è"
484                       : "");
485 #endif
486             return 0;
487         } else if (u.uhunger < (int) objects[EGG].oc_nutrition) {
488 /*JP
489             You("don't have enough energy to lay an egg.");
490 */
491             You("\97\91\82ð\8eY\82Þ\82¾\82¯\82Ì\83G\83l\83\8b\83M\81[\82ª\82È\82¢\81D");
492             return 0;
493         } else if (eggs_in_water(youmonst.data)) {
494             if (!(Underwater || Is_waterlevel(&u.uz))) {
495 /*JP
496                 pline("A splash tetra you are not.");
497 */
498                 pline("\82 \82È\82½\82Í\83R\83y\83\89\81E\83A\81[\83m\83\8b\83f\83B\82Å\82Í\82È\82©\82Á\82½\81D");
499                 return 0;
500             }
501             if (Upolyd &&
502                 (youmonst.data == &mons[PM_GIANT_EEL]
503                  || youmonst.data == &mons[PM_ELECTRIC_EEL])) {
504 /*JP
505                 You("yearn for the Sargasso Sea.");
506 */
507                 You("\83T\83\8b\83K\83b\83\\81[\8aC\82É\82 \82±\82ª\82ê\82½\81D");
508                 return 0;
509             }
510         }
511         uegg = mksobj(EGG, FALSE, FALSE);
512         uegg->spe = 1;
513         uegg->quan = 1L;
514         uegg->owt = weight(uegg);
515         /* this sets hatch timers if appropriate */
516         set_corpsenm(uegg, egg_type_from_parent(u.umonnum, FALSE));
517         uegg->known = uegg->dknown = 1;
518 #if 0 /*JP:T*/
519         You("%s an egg.", eggs_in_water(youmonst.data) ? "spawn" : "lay");
520 #else
521         You("\97\91\82ð\8eY\82ñ\82¾\81D");
522 #endif
523         dropy(uegg);
524         stackobj(uegg);
525         morehungry((int) objects[EGG].oc_nutrition);
526     } else {
527 /*JP
528         pline("Having fun sitting on the %s?", surface(u.ux, u.uy));
529 */
530         pline("%s\82É\8dÀ\82Á\82Ä\8ay\82µ\82¢\82©\82¢\81H", surface(u.ux,u.uy));
531     }
532     return 1;
533 }
534
535 /* curse a few inventory items at random! */
536 void
537 rndcurse()
538 {
539     int nobj = 0;
540     int cnt, onum;
541     struct obj *otmp;
542 /*JP
543     static const char mal_aura[] = "feel a malignant aura surround %s.";
544 */
545     static const char mal_aura[] = "\8e×\88«\82È\83I\81[\83\89\82ð%s\82Ì\89ñ\82è\82É\8a´\82\82½\81D";
546
547     if (uwep && (uwep->oartifact == ART_MAGICBANE) && rn2(20)) {
548 /*JP
549         You(mal_aura, "the magic-absorbing blade");
550 */
551         You(mal_aura, "\96\82\97Í\82ð\8bz\82¢\82Æ\82é\93\81");
552         return;
553     }
554
555     if (Antimagic) {
556         shieldeff(u.ux, u.uy);
557 /*JP
558         You(mal_aura, "you");
559 */
560         You(mal_aura, "\82 \82È\82½");
561     }
562
563     for (otmp = invent; otmp; otmp = otmp->nobj) {
564         /* gold isn't subject to being cursed or blessed */
565         if (otmp->oclass == COIN_CLASS)
566             continue;
567         nobj++;
568     }
569     if (nobj) {
570         for (cnt = rnd(6 / ((!!Antimagic) + (!!Half_spell_damage) + 1));
571              cnt > 0; cnt--) {
572             onum = rnd(nobj);
573             for (otmp = invent; otmp; otmp = otmp->nobj) {
574                 /* as above */
575                 if (otmp->oclass == COIN_CLASS)
576                     continue;
577                 if (--onum == 0)
578                     break; /* found the target */
579             }
580             /* the !otmp case should never happen; picking an already
581                cursed item happens--avoid "resists" message in that case */
582             if (!otmp || otmp->cursed)
583                 continue; /* next target */
584
585             if (otmp->oartifact && spec_ability(otmp, SPFX_INTEL)
586                 && rn2(10) < 8) {
587 /*JP
588                 pline("%s!", Tobjnam(otmp, "resist"));
589 */
590                 pline("%s\82Í\89e\8b¿\82ð\8eó\82¯\82È\82¢\81I", xname(otmp));
591                 continue;
592             }
593
594             if (otmp->blessed)
595                 unbless(otmp);
596             else
597                 curse(otmp);
598         }
599         update_inventory();
600     }
601
602     /* treat steed's saddle as extended part of hero's inventory */
603     if (u.usteed && !rn2(4) && (otmp = which_armor(u.usteed, W_SADDLE)) != 0
604         && !otmp->cursed) { /* skip if already cursed */
605         if (otmp->blessed)
606             unbless(otmp);
607         else
608             curse(otmp);
609         if (!Blind) {
610 #if 0 /*JP:T*/
611             pline("%s %s.", Yobjnam2(otmp, "glow"),
612                   hcolor(otmp->cursed ? NH_BLACK : (const char *) "brown"));
613 #else
614             pline("%s\82Í%s\8bP\82¢\82½\81D", xname(otmp),
615                   jconj_adj(hcolor(otmp->cursed ? NH_BLACK : (const char *)"\92\83\90F\82Ì")));
616 #endif
617             otmp->bknown = 1; /* ok to bypass set_bknown() here */
618         }
619     }
620 }
621
622 /* remove a random INTRINSIC ability */
623 void
624 attrcurse()
625 {
626     switch (rnd(11)) {
627     case 1:
628         if (HFire_resistance & INTRINSIC) {
629             HFire_resistance &= ~INTRINSIC;
630 /*JP
631             You_feel("warmer.");
632 */
633             You("\92g\82©\82³\82ð\8a´\82\82½\81D");
634             break;
635         }
636         /*FALLTHRU*/
637     case 2:
638         if (HTeleportation & INTRINSIC) {
639             HTeleportation &= ~INTRINSIC;
640 /*JP
641             You_feel("less jumpy.");
642 */
643             You("\82¿\82å\82Á\82Æ\97\8e\82¿\82Â\82¢\82½\81D");
644             break;
645         }
646         /*FALLTHRU*/
647     case 3:
648         if (HPoison_resistance & INTRINSIC) {
649             HPoison_resistance &= ~INTRINSIC;
650 /*JP
651             You_feel("a little sick!");
652 */
653             You("\8f­\82µ\8bC\95ª\82ª\88«\82­\82È\82Á\82½\81I");
654             break;
655         }
656         /*FALLTHRU*/
657     case 4:
658         if (HTelepat & INTRINSIC) {
659             HTelepat &= ~INTRINSIC;
660             if (Blind && !Blind_telepat)
661                 see_monsters(); /* Can't sense mons anymore! */
662 /*JP
663             Your("senses fail!");
664 */
665             Your("\8cÜ\8a´\82Í\96\83á\83\82µ\82½\81I");
666             break;
667         }
668         /*FALLTHRU*/
669     case 5:
670         if (HCold_resistance & INTRINSIC) {
671             HCold_resistance &= ~INTRINSIC;
672 /*JP
673             You_feel("cooler.");
674 */
675             You("\97Á\82µ\82³\82ð\8a´\82\82½\81D");
676             break;
677         }
678         /*FALLTHRU*/
679     case 6:
680         if (HInvis & INTRINSIC) {
681             HInvis &= ~INTRINSIC;
682 /*JP
683             You_feel("paranoid.");
684 */
685             You("\96Ï\91z\82ð\95ø\82¢\82½\81D");
686             break;
687         }
688         /*FALLTHRU*/
689     case 7:
690         if (HSee_invisible & INTRINSIC) {
691             HSee_invisible &= ~INTRINSIC;
692 #if 0 /*JP:T*/
693             You("%s!", Hallucination ? "tawt you taw a puttie tat"
694                                      : "thought you saw something");
695 #else
696             if(Hallucination)
697                 You("\82¾\82ê\8aI\82Ý\82ç\81C\82ê\82Ä\82¢\82é\81D");
698             else
699                 You("\92N\82©\82É\8c©\82ç\82ê\82Ä\82¢\82é\82æ\82¤\82È\8bC\82ª\82µ\82½\81I");
700 #endif
701             break;
702         }
703         /*FALLTHRU*/
704     case 8:
705         if (HFast & INTRINSIC) {
706             HFast &= ~INTRINSIC;
707 /*JP
708             You_feel("slower.");
709 */
710             You("\92x\82­\82È\82Á\82½\82æ\82¤\82È\8bC\82ª\82µ\82½\81D");
711             break;
712         }
713         /*FALLTHRU*/
714     case 9:
715         if (HStealth & INTRINSIC) {
716             HStealth &= ~INTRINSIC;
717 /*JP
718             You_feel("clumsy.");
719 */
720             You("\95s\8aí\97p\82É\82È\82Á\82½\82æ\82¤\82È\8bC\82ª\82µ\82½\81D");
721             break;
722         }
723         /*FALLTHRU*/
724     case 10:
725         /* intrinsic protection is just disabled, not set back to 0 */
726         if (HProtection & INTRINSIC) {
727             HProtection &= ~INTRINSIC;
728 /*JP
729             You_feel("vulnerable.");
730 */
731             You("\96³\96h\94õ\82É\82È\82Á\82½\8bC\82ª\82µ\82½\81D");
732             break;
733         }
734         /*FALLTHRU*/
735     case 11:
736         if (HAggravate_monster & INTRINSIC) {
737             HAggravate_monster &= ~INTRINSIC;
738 /*JP
739             You_feel("less attractive.");
740 */
741             You("\96£\97Í\82ª\8e¸\82¹\82½\82æ\82¤\82È\8bC\82ª\82µ\82½\81D");
742             break;
743         }
744         /*FALLTHRU*/
745     default:
746         break;
747     }
748 }
749
750 /*sit.c*/