in the usual water effects
removing a ring of levitation while engulfed should not invoke spoteffects
feedback from invoking Orb of Detection was sometimes misleading or wrong
+ranger quest artifact (Longbow of Diana) confers reflection when wielded by
+ monsters like it does for the player
Platform- and/or Interface-Specific Fixes
E int NDECL(nartifact_exist);
E boolean FDECL(spec_ability, (struct obj *,unsigned long));
E boolean FDECL(confers_luck, (struct obj *));
+E boolean FDECL(arti_reflects, (struct obj *));
E boolean FDECL(restrict_name, (struct obj *,const char *));
E boolean FDECL(defends, (int,struct obj *));
E boolean FDECL(protects, (int,struct obj *));
return (obj->oartifact && spec_ability(obj, SPFX_LUCK));
}
+/* used to check whether a monster is getting reflection from an artifact */
+boolean
+arti_reflects(obj)
+struct obj *obj;
+{
+ const struct artifact *arti = get_artifact(obj);
+
+ if (arti) {
+ /* while being worn */
+ if ((obj->owornmask & ~W_ART) && (arti->spfx & SPFX_REFLECT))
+ return TRUE;
+ /* just being carried */
+ if (arti->cspfx & SPFX_REFLECT) return TRUE;
+ }
+ return FALSE;
+}
+
#endif /* OVL0 */
#ifdef OVLB
-/* SCCS Id: @(#)muse.c 3.4 2002/08/29 */
+/* SCCS Id: @(#)muse.c 3.4 2002/12/23 */
/* Copyright (C) 1990 by Ken Arromdee */
/* NetHack may be freely redistributed. See license for details. */
makeknown(SHIELD_OF_REFLECTION);
}
return TRUE;
+ } else if (arti_reflects(MON_WEP(mon))) {
+ /* due to wielded artifact weapon */
+ if (str)
+ pline(str, s_suffix(mon_nam(mon)), "weapon");
+ return TRUE;
} else if ((orefl = which_armor(mon, W_AMUL)) &&
orefl->otyp == AMULET_OF_REFLECTION) {
if (str) {