give better feedback when thrown shop-owned food gets used up taming a monster
effect of negative AC on damage received was calculated differently than
normal when deciding whether hero poly'd into pudding would split
+unicorn horn produced by revived monster will polymorph as if non-magic
Platform- and/or Interface-Specific Fixes
-/* SCCS Id: @(#)obj.h 3.5 2007/02/17 */
+/* SCCS Id: @(#)obj.h 3.5 2007/03/30 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
Bitfield(oerodeproof,1); /* erodeproof weapon/armor */
Bitfield(olocked,1); /* object is locked */
Bitfield(obroken,1); /* lock has been broken */
+#define degraded_horn obroken /* unicorn horn will poly to non-magic */
Bitfield(otrapped,1); /* container is trapped */
/* or accidental tripped rolling boulder trap */
#define opoisoned otrapped /* object (weapon) is coated with poison */
-/* SCCS Id: @(#)mon.c 3.5 2007/02/08 */
+/* SCCS Id: @(#)mon.c 3.5 2007/03/30 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
case PM_WHITE_UNICORN:
case PM_GRAY_UNICORN:
case PM_BLACK_UNICORN:
- if (mtmp->mrevived && rn2(20)) {
- if (canseemon(mtmp))
- pline("%s recently regrown horn crumbles to dust.",
- s_suffix(Monnam(mtmp)));
- } else
- (void) mksobj_at(UNICORN_HORN, x, y, TRUE, FALSE);
+ if (mtmp->mrevived && rn2(2)) {
+ if (canseemon(mtmp))
+ pline("%s recently regrown horn crumbles to dust.",
+ s_suffix(Monnam(mtmp)));
+ } else {
+ obj = mksobj_at(UNICORN_HORN, x, y, TRUE, FALSE);
+ if (obj && mtmp->mrevived) obj->degraded_horn = 1;
+ }
goto default_1;
case PM_LONG_WORM:
(void) mksobj_at(WORM_TOOTH, x, y, TRUE, FALSE);
-/* SCCS Id: @(#)zap.c 3.5 2007/02/17 */
+/* SCCS Id: @(#)zap.c 3.5 2007/03/30 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
change_luck(-1); /* Sokoban guilt */
if (id == STRANGE_OBJECT) { /* preserve symbol */
int try_limit = 3;
+ unsigned magic_obj = objects[obj->otyp].oc_magic;
+
+ if (obj->otyp == UNICORN_HORN && obj->degraded_horn) magic_obj = 0;
/* Try up to 3 times to make the magic-or-not status of
the new item be the same as it was for the old one. */
otmp = (struct obj *)0;
if (otmp) delobj(otmp);
otmp = mkobj(obj->oclass, FALSE);
} while (--try_limit > 0 &&
- objects[obj->otyp].oc_magic != objects[otmp->otyp].oc_magic);
+ objects[otmp->otyp].oc_magic != magic_obj);
} else {
/* literally replace obj with this new thing */
otmp = mksobj(id, FALSE, FALSE);