]> granicus.if.org Git - nethack/commitdiff
demon graft
authornethack.rankin <nethack.rankin>
Sun, 4 Dec 2005 04:12:45 +0000 (04:12 +0000)
committernethack.rankin <nethack.rankin>
Sun, 4 Dec 2005 04:12:45 +0000 (04:12 +0000)
      From a bug report, bribeable demons will demand money when
hero has fainted from lack of food and hero can pay while unconscious.  I
decided to just borrow from vault guard behavior and have the hero regain
consciousness.  It turns out that reset_faint() has been broken since a
long ago (before my time...) change to nomul() [nomul(0) is a no-op while
fainted since multi is negative then].  Now fixed; both bribe-demanding
demons and vault guards will cause fainted hero to wake up when they arrive.
If hero can't move for some reason other than fainting, demons will skip
the bribe demand and immediately become hostile (vault guard in that case
goes away after saying that he'll return).  There is no deafness handling;
perhaps the bribe demand is accompanied by sufficient pantomiming for the
hero to figure it out?  ;-)

     Also fix an unintended potential alignment hit against the player if
bribeable demon is killed after becoming hostile due to misjudging displaced
hero's location.

doc/fixes34.4
src/eat.c
src/minion.c
src/monmove.c

index 4194bde52644c7c243d831b935086501507e8afe..ce7cf491c9ae233175436550425790844ed53bdd 100644 (file)
@@ -164,6 +164,7 @@ tombstone's reason for death from kicking an object could include so much
        detail about the object that is was too verbose
 several quest messages were worded inappropriately if the hero was blind
 a samurai quest guardian message used "ninja" where "ronin" was intended
+revive from fainting if vault guard or bribe-demanding demon approaches
 
 
 Platform- and/or Interface-Specific Fixes
index a439021b63383cb05a3d865ddfd86405999de50d..064c9aedc1502b370fd0fb5f9e986cb85889bb55 100644 (file)
--- a/src/eat.c
+++ b/src/eat.c
@@ -2514,7 +2514,7 @@ is_fainted()
 void
 reset_faint()  /* call when a faint must be prematurely terminated */
 {
-       if(is_fainted()) nomul(0);
+       if (afternmv == unfaint) unmul("You revive.");
 }
 
 void
index 0480ea1d2ed2e4b476e2cc996d0e89d3c9667a77..f66cd1b7ddcf0f271e1a7ada24f936be734d61a7 100644 (file)
@@ -156,6 +156,13 @@ register struct monst *mtmp;
            return 0;
        }
 
+       if (is_fainted()) {
+           reset_faint();              /* if fainted - wake up */
+       } else {
+           stop_occupation();
+           if (multi > 0) { nomul(0); unmul((char *)0); }
+       }
+
        /* Slight advantage given. */
        if (is_dprince(mtmp->data) && mtmp->minvis) {
            mtmp->minvis = mtmp->perminvis = 0;
@@ -176,7 +183,7 @@ register struct monst *mtmp;
        demand = (cash * (rnd(80) + 20 * Athome)) /
            (100 * (1 + (sgn(u.ualign.type) == sgn(mtmp->data->maligntyp))));
 
-       if (!demand) {          /* you have no gold */
+       if (!demand || multi < 0) {     /* you have no gold or can't move */
            mtmp->mpeaceful = 0;
            set_malign(mtmp);
            return 0;
index 1fb1d49345d00513850fec383a03eaa1e0364fd9..a247d1f3d17824e0aa1c2e94d091b86f9fd82618 100644 (file)
@@ -396,6 +396,7 @@ register struct monst *mtmp;
                            /* Why?  For the same reason in real demon talk */
                            pline("%s gets angry!", Amonnam(mtmp));
                            mtmp->mpeaceful = 0;
+                           set_malign(mtmp);
                            /* since no way is an image going to pay it off */
                        }
                } else if(demon_talk(mtmp)) return(1);  /* you paid it off */