From: nethack.allison <nethack.allison>
Date: Sun, 7 Apr 2002 13:42:18 +0000 (+0000)
Subject: allow vengeance against nymphs except for specific case
X-Git-Tag: MOVE2GIT~2804
X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=7c386ab823f5ca1163f2df544c80a6b1b438b792;p=nethack

allow vengeance against nymphs except for specific case

From: "Ken Arromdee" :
> My point is that you should be allowed to take vengeance on thieving
> nymphs too.  The reasoning "a real knight wouldn't kill a nymph for stealing"
> doesn't make sense because the things a real knight would do instead (like
> arresting) aren't part of the game.

This is a compromise.  This doesn't allow vengeance when you were
told "you gladly hand over ...", but does for most other cases, and for
leprechauns.
---

diff --git a/doc/fixes34.1 b/doc/fixes34.1
index 954c35fb2..e2b06391c 100644
--- a/doc/fixes34.1
+++ b/doc/fixes34.1
@@ -62,6 +62,7 @@ assorted monsters can pass through iron bars; ditto for polymorphed character
 attempting to dig iron bars will wake nearby monsters instead of yielding
 	"you swing your pick-axe through thin air"
 autodig won't accept iron bars as candidate location
+allow knight to retaliate for all thefts except those "you gladly hand over..."
 
 
 Platform- and/or Interface-Specific Fixes
diff --git a/src/mhitu.c b/src/mhitu.c
index 8ac2262fa..df9350aba 100644
--- a/src/mhitu.c
+++ b/src/mhitu.c
@@ -1236,11 +1236,6 @@ do_stone:
 			if (!is_animal(mtmp->data) && !tele_restrict(mtmp))
 			    rloc(mtmp);
 			if (is_animal(mtmp->data) && *buf) {
-			    /* set mavenge bit for animals so knights won't
-			       suffer an alignment penalty during retaliation;
-			       note that only happens when the thief succeeds
-			       in getting something (*buf != 0) */
-			    mtmp->mavenge = 1;
 			    if (canseemon(mtmp))
 				pline("%s tries to %s away with %s.",
 				      Monnam(mtmp),
diff --git a/src/steal.c b/src/steal.c
index 482699d7d..9f5fed4a1 100644
--- a/src/steal.c
+++ b/src/steal.c
@@ -51,6 +51,7 @@ register struct monst *mtmp;
 		    Monnam(mtmp), makeplural(body_part(FOOT)));
 	    if(!u.ugold || !rn2(5)) {
 		if (!tele_restrict(mtmp)) rloc(mtmp);
+		/* do not set mtmp->mavenge here; gold on the floor is fair game */
 		monflee(mtmp, 0, FALSE, FALSE);
 	    }
 	} else if(u.ugold) {
@@ -58,6 +59,7 @@ register struct monst *mtmp;
 	    Your("purse feels lighter.");
 	    mtmp->mgold += tmp;
 	if (!tele_restrict(mtmp)) rloc(mtmp);
+	    mtmp->mavenge = 1;
 	    monflee(mtmp, 0, FALSE, FALSE);
 	    flags.botl = 1;
 	}
@@ -157,6 +159,8 @@ stealarm()
 			freeinv(otmp);
 			pline("%s steals %s!", Monnam(mtmp), doname(otmp));
 			(void) mpickobj(mtmp,otmp);	/* may free otmp */
+			/* Implies seduction, "you gladly hand over ..."
+			   so we don't set mavenge bit here. */
 			monflee(mtmp, 0, FALSE, FALSE);
 			if (!tele_restrict(mtmp)) rloc(mtmp);
 		        break;
@@ -398,6 +402,10 @@ gotobj:
 
 	/* do this before removing it from inventory */
 	if (objnambuf) Strcpy(objnambuf, yname(otmp));
+	/* set mavenge bit so knights won't suffer an
+	 * alignment penalty during retaliation;
+	 */
+	mtmp->mavenge = 1;
 
 	freeinv(otmp);
 	pline("%s stole %s.", named ? "She" : Monnam(mtmp), doname(otmp));