From 9799fec87d95a433c12ba905af4d6ac4c09fba40 Mon Sep 17 00:00:00 2001 From: "nethack.rankin" Date: Fri, 10 Jan 2003 09:22:08 +0000 Subject: [PATCH] fix B16004 - more demon bribing For the bribery check that lets you get away with offering a little bit less than what was demanded, never treat an offer of 0 as acceptible. Also, add some missing set_malign() calls. --- src/minion.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/minion.c b/src/minion.c index fa33d816f..50d23ce5d 100644 --- a/src/minion.c +++ b/src/minion.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)minion.c 3.4 2002/12/16 */ +/* SCCS Id: @(#)minion.c 3.4 2003/01/09 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -147,6 +147,7 @@ register struct monst *mtmp; if (uwep && uwep->oartifact == ART_EXCALIBUR) { pline("%s looks very angry.", Amonnam(mtmp)); mtmp->mpeaceful = mtmp->mtame = 0; + set_malign(mtmp); newsym(mtmp->mx, mtmp->my); return 0; } @@ -173,11 +174,12 @@ register struct monst *mtmp; if (!demand) { /* you have no gold */ mtmp->mpeaceful = 0; + set_malign(mtmp); return 0; } else { /* make sure that the demand is unmeetable if the monster - has the Amulet, preventing it from being satisified and - removed from the game (along with said Amulet...) */ + has the Amulet, preventing monster from being satisified + and removed from the game (along with said Amulet...) */ if (mon_has_amulet(mtmp)) demand = cash + (long)rn1(1000,40); @@ -187,15 +189,14 @@ register struct monst *mtmp; if ((offer = bribe(mtmp)) >= demand) { pline("%s vanishes, laughing about cowardly mortals.", Amonnam(mtmp)); + } else if (offer > 0L && (long)rnd(40) > (demand - offer)) { + pline("%s scowls at you menacingly, then vanishes.", + Amonnam(mtmp)); } else { - if ((long)rnd(40) > (demand - offer)) { - pline("%s scowls at you menacingly, then vanishes.", - Amonnam(mtmp)); - } else { - pline("%s gets angry...", Amonnam(mtmp)); - mtmp->mpeaceful = 0; - return 0; - } + pline("%s gets angry...", Amonnam(mtmp)); + mtmp->mpeaceful = 0; + set_malign(mtmp); + return 0; } } mongone(mtmp); -- 2.40.0