more Sting,&c
Add "(glowing light blue)" to the formatted object description when Sting or Orcrist is glowing due to presence of orcs or "(glowing red)" if Grimtooth is glowing due to elves. Use "(glowing)" if blind; assumes that some aspect of the glow (perhaps warmth or vibration) can be noticed via touch. Make enlightenment's "you are warned about <monster class> because of <artifact>" catch up with Orcrist and Grimtooth. It was attributing Orcrist's warning against orcs to Sting, and Grimtooth's warning was against "something" rather than elves. The glow color is now a new field in artilist[], so the biggest part of this patch is adding an extra value to each artifact's definition.
This commit is contained in:
16
src/objnam.c
16
src/objnam.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 objnam.c $NHDT-Date: 1432722918 2015/05/27 10:35:18 $ $NHDT-Branch: master $:$NHDT-Revision: 1.137 $ */
|
||||
/* NetHack 3.6 objnam.c $NHDT-Date: 1433050879 2015/05/31 05:41:19 $ $NHDT-Branch: master $:$NHDT-Revision: 1.140 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
|
||||
@@ -550,9 +550,9 @@ unsigned cxn_flags; /* bitmask of CXN_xxx values */
|
||||
|
||||
/* similar to simple_typename but minimal_xname operates on a particular
|
||||
object rather than its general type; it formats the most basic info:
|
||||
potion -- if description not known
|
||||
brown potion -- if oc_name_known not set
|
||||
potion of object detection -- if discovered
|
||||
potion -- if description not known
|
||||
brown potion -- if oc_name_known not set
|
||||
potion of object detection -- if discovered
|
||||
*/
|
||||
static char *
|
||||
minimal_xname(obj)
|
||||
@@ -945,6 +945,13 @@ boolean with_price;
|
||||
if (bimanual(obj))
|
||||
hand_s = makeplural(hand_s);
|
||||
Sprintf(eos(bp), " (weapon in %s)", hand_s);
|
||||
if (obj == uwep && obj->oartifact && warn_obj_cnt) {
|
||||
/* presumeably can be felt when blind */
|
||||
Strcat(bp, " (glowing");
|
||||
if (!Blind)
|
||||
Sprintf(eos(bp), " %s", glow_color(obj->oartifact));
|
||||
Strcat(bp, ")");
|
||||
}
|
||||
}
|
||||
}
|
||||
if (obj->owornmask & W_SWAPWEP) {
|
||||
@@ -991,6 +998,7 @@ boolean with_price;
|
||||
quotedprice, currency(quotedprice));
|
||||
} else if (with_price) {
|
||||
long price = get_cost_of_shop_item(obj);
|
||||
|
||||
if (price > 0)
|
||||
Sprintf(eos(bp), " (%ld %s)", price, currency(price));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user