Merge branch 'pr765-767' into NetHack-3.7
This commit is contained in:
+15
-5
@@ -2359,7 +2359,8 @@ static const char *const as_is[] = {
|
|||||||
"tuna", "yaki", "-hai", "krill", "manes",
|
"tuna", "yaki", "-hai", "krill", "manes",
|
||||||
"moose", "ninja", "sheep", "ronin", "roshi",
|
"moose", "ninja", "sheep", "ronin", "roshi",
|
||||||
"shito", "tengu", "ki-rin", "Nazgul", "gunyoki",
|
"shito", "tengu", "ki-rin", "Nazgul", "gunyoki",
|
||||||
"piranha", "samurai", "shuriken", "haggis", 0,
|
"piranha", "samurai", "shuriken", "haggis", "Bordeaux",
|
||||||
|
0,
|
||||||
/* Note: "fish" and "piranha" are collective plurals, suitable
|
/* Note: "fish" and "piranha" are collective plurals, suitable
|
||||||
for "wiped out all <foo>". For "3 <foo>", they should be
|
for "wiped out all <foo>". For "3 <foo>", they should be
|
||||||
"fishes" and "piranhas" instead. We settle for collective
|
"fishes" and "piranhas" instead. We settle for collective
|
||||||
@@ -2453,7 +2454,8 @@ singplur_compound(char *str)
|
|||||||
" versus ", " from ", " in ",
|
" versus ", " from ", " in ",
|
||||||
" on ", " a la ", " with", /* " with "? */
|
" on ", " a la ", " with", /* " with "? */
|
||||||
" de ", " d'", " du ",
|
" de ", " d'", " du ",
|
||||||
"-in-", "-at-", 0
|
"-in-", "-at-", " au ",
|
||||||
|
0
|
||||||
}, /* list of first characters for all compounds[] entries */
|
}, /* list of first characters for all compounds[] entries */
|
||||||
compound_start[] = " -";
|
compound_start[] = " -";
|
||||||
|
|
||||||
@@ -2566,6 +2568,7 @@ makeplural(const char* oldstr)
|
|||||||
{
|
{
|
||||||
static const char *const already_plural[] = {
|
static const char *const already_plural[] = {
|
||||||
"ae", /* algae, larvae, &c */
|
"ae", /* algae, larvae, &c */
|
||||||
|
"eaux", /* chateaux, gateaux */
|
||||||
"matzot", 0,
|
"matzot", 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2624,6 +2627,13 @@ makeplural(const char* oldstr)
|
|||||||
Strcasecpy(spot - 1, "es");
|
Strcasecpy(spot - 1, "es");
|
||||||
goto bottom;
|
goto bottom;
|
||||||
}
|
}
|
||||||
|
/* -eau/-eaux (gateau, chapeau...) */
|
||||||
|
if (len >= 3 && !strcmpi(spot - 2, "eau")
|
||||||
|
/* 'bureaus' is the more common plural of 'bureau' */
|
||||||
|
&& strncmpi(str, "bureau", 6)) {
|
||||||
|
Strcasecpy(spot + 1, "x");
|
||||||
|
goto bottom;
|
||||||
|
}
|
||||||
/* matzoh/matzot, possible food name */
|
/* matzoh/matzot, possible food name */
|
||||||
if (len >= 6
|
if (len >= 6
|
||||||
&& (!strcmpi(spot - 5, "matzoh") || !strcmpi(spot - 5, "matzah"))) {
|
&& (!strcmpi(spot - 5, "matzoh") || !strcmpi(spot - 5, "matzah"))) {
|
||||||
@@ -2636,7 +2646,6 @@ makeplural(const char* oldstr)
|
|||||||
goto bottom;
|
goto bottom;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* note: -eau/-eaux (gateau, bordeau...) */
|
|
||||||
/* note: ox/oxen, VAX/VAXen, goose/geese */
|
/* note: ox/oxen, VAX/VAXen, goose/geese */
|
||||||
|
|
||||||
lo_c = lowc(*spot);
|
lo_c = lowc(*spot);
|
||||||
@@ -2795,8 +2804,9 @@ makesingular(const char* oldstr)
|
|||||||
goto bottom;
|
goto bottom;
|
||||||
}
|
}
|
||||||
/* matzot -> matzo, algae -> alga */
|
/* matzot -> matzo, algae -> alga */
|
||||||
if (!BSTRCMPI(bp, p - 6, "matzot") || !BSTRCMPI(bp, p - 2, "ae")) {
|
if (!BSTRCMPI(bp, p - 6, "matzot") || !BSTRCMPI(bp, p - 2, "ae")
|
||||||
*(p - 1) = '\0'; /* drop t/e */
|
|| !BSTRCMPI(bp, p - 4, "eaux")) {
|
||||||
|
*(p - 1) = '\0'; /* drop t/e/x */
|
||||||
goto bottom;
|
goto bottom;
|
||||||
}
|
}
|
||||||
/* balactheria -> balactherium */
|
/* balactheria -> balactherium */
|
||||||
|
|||||||
+39
-28
@@ -7,6 +7,7 @@
|
|||||||
static int prayer_done(void);
|
static int prayer_done(void);
|
||||||
static struct obj *worst_cursed_item(void);
|
static struct obj *worst_cursed_item(void);
|
||||||
static int in_trouble(void);
|
static int in_trouble(void);
|
||||||
|
static void fix_curse_trouble(struct obj *, const char *);
|
||||||
static void fix_worst_trouble(int);
|
static void fix_worst_trouble(int);
|
||||||
static void angrygods(aligntyp);
|
static void angrygods(aligntyp);
|
||||||
static void at_your_feet(const char *);
|
static void at_your_feet(const char *);
|
||||||
@@ -328,6 +329,30 @@ worst_cursed_item(void)
|
|||||||
return otmp;
|
return otmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
fix_curse_trouble(struct obj *otmp, const char *what)
|
||||||
|
{
|
||||||
|
if (!otmp) {
|
||||||
|
impossible("fix_curse_trouble: nothing to uncurse.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (otmp == uarmg && Glib) {
|
||||||
|
make_glib(0);
|
||||||
|
Your("%s are no longer slippery.", gloves_simple_name(uarmg));
|
||||||
|
if (!otmp->cursed)
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
if (!Blind || (otmp == ublindf && Blindfolded_only)) {
|
||||||
|
pline("%s %s.",
|
||||||
|
what ? what : (const char *) Yobjnam2(otmp, "softly glow"),
|
||||||
|
hcolor(NH_AMBER));
|
||||||
|
iflags.last_msg = PLNMSG_OBJ_GLOWS;
|
||||||
|
otmp->bknown = !Hallucination; /* ok to skip set_bknown() */
|
||||||
|
}
|
||||||
|
uncurse(otmp);
|
||||||
|
update_inventory();
|
||||||
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
fix_worst_trouble(int trouble)
|
fix_worst_trouble(int trouble)
|
||||||
{
|
{
|
||||||
@@ -409,8 +434,10 @@ fix_worst_trouble(int trouble)
|
|||||||
if (otmp == uright)
|
if (otmp == uright)
|
||||||
what = rightglow;
|
what = rightglow;
|
||||||
}
|
}
|
||||||
if (otmp)
|
if (otmp) {
|
||||||
goto decurse;
|
fix_curse_trouble(otmp, what);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case TROUBLE_STUCK_IN_WALL:
|
case TROUBLE_STUCK_IN_WALL:
|
||||||
@@ -441,11 +468,13 @@ fix_worst_trouble(int trouble)
|
|||||||
if (otmp == uright)
|
if (otmp == uright)
|
||||||
what = rightglow;
|
what = rightglow;
|
||||||
}
|
}
|
||||||
goto decurse;
|
fix_curse_trouble(otmp, what);
|
||||||
|
break;
|
||||||
case TROUBLE_UNUSEABLE_HANDS:
|
case TROUBLE_UNUSEABLE_HANDS:
|
||||||
if (welded(uwep)) {
|
if (welded(uwep)) {
|
||||||
otmp = uwep;
|
otmp = uwep;
|
||||||
goto decurse;
|
fix_curse_trouble(otmp, what);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
if (Upolyd && nohands(g.youmonst.data)) {
|
if (Upolyd && nohands(g.youmonst.data)) {
|
||||||
if (!Unchanging) {
|
if (!Unchanging) {
|
||||||
@@ -453,7 +482,8 @@ fix_worst_trouble(int trouble)
|
|||||||
rehumanize(); /* "You return to {normal} form." */
|
rehumanize(); /* "You return to {normal} form." */
|
||||||
} else if ((otmp = unchanger()) != 0 && otmp->cursed) {
|
} else if ((otmp = unchanger()) != 0 && otmp->cursed) {
|
||||||
/* otmp is an amulet of unchanging */
|
/* otmp is an amulet of unchanging */
|
||||||
goto decurse;
|
fix_curse_trouble(otmp, what);
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nohands(g.youmonst.data) || !freehand())
|
if (nohands(g.youmonst.data) || !freehand())
|
||||||
@@ -461,7 +491,8 @@ fix_worst_trouble(int trouble)
|
|||||||
break;
|
break;
|
||||||
case TROUBLE_CURSED_BLINDFOLD:
|
case TROUBLE_CURSED_BLINDFOLD:
|
||||||
otmp = ublindf;
|
otmp = ublindf;
|
||||||
goto decurse;
|
fix_curse_trouble(otmp, what);
|
||||||
|
break;
|
||||||
case TROUBLE_LYCANTHROPE:
|
case TROUBLE_LYCANTHROPE:
|
||||||
you_unwere(TRUE);
|
you_unwere(TRUE);
|
||||||
break;
|
break;
|
||||||
@@ -479,8 +510,7 @@ fix_worst_trouble(int trouble)
|
|||||||
otmp = uarmg;
|
otmp = uarmg;
|
||||||
else if (Cursed_obj(uarmf, FUMBLE_BOOTS))
|
else if (Cursed_obj(uarmf, FUMBLE_BOOTS))
|
||||||
otmp = uarmf;
|
otmp = uarmf;
|
||||||
goto decurse;
|
fix_curse_trouble(otmp, what);
|
||||||
/*NOTREACHED*/
|
|
||||||
break;
|
break;
|
||||||
case TROUBLE_CURSED_ITEMS:
|
case TROUBLE_CURSED_ITEMS:
|
||||||
otmp = worst_cursed_item();
|
otmp = worst_cursed_item();
|
||||||
@@ -488,26 +518,7 @@ fix_worst_trouble(int trouble)
|
|||||||
what = rightglow;
|
what = rightglow;
|
||||||
else if (otmp == uleft)
|
else if (otmp == uleft)
|
||||||
what = leftglow;
|
what = leftglow;
|
||||||
decurse:
|
fix_curse_trouble(otmp, what);
|
||||||
if (!otmp) {
|
|
||||||
impossible("fix_worst_trouble: nothing to uncurse.");
|
|
||||||
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)) {
|
|
||||||
pline("%s %s.",
|
|
||||||
what ? what : (const char *) Yobjnam2(otmp, "softly glow"),
|
|
||||||
hcolor(NH_AMBER));
|
|
||||||
iflags.last_msg = PLNMSG_OBJ_GLOWS;
|
|
||||||
otmp->bknown = !Hallucination; /* ok to skip set_bknown() */
|
|
||||||
}
|
|
||||||
uncurse(otmp);
|
|
||||||
update_inventory();
|
|
||||||
break;
|
break;
|
||||||
case TROUBLE_POISONED:
|
case TROUBLE_POISONED:
|
||||||
/* override Fixed_abil; ignore items which confer that */
|
/* override Fixed_abil; ignore items which confer that */
|
||||||
|
|||||||
Reference in New Issue
Block a user