1 /* NetHack 3.6 do_wear.c $NHDT-Date: 1446975698 2015/11/08 09:41:38 $ $NHDT-Branch: master $:$NHDT-Revision: 1.87 $ */
2 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
3 /* NetHack may be freely redistributed. See license for details. */
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. */
12 static NEARDATA const char see_yourself[] = "see yourself";
13 static NEARDATA const char unknown_type[] = "Unknown type of %s (%d)";
15 static NEARDATA const char c_armor[] = "armor", c_suit[] = "suit",
16 c_shirt[] = "shirt", c_cloak[] = "cloak",
17 c_gloves[] = "gloves", c_boots[] = "boots",
18 c_helmet[] = "helmet", c_shield[] = "shield",
19 c_weapon[] = "weapon", c_sword[] = "sword",
20 c_axe[] = "axe", c_that_[] = "that";
22 static NEARDATA const char c_armor[] = "
\8aZ", c_suit[] = "
\95\9e",
23 c_shirt[] = "
\83V
\83\83\83c", c_cloak[] = "
\83N
\83\8d\81[
\83N",
24 c_gloves[] = "
\8f¬
\8eè", c_boots[] = "
\8cC",
25 c_helmet[] = "
\8a\95", c_shield[] = "
\8f\82",
26 c_weapon[] = "
\95\90\8aí", c_sword[] = "
\8c\95",
27 c_axe[] = "
\95\80", c_that_[] = "
\82»
\82ê";
30 static NEARDATA const long takeoff_order[] = {
31 WORN_BLINDF, W_WEP, WORN_SHIELD, WORN_GLOVES, LEFT_RING,
32 RIGHT_RING, WORN_CLOAK, WORN_HELMET, WORN_AMUL, WORN_ARMOR,
33 WORN_SHIRT, WORN_BOOTS, W_SWAPWEP, W_QUIVER, 0L
36 STATIC_DCL void FDECL(on_msg, (struct obj *));
37 STATIC_DCL void FDECL(toggle_stealth, (struct obj *, long, BOOLEAN_P));
38 STATIC_DCL void FDECL(toggle_displacement, (struct obj *, long, BOOLEAN_P));
39 STATIC_PTR int NDECL(Armor_on);
40 STATIC_PTR int NDECL(Boots_on);
41 STATIC_PTR int NDECL(Cloak_on);
42 STATIC_PTR int NDECL(Helmet_on);
43 STATIC_PTR int NDECL(Gloves_on);
44 STATIC_DCL void FDECL(wielding_corpse, (struct obj *, BOOLEAN_P));
45 STATIC_PTR int NDECL(Shield_on);
46 STATIC_PTR int NDECL(Shirt_on);
47 STATIC_DCL void NDECL(Amulet_on);
48 STATIC_DCL void FDECL(learnring, (struct obj *, BOOLEAN_P));
49 STATIC_DCL void FDECL(Ring_off_or_gone, (struct obj *, BOOLEAN_P));
50 STATIC_PTR int FDECL(select_off, (struct obj *));
51 STATIC_DCL struct obj *NDECL(do_takeoff);
52 STATIC_PTR int NDECL(take_off);
53 STATIC_DCL int FDECL(menu_remarm, (int));
54 STATIC_DCL void FDECL(count_worn_stuff, (struct obj **, BOOLEAN_P));
55 STATIC_PTR int FDECL(armor_or_accessory_off, (struct obj *));
56 STATIC_PTR int FDECL(accessory_or_armor_on, (struct obj *));
58 STATIC_DCL void FDECL(already_wearing, (const char *));
60 STATIC_DCL void FDECL(already_wearing, (const char*, struct obj *));
62 STATIC_DCL void FDECL(already_wearing2, (const char *, const char *));
70 You("were wearing %s.", doname(otmp));
74 m = joffmsg(otmp, &j);
76 You("%s%s%s
\81D", doname(otmp), j, jpast(m));
80 /* for items that involve no delay */
88 /* call xname() before obj_is_pname(); formatting obj's name
89 might set obj->dknown and that affects the pname test */
90 const char *otmp_name = xname(otmp);
93 if (otmp->otyp == TOWEL)
94 Sprintf(how, " around your %s", body_part(HEAD));
95 You("are now wearing %s%s.",
96 obj_is_pname(otmp) ? the(otmp_name) : an(otmp_name), how);
100 m = jonmsg(otmp, &j);
101 You("%s%s%s
\81D", xname(otmp), j, jpast(m));
106 /* starting equipment gets auto-worn at beginning of new game,
107 and we don't want stealth or displacement feedback then */
108 static boolean initial_don = FALSE; /* manipulated in set_wear() */
110 /* putting on or taking off an item which confers stealth;
111 give feedback and discover it iff stealth state is changing */
114 toggle_stealth(obj, oldprop, on)
116 long oldprop; /* prop[].extrinsic, with obj->owornmask stripped by caller */
119 if (on ? initial_don : context.takeoff.cancelled_don)
122 if (!oldprop /* extrinsic stealth from something else */
123 && !HStealth /* intrinsic stealth */
124 && !BStealth) { /* stealth blocked by something */
125 if (obj->otyp == RIN_STEALTH)
126 learnring(obj, TRUE);
128 makeknown(obj->otyp);
133 You("move very quietly.");
135 Your("
\90Ã
\82©
\82É
\93®
\82¯
\82é
\82æ
\82¤
\82É
\82È
\82Á
\82½
\81D");
136 else if (Levitation || Flying)
138 You("float imperceptibly.");
140 You("
\82¢
\82Â
\82Ì
\82Ü
\82É
\82©
\95\82\82¢
\82Ä
\82¢
\82½
\81D");
143 You("walk very quietly.");
145 Your("
\91«
\89¹
\82Í
\8f¬
\82³
\82
\82È
\82Á
\82½
\81D");
148 You("sure are noisy.");
150 Your("
\91«
\89¹
\82Í
\91å
\82«
\82
\82È
\82Á
\82½
\81D");
155 /* putting on or taking off an item which confers displacement;
156 give feedback and discover it iff displacement state is changing *and*
157 hero is able to see self (or sense monsters) */
160 toggle_displacement(obj, oldprop, on)
162 long oldprop; /* prop[].extrinsic, with obj->owornmask stripped by caller */
165 if (on ? initial_don : context.takeoff.cancelled_don)
168 if (!oldprop /* extrinsic displacement from something else */
169 && !(u.uprops[DISPLACED].intrinsic) /* (theoretical) */
170 && !(u.uprops[DISPLACED].blocked) /* (also theoretical) */
171 /* we don't use canseeself() here because it augments vision
172 with touch, which isn't appropriate for deciding whether
173 we'll notice that monsters have trouble spotting the hero */
174 && ((!Blind /* see anything */
175 && !u.uswallow /* see surroundings */
176 && !Invisible) /* see self */
177 /* actively sensing nearby monsters via telepathy or extended
178 monster detection overrides vision considerations because
179 hero also senses self in this situation */
181 || (Blind_telepat && Blind)
182 || Detect_monsters))) {
183 makeknown(obj->otyp);
186 You_feel("that monsters%s have difficulty pinpointing your location.",
187 on ? "" : " no longer");
189 You_feel("
\89ö
\95¨
\82Í
\82 \82È
\82½
\82Ì
\88Ê
\92u
\82ª
\82Í
\82Á
\82«
\82è
\82Æ
\95ª
\82©%s
\82È
\82Á
\82½
\82æ
\82¤
\82¾
\81D",
190 on ? "
\82ç
\82È
\82" : "
\82é
\82æ
\82¤
\82É");
196 * The Type_on() functions should be called *after* setworn().
197 * The Type_off() functions call setworn() themselves.
198 * [Blindf_on() is an exception and calls setworn() itself.]
206 u.uprops[objects[uarmf->otyp].oc_oprop].extrinsic & ~WORN_BOOTS;
208 switch (uarmf->otyp) {
215 case WATER_WALKING_BOOTS:
218 /* (we don't need a lava check here since boots can't be
219 put on while feet are stuck) */
222 /* Speed boots are still better than intrinsic speed, */
223 /* though not better than potion speed */
224 if (!oldprop && !(HFast & TIMEOUT)) {
225 makeknown(uarmf->otyp);
227 You_feel("yourself speed up%s.",
228 (oldprop || HFast) ? " a bit more" : "");
230 You("%s
\91f
\91\81\82
\82È
\82Á
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D",
231 (oldprop || HFast) ? "
\82³
\82ç
\82É" : "");
236 toggle_stealth(uarmf, oldprop, TRUE);
239 if (!oldprop && !(HFumbling & ~TIMEOUT))
240 incr_itimeout(&HFumbling, rnd(20));
242 case LEVITATION_BOOTS:
243 if (!oldprop && !HLevitation && !BLevitation) {
244 makeknown(uarmf->otyp);
248 float_vs_flight(); /* maybe toggle (BFlying & I_SPECIAL) */
252 impossible(unknown_type, c_boots, uarmf->otyp);
260 struct obj *otmp = uarmf;
261 int otyp = otmp->otyp;
262 long oldprop = u.uprops[objects[otyp].oc_oprop].extrinsic & ~WORN_BOOTS;
264 context.takeoff.mask &= ~W_ARMF;
265 /* For levitation, float_down() returns if Levitation, so we
266 * must do a setworn() _before_ the levitation case.
268 setworn((struct obj *) 0, W_ARMF);
271 if (!Very_fast && !context.takeoff.cancelled_don) {
274 You_feel("yourself slow down%s.", Fast ? " a bit" : "");
276 You("%s
\82Ì
\82ë
\82
\82È
\82Á
\82½
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D", Fast ? "
\82¿
\82å
\82Á
\82Æ" : "");
279 case WATER_WALKING_BOOTS:
280 /* check for lava since fireproofed boots make it viable */
281 if ((is_pool(u.ux, u.uy) || is_lava(u.ux, u.uy))
282 && !Levitation && !Flying && !is_clinger(youmonst.data)
283 && !context.takeoff.cancelled_don
284 /* avoid recursive call to lava_effects() */
285 && !iflags.in_lava_effects) {
286 /* make boots known in case you survive the drowning */
292 toggle_stealth(otmp, oldprop, FALSE);
295 if (!oldprop && !(HFumbling & ~TIMEOUT))
296 HFumbling = EFumbling = 0;
298 case LEVITATION_BOOTS:
299 if (!oldprop && !HLevitation && !BLevitation
300 && !context.takeoff.cancelled_don) {
301 (void) float_down(0L, 0L);
304 float_vs_flight(); /* maybe toggle (BFlying & I_SPECIAL) */
314 impossible(unknown_type, c_boots, otyp);
316 context.takeoff.cancelled_don = FALSE;
324 u.uprops[objects[uarmc->otyp].oc_oprop].extrinsic & ~WORN_CLOAK;
326 switch (uarmc->otyp) {
329 case CLOAK_OF_MAGIC_RESISTANCE:
333 case CLOAK_OF_PROTECTION:
334 makeknown(uarmc->otyp);
337 toggle_stealth(uarmc, oldprop, TRUE);
339 case CLOAK_OF_DISPLACEMENT:
340 toggle_displacement(uarmc, oldprop, TRUE);
343 /* Note: it's already being worn, so we have to cheat here. */
344 if ((HInvis || EInvis) && !Blind) {
347 You("can %s!", See_invisible ? "no longer see through yourself"
351 See_invisible ? "
\82 \82È
\82½
\82Í
\93§
\96¾
\82Å
\82È
\82
\82È
\82Á
\82½" :
352 "
\8e©
\95ª
\8e©
\90g
\82ª
\8c©
\82¦
\82é
\82æ
\82¤
\82É
\82È
\82Á
\82½");
356 case CLOAK_OF_INVISIBILITY:
357 /* since cloak of invisibility was worn, we know mummy wrapping
358 wasn't, so no need to check `oldprop' against blocked */
359 if (!oldprop && !HInvis && !Blind) {
360 makeknown(uarmc->otyp);
363 pline("Suddenly you can%s yourself.",
364 See_invisible ? " see through" : "not see");
366 pline("
\93Ë
\91R
\81C%s
\82È
\82Á
\82½
\81D",
367 See_invisible ? "
\82 \82È
\82½
\82Í
\93§
\96¾
\82É" : "
\8e©
\95ª
\8e©
\90g
\82ª
\8c©
\82¦
\82È
\82");
373 pline("%s very tightly.", Tobjnam(uarmc, "fit"));
375 pline("%s
\82Í
\82Æ
\82Ä
\82à
\82Ò
\82Á
\82¿
\82è
\8d\87\82¤
\81D",xname(uarmc));
377 /* Alchemy smock gives poison _and_ acid resistance */
379 EAcid_resistance |= WORN_CLOAK;
382 impossible(unknown_type, c_cloak, uarmc->otyp);
390 struct obj *otmp = uarmc;
391 int otyp = otmp->otyp;
392 long oldprop = u.uprops[objects[otyp].oc_oprop].extrinsic & ~WORN_CLOAK;
394 context.takeoff.mask &= ~W_ARMC;
395 /* For mummy wrapping, taking it off first resets `Invisible'. */
396 setworn((struct obj *) 0, W_ARMC);
400 case CLOAK_OF_PROTECTION:
401 case CLOAK_OF_MAGIC_RESISTANCE:
407 toggle_stealth(otmp, oldprop, FALSE);
409 case CLOAK_OF_DISPLACEMENT:
410 toggle_displacement(otmp, oldprop, FALSE);
413 if (Invis && !Blind) {
416 You("can %s.", See_invisible ? "see through yourself"
417 : "no longer see yourself");
419 pline("%s
\81D", See_invisible ? "
\82 \82È
\82½
\82Í
\93§
\96¾
\82É
\82È
\82Á
\82½"
420 : "
\8e©
\95ª
\8e©
\90g
\82ª
\8c©
\82¦
\82È
\82
\82È
\82Á
\82½");
424 case CLOAK_OF_INVISIBILITY:
425 if (!oldprop && !HInvis && !Blind) {
426 makeknown(CLOAK_OF_INVISIBILITY);
429 pline("Suddenly you can %s.",
430 See_invisible ? "no longer see through yourself"
433 pline("
\93Ë
\91R
\81C%s
\81D",
434 See_invisible ? "
\82 \82È
\82½
\82Í
\93§
\96¾
\82Å
\82È
\82
\82È
\82Á
\82½"
435 : "
\8e©
\95ª
\8e©
\90g
\82ª
\8c©
\82¦
\82é
\82æ
\82¤
\82É
\82È
\82Á
\82½");
439 /* Alchemy smock gives poison _and_ acid resistance */
441 EAcid_resistance &= ~WORN_CLOAK;
444 impossible(unknown_type, c_cloak, otyp);
453 switch (uarmh->otyp) {
457 case ELVEN_LEATHER_HELM:
458 case DWARVISH_IRON_HELM:
460 case HELM_OF_TELEPATHY:
462 case HELM_OF_BRILLIANCE:
463 adj_abon(uarmh, uarmh->spe);
466 /* people think marked wizards know what they're talking
467 * about, but it takes trained arrogance to pull it off,
468 * and the actual enchantment of the hat is irrelevant.
470 ABON(A_CHA) += (Role_if(PM_WIZARD) ? 1 : -1);
472 makeknown(uarmh->otyp);
474 case HELM_OF_OPPOSITE_ALIGNMENT:
475 /* changing alignment can toggle off active artifact
476 properties, including levitation; uarmh could get
477 dropped or destroyed here */
478 uchangealign((u.ualign.type != A_NEUTRAL)
480 : (uarmh->o_id % 2) ? A_CHAOTIC : A_LAWFUL,
482 /* makeknown(uarmh->otyp); -- moved below, after xname() */
485 if (uarmh && !uarmh->cursed) {
488 pline("%s for a moment.", Tobjnam(uarmh, "vibrate"));
490 pline("%s
\82Í
\88ê
\8fu
\90k
\82¦
\82½
\81D", xname(uarmh));
493 pline("%s %s for a moment.", Tobjnam(uarmh, "glow"),
496 pline("%s
\82Í
\88ê
\8fu%s
\8bP
\82¢
\82½
\81D",
497 xname(uarmh), jconj_adj(hcolor(NH_BLACK)));
501 context.botl = 1; /* reveal new alignment or INT & WIS */
504 pline("My brain hurts!"); /* Monty Python's Flying Circus */
506 pline("
\82Ì
\81[
\82Ý
\82»
\83o
\81[
\83\93\81I"); /*
\83\82\83\93\83e
\83B
\83p
\83C
\83\
\83\93\82Æ
\82Í
\82¿
\82å
\82Á
\82Æ
\88á
\82¤
\82¯
\82Ç*/
508 } else if (uarmh && uarmh->otyp == DUNCE_CAP) {
510 You_feel("%s.", /* track INT change; ignore WIS */
512 <= (ABASE(A_INT) + ABON(A_INT) + ATEMP(A_INT))
513 ? "like sitting in a corner"
516 You("%s
\82æ
\82¤
\82È
\8bC
\82ª
\82µ
\82½
\81D",
518 <= (ABASE(A_INT) + ABON(A_INT) + ATEMP(A_INT))
519 ? "
\8b÷
\82Á
\82±
\82É
\8dÀ
\82Á
\82Ä
\82¢
\82é"
520 : "
\96Ú
\82ª
\82Ü
\82í
\82Á
\82½");
523 /* [message moved to uchangealign()] */
524 makeknown(HELM_OF_OPPOSITE_ALIGNMENT);
528 impossible(unknown_type, c_helmet, uarmh->otyp);
534 Helmet_off(VOID_ARGS)
536 context.takeoff.mask &= ~W_ARMH;
538 switch (uarmh->otyp) {
542 case ELVEN_LEATHER_HELM:
543 case DWARVISH_IRON_HELM:
550 if (!context.takeoff.cancelled_don) {
551 ABON(A_CHA) += (Role_if(PM_WIZARD) ? -1 : 1);
555 case HELM_OF_TELEPATHY:
556 /* need to update ability before calling see_monsters() */
557 setworn((struct obj *) 0, W_ARMH);
560 case HELM_OF_BRILLIANCE:
561 if (!context.takeoff.cancelled_don)
562 adj_abon(uarmh, -uarmh->spe);
564 case HELM_OF_OPPOSITE_ALIGNMENT:
565 /* changing alignment can toggle off active artifact
566 properties, including levitation; uarmh could get
567 dropped or destroyed here */
568 uchangealign(u.ualignbase[A_CURRENT], 2);
571 impossible(unknown_type, c_helmet, uarmh->otyp);
573 setworn((struct obj *) 0, W_ARMH);
574 context.takeoff.cancelled_don = FALSE;
583 u.uprops[objects[uarmg->otyp].oc_oprop].extrinsic & ~WORN_GLOVES;
585 switch (uarmg->otyp) {
588 case GAUNTLETS_OF_FUMBLING:
589 if (!oldprop && !(HFumbling & ~TIMEOUT))
590 incr_itimeout(&HFumbling, rnd(20));
592 case GAUNTLETS_OF_POWER:
593 makeknown(uarmg->otyp);
594 context.botl = 1; /* taken care of in attrib.c */
596 case GAUNTLETS_OF_DEXTERITY:
597 adj_abon(uarmg, uarmg->spe);
600 impossible(unknown_type, c_gloves, uarmg->otyp);
606 wielding_corpse(obj, voluntary)
608 boolean voluntary; /* taking gloves off on purpose? */
612 if (!obj || obj->otyp != CORPSE)
614 if (obj != uwep && (obj != uswapwep || !u.twoweap))
617 if (touch_petrifies(&mons[obj->corpsenm]) && !Stone_resistance) {
619 You("now wield %s in your bare %s.",
620 corpse_xname(obj, (const char *) 0, CXN_ARTICLE),
621 makeplural(body_part(HAND)));
623 You("%s
\82ð
\91f%s
\82Å
\8e\9d\82Á
\82½
\81D",
624 corpse_xname(obj, (const char *) 0, CXN_ARTICLE),
628 Sprintf(kbuf, "%s gloves while wielding %s",
629 voluntary ? "removing" : "losing", killer_xname(obj));
631 Sprintf(kbuf, "%s
\82ð
\8e\9d\82Á
\82Ä
\82¢
\82é
\82Æ
\82«
\82É
\8eè
\91Ü
\82ð%s",
632 killer_xname(obj), voluntary ? "
\8aO
\82µ
\82Ä" : "
\8e¸
\82Á
\82Ä");
635 /* life-saved; can't continue wielding cockatrice corpse though */
636 remove_worn_item(obj, FALSE);
641 Gloves_off(VOID_ARGS)
644 u.uprops[objects[uarmg->otyp].oc_oprop].extrinsic & ~WORN_GLOVES;
645 boolean on_purpose = !context.mon_moving && !uarmg->in_use;
647 context.takeoff.mask &= ~W_ARMG;
649 switch (uarmg->otyp) {
652 case GAUNTLETS_OF_FUMBLING:
653 if (!oldprop && !(HFumbling & ~TIMEOUT))
654 HFumbling = EFumbling = 0;
656 case GAUNTLETS_OF_POWER:
657 makeknown(uarmg->otyp);
658 context.botl = 1; /* taken care of in attrib.c */
660 case GAUNTLETS_OF_DEXTERITY:
661 if (!context.takeoff.cancelled_don)
662 adj_abon(uarmg, -uarmg->spe);
665 impossible(unknown_type, c_gloves, uarmg->otyp);
667 setworn((struct obj *) 0, W_ARMG);
668 context.takeoff.cancelled_don = FALSE;
669 (void) encumber_msg(); /* immediate feedback for GoP */
671 /* prevent wielding cockatrice when not wearing gloves */
672 if (uwep && uwep->otyp == CORPSE)
673 wielding_corpse(uwep, on_purpose);
675 /* KMH -- ...or your secondary weapon when you're wielding it
676 [This case can't actually happen; twoweapon mode won't
677 engage if a corpse has been set up as the alternate weapon.] */
678 if (u.twoweap && uswapwep && uswapwep->otyp == CORPSE)
679 wielding_corpse(uswapwep, on_purpose);
687 /* no shield currently requires special handling when put on, but we
688 keep this uncommented in case somebody adds a new one which does */
689 switch (uarms->otyp) {
692 case URUK_HAI_SHIELD:
694 case DWARVISH_ROUNDSHIELD:
696 case SHIELD_OF_REFLECTION:
699 impossible(unknown_type, c_shield, uarms->otyp);
706 Shield_off(VOID_ARGS)
708 context.takeoff.mask &= ~W_ARMS;
710 /* no shield currently requires special handling when taken off, but we
711 keep this uncommented in case somebody adds a new one which does */
712 switch (uarms->otyp) {
715 case URUK_HAI_SHIELD:
717 case DWARVISH_ROUNDSHIELD:
719 case SHIELD_OF_REFLECTION:
722 impossible(unknown_type, c_shield, uarms->otyp);
725 setworn((struct obj *) 0, W_ARMS);
732 /* no shirt currently requires special handling when put on, but we
733 keep this uncommented in case somebody adds a new one which does */
734 switch (uarmu->otyp) {
739 impossible(unknown_type, c_shirt, uarmu->otyp);
748 context.takeoff.mask &= ~W_ARMU;
750 /* no shirt currently requires special handling when taken off, but we
751 keep this uncommented in case somebody adds a new one which does */
752 switch (uarmu->otyp) {
757 impossible(unknown_type, c_shirt, uarmu->otyp);
760 setworn((struct obj *) 0, W_ARMU);
764 /* This must be done in worn.c, because one of the possible intrinsics
765 * conferred is fire resistance, and we have to immediately set
766 * HFire_resistance in worn.c since worn.c will check it before returning.
778 context.takeoff.mask &= ~W_ARM;
779 setworn((struct obj *) 0, W_ARM);
780 context.takeoff.cancelled_don = FALSE;
784 /* The gone functions differ from the off functions in that if you die from
785 * taking it off and have life saving, you still die.
790 context.takeoff.mask &= ~W_ARM;
792 context.takeoff.cancelled_don = FALSE;
799 /* make sure amulet isn't wielded; can't use remove_worn_item()
800 here because it has already been set worn in amulet slot */
802 setuwep((struct obj *) 0);
803 else if (uamul == uswapwep)
804 setuswapwep((struct obj *) 0);
805 else if (uamul == uquiver)
806 setuqwep((struct obj *) 0);
808 switch (uamul->otyp) {
810 case AMULET_OF_LIFE_SAVING:
811 case AMULET_VERSUS_POISON:
812 case AMULET_OF_REFLECTION:
813 case AMULET_OF_MAGICAL_BREATHING:
814 case FAKE_AMULET_OF_YENDOR:
816 case AMULET_OF_UNCHANGING:
818 make_slimed(0L, (char *) 0);
820 case AMULET_OF_CHANGE: {
821 int orig_sex = poly_gender();
826 /* Don't use same message as polymorph */
827 if (orig_sex != poly_gender()) {
828 makeknown(AMULET_OF_CHANGE);
830 You("are suddenly very %s!",
831 flags.female ? "feminine" : "masculine");
833 You("
\93Ë
\91R%s
\82Á
\82Û
\82
\82È
\82Á
\82½
\81I",
834 flags.female ? "
\8f\97" : "
\92j");
838 /* already polymorphed into single-gender monster; only
839 changed the character's base sex */
841 You("don't feel like yourself.");
843 You("
\8e©
\95ª
\8e©
\90g
\82¶
\82á
\82È
\82
\82È
\82Á
\82½
\8bC
\82ª
\82µ
\82½
\81D");
845 pline_The("amulet disintegrates!");
847 pline("
\96\82\8f\9c\82¯
\82Í
\82±
\82È
\82²
\82È
\82É
\82È
\82Á
\82½
\81I");
848 if (orig_sex == poly_gender() && uamul->dknown
849 && !objects[AMULET_OF_CHANGE].oc_name_known
850 && !objects[AMULET_OF_CHANGE].oc_uname)
855 case AMULET_OF_STRANGULATION:
856 if (can_be_strangled(&youmonst)) {
857 makeknown(AMULET_OF_STRANGULATION);
859 pline("It constricts your throat!");
861 pline("
\96\82\8f\9c\82¯
\82Í
\82 \82È
\82½
\82Ì
\8dA
\82ð
\8di
\82ß
\82Â
\82¯
\82½
\81I");
865 case AMULET_OF_RESTFUL_SLEEP: {
866 long newnap = (long) rnd(100), oldnap = (HSleepy & TIMEOUT);
868 /* avoid clobbering FROMOUTSIDE bit, which might have
869 gotten set by previously eating one of these amulets */
870 if (newnap < oldnap || oldnap == 0L)
871 HSleepy = (HSleepy & ~TIMEOUT) | newnap;
873 case AMULET_OF_YENDOR:
881 context.takeoff.mask &= ~W_AMUL;
883 switch (uamul->otyp) {
885 /* need to update ability before calling see_monsters() */
886 setworn((struct obj *) 0, W_AMUL);
889 case AMULET_OF_LIFE_SAVING:
890 case AMULET_VERSUS_POISON:
891 case AMULET_OF_REFLECTION:
892 case AMULET_OF_CHANGE:
893 case AMULET_OF_UNCHANGING:
894 case FAKE_AMULET_OF_YENDOR:
896 case AMULET_OF_MAGICAL_BREATHING:
898 /* HMagical_breathing must be set off
899 before calling drown() */
900 setworn((struct obj *) 0, W_AMUL);
901 if (!breathless(youmonst.data) && !amphibious(youmonst.data)
904 You("suddenly inhale an unhealthy amount of water!");
906 You("
\93Ë
\91R
\81C
\91å
\97Ê
\82Ì
\90\85\82ð
\88ù
\82Ý
\8d\9e\82ñ
\82¾
\81I");
912 case AMULET_OF_STRANGULATION:
916 Your("%s is no longer constricted!", body_part(NECK));
918 pline("%s
\82ª
\8ay
\82É
\82È
\82Á
\82½
\81I", body_part(NECK));
921 You("can breathe more easily!");
923 You("
\8ay
\82É
\8cÄ
\8bz
\82Å
\82«
\82é
\82æ
\82¤
\82É
\82È
\82Á
\82½
\81I");
927 case AMULET_OF_RESTFUL_SLEEP:
928 setworn((struct obj *) 0, W_AMUL);
929 /* HSleepy = 0L; -- avoid clobbering FROMOUTSIDE bit */
930 if (!ESleepy && !(HSleepy & ~TIMEOUT))
931 HSleepy &= ~TIMEOUT; /* clear timeout bits */
933 case AMULET_OF_YENDOR:
936 setworn((struct obj *) 0, W_AMUL);
940 /* handle ring discovery; comparable to learnwand() */
942 learnring(ring, observed)
946 int ringtype = ring->otyp;
948 /* if effect was observeable then we usually discover the type */
950 /* if we already know the ring type which accomplishes this
951 effect (assumes there is at most one type for each effect),
952 mark this ring as having been seen (no need for makeknown);
953 otherwise if we have seen this ring, discover its type */
954 if (objects[ringtype].oc_name_known)
956 else if (ring->dknown)
958 #if 0 /* see learnwand() */
964 /* make enchantment of charged ring known (might be +0) and update
965 perm invent window if we've seen this ring and know its type */
966 if (ring->dknown && objects[ringtype].oc_name_known) {
967 if (objects[ringtype].oc_charged)
975 register struct obj *obj;
977 long oldprop = u.uprops[objects[obj->otyp].oc_oprop].extrinsic;
978 int old_attrib, which;
981 /* make sure ring isn't wielded; can't use remove_worn_item()
982 here because it has already been set worn in a ring slot */
984 setuwep((struct obj *) 0);
985 else if (obj == uswapwep)
986 setuswapwep((struct obj *) 0);
987 else if (obj == uquiver)
988 setuqwep((struct obj *) 0);
990 /* only mask out W_RING when we don't have both
991 left and right rings of the same type */
992 if ((oldprop & W_RING) != W_RING)
996 case RIN_TELEPORTATION:
997 case RIN_REGENERATION:
1000 case RIN_AGGRAVATE_MONSTER:
1001 case RIN_POISON_RESISTANCE:
1002 case RIN_FIRE_RESISTANCE:
1003 case RIN_COLD_RESISTANCE:
1004 case RIN_SHOCK_RESISTANCE:
1006 case RIN_TELEPORT_CONTROL:
1008 case RIN_POLYMORPH_CONTROL:
1009 case RIN_FREE_ACTION:
1010 case RIN_SLOW_DIGESTION:
1011 case RIN_SUSTAIN_ABILITY:
1015 toggle_stealth(obj, oldprop, TRUE);
1020 case RIN_SEE_INVISIBLE:
1021 /* can now see invisible monsters */
1022 set_mimic_blocking(); /* do special mimic handling */
1025 if (Invis && !oldprop && !HSee_invisible && !Blind) {
1028 pline("Suddenly you are transparent, but there!");
1030 pline("
\93Ë
\91R
\93§
\96¾
\82É
\82È
\82Á
\82½
\81D
\82µ
\82©
\82µ
\91¶
\8dÝ
\82Í
\82µ
\82Ä
\82¢
\82é
\81I");
1031 learnring(obj, TRUE);
1034 case RIN_INVISIBILITY:
1035 if (!oldprop && !HInvis && !BInvis && !Blind) {
1036 learnring(obj, TRUE);
1038 self_invis_message();
1041 case RIN_LEVITATION:
1042 if (!oldprop && !HLevitation && !BLevitation) {
1044 learnring(obj, TRUE);
1045 spoteffects(FALSE); /* for sinks */
1047 float_vs_flight(); /* maybe toggle (BFlying & I_SPECIAL) */
1050 case RIN_GAIN_STRENGTH:
1053 case RIN_GAIN_CONSTITUTION:
1059 old_attrib = ACURR(which);
1060 ABON(which) += obj->spe;
1061 observable = (old_attrib != ACURR(which));
1062 /* if didn't change, usually means ring is +0 but might
1063 be because nonzero couldn't go below min or above max;
1064 learn +0 enchantment if attribute value is not stuck
1065 at a limit [and ring has been seen and its type is
1066 already discovered, both handled by learnring()] */
1067 if (observable || !extremeattr(which))
1068 learnring(obj, observable);
1071 case RIN_INCREASE_ACCURACY: /* KMH */
1072 u.uhitinc += obj->spe;
1074 case RIN_INCREASE_DAMAGE:
1075 u.udaminc += obj->spe;
1077 case RIN_PROTECTION_FROM_SHAPE_CHAN:
1080 case RIN_PROTECTION:
1081 /* usually learn enchantment and discover type;
1082 won't happen if ring is unseen or if it's +0
1083 and the type hasn't been discovered yet */
1084 observable = (obj->spe != 0);
1085 learnring(obj, observable);
1087 find_ac(); /* updates botl */
1093 Ring_off_or_gone(obj, gone)
1094 register struct obj *obj;
1097 long mask = (obj->owornmask & W_RING);
1098 int old_attrib, which;
1101 context.takeoff.mask &= ~mask;
1102 if (!(u.uprops[objects[obj->otyp].oc_oprop].extrinsic & mask))
1103 impossible("Strange... I didn't know you had that ring.");
1107 setworn((struct obj *) 0, obj->owornmask);
1109 switch (obj->otyp) {
1110 case RIN_TELEPORTATION:
1111 case RIN_REGENERATION:
1114 case RIN_AGGRAVATE_MONSTER:
1115 case RIN_POISON_RESISTANCE:
1116 case RIN_FIRE_RESISTANCE:
1117 case RIN_COLD_RESISTANCE:
1118 case RIN_SHOCK_RESISTANCE:
1120 case RIN_TELEPORT_CONTROL:
1122 case RIN_POLYMORPH_CONTROL:
1123 case RIN_FREE_ACTION:
1124 case RIN_SLOW_DIGESTION:
1125 case RIN_SUSTAIN_ABILITY:
1129 toggle_stealth(obj, (EStealth & ~mask), FALSE);
1134 case RIN_SEE_INVISIBLE:
1135 /* Make invisible monsters go away */
1136 if (!See_invisible) {
1137 set_mimic_blocking(); /* do special mimic handling */
1141 if (Invisible && !Blind) {
1144 pline("Suddenly you cannot see yourself.");
1146 pline("
\93Ë
\91R
\81C
\8e©
\95ª
\8e©
\90g
\82ª
\8c©
\82¦
\82È
\82
\82È
\82Á
\82½
\81D");
1147 learnring(obj, TRUE);
1150 case RIN_INVISIBILITY:
1151 if (!Invis && !BInvis && !Blind) {
1154 Your("body seems to unfade%s.",
1155 See_invisible ? " completely" : "..");
1157 Your("
\91Ì
\82ª%s
\81D",
1158 See_invisible ? "
\8a®
\91S
\82É
\8c»
\82í
\82ê
\82½" : "
\8e\9f\91æ
\82É
\8c»
\82í
\82ê
\82Ä
\82«
\82½
\81D
\81D");
1160 learnring(obj, TRUE);
1163 case RIN_LEVITATION:
1165 (void) float_down(0L, 0L);
1167 learnring(obj, TRUE);
1169 float_vs_flight(); /* maybe toggle (BFlying & I_SPECIAL) */
1172 case RIN_GAIN_STRENGTH:
1175 case RIN_GAIN_CONSTITUTION:
1181 old_attrib = ACURR(which);
1182 ABON(which) -= obj->spe;
1183 observable = (old_attrib != ACURR(which));
1184 /* same criteria as Ring_on() */
1185 if (observable || !extremeattr(which))
1186 learnring(obj, observable);
1189 case RIN_INCREASE_ACCURACY: /* KMH */
1190 u.uhitinc -= obj->spe;
1192 case RIN_INCREASE_DAMAGE:
1193 u.udaminc -= obj->spe;
1195 case RIN_PROTECTION:
1196 /* might have been put on while blind and we can now see
1197 or perhaps been forgotten due to amnesia */
1198 observable = (obj->spe != 0);
1199 learnring(obj, observable);
1201 find_ac(); /* updates botl */
1203 case RIN_PROTECTION_FROM_SHAPE_CHAN:
1204 /* If you're no longer protected, let the chameleons
1205 * change shape again -dgk
1216 Ring_off_or_gone(obj, FALSE);
1223 Ring_off_or_gone(obj, TRUE);
1228 register struct obj *otmp;
1230 boolean already_blind = Blind, changed = FALSE;
1232 /* blindfold might be wielded; release it for wearing */
1233 if (otmp->owornmask & W_WEAPON)
1234 remove_worn_item(otmp, FALSE);
1235 setworn(otmp, W_TOOL);
1238 if (Blind && !already_blind) {
1242 You_cant("see any more.");
1244 You("
\89½
\82à
\8c©
\82¦
\82È
\82
\82È
\82Á
\82½
\81D");
1245 /* set ball&chain variables before the hero goes blind */
1248 } else if (already_blind && !Blind) {
1250 /* "You are now wearing the Eyes of the Overworld." */
1251 if (u.uroleplay.blind) {
1252 /* this can only happen by putting on the Eyes of the Overworld;
1253 that shouldn't actually produce a permanent cure, but we
1254 can't let the "blind from birth" conduct remain intact */
1256 pline("For the first time in your life, you can see!");
1258 pline("
\90l
\90¶
\82Å
\8f\89\82ß
\82Ä
\81C
\96Ú
\82ª
\8c©
\82¦
\82é
\82æ
\82¤
\82É
\82È
\82Á
\82½
\81I");
1259 u.uroleplay.blind = FALSE;
1264 You("
\96Ú
\82ª
\8c©
\82¦
\82é
\82æ
\82¤
\82É
\82È
\82Á
\82½
\81I");
1267 /* blindness has just been toggled */
1268 if (Blind_telepat || Infravision)
1270 vision_full_recalc = 1; /* recalc vision limits */
1272 learn_unseen_invent();
1279 register struct obj *otmp;
1281 boolean was_blind = Blind, changed = FALSE;
1284 impossible("Blindf_off without otmp");
1287 context.takeoff.mask &= ~W_TOOL;
1288 setworn((struct obj *) 0, otmp->owornmask);
1293 /* "still cannot see" makes no sense when removing lenses
1294 since they can't have been the cause of your blindness */
1295 if (otmp->otyp != LENSES)
1297 You("still cannot see.");
1299 You("
\82Ü
\82¾
\96Ú
\82ª
\8c©
\82¦
\82È
\82¢
\81D");
1301 changed = TRUE; /* !was_blind */
1302 /* "You were wearing the Eyes of the Overworld." */
1304 You_cant("see anything now!");
1306 You("
\8d¡
\82Í
\89½
\82à
\8c©
\82é
\82±
\82Æ
\82ª
\82Å
\82«
\82È
\82¢
\81I");
1307 /* set ball&chain variables before the hero goes blind */
1311 } else if (was_blind) {
1312 if (!gulp_blnd_check()) {
1313 changed = TRUE; /* !Blind */
1315 You("can see again.");
1317 You("
\82Ó
\82½
\82½
\82Ñ
\96Ú
\82ª
\8c©
\82¦
\82é
\82æ
\82¤
\82É
\82È
\82Á
\82½
\81D");
1321 /* blindness has just been toggled */
1322 if (Blind_telepat || Infravision)
1324 vision_full_recalc = 1; /* recalc vision limits */
1326 learn_unseen_invent();
1331 /* called in moveloop()'s prologue to set side-effects of worn start-up items;
1332 also used by poly_obj() when a worn item gets transformed */
1335 struct obj *obj; /* if null, do all worn items; otherwise just obj itself */
1339 if (!obj ? ublindf != 0 : (obj == ublindf))
1340 (void) Blindf_on(ublindf);
1341 if (!obj ? uright != 0 : (obj == uright))
1342 (void) Ring_on(uright);
1343 if (!obj ? uleft != 0 : (obj == uleft))
1344 (void) Ring_on(uleft);
1345 if (!obj ? uamul != 0 : (obj == uamul))
1348 if (!obj ? uarmu != 0 : (obj == uarmu))
1350 if (!obj ? uarm != 0 : (obj == uarm))
1352 if (!obj ? uarmc != 0 : (obj == uarmc))
1354 if (!obj ? uarmf != 0 : (obj == uarmf))
1356 if (!obj ? uarmg != 0 : (obj == uarmg))
1358 if (!obj ? uarmh != 0 : (obj == uarmh))
1360 if (!obj ? uarms != 0 : (obj == uarms))
1363 initial_don = FALSE;
1366 /* check whether the target object is currently being put on (or taken off--
1367 also checks for doffing) */
1372 /* long what = (occupation == take_off) ? context.takeoff.what : 0L; */
1373 long what = context.takeoff.what; /* if nonzero, occupation is implied */
1374 boolean result = FALSE;
1376 /* 'W' and 'T' set afternmv, 'A' sets context.takeoff.what */
1378 result = (afternmv == Armor_on || afternmv == Armor_off
1379 || what == WORN_ARMOR);
1380 else if (otmp == uarmu)
1381 result = (afternmv == Shirt_on || afternmv == Shirt_off
1382 || what == WORN_SHIRT);
1383 else if (otmp == uarmc)
1384 result = (afternmv == Cloak_on || afternmv == Cloak_off
1385 || what == WORN_CLOAK);
1386 else if (otmp == uarmf)
1387 result = (afternmv == Boots_on || afternmv == Boots_off
1388 || what == WORN_BOOTS);
1389 else if (otmp == uarmh)
1390 result = (afternmv == Helmet_on || afternmv == Helmet_off
1391 || what == WORN_HELMET);
1392 else if (otmp == uarmg)
1393 result = (afternmv == Gloves_on || afternmv == Gloves_off
1394 || what == WORN_GLOVES);
1395 else if (otmp == uarms)
1396 result = (afternmv == Shield_on || afternmv == Shield_off
1397 || what == WORN_SHIELD);
1402 /* check whether the target object is currently being taken off,
1403 so that stop_donning() and steal() can vary messages */
1408 long what = context.takeoff.what;
1409 boolean result = FALSE;
1411 /* 'T' (also 'W') sets afternmv, 'A' sets context.takeoff.what */
1413 result = (afternmv == Armor_off || what == WORN_ARMOR);
1414 else if (otmp == uarmu)
1415 result = (afternmv == Shirt_off || what == WORN_SHIRT);
1416 else if (otmp == uarmc)
1417 result = (afternmv == Cloak_off || what == WORN_CLOAK);
1418 else if (otmp == uarmf)
1419 result = (afternmv == Boots_off || what == WORN_BOOTS);
1420 else if (otmp == uarmh)
1421 result = (afternmv == Helmet_off || what == WORN_HELMET);
1422 else if (otmp == uarmg)
1423 result = (afternmv == Gloves_off || what == WORN_GLOVES);
1424 else if (otmp == uarms)
1425 result = (afternmv == Shield_off || what == WORN_SHIELD);
1433 /* the piece of armor we were donning/doffing has vanished, so stop
1434 * wasting time on it (and don't dereference it when donning would
1437 context.takeoff.cancelled_don =
1438 (afternmv == Boots_on || afternmv == Helmet_on
1439 || afternmv == Gloves_on || afternmv == Armor_on);
1441 nomovemsg = (char *) 0;
1443 context.takeoff.delay = 0;
1444 context.takeoff.what = 0L;
1447 /* called by steal() during theft from hero; interrupt donning/doffing */
1449 stop_donning(stolenobj)
1450 struct obj *stolenobj; /* no message if stolenobj is already being doffing */
1457 for (otmp = invent; otmp; otmp = otmp->nobj)
1458 if ((otmp->owornmask & W_ARMOR) && donning(otmp))
1460 /* at most one item will pass donning() test at any given time */
1464 /* donning() returns True when doffing too; doffing() is more specific */
1465 putting_on = !doffing(otmp);
1466 /* cancel_don() looks at afternmv; it also serves as cancel_doff() */
1468 /* don't want <armor>_on() or <armor>_off() being called
1469 by unmul() since the on or off action isn't completing */
1471 if (putting_on || otmp != stolenobj) {
1473 Sprintf(buf, "You stop %s %s.",
1474 putting_on ? "putting on" : "taking off",
1475 thesimpleoname(otmp));
1477 Sprintf(buf, "
\82 \82È
\82½
\82Í%s
\82ð%s
\82Ì
\82ð
\8e~
\82ß
\82½
\81D",
1478 thesimpleoname(otmp),
1479 putting_on ? "
\90g
\82É
\82Â
\82¯
\82é" : "
\8aO
\82·");
1482 buf[0] = '\0'; /* silently stop doffing stolenobj */
1483 result = -multi; /* remember this before calling unmul() */
1486 /* while putting on, item becomes worn immediately but side-effects are
1487 deferred until the delay expires; when interrupted, make it unworn
1488 (while taking off, item stays worn until the delay expires; when
1489 interrupted, leave it worn) */
1491 remove_worn_item(otmp, FALSE);
1496 /* both 'clothes' and 'accessories' now include both armor and accessories;
1497 TOOL_CLASS is for eyewear, FOOD_CLASS is for MEAT_RING */
1498 static NEARDATA const char clothes[] = {
1499 ARMOR_CLASS, RING_CLASS, AMULET_CLASS, TOOL_CLASS, FOOD_CLASS, 0
1501 static NEARDATA const char accessories[] = {
1502 RING_CLASS, AMULET_CLASS, TOOL_CLASS, FOOD_CLASS, ARMOR_CLASS, 0
1504 STATIC_VAR NEARDATA int Narmorpieces, Naccessories;
1506 /* assign values to Narmorpieces and Naccessories */
1508 count_worn_stuff(which, accessorizing)
1509 struct obj **which; /* caller wants this when count is 1 */
1510 boolean accessorizing;
1514 Narmorpieces = Naccessories = 0;
1516 #define MOREWORN(x,wtyp) do { if (x) { wtyp++; otmp = x; } } while (0)
1518 MOREWORN(uarmh, Narmorpieces);
1519 MOREWORN(uarms, Narmorpieces);
1520 MOREWORN(uarmg, Narmorpieces);
1521 MOREWORN(uarmf, Narmorpieces);
1522 /* for cloak/suit/shirt, we only count the outermost item so that it
1523 can be taken off without confirmation if final count ends up as 1 */
1525 MOREWORN(uarmc, Narmorpieces);
1527 MOREWORN(uarm, Narmorpieces);
1529 MOREWORN(uarmu, Narmorpieces);
1531 *which = otmp; /* default item iff Narmorpieces is 1 */
1534 MOREWORN(uleft, Naccessories);
1535 MOREWORN(uright, Naccessories);
1536 MOREWORN(uamul, Naccessories);
1537 MOREWORN(ublindf, Naccessories);
1539 *which = otmp; /* default item iff Naccessories is 1 */
1543 /* take off one piece or armor or one accessory;
1544 shared by dotakeoff('T') and doremring('R') */
1546 armor_or_accessory_off(obj)
1549 if (!(obj->owornmask & (W_ARMOR | W_ACCESSORY))) {
1551 You("are not wearing that.");
1553 You("
\82»
\82ê
\82ð
\90g
\82É
\82Â
\82¯
\82Ä
\82¢
\82È
\82¢
\81D");
1557 reset_remarm(); /* clear context.takeoff.mask and context.takeoff.what */
1558 (void) select_off(obj);
1559 if (!context.takeoff.mask)
1561 /* none of armoroff()/Ring_/Amulet/Blindf_off() use context.takeoff.mask */
1564 if (obj->owornmask & W_ARMOR) {
1565 (void) armoroff(obj);
1566 } else if (obj == uright || obj == uleft) {
1567 /* Sometimes we want to give the off_msg before removing and
1568 * sometimes after; for instance, "you were wearing a moonstone
1569 * ring (on right hand)" is desired but "you were wearing a
1570 * square amulet (being worn)" is not because of the redundant
1575 } else if (obj == uamul) {
1578 } else if (obj == ublindf) {
1579 Blindf_off(obj); /* does its own off_msg */
1581 impossible("removing strange accessory?");
1583 remove_worn_item(obj, FALSE);
1588 /* the 'T' command */
1592 struct obj *otmp = (struct obj *) 0;
1598 count_worn_stuff(&otmp, FALSE);
1599 if (!Narmorpieces && !Naccessories) {
1600 /* assert( GRAY_DRAGON_SCALES > YELLOW_DRAGON_SCALE_MAIL ); */
1603 pline_The("%s merged with your skin!",
1604 uskin->otyp >= GRAY_DRAGON_SCALES
1605 ? "dragon scales are"
1606 : "dragon scale mail is");
1608 pline("
\83h
\83\89\83S
\83\93\82Ì
\97Ø%s
\82Í
\82 \82È
\82½
\82Ì
\94§
\82Æ
\97Z
\8d\87\82µ
\82Ä
\82µ
\82Ü
\82Á
\82Ä
\82¢
\82é
\81I",
1609 uskin->otyp >= GRAY_DRAGON_SCALES
1614 pline("Not wearing any armor or accessories.");
1616 pline("
\8aZ
\82â
\91\95\8fü
\95i
\82ð
\90g
\82É
\82Â
\82¯
\82Ä
\82¢
\82È
\82¢
\81D");
1619 if (Narmorpieces != 1 || ParanoidRemove)
1620 otmp = getobj(clothes, "take off");
1624 || ((otmp == uarm) && uarmc)
1625 || ((otmp == uarmu) && (uarmc || uarm))) {
1626 char why[BUFSZ], what[BUFSZ];
1628 why[0] = what[0] = '\0';
1629 if (otmp != uskin) {
1631 Strcat(what, cloak_simple_name(uarmc));
1632 if ((otmp == uarmu) && uarm) {
1634 Strcat(what, " and ");
1635 Strcat(what, suit_simple_name(uarm));
1637 Sprintf(why, " without taking off your %s first", what);
1640 You_cant("take that off%s.", why);
1642 m = joffmsg(otmp, &j);
1643 You("
\82»
\82ê%s%s
\82±
\82Æ
\82Í
\82Å
\82«
\82È
\82¢
\81D", j, m);
1648 return armor_or_accessory_off(otmp);
1651 /* the 'R' command */
1655 struct obj *otmp = 0;
1657 count_worn_stuff(&otmp, TRUE);
1658 if (!Naccessories && !Narmorpieces) {
1660 pline("Not wearing any accessories or armor.");
1662 pline("
\91\95\8fü
\95i
\82â
\8aZ
\82ð
\90g
\82É
\82Â
\82¯
\82Ä
\82¢
\82È
\82¢
\81D");
1665 if (Naccessories != 1 || ParanoidRemove)
1666 otmp = getobj(accessories, "remove");
1670 return armor_or_accessory_off(otmp);
1673 /* Check if something worn is cursed _and_ unremovable. */
1676 register struct obj *otmp;
1678 /* Curses, like chickens, come home to roost. */
1679 if ((otmp == uwep) ? welded(otmp) : (int) otmp->cursed) {
1681 boolean use_plural = (is_boots(otmp) || is_gloves(otmp)
1682 || otmp->otyp == LENSES || otmp->quan > 1L);
1684 You("can't. %s cursed.", use_plural ? "They are" : "It is");
1686 pline("
\96³
\97\9d\82¾
\81D
\82»
\82ê
\82Í
\8eô
\82í
\82ê
\82Ä
\82¢
\82é
\81D");
1688 otmp->bknown = TRUE;
1696 register struct obj *otmp;
1698 register int delay = -objects[otmp->otyp].oc_delay;
1704 multi_reason = "disrobing";
1705 if (is_helmet(otmp)) {
1708 nomovemsg = !strcmp(helm_simple_name(otmp), "hat")
1710 nomovemsg = !strcmp(helm_simple_name(otmp), "
\96X
\8eq")
1712 ? "You finish taking off your hat."
1714 ? "
\82 \82È
\82½
\82Í
\8a\95\82ð
\92E
\82¬
\82¨
\82¦
\82½
\81D"
1716 : "You finish taking off your helmet.";
1718 : "
\82 \82È
\82½
\82Í
\96X
\8eq
\82ð
\92E
\82¬
\82¨
\82¦
\82½
\81D";
1719 afternmv = Helmet_off;
1720 } else if (is_gloves(otmp)) {
1722 nomovemsg = "You finish taking off your gloves.";
1724 nomovemsg = "
\82 \82È
\82½
\82Í
\8f¬
\8eè
\82ð
\92E
\82¬
\82¨
\82¦
\82½
\81D";
1725 afternmv = Gloves_off;
1726 } else if (is_boots(otmp)) {
1728 nomovemsg = "You finish taking off your boots.";
1730 nomovemsg = "
\82 \82È
\82½
\82Í
\8cC
\82ð
\92E
\82¬
\82¨
\82¦
\82½
\81D";
1731 afternmv = Boots_off;
1734 nomovemsg = "You finish taking off your suit.";
1736 nomovemsg = "
\82 \82È
\82½
\82Í
\92\85\82Ä
\82¢
\82é
\95¨
\82ð
\92E
\82¬
\82¨
\82¦
\82½
\81D";
1737 afternmv = Armor_off;
1740 /* Be warned! We want off_msg after removing the item to
1741 * avoid "You were wearing ____ (being worn)." However, an
1742 * item which grants fire resistance might cause some trouble
1743 * if removed in Hell and lifesaving puts it back on; in this
1744 * case the message will be printed at the wrong time (after
1745 * the messages saying you died and were lifesaved). Luckily,
1746 * no cloak, shield, or fast-removable armor grants fire
1747 * resistance, so we can safely do the off_msg afterwards.
1748 * Rings do grant fire resistance, but for rings we want the
1749 * off_msg before removal anyway so there's no problem. Take
1750 * care in adding armors granting fire resistance; this code
1751 * might need modification.
1752 * 3.2 (actually 3.1 even): that comment is obsolete since
1753 * fire resistance is not required for Gehennom so setworn()
1754 * doesn't force the resistance granting item to be re-worn
1755 * after being lifesaved anymore.
1759 else if (is_shield(otmp))
1760 (void) Shield_off();
1762 setworn((struct obj *) 0, otmp->owornmask & W_ARMOR);
1765 context.takeoff.mask = context.takeoff.what = 0L;
1770 **
\95¨
\82É
\82æ
\82Á
\82Ä
\93®
\8e\8c\82ª
\95Ï
\89»
\82·
\82é
\82Ì
\82Å otmp
\82ð
\92Ç
\89Á
1777 already_wearing(cc, otmp)
1785 m = jconj(jonmsg(otmp, &j), "
\82Ä
\82¢
\82é");
1788 You("are already wearing %s%c", cc, (cc == c_that_) ? '!' : '.');
1790 You("
\82à
\82¤%s%s%s%s", cc, j, m, (cc == c_that_) ? "
\81I" : "
\81D");
1794 already_wearing2(cc1, cc2)
1795 const char *cc1, *cc2;
1798 You_cant("wear %s because you're wearing %s there already.", cc1, cc2);
1800 You_cant("%s
\82ð
\90g
\82É
\95t
\82¯
\82Ä
\82¢
\82é
\82Ì
\82Å%s
\82ð
\90g
\82É
\82Â
\82¯
\82ç
\82ê
\82È
\82¢
\81D", cc2, cc1);
1804 * canwearobj checks to see whether the player can wear a piece of armor
1806 * inputs: otmp (the piece of armor)
1807 * noisy (if TRUE give error messages, otherwise be quiet about it)
1808 * output: mask (otmp's armor type)
1811 canwearobj(otmp, mask, noisy)
1823 which = is_cloak(otmp)
1830 if (which && cantweararm(youmonst.data)
1831 /* same exception for cloaks as used in m_dowear() */
1832 && (which != c_cloak || youmonst.data->msize != MZ_SMALL)
1833 && (racial_exception(&youmonst, otmp) < 1)) {
1836 pline_The("%s will not fit on your body.", which);
1838 pline("%s
\82Í
\82 \82È
\82½
\82Ì
\91Ì
\82É
\8d\87\82í
\82È
\82¢
\81D", which);
1840 } else if (otmp->owornmask & W_ARMOR) {
1843 already_wearing(c_that_);
1845 already_wearing(c_that_, otmp);
1850 if (welded(uwep) && bimanual(uwep) && (is_suit(otmp) || is_shirt(otmp))) {
1853 You("cannot do that while holding your %s.",
1855 pline("%s
\82ð
\8e\9d\82Á
\82½
\82Ü
\82Ü
\82Å
\82Í
\82»
\82ê
\82Í
\8fo
\97\88\82È
\82¢
\81D",
1856 is_sword(uwep) ? c_sword : c_weapon);
1860 if (is_helmet(otmp)) {
1864 already_wearing(an(helm_simple_name(uarmh)));
1866 already_wearing(helm_simple_name(uarmh), uarmh);
1869 } else if (Upolyd && has_horns(youmonst.data) && !is_flimsy(otmp)) {
1870 /* (flimsy exception matches polyself handling) */
1873 pline_The("%s won't fit over your horn%s.",
1874 helm_simple_name(otmp),
1875 plur(num_horns(youmonst.data)));
1877 pline("
\8ap
\82ª
\82¶
\82á
\82Ü
\82Å%s
\82ð
\90g
\82É
\82Â
\82¯
\82ç
\82ê
\82È
\82¢
\81D",
1878 helm_simple_name(otmp));
1883 } else if (is_shield(otmp)) {
1887 already_wearing(an(c_shield));
1889 already_wearing(c_shield, uarms);
1892 } else if (uwep && bimanual(uwep)) {
1895 You("cannot wear a shield while wielding a two-handed %s.",
1896 is_sword(uwep) ? c_sword : (uwep->otyp == BATTLE_AXE)
1901 m = jconj(jonmsg(uwep, &j), "
\82Ä
\82¢
\82é");
1902 You("
\97¼
\8eè
\8e\9d\82¿
\82Ì%s%s%s
\82Ì
\82Å
\8f\82\82Å
\90g
\82ð
\8eç
\82ê
\82È
\82¢
\81D",
1903 is_sword(uwep) ? c_sword :
1904 uwep->otyp == BATTLE_AXE ? c_axe : c_weapon,
1909 } else if (u.twoweap) {
1912 You("cannot wear a shield while wielding two weapons.");
1914 You("
\93ñ
\93\81\97¬
\82ð
\82µ
\82Ä
\82¢
\82é
\82Ì
\82Å
\8f\82\82Å
\90g
\82ð
\8eç
\82ê
\82È
\82¢
\81D");
1918 } else if (is_boots(otmp)) {
1922 already_wearing(c_boots);
1924 already_wearing(c_boots, uarmf);
1927 } else if (Upolyd && slithy(youmonst.data)) {
1930 You("have no feet..."); /* not body_part(FOOT) */
1932 You("
\91«
\82ª
\82È
\82¢
\81D
\81D
\81D"); /* not body_part(FOOT) */
1935 } else if (Upolyd && youmonst.data->mlet == S_CENTAUR) {
1936 /* break_armor() pushes boots off for centaurs,
1937 so don't let dowear() put them back on... */
1940 pline("You have too many hooves to wear %s.",
1941 c_boots); /* makeplural(body_part(FOOT)) yields
1942 "rear hooves" which sounds odd */
1944 pline("%s
\82ð
\97\9a\82
\82É
\82Í
\91«
\82ª
\91½
\82·
\82¬
\82é
\81D", c_boots);
1948 && (u.utraptype == TT_BEARTRAP || u.utraptype == TT_INFLOOR
1949 || u.utraptype == TT_LAVA
1950 || u.utraptype == TT_BURIEDBALL)) {
1951 if (u.utraptype == TT_BEARTRAP) {
1954 Your("%s is trapped!", body_part(FOOT));
1956 Your("%s
\82Íã©
\82É
\82©
\82©
\82Á
\82Ä
\82¢
\82é
\81I", body_part(FOOT));
1957 } else if (u.utraptype == TT_INFLOOR || u.utraptype == TT_LAVA) {
1960 Your("%s are stuck in the %s!",
1961 makeplural(body_part(FOOT)), surface(u.ux, u.uy));
1963 Your("%s
\82Í%s
\82É
\82Í
\82Ü
\82Á
\82Ä
\82¢
\82é
\81I",
1964 body_part(FOOT), surface(u.ux, u.uy));
1966 } else { /*TT_BURIEDBALL*/
1969 Your("%s is attached to the buried ball!",
1972 Your("%s
\82Í
\96\84\82Ü
\82Á
\82Ä
\82¢
\82é
\8b\85\82É
\82Â
\82È
\82ª
\82Á
\82Ä
\82¢
\82é
\81I",
1979 } else if (is_gloves(otmp)) {
1983 already_wearing(c_gloves);
1985 already_wearing(c_gloves, uarmg);
1988 } else if (welded(uwep)) {
1991 You("cannot wear gloves over your %s.",
1993 You("%s
\82Ì
\8fã
\82©
\82ç
\8f¬
\8eè
\82ð
\91\95\94õ
\82Å
\82«
\82È
\82¢
\81D",
1994 is_sword(uwep) ? c_sword : c_weapon);
1998 } else if (is_shirt(otmp)) {
1999 if (uarm || uarmc || uarmu) {
2003 already_wearing(an(c_shirt));
2005 already_wearing(c_shirt, uarmu);
2010 You_cant("wear that over your %s.",
2012 You("%s
\82Ì
\8fã
\82©
\82ç
\92\85\82é
\82±
\82Æ
\82Í
\82Å
\82«
\82È
\82¢
\81D",
2013 (uarm && !uarmc) ? c_armor
2014 : cloak_simple_name(uarmc));
2019 } else if (is_cloak(otmp)) {
2023 already_wearing(an(cloak_simple_name(uarmc)));
2025 already_wearing(cloak_simple_name(uarmc), otmp);
2029 } else if (is_suit(otmp)) {
2033 You("cannot wear armor over a %s.", cloak_simple_name(uarmc));
2035 You("%s
\82Ì
\8fã
\82©
\82ç
\92\85\82é
\82±
\82Æ
\82Í
\82Å
\82«
\82È
\82¢
\81D", cloak_simple_name(uarmc));
2040 already_wearing("some armor");
2042 already_wearing("
\8aZ", uarm);
2047 /* getobj can't do this after setting its allow_all flag; that
2048 happens if you have armor for slots that are covered up or
2049 extra armor for slots that are filled */
2052 silly_thing("wear", otmp);
2054 silly_thing("
\90g
\82É
\82Â
\82¯
\82é", otmp);
2057 /* Unnecessary since now only weapons and special items like pick-axes get
2058 * welded to your hand, not armor
2061 if (noisy) weldmsg(otmp);
2069 accessory_or_armor_on(obj)
2073 boolean armor, ring, eyewear;
2075 if (obj->owornmask & (W_ACCESSORY | W_ARMOR)) {
2077 already_wearing(c_that_);
2079 already_wearing(c_that_, obj);
2083 armor = (obj->oclass == ARMOR_CLASS);
2084 ring = (obj->oclass == RING_CLASS || obj->otyp == MEAT_RING);
2085 eyewear = (obj->otyp == BLINDFOLD || obj->otyp == TOWEL
2086 || obj->otyp == LENSES);
2087 /* checks which are performed prior to actually touching the item */
2089 if (!canwearobj(obj, &mask, TRUE))
2092 if (obj->otyp == HELM_OF_OPPOSITE_ALIGNMENT
2093 && qstart_level.dnum == u.uz.dnum) { /* in quest */
2094 if (u.ualignbase[A_CURRENT] == u.ualignbase[A_ORIGINAL])
2096 You("narrowly avoid losing all chance at your goal.");
2098 You("
\96Ú
\93I
\82ð
\92B
\90¬
\82·
\82é
\89Â
\94\
\90«
\82ð
\8e¸
\82¤
\82±
\82Æ
\82ð
\82È
\82ñ
\82Æ
\82©
\89ñ
\94ð
\82µ
\82½
\81D");
2099 else /* converted */
2101 You("are suddenly overcome with shame and change your mind.");
2103 You("
\93Ë
\91R
\92p
\82¸
\82©
\82µ
\82
\82È
\82Á
\82Ä
\8dl
\82¦
\82ð
\95Ï
\82¦
\82½
\81D");
2104 u.ublessed = 0; /* lose your god's protection */
2105 makeknown(obj->otyp);
2106 context.botl = 1; /*for AC after zeroing u.ublessed */
2112 char answer, qbuf[QBUFSZ];
2115 if (nolimbs(youmonst.data)) {
2117 You("cannot make the ring stick to your body.");
2119 You("
\8ew
\97Ö
\82ð
\82Í
\82ß
\82ç
\82ê
\82È
\82¢
\91Ì
\82¾
\81D");
2122 if (uleft && uright) {
2124 There("are no more %s%s to fill.",
2125 humanoid(youmonst.data) ? "ring-" : "",
2126 makeplural(body_part(FINGER)));
2128 pline("
\82Í
\82ß
\82é
\82±
\82Æ
\82Ì
\82Å
\82«
\82é%s%s
\82ª
\82È
\82¢
\81D",
2129 humanoid(youmonst.data) ? "
\96ò" : "",
2136 } else if (uright) {
2141 Sprintf(qbuf, "Which %s%s, Right or Left?",
2142 humanoid(youmonst.data) ? "ring-" : "",
2145 Sprintf(qbuf, "
\82Ç
\82¿
\82ç
\82Ì%s%s
\81C
\89E(r)
\82»
\82ê
\82Æ
\82à
\8d¶(l)
\81H",
2146 humanoid(youmonst.data) ? "
\96ò" : "",
2149 answer = yn_function(qbuf, "rl", '\0');
2164 if (uarmg && uarmg->cursed) {
2165 res = !uarmg->bknown;
2168 You("cannot remove your gloves to put on the ring.");
2170 You("
\8ew
\97Ö
\82ð
\82Í
\82ß
\82æ
\82¤
\82Æ
\82µ
\82½
\82ª
\8f¬
\8eè
\82ª
\92E
\82°
\82È
\82¢
\81D");
2171 return res; /* uses move iff we learned gloves are cursed */
2174 res = !uwep->bknown; /* check this before calling welded() */
2175 if ((mask == RIGHT_RING || bimanual(uwep)) && welded(uwep)) {
2176 const char *hand = body_part(HAND);
2178 /* welded will set bknown */
2180 hand = makeplural(hand);
2182 You("cannot free your weapon %s to put on the ring.",
2184 You("
\8ew
\97Ö
\82ð
\82Í
\82ß
\82æ
\82¤
\82Æ
\82µ
\82½
\82ª
\97\98%s
\82Ì
\8e©
\97R
\82ª
\82«
\82©
\82È
\82¢
\81D",
2186 return res; /* uses move iff we learned weapon is cursed */
2189 } else if (obj->oclass == AMULET_CLASS) {
2192 already_wearing("an amulet");
2194 already_wearing("
\96\82\8f\9c\82¯", uamul);
2198 } else if (eyewear) {
2200 if (ublindf->otyp == TOWEL)
2202 Your("%s is already covered by a towel.",
2205 You("
\8aù
\82É
\83^
\83I
\83\8b\82ð
\90g
\82É
\82Â
\82¯
\82Ä
\82¢
\82é
\81D");
2207 else if (ublindf->otyp == BLINDFOLD) {
2208 if (obj->otyp == LENSES)
2210 already_wearing2("lenses", "a blindfold");
2212 already_wearing2("
\83\8c\83\93\83Y", "
\96Ú
\89B
\82µ");
2215 already_wearing("a blindfold");
2217 already_wearing("
\96Ú
\89B
\82µ", ublindf);
2219 } else if (ublindf->otyp == LENSES) {
2220 if (obj->otyp == BLINDFOLD)
2222 already_wearing2("a blindfold", "some lenses");
2224 already_wearing2("
\96Ú
\89B
\82µ", "
\83\8c\83\93\83Y");
2227 already_wearing("some lenses");
2229 already_wearing("
\83\8c\83\93\83Y", ublindf);
2233 already_wearing(something); /* ??? */
2235 already_wearing("
\89½
\82©", ublindf); /* ??? */
2241 /* neither armor nor accessory */
2243 You_cant("wear that!");
2245 You_cant("
\82»
\82ê
\82ð
\90g
\82É
\82Â
\82¯
\82ç
\82ê
\82È
\82¢
\81I");
2250 if (!retouch_object(&obj, FALSE))
2251 return 1; /* costs a turn even though it didn't get worn */
2256 obj->known = 1; /* since AC is shown on the status line */
2257 /* if the armor is wielded, release it for wearing */
2258 if (obj->owornmask & W_WEAPON)
2259 remove_worn_item(obj, FALSE);
2261 delay = -objects[obj->otyp].oc_delay;
2264 multi_reason = "dressing up";
2266 afternmv = Boots_on;
2268 afternmv = Helmet_on;
2270 afternmv = Gloves_on;
2272 afternmv = Armor_on;
2274 nomovemsg = "You finish your dressing maneuver.";
2276 nomovemsg = "
\91\95\94õ
\82µ
\8fI
\82¦
\82½
\81D";
2286 context.takeoff.mask = context.takeoff.what = 0L;
2287 } else { /* not armor */
2288 boolean give_feedback = FALSE;
2290 /* [releasing wielded accessory handled in Xxx_on()] */
2294 give_feedback = TRUE;
2295 } else if (obj->oclass == AMULET_CLASS) {
2296 setworn(obj, W_AMUL);
2298 /* no feedback here if amulet of change got used up */
2299 give_feedback = (uamul != 0);
2300 } else if (eyewear) {
2301 /* setworn() handled by Blindf_on() */
2303 /* message handled by Blindf_on(); leave give_feedback False */
2305 /* feedback for ring or for amulet other than 'change' */
2306 if (give_feedback && is_worn(obj))
2307 prinv((char *) 0, obj, 0L);
2312 /* the 'W' command */
2318 /* cantweararm() checks for suits of armor, not what we want here;
2319 verysmall() or nohands() checks for shields, gloves, etc... */
2320 if ((verysmall(youmonst.data) || nohands(youmonst.data))) {
2322 pline("Don't even bother.");
2324 pline("
\82»
\82ñ
\82È
\82Â
\82Ü
\82ç
\82È
\82¢
\82±
\82Æ
\82É
\82±
\82¾
\82í
\82é
\82È
\81D");
2327 if (uarm && uarmu && uarmc && uarmh && uarms && uarmg && uarmf
2328 && uleft && uright && uamul && ublindf) {
2329 /* 'W' message doesn't mention accessories */
2331 You("are already wearing a full complement of armor.");
2333 You("
\82·
\82Å
\82É
\8a®
\91S
\91\95\94õ
\82µ
\82Ä
\82¢
\82é
\81D");
2336 otmp = getobj(clothes, "wear");
2337 return otmp ? accessory_or_armor_on(otmp) : 0;
2340 /* the 'P' command */
2346 if (uleft && uright && uamul && ublindf
2347 && uarm && uarmu && uarmc && uarmh && uarms && uarmg && uarmf) {
2348 /* 'P' message doesn't mention armor */
2350 Your("%s%s are full, and you're already wearing an amulet and %s.",
2351 humanoid(youmonst.data) ? "ring-" : "",
2352 makeplural(body_part(FINGER)),
2353 (ublindf->otyp == LENSES) ? "some lenses" : "a blindfold");
2355 Your("%s%s
\82Í
\82Ó
\82³
\82ª
\82Á
\82Ä
\82é
\82µ
\81C
\82·
\82Å
\82É
\96\82\8f\9c\82¯
\82Æ%s
\82à
\90g
\82É
\82Â
\82¯
\82Ä
\82¢
\82é
\81D",
2356 humanoid(youmonst.data) ? "
\96ò" : "",
2358 ublindf->otyp==LENSES ? "
\83\8c\83\93\83Y" : "
\96Ú
\89B
\82µ");
2362 otmp = getobj(accessories, "put on");
2363 return otmp ? accessory_or_armor_on(otmp) : 0;
2366 /* calculate current armor class */
2370 int uac = mons[u.umonnum].ac; /* base armor class for current form */
2372 /* armor class from worn gear */
2374 uac -= ARM_BONUS(uarm);
2376 uac -= ARM_BONUS(uarmc);
2378 uac -= ARM_BONUS(uarmh);
2380 uac -= ARM_BONUS(uarmf);
2382 uac -= ARM_BONUS(uarms);
2384 uac -= ARM_BONUS(uarmg);
2386 uac -= ARM_BONUS(uarmu);
2387 if (uleft && uleft->otyp == RIN_PROTECTION)
2389 if (uright && uright->otyp == RIN_PROTECTION)
2392 /* armor class from other sources */
2393 if (HProtection & INTRINSIC)
2395 uac -= u.uspellprot;
2397 /* [The magic binary numbers 127 and -128 should be replaced with the
2398 * mystic decimal numbers 99 and -99 which require no explanation to
2399 * the uninitiated and would cap the width of a status line value at
2400 * one less character.]
2403 uac = -128; /* u.uac is an schar */
2405 uac = 127; /* for completeness */
2416 register struct obj *otmp;
2418 boolean leftfall, rightfall, wastwoweap = FALSE;
2419 const char *otherwep = 0, *thiswep, *which, *hand;
2421 leftfall = (uleft && !uleft->cursed
2422 && (!uwep || !welded(uwep) || !bimanual(uwep)));
2423 rightfall = (uright && !uright->cursed && (!welded(uwep)));
2424 if (!uarmg && (leftfall || rightfall) && !nolimbs(youmonst.data)) {
2425 /* changed so cursed rings don't fall off, GAN 10/30/86 */
2427 Your("%s off your %s.",
2428 (leftfall && rightfall) ? "rings slip" : "ring slips",
2429 (leftfall && rightfall) ? makeplural(body_part(FINGER))
2430 : body_part(FINGER));
2432 Your("
\8ew
\97Ö
\82Í%s
\82©
\82ç
\8a\8a\82è
\97\8e\82¿
\82½
\81D", body_part(FINGER));
2448 if (u.twoweap && otmp) {
2449 /* secondary weapon doesn't need nearly as much handling as
2450 primary; when in two-weapon mode, we know it's one-handed
2451 with something else in the other hand and also that it's
2452 a weapon or weptool rather than something unusual, plus
2453 we don't need to compare its type with the primary */
2454 otherwep = is_sword(otmp) ? c_sword : weapon_descr(otmp);
2455 if (otmp->quan > 1L)
2456 otherwep = makeplural(otherwep);
2457 hand = body_part(HAND);
2460 Your("%s %s%s from your %s%s.", otherwep, xfl ? "also " : "",
2461 otense(otmp, "slip"), which, hand);
2463 You("%s%s%s
\82©
\82ç
\8a\8a\82è
\97\8e\82Æ
\82µ
\82½
\81D", otherwep, xfl ? "
\82à
\82Ü
\82½" : "
\82ð",
2468 setuswapwep((struct obj *) 0); /* clears u.twoweap */
2469 if (canletgo(otmp, ""))
2473 if (otmp && !welded(otmp)) {
2474 long savequan = otmp->quan;
2476 /* nice wording if both weapons are the same type */
2477 thiswep = is_sword(otmp) ? c_sword : weapon_descr(otmp);
2478 if (otherwep && strcmp(thiswep, makesingular(otherwep)))
2480 if (otmp->quan > 1L) {
2481 /* most class names for unconventional wielded items
2482 are ok, but if wielding multiple apples or rations
2483 we don't want "your foods slip", so force non-corpse
2484 food to be singular; skipping makeplural() isn't
2485 enough--we need to fool otense() too */
2486 if (!strcmp(thiswep, "food"))
2489 thiswep = makeplural(thiswep);
2491 hand = body_part(HAND);
2494 hand = makeplural(hand);
2495 else if (wastwoweap)
2496 which = "right "; /* preceding msg was about left */
2498 pline("%s %s%s %s%s from your %s%s.",
2499 !strncmp(thiswep, "corpse", 6) ? "The" : "Your",
2500 otherwep ? "other " : "", thiswep, xfl ? "also " : "",
2501 otense(otmp, "slip"), which, hand);
2503 You("%s%s%s%s
\82©
\82ç
\8a\8a\82è
\97\8e\82Æ
\82µ
\82½
\81D",
2504 otherwep ? "
\82à
\82¤
\82Ð
\82Æ
\82Â
\82Ì" : "", thiswep,
2505 xfl ? "
\82à
\82Ü
\82½" : "
\82ð",
2509 otmp->quan = savequan;
2510 setuwep((struct obj *) 0);
2511 if (canletgo(otmp, ""))
2518 struct monst *victim;
2520 register struct obj *otmph, *otmp;
2522 otmph = (victim == &youmonst) ? uarmc : which_armor(victim, W_ARMC);
2524 otmph = (victim == &youmonst) ? uarm : which_armor(victim, W_ARM);
2526 otmph = (victim == &youmonst) ? uarmu : which_armor(victim, W_ARMU);
2528 otmp = (victim == &youmonst) ? uarmh : which_armor(victim, W_ARMH);
2529 if (otmp && (!otmph || !rn2(4)))
2531 otmp = (victim == &youmonst) ? uarmg : which_armor(victim, W_ARMG);
2532 if (otmp && (!otmph || !rn2(4)))
2534 otmp = (victim == &youmonst) ? uarmf : which_armor(victim, W_ARMF);
2535 if (otmp && (!otmph || !rn2(4)))
2537 otmp = (victim == &youmonst) ? uarms : which_armor(victim, W_ARMS);
2538 if (otmp && (!otmph || !rn2(4)))
2543 /* used for praying to check and fix levitation trouble */
2545 stuck_ring(ring, otyp)
2549 if (ring != uleft && ring != uright) {
2550 impossible("stuck_ring: neither left nor right?");
2551 return (struct obj *) 0;
2554 if (ring && ring->otyp == otyp) {
2555 /* reasons ring can't be removed match those checked by select_off();
2556 limbless case has extra checks because ordinarily it's temporary */
2557 if (nolimbs(youmonst.data) && uamul
2558 && uamul->otyp == AMULET_OF_UNCHANGING && uamul->cursed)
2560 if (welded(uwep) && (ring == uright || bimanual(uwep)))
2562 if (uarmg && uarmg->cursed)
2567 /* either no ring or not right type or nothing prevents its removal */
2568 return (struct obj *) 0;
2571 /* also for praying; find worn item that confers "Unchanging" attribute */
2575 if (uamul && uamul->otyp == AMULET_OF_UNCHANGING)
2583 register struct obj *otmp;
2590 *buf = '\0'; /* lint suppression */
2592 /* special ring checks */
2593 if (otmp == uright || otmp == uleft) {
2594 if (nolimbs(youmonst.data)) {
2596 pline_The("ring is stuck.");
2598 pline("
\8ew
\97Ö
\82Í
\91Ì
\82É
\96\84\82Ü
\82Á
\82Ä
\82µ
\82Ü
\82Á
\82Ä
\82¢
\82é
\81D");
2602 why = 0; /* the item which prevents ring removal */
2603 if (welded(uwep) && (otmp == uright || bimanual(uwep))) {
2605 Sprintf(buf, "free a weapon %s", body_part(HAND));
2607 Sprintf(buf, "
\97\98\98r
\82Ì
\8e©
\97R
\82ª
\82«
\82©
\82È
\82¢");
2609 } else if (uarmg && uarmg->cursed) {
2611 Sprintf(buf, "take off your %s", c_gloves);
2613 Sprintf(buf, "%s
\82ª
\92E
\82°
\82È
\82¢", c_gloves);
2618 You("cannot %s to remove the ring.", buf);
2620 You("
\8ew
\97Ö
\82ð
\82Í
\82¸
\82»
\82¤
\82Æ
\82µ
\82½
\82ª%s
\81D", buf);
2625 /* special glove checks */
2626 if (otmp == uarmg) {
2629 You("are unable to take off your %s while wielding that %s.",
2630 c_gloves, is_sword(uwep) ? c_sword : c_weapon);
2632 You("%s
\82ð
\8e\9d\82Á
\82½
\82Ü
\82Ü%s
\82ð
\82Í
\82¸
\82·
\82±
\82Æ
\82Í
\82Å
\82«
\82È
\82¢
\81D",
2633 is_sword(uwep) ? c_sword : c_weapon, c_gloves);
2635 uwep->bknown = TRUE;
2639 You_cant("take off the slippery %s with your slippery %s.",
2640 c_gloves, makeplural(body_part(FINGER)));
2642 You_cant("
\8a\8a\82è
\82â
\82·
\82¢%s
\82ð
\8a\8a\82è
\82â
\82·
\82¢%s
\82Å
\82Í
\82¸
\82¹
\82È
\82¢
\81D",
2643 c_gloves, body_part(FINGER));
2648 /* special boot checks */
2649 if (otmp == uarmf) {
2650 if (u.utrap && u.utraptype == TT_BEARTRAP) {
2652 pline_The("bear trap prevents you from pulling your %s out.",
2654 pline("%s
\82ª
\8cF
\82Ìã©
\82É
\82Â
\82©
\82Ü
\82Á
\82Ä
\82¢
\82é
\82Ì
\82Å
\92E
\82®
\82±
\82Æ
\82ª
\82Å
\82«
\82È
\82¢
\81D",
2657 } else if (u.utrap && u.utraptype == TT_INFLOOR) {
2659 You("are stuck in the %s, and cannot pull your %s out.",
2661 You("%s
\82ª%s
\82É
\82Í
\82Ü
\82Á
\82Ä
\82¢
\82é
\82Ì
\82Å
\92E
\82®
\82±
\82Æ
\82ª
\82Å
\82«
\82È
\82¢
\81D",
2662 surface(u.ux, u.uy), makeplural(body_part(FOOT)));
2666 /* special suit and shirt checks */
2667 if (otmp == uarm || otmp == uarmu) {
2668 why = 0; /* the item which prevents disrobing */
2669 if (uarmc && uarmc->cursed) {
2671 Sprintf(buf, "remove your %s", cloak_simple_name(uarmc));
2673 Sprintf(buf, "%s
\82ª
\92E
\82°
\82È
\82¢", cloak_simple_name(uarmc));
2675 } else if (otmp == uarmu && uarm && uarm->cursed) {
2677 Sprintf(buf, "remove your %s", c_suit);
2679 Sprintf(buf, "%s
\82ª
\92E
\82°
\82È
\82¢", c_suit);
2681 } else if (welded(uwep) && bimanual(uwep)) {
2683 Sprintf(buf, "release your %s",
2684 is_sword(uwep) ? c_sword : (uwep->otyp == BATTLE_AXE)
2688 Sprintf(buf, "%s
\82ª
\8eè
\95ú
\82¹
\82È
\82¢",
2689 is_sword(uwep) ? c_sword : (uwep->otyp == BATTLE_AXE)
2697 You("cannot %s to take off %s.", buf, the(xname(otmp)));
2699 You("%s
\82ð
\82Í
\82¸
\82»
\82¤
\82Æ
\82µ
\82½
\82ª%s
\81D", xname(otmp), buf);
2704 /* basic curse check */
2705 if (otmp == uquiver || (otmp == uswapwep && !u.twoweap)) {
2706 ; /* some items can be removed even when cursed */
2708 /* otherwise, this is fundamental */
2714 context.takeoff.mask |= WORN_ARMOR;
2715 else if (otmp == uarmc)
2716 context.takeoff.mask |= WORN_CLOAK;
2717 else if (otmp == uarmf)
2718 context.takeoff.mask |= WORN_BOOTS;
2719 else if (otmp == uarmg)
2720 context.takeoff.mask |= WORN_GLOVES;
2721 else if (otmp == uarmh)
2722 context.takeoff.mask |= WORN_HELMET;
2723 else if (otmp == uarms)
2724 context.takeoff.mask |= WORN_SHIELD;
2725 else if (otmp == uarmu)
2726 context.takeoff.mask |= WORN_SHIRT;
2727 else if (otmp == uleft)
2728 context.takeoff.mask |= LEFT_RING;
2729 else if (otmp == uright)
2730 context.takeoff.mask |= RIGHT_RING;
2731 else if (otmp == uamul)
2732 context.takeoff.mask |= WORN_AMUL;
2733 else if (otmp == ublindf)
2734 context.takeoff.mask |= WORN_BLINDF;
2735 else if (otmp == uwep)
2736 context.takeoff.mask |= W_WEP;
2737 else if (otmp == uswapwep)
2738 context.takeoff.mask |= W_SWAPWEP;
2739 else if (otmp == uquiver)
2740 context.takeoff.mask |= W_QUIVER;
2743 impossible("select_off: %s???", doname(otmp));
2748 STATIC_OVL struct obj *
2751 struct obj *otmp = (struct obj *) 0;
2752 struct takeoff_info *doff = &context.takeoff;
2754 if (doff->what == W_WEP) {
2755 if (!cursed(uwep)) {
2756 setuwep((struct obj *) 0);
2758 You("are empty %s.", body_part(HANDED));
2760 You("
\89½
\82à%s
\82É
\82µ
\82Ä
\82¢
\82È
\82¢
\81D", body_part(HAND));
2763 } else if (doff->what == W_SWAPWEP) {
2764 setuswapwep((struct obj *) 0);
2766 You("no longer have a second weapon readied.");
2768 You("
\97\
\94õ
\82Ì
\95\90\8aí
\82ð
\82¨
\82³
\82ß
\82½
\81D");
2770 } else if (doff->what == W_QUIVER) {
2771 setuqwep((struct obj *) 0);
2773 You("no longer have ammunition readied.");
2775 You("
\8f\80\94õ
\82µ
\82½
\96î
\92e
\82ð
\82¨
\82³
\82ß
\82½
\81D");
2776 } else if (doff->what == WORN_ARMOR) {
2780 } else if (doff->what == WORN_CLOAK) {
2784 } else if (doff->what == WORN_BOOTS) {
2788 } else if (doff->what == WORN_GLOVES) {
2791 (void) Gloves_off();
2792 } else if (doff->what == WORN_HELMET) {
2795 (void) Helmet_off();
2796 } else if (doff->what == WORN_SHIELD) {
2799 (void) Shield_off();
2800 } else if (doff->what == WORN_SHIRT) {
2804 } else if (doff->what == WORN_AMUL) {
2808 } else if (doff->what == LEFT_RING) {
2812 } else if (doff->what == RIGHT_RING) {
2816 } else if (doff->what == WORN_BLINDF) {
2817 if (!cursed(ublindf))
2818 Blindf_off(ublindf);
2820 impossible("do_takeoff: taking off %lx", doff->what);
2826 /* occupation callback for 'A' */
2832 register struct obj *otmp;
2833 struct takeoff_info *doff = &context.takeoff;
2836 if (doff->delay > 0) {
2838 return 1; /* still busy */
2840 if ((otmp = do_takeoff()))
2843 doff->mask &= ~doff->what;
2847 for (i = 0; takeoff_order[i]; i++)
2848 if (doff->mask & takeoff_order[i]) {
2849 doff->what = takeoff_order[i];
2853 otmp = (struct obj *) 0;
2856 if (doff->what == 0L) {
2858 You("finish %s.", doff->disrobing);
2860 You("
\91\95\94õ
\82ð
\89ð
\82«
\82¨
\82¦
\82½
\81D");
2862 } else if (doff->what == W_WEP) {
2864 } else if (doff->what == W_SWAPWEP) {
2866 } else if (doff->what == W_QUIVER) {
2868 } else if (doff->what == WORN_ARMOR) {
2870 /* If a cloak is being worn, add the time to take it off and put
2871 * it back on again. Kludge alert! since that time is 0 for all
2872 * known cloaks, add 1 so that it actually matters...
2875 doff->delay += 2 * objects[uarmc->otyp].oc_delay + 1;
2876 } else if (doff->what == WORN_CLOAK) {
2878 } else if (doff->what == WORN_BOOTS) {
2880 } else if (doff->what == WORN_GLOVES) {
2882 } else if (doff->what == WORN_HELMET) {
2884 } else if (doff->what == WORN_SHIELD) {
2886 } else if (doff->what == WORN_SHIRT) {
2888 /* add the time to take off and put back on armor and/or cloak */
2890 doff->delay += 2 * objects[uarm->otyp].oc_delay;
2892 doff->delay += 2 * objects[uarmc->otyp].oc_delay + 1;
2893 } else if (doff->what == WORN_AMUL) {
2895 } else if (doff->what == LEFT_RING) {
2897 } else if (doff->what == RIGHT_RING) {
2899 } else if (doff->what == WORN_BLINDF) {
2902 impossible("take_off: taking off %lx", doff->what);
2903 return 0; /* force done */
2907 doff->delay += objects[otmp->otyp].oc_delay;
2909 /* Since setting the occupation now starts the counter next move, that
2910 * would always produce a delay 1 too big per item unless we subtract
2911 * 1 here to account for it.
2913 if (doff->delay > 0)
2916 set_occupation(take_off, doff->disrobing, 0);
2917 return 1; /* get busy */
2920 /* clear saved context to avoid inappropriate resumption of interrupted 'A' */
2924 context.takeoff.what = context.takeoff.mask = 0L;
2925 context.takeoff.disrobing[0] = '\0';
2928 /* the 'A' command -- remove multiple worn items */
2934 if (context.takeoff.what || context.takeoff.mask) {
2936 You("continue %s.", context.takeoff.disrobing);
2938 You("
\91\95\94õ
\82ð
\89ð
\82
\82Ì
\82ð
\8dÄ
\8aJ
\82µ
\82½
\81D");
2940 set_occupation(take_off, context.takeoff.disrobing, 0);
2942 set_occupation(take_off, "
\91\95\94õ
\82ð
\89ð
\82", 0);
2944 } else if (!uwep && !uswapwep && !uquiver && !uamul && !ublindf && !uleft
2945 && !uright && !wearing_armor()) {
2947 You("are not wearing anything.");
2949 You("
\89½
\82à
\91\95\94õ
\82µ
\82Ä
\82¢
\82È
\82¢
\81D");
2953 add_valid_menu_class(0); /* reset */
2954 if (flags.menu_style != MENU_TRADITIONAL
2955 || (result = ggetobj("take off", select_off, 0, FALSE,
2956 (unsigned *) 0)) < -1)
2957 result = menu_remarm(result);
2959 if (context.takeoff.mask) {
2960 #if 0 /*JP*//*
\93ú
\96{
\8cê
\82Å
\82Í
\8eg
\82í
\82È
\82¢*/
2961 /* default activity for armor and/or accessories,
2962 possibly combined with weapons */
2963 (void) strncpy(context.takeoff.disrobing, "disrobing", CONTEXTVERBSZ);
2964 /* specific activity when handling weapons only */
2965 if (!(context.takeoff.mask & ~W_WEAPON))
2966 (void) strncpy(context.takeoff.disrobing, "disarming",
2971 /* The time to perform the command is already completely accounted for
2972 * in take_off(); if we return 1, that would add an extra turn to each
2983 menu_item *pick_list;
2984 boolean all_worn_categories = TRUE;
2987 all_worn_categories = (retry == -2);
2988 } else if (flags.menu_style == MENU_FULL) {
2989 all_worn_categories = FALSE;
2991 n = query_category("What type of things do you want to take off?",
2993 n = query_category("
\82Ç
\82Ì
\83^
\83C
\83v
\82Ì
\95¨
\82Ì
\91\95\94õ
\82ð
\89ð
\82«
\82Ü
\82·
\82©
\81H",
2994 invent, WORN_TYPES | ALL_TYPES, &pick_list,
2998 for (i = 0; i < n; i++) {
2999 if (pick_list[i].item.a_int == ALL_TYPES_SELECTED)
3000 all_worn_categories = TRUE;
3002 add_valid_menu_class(pick_list[i].item.a_int);
3004 free((genericptr_t) pick_list);
3005 } else if (flags.menu_style == MENU_COMBINATION) {
3006 all_worn_categories = FALSE;
3007 if (ggetobj("take off", select_off, 0, TRUE, (unsigned *) 0) == -2)
3008 all_worn_categories = TRUE;
3012 n = query_objlist("What do you want to take off?", invent,
3014 n = query_objlist("
\82Ç
\82Ì
\91\95\94õ
\82ð
\89ð
\82«
\82Ü
\82·
\82©
\81H", invent,
3015 SIGNAL_NOMENU | USE_INVLET | INVORDER_SORT, &pick_list,
3017 all_worn_categories ? is_worn : is_worn_by_type);
3019 for (i = 0; i < n; i++)
3020 (void) select_off(pick_list[i].item.a_obj);
3021 free((genericptr_t) pick_list);
3022 } else if (n < 0 && flags.menu_style != MENU_COMBINATION) {
3024 There("is nothing else you can remove or unwield.");
3026 pline("
\91\95\94õ
\82ð
\89ð
\82¯
\82é
\82à
\82Ì
\82Í
\89½
\82à
\82È
\82¢
\81D");
3031 /* hit by destroy armor scroll/black dragon breath/monster spell */
3034 register struct obj *atmp;
3036 register struct obj *otmp;
3037 #define DESTROY_ARM(o) \
3038 ((otmp = (o)) != 0 && (!atmp || atmp == otmp) \
3039 && (!obj_resists(otmp, 0, 90)) \
3040 ? (otmp->in_use = TRUE) \
3043 if (DESTROY_ARM(uarmc)) {
3047 Your("%s crumbles and turns to dust!", cloak_simple_name(uarmc));
3049 Your("%s
\82Í
\95²
\81X
\82É
\82È
\82Á
\82½
\81I", cloak_simple_name(uarmc));
3052 } else if (DESTROY_ARM(uarm)) {
3056 Your("armor turns to dust and falls to the %s!", surface(u.ux, u.uy));
3058 Your("
\8aZ
\82Í
\90o
\82Æ
\82È
\82è%s
\82É
\97\8e\82¿
\82½
\81I", surface(u.ux,u.uy));
3059 (void) Armor_gone();
3061 } else if (DESTROY_ARM(uarmu)) {
3065 Your("shirt crumbles into tiny threads and falls apart!");
3067 Your("
\83V
\83\83\83c
\82Í
\83Y
\83^
\83Y
\83^
\82É
\97ô
\82¯
\81C
\8f¬
\82³
\82È
\8e\85\8bû
\82Æ
\82È
\82è
\97\8e\82¿
\82½
\81I");
3070 } else if (DESTROY_ARM(uarmh)) {
3074 Your("%s turns to dust and is blown away!", helm_simple_name(uarmh));
3076 Your("%s
\82Í
\90o
\82Æ
\82È
\82è
\90\81\82«
\82Æ
\82ñ
\82¾
\81I", helm_simple_name(uarmh));
3077 (void) Helmet_off();
3079 } else if (DESTROY_ARM(uarmg)) {
3083 Your("gloves vanish!");
3085 Your("
\8f¬
\8eè
\82Í
\8fÁ
\82¦
\82½
\81I");
3086 (void) Gloves_off();
3091 selftouch("
\82»
\82Ì
\82Æ
\82«
\82 \82È
\82½
\82Í");
3092 } else if (DESTROY_ARM(uarmf)) {
3096 Your("boots disintegrate!");
3098 Your("
\8cC
\82Í
\95²
\81X
\82É
\8dÓ
\82¯
\82½
\81I");
3101 } else if (DESTROY_ARM(uarms)) {
3105 Your("shield crumbles away!");
3107 Your("
\8f\82\82Í
\8dÓ
\82¯
\8eU
\82Á
\82½
\81I");
3108 (void) Shield_off();
3111 return 0; /* could not destroy anything */
3120 adj_abon(otmp, delta)
3121 register struct obj *otmp;
3122 register schar delta;
3124 if (uarmg && uarmg == otmp && otmp->otyp == GAUNTLETS_OF_DEXTERITY) {
3126 makeknown(uarmg->otyp);
3127 ABON(A_DEX) += (delta);
3131 if (uarmh && uarmh == otmp && otmp->otyp == HELM_OF_BRILLIANCE) {
3133 makeknown(uarmh->otyp);
3134 ABON(A_INT) += (delta);
3135 ABON(A_WIS) += (delta);
3141 /* decide whether a worn item is covered up by some other worn item,
3142 used for dipping into liquid and applying grease;
3143 some criteria are different than select_off()'s */
3145 inaccessible_equipment(obj, verb, only_if_known_cursed)
3147 const char *verb; /* "dip" or "grease", or null to avoid messages */
3148 /*JP:
\93ú
\96{
\8cê
\82Å
\82Í "
\82ð
\90Z
\82·", "
\82É
\8e\89\82ð
\93h
\82é", null
\82Ì
\82¢
\82¸
\82ê
\82©*/
3149 boolean only_if_known_cursed; /* ignore covering unless known to be cursed */
3152 static NEARDATA const char need_to_take_off_outer_armor[] =
3153 "need to take off %s to %s %s.";
3154 #else /*JP:
\88ø
\90\94\82ª
\8c´
\95¶
\82Æ
\95Ï
\82í
\82Á
\82Ä
\82¢
\82é
\82±
\82Æ
\82É
\92\8d\88Ó*/
3155 static NEARDATA const char need_to_take_off_outer_armor[] =
3156 "%s%s
\82É
\82Í%s
\82ð%s
\95K
\97v
\82ª
\82 \82é
\81D";
3159 boolean anycovering = !only_if_known_cursed; /* more comprehensible... */
3160 #define BLOCKSACCESS(x) (anycovering || ((x)->cursed && (x)->bknown))
3162 if (!obj || !obj->owornmask)
3163 return FALSE; /* not inaccessible */
3165 /* check for suit covered by cloak */
3166 if (obj == uarm && uarmc && BLOCKSACCESS(uarmc)) {
3168 Strcpy(buf, yname(uarmc));
3170 You(need_to_take_off_outer_armor, buf, verb, yname(obj));
3171 #else /*JP:
\91Î
\8fÛ
\82Í
\83N
\83\8d\81[
\83N
\82È
\82Ì
\82Åjoffmsg
\82ð
\8eg
\82í
\82¸
\8c\88\82ß
\8c\82\82¿*/
3172 You(need_to_take_off_outer_armor, xname(obj), verb, buf, "
\92E
\82®");
3177 /* check for shirt covered by suit and/or cloak */
3179 && ((uarm && BLOCKSACCESS(uarm)) || (uarmc && BLOCKSACCESS(uarmc)))) {
3181 char cloaktmp[QBUFSZ], suittmp[QBUFSZ];
3182 /* if sameprefix, use yname and xname to get "your cloak and suit"
3183 or "Manlobbi's cloak and suit"; otherwise, use yname and yname
3184 to get "your cloak and Manlobbi's suit" or vice versa */
3185 boolean sameprefix = (uarm && uarmc
3186 && !strcmp(shk_your(cloaktmp, uarmc),
3187 shk_your(suittmp, uarm)));
3191 Strcat(buf, yname(uarmc));
3194 Strcat(buf, " and ");
3196 Strcat(buf, "
\82Æ");
3198 Strcat(buf, sameprefix ? xname(uarm) : yname(uarm));
3200 You(need_to_take_off_outer_armor, buf, verb, yname(obj));
3201 #else /*JP:
\91Î
\8fÛ
\82Í
\83N
\83\8d\81[
\83N
\82©
\8aZ
\82È
\82Ì
\82Åjoffmsg
\82ð
\8eg
\82í
\82¸
\8c\88\82ß
\8c\82\82¿*/
3202 You(need_to_take_off_outer_armor, xname(obj), verb, buf, "
\92E
\82®");
3207 /* check for ring covered by gloves */
3208 if ((obj == uleft || obj == uright) && uarmg && BLOCKSACCESS(uarmg)) {
3210 Strcpy(buf, yname(uarmg));
3212 You(need_to_take_off_outer_armor, buf, verb, yname(obj));
3213 #else /*JP:
\91Î
\8fÛ
\82Í
\8f¬
\8eè
\82È
\82Ì
\82Åjoffmsg
\82ð
\8eg
\82í
\82¸
\8c\88\82ß
\8c\82\82¿*/
3214 You(need_to_take_off_outer_armor, xname(obj), verb, buf, "
\82Í
\82¸
\82·");
3219 /* item is not inaccessible */