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.
This commit is contained in:
nethack.rankin
2003-01-10 09:22:08 +00:00
parent dd7ab6b94d
commit 9799fec87d
+12 -11
View File
@@ -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. */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -147,6 +147,7 @@ register struct monst *mtmp;
if (uwep && uwep->oartifact == ART_EXCALIBUR) { if (uwep && uwep->oartifact == ART_EXCALIBUR) {
pline("%s looks very angry.", Amonnam(mtmp)); pline("%s looks very angry.", Amonnam(mtmp));
mtmp->mpeaceful = mtmp->mtame = 0; mtmp->mpeaceful = mtmp->mtame = 0;
set_malign(mtmp);
newsym(mtmp->mx, mtmp->my); newsym(mtmp->mx, mtmp->my);
return 0; return 0;
} }
@@ -173,11 +174,12 @@ register struct monst *mtmp;
if (!demand) { /* you have no gold */ if (!demand) { /* you have no gold */
mtmp->mpeaceful = 0; mtmp->mpeaceful = 0;
set_malign(mtmp);
return 0; return 0;
} else { } else {
/* make sure that the demand is unmeetable if the monster /* make sure that the demand is unmeetable if the monster
has the Amulet, preventing it from being satisified and has the Amulet, preventing monster from being satisified
removed from the game (along with said Amulet...) */ and removed from the game (along with said Amulet...) */
if (mon_has_amulet(mtmp)) if (mon_has_amulet(mtmp))
demand = cash + (long)rn1(1000,40); demand = cash + (long)rn1(1000,40);
@@ -187,15 +189,14 @@ register struct monst *mtmp;
if ((offer = bribe(mtmp)) >= demand) { if ((offer = bribe(mtmp)) >= demand) {
pline("%s vanishes, laughing about cowardly mortals.", pline("%s vanishes, laughing about cowardly mortals.",
Amonnam(mtmp)); Amonnam(mtmp));
} else if (offer > 0L && (long)rnd(40) > (demand - offer)) {
pline("%s scowls at you menacingly, then vanishes.",
Amonnam(mtmp));
} else { } else {
if ((long)rnd(40) > (demand - offer)) { pline("%s gets angry...", Amonnam(mtmp));
pline("%s scowls at you menacingly, then vanishes.", mtmp->mpeaceful = 0;
Amonnam(mtmp)); set_malign(mtmp);
} else { return 0;
pline("%s gets angry...", Amonnam(mtmp));
mtmp->mpeaceful = 0;
return 0;
}
} }
} }
mongone(mtmp); mongone(mtmp);