-/* NetHack 3.6 wield.c $NHDT-Date: 1543492132 2018/11/29 11:48:52 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.58 $ */
+/* NetHack 3.6 wield.c $NHDT-Date: 1559670611 2019/06/04 17:50:11 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.59 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2009. */
/* 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-2019 */
+/* For 3.4-, Copyright (c) SHIRAKATA Kentaro, 2002-2020 */
/* JNetHack may be freely redistributed. See license for details. */
#include "hack.h"
pline("%s\82Í\8f\9f\8eè\82É\82 \82È\82½\82Ì%s\82É\91\95\94õ\82³\82ê\82½\81D",
xname(wep), body_part(HAND));
#endif
- wep->bknown = TRUE;
+ set_bknown(wep, 1);
} else {
/* The message must be printed before setuwep (since
* you might die and be revived from changing weapons),
Sprintf(qbuf, "You are wielding %ld %s. Ready %ld of them?",
uwep->quan, simpleonames(uwep), uwep->quan - 1L);
#else
- Sprintf(qbuf, "\82 \82È\82½\82Í%ld %s\82ð\91\95\94õ\82µ\82Ä\82¢\82é\81D\82»\82Ì\82¤\82¿ %ld \82ð\8f\80\94õ\82·\82é\81H",
- uwep->quan, simpleonames(uwep), uwep->quan - 1L);
+ Sprintf(qbuf, "\82 \82È\82½\82Í%ld%s\82Ì%s\82ð\91\95\94õ\82µ\82Ä\82¢\82é\81D\82»\82Ì\82¤\82¿%ld%s\82ð\8f\80\94õ\82·\82é\81H",
+ uwep->quan, numeral(uwep), simpleonames(uwep),
+ uwep->quan - 1L, numeral(uwep));
#endif
switch (ynq(qbuf)) {
case 'q':
: "Your alternate weapon is",
uswapwep->quan, simpleonames(uswapwep),
uswapwep->quan - 1L);
-#else /*TODO:\93ñ\93\81\97¬\82Ì\82Æ\82«\82Í\82©\82È\82è\95s\8e©\91R */
- Sprintf(qbuf, "%s %ld %s\82¾\81D\82»\82Ì\82¤\82¿%ld\82ð\8f\80\94õ\82·\82é\81H",
- u.twoweap ? "\82 \82È\82½\82ª\82»\82ê\82¼\82ê\91\95\94õ\82µ\82Ä\82¢\82é\82Ì\82Í"
- : "\82 \82È\82½\82Ì\97\\94õ\82Ì\95\90\8aí\82Í",
- uswapwep->quan, simpleonames(uswapwep),
- uswapwep->quan - 1L);
+#else
+ Sprintf(qbuf, "\82 \82È\82½%s\82Í%ld%s\82Ì%s\82¾\81D\82»\82Ì\82¤\82¿%ld%s\82ð\8f\80\94õ\82·\82é\81H",
+ u.twoweap ? "\82ª\93ñ\93\81\97¬\82Å\91\95\94õ\82µ\82Ä\82¢\82é\82Ì"
+ : "\82Ì\97\\94õ\82Ì\95\90\8aí",
+ uswapwep->quan, numeral(uswapwep), simpleonames(uswapwep),
+ uswapwep->quan - 1L, numeral(uswapwep));
#endif
switch (ynq(qbuf)) {
case 'q':
; /* must be life-saved to reach here; return FALSE */
} else if (Glib || uswapwep->cursed) {
if (!Glib)
- uswapwep->bknown = TRUE;
+ set_bknown(uswapwep, 1);
drop_uswapwep();
} else
return TRUE;
register struct obj *otmp;
register int amount;
{
- const char *color = hcolor((amount < 0) ? NH_BLACK : NH_BLUE);
+ const char *color = hcolor_adv((amount < 0) ? NH_BLACK : NH_BLUE);
const char *xtime, *wepname = "";
boolean multiple;
int otyp = STRANGE_OBJECT;
Sprintf(buf, "%s\82Í%s\83I\81[\83\89\82É\82Â\82Â\82Ü\82ê\82½\81D",
xname(uwep), hcolor(NH_AMBER));
#endif
- uwep->bknown = !Hallucination;
+ uwep->bknown = !Hallucination; /* ok to bypass set_bknown() */
} else {
/* cursed tin opener is wielded in right hand */
/*JP
/*JP
pline("%s %s.", Yobjnam2(uwep, "faintly glow"), color);
*/
- Your("%s\82Í\82í\82¸\82©\82É%s\8bP\82¢\82½\81D", xname(uwep),jconj_adj(color));
+ Your("%s\82Í\82í\82¸\82©\82É%s\8bP\82¢\82½\81D", xname(uwep), color);
return 1;
}
/* there is a (soft) upper and lower limit to uwep->spe */
otense(uwep, "evaporate"));
#else
Your("%s\82Í\82µ\82Î\82ç\82\8c\83\82µ\82%s\8bP\82«\81C\8fö\94\82µ\82½\81D",
- xname(uwep), jconj_adj(color));
+ xname(uwep), color);
#endif
else
/*JP
xtime);
#else
Your("%s\82Í%s%s%s\8bP\82¢\82½\81D",
- xname(uwep), xtime, jconj_adj(color),
+ xname(uwep), xtime, color,
amount == 0 ? "\8c\83\82µ\82" : "");
#endif
if (otyp != STRANGE_OBJECT && uwep->known
register struct obj *obj;
{
if (obj && obj == uwep && will_weld(obj)) {
- obj->bknown = TRUE;
+ set_bknown(obj, 1);
return 1;
}
return 0;