Merge branch 'NetHack-3.7' into paxed-lua-v2-merged
This commit is contained in:
+2
-1
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 extern.h $NHDT-Date: 1573290414 2019/11/09 09:06:54 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.736 $ */
|
/* NetHack 3.6 extern.h $NHDT-Date: 1573346164 2019/11/10 00:36:04 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.738 $ */
|
||||||
/* Copyright (c) Steve Creps, 1988. */
|
/* Copyright (c) Steve Creps, 1988. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -476,6 +476,7 @@ E int NDECL(Helmet_on);
|
|||||||
E int FDECL(select_off, (struct obj *));
|
E int FDECL(select_off, (struct obj *));
|
||||||
E int NDECL(take_off);
|
E int NDECL(take_off);
|
||||||
#endif
|
#endif
|
||||||
|
E const char *FDECL(fingers_or_gloves, (BOOLEAN_P));
|
||||||
E void FDECL(off_msg, (struct obj *));
|
E void FDECL(off_msg, (struct obj *));
|
||||||
E void FDECL(set_wear, (struct obj *));
|
E void FDECL(set_wear, (struct obj *));
|
||||||
E boolean FDECL(donning, (struct obj *));
|
E boolean FDECL(donning, (struct obj *));
|
||||||
|
|||||||
+5
-8
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 apply.c $NHDT-Date: 1573290415 2019/11/09 09:06:55 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.282 $ */
|
/* NetHack 3.6 apply.c $NHDT-Date: 1573346182 2019/11/10 00:36:22 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.283 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -2277,20 +2277,19 @@ struct obj *obj;
|
|||||||
|
|
||||||
if (Glib) {
|
if (Glib) {
|
||||||
pline("%s from your %s.", Tobjnam(obj, "slip"),
|
pline("%s from your %s.", Tobjnam(obj, "slip"),
|
||||||
makeplural(body_part(FINGER)));
|
fingers_or_gloves(FALSE));
|
||||||
dropx(obj);
|
dropx(obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (obj->spe > 0) {
|
if (obj->spe > 0) {
|
||||||
const char *fingers_or_gloves;
|
|
||||||
int oldglib;
|
int oldglib;
|
||||||
|
|
||||||
if ((obj->cursed || Fumbling) && !rn2(2)) {
|
if ((obj->cursed || Fumbling) && !rn2(2)) {
|
||||||
consume_obj_charge(obj, TRUE);
|
consume_obj_charge(obj, TRUE);
|
||||||
|
|
||||||
pline("%s from your %s.", Tobjnam(obj, "slip"),
|
pline("%s from your %s.", Tobjnam(obj, "slip"),
|
||||||
makeplural(body_part(FINGER)));
|
fingers_or_gloves(FALSE));
|
||||||
dropx(obj);
|
dropx(obj);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -2301,8 +2300,6 @@ struct obj *obj;
|
|||||||
return;
|
return;
|
||||||
consume_obj_charge(obj, TRUE);
|
consume_obj_charge(obj, TRUE);
|
||||||
|
|
||||||
fingers_or_gloves = !uarmg ? makeplural(body_part(FINGER))
|
|
||||||
: gloves_simple_name(uarmg);
|
|
||||||
oldglib = (int) (Glib & TIMEOUT);
|
oldglib = (int) (Glib & TIMEOUT);
|
||||||
if (otmp != &cg.zeroobj) {
|
if (otmp != &cg.zeroobj) {
|
||||||
You("cover %s with a thick layer of grease.", yname(otmp));
|
You("cover %s with a thick layer of grease.", yname(otmp));
|
||||||
@@ -2310,11 +2307,11 @@ struct obj *obj;
|
|||||||
if (obj->cursed && !nohands(g.youmonst.data)) {
|
if (obj->cursed && !nohands(g.youmonst.data)) {
|
||||||
make_glib(oldglib + rn1(6, 10)); /* + 10..15 */
|
make_glib(oldglib + rn1(6, 10)); /* + 10..15 */
|
||||||
pline("Some of the grease gets all over your %s.",
|
pline("Some of the grease gets all over your %s.",
|
||||||
fingers_or_gloves);
|
fingers_or_gloves(TRUE));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
make_glib(oldglib + rn1(11, 5)); /* + 5..15 */
|
make_glib(oldglib + rn1(11, 5)); /* + 5..15 */
|
||||||
You("coat your %s with grease.", fingers_or_gloves);
|
You("coat your %s with grease.", fingers_or_gloves(TRUE));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (obj->known)
|
if (obj->known)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 cmd.c $NHDT-Date: 1573290415 2019/11/09 09:06:55 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.348 $ */
|
/* NetHack 3.6 cmd.c $NHDT-Date: 1573346187 2019/11/10 00:36:27 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.349 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -2551,9 +2551,7 @@ int final;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (Glib) {
|
if (Glib) {
|
||||||
Sprintf(buf, "slippery %s",
|
Sprintf(buf, "slippery %s", fingers_or_gloves(TRUE));
|
||||||
!uarmg ? makeplural(body_part(FINGER))
|
|
||||||
: gloves_simple_name(uarmg));
|
|
||||||
if (wizard)
|
if (wizard)
|
||||||
Sprintf(eos(buf), " (%ld)", (Glib & TIMEOUT));
|
Sprintf(eos(buf), " (%ld)", (Glib & TIMEOUT));
|
||||||
you_have(buf, "");
|
you_have(buf, "");
|
||||||
|
|||||||
+35
-9
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 do_wear.c $NHDT-Date: 1573290416 2019/11/09 09:06:56 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.112 $ */
|
/* NetHack 3.6 do_wear.c $NHDT-Date: 1573346188 2019/11/10 00:36:28 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.113 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -44,6 +44,16 @@ static int FDECL(accessory_or_armor_on, (struct obj *));
|
|||||||
static void FDECL(already_wearing, (const char *));
|
static void FDECL(already_wearing, (const char *));
|
||||||
static void FDECL(already_wearing2, (const char *, const char *));
|
static 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
|
void
|
||||||
off_msg(otmp)
|
off_msg(otmp)
|
||||||
struct obj *otmp;
|
struct obj *otmp;
|
||||||
@@ -1533,7 +1543,15 @@ struct obj *otmp;
|
|||||||
boolean use_plural = (is_boots(otmp) || is_gloves(otmp)
|
boolean use_plural = (is_boots(otmp) || is_gloves(otmp)
|
||||||
|| otmp->otyp == LENSES || otmp->quan > 1L);
|
|| otmp->otyp == LENSES || otmp->quan > 1L);
|
||||||
|
|
||||||
You("can't. %s cursed.", use_plural ? "They are" : "It is");
|
/* 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)))
|
||||||
|
pline("Despite your slippery %s, you can't.",
|
||||||
|
fingers_or_gloves(TRUE));
|
||||||
|
else
|
||||||
|
You("can't. %s cursed.", use_plural ? "They are" : "It is");
|
||||||
set_bknown(otmp, 1);
|
set_bknown(otmp, 1);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -1745,7 +1763,7 @@ boolean noisy;
|
|||||||
gloved fingers */
|
gloved fingers */
|
||||||
if (noisy)
|
if (noisy)
|
||||||
Your("%s are too slippery to pull on %s.",
|
Your("%s are too slippery to pull on %s.",
|
||||||
makeplural(body_part(FINGER)), gloves_simple_name(otmp));
|
fingers_or_gloves(FALSE), gloves_simple_name(otmp));
|
||||||
err++;
|
err++;
|
||||||
} else
|
} else
|
||||||
*mask = W_ARMG;
|
*mask = W_ARMG;
|
||||||
@@ -1844,7 +1862,7 @@ struct obj *obj;
|
|||||||
if (uleft && uright) {
|
if (uleft && uright) {
|
||||||
There("are no more %s%s to fill.",
|
There("are no more %s%s to fill.",
|
||||||
humanoid(g.youmonst.data) ? "ring-" : "",
|
humanoid(g.youmonst.data) ? "ring-" : "",
|
||||||
makeplural(body_part(FINGER)));
|
fingers_or_gloves(FALSE));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (uleft) {
|
if (uleft) {
|
||||||
@@ -2035,7 +2053,7 @@ doputon()
|
|||||||
/* 'P' message doesn't mention armor */
|
/* 'P' message doesn't mention armor */
|
||||||
Your("%s%s are full, and you're already wearing an amulet and %s.",
|
Your("%s%s are full, and you're already wearing an amulet and %s.",
|
||||||
humanoid(g.youmonst.data) ? "ring-" : "",
|
humanoid(g.youmonst.data) ? "ring-" : "",
|
||||||
makeplural(body_part(FINGER)),
|
fingers_or_gloves(FALSE),
|
||||||
(ublindf->otyp == LENSES) ? "some lenses" : "a blindfold");
|
(ublindf->otyp == LENSES) ? "some lenses" : "a blindfold");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@@ -2105,7 +2123,7 @@ glibr()
|
|||||||
/* changed so cursed rings don't fall off, GAN 10/30/86 */
|
/* changed so cursed rings don't fall off, GAN 10/30/86 */
|
||||||
Your("%s off your %s.",
|
Your("%s off your %s.",
|
||||||
(leftfall && rightfall) ? "rings slip" : "ring slips",
|
(leftfall && rightfall) ? "rings slip" : "ring slips",
|
||||||
(leftfall && rightfall) ? makeplural(body_part(FINGER))
|
(leftfall && rightfall) ? fingers_or_gloves(FALSE)
|
||||||
: body_part(FINGER));
|
: body_part(FINGER));
|
||||||
xfl++;
|
xfl++;
|
||||||
if (leftfall) {
|
if (leftfall) {
|
||||||
@@ -2227,6 +2245,10 @@ int otyp;
|
|||||||
return uarmg;
|
return uarmg;
|
||||||
if (ring->cursed)
|
if (ring->cursed)
|
||||||
return ring;
|
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 */
|
/* either no ring or not right type or nothing prevents its removal */
|
||||||
return (struct obj *) 0;
|
return (struct obj *) 0;
|
||||||
@@ -2255,17 +2277,21 @@ register struct obj *otmp;
|
|||||||
|
|
||||||
/* special ring checks */
|
/* special ring checks */
|
||||||
if (otmp == uright || otmp == uleft) {
|
if (otmp == uright || otmp == uleft) {
|
||||||
|
struct obj glibdummy;
|
||||||
|
|
||||||
if (nolimbs(g.youmonst.data)) {
|
if (nolimbs(g.youmonst.data)) {
|
||||||
pline_The("ring is stuck.");
|
pline_The("ring is stuck.");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
glibdummy = cg.zeroobj;
|
||||||
why = 0; /* the item which prevents ring removal */
|
why = 0; /* the item which prevents ring removal */
|
||||||
if (welded(uwep) && (otmp == uright || bimanual(uwep))) {
|
if (welded(uwep) && (otmp == uright || bimanual(uwep))) {
|
||||||
Sprintf(buf, "free a weapon %s", body_part(HAND));
|
Sprintf(buf, "free a weapon %s", body_part(HAND));
|
||||||
why = uwep;
|
why = uwep;
|
||||||
} else if (uarmg && uarmg->cursed) {
|
} else if (uarmg && (uarmg->cursed || Glib)) {
|
||||||
Sprintf(buf, "take off your %s", c_gloves);
|
Sprintf(buf, "take off your %s%s",
|
||||||
why = uarmg;
|
Glib ? "slippery " : "", gloves_simple_name(uarmg));
|
||||||
|
why = !Glib ? uarmg : &glibdummy;
|
||||||
}
|
}
|
||||||
if (why) {
|
if (why) {
|
||||||
You("cannot %s to remove the ring.", buf);
|
You("cannot %s to remove the ring.", buf);
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 eat.c $NHDT-Date: 1573290417 2019/11/09 09:06:57 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.204 $ */
|
/* NetHack 3.6 eat.c $NHDT-Date: 1573346189 2019/11/10 00:36:29 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.205 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -1374,9 +1374,7 @@ const char *mesg;
|
|||||||
/* Assume !Glib, because you can't open tins when Glib. */
|
/* Assume !Glib, because you can't open tins when Glib. */
|
||||||
make_glib(rn1(11, 5)); /* 5..15 */
|
make_glib(rn1(11, 5)); /* 5..15 */
|
||||||
pline("Eating %s food made your %s very slippery.",
|
pline("Eating %s food made your %s very slippery.",
|
||||||
tintxts[r].txt,
|
tintxts[r].txt, fingers_or_gloves(TRUE));
|
||||||
!uarmg ? makeplural(body_part(FINGER))
|
|
||||||
: gloves_simple_name(uarmg));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
} else { /* spinach... */
|
} else { /* spinach... */
|
||||||
@@ -1501,8 +1499,7 @@ struct obj *otmp;
|
|||||||
no_opener:
|
no_opener:
|
||||||
pline("It is not so easy to open this tin.");
|
pline("It is not so easy to open this tin.");
|
||||||
if (Glib) {
|
if (Glib) {
|
||||||
pline_The("tin slips from your %s.",
|
pline_The("tin slips from your %s.", fingers_or_gloves(FALSE));
|
||||||
makeplural(body_part(FINGER)));
|
|
||||||
if (otmp->quan > 1L) {
|
if (otmp->quan > 1L) {
|
||||||
otmp = splitobj(otmp, 1L);
|
otmp = splitobj(otmp, 1L);
|
||||||
}
|
}
|
||||||
|
|||||||
+75
-52
@@ -4233,17 +4233,22 @@ boolean wildcards;
|
|||||||
|
|
||||||
#endif /*DEBUG*/
|
#endif /*DEBUG*/
|
||||||
|
|
||||||
|
#ifdef UNIX
|
||||||
|
#ifndef PATH_MAX
|
||||||
|
#include <limits.h>
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
reveal_paths(VOID_ARGS)
|
reveal_paths(VOID_ARGS)
|
||||||
{
|
{
|
||||||
int i;
|
int i, maxlen = 0;
|
||||||
#define PATHBUFSZ 1024
|
const char *fqn, *filep, *strp;
|
||||||
char buf[PATHBUFSZ];
|
char buf[BUFSZ];
|
||||||
#ifdef UNIX
|
#ifdef UNIX
|
||||||
char *envp, *slash, nhpath[PATHBUFSZ];
|
char *envp, cwdbuf[PATH_MAX];
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* write out path details */
|
|
||||||
#ifdef PREFIXES_IN_USE
|
#ifdef PREFIXES_IN_USE
|
||||||
raw_print("Variable playground locations:");
|
raw_print("Variable playground locations:");
|
||||||
for (i = 0; i < PREFIX_COUNT; i++)
|
for (i = 0; i < PREFIX_COUNT; i++)
|
||||||
@@ -4252,75 +4257,93 @@ reveal_paths(VOID_ARGS)
|
|||||||
? g.fqn_prefix[i]
|
? g.fqn_prefix[i]
|
||||||
: "not set");
|
: "not set");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* sysconf file */
|
/* sysconf file */
|
||||||
|
|
||||||
|
#ifdef SYSCF
|
||||||
#ifdef PREFIXES_IN_USE
|
#ifdef PREFIXES_IN_USE
|
||||||
Sprintf(buf, " (in %s)",
|
strp = fqn_prefix_names[SYSCONFPREFIX];
|
||||||
fqn_prefix_names[SYSCONFPREFIX]);
|
maxlen = BUFSZ - sizeof " (in )";
|
||||||
|
if (strp && strlen(strp) < (size_t) maxlen)
|
||||||
|
Sprintf(buf, " (in %s)", strp);
|
||||||
#else
|
#else
|
||||||
buf[0] = '\0';
|
buf[0] = '\0';
|
||||||
#endif
|
#endif
|
||||||
raw_printf("Your system configuration file%s:", buf);
|
raw_printf("Your system configuration file%s:", buf);
|
||||||
set_configfile_name(fqname(SYSCF_FILE, SYSCONFPREFIX, 0));
|
#ifdef SYSCF_FILE
|
||||||
raw_printf(" \"%s\"", configfile);
|
filep = SYSCF_FILE;
|
||||||
#ifdef UNIX
|
#else
|
||||||
Strcpy(nhpath, configfile);
|
filep = "sysconf";
|
||||||
slash = rindex(nhpath, '/');
|
|
||||||
if (slash)
|
|
||||||
*slash = '\0';
|
|
||||||
#endif
|
#endif
|
||||||
|
fqn = fqname(filep, SYSCONFPREFIX, 0);
|
||||||
|
if (fqn) {
|
||||||
|
set_configfile_name(fqn);
|
||||||
|
filep = configfile;
|
||||||
|
}
|
||||||
|
raw_printf(" \"%s\"", filep);
|
||||||
|
#endif /* SYSCF */
|
||||||
|
|
||||||
/* symbols file */
|
/* symbols file */
|
||||||
|
|
||||||
|
buf[0] = '\0';
|
||||||
|
#ifndef UNIX
|
||||||
#ifdef PREFIXES_IN_USE
|
#ifdef PREFIXES_IN_USE
|
||||||
Sprintf(buf, " (in %s)",
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
fqn_prefix_names[SYSCONFPREFIX]);
|
strp = fqn_prefix_names[SYSCONFPREFIX];
|
||||||
#else
|
#else
|
||||||
fqn_prefix_names[HACKPREFIX]);
|
strp = fqn_prefix_names[HACKPREFIX];
|
||||||
#endif /* WIN32 */
|
#endif /* WIN32 */
|
||||||
#else /* PREFIXES_IN_USE */
|
maxlen = BUFSZ - sizeof " (in )";
|
||||||
buf[0] = '\0';
|
if (strp && strlen(strp) < (size_t) maxlen)
|
||||||
#endif
|
Sprintf(buf, " (in %s)", strp);
|
||||||
|
|
||||||
raw_printf("Your system symbols file%s:", buf);
|
|
||||||
#ifdef UNIX
|
|
||||||
Sprintf(buf, "%s/%s", nhpath, SYMBOLS);
|
|
||||||
#else
|
|
||||||
#ifdef PREFIXES_IN_USE
|
|
||||||
Sprintf(buf, "%s",
|
|
||||||
fqname(SYMBOLS,
|
|
||||||
#ifdef WIN32
|
|
||||||
SYSCONFPREFIX, 2));
|
|
||||||
#else
|
|
||||||
HACKPREFIX, 2));
|
|
||||||
#endif
|
|
||||||
#endif /* PREFIXES_IN_USE */
|
#endif /* PREFIXES_IN_USE */
|
||||||
|
raw_printf("Your game's loadable symbols file%s:", buf);
|
||||||
#endif /* UNIX */
|
#endif /* UNIX */
|
||||||
raw_printf(" \"%s\"", buf);
|
|
||||||
|
|
||||||
/* configuration file */
|
#ifdef UNIX
|
||||||
|
envp = getcwd(cwdbuf, PATH_MAX);
|
||||||
|
if (envp) {
|
||||||
|
raw_print("Your game's loadable symbols file:");
|
||||||
|
raw_printf(" \"%s/%s\"", envp, SYMBOLS);
|
||||||
|
}
|
||||||
|
#else /* UNIX */
|
||||||
|
filep = SYMBOLS;
|
||||||
#ifdef PREFIXES_IN_USE
|
#ifdef PREFIXES_IN_USE
|
||||||
Sprintf(buf, " (in %s)",
|
#ifdef WIN32
|
||||||
fqn_prefix_names[CONFIGPREFIX]);
|
fqn = fqname(filep, SYSCONFPREFIX, 1);
|
||||||
#else /* PREFIXES_IN_USE */
|
#else
|
||||||
|
fqn = fqname(filep, HACKPREFIX, 1);
|
||||||
|
#endif /* WIN32 */
|
||||||
|
if (fqn)
|
||||||
|
filep = fqn;
|
||||||
|
#endif /* PREFIXES_IN_USE */
|
||||||
|
raw_printf(" \"%s\"", filep);
|
||||||
|
#endif /* UNIX */
|
||||||
|
|
||||||
|
/* personal configuration file */
|
||||||
|
|
||||||
buf[0] = '\0';
|
buf[0] = '\0';
|
||||||
#endif
|
#ifdef PREFIXES_IN_USE
|
||||||
|
strp = fqn_prefix_names[CONFIGPREFIX];
|
||||||
|
maxlen = BUFSZ - sizeof " (in )";
|
||||||
|
if (strp && strlen(strp) < (size_t) maxlen)
|
||||||
|
Sprintf(buf, " (in %s)", strp);
|
||||||
|
#endif /* PREFIXES_IN_USE */
|
||||||
raw_printf("Your personal configuration file%s:", buf);
|
raw_printf("Your personal configuration file%s:", buf);
|
||||||
|
|
||||||
#ifdef UNIX
|
#ifdef UNIX
|
||||||
envp = nh_getenv("HOME");
|
envp = nh_getenv("HOME");
|
||||||
if (!envp)
|
raw_printf(" \"%s%s%s\"",
|
||||||
Strcpy(nhpath, ".nethackrc");
|
envp ?
|
||||||
else
|
envp : "",
|
||||||
Sprintf(nhpath, "%s/%s", envp, default_configfile);
|
envp ?
|
||||||
#endif
|
"/" : "", default_configfile);
|
||||||
raw_printf(" \"%s\"",
|
#else /* UNIX */
|
||||||
#ifdef UNIX
|
fqn = (const char *) 0;
|
||||||
nhpath);
|
|
||||||
#else
|
|
||||||
#ifdef PREFIXES_IN_USE
|
#ifdef PREFIXES_IN_USE
|
||||||
fqname(default_configfile, CONFIGPREFIX, 3));
|
fqn = fqname(default_configfile, CONFIGPREFIX, 2);
|
||||||
#else
|
#endif
|
||||||
default_configfile);
|
raw_printf(" \"%s\"", fqn ? fqn : default_configfile);
|
||||||
#endif /* PREFIXES_IN_USE */
|
|
||||||
#endif /* UNIX */
|
#endif /* UNIX */
|
||||||
raw_print("");
|
raw_print("");
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 invent.c $NHDT-Date: 1571436003 2019/10/18 22:00:03 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.265 $ */
|
/* NetHack 3.6 invent.c $NHDT-Date: 1573346190 2019/11/10 00:36:30 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.266 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -1714,7 +1714,7 @@ register const char *let, *word;
|
|||||||
if (iflags.force_invmenu)
|
if (iflags.force_invmenu)
|
||||||
Sprintf(menuquery, "What do you want to %s?", word);
|
Sprintf(menuquery, "What do you want to %s?", word);
|
||||||
if (!strcmp(word, "grease"))
|
if (!strcmp(word, "grease"))
|
||||||
Sprintf(qbuf, "your %s", makeplural(body_part(FINGER)));
|
Sprintf(qbuf, "your %s", fingers_or_gloves(FALSE));
|
||||||
else if (!strcmp(word, "write with"))
|
else if (!strcmp(word, "write with"))
|
||||||
Sprintf(qbuf, "your %s", body_part(FINGERTIP));
|
Sprintf(qbuf, "your %s", body_part(FINGERTIP));
|
||||||
else if (!strcmp(word, "wield"))
|
else if (!strcmp(word, "wield"))
|
||||||
|
|||||||
+2
-3
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 potion.c $NHDT-Date: 1573290421 2019/11/09 09:07:01 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.165 $ */
|
/* NetHack 3.6 potion.c $NHDT-Date: 1573346191 2019/11/10 00:36:31 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.166 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -2135,8 +2135,7 @@ dodip()
|
|||||||
fire_damage(obj, TRUE, u.ux, u.uy);
|
fire_damage(obj, TRUE, u.ux, u.uy);
|
||||||
} else if (potion->cursed) {
|
} else if (potion->cursed) {
|
||||||
pline_The("potion spills and covers your %s with oil.",
|
pline_The("potion spills and covers your %s with oil.",
|
||||||
!uarmg ? makeplural(body_part(FINGER))
|
fingers_or_gloves(TRUE));
|
||||||
: gloves_simple_name(uarmg));
|
|
||||||
make_glib((int) (Glib & TIMEOUT) + d(2, 10));
|
make_glib((int) (Glib & TIMEOUT) + d(2, 10));
|
||||||
} else if (obj->oclass != WEAPON_CLASS && !is_weptool(obj)) {
|
} else if (obj->oclass != WEAPON_CLASS && !is_weptool(obj)) {
|
||||||
/* the following cases apply only to weapons */
|
/* the following cases apply only to weapons */
|
||||||
|
|||||||
+7
-1
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 pray.c $NHDT-Date: 1564532667 2019/07/31 00:24:27 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.117 $ */
|
/* NetHack 3.6 pray.c $NHDT-Date: 1573346192 2019/11/10 00:36:32 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.118 $ */
|
||||||
/* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
|
/* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -489,6 +489,12 @@ int trouble;
|
|||||||
impossible("fix_worst_trouble: nothing to uncurse.");
|
impossible("fix_worst_trouble: nothing to uncurse.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
if (otmp == uarmg && Glib) {
|
||||||
|
make_glib(0);
|
||||||
|
Your("%s are no longer slippery.", gloves_simple_name(uarmg));
|
||||||
|
if (!otmp->cursed)
|
||||||
|
break;
|
||||||
|
}
|
||||||
if (!Blind || (otmp == ublindf && Blindfolded_only)) {
|
if (!Blind || (otmp == ublindf && Blindfolded_only)) {
|
||||||
pline("%s %s.",
|
pline("%s %s.",
|
||||||
what ? what : (const char *) Yobjnam2(otmp, "softly glow"),
|
what ? what : (const char *) Yobjnam2(otmp, "softly glow"),
|
||||||
|
|||||||
+2
-2
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 write.c $NHDT-Date: 1450261366 2015/12/16 10:22:46 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.17 $ */
|
/* NetHack 3.6 write.c $NHDT-Date: 1573346194 2019/11/10 00:36:34 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.20 $ */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
#include "hack.h"
|
#include "hack.h"
|
||||||
@@ -109,7 +109,7 @@ register struct obj *pen;
|
|||||||
return 0;
|
return 0;
|
||||||
} else if (Glib) {
|
} else if (Glib) {
|
||||||
pline("%s from your %s.", Tobjnam(pen, "slip"),
|
pline("%s from your %s.", Tobjnam(pen, "slip"),
|
||||||
makeplural(body_part(FINGER)));
|
fingers_or_gloves(FALSE));
|
||||||
dropx(pen);
|
dropx(pen);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -115,6 +115,9 @@ char *argv[];
|
|||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
|
|
||||||
if (argcheck(argc, argv, ARG_SHOWPATHS) == 2) {
|
if (argcheck(argc, argv, ARG_SHOWPATHS) == 2) {
|
||||||
|
#ifdef CHDIR
|
||||||
|
chdirx((char *) 0, 0);
|
||||||
|
#endif
|
||||||
initoptions();
|
initoptions();
|
||||||
reveal_paths();
|
reveal_paths();
|
||||||
exit(EXIT_SUCCESS);
|
exit(EXIT_SUCCESS);
|
||||||
|
|||||||
Reference in New Issue
Block a user