X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fdo_wear.c;h=849d11b154dc389e8640e54628e01d349bf573ba;hb=b38b2d9f907996eba5e88ed244717985d3e89f0d;hp=ea73cace85ce6ff87930051c8711902272c89373;hpb=a4c1eb849dac77e75f386da143ca16b6594ee544;p=jnethack%2Fsource.git diff --git a/src/do_wear.c b/src/do_wear.c index ea73cac..849d11b 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -1,17 +1,34 @@ -/* NetHack 3.6 do_wear.c $NHDT-Date: 1446975698 2015/11/08 09:41:38 $ $NHDT-Branch: master $:$NHDT-Revision: 1.87 $ */ +/* NetHack 3.6 do_wear.c $NHDT-Date: 1575214670 2019/12/01 15:37:50 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.116 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ +/*-Copyright (c) Robert Patrick Rankin, 2012. */ /* NetHack may be freely redistributed. See license for details. */ +/* JNetHack Copyright */ +/* (c) Issei Numata, Naoki Hamada, Shigehiro Miyashita, 1994-2000 */ +/* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2020 */ +/* JNetHack may be freely redistributed. See license for details. */ + #include "hack.h" +#if 0 /*JP*//*–¢Žg—p*/ static NEARDATA const char see_yourself[] = "see yourself"; +#endif static NEARDATA const char unknown_type[] = "Unknown type of %s (%d)"; +#if 0 /*JP:T*/ static NEARDATA const char c_armor[] = "armor", c_suit[] = "suit", c_shirt[] = "shirt", c_cloak[] = "cloak", c_gloves[] = "gloves", c_boots[] = "boots", c_helmet[] = "helmet", c_shield[] = "shield", c_weapon[] = "weapon", c_sword[] = "sword", c_axe[] = "axe", c_that_[] = "that"; +#else +static NEARDATA const char c_armor[] = "ŠZ", c_suit[] = "•ž", + c_shirt[] = "ƒVƒƒƒc", c_cloak[] = "ƒNƒ[ƒN", + c_gloves[] = "¬Žè", c_boots[] = "ŒC", + c_helmet[] = "Š•", c_shield[] = "‚", + c_weapon[] = "•Ší", c_sword[] = "Œ•", + c_axe[] = "•€", c_that_[] = "‚»‚ê"; +#endif static NEARDATA const long takeoff_order[] = { WORN_BLINDF, W_WEP, WORN_SHIELD, WORN_GLOVES, LEFT_RING, @@ -23,7 +40,7 @@ STATIC_DCL void FDECL(on_msg, (struct obj *)); STATIC_DCL void FDECL(toggle_stealth, (struct obj *, long, BOOLEAN_P)); STATIC_DCL void FDECL(toggle_displacement, (struct obj *, long, BOOLEAN_P)); STATIC_PTR int NDECL(Armor_on); -STATIC_PTR int NDECL(Boots_on); +/* int NDECL(Boots_on); -- moved to extern.h */ STATIC_PTR int NDECL(Cloak_on); STATIC_PTR int NDECL(Helmet_on); STATIC_PTR int NDECL(Gloves_on); @@ -40,15 +57,37 @@ STATIC_DCL int FDECL(menu_remarm, (int)); STATIC_DCL void FDECL(count_worn_stuff, (struct obj **, BOOLEAN_P)); STATIC_PTR int FDECL(armor_or_accessory_off, (struct obj *)); STATIC_PTR int FDECL(accessory_or_armor_on, (struct obj *)); +#if 0 /*JP*/ STATIC_DCL void FDECL(already_wearing, (const char *)); +#else +STATIC_DCL void FDECL(already_wearing, (const char*, struct obj *)); +#endif STATIC_DCL void FDECL(already_wearing2, (const char *, const char *)); +/* plural "fingers" or optionally "gloves" */ +const char * +fingers_or_gloves(check_gloves) +boolean check_gloves; +{ + return ((check_gloves && uarmg) + ? gloves_simple_name(uarmg) /* "gloves" or "gauntlets" */ + : makeplural(body_part(FINGER))); /* "fingers" */ +} + void off_msg(otmp) struct obj *otmp; { +#if 0 /*JP*/ if (flags.verbose) You("were wearing %s.", doname(otmp)); +#else + const char *j; + const char *m; + m = joffmsg(otmp, &j); + if(flags.verbose) + You("%s%s%sD", doname(otmp), j, jpast(m)); +#endif } /* for items that involve no delay */ @@ -57,6 +96,7 @@ on_msg(otmp) struct obj *otmp; { if (flags.verbose) { +#if 0 /*JP*/ char how[BUFSZ]; /* call xname() before obj_is_pname(); formatting obj's name might set obj->dknown and that affects the pname test */ @@ -67,6 +107,12 @@ struct obj *otmp; Sprintf(how, " around your %s", body_part(HEAD)); You("are now wearing %s%s.", obj_is_pname(otmp) ? the(otmp_name) : an(otmp_name), how); +#else + const char *j; + const char *m; + m = jonmsg(otmp, &j); + You("%s%s%sD", xname(otmp), j, jpast(m)); +#endif } } @@ -96,13 +142,25 @@ boolean on; if (on) { if (!is_boots(obj)) +/*JP You("move very quietly."); +*/ + Your("Ã‚©‚É“®‚¯‚é‚悤‚É‚È‚Á‚½D"); else if (Levitation || Flying) +/*JP You("float imperceptibly."); +*/ + You("‚¢‚‚̂܂ɂ©•‚‚¢‚Ä‚¢‚½D"); else +/*JP You("walk very quietly."); +*/ + Your("‘«‰¹‚͏¬‚³‚­‚È‚Á‚½D"); } else { +/*JP You("sure are noisy."); +*/ + Your("‘«‰¹‚Í‘å‚«‚­‚È‚Á‚½D"); } } } @@ -137,8 +195,13 @@ boolean on; || Detect_monsters))) { makeknown(obj->otyp); +#if 0 /*JP:T*/ You_feel("that monsters%s have difficulty pinpointing your location.", on ? "" : " no longer"); +#else + pline("‰ö•¨‚Í‚ ‚È‚½‚̈ʒu‚ª‚Í‚Á‚«‚è‚Æ•ª‚©%s‚È‚Á‚½‚悤‚¾D", + on ? "‚ç‚È‚­" : "‚é‚悤‚É"); +#endif } } @@ -148,7 +211,6 @@ boolean on; * [Blindf_on() is an exception and calls setworn() itself.] */ -STATIC_PTR int Boots_on(VOID_ARGS) { @@ -173,8 +235,13 @@ Boots_on(VOID_ARGS) /* though not better than potion speed */ if (!oldprop && !(HFast & TIMEOUT)) { makeknown(uarmf->otyp); +#if 0 /*JP:T*/ You_feel("yourself speed up%s.", (oldprop || HFast) ? " a bit more" : ""); +#else + You("%s‘f‘‚­‚È‚Á‚½‚悤‚È‹C‚ª‚µ‚½D", + (oldprop || HFast) ? "‚³‚ç‚É" : ""); +#endif } break; case ELVEN_BOOTS: @@ -185,17 +252,25 @@ Boots_on(VOID_ARGS) incr_itimeout(&HFumbling, rnd(20)); break; case LEVITATION_BOOTS: - if (!oldprop && !HLevitation && !BLevitation) { + if (!oldprop && !HLevitation && !(BLevitation & FROMOUTSIDE)) { + uarmf->known = 1; /* might come off if putting on over a sink, + * so uarmf could be Null below; status line + * gets updated during brief interval they're + * worn so hero and player learn enchantment */ + context.botl = 1; /* status hilites might mark AC changed */ makeknown(uarmf->otyp); float_up(); - spoteffects(FALSE); + if (Levitation) + spoteffects(FALSE); /* for sink effect */ } else { - float_vs_flight(); /* maybe toggle (BFlying & I_SPECIAL) */ + float_vs_flight(); /* maybe toggle BFlying's I_SPECIAL */ } break; default: impossible(unknown_type, c_boots, uarmf->otyp); } + if (uarmf) /* could be Null here (levitation boots put on over a sink) */ + uarmf->known = 1; /* boots' +/- evident because of status line AC */ return 0; } @@ -215,7 +290,10 @@ Boots_off(VOID_ARGS) case SPEED_BOOTS: if (!Very_fast && !context.takeoff.cancelled_don) { makeknown(otyp); +/*JP You_feel("yourself slow down%s.", Fast ? " a bit" : ""); +*/ + You("%s‚Ì‚ë‚­‚È‚Á‚½‚悤‚È‹C‚ª‚µ‚½D", Fast ? "‚¿‚å‚Á‚Æ" : ""); } break; case WATER_WALKING_BOOTS: @@ -238,7 +316,7 @@ Boots_off(VOID_ARGS) HFumbling = EFumbling = 0; break; case LEVITATION_BOOTS: - if (!oldprop && !HLevitation && !BLevitation + if (!oldprop && !HLevitation && !(BLevitation & FROMOUTSIDE) && !context.takeoff.cancelled_don) { (void) float_down(0L, 0L); makeknown(otyp); @@ -285,8 +363,14 @@ Cloak_on(VOID_ARGS) /* Note: it's already being worn, so we have to cheat here. */ if ((HInvis || EInvis) && !Blind) { newsym(u.ux, u.uy); +#if 0 /*JP:T*/ You("can %s!", See_invisible ? "no longer see through yourself" : see_yourself); +#else + pline("%sI", + See_invisible ? "‚ ‚È‚½‚Í“§–¾‚Å‚È‚­‚È‚Á‚½" : + "Ž©•ªŽ©g‚ªŒ©‚¦‚é‚悤‚É‚È‚Á‚½"); +#endif } break; case CLOAK_OF_INVISIBILITY: @@ -295,12 +379,20 @@ Cloak_on(VOID_ARGS) if (!oldprop && !HInvis && !Blind) { makeknown(uarmc->otyp); newsym(u.ux, u.uy); +#if 0 /*JP:T*/ pline("Suddenly you can%s yourself.", See_invisible ? " see through" : "not see"); +#else + pline("“Ë‘RC%s‚È‚Á‚½D", + See_invisible ? "‚ ‚È‚½‚Í“§–¾‚É" : "Ž©•ªŽ©g‚ªŒ©‚¦‚È‚­"); +#endif } break; case OILSKIN_CLOAK: +/*JP pline("%s very tightly.", Tobjnam(uarmc, "fit")); +*/ + pline("%s‚Í‚Æ‚Ä‚à‚Ò‚Á‚¿‚荇‚¤D",xname(uarmc)); break; /* Alchemy smock gives poison _and_ acid resistance */ case ALCHEMY_SMOCK: @@ -309,6 +401,8 @@ Cloak_on(VOID_ARGS) default: impossible(unknown_type, c_cloak, uarmc->otyp); } + if (uarmc) /* no known instance of !uarmc here but play it safe */ + uarmc->known = 1; /* cloak's +/- evident because of status line AC */ return 0; } @@ -340,17 +434,28 @@ Cloak_off(VOID_ARGS) case MUMMY_WRAPPING: if (Invis && !Blind) { newsym(u.ux, u.uy); +#if 0 /*JP:T*/ You("can %s.", See_invisible ? "see through yourself" : "no longer see yourself"); +#else + pline("%sD", See_invisible ? "‚ ‚È‚½‚Í“§–¾‚É‚È‚Á‚½" + : "Ž©•ªŽ©g‚ªŒ©‚¦‚È‚­‚È‚Á‚½"); +#endif } break; case CLOAK_OF_INVISIBILITY: if (!oldprop && !HInvis && !Blind) { makeknown(CLOAK_OF_INVISIBILITY); newsym(u.ux, u.uy); +#if 0 /*JP:T*/ pline("Suddenly you can %s.", See_invisible ? "no longer see through yourself" : see_yourself); +#else + pline("“Ë‘RC%sD", + See_invisible ? "‚ ‚È‚½‚Í“§–¾‚Å‚È‚­‚È‚Á‚½" + : "Ž©•ªŽ©g‚ªŒ©‚¦‚é‚悤‚É‚È‚Á‚½"); +#endif } break; /* Alchemy smock gives poison _and_ acid resistance */ @@ -380,50 +485,74 @@ Helmet_on(VOID_ARGS) adj_abon(uarmh, uarmh->spe); break; case CORNUTHAUM: - /* people think marked wizards know what they're talking - * about, but it takes trained arrogance to pull it off, - * and the actual enchantment of the hat is irrelevant. - */ + /* people think marked wizards know what they're talking about, + but it takes trained arrogance to pull it off, and the actual + enchantment of the hat is irrelevant */ ABON(A_CHA) += (Role_if(PM_WIZARD) ? 1 : -1); context.botl = 1; makeknown(uarmh->otyp); break; case HELM_OF_OPPOSITE_ALIGNMENT: - /* changing alignment can toggle off active artifact - properties, including levitation; uarmh could get - dropped or destroyed here */ + uarmh->known = 1; /* do this here because uarmh could get cleared */ + /* changing alignment can toggle off active artifact properties, + including levitation; uarmh could get dropped or destroyed here + by hero falling onto a polymorph trap or into water (emergency + disrobe) or maybe lava (probably not, helm isn't 'organic') */ uchangealign((u.ualign.type != A_NEUTRAL) ? -u.ualign.type : (uarmh->o_id % 2) ? A_CHAOTIC : A_LAWFUL, 1); - /* makeknown(uarmh->otyp); -- moved below, after xname() */ + /* makeknown(HELM_OF_OPPOSITE_ALIGNMENT); -- below, after Tobjnam() */ /*FALLTHRU*/ case DUNCE_CAP: if (uarmh && !uarmh->cursed) { if (Blind) +/*JP pline("%s for a moment.", Tobjnam(uarmh, "vibrate")); +*/ + pline("%s‚͈êuk‚¦‚½D", xname(uarmh)); else +#if 0 /*JP:T*/ pline("%s %s for a moment.", Tobjnam(uarmh, "glow"), hcolor(NH_BLACK)); +#else + pline("%s‚͈êu%s‹P‚¢‚½D", + xname(uarmh), jconj_adj(hcolor(NH_BLACK))); +#endif curse(uarmh); } context.botl = 1; /* reveal new alignment or INT & WIS */ if (Hallucination) { +#if 0 /*JP:T*/ pline("My brain hurts!"); /* Monty Python's Flying Circus */ +#else + pline("‚́[‚Ý‚»ƒo[ƒ“I"); /*ƒ‚ƒ“ƒeƒBƒpƒCƒ\ƒ“‚Æ‚Í‚¿‚å‚Á‚ƈႤ‚¯‚Ç*/ +#endif } else if (uarmh && uarmh->otyp == DUNCE_CAP) { +#if 0 /*JP:T*/ You_feel("%s.", /* track INT change; ignore WIS */ ACURR(A_INT) <= (ABASE(A_INT) + ABON(A_INT) + ATEMP(A_INT)) ? "like sitting in a corner" : "giddy"); +#else + You("%s‚悤‚È‹C‚ª‚µ‚½D", + ACURR(A_INT) + <= (ABASE(A_INT) + ABON(A_INT) + ATEMP(A_INT)) + ? "‹÷‚Á‚±‚ɍÀ‚Á‚Ä‚¢‚é" + : "–Ú‚ª‚Ü‚í‚Á‚½"); +#endif } else { - /* [message moved to uchangealign()] */ + /* [message formerly given here moved to uchangealign()] */ makeknown(HELM_OF_OPPOSITE_ALIGNMENT); } break; default: impossible(unknown_type, c_helmet, uarmh->otyp); } + /* uarmh could be Null due to uchangealign() */ + if (uarmh) + uarmh->known = 1; /* helmet's +/- evident because of status line AC */ return 0; } @@ -496,6 +625,8 @@ Gloves_on(VOID_ARGS) default: impossible(unknown_type, c_gloves, uarmg->otyp); } + if (uarmg) /* no known instance of !uarmg here but play it safe */ + uarmg->known = 1; /* gloves' +/- evident because of status line AC */ return 0; } @@ -512,11 +643,22 @@ boolean voluntary; /* taking gloves off on purpose? */ return; if (touch_petrifies(&mons[obj->corpsenm]) && !Stone_resistance) { +#if 0 /*JP:T*/ You("now wield %s in your bare %s.", corpse_xname(obj, (const char *) 0, CXN_ARTICLE), makeplural(body_part(HAND))); +#else + You("%s‚ð‘f%s‚ÅŽ‚Á‚½D", + corpse_xname(obj, (const char *) 0, CXN_ARTICLE), + body_part(HAND)); +#endif +#if 0 /*JP:T*/ Sprintf(kbuf, "%s gloves while wielding %s", voluntary ? "removing" : "losing", killer_xname(obj)); +#else + Sprintf(kbuf, "%s‚ðŽ‚Á‚Ä‚¢‚é‚Æ‚«‚ÉŽè‘Ü‚ð%s", + killer_xname(obj), voluntary ? "ŠO‚µ‚Ä" : "Ž¸‚Á‚Ä"); +#endif instapetrify(kbuf); /* life-saved; can't continue wielding cockatrice corpse though */ remove_worn_item(obj, FALSE); @@ -554,6 +696,14 @@ Gloves_off(VOID_ARGS) context.takeoff.cancelled_don = FALSE; (void) encumber_msg(); /* immediate feedback for GoP */ + /* usually can't remove gloves when they're slippery but it can + be done by having them fall off (polymorph), stolen, or + destroyed (scroll, overenchantment, monster spell); if that + happens, 'cure' slippery fingers so that it doesn't transfer + from gloves to bare hands */ + if (Glib) + make_glib(0); /* for update_inventory() */ + /* prevent wielding cockatrice when not wearing gloves */ if (uwep && uwep->otyp == CORPSE) wielding_corpse(uwep, on_purpose); @@ -571,7 +721,9 @@ STATIC_PTR int Shield_on(VOID_ARGS) { /* no shield currently requires special handling when put on, but we - keep this uncommented in case somebody adds a new one which does */ + keep this uncommented in case somebody adds a new one which does + [reflection is handled by setting u.uprops[REFLECTION].extrinsic + in setworn() called by armor_or_accessory_on() before Shield_on()] */ switch (uarms->otyp) { case SMALL_SHIELD: case ELVEN_SHIELD: @@ -584,7 +736,8 @@ Shield_on(VOID_ARGS) default: impossible(unknown_type, c_shield, uarms->otyp); } - + if (uarms) /* no known instance of !uarmgs here but play it safe */ + uarms->known = 1; /* shield's +/- evident because of status line AC */ return 0; } @@ -624,7 +777,8 @@ Shirt_on(VOID_ARGS) default: impossible(unknown_type, c_shirt, uarmu->otyp); } - + if (uarmu) /* no known instances of !uarmu here but play it safe */ + uarmu->known = 1; /* shirt's +/- evident because of status line AC */ return 0; } @@ -647,14 +801,17 @@ Shirt_off(VOID_ARGS) return 0; } -/* This must be done in worn.c, because one of the possible intrinsics - * conferred is fire resistance, and we have to immediately set - * HFire_resistance in worn.c since worn.c will check it before returning. - */ STATIC_PTR int Armor_on(VOID_ARGS) { + /* + * No suits require special handling. Special properties conferred by + * suits are set up as intrinsics (actually 'extrinsics') by setworn() + * which is called by armor_or_accessory_on() before Armor_on(). + */ + if (uarm) /* no known instances of !uarm here but play it safe */ + uarm->known = 1; /* suit's +/- evident because of status line AC */ return 0; } @@ -668,7 +825,10 @@ Armor_off(VOID_ARGS) } /* The gone functions differ from the off functions in that if you die from - * taking it off and have life saving, you still die. + * taking it off and have life saving, you still die. [Obsolete reference + * to lack of fire resistance being fatal in hell (nethack 3.0) and life + * saving putting a removed item back on to prevent that from immediately + * repeating.] */ int Armor_gone() @@ -712,14 +872,25 @@ Amulet_on() /* Don't use same message as polymorph */ if (orig_sex != poly_gender()) { makeknown(AMULET_OF_CHANGE); +#if 0 /*JP:T*/ You("are suddenly very %s!", flags.female ? "feminine" : "masculine"); +#else + You("“Ë‘R%s‚Á‚Û‚­‚È‚Á‚½I", + flags.female ? "—" : "’j"); +#endif context.botl = 1; } else /* already polymorphed into single-gender monster; only changed the character's base sex */ +/*JP You("don't feel like yourself."); +*/ + You("Ž©•ªŽ©g‚¶‚á‚È‚­‚È‚Á‚½‹C‚ª‚µ‚½D"); +/*JP pline_The("amulet disintegrates!"); +*/ + pline("–‚œ‚¯‚Í‚±‚È‚²‚È‚É‚È‚Á‚½I"); if (orig_sex == poly_gender() && uamul->dknown && !objects[AMULET_OF_CHANGE].oc_name_known && !objects[AMULET_OF_CHANGE].oc_uname) @@ -730,8 +901,12 @@ Amulet_on() case AMULET_OF_STRANGULATION: if (can_be_strangled(&youmonst)) { makeknown(AMULET_OF_STRANGULATION); - pline("It constricts your throat!"); Strangled = 6L; + context.botl = TRUE; +/*JP + pline("It constricts your throat!"); +*/ + pline("–‚œ‚¯‚Í‚ ‚È‚½‚̍A‚ði‚߂‚¯‚½I"); } break; case AMULET_OF_RESTFUL_SLEEP: { @@ -772,7 +947,13 @@ Amulet_off() setworn((struct obj *) 0, W_AMUL); if (!breathless(youmonst.data) && !amphibious(youmonst.data) && !Swimming) { - You("suddenly inhale an unhealthy amount of water!"); +#if 0 /*JP:T*/ + You("suddenly inhale an unhealthy amount of %s!", + hliquid("water")); +#else + You("“Ë‘RC‘å—Ê‚Ì%s‚ðˆù‚ݍž‚ñ‚¾I", + hliquid("…")); +#endif (void) drown(); } return; @@ -780,11 +961,18 @@ Amulet_off() break; case AMULET_OF_STRANGULATION: if (Strangled) { + Strangled = 0L; + context.botl = TRUE; if (Breathless) +/*JP Your("%s is no longer constricted!", body_part(NECK)); +*/ + pline("%s‚ªŠy‚É‚È‚Á‚½I", body_part(NECK)); else +/*JP You("can breathe more easily!"); - Strangled = 0L; +*/ + You("Šy‚Ɍċz‚Å‚«‚é‚悤‚É‚È‚Á‚½I"); } break; case AMULET_OF_RESTFUL_SLEEP: @@ -887,7 +1075,10 @@ register struct obj *obj; if (Invis && !oldprop && !HSee_invisible && !Blind) { newsym(u.ux, u.uy); +/*JP pline("Suddenly you are transparent, but there!"); +*/ + pline("“Ë‘R“§–¾‚É‚È‚Á‚½D‚µ‚©‚µ‘¶Ý‚Í‚µ‚Ä‚¢‚éI"); learnring(obj, TRUE); } break; @@ -899,10 +1090,11 @@ register struct obj *obj; } break; case RIN_LEVITATION: - if (!oldprop && !HLevitation && !BLevitation) { + if (!oldprop && !HLevitation && !(BLevitation & FROMOUTSIDE)) { float_up(); learnring(obj, TRUE); - spoteffects(FALSE); /* for sinks */ + if (Levitation) + spoteffects(FALSE); /* for sinks */ } else { float_vs_flight(); /* maybe toggle (BFlying & I_SPECIAL) */ } @@ -915,7 +1107,7 @@ register struct obj *obj; goto adjust_attrib; case RIN_ADORNMENT: which = A_CHA; - adjust_attrib: + adjust_attrib: old_attrib = ACURR(which); ABON(which) += obj->spe; observable = (old_attrib != ACURR(which)); @@ -1000,20 +1192,28 @@ boolean gone; if (Invisible && !Blind) { newsym(u.ux, u.uy); +/*JP pline("Suddenly you cannot see yourself."); +*/ + pline("“Ë‘RCŽ©•ªŽ©g‚ªŒ©‚¦‚È‚­‚È‚Á‚½D"); learnring(obj, TRUE); } break; case RIN_INVISIBILITY: if (!Invis && !BInvis && !Blind) { newsym(u.ux, u.uy); +#if 0 /*JP:T*/ Your("body seems to unfade%s.", See_invisible ? " completely" : ".."); +#else + Your("‘Ì‚ª%sD", + See_invisible ? "Š®‘S‚ÉŒ»‚í‚ꂽ" : "ŽŸ‘æ‚ÉŒ»‚í‚ê‚Ä‚«‚½DD"); +#endif learnring(obj, TRUE); } break; case RIN_LEVITATION: - if (!BLevitation) { + if (!(BLevitation & FROMOUTSIDE)) { (void) float_down(0L, 0L); if (!Levitation) learnring(obj, TRUE); @@ -1029,7 +1229,7 @@ boolean gone; goto adjust_attrib; case RIN_ADORNMENT: which = A_CHA; - adjust_attrib: + adjust_attrib: old_attrib = ACURR(which); ABON(which) -= obj->spe; observable = (old_attrib != ACURR(which)); @@ -1077,12 +1277,12 @@ struct obj *obj; void Blindf_on(otmp) -register struct obj *otmp; +struct obj *otmp; { boolean already_blind = Blind, changed = FALSE; /* blindfold might be wielded; release it for wearing */ - if (otmp->owornmask & W_WEAPON) + if (otmp->owornmask & W_WEAPONS) remove_worn_item(otmp, FALSE); setworn(otmp, W_TOOL); on_msg(otmp); @@ -1090,7 +1290,10 @@ register struct obj *otmp; if (Blind && !already_blind) { changed = TRUE; if (flags.verbose) +/*JP You_cant("see any more."); +*/ + You("‰½‚àŒ©‚¦‚È‚­‚È‚Á‚½D"); /* set ball&chain variables before the hero goes blind */ if (Punished) set_bc(0); @@ -1101,25 +1304,25 @@ register struct obj *otmp; /* this can only happen by putting on the Eyes of the Overworld; that shouldn't actually produce a permanent cure, but we can't let the "blind from birth" conduct remain intact */ +/*JP pline("For the first time in your life, you can see!"); +*/ + pline("l¶‚ŏ‰‚߂āC–Ú‚ªŒ©‚¦‚é‚悤‚É‚È‚Á‚½I"); u.uroleplay.blind = FALSE; } else +/*JP You("can see!"); +*/ + You("–Ú‚ªŒ©‚¦‚é‚悤‚É‚È‚Á‚½I"); } if (changed) { - /* blindness has just been toggled */ - if (Blind_telepat || Infravision) - see_monsters(); - vision_full_recalc = 1; /* recalc vision limits */ - if (!Blind) - learn_unseen_invent(); - context.botl = 1; + toggle_blindness(); /* potion.c */ } } void Blindf_off(otmp) -register struct obj *otmp; +struct obj *otmp; { boolean was_blind = Blind, changed = FALSE; @@ -1136,11 +1339,17 @@ register struct obj *otmp; /* "still cannot see" makes no sense when removing lenses since they can't have been the cause of your blindness */ if (otmp->otyp != LENSES) +/*JP You("still cannot see."); +*/ + You("‚Ü‚¾–Ú‚ªŒ©‚¦‚È‚¢D"); } else { changed = TRUE; /* !was_blind */ /* "You were wearing the Eyes of the Overworld." */ +/*JP You_cant("see anything now!"); +*/ + You("¡‚͉½‚àŒ©‚邱‚Æ‚ª‚Å‚«‚È‚¢I"); /* set ball&chain variables before the hero goes blind */ if (Punished) set_bc(0); @@ -1148,17 +1357,14 @@ register struct obj *otmp; } else if (was_blind) { if (!gulp_blnd_check()) { changed = TRUE; /* !Blind */ +/*JP You("can see again."); +*/ + You("‚Ó‚½‚½‚Ñ–Ú‚ªŒ©‚¦‚é‚悤‚É‚È‚Á‚½D"); } } if (changed) { - /* blindness has just been toggled */ - if (Blind_telepat || Infravision) - see_monsters(); - vision_full_recalc = 1; /* recalc vision limits */ - if (!Blind) - learn_unseen_invent(); - context.botl = 1; + toggle_blindness(); /* potion.c */ } } @@ -1198,43 +1404,37 @@ struct obj *obj; /* if null, do all worn items; otherwise just obj itself */ } /* check whether the target object is currently being put on (or taken off-- - also checks for doffing) */ + also checks for doffing--[why?]) */ boolean donning(otmp) struct obj *otmp; { - /* long what = (occupation == take_off) ? context.takeoff.what : 0L; */ - long what = context.takeoff.what; /* if nonzero, occupation is implied */ boolean result = FALSE; - /* 'W' and 'T' set afternmv, 'A' sets context.takeoff.what */ - if (otmp == uarm) - result = (afternmv == Armor_on || afternmv == Armor_off - || what == WORN_ARMOR); + /* 'W' (or 'P' used for armor) sets afternmv */ + if (doffing(otmp)) + result = TRUE; + else if (otmp == uarm) + result = (afternmv == Armor_on); else if (otmp == uarmu) - result = (afternmv == Shirt_on || afternmv == Shirt_off - || what == WORN_SHIRT); + result = (afternmv == Shirt_on); else if (otmp == uarmc) - result = (afternmv == Cloak_on || afternmv == Cloak_off - || what == WORN_CLOAK); + result = (afternmv == Cloak_on); else if (otmp == uarmf) - result = (afternmv == Boots_on || afternmv == Boots_off - || what == WORN_BOOTS); + result = (afternmv == Boots_on); else if (otmp == uarmh) - result = (afternmv == Helmet_on || afternmv == Helmet_off - || what == WORN_HELMET); + result = (afternmv == Helmet_on); else if (otmp == uarmg) - result = (afternmv == Gloves_on || afternmv == Gloves_off - || what == WORN_GLOVES); + result = (afternmv == Gloves_on); else if (otmp == uarms) - result = (afternmv == Shield_on || afternmv == Shield_off - || what == WORN_SHIELD); + result = (afternmv == Shield_on); return result; } /* check whether the target object is currently being taken off, - so that stop_donning() and steal() can vary messages */ + so that stop_donning() and steal() can vary messages and doname() + can vary "(being worn)" suffix */ boolean doffing(otmp) struct obj *otmp; @@ -1242,7 +1442,7 @@ struct obj *otmp; long what = context.takeoff.what; boolean result = FALSE; - /* 'T' (also 'W') sets afternmv, 'A' sets context.takeoff.what */ + /* 'T' (or 'R' used for armor) sets afternmv, 'A' sets takeoff.what */ if (otmp == uarm) result = (afternmv == Armor_off || what == WORN_ARMOR); else if (otmp == uarmu) @@ -1257,10 +1457,48 @@ struct obj *otmp; result = (afternmv == Gloves_off || what == WORN_GLOVES); else if (otmp == uarms) result = (afternmv == Shield_off || what == WORN_SHIELD); + /* these 1-turn items don't need 'afternmv' checks */ + else if (otmp == uamul) + result = (what == WORN_AMUL); + else if (otmp == uleft) + result = (what == LEFT_RING); + else if (otmp == uright) + result = (what == RIGHT_RING); + else if (otmp == ublindf) + result = (what == WORN_BLINDF); + else if (otmp == uwep) + result = (what == W_WEP); + else if (otmp == uswapwep) + result = (what == W_SWAPWEP); + else if (otmp == uquiver) + result = (what == W_QUIVER); return result; } +/* despite their names, cancel_don() and cancel_doff() both apply to both + donning and doffing... */ +void +cancel_doff(obj, slotmask) +struct obj *obj; +long slotmask; +{ + /* Called by setworn() for old item in specified slot or by setnotworn() + * for specified item. We don't want to call cancel_don() if we got + * here via _off() -> setworn((struct obj *)0) -> cancel_doff() + * because that would stop the 'A' command from continuing with next + * selected item. So do_takeoff() sets a flag in takeoff.mask for us. + * [For taking off an individual item with 'T'/'R'/'w-', it doesn't + * matter whether cancel_don() gets called here--the item has already + * been removed by now.] + */ + if (!(context.takeoff.mask & I_SPECIAL) && donning(obj)) + cancel_don(); /* applies to doffing too */ + context.takeoff.mask &= ~slotmask; +} + +/* despite their names, cancel_don() and cancel_doff() both apply to both + donning and doffing... */ void cancel_don() { @@ -1271,7 +1509,7 @@ cancel_don() context.takeoff.cancelled_don = (afternmv == Boots_on || afternmv == Helmet_on || afternmv == Gloves_on || afternmv == Armor_on); - afternmv = 0; + afternmv = (int NDECL((*))) 0; nomovemsg = (char *) 0; multi = 0; context.takeoff.delay = 0; @@ -1297,15 +1535,21 @@ struct obj *stolenobj; /* no message if stolenobj is already being doffing */ /* donning() returns True when doffing too; doffing() is more specific */ putting_on = !doffing(otmp); - /* cancel_don() looks at afternmv; it also serves as cancel_doff() */ + /* cancel_don() looks at afternmv; it can also cancel doffing */ cancel_don(); /* don't want _on() or _off() being called by unmul() since the on or off action isn't completing */ - afternmv = 0; + afternmv = (int NDECL((*))) 0; if (putting_on || otmp != stolenobj) { +#if 0 /*JP:T*/ Sprintf(buf, "You stop %s %s.", putting_on ? "putting on" : "taking off", thesimpleoname(otmp)); +#else + Sprintf(buf, "‚ ‚È‚½‚Í%s‚ð%s‚Ì‚ðŽ~‚ß‚½D", + thesimpleoname(otmp), + putting_on ? "g‚ɂ‚¯‚é" : "ŠO‚·"); +#endif } else { buf[0] = '\0'; /* silently stop doffing stolenobj */ result = -multi; /* remember this before calling unmul() */ @@ -1374,8 +1618,53 @@ STATIC_OVL int armor_or_accessory_off(obj) struct obj *obj; { +#if 1 /*JP*/ + const char *j; + const char *m; +#endif if (!(obj->owornmask & (W_ARMOR | W_ACCESSORY))) { +/*JP You("are not wearing that."); +*/ + You("‚»‚ê‚ðg‚ɂ‚¯‚Ä‚¢‚È‚¢D"); + return 0; + } + if (obj == uskin + || ((obj == uarm) && uarmc) + || ((obj == uarmu) && (uarmc || uarm))) { + char why[QBUFSZ], what[QBUFSZ]; + + why[0] = what[0] = '\0'; + if (obj != uskin) { + if (uarmc) + Strcat(what, cloak_simple_name(uarmc)); + if ((obj == uarmu) && uarm) { + if (uarmc) +#if 0 /*JP*/ + Strcat(what, " and "); +#else + Strcat(what, "‚Æ"); +#endif + Strcat(what, suit_simple_name(uarm)); + } +#if 0 /*JP*/ + Sprintf(why, " without taking off your %s first", what); +#else + Sprintf(why, "æ‚É%s‚ð‚Í‚¸‚³‚È‚¢‚Æ", what); +#endif + } else { +#if 0 /*JP*/ + Strcpy(why, "; it's embedded"); +#else + Strcpy(why, "‚­‚Á‚‚¢‚Ä‚¢‚é‚Ì‚Å"); +#endif + } +#if 0 /*JP*/ + You_cant("take that off%s.", why); +#else + m = joffmsg(obj, &j); + pline("%s‚»‚ê%s%s‚±‚Æ‚Í‚Å‚«‚È‚¢D", why, j, m); +#endif return 0; } @@ -1420,37 +1709,27 @@ dotakeoff() if (!Narmorpieces && !Naccessories) { /* assert( GRAY_DRAGON_SCALES > YELLOW_DRAGON_SCALE_MAIL ); */ if (uskin) +#if 0 /*JP:T*/ pline_The("%s merged with your skin!", uskin->otyp >= GRAY_DRAGON_SCALES ? "dragon scales are" : "dragon scale mail is"); +#else + pline("ƒhƒ‰ƒSƒ“‚Ì—Ø%s‚Í‚ ‚È‚½‚Ì”§‚Æ—Z‡‚µ‚Ä‚µ‚Ü‚Á‚Ä‚¢‚éI", + uskin->otyp >= GRAY_DRAGON_SCALES + ? "" : "ŠZ"); +#endif else +/*JP pline("Not wearing any armor or accessories."); +*/ + pline("ŠZ‚â‘•ü•i‚ðg‚ɂ‚¯‚Ä‚¢‚È‚¢D"); return 0; } if (Narmorpieces != 1 || ParanoidRemove) otmp = getobj(clothes, "take off"); if (!otmp) return 0; - if (otmp == uskin - || ((otmp == uarm) && uarmc) - || ((otmp == uarmu) && (uarmc || uarm))) { - char why[BUFSZ], what[BUFSZ]; - - why[0] = what[0] = '\0'; - if (otmp != uskin) { - if (uarmc) - Strcat(what, cloak_simple_name(uarmc)); - if ((otmp == uarmu) && uarm) { - if (uarmc) - Strcat(what, " and "); - Strcat(what, suit_simple_name(uarm)); - } - Sprintf(why, " without taking off your %s first", what); - } - You_cant("take that off%s.", why); - return 0; - } return armor_or_accessory_off(otmp); } @@ -1463,7 +1742,10 @@ doremring() count_worn_stuff(&otmp, TRUE); if (!Naccessories && !Narmorpieces) { +/*JP pline("Not wearing any accessories or armor."); +*/ + pline("‘•ü•i‚âŠZ‚ðg‚ɂ‚¯‚Ä‚¢‚È‚¢D"); return 0; } if (Naccessories != 1 || ParanoidRemove) @@ -1477,15 +1759,37 @@ doremring() /* Check if something worn is cursed _and_ unremovable. */ int cursed(otmp) -register struct obj *otmp; +struct obj *otmp; { + if (!otmp) { + impossible("cursed without otmp"); + return 0; + } /* Curses, like chickens, come home to roost. */ if ((otmp == uwep) ? welded(otmp) : (int) otmp->cursed) { +#if 0 /*JP*//*unused*/ boolean use_plural = (is_boots(otmp) || is_gloves(otmp) || otmp->otyp == LENSES || otmp->quan > 1L); +#endif - You("can't. %s cursed.", use_plural ? "They are" : "It is"); - otmp->bknown = TRUE; + /* might be trying again after applying grease to hands */ + if (Glib && otmp->bknown + /* for weapon, we'll only get here via 'A )' */ + && (uarmg ? (otmp == uwep) + : ((otmp->owornmask & (W_WEP | W_RING)) != 0))) +#if 0 /*JP:T*/ + pline("Despite your slippery %s, you can't.", + fingers_or_gloves(TRUE)); +#else + pline("%s‚Í‚·‚ׂè‚â‚·‚¢‚¯‚ê‚Ç‚àC‚»‚ê‚Í‚Å‚«‚È‚¢D", + fingers_or_gloves(TRUE)); +#endif + else +/*JP + You("can't. %s cursed.", use_plural ? "They are" : "It is"); +*/ + pline("–³—‚¾D‚»‚ê‚ÍŽô‚í‚ê‚Ä‚¢‚éD"); + set_bknown(otmp, 1); return 1; } return 0; @@ -1493,30 +1797,53 @@ register struct obj *otmp; int armoroff(otmp) -register struct obj *otmp; +struct obj *otmp; { - register int delay = -objects[otmp->otyp].oc_delay; + static char offdelaybuf[60]; + int delay = -objects[otmp->otyp].oc_delay; + const char *what = 0; if (cursed(otmp)) return 0; + /* this used to make assumptions about which types of armor had + delays and which didn't; now both are handled for all types */ if (delay) { nomul(delay); +/*JP multi_reason = "disrobing"; +*/ + multi_reason = "’E‚¢‚Å‚¢‚鎞‚É"; if (is_helmet(otmp)) { - /* ick... */ - nomovemsg = !strcmp(helm_simple_name(otmp), "hat") - ? "You finish taking off your hat." - : "You finish taking off your helmet."; + what = helm_simple_name(otmp); afternmv = Helmet_off; } else if (is_gloves(otmp)) { - nomovemsg = "You finish taking off your gloves."; + what = gloves_simple_name(otmp); afternmv = Gloves_off; } else if (is_boots(otmp)) { - nomovemsg = "You finish taking off your boots."; + what = c_boots; afternmv = Boots_off; - } else { - nomovemsg = "You finish taking off your suit."; + } else if (is_suit(otmp)) { + what = suit_simple_name(otmp); afternmv = Armor_off; + } else if (is_cloak(otmp)) { + what = cloak_simple_name(otmp); + afternmv = Cloak_off; + } else if (is_shield(otmp)) { + what = c_shield; + afternmv = Shield_off; + } else if (is_shirt(otmp)) { + what = c_shirt; + afternmv = Shirt_off; + } else { + impossible("Taking off unknown armor (%d: %d), delay %d", + otmp->otyp, objects[otmp->otyp].oc_armcat, delay); + } + if (what) { +/*JP + Sprintf(offdelaybuf, "You finish taking off your %s.", what); +*/ + Sprintf(offdelaybuf, "‚ ‚È‚½‚Í%s‚ð’E‚¬‚¨‚¦‚½D", what); + nomovemsg = offdelaybuf; } } else { /* Be warned! We want off_msg after removing the item to @@ -1540,26 +1867,57 @@ register struct obj *otmp; (void) Cloak_off(); else if (is_shield(otmp)) (void) Shield_off(); + else if (is_helmet(otmp)) + (void) Helmet_off(); + else if (is_gloves(otmp)) + (void) Gloves_off(); + else if (is_boots(otmp)) + (void) Boots_off(); + else if (is_shirt(otmp)) + (void) Shirt_off(); + else if (is_suit(otmp)) + (void) Armor_off(); else - setworn((struct obj *) 0, otmp->owornmask & W_ARMOR); + impossible("Taking off unknown armor (%d: %d), no delay", + otmp->otyp, objects[otmp->otyp].oc_armcat); off_msg(otmp); } context.takeoff.mask = context.takeoff.what = 0L; return 1; } +/*JP +** •¨‚É‚æ‚Á‚Ä“®ŽŒ‚ª•Ï‰»‚·‚é‚Ì‚Å otmp‚ð’ljÁ +*/ STATIC_OVL void +#if 0 /*JP*/ already_wearing(cc) const char *cc; +#else +already_wearing(cc, otmp) +const char *cc; +struct obj *otmp; +#endif { +#if 1 /*JP*/ + const char *j; + const char *m; + m = jconj(jonmsg(otmp, &j), "‚Ä‚¢‚é"); +#endif +/*JP You("are already wearing %s%c", cc, (cc == c_that_) ? '!' : '.'); +*/ + You("‚à‚¤%s%s%s%s", cc, j, m, (cc == c_that_) ? "I" : "D"); } STATIC_OVL void already_wearing2(cc1, cc2) const char *cc1, *cc2; { +/*JP You_cant("wear %s because you're wearing %s there already.", cc1, cc2); +*/ + You_cant("%s‚ðg‚É•t‚¯‚Ä‚¢‚é‚Ì‚Å%s‚ðg‚ɂ‚¯‚ç‚ê‚È‚¢D", cc2, cc1); } /* @@ -1577,6 +1935,21 @@ boolean noisy; { int err = 0; const char *which; +#if 1 /*JP*/ + const char *m; + const char *j; +#endif + + /* this is the same check as for 'W' (dowear), but different message, + in case we get here via 'P' (doputon) */ + if (verysmall(youmonst.data) || nohands(youmonst.data)) { + if (noisy) +/*JP + You("can't wear any armor in your current form."); +*/ + You("Œ»Ý‚ÌŽp‚Å‚Í–h‹ï‚ðg‚ɂ‚¯‚邱‚Æ‚Í‚Å‚«‚È‚¢D"); + return 0; + } which = is_cloak(otmp) ? c_cloak @@ -1590,17 +1963,27 @@ boolean noisy; && (which != c_cloak || youmonst.data->msize != MZ_SMALL) && (racial_exception(&youmonst, otmp) < 1)) { if (noisy) +/*JP pline_The("%s will not fit on your body.", which); +*/ + pline("%s‚Í‚ ‚È‚½‚̑̂ɍ‡‚í‚È‚¢D", which); return 0; } else if (otmp->owornmask & W_ARMOR) { if (noisy) +#if 0 /*JP*/ already_wearing(c_that_); +#else + already_wearing(c_that_, otmp); +#endif return 0; } if (welded(uwep) && bimanual(uwep) && (is_suit(otmp) || is_shirt(otmp))) { if (noisy) +/*JP You("cannot do that while holding your %s.", +*/ + pline("%s‚ðŽ‚Á‚½‚Ü‚Ü‚Å‚Í‚»‚ê‚͏o—ˆ‚È‚¢D", is_sword(uwep) ? c_sword : c_weapon); return 0; } @@ -1608,51 +1991,89 @@ boolean noisy; if (is_helmet(otmp)) { if (uarmh) { if (noisy) +#if 0 /*JP*/ already_wearing(an(helm_simple_name(uarmh))); +#else + already_wearing(helm_simple_name(uarmh), uarmh); +#endif err++; } else if (Upolyd && has_horns(youmonst.data) && !is_flimsy(otmp)) { /* (flimsy exception matches polyself handling) */ if (noisy) +#if 0 /*JP:T*/ pline_The("%s won't fit over your horn%s.", helm_simple_name(otmp), plur(num_horns(youmonst.data))); +#else + pline("Šp‚ª‚¶‚á‚Ü‚Å%s‚ðg‚ɂ‚¯‚ç‚ê‚È‚¢D", + helm_simple_name(otmp)); +#endif err++; } else *mask = W_ARMH; } else if (is_shield(otmp)) { if (uarms) { if (noisy) +#if 0 /*JP*/ already_wearing(an(c_shield)); +#else + already_wearing(c_shield, uarms); +#endif err++; } else if (uwep && bimanual(uwep)) { if (noisy) +#if 0 /*JP*/ You("cannot wear a shield while wielding a two-handed %s.", is_sword(uwep) ? c_sword : (uwep->otyp == BATTLE_AXE) ? c_axe : c_weapon); +#else + { + m = jconj(jonmsg(uwep, &j), "‚Ä‚¢‚é"); + You("—¼ŽèŽ‚¿‚Ì%s%s%s‚̂ŏ‚‚Őg‚ðŽç‚ê‚È‚¢D", + is_sword(uwep) ? c_sword : + uwep->otyp == BATTLE_AXE ? c_axe : c_weapon, + j, m); + } +#endif err++; } else if (u.twoweap) { if (noisy) +/*JP You("cannot wear a shield while wielding two weapons."); +*/ + You("“ñ“—¬‚ð‚µ‚Ä‚¢‚é‚̂ŏ‚‚Őg‚ðŽç‚ê‚È‚¢D"); err++; } else *mask = W_ARMS; } else if (is_boots(otmp)) { if (uarmf) { if (noisy) +#if 0 /*JP*/ already_wearing(c_boots); +#else + already_wearing(c_boots, uarmf); +#endif err++; } else if (Upolyd && slithy(youmonst.data)) { if (noisy) +#if 0 /*JP:T*/ You("have no feet..."); /* not body_part(FOOT) */ +#else + You("‘«‚ª‚È‚¢DDD"); /* not body_part(FOOT) */ +#endif err++; } else if (Upolyd && youmonst.data->mlet == S_CENTAUR) { /* break_armor() pushes boots off for centaurs, so don't let dowear() put them back on... */ if (noisy) +#if 0 /*JP:T*/ pline("You have too many hooves to wear %s.", c_boots); /* makeplural(body_part(FOOT)) yields "rear hooves" which sounds odd */ +#else + pline("%s‚ð—š‚­‚É‚Í‘«‚ª‘½‚·‚¬‚éD", c_boots); +#endif err++; } else if (u.utrap && (u.utraptype == TT_BEARTRAP || u.utraptype == TT_INFLOOR @@ -1660,15 +2081,28 @@ boolean noisy; || u.utraptype == TT_BURIEDBALL)) { if (u.utraptype == TT_BEARTRAP) { if (noisy) +/*JP Your("%s is trapped!", body_part(FOOT)); +*/ + Your("%s‚Í㩂ɂ©‚©‚Á‚Ä‚¢‚éI", body_part(FOOT)); } else if (u.utraptype == TT_INFLOOR || u.utraptype == TT_LAVA) { if (noisy) +#if 0 /*JP:T*/ Your("%s are stuck in the %s!", makeplural(body_part(FOOT)), surface(u.ux, u.uy)); +#else + Your("%s‚Í%s‚É‚Í‚Ü‚Á‚Ä‚¢‚éI", + body_part(FOOT), surface(u.ux, u.uy)); +#endif } else { /*TT_BURIEDBALL*/ if (noisy) +#if 0 /*JP:T*/ Your("%s is attached to the buried ball!", body_part(LEG)); +#else + Your("%s‚Í–„‚Ü‚Á‚Ä‚¢‚é‹…‚ɂ‚Ȃª‚Á‚Ä‚¢‚éI", + body_part(LEG)); +#endif } err++; } else @@ -1676,23 +2110,49 @@ boolean noisy; } else if (is_gloves(otmp)) { if (uarmg) { if (noisy) +#if 0 /*JP*/ already_wearing(c_gloves); +#else + already_wearing(c_gloves, uarmg); +#endif err++; } else if (welded(uwep)) { if (noisy) +/*JP You("cannot wear gloves over your %s.", +*/ + You("%s‚̏ォ‚珬Žè‚ð‘•”õ‚Å‚«‚È‚¢D", is_sword(uwep) ? c_sword : c_weapon); err++; + } else if (Glib) { + /* prevent slippery bare fingers from transferring to + gloved fingers */ + if (noisy) +#if 0 /*JP:T*/ + Your("%s are too slippery to pull on %s.", + fingers_or_gloves(FALSE), gloves_simple_name(otmp)); +#else + Your("%s‚ª‚·‚ׂé‚Ì‚Å%s‚ð‚ЂÁ‚Ï‚ê‚È‚¢D", + fingers_or_gloves(FALSE), gloves_simple_name(otmp)); +#endif + err++; } else *mask = W_ARMG; } else if (is_shirt(otmp)) { if (uarm || uarmc || uarmu) { if (uarmu) { if (noisy) +#if 0 /*JP*/ already_wearing(an(c_shirt)); +#else + already_wearing(c_shirt, uarmu); +#endif } else { if (noisy) +/*JP You_cant("wear that over your %s.", +*/ + You("%s‚̏ォ‚ç’…‚邱‚Æ‚Í‚Å‚«‚È‚¢D", (uarm && !uarmc) ? c_armor : cloak_simple_name(uarmc)); } @@ -1702,18 +2162,27 @@ boolean noisy; } else if (is_cloak(otmp)) { if (uarmc) { if (noisy) +/*JP already_wearing(an(cloak_simple_name(uarmc))); +*/ + already_wearing(cloak_simple_name(uarmc), otmp); err++; } else *mask = W_ARMC; } else if (is_suit(otmp)) { if (uarmc) { if (noisy) +/*JP You("cannot wear armor over a %s.", cloak_simple_name(uarmc)); +*/ + You("%s‚̏ォ‚ç’…‚邱‚Æ‚Í‚Å‚«‚È‚¢D", cloak_simple_name(uarmc)); err++; } else if (uarm) { if (noisy) +/*JP already_wearing("some armor"); +*/ + already_wearing("ŠZ", uarm); err++; } else *mask = W_ARM; @@ -1722,7 +2191,10 @@ boolean noisy; happens if you have armor for slots that are covered up or extra armor for slots that are filled */ if (noisy) +/*JP silly_thing("wear", otmp); +*/ + silly_thing("g‚ɂ‚¯‚é", otmp); err++; } /* Unnecessary since now only weapons and special items like pick-axes get @@ -1744,7 +2216,11 @@ struct obj *obj; boolean armor, ring, eyewear; if (obj->owornmask & (W_ACCESSORY | W_ARMOR)) { +#if 0 /*JP*/ already_wearing(c_that_); +#else + already_wearing(c_that_, obj); +#endif return 0; } armor = (obj->oclass == ARMOR_CLASS); @@ -1759,9 +2235,15 @@ struct obj *obj; if (obj->otyp == HELM_OF_OPPOSITE_ALIGNMENT && qstart_level.dnum == u.uz.dnum) { /* in quest */ if (u.ualignbase[A_CURRENT] == u.ualignbase[A_ORIGINAL]) +/*JP You("narrowly avoid losing all chance at your goal."); +*/ + You("–Ú“I‚ð’B¬‚·‚é‰Â”\«‚ðŽ¸‚¤‚±‚Æ‚ð‚È‚ñ‚Æ‚©‰ñ”ð‚µ‚½D"); else /* converted */ +/*JP You("are suddenly overcome with shame and change your mind."); +*/ + You("“Ë‘R’p‚¸‚©‚µ‚­‚È‚Á‚čl‚¦‚ð•Ï‚¦‚½D"); u.ublessed = 0; /* lose your god's protection */ makeknown(obj->otyp); context.botl = 1; /*for AC after zeroing u.ublessed */ @@ -1774,13 +2256,22 @@ struct obj *obj; int res = 0; if (nolimbs(youmonst.data)) { +/*JP You("cannot make the ring stick to your body."); +*/ + You("Žw—Ö‚ð‚Í‚ß‚ç‚ê‚È‚¢‘Ì‚¾D"); return 0; } if (uleft && uright) { +#if 0 /*JP*/ There("are no more %s%s to fill.", humanoid(youmonst.data) ? "ring-" : "", - makeplural(body_part(FINGER))); + fingers_or_gloves(FALSE)); +#else + pline("‚͂߂邱‚Æ‚Ì‚Å‚«‚é%s%s‚ª‚È‚¢D", + humanoid(youmonst.data) ? "–ò" : "", + fingers_or_gloves(FALSE)); +#endif return 0; } if (uleft) { @@ -1789,9 +2280,15 @@ struct obj *obj; mask = LEFT_RING; } else { do { +#if 0 /*JP:T*/ Sprintf(qbuf, "Which %s%s, Right or Left?", humanoid(youmonst.data) ? "ring-" : "", body_part(FINGER)); +#else + Sprintf(qbuf, "‚Ç‚¿‚ç‚Ì%s%sC‰E(r)‚»‚ê‚Æ‚à¶(l)H", + humanoid(youmonst.data) ? "–ò" : "", + body_part(FINGER)); +#endif answer = yn_function(qbuf, "rl", '\0'); switch (answer) { case '\0': @@ -1807,10 +2304,25 @@ struct obj *obj; } } while (!mask); } + if (uarmg && Glib) { +#if 0 /*JP:T*/ + Your( + "%s are too slippery to remove, so you cannot put on the ring.", + gloves_simple_name(uarmg)); +#else + Your( + "%s‚ª‚·‚ׂÁ‚Ä’E‚°‚È‚¢‚̂ŁAŽw—Ö‚ð‚‚¯‚ç‚ê‚È‚¢D", + gloves_simple_name(uarmg)); +#endif + return 1; /* always uses move */ + } if (uarmg && uarmg->cursed) { res = !uarmg->bknown; - uarmg->bknown = 1; - You("cannot remove your gloves to put on the ring."); + set_bknown(uarmg, 1); +/*JP + You("cannot remove your %s to put on the ring.", c_gloves); +*/ + You("Žw—Ö‚ð‚͂߂悤‚Æ‚µ‚½‚ª%s‚ª’E‚°‚È‚¢D", c_gloves); return res; /* uses move iff we learned gloves are cursed */ } if (uwep) { @@ -1821,39 +2333,71 @@ struct obj *obj; /* welded will set bknown */ if (bimanual(uwep)) hand = makeplural(hand); +/*JP You("cannot free your weapon %s to put on the ring.", +*/ + You("Žw—Ö‚ð‚͂߂悤‚Æ‚µ‚½‚ª—˜%s‚ÌŽ©—R‚ª‚«‚©‚È‚¢D", hand); return res; /* uses move iff we learned weapon is cursed */ } } } else if (obj->oclass == AMULET_CLASS) { if (uamul) { +#if 0 /*JP*/ already_wearing("an amulet"); +#else + already_wearing("–‚œ‚¯", uamul); +#endif return 0; } } else if (eyewear) { if (ublindf) { if (ublindf->otyp == TOWEL) +#if 0 /*JP:T*/ Your("%s is already covered by a towel.", body_part(FACE)); +#else + You("Šù‚Ƀ^ƒIƒ‹‚ðg‚ɂ‚¯‚Ä‚¢‚éD"); +#endif else if (ublindf->otyp == BLINDFOLD) { if (obj->otyp == LENSES) +/*JP already_wearing2("lenses", "a blindfold"); +*/ + already_wearing2("ƒŒƒ“ƒY", "–Ú‰B‚µ"); else +#if 0 /*JP*/ already_wearing("a blindfold"); +#else + already_wearing("–Ú‰B‚µ", ublindf); +#endif } else if (ublindf->otyp == LENSES) { if (obj->otyp == BLINDFOLD) +/*JP already_wearing2("a blindfold", "some lenses"); +*/ + already_wearing2("–Ú‰B‚µ", "ƒŒƒ“ƒY"); else +#if 0 /*JP*/ already_wearing("some lenses"); +#else + already_wearing("ƒŒƒ“ƒY", ublindf); +#endif } else { +#if 0 /*JP*/ already_wearing(something); /* ??? */ +#else + already_wearing("‰½‚©", ublindf); /* ??? */ +#endif } return 0; } } else { /* neither armor nor accessory */ +/*JP You_cant("wear that!"); +*/ + You_cant("‚»‚ê‚ðg‚ɂ‚¯‚ç‚ê‚È‚¢I"); return 0; } } @@ -1864,31 +2408,52 @@ struct obj *obj; if (armor) { int delay; - obj->known = 1; /* since AC is shown on the status line */ - /* if the armor is wielded, release it for wearing */ - if (obj->owornmask & W_WEAPON) + /* if the armor is wielded, release it for wearing (won't be + welded even if cursed; that only happens for weapons/weptools) */ + if (obj->owornmask & W_WEAPONS) remove_worn_item(obj, FALSE); + /* + * Setting obj->known=1 is done because setworn() causes hero's AC + * to change so armor's +/- value is evident via the status line. + * We used to set it here because of that, but then it would stick + * if a nymph stole the armor before it was fully worn. Delay it + * until the aftermv action. The player may still know this armor's + * +/- amount if donning gets interrupted, but the hero won't. + * + obj->known = 1; + */ setworn(obj, mask); + /* if there's no delay, we'll execute 'aftermv' immediately */ + if (obj == uarm) + afternmv = Armor_on; + else if (obj == uarmh) + afternmv = Helmet_on; + else if (obj == uarmg) + afternmv = Gloves_on; + else if (obj == uarmf) + afternmv = Boots_on; + else if (obj == uarms) + afternmv = Shield_on; + else if (obj == uarmc) + afternmv = Cloak_on; + else if (obj == uarmu) + afternmv = Shirt_on; + else + panic("wearing armor not worn as armor? [%08lx]", obj->owornmask); + delay = -objects[obj->otyp].oc_delay; if (delay) { nomul(delay); +/*JP multi_reason = "dressing up"; - if (is_boots(obj)) - afternmv = Boots_on; - if (is_helmet(obj)) - afternmv = Helmet_on; - if (is_gloves(obj)) - afternmv = Gloves_on; - if (obj == uarm) - afternmv = Armor_on; +*/ + multi_reason = "‘•”õ‚µ‚Ä‚¢‚鎞‚É"; +/*JP nomovemsg = "You finish your dressing maneuver."; +*/ + nomovemsg = "‘•”õ‚µI‚¦‚½D"; } else { - if (is_cloak(obj)) - (void) Cloak_on(); - if (is_shield(obj)) - (void) Shield_on(); - if (is_shirt(obj)) - (void) Shirt_on(); + unmul(""); /* call (*aftermv)(), clear it+nomovemsg+multi_reason */ on_msg(obj); } context.takeoff.mask = context.takeoff.what = 0L; @@ -1925,14 +2490,20 @@ dowear() /* cantweararm() checks for suits of armor, not what we want here; verysmall() or nohands() checks for shields, gloves, etc... */ - if ((verysmall(youmonst.data) || nohands(youmonst.data))) { + if (verysmall(youmonst.data) || nohands(youmonst.data)) { +/*JP pline("Don't even bother."); +*/ + pline("‚»‚ñ‚Ȃ‚܂ç‚È‚¢‚±‚Æ‚É‚±‚¾‚í‚é‚ȁD"); return 0; } if (uarm && uarmu && uarmc && uarmh && uarms && uarmg && uarmf && uleft && uright && uamul && ublindf) { /* 'W' message doesn't mention accessories */ +/*JP You("are already wearing a full complement of armor."); +*/ + You("‚·‚Å‚ÉŠ®‘S‘•”õ‚µ‚Ä‚¢‚éD"); return 0; } otmp = getobj(clothes, "wear"); @@ -1948,10 +2519,17 @@ doputon() if (uleft && uright && uamul && ublindf && uarm && uarmu && uarmc && uarmh && uarms && uarmg && uarmf) { /* 'P' message doesn't mention armor */ +#if 0 /*JP:T*/ Your("%s%s are full, and you're already wearing an amulet and %s.", humanoid(youmonst.data) ? "ring-" : "", - makeplural(body_part(FINGER)), + fingers_or_gloves(FALSE), (ublindf->otyp == LENSES) ? "some lenses" : "a blindfold"); +#else + Your("%s%s‚Í‚Ó‚³‚ª‚Á‚Ă邵C‚·‚Å‚É–‚œ‚¯‚Æ%s‚àg‚ɂ‚¯‚Ä‚¢‚éD", + humanoid(youmonst.data) ? "–ò" : "", + fingers_or_gloves(FALSE), + ublindf->otyp==LENSES ? "ƒŒƒ“ƒY" : "–Ú‰B‚µ"); +#endif return 0; } otmp = getobj(accessories, "put on"); @@ -2018,10 +2596,16 @@ glibr() rightfall = (uright && !uright->cursed && (!welded(uwep))); if (!uarmg && (leftfall || rightfall) && !nolimbs(youmonst.data)) { /* changed so cursed rings don't fall off, GAN 10/30/86 */ +#if 0 /*JP:T*/ Your("%s off your %s.", (leftfall && rightfall) ? "rings slip" : "ring slips", - (leftfall && rightfall) ? makeplural(body_part(FINGER)) + (leftfall && rightfall) ? fingers_or_gloves(FALSE) : body_part(FINGER)); +#else + Your("Žw—Ö‚Í%s‚©‚犊‚è—Ž‚¿‚½D", + (leftfall && rightfall) ? fingers_or_gloves(FALSE) + : body_part(FINGER)); +#endif xfl++; if (leftfall) { otmp = uleft; @@ -2046,9 +2630,17 @@ glibr() if (otmp->quan > 1L) otherwep = makeplural(otherwep); hand = body_part(HAND); +/*JP which = "left "; +*/ + which = "¶"; +#if 0 /*JP:T*/ Your("%s %s%s from your %s%s.", otherwep, xfl ? "also " : "", otense(otmp, "slip"), which, hand); +#else + You("%s%s%s%s‚©‚犊‚è—Ž‚Æ‚µ‚½D", otherwep, xfl ? "‚à‚Ü‚½" : "‚ð", + which, body_part(HAND)); +#endif xfl++; wastwoweap = TRUE; setuswapwep((struct obj *) 0); /* clears u.twoweap */ @@ -2079,11 +2671,22 @@ glibr() if (bimanual(otmp)) hand = makeplural(hand); else if (wastwoweap) +#if 0 /*JP:T*/ which = "right "; /* preceding msg was about left */ +#else + which = "‰E"; /* preceding msg was about left */ +#endif +#if 0 /*JP:T*/ pline("%s %s%s %s%s from your %s%s.", !strncmp(thiswep, "corpse", 6) ? "The" : "Your", otherwep ? "other " : "", thiswep, xfl ? "also " : "", otense(otmp, "slip"), which, hand); +#else + You("%s%s%s%s%s‚©‚犊‚è—Ž‚Æ‚µ‚½D", + otherwep ? "‚à‚¤‚ЂƂ‚Ì" : "", thiswep, + xfl ? "‚à‚Ü‚½" : "‚ð", + which, body_part(HAND)); +#endif /* xfl++; */ otmp->quan = savequan; setuwep((struct obj *) 0); @@ -2142,6 +2745,10 @@ int otyp; return uarmg; if (ring->cursed) return ring; + /* normally outermost layer is processed first, but slippery gloves + wears off quickly so uncurse ring itself before handling those */ + if (uarmg && Glib) + return uarmg; } /* either no ring or not right type or nothing prevents its removal */ return (struct obj *) 0; @@ -2170,45 +2777,81 @@ register struct obj *otmp; /* special ring checks */ if (otmp == uright || otmp == uleft) { + struct obj glibdummy; + if (nolimbs(youmonst.data)) { +#if 0 /*JP:T*/ pline_The("ring is stuck."); +#else + pline("Žw—Ö‚Í‘Ì‚É–„‚Ü‚Á‚Ä‚µ‚Ü‚Á‚Ä‚¢‚éD"); +#endif return 0; } + glibdummy = zeroobj; why = 0; /* the item which prevents ring removal */ if (welded(uwep) && (otmp == uright || bimanual(uwep))) { +/*JP Sprintf(buf, "free a weapon %s", body_part(HAND)); +*/ + Sprintf(buf, "—˜˜r‚ÌŽ©—R‚ª‚«‚©‚È‚¢"); why = uwep; - } else if (uarmg && uarmg->cursed) { - Sprintf(buf, "take off your %s", c_gloves); - why = uarmg; + } else if (uarmg && (uarmg->cursed || Glib)) { +#if 0 /*JP*/ + Sprintf(buf, "take off your %s%s", + Glib ? "slippery " : "", gloves_simple_name(uarmg)); +#else + Sprintf(buf, "%s%s‚ª’E‚°‚È‚¢", + Glib ? "‚Ê‚é‚Ê‚é‚Ì" : "", gloves_simple_name(uarmg)); +#endif + why = !Glib ? uarmg : &glibdummy; } if (why) { +/*JP You("cannot %s to remove the ring.", buf); - why->bknown = TRUE; +*/ + You("Žw—Ö‚ð‚Í‚¸‚»‚¤‚Æ‚µ‚½‚ª%sD", buf); + set_bknown(why, 1); return 0; } } /* special glove checks */ if (otmp == uarmg) { if (welded(uwep)) { +#if 0 /*JP:T*/ You("are unable to take off your %s while wielding that %s.", c_gloves, is_sword(uwep) ? c_sword : c_weapon); - uwep->bknown = TRUE; +#else + You("%s‚ðŽ‚Á‚½‚Ü‚Ü%s‚ð‚Í‚¸‚·‚±‚Æ‚Í‚Å‚«‚È‚¢D", + is_sword(uwep) ? c_sword : c_weapon, c_gloves); +#endif + set_bknown(uwep, 1); return 0; } else if (Glib) { - You_cant("take off the slippery %s with your slippery %s.", - c_gloves, makeplural(body_part(FINGER))); +#if 0 /*JP:T*/ + pline("%s %s are too slippery to take off.", + uarmg->unpaid ? "The" : "Your", /* simplified Shk_Your() */ + gloves_simple_name(uarmg)); +#else + pline("%s‚Í‚·‚ׂé‚Ì‚Å’E‚®‚±‚Æ‚ª‚Å‚«‚È‚¢D", + gloves_simple_name(uarmg)); +#endif return 0; } } /* special boot checks */ if (otmp == uarmf) { if (u.utrap && u.utraptype == TT_BEARTRAP) { +/*JP pline_The("bear trap prevents you from pulling your %s out.", +*/ + pline("%s‚ªŒF‚Ì㩂ɂ‚©‚Ü‚Á‚Ä‚¢‚é‚Ì‚Å’E‚®‚±‚Æ‚ª‚Å‚«‚È‚¢D", body_part(FOOT)); return 0; } else if (u.utrap && u.utraptype == TT_INFLOOR) { +/*JP You("are stuck in the %s, and cannot pull your %s out.", +*/ + You("%s‚ª%s‚É‚Í‚Ü‚Á‚Ä‚¢‚é‚Ì‚Å’E‚®‚±‚Æ‚ª‚Å‚«‚È‚¢D", surface(u.ux, u.uy), makeplural(body_part(FOOT))); return 0; } @@ -2217,21 +2860,37 @@ register struct obj *otmp; if (otmp == uarm || otmp == uarmu) { why = 0; /* the item which prevents disrobing */ if (uarmc && uarmc->cursed) { +/*JP Sprintf(buf, "remove your %s", cloak_simple_name(uarmc)); +*/ + Sprintf(buf, "%s‚ª’E‚°‚È‚¢", cloak_simple_name(uarmc)); why = uarmc; } else if (otmp == uarmu && uarm && uarm->cursed) { +/*JP Sprintf(buf, "remove your %s", c_suit); +*/ + Sprintf(buf, "%s‚ª’E‚°‚È‚¢", c_suit); why = uarm; } else if (welded(uwep) && bimanual(uwep)) { +#if 0 /*JP:T*/ Sprintf(buf, "release your %s", is_sword(uwep) ? c_sword : (uwep->otyp == BATTLE_AXE) ? c_axe : c_weapon); +#else + Sprintf(buf, "%s‚ªŽè•ú‚¹‚È‚¢", + is_sword(uwep) ? c_sword : (uwep->otyp == BATTLE_AXE) + ? c_axe + : c_weapon); +#endif why = uwep; } if (why) { +/*JP You("cannot %s to take off %s.", buf, the(xname(otmp))); - why->bknown = TRUE; +*/ + You("%s‚ð‚Í‚¸‚»‚¤‚Æ‚µ‚½‚ª%sD", xname(otmp), buf); + set_bknown(why, 1); return 0; } } @@ -2285,19 +2944,29 @@ do_takeoff() struct obj *otmp = (struct obj *) 0; struct takeoff_info *doff = &context.takeoff; + context.takeoff.mask |= I_SPECIAL; /* set flag for cancel_doff() */ if (doff->what == W_WEP) { if (!cursed(uwep)) { setuwep((struct obj *) 0); +/*JP You("are empty %s.", body_part(HANDED)); +*/ + You("‰½‚à%s‚É‚µ‚Ä‚¢‚È‚¢D", body_part(HAND)); u.twoweap = FALSE; } } else if (doff->what == W_SWAPWEP) { setuswapwep((struct obj *) 0); +/*JP You("no longer have a second weapon readied."); +*/ + You("—\”õ‚Ì•Ší‚ð‚¨‚³‚ß‚½D"); u.twoweap = FALSE; } else if (doff->what == W_QUIVER) { setuqwep((struct obj *) 0); +/*JP You("no longer have ammunition readied."); +*/ + You("€”õ‚µ‚½–î’e‚ð‚¨‚³‚ß‚½D"); } else if (doff->what == WORN_ARMOR) { otmp = uarm; if (!cursed(otmp)) @@ -2344,6 +3013,7 @@ do_takeoff() } else { impossible("do_takeoff: taking off %lx", doff->what); } + context.takeoff.mask &= ~I_SPECIAL; /* clear cancel_doff() flag */ return otmp; } @@ -2361,10 +3031,9 @@ take_off(VOID_ARGS) if (doff->delay > 0) { doff->delay--; return 1; /* still busy */ - } else { - if ((otmp = do_takeoff())) - off_msg(otmp); } + if ((otmp = do_takeoff()) != 0) + off_msg(otmp); doff->mask &= ~doff->what; doff->what = 0L; } @@ -2379,7 +3048,10 @@ take_off(VOID_ARGS) doff->delay = 0; if (doff->what == 0L) { +/*JP You("finish %s.", doff->disrobing); +*/ + You("‘•”õ‚ð‰ð‚«‚¨‚¦‚½D"); return 0; } else if (doff->what == W_WEP) { doff->delay = 1; @@ -2419,7 +3091,9 @@ take_off(VOID_ARGS) } else if (doff->what == RIGHT_RING) { doff->delay = 1; } else if (doff->what == WORN_BLINDF) { - doff->delay = 2; + /* [this used to be 2, but 'R' (and 'T') only require 1 turn to + remove a blindfold, so 'A' shouldn't have been requiring 2] */ + doff->delay = 1; } else { impossible("take_off: taking off %lx", doff->what); return 0; /* force done */ @@ -2454,12 +3128,21 @@ doddoremarm() int result = 0; if (context.takeoff.what || context.takeoff.mask) { +/*JP You("continue %s.", context.takeoff.disrobing); +*/ + You("‘•”õ‚ð‰ð‚­‚Ì‚ðÄŠJ‚µ‚½D"); +/*JP set_occupation(take_off, context.takeoff.disrobing, 0); +*/ + set_occupation(take_off, "‘•”õ‚ð‰ð‚­", 0); return 0; } else if (!uwep && !uswapwep && !uquiver && !uamul && !ublindf && !uleft && !uright && !wearing_armor()) { +/*JP You("are not wearing anything."); +*/ + You("‰½‚à‘•”õ‚µ‚Ä‚¢‚È‚¢D"); return 0; } @@ -2470,13 +3153,15 @@ doddoremarm() result = menu_remarm(result); if (context.takeoff.mask) { +#if 0 /*JP*//*“ú–{Œê‚Å‚ÍŽg‚í‚È‚¢*/ /* default activity for armor and/or accessories, possibly combined with weapons */ (void) strncpy(context.takeoff.disrobing, "disrobing", CONTEXTVERBSZ); /* specific activity when handling weapons only */ - if (!(context.takeoff.mask & ~W_WEAPON)) + if (!(context.takeoff.mask & ~W_WEAPONS)) (void) strncpy(context.takeoff.disrobing, "disarming", CONTEXTVERBSZ); +#endif (void) take_off(); } /* The time to perform the command is already completely accounted for @@ -2498,9 +3183,13 @@ int retry; all_worn_categories = (retry == -2); } else if (flags.menu_style == MENU_FULL) { all_worn_categories = FALSE; +/*JP n = query_category("What type of things do you want to take off?", - invent, WORN_TYPES | ALL_TYPES, &pick_list, - PICK_ANY); +*/ + n = query_category("‚ǂ̃^ƒCƒv‚Ì•¨‚Ì‘•”õ‚ð‰ð‚«‚Ü‚·‚©H", + invent, (WORN_TYPES | ALL_TYPES + | UNPAID_TYPES | BUCX_TYPES), + &pick_list, PICK_ANY); if (!n) return 0; for (i = 0; i < n; i++) { @@ -2511,21 +3200,38 @@ int retry; } free((genericptr_t) pick_list); } else if (flags.menu_style == MENU_COMBINATION) { - all_worn_categories = FALSE; - if (ggetobj("take off", select_off, 0, TRUE, (unsigned *) 0) == -2) - all_worn_categories = TRUE; + unsigned ggofeedback = 0; + + i = ggetobj("take off", select_off, 0, TRUE, &ggofeedback); + if (ggofeedback & ALL_FINISHED) + return 0; + all_worn_categories = (i == -2); } + if (menu_class_present('u') + || menu_class_present('B') || menu_class_present('U') + || menu_class_present('C') || menu_class_present('X')) + all_worn_categories = FALSE; - n = query_objlist("What do you want to take off?", invent, - SIGNAL_NOMENU | USE_INVLET | INVORDER_SORT, &pick_list, - PICK_ANY, +#if 0 /*JP:T*/ + n = query_objlist("What do you want to take off?", &invent, + (SIGNAL_NOMENU | USE_INVLET | INVORDER_SORT), + &pick_list, PICK_ANY, + all_worn_categories ? is_worn : is_worn_by_type); +#else + n = query_objlist("‚Ç‚Ì‘•”õ‚ð‰ð‚«‚Ü‚·‚©H", &invent, + (SIGNAL_NOMENU | USE_INVLET | INVORDER_SORT), + &pick_list, PICK_ANY, all_worn_categories ? is_worn : is_worn_by_type); +#endif if (n > 0) { for (i = 0; i < n; i++) (void) select_off(pick_list[i].item.a_obj); free((genericptr_t) pick_list); } else if (n < 0 && flags.menu_style != MENU_COMBINATION) { +/*JP There("is nothing else you can remove or unwield."); +*/ + pline("‘•”õ‚ð‰ð‚¯‚é‚à‚͉̂½‚à‚È‚¢D"); } return 0; } @@ -2545,44 +3251,68 @@ register struct obj *atmp; if (DESTROY_ARM(uarmc)) { if (donning(otmp)) cancel_don(); +/*JP Your("%s crumbles and turns to dust!", cloak_simple_name(uarmc)); +*/ + Your("%s‚Í•²X‚É‚È‚Á‚½I", cloak_simple_name(uarmc)); (void) Cloak_off(); useup(otmp); } else if (DESTROY_ARM(uarm)) { if (donning(otmp)) cancel_don(); +/*JP Your("armor turns to dust and falls to the %s!", surface(u.ux, u.uy)); +*/ + Your("ŠZ‚͐o‚Æ‚È‚è%s‚É—Ž‚¿‚½I", surface(u.ux,u.uy)); (void) Armor_gone(); useup(otmp); } else if (DESTROY_ARM(uarmu)) { if (donning(otmp)) cancel_don(); +/*JP Your("shirt crumbles into tiny threads and falls apart!"); +*/ + Your("ƒVƒƒƒc‚̓Yƒ^ƒYƒ^‚É—ô‚¯C¬‚³‚ÈŽ…‹û‚Æ‚È‚è—Ž‚¿‚½I"); (void) Shirt_off(); useup(otmp); } else if (DESTROY_ARM(uarmh)) { if (donning(otmp)) cancel_don(); +/*JP Your("%s turns to dust and is blown away!", helm_simple_name(uarmh)); +*/ + Your("%s‚͐o‚ƂȂ萁‚«‚Æ‚ñ‚¾I", helm_simple_name(uarmh)); (void) Helmet_off(); useup(otmp); } else if (DESTROY_ARM(uarmg)) { if (donning(otmp)) cancel_don(); +/*JP Your("gloves vanish!"); +*/ + Your("¬Žè‚͏Á‚¦‚½I"); (void) Gloves_off(); useup(otmp); +/*JP selftouch("You"); +*/ + selftouch("‚»‚Ì‚Æ‚«‚ ‚È‚½‚Í"); } else if (DESTROY_ARM(uarmf)) { if (donning(otmp)) cancel_don(); +/*JP Your("boots disintegrate!"); +*/ + Your("ŒC‚Í•²X‚ɍӂ¯‚½I"); (void) Boots_off(); useup(otmp); } else if (DESTROY_ARM(uarms)) { if (donning(otmp)) cancel_don(); +/*JP Your("shield crumbles away!"); +*/ + Your("‚‚͍ӂ¯ŽU‚Á‚½I"); (void) Shield_off(); useup(otmp); } else { @@ -2623,10 +3353,16 @@ boolean inaccessible_equipment(obj, verb, only_if_known_cursed) struct obj *obj; const char *verb; /* "dip" or "grease", or null to avoid messages */ +/*JP:“ú–{Œê‚Å‚Í "‚ðZ‚·", "‚ÉŽ‰‚ð“h‚é", null ‚Ì‚¢‚¸‚ê‚©*/ boolean only_if_known_cursed; /* ignore covering unless known to be cursed */ { +#if 0 /*JP*/ static NEARDATA const char need_to_take_off_outer_armor[] = "need to take off %s to %s %s."; +#else /*JP:ˆø”‚ªŒ´•¶‚Æ•Ï‚í‚Á‚Ä‚¢‚邱‚Æ‚É’ˆÓ*/ + static NEARDATA const char need_to_take_off_outer_armor[] = + "%s%s‚É‚Í%s‚ð%s•K—v‚ª‚ ‚éD"; +#endif char buf[BUFSZ]; boolean anycovering = !only_if_known_cursed; /* more comprehensible... */ #define BLOCKSACCESS(x) (anycovering || ((x)->cursed && (x)->bknown)) @@ -2638,7 +3374,11 @@ boolean only_if_known_cursed; /* ignore covering unless known to be cursed */ if (obj == uarm && uarmc && BLOCKSACCESS(uarmc)) { if (verb) { Strcpy(buf, yname(uarmc)); +#if 0 /*JP*/ You(need_to_take_off_outer_armor, buf, verb, yname(obj)); +#else /*JP:‘Ώۂ̓Nƒ[ƒN‚È‚Ì‚Åjoffmsg‚ðŽg‚킸Œˆ‚ߌ‚‚¿*/ + You(need_to_take_off_outer_armor, xname(obj), verb, buf, "’E‚®"); +#endif } return TRUE; } @@ -2658,10 +3398,17 @@ boolean only_if_known_cursed; /* ignore covering unless known to be cursed */ if (uarmc) Strcat(buf, yname(uarmc)); if (uarm && uarmc) +/*JP Strcat(buf, " and "); +*/ + Strcat(buf, "‚Æ"); if (uarm) Strcat(buf, sameprefix ? xname(uarm) : yname(uarm)); +#if 0 /*JP*/ You(need_to_take_off_outer_armor, buf, verb, yname(obj)); +#else /*JP:‘Ώۂ̓Nƒ[ƒN‚©ŠZ‚È‚Ì‚Åjoffmsg‚ðŽg‚킸Œˆ‚ߌ‚‚¿*/ + You(need_to_take_off_outer_armor, xname(obj), verb, buf, "’E‚®"); +#endif } return TRUE; } @@ -2669,7 +3416,11 @@ boolean only_if_known_cursed; /* ignore covering unless known to be cursed */ if ((obj == uleft || obj == uright) && uarmg && BLOCKSACCESS(uarmg)) { if (verb) { Strcpy(buf, yname(uarmg)); +#if 0 /*JP*/ You(need_to_take_off_outer_armor, buf, verb, yname(obj)); +#else /*JP:‘Ώۂ͏¬Žè‚È‚Ì‚Åjoffmsg‚ðŽg‚킸Œˆ‚ߌ‚‚¿*/ + You(need_to_take_off_outer_armor, xname(obj), verb, buf, "‚Í‚¸‚·"); +#endif } return TRUE; }