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:
PatR
2015-05-30 22:41:30 -07:00
parent 69596a58b3
commit 0171345aad
7 changed files with 110 additions and 69 deletions
+2 -1
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 artifact.h $NHDT-Date: 1432512779 2015/05/25 00:12:59 $ $NHDT-Branch: master $:$NHDT-Revision: 1.10 $ */ /* NetHack 3.6 artifact.h $NHDT-Date: 1433050871 2015/05/31 05:41:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.11 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -52,6 +52,7 @@ struct artifact {
short role; /* character role associated with */ short role; /* character role associated with */
short race; /* character race associated with */ short race; /* character race associated with */
long cost; /* price when sold to hero (default 100 x base cost) */ long cost; /* price when sold to hero (default 100 x base cost) */
char acolor; /* color to use if artifact 'glows' */
}; };
/* invoked properties with special powers */ /* invoked properties with special powers */
+57 -41
View File
@@ -1,19 +1,19 @@
/* NetHack 3.6 artilist.h $NHDT-Date: 1432946531 2015/05/30 00:42:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.15 $ */ /* NetHack 3.6 artilist.h $NHDT-Date: 1433050874 2015/05/31 05:41:14 $ $NHDT-Branch: master $:$NHDT-Revision: 1.16 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
#ifdef MAKEDEFS_C #ifdef MAKEDEFS_C
/* in makedefs.c, all we care about is the list of names */ /* in makedefs.c, all we care about is the list of names */
#define A(nam, typ, s1, s2, mt, atk, dfn, cry, inv, al, cl, rac, cost) nam #define A(nam, typ, s1, s2, mt, atk, dfn, cry, inv, al, cl, rac, cost, clr) nam
static const char *artifact_names[] = { static const char *artifact_names[] = {
#else #else
/* in artifact.c, set up the actual artifact list structure */ /* in artifact.c, set up the actual artifact list structure */
#define A(nam, typ, s1, s2, mt, atk, dfn, cry, inv, al, cl, rac, cost) \ #define A(nam, typ, s1, s2, mt, atk, dfn, cry, inv, al, cl, rac, cost, clr) \
{ \ { \
typ, nam, s1, s2, mt, atk, dfn, cry, inv, al, cl, rac, cost \ typ, nam, s1, s2, mt, atk, dfn, cry, inv, al, cl, rac, cost, clr \
} }
/* clang-format off */ /* clang-format off */
@@ -41,29 +41,30 @@ STATIC_OVL NEARDATA struct artifact artilist[] = {
/* dummy element #0, so that all interesting indices are non-zero */ /* dummy element #0, so that all interesting indices are non-zero */
A("", STRANGE_OBJECT, 0, 0, 0, NO_ATTK, NO_DFNS, NO_CARY, 0, A_NONE, A("", STRANGE_OBJECT, 0, 0, 0, NO_ATTK, NO_DFNS, NO_CARY, 0, A_NONE,
NON_PM, NON_PM, 0L), NON_PM, NON_PM, 0L, NO_COLOR),
A("Excalibur", LONG_SWORD, (SPFX_NOGEN | SPFX_RESTR | SPFX_SEEK A("Excalibur", LONG_SWORD, (SPFX_NOGEN | SPFX_RESTR | SPFX_SEEK
| SPFX_DEFN | SPFX_INTEL | SPFX_SEARCH), | SPFX_DEFN | SPFX_INTEL | SPFX_SEARCH),
0, 0, PHYS(5, 10), DRLI(0, 0), NO_CARY, 0, A_LAWFUL, PM_KNIGHT, NON_PM, 0, 0, PHYS(5, 10), DRLI(0, 0), NO_CARY, 0, A_LAWFUL, PM_KNIGHT, NON_PM,
4000L), 4000L, NO_COLOR),
/* /*
* Stormbringer only has a 2 because it can drain a level, * Stormbringer only has a 2 because it can drain a level,
* providing 8 more. * providing 8 more.
*/ */
A("Stormbringer", RUNESWORD, A("Stormbringer", RUNESWORD,
(SPFX_RESTR | SPFX_ATTK | SPFX_DEFN | SPFX_INTEL | SPFX_DRLI), 0, 0, (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN | SPFX_INTEL | SPFX_DRLI), 0, 0,
DRLI(5, 2), DRLI(0, 0), NO_CARY, 0, A_CHAOTIC, NON_PM, NON_PM, 8000L), DRLI(5, 2), DRLI(0, 0), NO_CARY, 0, A_CHAOTIC, NON_PM, NON_PM, 8000L,
NO_COLOR),
/* /*
* Mjollnir will return to the hand of the wielder when thrown * Mjollnir will return to the hand of the wielder when thrown
* if the wielder is a Valkyrie wearing Gauntlets of Power. * if the wielder is a Valkyrie wearing Gauntlets of Power.
*/ */
A("Mjollnir", WAR_HAMMER, /* Mjo:llnir */ A("Mjollnir", WAR_HAMMER, /* Mjo:llnir */
(SPFX_RESTR | SPFX_ATTK), 0, 0, ELEC(5, 24), NO_DFNS, NO_CARY, 0, (SPFX_RESTR | SPFX_ATTK), 0, 0, ELEC(5, 24), NO_DFNS, NO_CARY, 0,
A_NEUTRAL, PM_VALKYRIE, NON_PM, 4000L), A_NEUTRAL, PM_VALKYRIE, NON_PM, 4000L, NO_COLOR),
A("Cleaver", BATTLE_AXE, SPFX_RESTR, 0, 0, PHYS(3, 6), NO_DFNS, NO_CARY, A("Cleaver", BATTLE_AXE, SPFX_RESTR, 0, 0, PHYS(3, 6), NO_DFNS, NO_CARY,
0, A_NEUTRAL, PM_BARBARIAN, NON_PM, 1500L), 0, A_NEUTRAL, PM_BARBARIAN, NON_PM, 1500L, NO_COLOR),
/* /*
* Grimtooth glows in warning when elves are present, but its * Grimtooth glows in warning when elves are present, but its
@@ -72,7 +73,7 @@ STATIC_OVL NEARDATA struct artifact artilist[] = {
*/ */
A("Grimtooth", ORCISH_DAGGER, (SPFX_RESTR | SPFX_WARN | SPFX_DFLAG2), A("Grimtooth", ORCISH_DAGGER, (SPFX_RESTR | SPFX_WARN | SPFX_DFLAG2),
0, M2_ELF, PHYS(2, 6), NO_DFNS, 0, M2_ELF, PHYS(2, 6), NO_DFNS,
NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ORC, 300L), NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ORC, 300L, CLR_RED),
/* /*
* Orcrist and Sting have same alignment as elves. * Orcrist and Sting have same alignment as elves.
* *
@@ -81,51 +82,62 @@ STATIC_OVL NEARDATA struct artifact artilist[] = {
* Sting and Orcrist will warn of M2_ORC monsters. * Sting and Orcrist will warn of M2_ORC monsters.
*/ */
A("Orcrist", ELVEN_BROADSWORD, (SPFX_WARN | SPFX_DFLAG2), 0, M2_ORC, A("Orcrist", ELVEN_BROADSWORD, (SPFX_WARN | SPFX_DFLAG2), 0, M2_ORC,
PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ELF, 2000L), PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ELF, 2000L,
CLR_BRIGHT_BLUE), /* bright blue is actually light blue */
A("Sting", ELVEN_DAGGER, (SPFX_WARN | SPFX_DFLAG2), 0, M2_ORC, PHYS(5, 0), A("Sting", ELVEN_DAGGER, (SPFX_WARN | SPFX_DFLAG2), 0, M2_ORC, PHYS(5, 0),
NO_DFNS, NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ELF, 800L), NO_DFNS, NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ELF, 800L, CLR_BRIGHT_BLUE),
/* /*
* Magicbane is a bit different! Its magic fanfare * Magicbane is a bit different! Its magic fanfare
* unbalances victims in addition to doing some damage. * unbalances victims in addition to doing some damage.
*/ */
A("Magicbane", ATHAME, (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN), 0, 0, A("Magicbane", ATHAME, (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN), 0, 0,
STUN(3, 4), DFNS(AD_MAGM), NO_CARY, 0, A_NEUTRAL, PM_WIZARD, NON_PM, STUN(3, 4), DFNS(AD_MAGM), NO_CARY, 0, A_NEUTRAL, PM_WIZARD, NON_PM,
3500L), 3500L, NO_COLOR),
A("Frost Brand", LONG_SWORD, (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN), 0, 0, A("Frost Brand", LONG_SWORD, (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN), 0, 0,
COLD(5, 0), COLD(0, 0), NO_CARY, 0, A_NONE, NON_PM, NON_PM, 3000L), COLD(5, 0), COLD(0, 0), NO_CARY, 0, A_NONE, NON_PM, NON_PM, 3000L,
NO_COLOR),
A("Fire Brand", LONG_SWORD, (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN), 0, 0, A("Fire Brand", LONG_SWORD, (SPFX_RESTR | SPFX_ATTK | SPFX_DEFN), 0, 0,
FIRE(5, 0), FIRE(0, 0), NO_CARY, 0, A_NONE, NON_PM, NON_PM, 3000L), FIRE(5, 0), FIRE(0, 0), NO_CARY, 0, A_NONE, NON_PM, NON_PM, 3000L,
NO_COLOR),
A("Dragonbane", BROADSWORD, (SPFX_RESTR | SPFX_DCLAS), 0, S_DRAGON, A("Dragonbane", BROADSWORD, (SPFX_RESTR | SPFX_DCLAS), 0, S_DRAGON,
PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 500L), PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 500L,
NO_COLOR),
A("Demonbane", LONG_SWORD, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_DEMON, A("Demonbane", LONG_SWORD, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_DEMON,
PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 2500L), PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 2500L,
NO_COLOR),
A("Werebane", SILVER_SABER, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_WERE, A("Werebane", SILVER_SABER, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_WERE,
PHYS(5, 0), DFNS(AD_WERE), NO_CARY, 0, A_NONE, NON_PM, NON_PM, 1500L), PHYS(5, 0), DFNS(AD_WERE), NO_CARY, 0, A_NONE, NON_PM, NON_PM, 1500L,
NO_COLOR),
A("Grayswandir", SILVER_SABER, (SPFX_RESTR | SPFX_HALRES), 0, 0, A("Grayswandir", SILVER_SABER, (SPFX_RESTR | SPFX_HALRES), 0, 0,
PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 8000L), PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 8000L,
NO_COLOR),
A("Giantslayer", LONG_SWORD, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_GIANT, A("Giantslayer", LONG_SWORD, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_GIANT,
PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_NEUTRAL, NON_PM, NON_PM, 200L), PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_NEUTRAL, NON_PM, NON_PM, 200L,
NO_COLOR),
A("Ogresmasher", WAR_HAMMER, (SPFX_RESTR | SPFX_DCLAS), 0, S_OGRE, A("Ogresmasher", WAR_HAMMER, (SPFX_RESTR | SPFX_DCLAS), 0, S_OGRE,
PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 200L), PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 200L,
NO_COLOR),
A("Trollsbane", MORNING_STAR, (SPFX_RESTR | SPFX_DCLAS), 0, S_TROLL, A("Trollsbane", MORNING_STAR, (SPFX_RESTR | SPFX_DCLAS), 0, S_TROLL,
PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 200L), PHYS(5, 0), NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 200L,
NO_COLOR),
/* /*
* Two problems: 1) doesn't let trolls regenerate heads, * Two problems: 1) doesn't let trolls regenerate heads,
* 2) doesn't give unusual message for 2-headed monsters (but * 2) doesn't give unusual message for 2-headed monsters (but
* allowing those at all causes more problems than worth the effort). * allowing those at all causes more problems than worth the effort).
*/ */
A("Vorpal Blade", LONG_SWORD, (SPFX_RESTR | SPFX_BEHEAD), 0, 0, A("Vorpal Blade", LONG_SWORD, (SPFX_RESTR | SPFX_BEHEAD), 0, 0,
PHYS(5, 1), NO_DFNS, NO_CARY, 0, A_NEUTRAL, NON_PM, NON_PM, 4000L), PHYS(5, 1), NO_DFNS, NO_CARY, 0, A_NEUTRAL, NON_PM, NON_PM, 4000L,
NO_COLOR),
/* /*
* Ah, never shall I forget the cry, * Ah, never shall I forget the cry,
* or the shriek that shrieked he, * or the shriek that shrieked he,
@@ -135,10 +147,11 @@ STATIC_OVL NEARDATA struct artifact artilist[] = {
* (From Sir W.S. Gilbert's "The Mikado") * (From Sir W.S. Gilbert's "The Mikado")
*/ */
A("Snickersnee", KATANA, SPFX_RESTR, 0, 0, PHYS(0, 8), NO_DFNS, NO_CARY, A("Snickersnee", KATANA, SPFX_RESTR, 0, 0, PHYS(0, 8), NO_DFNS, NO_CARY,
0, A_LAWFUL, PM_SAMURAI, NON_PM, 1200L), 0, A_LAWFUL, PM_SAMURAI, NON_PM, 1200L, NO_COLOR),
A("Sunsword", LONG_SWORD, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_UNDEAD, A("Sunsword", LONG_SWORD, (SPFX_RESTR | SPFX_DFLAG2), 0, M2_UNDEAD,
PHYS(5, 0), DFNS(AD_BLND), NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 1500L), PHYS(5, 0), DFNS(AD_BLND), NO_CARY, 0, A_LAWFUL, NON_PM, NON_PM, 1500L,
NO_COLOR),
/* /*
* The artifacts for the quest dungeon, all self-willed. * The artifacts for the quest dungeon, all self-willed.
@@ -147,81 +160,84 @@ STATIC_OVL NEARDATA struct artifact artilist[] = {
A("The Orb of Detection", CRYSTAL_BALL, A("The Orb of Detection", CRYSTAL_BALL,
(SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL), (SPFX_ESP | SPFX_HSPDAM), 0, (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL), (SPFX_ESP | SPFX_HSPDAM), 0,
NO_ATTK, NO_DFNS, CARY(AD_MAGM), INVIS, A_LAWFUL, PM_ARCHEOLOGIST, NO_ATTK, NO_DFNS, CARY(AD_MAGM), INVIS, A_LAWFUL, PM_ARCHEOLOGIST,
NON_PM, 2500L), NON_PM, 2500L, NO_COLOR),
A("The Heart of Ahriman", LUCKSTONE, A("The Heart of Ahriman", LUCKSTONE,
(SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL), SPFX_STLTH, 0, (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL), SPFX_STLTH, 0,
/* this stone does double damage if used as a projectile weapon */ /* this stone does double damage if used as a projectile weapon */
PHYS(5, 0), NO_DFNS, NO_CARY, LEVITATION, A_NEUTRAL, PM_BARBARIAN, PHYS(5, 0), NO_DFNS, NO_CARY, LEVITATION, A_NEUTRAL, PM_BARBARIAN,
NON_PM, 2500L), NON_PM, 2500L, NO_COLOR),
A("The Sceptre of Might", MACE, A("The Sceptre of Might", MACE,
(SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_DALIGN), 0, 0, PHYS(5, 0), (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_DALIGN), 0, 0, PHYS(5, 0),
DFNS(AD_MAGM), NO_CARY, CONFLICT, A_LAWFUL, PM_CAVEMAN, NON_PM, 2500L), DFNS(AD_MAGM), NO_CARY, CONFLICT, A_LAWFUL, PM_CAVEMAN, NON_PM, 2500L,
NO_COLOR),
#if 0 /* OBSOLETE */ #if 0 /* OBSOLETE */
A("The Palantir of Westernesse", CRYSTAL_BALL, A("The Palantir of Westernesse", CRYSTAL_BALL,
(SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL), (SPFX_NOGEN|SPFX_RESTR|SPFX_INTEL),
(SPFX_ESP|SPFX_REGEN|SPFX_HSPDAM), 0, (SPFX_ESP|SPFX_REGEN|SPFX_HSPDAM), 0,
NO_ATTK, NO_DFNS, NO_CARY, NO_ATTK, NO_DFNS, NO_CARY,
TAMING, A_CHAOTIC, NON_PM , PM_ELF, 8000L ), TAMING, A_CHAOTIC, NON_PM , PM_ELF, 8000L, NO_COLOR ),
#endif #endif
A("The Staff of Aesculapius", QUARTERSTAFF, A("The Staff of Aesculapius", QUARTERSTAFF,
(SPFX_NOGEN | SPFX_RESTR | SPFX_ATTK | SPFX_INTEL | SPFX_DRLI (SPFX_NOGEN | SPFX_RESTR | SPFX_ATTK | SPFX_INTEL | SPFX_DRLI
| SPFX_REGEN), | SPFX_REGEN),
0, 0, DRLI(0, 0), DRLI(0, 0), NO_CARY, HEALING, A_NEUTRAL, PM_HEALER, 0, 0, DRLI(0, 0), DRLI(0, 0), NO_CARY, HEALING, A_NEUTRAL, PM_HEALER,
NON_PM, 5000L), NON_PM, 5000L, NO_COLOR),
A("The Magic Mirror of Merlin", MIRROR, A("The Magic Mirror of Merlin", MIRROR,
(SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_SPEAK), SPFX_ESP, 0, (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_SPEAK), SPFX_ESP, 0,
NO_ATTK, NO_DFNS, CARY(AD_MAGM), 0, A_LAWFUL, PM_KNIGHT, NON_PM, 1500L), NO_ATTK, NO_DFNS, CARY(AD_MAGM), 0, A_LAWFUL, PM_KNIGHT, NON_PM, 1500L,
NO_COLOR),
A("The Eyes of the Overworld", LENSES, A("The Eyes of the Overworld", LENSES,
(SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_XRAY), 0, 0, NO_ATTK, (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_XRAY), 0, 0, NO_ATTK,
DFNS(AD_MAGM), NO_CARY, ENLIGHTENING, A_NEUTRAL, PM_MONK, NON_PM, DFNS(AD_MAGM), NO_CARY, ENLIGHTENING, A_NEUTRAL, PM_MONK, NON_PM,
2500L), 2500L, NO_COLOR),
A("The Mitre of Holiness", HELM_OF_BRILLIANCE, A("The Mitre of Holiness", HELM_OF_BRILLIANCE,
(SPFX_NOGEN | SPFX_RESTR | SPFX_DFLAG2 | SPFX_INTEL | SPFX_PROTECT), 0, (SPFX_NOGEN | SPFX_RESTR | SPFX_DFLAG2 | SPFX_INTEL | SPFX_PROTECT), 0,
M2_UNDEAD, NO_ATTK, NO_DFNS, CARY(AD_FIRE), ENERGY_BOOST, A_LAWFUL, M2_UNDEAD, NO_ATTK, NO_DFNS, CARY(AD_FIRE), ENERGY_BOOST, A_LAWFUL,
PM_PRIEST, NON_PM, 2000L), PM_PRIEST, NON_PM, 2000L, NO_COLOR),
A("The Longbow of Diana", BOW, A("The Longbow of Diana", BOW,
(SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_REFLECT), SPFX_ESP, 0, (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_REFLECT), SPFX_ESP, 0,
PHYS(5, 0), NO_DFNS, NO_CARY, CREATE_AMMO, A_CHAOTIC, PM_RANGER, NON_PM, PHYS(5, 0), NO_DFNS, NO_CARY, CREATE_AMMO, A_CHAOTIC, PM_RANGER, NON_PM,
4000L), 4000L, NO_COLOR),
A("The Master Key of Thievery", SKELETON_KEY, A("The Master Key of Thievery", SKELETON_KEY,
(SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_SPEAK), (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_SPEAK),
(SPFX_WARN | SPFX_TCTRL | SPFX_HPHDAM), 0, NO_ATTK, NO_DFNS, NO_CARY, (SPFX_WARN | SPFX_TCTRL | SPFX_HPHDAM), 0, NO_ATTK, NO_DFNS, NO_CARY,
UNTRAP, A_CHAOTIC, PM_ROGUE, NON_PM, 3500L), UNTRAP, A_CHAOTIC, PM_ROGUE, NON_PM, 3500L, NO_COLOR),
A("The Tsurugi of Muramasa", TSURUGI, A("The Tsurugi of Muramasa", TSURUGI,
(SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_BEHEAD | SPFX_LUCK (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_BEHEAD | SPFX_LUCK
| SPFX_PROTECT), | SPFX_PROTECT),
0, 0, PHYS(0, 8), NO_DFNS, NO_CARY, 0, A_LAWFUL, PM_SAMURAI, NON_PM, 0, 0, PHYS(0, 8), NO_DFNS, NO_CARY, 0, A_LAWFUL, PM_SAMURAI, NON_PM,
4500L), 4500L, NO_COLOR),
A("The Platinum Yendorian Express Card", CREDIT_CARD, A("The Platinum Yendorian Express Card", CREDIT_CARD,
(SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_DEFN), (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_DEFN),
(SPFX_ESP | SPFX_HSPDAM), 0, NO_ATTK, NO_DFNS, CARY(AD_MAGM), (SPFX_ESP | SPFX_HSPDAM), 0, NO_ATTK, NO_DFNS, CARY(AD_MAGM),
CHARGE_OBJ, A_NEUTRAL, PM_TOURIST, NON_PM, 7000L), CHARGE_OBJ, A_NEUTRAL, PM_TOURIST, NON_PM, 7000L, NO_COLOR),
A("The Orb of Fate", CRYSTAL_BALL, A("The Orb of Fate", CRYSTAL_BALL,
(SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_LUCK), (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL | SPFX_LUCK),
(SPFX_WARN | SPFX_HSPDAM | SPFX_HPHDAM), 0, NO_ATTK, NO_DFNS, NO_CARY, (SPFX_WARN | SPFX_HSPDAM | SPFX_HPHDAM), 0, NO_ATTK, NO_DFNS, NO_CARY,
LEV_TELE, A_NEUTRAL, PM_VALKYRIE, NON_PM, 3500L), LEV_TELE, A_NEUTRAL, PM_VALKYRIE, NON_PM, 3500L, NO_COLOR),
A("The Eye of the Aethiopica", AMULET_OF_ESP, A("The Eye of the Aethiopica", AMULET_OF_ESP,
(SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL), (SPFX_EREGEN | SPFX_HSPDAM), 0, (SPFX_NOGEN | SPFX_RESTR | SPFX_INTEL), (SPFX_EREGEN | SPFX_HSPDAM), 0,
NO_ATTK, DFNS(AD_MAGM), NO_CARY, CREATE_PORTAL, A_NEUTRAL, PM_WIZARD, NO_ATTK, DFNS(AD_MAGM), NO_CARY, CREATE_PORTAL, A_NEUTRAL, PM_WIZARD,
NON_PM, 4000L), NON_PM, 4000L, NO_COLOR),
/* /*
* terminator; otyp must be zero * terminator; otyp must be zero
*/ */
A(0, 0, 0, 0, 0, NO_ATTK, NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 0L) A(0, 0, 0, 0, 0, NO_ATTK, NO_DFNS, NO_CARY, 0, A_NONE, NON_PM, NON_PM, 0L,
0) /* 0 is CLR_BLACK rather than NO_COLOR but it doesn't matter here */
}; /* artilist[] (or artifact_names[]) */ }; /* artilist[] (or artifact_names[]) */
+3 -1
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 extern.h $NHDT-Date: 1432890461 2015/05/29 09:07:41 $ $NHDT-Branch: master $:$NHDT-Revision: 1.498 $ */ /* NetHack 3.6 extern.h $NHDT-Date: 1433050874 2015/05/31 05:41:14 $ $NHDT-Branch: master $:$NHDT-Revision: 1.499 $ */
/* 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. */
@@ -88,6 +88,7 @@ E long FDECL(spec_m2, (struct obj *));
E boolean FDECL(artifact_has_invprop, (struct obj *, UCHAR_P)); E boolean FDECL(artifact_has_invprop, (struct obj *, UCHAR_P));
E long FDECL(arti_cost, (struct obj *)); E long FDECL(arti_cost, (struct obj *));
E struct obj *FDECL(what_gives, (long *)); E struct obj *FDECL(what_gives, (long *));
E const char *FDECL(glow_color, (int));
E void FDECL(Sting_effects, (int)); E void FDECL(Sting_effects, (int));
E int FDECL(retouch_object, (struct obj **, BOOLEAN_P)); E int FDECL(retouch_object, (struct obj **, BOOLEAN_P));
E void FDECL(retouch_equipment, (int)); E void FDECL(retouch_equipment, (int));
@@ -1636,6 +1637,7 @@ E void FDECL(parsesymbols, (char *));
E struct symparse *FDECL(match_sym, (char *)); E struct symparse *FDECL(match_sym, (char *));
E void NDECL(set_playmode); E void NDECL(set_playmode);
E int FDECL(sym_val, (char *)); E int FDECL(sym_val, (char *));
E const char *FDECL(clr2colorname, (int));
E boolean FDECL(add_menu_coloring, (char *)); E boolean FDECL(add_menu_coloring, (char *));
E boolean FDECL(get_menu_coloring, (char *, int *, int *)); E boolean FDECL(get_menu_coloring, (char *, int *, int *));
E void NDECL(free_menu_coloring); E void NDECL(free_menu_coloring);
+31 -15
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 artifact.c $NHDT-Date: 1432946531 2015/05/30 00:42:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.89 $ */ /* NetHack 3.6 artifact.c $NHDT-Date: 1433050876 2015/05/31 05:41:16 $ $NHDT-Branch: master $:$NHDT-Revision: 1.90 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -1784,10 +1784,12 @@ long *abil;
unsigned long spfx; unsigned long spfx;
long wornbits; long wornbits;
long wornmask = long wornmask =
(W_ARM | W_ARMC | W_ARMH | W_ARMS | W_ARMG | W_ARMF | W_WEP | W_QUIVER (W_ARM | W_ARMC | W_ARMH | W_ARMS | W_ARMG | W_ARMF | W_ARMU
| W_SWAPWEP | W_ART | W_ARTI | W_AMUL | W_RINGL | W_RINGR | W_TOOL | W_AMUL | W_RINGL | W_RINGR | W_TOOL | W_ART | W_ARTI);
| W_BALL | W_CHAIN | W_SADDLE | W_ARMU); /* [do W_ART and W_ARTI actually belong here?] */
if (u.twoweap)
wornmask |= W_SWAPWEP;
dtyp = abil_to_adtyp(abil); dtyp = abil_to_adtyp(abil);
spfx = abil_to_spfx(abil); spfx = abil_to_spfx(abil);
wornbits = (wornmask & *abil); wornbits = (wornmask & *abil);
@@ -1795,14 +1797,21 @@ long *abil;
for (obj = invent; obj; obj = obj->nobj) { for (obj = invent; obj; obj = obj->nobj) {
if (obj->oartifact if (obj->oartifact
&& ((abil != &EWarn_of_mon) || context.warntype.obj)) { && ((abil != &EWarn_of_mon) || context.warntype.obj)) {
register const struct artifact *art = get_artifact(obj); const struct artifact *art = get_artifact(obj);
if (art) { if (art) {
if (dtyp if (dtyp) {
&& (art->cary.adtyp == dtyp || art->defn.adtyp == dtyp)) if (art->cary.adtyp == dtyp || art->defn.adtyp == dtyp)
return obj; return obj;
if (spfx && ((art->cspfx & spfx) == spfx }
|| (art->spfx & spfx) == spfx)) if (spfx) {
return obj; /* property conferred when carried */
if ((art->cspfx & spfx) == spfx)
return obj;
/* property conferred when wielded or worn */
if ((art->spfx & spfx) == spfx && obj->owornmask)
return obj;
}
} }
} else { } else {
if (wornbits && wornbits == (wornmask & obj->owornmask)) if (wornbits && wornbits == (wornmask & obj->owornmask))
@@ -1812,6 +1821,16 @@ long *abil;
return (struct obj *) 0; return (struct obj *) 0;
} }
const char *
glow_color(arti_indx)
int arti_indx;
{
int colornum = artilist[arti_indx].acolor;
const char *colorstr = clr2colorname(colornum);
return hcolor(colorstr);
}
/* use for warning "glow" for Sting, Orcrist, and Grimtooth */ /* use for warning "glow" for Sting, Orcrist, and Grimtooth */
void void
Sting_effects(orc_count) Sting_effects(orc_count)
@@ -1831,10 +1850,7 @@ int orc_count;
if (orc_count > 0 && warn_obj_cnt == 0) { if (orc_count > 0 && warn_obj_cnt == 0) {
if (!Blind) if (!Blind)
pline("%s %s %s!", bare_artifactname(uwep), pline("%s %s %s!", bare_artifactname(uwep),
otense(uwep, "glow"), otense(uwep, "glow"), glow_color(uwep->oartifact));
hcolor((uwep->oartifact == ART_GRIMTOOTH)
? NH_RED
: NH_LIGHT_BLUE));
else else
pline("%s quivers slightly.", bare_artifactname(uwep)); pline("%s quivers slightly.", bare_artifactname(uwep));
} else if (orc_count == 0 && warn_obj_cnt > 0) { } else if (orc_count == 0 && warn_obj_cnt > 0) {
+4 -5
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 cmd.c $NHDT-Date: 1432512764 2015/05/25 00:12:44 $ $NHDT-Branch: master $:$NHDT-Revision: 1.192 $ */ /* NetHack 3.6 cmd.c $NHDT-Date: 1433050877 2015/05/31 05:41:17 $ $NHDT-Branch: master $:$NHDT-Revision: 1.193 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -1952,10 +1952,9 @@ int final;
you_are("warned", from_what(WARNING)); you_are("warned", from_what(WARNING));
if (Warn_of_mon && context.warntype.obj) { if (Warn_of_mon && context.warntype.obj) {
Sprintf(buf, "aware of the presence of %s", Sprintf(buf, "aware of the presence of %s",
(context.warntype.obj & M2_ORC) (context.warntype.obj & M2_ORC) ? "orcs"
? "orcs" : (context.warntype.obj & M2_ELF) ? "elves"
: (context.warntype.obj & M2_DEMON) ? "demons" : (context.warntype.obj & M2_DEMON) ? "demons" : something);
: something);
you_are(buf, from_what(WARN_OF_MON)); you_are(buf, from_what(WARN_OF_MON));
} }
if (Warn_of_mon && context.warntype.polyd) { if (Warn_of_mon && context.warntype.polyd) {
+12 -4
View File
@@ -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. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* 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 /* similar to simple_typename but minimal_xname operates on a particular
object rather than its general type; it formats the most basic info: object rather than its general type; it formats the most basic info:
potion -- if description not known potion -- if description not known
brown potion -- if oc_name_known not set brown potion -- if oc_name_known not set
potion of object detection -- if discovered potion of object detection -- if discovered
*/ */
static char * static char *
minimal_xname(obj) minimal_xname(obj)
@@ -945,6 +945,13 @@ boolean with_price;
if (bimanual(obj)) if (bimanual(obj))
hand_s = makeplural(hand_s); hand_s = makeplural(hand_s);
Sprintf(eos(bp), " (weapon in %s)", 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) { if (obj->owornmask & W_SWAPWEP) {
@@ -991,6 +998,7 @@ boolean with_price;
quotedprice, currency(quotedprice)); quotedprice, currency(quotedprice));
} else if (with_price) { } else if (with_price) {
long price = get_cost_of_shop_item(obj); long price = get_cost_of_shop_item(obj);
if (price > 0) if (price > 0)
Sprintf(eos(bp), " (%ld %s)", price, currency(price)); Sprintf(eos(bp), " (%ld %s)", price, currency(price));
} }
+1 -2
View File
@@ -1,4 +1,4 @@
/* NetHack 3.6 options.c $NHDT-Date: 1432974335 2015/05/30 08:25:35 $ $NHDT-Branch: master $:$NHDT-Revision: 1.207 $ */ /* NetHack 3.6 options.c $NHDT-Date: 1433050879 2015/05/31 05:41:19 $ $NHDT-Branch: master $:$NHDT-Revision: 1.208 $ */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -502,7 +502,6 @@ STATIC_OVL boolean FDECL(wc2_supported, (const char *));
STATIC_DCL void FDECL(remove_autopickup_exception, STATIC_DCL void FDECL(remove_autopickup_exception,
(struct autopickup_exception *)); (struct autopickup_exception *));
STATIC_OVL int FDECL(count_ape_maps, (int *, int *)); STATIC_OVL int FDECL(count_ape_maps, (int *, int *));
STATIC_DCL const char *FDECL(clr2colorname, (int));
STATIC_DCL const char *FDECL(attr2attrname, (int)); STATIC_DCL const char *FDECL(attr2attrname, (int));
STATIC_DCL int NDECL(query_color); STATIC_DCL int NDECL(query_color);
STATIC_DCL int NDECL(query_msgtype); STATIC_DCL int NDECL(query_msgtype);