diff --git a/doc/fixes34.4 b/doc/fixes34.4 index 1b3b86448..aac5b350f 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -109,6 +109,7 @@ after destroying drawbridge, hero could appear to be in the wall sometimes shop items which hero is forced to buy could be sold back twice vision was not updated when polymorphing a statue into a boulder `I u' when carrying single unpaid item listed its cost twice +armor which auto-curses when worn by hero should do same if worn by monster Platform- and/or Interface-Specific Fixes diff --git a/src/worn.c b/src/worn.c index dd23c0e6b..aabb79049 100644 --- a/src/worn.c +++ b/src/worn.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)worn.c 3.5 2003/01/08 */ +/* SCCS Id: @(#)worn.c 3.5 2005/04/06 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -405,6 +405,7 @@ boolean racialexception; struct obj *old, *best, *obj; int m_delay = 0; int unseen = !canseemon(mon); + boolean autocurse; char nambuf[BUFSZ]; if (mon->mfrozen) return; /* probably putting previous item on */ @@ -467,6 +468,9 @@ boolean racialexception; outer_break: if (!best || best == old) return; + /* same auto-cursing behavior as for hero */ + autocurse = ((best->otyp == HELM_OF_OPPOSITE_ALIGNMENT || + best->otyp == DUNCE_CAP) && !best->cursed); /* if wearing a cloak, account for the time spent removing and re-wearing it when putting on a suit or shirt */ if ((flag == W_ARM @@ -492,6 +496,10 @@ outer_break: buf[0] = '\0'; pline("%s%s puts on %s.", Monnam(mon), buf, distant_name(best,doname)); + if (autocurse) + pline("%s %s %s %s for a moment.", + s_suffix(Monnam(mon)), simple_typename(best->otyp), + otense(best, "glow"), hcolor(NH_BLACK)); } /* can see it */ m_delay += objects[best->otyp].oc_delay; mon->mfrozen = m_delay; @@ -501,6 +509,7 @@ outer_break: update_mon_intrinsics(mon, old, FALSE, creation); mon->misc_worn_check |= flag; best->owornmask |= flag; + if (autocurse) curse(best); update_mon_intrinsics(mon, best, TRUE, creation); /* if couldn't see it but now can, or vice versa, */ if (!creation && (unseen ^ !canseemon(mon))) {