diff --git a/include/artilist.h b/include/artilist.h index 50ec60636..bde9d5b52 100644 --- a/include/artilist.h +++ b/include/artilist.h @@ -1,4 +1,4 @@ -/* NetHack 3.6 artilist.h $NHDT-Date: 1432512781 2015/05/25 00:13:01 $ $NHDT-Branch: master $:$NHDT-Revision: 1.14 $ */ +/* NetHack 3.6 artilist.h $NHDT-Date: 1432946531 2015/05/30 00:42:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.15 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -65,21 +65,24 @@ STATIC_OVL NEARDATA struct artifact artilist[] = { A("Cleaver", BATTLE_AXE, SPFX_RESTR, 0, 0, PHYS(3, 6), NO_DFNS, NO_CARY, 0, A_NEUTRAL, PM_BARBARIAN, NON_PM, 1500L), - A("Grimtooth", ORCISH_DAGGER, SPFX_RESTR, 0, 0, PHYS(2, 6), NO_DFNS, + /* + * Grimtooth glows in warning when elves are present, but its + * damage bonus applies to all targets rather than just elves + * (handled as special case in spec_dbon()). + */ + A("Grimtooth", ORCISH_DAGGER, (SPFX_RESTR | SPFX_WARN | SPFX_DFLAG2), + 0, M2_ELF, PHYS(2, 6), NO_DFNS, NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ORC, 300L), /* * Orcrist and Sting have same alignment as elves. + * + * The combination of SPFX_WARN+SPFX_DFLAG2+M2_value will trigger + * EWarn_of_mon for all monsters that have the M2_value flag. + * Sting and Orcrist will warn of M2_ORC monsters. */ - A("Orcrist", ELVEN_BROADSWORD, SPFX_DFLAG2, 0, M2_ORC, PHYS(5, 0), - NO_DFNS, NO_CARY, 0, A_CHAOTIC, NON_PM, PM_ELF, 2000L), + 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), - /* - * The combination of SPFX_WARN and M2_something on an artifact - * will trigger EWarn_of_mon for all monsters that have the - * appropriate - * M2_something flags. In Sting's case it will trigger EWarn_of_mon - * for M2_ORC monsters. - */ 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), /* diff --git a/src/artifact.c b/src/artifact.c index 2a5873f79..89ca6109a 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 artifact.c $NHDT-Date: 1432863398 2015/05/29 01:36:38 $ $NHDT-Branch: master $:$NHDT-Revision: 1.87 $ */ +/* NetHack 3.6 artifact.c $NHDT-Date: 1432946531 2015/05/30 00:42:11 $ $NHDT-Branch: master $:$NHDT-Revision: 1.89 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -842,6 +842,10 @@ int tmp; if (!weap || (weap->attk.adtyp == AD_PHYS && /* check for `NO_ATTK' */ weap->attk.damn == 0 && weap->attk.damd == 0)) spec_dbon_applies = FALSE; + else if (otmp->oartifact == ART_GRIMTOOTH) + /* Grimtooth has SPFX settings to warn against elves but we want its + damage bonus to apply to all targets, so bypass spec_applies() */ + spec_dbon_applies = TRUE; else spec_dbon_applies = spec_applies(weap, mon); @@ -1808,11 +1812,15 @@ long *abil; return (struct obj *) 0; } +/* use for warning "glow" for Sting, Orcrist, and Grimtooth */ void Sting_effects(orc_count) int orc_count; { - if (uwep && uwep->oartifact == ART_STING) { + if (uwep + && (uwep->oartifact == ART_STING + || uwep->oartifact == ART_ORCRIST + || uwep->oartifact == ART_GRIMTOOTH)) { /* * Toggling blindness in between warning messages can result in * Sting glows light blue! [...] Sting stops quivering. @@ -1824,7 +1832,9 @@ int orc_count; if (!Blind) pline("%s %s %s!", bare_artifactname(uwep), otense(uwep, "glow"), - hcolor(NH_LIGHT_BLUE)); + hcolor((uwep->oartifact == ART_GRIMTOOTH) + ? NH_RED + : NH_LIGHT_BLUE)); else pline("%s quivers slightly.", bare_artifactname(uwep)); } else if (orc_count == 0 && warn_obj_cnt > 0) { diff --git a/src/display.c b/src/display.c index 3bb62436c..70d88ef82 100644 --- a/src/display.c +++ b/src/display.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 display.c $NHDT-Date: 1432863399 2015/05/29 01:36:39 $ $NHDT-Branch: master $:$NHDT-Revision: 1.55 $ */ +/* NetHack 3.6 display.c $NHDT-Date: 1432946532 2015/05/30 00:42:12 $ $NHDT-Branch: master $:$NHDT-Revision: 1.56 $ */ /* Copyright (c) Dean Luick, with acknowledgements to Kevin Darcy */ /* and Dave Cohrs, 1990. */ /* NetHack may be freely redistributed. See license for details. */ @@ -1147,8 +1147,7 @@ see_monsters() /* * Make Sting glow blue or stop glowing if required. */ - if (new_warn_obj_cnt != warn_obj_cnt && uwep - && uwep->oartifact == ART_STING) { + if (new_warn_obj_cnt != warn_obj_cnt) { Sting_effects(new_warn_obj_cnt); warn_obj_cnt = new_warn_obj_cnt; }