OSDN Git Service

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