OSDN Git Service

upgrade to 3.6.1
[jnethack/source.git] / src / sit.c
1 /* NetHack 3.6  sit.c   $NHDT-Date: 1458341129 2016/03/18 22:45:29 $  $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.53 $ */
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-2016            */
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)) {
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*/
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         if (Is_waterlevel(&u.uz))
192 /*JP
193             There("are no cushions floating nearby.");
194 */
195             pline("\8bß\82­\82É\95\82\82¢\82Ä\82¢\82é\83N\83b\83V\83\87\83\93\82Í\82È\82¢\81D");
196         else
197 /*JP
198             You("sit down on the muddy bottom.");
199 */
200             You("\82Ç\82ë\82Ç\82ë\82µ\82½\92ê\82É\8dÀ\82Á\82½\81D");
201     } else if (is_pool(u.ux, u.uy)) {
202     in_water:
203 /*JP
204         You("sit in the %s.", hliquid("water"));
205 */
206         You("%s\82Ì\92\86\82Å\8dÀ\82Á\82½\81D", hliquid("\90\85"));
207         if (!rn2(10) && uarm)
208 /*JP
209             (void) water_damage(uarm, "armor", TRUE);
210 */
211             (void) water_damage(uarm, "\8aZ", TRUE);
212         if (!rn2(10) && uarmf && uarmf->otyp != WATER_WALKING_BOOTS)
213 /*JP
214             (void) water_damage(uarm, "armor", TRUE);
215 */
216             (void) water_damage(uarm, "\8aZ", TRUE);
217     } else if (IS_SINK(typ)) {
218         You(sit_message, defsyms[S_sink].explanation);
219 /*JP
220         Your("%s gets wet.", humanoid(youmonst.data) ? "rump" : "underside");
221 */
222         Your("%s\82Í\94G\82ê\82½\81D", humanoid(youmonst.data) ? "\90K" : "\89º\95\94");
223     } else if (IS_ALTAR(typ)) {
224         You(sit_message, defsyms[S_altar].explanation);
225         altar_wrath(u.ux, u.uy);
226     } else if (IS_GRAVE(typ)) {
227         You(sit_message, defsyms[S_grave].explanation);
228     } else if (typ == STAIRS) {
229 /*JP
230         You(sit_message, "stairs");
231 */
232         You(sit_message, "\8aK\92i");
233     } else if (typ == LADDER) {
234 /*JP
235         You(sit_message, "ladder");
236 */
237         You(sit_message, "\82Í\82µ\82²");
238     } else if (is_lava(u.ux, u.uy)) {
239         /* must be WWalking */
240 /*JP
241         You(sit_message, hliquid("lava"));
242 */
243         You(sit_message, hliquid("\97n\8aâ"));
244         burn_away_slime();
245         if (likes_lava(youmonst.data)) {
246 /*JP
247             pline_The("%s feels warm.", hliquid("lava"));
248 */
249             pline_The("%s\82Í\92g\82©\82¢\81D", hliquid("\97n\8aâ"));
250             return 1;
251         }
252 /*JP
253         pline_The("%s burns you!", hliquid("lava"));
254 */
255         pline_The("%s\82Å\94R\82¦\82½\81I", hliquid("\97n\8aâ"));
256         losehp(d((Fire_resistance ? 2 : 10), 10), /* lava damage */
257 /*JP
258                "sitting on lava", KILLED_BY);
259 */
260                "\97n\8aâ\82É\8dÀ\82Á\82Ä", KILLED_BY);
261     } else if (is_ice(u.ux, u.uy)) {
262         You(sit_message, defsyms[S_ice].explanation);
263         if (!Cold_resistance)
264 /*JP
265             pline_The("ice feels cold.");
266 */
267             pline("\95X\82Í\97â\82½\82­\8a´\82\82½\81D");
268     } else if (typ == DRAWBRIDGE_DOWN) {
269 /*JP
270         You(sit_message, "drawbridge");
271 */
272         You(sit_message, "\92µ\82Ë\8b´");
273     } else if (IS_THRONE(typ)) {
274         You(sit_message, defsyms[S_throne].explanation);
275         if (rnd(6) > 4) {
276             switch (rnd(13)) {
277             case 1:
278                 (void) adjattrib(rn2(A_MAX), -rn1(4, 3), FALSE);
279 /*JP
280                 losehp(rnd(10), "cursed throne", KILLED_BY_AN);
281 */
282                 losehp(rnd(10), "\8eô\82í\82ê\82½\8bÊ\8dÀ\82Å", KILLED_BY_AN);
283                 break;
284             case 2:
285                 (void) adjattrib(rn2(A_MAX), 1, FALSE);
286                 break;
287             case 3:
288 #if 0 /*JP*/
289                 pline("A%s electric shock shoots through your body!",
290                       (Shock_resistance) ? "n" : " massive");
291 #else
292                 pline("%s\93d\8bC\82ª\82 \82È\82½\82Ì\91Ì\82ð\91\96\82è\94²\82¯\82½\81I",
293                       (Shock_resistance) ? "" : "\8c\83\82µ\82¢");
294 #endif
295 /*JP
296                 losehp(Shock_resistance ? rnd(6) : rnd(30), "electric chair",
297 */
298                 losehp(Shock_resistance ? rnd(6) : rnd(30), "\93d\8bC\88Ö\8eq\82Å",
299                        KILLED_BY_AN);
300                 exercise(A_CON, FALSE);
301                 break;
302             case 4:
303 /*JP
304                 You_feel("much, much better!");
305 */
306                 You_feel("\82Æ\82Ä\82à\81C\82Æ\82Ä\82à\8c³\8bC\82É\82È\82Á\82½\82æ\82¤\82È\8bC\82ª\82µ\82½\81I");
307                 if (Upolyd) {
308                     if (u.mh >= (u.mhmax - 5))
309                         u.mhmax += 4;
310                     u.mh = u.mhmax;
311                 }
312                 if (u.uhp >= (u.uhpmax - 5))
313                     u.uhpmax += 4;
314                 u.uhp = u.uhpmax;
315                 u.ucreamed = 0;
316                 make_blinded(0L, TRUE);
317                 make_sick(0L, (char *) 0, FALSE, SICK_ALL);
318                 heal_legs();
319                 context.botl = 1;
320                 break;
321             case 5:
322                 take_gold();
323                 break;
324             case 6:
325                 if (u.uluck + rn2(5) < 0) {
326 /*JP
327                     You_feel("your luck is changing.");
328 */
329                     pline("\89^\82ª\8cü\82¢\82Ä\82«\82½\8bC\82ª\82·\82é\81D");
330                     change_luck(1);
331                 } else
332                     makewish();
333                 break;
334             case 7:
335               {
336                 int cnt = rnd(10);
337
338                 /* Magical voice not affected by deafness */
339 /*JP
340                 pline("A voice echoes:");
341 */
342                 pline("\90º\82ª\8b¿\82¢\82½:");
343 #if 0 /*JP*/
344                 verbalize("Thy audience hath been summoned, %s!",
345                           flags.female ? "Dame" : "Sire");
346 #else
347                 verbalize("%s\82æ\81I\93ð\82Ì\92®\8fO\8f¢\8a«\82³\82ê\82µ\81D",
348                           flags.female ? "\8f\97" : "\92j");
349 #endif
350                 while (cnt--)
351                     (void) makemon(courtmon(), u.ux, u.uy, NO_MM_FLAGS);
352                 break;
353               }
354             case 8:
355                 /* Magical voice not affected by deafness */
356 /*JP
357                 pline("A voice echoes:");
358 */
359                 pline("\90º\82ª\8b¿\82¢\82½:");
360 #if 0 /*JP*/
361                 verbalize("By thine Imperious order, %s...",
362                           flags.female ? "Dame" : "Sire");
363 #else
364                 verbalize("%s\82æ\81I\93ð\82Ì\98ü\96\9d\95·\82«\82¢\82ê\82æ\82¤\82¼\81D",
365                           flags.female ? "\8f\97" : "\92j");
366 #endif
367                 do_genocide(5); /* REALLY|ONTHRONE, see do_genocide() */
368                 break;
369             case 9:
370                 /* Magical voice not affected by deafness */
371 /*JP
372                 pline("A voice echoes:");
373 */
374                 pline("\90º\82ª\8b¿\82¢\82½:");
375                 verbalize(
376 /*JP
377                  "A curse upon thee for sitting upon this most holy throne!");
378 */
379                  "\90¹\82È\82é\8bÊ\8dÀ\82É\8dÀ\82è\82µ\93ð\82É\8eô\82¢\82 \82ê\81I");
380                 if (Luck > 0) {
381                     make_blinded(Blinded + rn1(100, 250), TRUE);
382                     change_luck((Luck > 1) ? -rnd(2) : -1);
383                 } else
384                     rndcurse();
385                 break;
386             case 10:
387                 if (Luck < 0 || (HSee_invisible & INTRINSIC)) {
388                     if (level.flags.nommap) {
389 /*JP
390                         pline("A terrible drone fills your head!");
391 */
392                         pline("\8b°\82µ\82¢\83u\83\93\83u\83\93\82Æ\82¢\82¤\89¹\82ª\93ª\82É\8b¿\82¢\82½\81I");
393                         make_confused((HConfusion & TIMEOUT) + (long) rnd(30),
394                                       FALSE);
395                     } else {
396 /*JP
397                         pline("An image forms in your mind.");
398 */
399                         pline("\82 \82é\83C\83\81\81[\83W\82ª\93ª\82É\95\82\82ñ\82¾\81D");
400                         do_mapping();
401                     }
402                 } else {
403 /*JP
404                     Your("vision becomes clear.");
405 */
406                     Your("\8e\8b\8aE\82Í\8dá\82¦\93n\82Á\82½\81D");
407                     HSee_invisible |= FROMOUTSIDE;
408                     newsym(u.ux, u.uy);
409                 }
410                 break;
411             case 11:
412                 if (Luck < 0) {
413 /*JP
414                     You_feel("threatened.");
415 */
416                     You("\8bº\94\97\82³\82ê\82Ä\82¢\82é\82æ\82¤\82È\8bC\82ª\82µ\82½\81D");
417                     aggravate();
418                 } else {
419 /*JP
420                     You_feel("a wrenching sensation.");
421 */
422                     You("\82Ë\82\82ç\82ê\82½\82æ\82¤\82È\8a´\8ao\82ð\8a´\82\82½\81D");
423                     tele(); /* teleport him */
424                 }
425                 break;
426             case 12:
427 /*JP
428                 You("are granted an insight!");
429 */
430                 You("\93´\8e@\97Í\82ð\93¾\82½\81I");
431                 if (invent) {
432                     /* rn2(5) agrees w/seffects() */
433                     identify_pack(rn2(5), FALSE);
434                 }
435                 break;
436             case 13:
437 /*JP
438                 Your("mind turns into a pretzel!");
439 */
440                 Your("\90S\82Í\83N\83l\83N\83l\82É\82È\82Á\82½\81I");
441                 make_confused((HConfusion & TIMEOUT) + (long) rn1(7, 16),
442                               FALSE);
443                 break;
444             default:
445                 impossible("throne effect");
446                 break;
447             }
448         } else {
449             if (is_prince(youmonst.data))
450 /*JP
451                 You_feel("very comfortable here.");
452 */
453                 You("\82±\82±\82Í\82Æ\82Ä\82à\97\8e\82¿\92\85\82­\81D");
454             else
455 /*JP
456                 You_feel("somehow out of place...");
457 */
458                 You("\89½\82©\8fê\88á\82¢\82Ì\8bC\82ª\82µ\82½\81D\81D\81D");
459         }
460
461         if (!rn2(3) && IS_THRONE(levl[u.ux][u.uy].typ)) {
462             /* may have teleported */
463             levl[u.ux][u.uy].typ = ROOM;
464 /*JP
465             pline_The("throne vanishes in a puff of logic.");
466 */
467             pline("\8bÊ\8dÀ\82Í\82Ó\82Á\82Æ\8fÁ\82¦\82½\81D");
468             newsym(u.ux, u.uy);
469         }
470     } else if (lays_eggs(youmonst.data)) {
471         struct obj *uegg;
472
473         if (!flags.female) {
474 #if 0 /*JP*/
475             pline("%s can't lay eggs!",
476                   Hallucination
477                       ? "You may think you are a platypus, but a male still"
478                       : "Males");
479 #else
480             pline("%s\97Y\82Í\97\91\82ð\8eY\82ß\82È\82¢\81I",
481                   Hallucination
482                       ? "\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è"
483                       : "");
484 #endif
485             return 0;
486         } else if (u.uhunger < (int) objects[EGG].oc_nutrition) {
487 /*JP
488             You("don't have enough energy to lay an egg.");
489 */
490             You("\97\91\82ð\8eY\82Þ\82¾\82¯\82Ì\83G\83l\83\8b\83M\81[\82ª\82È\82¢\81D");
491             return 0;
492         }
493
494         uegg = mksobj(EGG, FALSE, FALSE);
495         uegg->spe = 1;
496         uegg->quan = 1L;
497         uegg->owt = weight(uegg);
498         /* this sets hatch timers if appropriate */
499         set_corpsenm(uegg, egg_type_from_parent(u.umonnum, FALSE));
500         uegg->known = uegg->dknown = 1;
501 /*JP
502         You("lay an egg.");
503 */
504         You("\97\91\82ð\8eY\82ñ\82¾\81D");
505         dropy(uegg);
506         stackobj(uegg);
507         morehungry((int) objects[EGG].oc_nutrition);
508     } else {
509 /*JP
510         pline("Having fun sitting on the %s?", surface(u.ux, u.uy));
511 */
512         pline("%s\82É\8dÀ\82Á\82Ä\8ay\82µ\82¢\82©\82¢\81H", surface(u.ux,u.uy));
513     }
514     return 1;
515 }
516
517 /* curse a few inventory items at random! */
518 void
519 rndcurse()
520 {
521     int nobj = 0;
522     int cnt, onum;
523     struct obj *otmp;
524 /*JP
525     static const char mal_aura[] = "feel a malignant aura surround %s.";
526 */
527     static const char mal_aura[] = "\8e×\88«\82È\83I\81[\83\89\82ð%s\82Ì\89ñ\82è\82É\8a´\82\82½\81D";
528
529     if (uwep && (uwep->oartifact == ART_MAGICBANE) && rn2(20)) {
530 /*JP
531         You(mal_aura, "the magic-absorbing blade");
532 */
533         You(mal_aura, "\96\82\97Í\82ð\8bz\82¢\82Æ\82é\93\81");
534         return;
535     }
536
537     if (Antimagic) {
538         shieldeff(u.ux, u.uy);
539 /*JP
540         You(mal_aura, "you");
541 */
542         You(mal_aura, "\82 \82È\82½");
543     }
544
545     for (otmp = invent; otmp; otmp = otmp->nobj) {
546         /* gold isn't subject to being cursed or blessed */
547         if (otmp->oclass == COIN_CLASS)
548             continue;
549         nobj++;
550     }
551     if (nobj) {
552         for (cnt = rnd(6 / ((!!Antimagic) + (!!Half_spell_damage) + 1));
553              cnt > 0; cnt--) {
554             onum = rnd(nobj);
555             for (otmp = invent; otmp; otmp = otmp->nobj) {
556                 /* as above */
557                 if (otmp->oclass == COIN_CLASS)
558                     continue;
559                 if (--onum == 0)
560                     break; /* found the target */
561             }
562             /* the !otmp case should never happen; picking an already
563                cursed item happens--avoid "resists" message in that case */
564             if (!otmp || otmp->cursed)
565                 continue; /* next target */
566
567             if (otmp->oartifact && spec_ability(otmp, SPFX_INTEL)
568                 && rn2(10) < 8) {
569 /*JP
570                 pline("%s!", Tobjnam(otmp, "resist"));
571 */
572                 pline("%s\82Í\89e\8b¿\82ð\8eó\82¯\82È\82¢\81I", xname(otmp));
573                 continue;
574             }
575
576             if (otmp->blessed)
577                 unbless(otmp);
578             else
579                 curse(otmp);
580         }
581         update_inventory();
582     }
583
584     /* treat steed's saddle as extended part of hero's inventory */
585     if (u.usteed && !rn2(4) && (otmp = which_armor(u.usteed, W_SADDLE)) != 0
586         && !otmp->cursed) { /* skip if already cursed */
587         if (otmp->blessed)
588             unbless(otmp);
589         else
590             curse(otmp);
591         if (!Blind) {
592 #if 0 /*JP*/
593             pline("%s %s.", Yobjnam2(otmp, "glow"),
594                   hcolor(otmp->cursed ? NH_BLACK : (const char *) "brown"));
595 #else
596             pline("%s\82Í%s\8bP\82¢\82½\81D", xname(otmp),
597                   jconj_adj(hcolor(otmp->cursed ? NH_BLACK : (const char *)"\92\83\90F\82Ì")));
598 #endif
599             otmp->bknown = TRUE;
600         }
601     }
602 }
603
604 /* remove a random INTRINSIC ability */
605 void
606 attrcurse()
607 {
608     switch (rnd(11)) {
609     case 1:
610         if (HFire_resistance & INTRINSIC) {
611             HFire_resistance &= ~INTRINSIC;
612 /*JP
613             You_feel("warmer.");
614 */
615             You("\92g\82©\82³\82ð\8a´\82\82½\81D");
616             break;
617         }
618         /*FALLTHRU*/
619     case 2:
620         if (HTeleportation & INTRINSIC) {
621             HTeleportation &= ~INTRINSIC;
622 /*JP
623             You_feel("less jumpy.");
624 */
625             You("\82¿\82å\82Á\82Æ\97\8e\82¿\82Â\82¢\82½\81D");
626             break;
627         }
628         /*FALLTHRU*/
629     case 3:
630         if (HPoison_resistance & INTRINSIC) {
631             HPoison_resistance &= ~INTRINSIC;
632 /*JP
633             You_feel("a little sick!");
634 */
635             You("\8f­\82µ\8bC\95ª\82ª\88«\82­\82È\82Á\82½\81I");
636             break;
637         }
638         /*FALLTHRU*/
639     case 4:
640         if (HTelepat & INTRINSIC) {
641             HTelepat &= ~INTRINSIC;
642             if (Blind && !Blind_telepat)
643                 see_monsters(); /* Can't sense mons anymore! */
644 /*JP
645             Your("senses fail!");
646 */
647             Your("\8cÜ\8a´\82Í\96\83á\83\82µ\82½\81I");
648             break;
649         }
650         /*FALLTHRU*/
651     case 5:
652         if (HCold_resistance & INTRINSIC) {
653             HCold_resistance &= ~INTRINSIC;
654 /*JP
655             You_feel("cooler.");
656 */
657             You("\97Á\82µ\82³\82ð\8a´\82\82½\81D");
658             break;
659         }
660         /*FALLTHRU*/
661     case 6:
662         if (HInvis & INTRINSIC) {
663             HInvis &= ~INTRINSIC;
664 /*JP
665             You_feel("paranoid.");
666 */
667             You("\96Ï\91z\82ð\95ø\82¢\82½\81D");
668             break;
669         }
670         /*FALLTHRU*/
671     case 7:
672         if (HSee_invisible & INTRINSIC) {
673             HSee_invisible &= ~INTRINSIC;
674 #if 0 /*JP*/
675             You("%s!", Hallucination ? "tawt you taw a puttie tat"
676                                      : "thought you saw something");
677 #else
678             if(Hallucination)
679                 You("\82¾\82ê\8aI\82Ý\82ç\81C\82ê\82Ä\82¢\82é\81D");
680             else
681                 You("\92N\82©\82É\8c©\82ç\82ê\82Ä\82¢\82é\82æ\82¤\82È\8bC\82ª\82µ\82½\81I");
682 #endif
683             break;
684         }
685         /*FALLTHRU*/
686     case 8:
687         if (HFast & INTRINSIC) {
688             HFast &= ~INTRINSIC;
689 /*JP
690             You_feel("slower.");
691 */
692             You("\92x\82­\82È\82Á\82½\82æ\82¤\82È\8bC\82ª\82µ\82½\81D");
693             break;
694         }
695         /*FALLTHRU*/
696     case 9:
697         if (HStealth & INTRINSIC) {
698             HStealth &= ~INTRINSIC;
699 /*JP
700             You_feel("clumsy.");
701 */
702             You("\95s\8aí\97p\82É\82È\82Á\82½\82æ\82¤\82È\8bC\82ª\82µ\82½\81D");
703             break;
704         }
705         /*FALLTHRU*/
706     case 10:
707         /* intrinsic protection is just disabled, not set back to 0 */
708         if (HProtection & INTRINSIC) {
709             HProtection &= ~INTRINSIC;
710 /*JP
711             You_feel("vulnerable.");
712 */
713             You("\96³\96h\94õ\82É\82È\82Á\82½\8bC\82ª\82µ\82½\81D");
714             break;
715         }
716         /*FALLTHRU*/
717     case 11:
718         if (HAggravate_monster & INTRINSIC) {
719             HAggravate_monster &= ~INTRINSIC;
720 /*JP
721             You_feel("less attractive.");
722 */
723             You("\96£\97Í\82ª\8e¸\82¹\82½\82æ\82¤\82È\8bC\82ª\82µ\82½\81D");
724             break;
725         }
726         /*FALLTHRU*/
727     default:
728         break;
729     }
730 }
731
732 /*sit.c*/