-/* NetHack 3.6 cmd.c $NHDT-Date: 1557088405 2019/05/05 20:33:25 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.333 $ */
+/* NetHack 3.6 cmd.c $NHDT-Date: 1575245052 2019/12/02 00:04:12 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.350 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Robert Patrick Rankin, 2013. */
/* 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-2022 */
/* JNetHack may be freely redistributed. See license for details. */
#include "hack.h"
#define C(c) (0x1f & (c))
#endif
+#define unctrl(c) ((c) <= C('z') ? (0x60 | (c)) : (c))
+#define unmeta(c) (0x7f & (c))
+
#ifdef ALTMETA
STATIC_VAR boolean alt_esc = FALSE;
#endif
STATIC_PTR int NDECL(wiz_show_seenv);
STATIC_PTR int NDECL(wiz_show_vision);
STATIC_PTR int NDECL(wiz_smell);
-STATIC_PTR int NDECL(wiz_intrinsic);
STATIC_PTR int NDECL(wiz_show_wmodes);
STATIC_DCL void NDECL(wiz_map_levltyp);
STATIC_DCL void NDECL(wiz_levltyp_legend);
return 0;
}
if (iflags.menu_requested && !accept_menu_prefix(func)) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
pline("'%s' prefix has no effect for the %s command.",
visctrl(Cmd.spkeys[NHKF_REQMENU]),
extcmdlist[idx].ef_txt);
int n, pass;
int menumode = 0, menushown[2], onelist = 0;
boolean redisplay = TRUE, search = FALSE;
-#if 0 /*JP*/
+#if 0 /*JP:T*/
static const char *headings[] = { "Extended commands",
"Debugging Extended Commands" };
#else
redisplay = FALSE;
any = zeroany;
start_menu(menuwin);
-#if 0 /*JP*/
+#if 0 /*JP:T*/
add_menu(menuwin, NO_GLYPH, &any, 0, 0, ATR_NONE,
"Extended Commands List", MENU_UNSELECTED);
#else
add_menu(menuwin, NO_GLYPH, &any, 0, 0, ATR_NONE,
"", MENU_UNSELECTED);
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Strcpy(buf, menumode ? "Show" : "Hide");
Strcat(buf, " commands that don't autocomplete");
if (!menumode)
actual list of extended commands shown via separator lines;
having ':' as an explicit selector overrides the default
menu behavior for it; we retain 's' as a group accelerator */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
add_menu(menuwin, NO_GLYPH, &any, ':', 's', ATR_NONE,
"Search extended commands", MENU_UNSELECTED);
#else
"\8ag\92£\83R\83}\83\93\83h\82ð\8c\9f\8dõ\82·\82é", MENU_UNSELECTED);
#endif
} else {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Strcpy(buf, "Show all, clear search");
#else
Strcpy(buf, "\91S\82Ä\95\\8e¦; \8c\9f\8dõ\82ð\83N\83\8a\83A");
}
if (wizard) {
any.a_int = 4;
-#if 0 /*JP*/
+#if 0 /*JP:T*/
add_menu(menuwin, NO_GLYPH, &any, 'z', 0, ATR_NONE,
onelist ? "Show debugging commands in separate section"
: "Show all alphabetically, including debugging commands",
"", MENU_UNSELECTED);
}
if (*searchbuf && !n)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
add_menu(menuwin, NO_GLYPH, &any, 0, 0, ATR_NONE,
"no matches", MENU_UNSELECTED);
#else
searchbuf[0] = '\0';
}
if (search) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Strcpy(promptbuf, "Extended command list search phrase");
Strcat(promptbuf, "?");
#else
if ((len = (int) strlen(efp->ef_desc)) > biggest)
biggest = len;
if (++i > MAX_EXT_CMD) {
-#if defined(BETA)
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
impossible(
"Exceeded %d extended commands in doextcmd() menu; 'extmenu' disabled.",
MAX_EXT_CMD);
-#endif /* BETA */
+#endif /* NH_DEVEL_STATUS != NH_STATUS_RELEASED */
iflags.extmenu = 0;
return -1;
}
if (n == 1) {
if (matchlevel > (QBUFSZ - 2)) {
free((genericptr_t) pick_list);
-#if defined(BETA)
+#if (NH_DEVEL_STATUS != NH_STATUS_RELEASED)
impossible("Too many chars (%d) entered in extcmd_via_menu()",
matchlevel);
#endif
u_on_rndspot((u.uhave.amulet ? 1 : 0) /* 'going up' flag */
| (was_in_W_tower ? 2 : 0));
losedogs();
+ kill_genocided_monsters();
/* u_on_rndspot() might pick a spot that has a monster, or losedogs()
might pick the hero's spot (only if there isn't already a monster
there), so we might have to move hero or the co-located monster */
u.uen = u.uenmax = 1000;
return 0;
}
-/*JP
- if (yn("Do you want to call panic() and end your game?") == 'y')
-*/
- if (yn("panic()\8aÖ\90\94\82ð\8cÄ\82Ñ\8fo\82µ\82Ä\83Q\81[\83\80\82ð\8fI\97¹\82³\82¹\82Ü\82·\82©\81H") == 'y')
+#if 0 /*JP:T*/
+ if (paranoid_query(ParanoidQuit,
+ "Do you want to call panic() and end your game?"))
+#else
+ if (paranoid_query(ParanoidQuit,
+ "panic()\8aÖ\90\94\82ð\8cÄ\82Ñ\8fo\82µ\82Ä\83Q\81[\83\80\82ð\8fI\97¹\82³\82¹\82Ü\82·\82©\81H"))
+#endif
panic("Crash test.");
return 0;
}
= &mons[context.warntype.speciesidx];
}
goto def_feedback;
+ case GLIB:
+ /* slippery fingers applies to gloves if worn at the time
+ so persistent inventory might need updating */
+ make_glib((int) newtimeout);
+ goto def_feedback;
case LEVITATION:
case FLYING:
float_vs_flight();
/*FALLTHRU*/
default:
- def_feedback:
+ def_feedback:
pline("Timeout for %s %s %d.", propertynames[i].prop_name,
oldtimeout ? "increased by" : "set to", amt);
- incr_itimeout(&u.uprops[p].intrinsic, amt);
+ if (p != GLIB)
+ incr_itimeout(&u.uprops[p].intrinsic, amt);
break;
}
context.botl = 1; /* probably not necessary... */
/* Protection amount is typically larger than damage or to-hit;
reduce magnitude by a third in order to stretch modifier ranges
(small:1..5, moderate:6..10, large:11..19, huge:20+) */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
if (!strcmp(inctyp, "defense"))
#else
if (!strcmp(inctyp, "\96h\8cä"))
category_name = "\95s\96¾";
break;
}
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf, " %s %s damage", (final || wizard) ? "half" : "reduced",
category_name);
enl_msg(You_, "take", "took", buf, from_what(category));
*tmpbuf = highc(*tmpbuf); /* same adjustment as bottom line */
/* as in background_enlightenment, when poly'd we need to use the saved
gender in u.mfemale rather than the current you-as-monster gender */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf, "%s the %s's attributes:", tmpbuf,
((Upolyd ? u.mfemale : flags.female) && urole.name.f)
? urole.name.f
Sprintf(tmpbuf, "%s ", genders[flags.female ? 1 : 0].adj);
*/
Sprintf(tmpbuf, "%s\82Ì", genders[flags.female ? 1 : 0].adj);
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf, "%sin %s%s form", !final ? "currently " : "", tmpbuf,
uasmon->mname);
#else
Sprintf(tmpbuf, "%s", genders[innategend].adj);
buf[0] = '\0';
if (Upolyd)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Strcpy(buf, "actually "); /* "You are actually a ..." */
#else
Strcpy(buf, "\8eÀ\8dÛ\82É\82Í"); /* "\82 \82È\82½\82Í\8eÀ\8dÛ\82É\82Í..." */
#endif
if (!strcmpi(rank_titl, role_titl)) {
/* omit role when rank title matches it */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(eos(buf), "%s, level %d %s%s", an(rank_titl), u.ulevel,
tmpbuf, urace.noun);
#else
tmpbuf, urace.adj, role_titl);
#endif
} else {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(eos(buf), "%s, a level %d %s%s %s", an(rank_titl), u.ulevel,
tmpbuf, urace.adj, role_titl);
#else
Strcpy(buf, "\82 \82È\82½\82Í");
#endif
if (u.ualign.type != A_LAWFUL)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(eos(buf), " %s (%s) and", align_gname(A_LAWFUL),
align_str(A_LAWFUL));
#else
align_str(A_LAWFUL));
#endif
if (u.ualign.type != A_NEUTRAL)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(eos(buf), " %s (%s)%s", align_gname(A_NEUTRAL),
align_str(A_NEUTRAL),
(u.ualign.type != A_CHAOTIC) ? " and" : "");
(u.ualign.type != A_CHAOTIC) ? "\82¨\82æ\82Ñ" : "");
#endif
if (u.ualign.type != A_CHAOTIC)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(eos(buf), " %s (%s)", align_gname(A_CHAOTIC),
align_str(A_CHAOTIC));
#else
enlght_out(buf);
}
- /* 3.6.2: dungeon level, so that ^X really has all status info as
+ /* As of 3.6.2: dungeon level, so that ^X really has all status info as
claimed by the comment below; this reveals more information than
the basic status display, but that's one of the purposes of ^X;
similar information is revealed by #overview; the "You died in
enlght_line(You_, "", buf, "");
#endif
}
+
+ /* for gameover, these have been obtained in really_done() so that they
+ won't vary if user leaves a disclosure prompt or --More-- unanswered
+ long enough for the dynamic value to change between then and now */
+ if (final ? iflags.at_midnight : midnight()) {
+#if 0 /*JP:T*/
+ enl_msg("It ", "is ", "was ", "the midnight hour", "");
+#else
+ enl_msg("\8e\9e\8aÔ\91Ñ\82Í\90[\96é", "\82¾", "\82¾\82Á\82½", "", "");
+#endif
+ } else if (final ? iflags.at_night : night()) {
+#if 0 /*JP:T*/
+ enl_msg("It ", "is ", "was ", "nighttime", "");
+#else
+ enl_msg("\8e\9e\8aÔ\91Ñ\82Í\96é", "\82¾", "\82¾\82Á\82½", "", "");
+#endif
+ }
+ /* other environmental factors */
+ if (flags.moonphase == FULL_MOON || flags.moonphase == NEW_MOON) {
+ /* [This had "tonight" but has been changed to "in effect".
+ There is a similar issue to Friday the 13th--it's the value
+ at the start of the current session but that session might
+ have dragged on for an arbitrary amount of time. We want to
+ report the values that currently affect play--or affected
+ play when game ended--rather than actual outside situation.] */
+#if 0 /*JP:T*/
+ Sprintf(buf, "a %s moon in effect%s",
+ (flags.moonphase == FULL_MOON) ? "full"
+ : (flags.moonphase == NEW_MOON) ? "new"
+ /* showing these would probably just lead to confusion
+ since they have no effect on game play... */
+ : (flags.moonphase < FULL_MOON) ? "first quarter"
+ : "last quarter",
+ /* we don't have access to 'how' here--aside from survived
+ vs died--so settle for general platitude */
+ final ? " when your adventure ended" : "");
+ enl_msg("There ", "is ", "was ", buf, "");
+#else
+ Sprintf(buf, "%s%s\8c\8e",
+ /* we don't have access to 'how' here--aside from survived
+ vs died--so settle for general platitude */
+ final ? "\96`\8c¯\82ð\8fI\82¦\82½\82Æ\82«\81C" : "",
+ (flags.moonphase == FULL_MOON) ? "\96\9e"
+ : (flags.moonphase == NEW_MOON) ? "\90V"
+ /* showing these would probably just lead to confusion
+ since they have no effect on game play... */
+ : (flags.moonphase < FULL_MOON) ? "\8fã\8c·\82Ì"
+ : "\89º\8c·\82Ì");
+ enl_msg("", "\82¾", "\82¾\82Á\82½", buf, "");
+#endif
+ }
+ if (flags.friday13) {
+ /* let player know that friday13 penalty is/was in effect;
+ we don't say "it is/was Friday the 13th" because that was at
+ the start of the session and it might be past midnight (or
+ days later if the game has been paused without save/restore),
+ so phrase this similar to the start up message */
+#if 0 /*JP:T*/
+ Sprintf(buf, " Bad things %s on Friday the 13th.",
+ !final ? "can happen"
+ : (final == ENL_GAMEOVERALIVE) ? "could have happened"
+ /* there's no may to tell whether -1 Luck made a
+ difference but hero has died... */
+ : "happened");
+#else
+ Sprintf(buf, "\82P\82R\93ú\82Ì\8bà\97j\93ú\82É\82Í\82æ\82\82È\82¢\82±\82Æ\82ª%s\81D",
+ !final ? "\82 \82é"
+ : (final == ENL_GAMEOVERALIVE) ? "\82 \82Á\82½\82©\82à\82µ\82ê\82È\82¢"
+ /* there's no may to tell whether -1 Luck made a
+ difference but hero has died... */
+ : "\82 \82Á\82½");
+#endif
+ enlght_out(buf);
+ }
+
if (!Upolyd) {
- /* flags.showexp does not matter */
+ int ulvl = (int) u.ulevel;
+ /* [flags.showexp currently does not matter; should it?] */
+
/* experience level is already shown above */
#if 0 /*JP*/
Sprintf(buf, "%-1ld experience point%s", u.uexp, plur(u.uexp));
#else
Sprintf(buf, "\8co\8c±\92l%-1ld\83|\83C\83\93\83g", u.uexp);
#endif
- if (wizard) {
- if (u.ulevel < 30) {
- int ulvl = (int) u.ulevel;
- long nxtlvl = newuexp(ulvl);
- /* long oldlvl = (ulvl > 1) ? newuexp(ulvl - 1) : 0; */
+ /* TODO?
+ * Remove wizard-mode restriction since patient players can
+ * determine the numbers needed without resorting to spoilers
+ * (even before this started being disclosed for 'final';
+ * just enable 'showexp' and look at normal status lines
+ * after drinking gain level potions or eating wraith corpses
+ * or being level-drained by vampires).
+ */
+ if (ulvl < 30 && (final || wizard)) {
+ long nxtlvl = newuexp(ulvl), delta = nxtlvl - u.uexp;
#if 0 /*JP*/
- Sprintf(eos(buf), ", %ld %s%sneeded to attain level %d",
- (nxtlvl - u.uexp), (u.uexp > 0) ? "more " : "",
- !final ? "" : "were ", (ulvl + 1));
+ Sprintf(eos(buf), ", %ld %s%sneeded %s level %d",
+ delta, (u.uexp > 0) ? "more " : "",
+ /* present tense=="needed", past tense=="were needed" */
+ !final ? "" : (delta == 1L) ? "was " : "were ",
+ /* "for": grammatically iffy but less likely to wrap */
+ (ulvl < 18) ? "to attain" : "for", (ulvl + 1));
#else
- Sprintf(eos(buf), "(\83\8c\83x\83\8b%d\82Ü\82Å%ld\83|\83C\83\93\83g)",
- (ulvl + 1), (nxtlvl - u.uexp));
+ Sprintf(eos(buf), "(\83\8c\83x\83\8b%d\82Ü\82Å%ld\83|\83C\83\93\83g)",
+ (ulvl + 1), delta);
#endif
- }
}
you_have(buf, "");
}
int mode UNUSED;
int final;
{
+#if 0 /*JP*//*unused*/
static char Power[] = "energy points (spell power)";
+#endif
char buf[BUFSZ];
int pw = u.uen, hp = (Upolyd ? u.mh : u.uhp),
pwmax = u.uenmax, hpmax = (Upolyd ? u.mhmax : u.uhpmax);
/*JP
enl_msg(Your_wallet, "is ", "was ", "empty", "");
*/
- enl_msg(Your_wallet, "\82Å\82 \82é", "\82ł¾\82Á\82½", "\82Í\8bó", "");
+ enl_msg(Your_wallet, "\82Å\82 \82é", "\82¾\82Á\82½", "\82Í\8bó", "");
} else {
#if 0 /*JP:T*/
Sprintf(buf, "%ld %s", umoney, currency(umoney));
Strcat(buf, " plus thrown");
*/
Strcat(buf, "\82É\89Á\82¦\82Ä\93\8a\82°\82é\82à\82Ì");
- if (iflags.autopickup_exceptions[AP_GRAB]
- || iflags.autopickup_exceptions[AP_LEAVE])
+ if (apelist)
/*JP
Strcat(buf, ", with exceptions");
*/
Strcat(buf, "(\97á\8aO\82 \82è)");
#if 1 /*JP*/
- Strcpy(buf, "\82É\91Î\82µ\82Ä\83I\83\93");
+ Strcat(buf, "\82É\91Î\82µ\82Ä\83I\83\93");
#endif
-
} else
/*JP
Strcpy(buf, "off");
/*JP
Sprintf(buf, "%s Characteristics:", !final ? "Current" : "Final");
*/
- Sprintf(buf, "%s\91®\90«\81F", !final ? "\8c»\8dÝ\82Ì" : "\8dÅ\8fI");
+ Sprintf(buf, "%s\93Á\90«\81F", !final ? "\8c»\8dÝ\82Ì" : "\8dÅ\8fI");
enlght_out(buf);
/* bottom line order */
*/
paren_pfx = final ? " (" : " (\8c»\8dÝ; ";
if (acurrent != abase) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(eos(valubuf), "%sbase:%s", paren_pfx,
attrval(attrindx, abase, valstring));
#else
paren_pfx = ", ";
}
if (abase != apeak) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(eos(valubuf), "%speak:%s", paren_pfx,
attrval(attrindx, apeak, valstring));
#else
paren_pfx = ", ";
}
if (interesting_alimit) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(eos(valubuf), "%s%slimit:%s", paren_pfx,
/* more verbose if exceeding 'limit' due to magic bonus */
(acurrent > alimit) ? "innate " : "",
/* not a trouble, but we want to display riding status before maybe
reporting steed as trapped or hero stuck to cursed saddle */
if (Riding) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf, "riding %s", steedname);
you_are(buf, "");
#else
youhiding(TRUE, final);
/* internal troubles, mostly in the order that prayer ranks them */
- if (Stoned)
+ if (Stoned) {
+ if (final && (Stoned & I_SPECIAL))
+/*JP
+ enlght_out(" You turned into stone.");
+*/
+ enlght_out(" \82 \82È\82½\82Í\90Î\82É\82È\82Á\82½\81D");
+ else
/*JP
- you_are("turning to stone", "");
+ you_are("turning to stone", "");
*/
- enl_msg("\82 \82È\82½\82Í", "\82È\82è\82Â\82Â\82 \82é", "\82È\82Á\82½", "\90Î\82É", "");
- if (Slimed)
+ enl_msg("\82 \82È\82½\82Í", "\82È\82è\82Â\82Â\82 \82é", "\82È\82Á\82½", "\90Î\82É", "");
+ }
+ if (Slimed) {
+ if (final && (Slimed & I_SPECIAL))
+/*JP
+ enlght_out(" You turned into slime.");
+*/
+ enlght_out(" \82 \82È\82½\82Í\83X\83\89\83C\83\80\82É\82È\82Á\82½\81D");
+ else
/*JP
- you_are("turning into slime", "");
+ you_are("turning into slime", "");
*/
- enl_msg("\82 \82È\82½\82Í", "\82È\82è\82Â\82Â\82 \82é", "\82È\82Á\82½", "\83X\83\89\83C\83\80\82É", "");
+ enl_msg("\82 \82È\82½\82Í", "\82È\82è\82Â\82Â\82 \82é", "\82È\82Á\82½", "\83X\83\89\83C\83\80\82É", "");
+ }
if (Strangled) {
if (u.uburied) {
/*JP
*/
you_are_ing("\92\82\91§\82µ\82Ä", "");
} else {
+ if (final && (Strangled & I_SPECIAL)) {
/*JP
- Strcpy(buf, "being strangled");
+ enlght_out(" You died from strangulation.");
*/
- Strcpy(buf, "\8eñ\82ð\8di\82ß\82ç\82ê\82Ä");
- if (wizard)
- Sprintf(eos(buf), " (%ld)", (Strangled & TIMEOUT));
+ enlght_out(" \82 \82È\82½\82Í\92\82\91§\8e\80\82µ\82½\81D");
+ } else {
/*JP
- you_are(buf, from_what(STRANGLED));
+ Strcpy(buf, "being strangled");
*/
- enl_msg("\82 \82È\82½\82Í", "\82¢\82é", "\82¢\82½", buf, from_what(STRANGLED));
+ Strcpy(buf, "\8eñ\82ð\8di\82ß\82ç\82ê\82Ä");
+ if (wizard)
+ Sprintf(eos(buf), " (%ld)", (Strangled & TIMEOUT));
+/*JP
+ you_are(buf, from_what(STRANGLED));
+*/
+ enl_msg("\82 \82È\82½\82Í", "\82¢\82é", "\82¢\82½", buf, from_what(STRANGLED));
+ }
}
}
if (Sick) {
- /* prayer lumps these together; botl puts Ill before FoodPois */
- if (u.usick_type & SICK_NONVOMITABLE)
+ /* the two types of sickness are lumped together; hero can be
+ afflicted by both but there is only one timeout; botl status
+ puts TermIll before FoodPois and death due to timeout reports
+ terminal illness if both are in effect, so do the same here */
+ if (final && (Sick & I_SPECIAL)) {
+#if 0 /*JP:T*/
+ Sprintf(buf, " %sdied from %s.", You_, /* has trailing space */
+ (u.usick_type & SICK_NONVOMITABLE)
+ ? "terminal illness" : "food poisoning");
+#else
+ Sprintf(buf, " %s%s\82Å\8e\80\82ñ\82¾\81D", You_, /* has trailing space */
+ (u.usick_type & SICK_NONVOMITABLE)
+ ? "\95a\8bC" : "\90H\92\86\93Å");
+#endif
+ enlght_out(buf);
+ } else {
+ /* unlike death due to sickness, report the two cases separately
+ because it is possible to cure one without curing the other */
+ if (u.usick_type & SICK_NONVOMITABLE)
/*JP
- you_are("terminally sick from illness", "");
+ you_are("terminally sick from illness", "");
*/
- enl_msg("\82 \82È\82½\82Í\95a\8bC\82Å\92v\96½\93I\82É\8bC\95ª\82ª\88«", "\82¢", "\82©\82Á\82½", "", "");
- if (u.usick_type & SICK_VOMITABLE)
+ enl_msg("\82 \82È\82½\82Í\95a\8bC\82Å\92v\96½\93I\82É\8bC\95ª\82ª\88«", "\82¢", "\82©\82Á\82½", "", "");
+ if (u.usick_type & SICK_VOMITABLE)
/*JP
- you_are("terminally sick from food poisoning", "");
+ you_are("terminally sick from food poisoning", "");
*/
- enl_msg("\82 \82È\82½\82Í\90H\92\86\93Å\82Å\92v\96½\93I\82É\8bC\95ª\82ª\88«", "\82¢", "\82©\82Á\82½", "", "");
+ enl_msg("\82 \82È\82½\82Í\90H\92\86\93Å\82Å\92v\96½\93I\82É\8bC\95ª\82ª\88«", "\82¢", "\82©\82Á\82½", "", "");
+ }
}
if (Vomiting)
/*JP
if (Blind) {
/* from_what() (currently wizard-mode only) checks !haseyes()
before u.uroleplay.blind, so we should too */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf, "%s blind",
!haseyes(youmonst.data) ? "innately"
: u.uroleplay.blind ? "permanently"
}
if (Glib) {
#if 0 /*JP*/
- Sprintf(buf, "slippery %s", makeplural(body_part(FINGER)));
+ Sprintf(buf, "slippery %s", fingers_or_gloves(TRUE));
+ if (wizard)
+ Sprintf(eos(buf), " (%ld)", (Glib & TIMEOUT));
you_have(buf, "");
#else
Sprintf(buf, "%s\82ª\82Ê\82é\82Ê\82é\82µ\82Ä", body_part(FINGER));
+ if (wizard)
+ Sprintf(eos(buf), " (%ld)", (Glib & TIMEOUT));
enl_msg(buf, iru, ita, "", "");
#endif
}
boolean hav = (sklvl != P_UNSKILLED && sklvl != P_SKILLED);
if (sklvl == P_ISRESTRICTED)
+/*JP
Strcpy(sklvlbuf, "no");
+*/
+ Strcpy(sklvlbuf, "\90§\8cÀ");
else
(void) lcase(skill_level_name(wtype, sklvlbuf));
/* "you have no/basic/expert/master/grand-master skill with <skill>"
or "you are unskilled/skilled in <skill>" */
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf, "%s %s %s", sklvlbuf,
hav ? "skill with" : "in", skill_name(wtype));
#else
Sprintf(buf, "%s\82Ì%s\83X\83L\83\8b", skill_name(wtype), sklvlbuf);
#endif
if (can_advance(wtype, FALSE))
+#if 0 /*JP:T*/
Sprintf(eos(buf), " and %s that",
!final ? "can enhance" : "could have enhanced");
+#else
+ Sprintf(eos(buf), "(\8d\82\82ß\82é\82±\82Æ\82ª\82Å\82«%s)",
+ !final ? "\82é" : "\82½");
+#endif
if (hav)
you_have(buf, "");
else
/* report 'nudity' */
if (!uarm && !uarmu && !uarmc && !uarms && !uarmg && !uarmf && !uarmh) {
if (u.uroleplay.nudist)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
enl_msg(You_, "do", "did", " not wear any armor", "");
#else
enl_msg(You_, "\82¢", "\82©\82Á\82½", "\89½\82Ì\8aZ\82à\91\95\94õ\82µ\82È", "");
#endif
else
-#if 0 /*JP*/
+#if 0 /*JP:T*/
you_are("not wearing any armor", "");
#else
enl_msg(You_, "\82¢", "\82©\82Á\82½", "\89½\82Ì\8aZ\82à\91\95\94õ\82µ\82Ä\82¢\82È", "");
}
/* attributes: intrinsics and the like, other non-obvious capabilities */
-void
+STATIC_OVL void
attributes_enlightenment(unused_mode, final)
int unused_mode UNUSED;
int final;
enlght_out(final ? "\8dÅ\8fI\91®\90«:" : "\8c»\8dÝ\82Ì\91®\90«:");
if (u.uevent.uhand_of_elbereth) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
static const char *const hofe_titles[3] = { "the Hand of Elbereth",
"the Envoy of Balance",
"the Glory of Arioch" };
you_have(buf, "");
if (wizard) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf, " %d", u.ualign.record);
enl_msg("Your alignment ", "is", "was", buf, "");
#else
*/
you_have("\90Î\89»\82Ö\82Ì\91Ï\90«", from_what(STONE_RES));
if (Halluc_resistance)
-#if 0 /*JP*/
+#if 0 /*JP:T*/
enl_msg(You_, "resist", "resisted", " hallucinations",
from_what(HALLUC_RES));
#else
*/
enl_msg("\82 \82È\82½\82Í\93§\96¾\82È\82à\82Ì\82ð\8c©\82ç\82ê", "\82é", "\82½", "", from_what(SEE_INVIS));
else
-#if 0 /*JP*/
+#if 0 /*JP:T*/
enl_msg(You_, "will see", "would have seen",
" invisible when not blind", from_what(SEE_INVIS));
#else
*/
you_have("\8cx\89ú\94\\97Í", from_what(WARNING));
if (Warn_of_mon && context.warntype.obj) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf, "aware of the presence of %s",
(context.warntype.obj & M2_ORC) ? "orcs"
: (context.warntype.obj & M2_ELF) ? "elves"
enl_msg(You_, "could be", "could have been", " clairvoyant", buf);
#else
/*JP:\81u\81c\82É\82æ\82Á\82Ä\81v*/
- if (!strncmp(buf, "\82É\82æ\82Á\82Ä", 8))
+ if (!STRNCMP2(buf, "\82É\82æ\82Á\82Ä"))
/*JP:\81u\81c\82ª\82È\82¯\82ê\82Î\81v\82É\8f\91\82«\8a·\82¦\82é*/
- strcpy(eos(buf) - 8, "\82ª\82È\82¯\82ê\82Î");
+ strcpy(eos(buf) - strlen("\82É\82æ\82Á\82Ä"), "\82ª\82È\82¯\82ê\82Î");
you_have("\90ç\97¢\8aá\94\\97Í", buf);
#endif
}
BFlying = 0L;
if (Flying) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
enl_msg(You_, "would fly", "would have flown",
/* wording quibble: for past tense, "hadn't been"
would sound better than "weren't" (and
if ((armpro = magic_negation(&youmonst)) > 0) {
/* magic cancellation factor, conferred by worn armor */
static const char *const mc_types[] = {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
"" /*ordinary*/, "warded", "guarded", "protected",
#else
"" /*ordinary*/, "\89q\82ç\82ê\82Ä", "\8cì\82ç\82ê\82Ä", "\8eç\82ç\82ê\82Ä",
/*** Miscellany ***/
if (Luck) {
ltmp = abs((int) Luck);
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf, "%s%slucky",
ltmp >= 10 ? "extremely " : ltmp >= 5 ? "very " : "",
Luck < 0 ? "un" : "");
case 1:
break; /* just "are dead" */
default:
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf, " (%d%s time!)", u.umortality,
ordin(u.umortality));
#else
"Deities", FALSE);
*/
"\90_", FALSE);
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf2, deity_fmtstr, align_gname(A_CHAOTIC),
(u.ualignbase[A_ORIGINAL] == u.ualign.type
&& u.ualign.type == A_CHAOTIC) ? " (s,c)"
Sprintf(buf, fmtstr, "\8d¬\93×", buf2);
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, FALSE);
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf2, deity_fmtstr, align_gname(A_NEUTRAL),
(u.ualignbase[A_ORIGINAL] == u.ualign.type
&& u.ualign.type == A_NEUTRAL) ? " (s,c)"
Sprintf(buf, fmtstr, "\92\86\97§", buf2);
add_menu(tmpwin, NO_GLYPH, &any, 0, 0, ATR_NONE, buf, FALSE);
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf2, deity_fmtstr, align_gname(A_LAWFUL),
(u.ualignbase[A_ORIGINAL] == u.ualign.type
&& u.ualign.type == A_LAWFUL) ? " (s,c)"
if (u.utrap && u.utraptype == TT_PIT) {
struct trap *t = t_at(u.ux, u.uy);
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(bp, " in a %spit",
(t && t->ttyp == SPIKED_PIT) ? "spiked " : "");
#else
*/
you_have_never("\82 \82È\82½\82Í\91\95\94õ\82µ\82Ä\82¢\82é\95\90\8aí\82Å\8dU\8c\82\82µ");
} else if (wizard) {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf, "used a wielded weapon %ld time%s", u.uconduct.weaphit,
plur(u.uconduct.weaphit));
you_have_X(buf);
*/
you_have_never("\82 \82È\82½\82Í\8aè\82¢\8e\96\82ð\82µ");
} else {
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf, "used %ld wish%s", u.uconduct.wishes,
(u.uconduct.wishes > 1L) ? "es" : "");
#else
struct ext_func_tab extcmdlist[] = {
{ '#', "#", "perform an extended command",
doextcmd, IFBURIED | GENERALCMD },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('?'), "?", "list all extended commands",
#else
{ M('?'), "?", "\82±\82Ì\8ag\92£\83R\83}\83\93\83h\88ê\97\97\82ð\95\\8e¦\82·\82é",
#endif
doextlist, IFBURIED | AUTOCOMPLETE | GENERALCMD },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('a'), "adjust", "adjust inventory letters",
#else
{ M('a'), "adjust", "\8e\9d\82¿\95¨\88ê\97\97\82Ì\92²\90®",
#endif
doorganize, IFBURIED | AUTOCOMPLETE },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('A'), "annotate", "name current level",
#else
{ M('A'), "annotate", "\8c»\8dÝ\82Ì\8aK\82É\96¼\91O\82ð\82Â\82¯\82é",
#endif
donamelevel, IFBURIED | AUTOCOMPLETE },
+#if 0 /*JP*/
{ 'a', "apply", "apply (use) a tool (pick-axe, key, lamp...)",
+#else
+ { 'a', "apply", "\93¹\8bï\82ð\8eg\82¤\81D(\82Â\82é\82Í\82µ, \8c®, \83\89\83\93\83v\81c)",
+#endif
doapply },
{ C('x'), "attributes", "show your attributes",
doattributes, IFBURIED },
+#if 0 /*JP:T*/
{ '@', "autopickup", "toggle the pickup option on/off",
+#else
+ { '@', "autopickup", "\8e©\93®\8fE\82¢\83I\83v\83V\83\87\83\93\82ð\90Ø\82è\91Ö\82¦\82é",
+#endif
dotogglepickup, IFBURIED },
+#if 0 /*JP:T*/
{ 'C', "call", "call (name) something", docallcmd, IFBURIED },
+#else
+ { 'C', "call", "\96¼\91O\82ð\82Â\82¯\82é", docallcmd, IFBURIED },
+#endif
+#if 0 /*JP:T*/
{ 'Z', "cast", "zap (cast) a spell", docast, IFBURIED },
-#if 0 /*JP*/
+#else
+ { 'Z', "cast", "\8eô\95¶\82ð\8f¥\82¦\82é", docast, IFBURIED },
+#endif
+#if 0 /*JP:T*/
{ M('c'), "chat", "talk to someone", dotalk, IFBURIED | AUTOCOMPLETE },
#else
{ M('c'), "chat", "\92N\82©\82Æ\98b\82·", dotalk, IFBURIED | AUTOCOMPLETE },
#endif
+#if 0 /*JP:T*/
{ 'c', "close", "close a door", doclose },
-#if 0 /*JP*/
+#else
+ { 'c', "close", "\83h\83A\82ð\95Â\82ß\82é", doclose },
+#endif
+#if 0 /*JP:T*/
{ M('C'), "conduct", "list voluntary challenges you have maintained",
#else
{ M('C'), "conduct", "\82Ç\82¤\82¢\82¤\8ds\93®\82ð\82Æ\82Á\82½\82©\8c©\82é",
#endif
doconduct, IFBURIED | AUTOCOMPLETE },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('d'), "dip", "dip an object into something", dodip, AUTOCOMPLETE },
#else
{ M('d'), "dip", "\89½\82©\82É\95¨\82ð\90Z\82·", dodip, AUTOCOMPLETE },
{ 'D', "droptype", "drop specific item types", doddrop },
{ 'e', "eat", "eat something", doeat },
{ 'E', "engrave", "engrave writing on the floor", doengrave },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('e'), "enhance", "advance or check weapon and spell skills",
#else
{ M('e'), "enhance", "\95\90\8aí\8fn\97û\93x\82ð\8d\82\82ß\82é",
#endif
enhance_weapon_skill, IFBURIED | AUTOCOMPLETE },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ '\0', "exploremode", "enter explore (discovery) mode",
#else
{ '\0', "exploremode", "\92T\8c\9f(\94\8c©)\83\82\81[\83h\82É\93ü\82é",
#endif
enter_explore_mode, IFBURIED },
{ 'f', "fire", "fire ammunition from quiver", dofire },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('f'), "force", "force a lock", doforce, AUTOCOMPLETE },
#else
{ M('f'), "force", "\8c®\82ð\82±\82¶\82 \82¯\82é", doforce, AUTOCOMPLETE },
{ 'i', "inventory", "show your inventory", ddoinv, IFBURIED },
{ 'I', "inventtype", "inventory specific item types",
dotypeinv, IFBURIED },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('i'), "invoke", "invoke an object's special powers",
#else
{ M('i'), "invoke", "\95¨\82Ì\93Á\95Ê\82È\97Í\82ð\8eg\82¤",
#endif
doinvoke, IFBURIED | AUTOCOMPLETE },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('j'), "jump", "jump to another location", dojump, AUTOCOMPLETE },
#else
{ M('j'), "jump", "\91¼\82Ì\88Ê\92u\82É\94ò\82Ñ\82¤\82Â\82é", dojump, AUTOCOMPLETE },
dodiscovered, IFBURIED | GENERALCMD },
{ '`', "knownclass", "show discovered types for one class of objects",
doclassdisco, IFBURIED | GENERALCMD },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ '\0', "levelchange", "change experience level",
#else
{ '\0', "levelchange", "\8co\8c±\83\8c\83x\83\8b\82ð\95Ï\82¦\82é",
#endif
wiz_level_change, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ '\0', "lightsources", "show mobile light sources",
#else
{ '\0', "lightsources", "\88Ú\93®\8cõ\8c¹\82ð\8c©\82é",
#endif
wiz_light_sources, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
{ ':', "look", "look at what is here", dolook, IFBURIED },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('l'), "loot", "loot a box on the floor", doloot, AUTOCOMPLETE },
#else
{ M('l'), "loot", "\8f°\82Ì\8fã\82Ì\94 \82ð\8aJ\82¯\82é", doloot, AUTOCOMPLETE },
#endif
#ifdef DEBUG_MIGRATING_MONS
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ '\0', "migratemons", "migrate N random monsters",
#else
{ '\0', "migratemons", "\83\89\83\93\83_\83\80\82È\89ö\95¨\82ð\89½\91Ì\82©\88Ú\8fZ\82³\82¹\82é",
#endif
wiz_migrate_mons, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
#endif
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('m'), "monster", "use monster's special ability",
#else
{ M('m'), "monster", "\89ö\95¨\82Ì\93Á\95Ê\94\\97Í\82ð\8eg\82¤",
#endif
domonability, IFBURIED | AUTOCOMPLETE },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ 'N', "name", "name a monster or an object",
#else
{ 'N', "name", "\83A\83C\83e\83\80\82â\95¨\82É\96¼\91O\82ð\82Â\82¯\82é",
#endif
docallcmd, IFBURIED | AUTOCOMPLETE },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('o'), "offer", "offer a sacrifice to the gods",
#else
{ M('o'), "offer", "\90_\82É\8b\9f\95¨\82ð\95ù\82°\82é",
{ 'o', "open", "open a door", doopen },
{ 'O', "options", "show option settings, possibly change them",
doset, IFBURIED | GENERALCMD },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ C('o'), "overview", "show a summary of the explored dungeon",
#else
{ C('o'), "overview", "\92T\8dõ\82µ\82½\96À\8b{\82Ì\8aT\97v\82ð\95\\8e¦\82·\82é",
#endif
dooverview, IFBURIED | AUTOCOMPLETE },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ '\0', "panic", "test panic routine (fatal to game)",
#else
{ '\0', "panic", "\83p\83j\83b\83N\83\8b\81[\83`\83\93\82ð\83e\83X\83g\82·\82é(\92v\96½\93I)",
wiz_panic, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
{ 'p', "pay", "pay your shopping bill", dopay },
{ ',', "pickup", "pick up things at the current location", dopickup },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ '\0', "polyself", "polymorph self",
#else
{ '\0', "polyself", "\95Ï\89»\82·\82é",
#endif
wiz_polyself, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('p'), "pray", "pray to the gods for help",
#else
{ M('p'), "pray", "\90_\82É\8bF\82é",
doprev_message, IFBURIED | GENERALCMD },
{ 'P', "puton", "put on an accessory (ring, amulet, etc)", doputon },
{ 'q', "quaff", "quaff (drink) something", dodrink },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('q'), "quit", "exit without saving current game",
#else
{ M('q'), "quit", "\83Z\81[\83u\82µ\82È\82¢\82Å\8fI\97¹",
{ 'r', "read", "read a scroll or spellbook", doread },
{ C('r'), "redraw", "redraw screen", doredraw, IFBURIED | GENERALCMD },
{ 'R', "remove", "remove an accessory (ring, amulet, etc)", doremring },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('R'), "ride", "mount or dismount a saddled steed",
#else
{ M('R'), "ride", "\89ö\95¨\82É\8fæ\82é(\82Ü\82½\82Í\8d~\82è\82é)",
#endif
doride, AUTOCOMPLETE },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('r'), "rub", "rub a lamp or a stone", dorub, AUTOCOMPLETE },
#else
{ M('r'), "rub", "\83\89\83\93\83v\82ð\82±\82·\82é", dorub, AUTOCOMPLETE },
#endif
{ 'S', "save", "save the game and exit", dosave, IFBURIED | GENERALCMD },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ 's', "search", "search for traps and secret doors",
dosearch, IFBURIED, "searching" },
#else
{ ARMOR_SYM, "seearmor", "show the armor currently worn",
doprarm, IFBURIED },
{ GOLD_SYM, "seegold", "count your gold", doprgold, IFBURIED },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ '\0', "seenv", "show seen vectors",
#else
{ '\0', "seenv", "\8e\8b\90ü\83x\83N\83g\83\8b\82ð\8c©\82é",
| CMD_NOT_AVAILABLE
#endif /* SHELL */
},
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('s'), "sit", "sit down", dosit, AUTOCOMPLETE },
#else
{ M('s'), "sit", "\8dÀ\82é", dosit, AUTOCOMPLETE },
#endif
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ '\0', "stats", "show memory statistics",
#else
{ '\0', "stats", "\83\81\83\82\83\8a\8fó\91Ô\82ð\8c©\82é",
{ 'T', "takeoff", "take off one piece of armor", dotakeoff },
{ 'A', "takeoffall", "remove all armor", doddoremarm },
{ C('t'), "teleport", "teleport around the level", dotelecmd, IFBURIED },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ '\0', "terrain", "show map without obstructions",
#else
{ '\0', "terrain", "\8e×\96\82\82³\82ê\82¸\82É\92n\90}\82ð\8c©\82é",
"menu of commands you can do from here to adjacent spot",
dotherecmdmenu },
{ 't', "throw", "throw something", dothrow },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ '\0', "timeout", "look at timeout queue and hero's timed intrinsics",
#else
{ '\0', "timeout", "\8e\9e\8aÔ\90Ø\82ê\83L\83\85\81[\82Æ\83v\83\8c\83C\83\84\81[\82Ì\8e\9e\8aÔ\8co\89ß\82ð\8c©\82é",
#endif
wiz_timeout_queue, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('T'), "tip", "empty a container", dotip, AUTOCOMPLETE },
#else
{ M('T'), "tip", "\93ü\82ê\95¨\82ð\8bó\82É\82·\82é", dotip, AUTOCOMPLETE },
#endif
{ '_', "travel", "travel to a specific location on the map", dotravel },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('t'), "turn", "turn undead away", doturn, IFBURIED | AUTOCOMPLETE },
#else
{ M('t'), "turn", "\83A\83\93\83f\83b\83g\82ð\93y\82É\95Ô\82·", doturn, IFBURIED | AUTOCOMPLETE },
#endif
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ 'X', "twoweapon", "toggle two-weapon combat",
#else
{ 'X', "twoweapon", "\97¼\8eè\8e\9d\82¿\82Ì\90Ø\82è\91Ö\82¦",
#endif
dotwoweapon, AUTOCOMPLETE },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('u'), "untrap", "untrap something", dountrap, AUTOCOMPLETE },
#else
{ M('u'), "untrap", "ã©\82ð\82Í\82¸\82·", dountrap, AUTOCOMPLETE },
#endif
{ '<', "up", "go up a staircase", doup },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ '\0', "vanquished", "list vanquished monsters",
#else
{ '\0', "vanquished", "\93|\82µ\82½\89ö\95¨\82Ì\88ê\97\97\82ð\8c©\82é",
#endif
dovanquished, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
{ M('v'), "version",
-#if 0 /*JP*/
+#if 0 /*JP:T*/
"list compile time options for this version of NetHack",
#else
"\83R\83\93\83p\83C\83\8b\8e\9e\82Ì\83I\83v\83V\83\87\83\93\82ð\95\\8e¦\82·\82é",
#endif
doextversion, IFBURIED | AUTOCOMPLETE | GENERALCMD },
{ 'v', "versionshort", "show version", doversion, IFBURIED | GENERALCMD },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ '\0', "vision", "show vision array",
#else
{ '\0', "vision", "\8e\8b\8aE\94z\97ñ\82ð\8c©\82é",
#endif
wiz_show_vision, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ '.', "wait", "rest one move while doing nothing",
donull, IFBURIED, "waiting" },
#else
{ '/', "whatis", "show what type of thing a symbol corresponds to",
dowhatis, IFBURIED | GENERALCMD },
{ 'w', "wield", "wield (put in use) a weapon", dowield },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ M('w'), "wipe", "wipe off your face", dowipe, AUTOCOMPLETE },
#else
{ M('w'), "wipe", "\8aç\82ð\90@\82¤", dowipe, AUTOCOMPLETE },
#endif
#ifdef DEBUG
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ '\0', "wizbury", "bury objs under and around you",
#else
{ '\0', "wizbury", "\95¨\82ð\82 \82È\82½\82Ì\8eü\82è\82É\96\84\82ß\82é",
wiz_makemap, IFBURIED | WIZMODECMD },
{ C('f'), "wizmap", "map the level",
wiz_map, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ '\0', "wizrumorcheck", "verify rumor boundaries",
#else
{ '\0', "wizrumorcheck", "\89\\82Ì\8b«\8aE\82ð\8c\9f\8fØ\82·\82é",
#endif
wiz_rumor_check, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ '\0', "wizsmell", "smell monster",
#else
{ '\0', "wizsmell", "\89ö\95¨\82Ì\93õ\82¢\82ð\9ak\82®",
wiz_where, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
{ C('w'), "wizwish", "wish for something",
wiz_wish, IFBURIED | AUTOCOMPLETE | WIZMODECMD },
-#if 0 /*JP*/
+#if 0 /*JP:T*/
{ '\0', "wmode", "show wall modes",
#else
{ '\0', "wmode", "\95Ç\83\82\81[\83h\82ð\8c©\82é",
{ '\0', (char *) 0, (char *) 0, donull, 0, (char *) 0 } /* sentinel */
};
+/* for key2extcmddesc() to support dowhatdoes() */
+struct movcmd {
+ uchar k1, k2, k3, k4; /* 'normal', 'qwertz', 'numpad', 'phone' */
+ const char *txt, *alt; /* compass direction, screen direction */
+};
+static const struct movcmd movtab[] = {
+ { 'h', 'h', '4', '4', "west", "left" },
+ { 'j', 'j', '2', '8', "south", "down" },
+ { 'k', 'k', '8', '2', "north", "up" },
+ { 'l', 'l', '6', '6', "east", "right" },
+ { 'b', 'b', '1', '7', "southwest", "lower left" },
+ { 'n', 'n', '3', '9', "southeast", "lower right" },
+ { 'u', 'u', '9', '3', "northeast", "upper right" },
+ { 'y', 'z', '7', '1', "northwest", "upper left" },
+ { 0, 0, 0, 0, (char *) 0, (char *) 0 }
+};
+
int extcmdlist_length = SIZE(extcmdlist) - 1;
const char *
key2extcmddesc(key)
uchar key;
{
- if (Cmd.commands[key] && Cmd.commands[key]->ef_txt)
- return Cmd.commands[key]->ef_desc;
+ static char key2cmdbuf[48];
+ const struct movcmd *mov;
+ int k, c;
+ uchar M_5 = (uchar) M('5'), M_0 = (uchar) M('0');
+
+ /* need to check for movement commands before checking the extended
+ commands table because it contains entries for number_pad commands
+ that match !number_pad movement (like 'j' for "jump") */
+ key2cmdbuf[0] = '\0';
+ if (movecmd(k = key))
+ Strcpy(key2cmdbuf, "move"); /* "move or attack"? */
+ else if (movecmd(k = unctrl(key)))
+ Strcpy(key2cmdbuf, "rush");
+ else if (movecmd(k = (Cmd.num_pad ? unmeta(key) : lowc(key))))
+ Strcpy(key2cmdbuf, "run");
+ if (*key2cmdbuf) {
+ for (mov = &movtab[0]; mov->k1; ++mov) {
+ c = !Cmd.num_pad ? (!Cmd.swap_yz ? mov->k1 : mov->k2)
+ : (!Cmd.phone_layout ? mov->k3 : mov->k4);
+ if (c == k) {
+ Sprintf(eos(key2cmdbuf), " %s (screen %s)",
+ mov->txt, mov->alt);
+ return key2cmdbuf;
+ }
+ }
+ } else if (digit(key) || (Cmd.num_pad && digit(unmeta(key)))) {
+ key2cmdbuf[0] = '\0';
+ if (!Cmd.num_pad)
+ Strcpy(key2cmdbuf, "start of, or continuation of, a count");
+ else if (key == '5' || key == M_5)
+ Sprintf(key2cmdbuf, "%s prefix",
+ (!!Cmd.pcHack_compat ^ (key == M_5)) ? "run" : "rush");
+ else if (key == '0' || (Cmd.pcHack_compat && key == M_0))
+ Strcpy(key2cmdbuf, "synonym for 'i'");
+ if (*key2cmdbuf)
+ return key2cmdbuf;
+ }
+ if (Cmd.commands[key]) {
+ if (Cmd.commands[key]->ef_txt)
+ return Cmd.commands[key]->ef_desc;
+
+ }
return (char *) 0;
}
datawin = create_nhwindow(NHW_TEXT);
putstr(datawin, 0, "");
+/*JP
putstr(datawin, 0, " Full Current Key Bindings List");
+*/
+ putstr(datawin, 0, " \8c»\8dÝ\82Ì\8a®\91S\82È\83L\81[\8a\84\82è\93\96\82Ä\88ê\97\97");
/* directional keys */
putstr(datawin, 0, "");
+/*JP
putstr(datawin, 0, "Directional keys:");
+*/
+ putstr(datawin, 0, "\95û\8cü\83L\81[:");
show_direction_keys(datawin, '.', FALSE); /* '.'==self in direction grid */
keys_used[(uchar) Cmd.move_NW] = keys_used[(uchar) Cmd.move_N]
= keys_used[(uchar) C(Cmd.move_S)]
= keys_used[(uchar) C(Cmd.move_SE)] = TRUE;
putstr(datawin, 0, "");
+#if 0 /*JP:T*/
putstr(datawin, 0,
"Shift-<direction> will move in specified direction until you hit");
putstr(datawin, 0, " a wall or run into something.");
+#else
+ putstr(datawin, 0,
+ "Shift-<\95û\8cü> \82Í\81A\95Ç\82É\82Ô\82Â\82©\82é\82©\89½\82©\82ª\82 \82é\82Ü\82Å\8ew\92è\82³\82ê\82½\95û\8cü\82É");
+ putstr(datawin, 0, " \88Ú\93®\82·\82é\81D");
+#endif
+#if 0 /*JP:T*/
putstr(datawin, 0,
"Ctrl-<direction> will run in specified direction until something");
putstr(datawin, 0, " very interesting is seen.");
+#else
+ putstr(datawin, 0,
+ "Ctrl-<\95û\8cü> \82Í\81A\89½\82©\8b»\96¡\90[\82¢\82à\82Ì\82ª\8c©\82¦\82é\82Ü\82Å\8ew\92è\82³\82ê\82½\95û\8cü\82É");
+ putstr(datawin, 0, " \88Ú\93®\82·\82é\81D");
+#endif
}
putstr(datawin, 0, "");
+/*JP
putstr(datawin, 0, "Miscellaneous keys:");
+*/
+ putstr(datawin, 0, "\97l\81X\82È\83L\81[:");
for (i = 0; misc_keys[i].desc; i++) {
key = Cmd.spkeys[misc_keys[i].nhkf];
if (key && ((misc_keys[i].numpad && iflags.num_pad)
if (dokeylist_putcmds(datawin, TRUE, GENERALCMD, WIZMODECMD, keys_used)) {
putstr(datawin, 0, "");
+/*JP
putstr(datawin, 0, "General commands:");
+*/
+ putstr(datawin, 0, "\88ê\94Ê\83R\83}\83\93\83h:");
(void) dokeylist_putcmds(datawin, FALSE, GENERALCMD, WIZMODECMD,
keys_used);
}
if (dokeylist_putcmds(datawin, TRUE, 0, WIZMODECMD, keys_used)) {
putstr(datawin, 0, "");
+/*JP
putstr(datawin, 0, "Game commands:");
+*/
+ putstr(datawin, 0, "\83Q\81[\83\80\83R\83}\83\93\83h:");
(void) dokeylist_putcmds(datawin, FALSE, 0, WIZMODECMD, keys_used);
}
if (wizard
&& dokeylist_putcmds(datawin, TRUE, WIZMODECMD, 0, keys_used)) {
putstr(datawin, 0, "");
+/*JP
putstr(datawin, 0, "Wizard-mode commands:");
+*/
+ putstr(datawin, 0, "\83E\83B\83U\81[\83h\83\82\81[\83h\83R\83}\83\93\83h:");
(void) dokeylist_putcmds(datawin, FALSE, WIZMODECMD, 0, keys_used);
}
}
#endif
-#define unctrl(c) ((c) <= C('z') ? (0x60 | (c)) : (c))
-#define unmeta(c) (0x7f & (c))
-
struct {
int nhkf;
char key;
char
randomkey()
{
- static int i = 0;
+ static unsigned i = 0;
char c;
- switch (rn2(12)) {
- default: c = '\033'; break;
- case 0: c = '\n'; break;
+ switch (rn2(16)) {
+ default:
+ c = '\033';
+ break;
+ case 0:
+ c = '\n';
+ break;
case 1:
case 2:
case 3:
- case 4: c = (char)(' ' + rn2((int)('~' - ' '))); break;
- case 5: c = '\t'; break;
- case 6: c = (char)('a' + rn2((int)('z' - 'a'))); break;
- case 7: c = (char)('A' + rn2((int)('Z' - 'A'))); break;
- case 8: c = extcmdlist[(i++) % SIZE(extcmdlist)].key; break;
- case 9: c = '#'; break;
+ case 4:
+ c = (char) rn1('~' - ' ' + 1, ' ');
+ break;
+ case 5:
+ c = (char) (rn2(2) ? '\t' : ' ');
+ break;
+ case 6:
+ c = (char) rn1('z' - 'a' + 1, 'a');
+ break;
+ case 7:
+ c = (char) rn1('Z' - 'A' + 1, 'A');
+ break;
+ case 8:
+ c = extcmdlist[i++ % SIZE(extcmdlist)].key;
+ break;
+ case 9:
+ c = '#';
+ break;
+ case 10:
+ case 11:
+ case 12:
+ c = Cmd.dirchars[rn2(8)];
+ if (!rn2(7))
+ c = !Cmd.num_pad ? (!rn2(3) ? C(c) : (c + 'A' - 'a')) : M(c);
+ break;
+ case 13:
+ c = (char) rn1('9' - '0' + 1, '0');
+ break;
+ case 14:
+ /* any char, but avoid '\0' because it's used for mouse click */
+ c = (char) rnd(iflags.wc_eight_bit_input ? 255 : 127);
+ break;
}
return c;
char dirsym;
int is_mov;
-retry:
+ retry:
if (in_doagain || *readchar_queue)
dirsym = readchar();
else
* general message if it's on.
*/
dothat = "do that";
+#if 0 /*JP*/
how = " at"; /* for "<action> at yourself"; not used for up/down */
+#else
+ how = "";
+#endif
switch (spkey) {
case NHKF_NOPICKUP:
+#if 0 /*JP*/
dothat = "move";
+#else
+ dothat = "\88Ú\93®\82·\82é";
+#endif
break;
case NHKF_RUSH:
+#if 0 /*JP*/
dothat = "rush";
+#else
+ dothat = "\93Ë\90i\82·\82é";
+#endif
break;
case NHKF_RUN2:
if (!Cmd.num_pad)
/*FALLTHRU*/
case NHKF_RUN:
case NHKF_RUN_NOPICKUP:
+#if 0 /*JP*/
dothat = "run";
+#else
+ dothat = "\91\96\82é";
+#endif
break;
case NHKF_FIGHT2:
if (!Cmd.num_pad)
break;
/*FALLTHRU*/
case NHKF_FIGHT:
+#if 0 /*JP*/
dothat = "fight";
+#else
+ dothat = "\90í\82¤";
+#endif
how = ""; /* avoid "fight at yourself" */
break;
default:
if (prefixhandling
&& (sym == Cmd.spkeys[NHKF_GETDIR_SELF]
|| (Cmd.num_pad && sym == Cmd.spkeys[NHKF_GETDIR_SELF2]))) {
+/*JP
Sprintf(buf, "You can't %s%s yourself.", dothat, how);
+*/
+ Sprintf(buf, "\8e©\95ª\8e©\90g\82É%s%s\82±\82Æ\82Í\82Å\82«\82È\82¢\81D", dothat, how);
/* for movement prefix followed by up or down */
} else if (prefixhandling && (sym == '<' || sym == '>')) {
+#if 0 /*JP*/
Sprintf(buf, "You can't %s %s.", dothat,
/* was "upwards" and "downwards", but they're considered
to be variants of canonical "upward" and "downward" */
(sym == '<') ? "upward" : "downward");
+#else
+ Sprintf(buf, "%s%s\82±\82Æ\82Í\82Å\82«\82È\82¢\81D",
+ (sym == '<') ? "\8fã\95û\8cü\82É" : "\89º\95û\8cü\82É", dothat);
+#endif
}
/* if '!cmdassist', display via pline() and we're done (note: asking
if (!viawindow) {
if (prefixhandling) {
if (!*buf)
+#if 0 /*JP*/
Sprintf(buf, "Invalid direction for '%s' prefix.",
visctrl(Cmd.spkeys[spkey]));
+#else
+ Sprintf(buf, "'%s'\90Ú\93ª\8e«\82É\82Í\95s\90³\82È\95û\8cü\81D",
+ visctrl(Cmd.spkeys[spkey]));
+#endif
pline("%s", buf);
return TRUE;
}
}
}
-#if 0 /*JP*/
+#if 0 /*JP:T*/
Sprintf(buf, "Valid direction keys%s%s%s are:",
prefixhandling ? " to " : "", prefixhandling ? dothat : "",
NODIAG(u.umonnum) ? " in your current form" : "");
#else
- Sprintf(buf, "%s%s%s\82Å\82Ì\97L\8cø\82È\95û\8cü\8ew\92è\82Í:",
- prefixhandling ? " to " : "", prefixhandling ? dothat : "",
- NODIAG(u.umonnum) ? " in your current form" : "");
+ Sprintf(buf, "%s%s%s\97L\8cø\82È\95û\8cü\8ew\92è\82Í:",
+ prefixhandling ? dothat : "", prefixhandling ? "\82½\82ß\82Ì" : "",
+ NODIAG(u.umonnum) ? " \8c»\8dÝ\82Ì\8ep\82Å\82Ì" : "");
#endif
putstr(win, 0, buf);
show_direction_keys(win, !prefixhandling ? '.' : ' ', NODIAG(u.umonnum));
given but we include up and down for 'm'+invalid_direction;
self is excluded as a viable direction for every prefix */
putstr(win, 0, "");
+/*JP
putstr(win, 0, " < up");
+*/
+ putstr(win, 0, " < \8fã");
+/*JP
putstr(win, 0, " > down");
+*/
+ putstr(win, 0, " > \89º");
if (!prefixhandling) {
int selfi = Cmd.num_pad ? NHKF_GETDIR_SELF2 : NHKF_GETDIR_SELF;
+#if 0 /*JP:T*/
Sprintf(buf, " %4s direct at yourself",
visctrl(Cmd.spkeys[selfi]));
+#else
+ Sprintf(buf, " %4s \8e©\95ª\82É\8cü\82¯\82é",
+ visctrl(Cmd.spkeys[selfi]));
+#endif
putstr(win, 0, buf);
}
}
#ifdef NOSAVEONHANGUP
#ifdef INSURANCE
if (flags.ins_chkpt && program_state.something_worth_saving)
- program_statue.preserve_locks = 1; /* keep files for recovery */
+ program_state.preserve_locks = 1; /* keep files for recovery */
#endif
program_state.something_worth_saving = 0; /* don't save */
#endif
to give the go-ahead for this query; default is "no" unless the
ParanoidConfirm flag is set in which case there's no default */
if (be_paranoid) {
- char qbuf[QBUFSZ], ans[BUFSZ] = DUMMY;
- const char *promptprefix = "", *responsetype = ParanoidConfirm
- ? "(yes|no)"
- : "(yes) [no]";
- int trylimit = 6; /* 1 normal, 5 more with "Yes or No:" prefix */
+ char pbuf[BUFSZ], qbuf[QBUFSZ], ans[BUFSZ];
+ const char *promptprefix = "",
+ *responsetype = ParanoidConfirm ? "(yes|no)" : "(yes) [no]";
+ int k, trylimit = 6; /* 1 normal, 5 more with "Yes or No:" prefix */
+ copynchars(pbuf, prompt, BUFSZ - 1);
/* in addition to being paranoid about this particular
query, we might be even more paranoid about all paranoia
responses (ie, ParanoidConfirm is set) in which case we
require "no" to reject in addition to "yes" to confirm
(except we won't loop if response is ESC; it means no) */
do {
- Sprintf(qbuf, "%s%s %s", promptprefix, prompt, responsetype);
+ /* make sure we won't overflow a QBUFSZ sized buffer */
+ k = (int) (strlen(promptprefix) + 1 + strlen(responsetype));
+ if ((int) strlen(pbuf) + k > QBUFSZ - 1) {
+ /* chop off some at the end */
+ Strcpy(pbuf + (QBUFSZ - 1) - k - 4, "...?"); /* -4: "...?" */
+ }
+
+ Sprintf(qbuf, "%s%s %s", promptprefix, pbuf, responsetype);
+ *ans = '\0';
getlin(qbuf, ans);
(void) mungspaces(ans);
confirmed_ok = !strcmpi(ans, "yes");