]> granicus.if.org Git - nethack/commitdiff
two figurine tweaks
authornethack.rankin <nethack.rankin>
Thu, 26 Sep 2002 04:05:54 +0000 (04:05 +0000)
committernethack.rankin <nethack.rankin>
Thu, 26 Sep 2002 04:05:54 +0000 (04:05 +0000)
     Fix the reported problem of applying a figurine while swallowed
and getting a message about setting the figuring on the ground.  Rather
than coming with special messages, just prevent it would activating if
you're swallowed at the time.

     Also prevent figurines from creating the 4th erinys or 10th Nazgul.
I'm not sure whether to bother doing similar handling for stone-to-flesh
cast on statues.

doc/fixes34.1
src/apply.c
src/dog.c

index ccfe90b678b60917a273695c722a837407e5d352..a9f1d55b0f5f935dc111e94bc924fc65c1fcf614 100644 (file)
@@ -256,6 +256,8 @@ for wizard and explore modes, skip second screen of ^X output when first
 polyself into minotaur causes hard headgear to fall off
 with multiple leashes in use, 2nd had 50/50 chance of having unbounded length
 GOLDOBJ: coins aren't subject to curses/blesses and don't need identification
+can no longer activate a figurine while engulfed
+can't use figurines to get too many erinyes or Nazgul
 
 
 Platform- and/or Interface-Specific Fixes
index 0a5ba9dfe2e18068010d8f6a89e4b810e03c889c..75f52d604bbc023948a1a66e003689df71088efd 100644 (file)
@@ -1700,6 +1700,11 @@ boolean quietly;
 {
        xchar x,y;
 
+       if (carried(obj) && u.uswallow) {
+               if (!quietly)
+                       You("don't have enough room in here.");
+               return FALSE;
+       }
        x = cc->x; y = cc->y;
        if (!isok(x,y)) {
                if (!quietly)
@@ -1729,6 +1734,11 @@ register struct obj *obj;
        xchar x, y;
        coord cc;
 
+       if (u.uswallow) {
+               /* can't activate a figurine while swallowed */
+               if (!figurine_location_checks(obj, (coord *)0, FALSE))
+                       return;
+       }
        if(!getdir((char *)0)) {
                flags.move = multi = 0;
                return;
index c1a38a6f1a8fd4ff87ceeea568eacd007b367b9f..03374e806236a8e2b308996f39d604ef6ee5232e 100644 (file)
--- a/src/dog.c
+++ b/src/dog.c
@@ -56,8 +56,20 @@ boolean quietly;
        int chance, trycnt = 100;
 
        do {
-           if (otmp) {
-               pm = &mons[otmp->corpsenm]; /* Figurine; otherwise spell */
+           if (otmp) { /* figurine; otherwise spell */
+               int mndx = otmp->corpsenm;
+               pm = &mons[mndx];
+               /* activating a figurine provides one way to exceed the
+                  maximum number of the target critter created--unless
+                  it has a special limit (erinys, Nazgul) */
+               if ((mvitals[mndx].mvflags & G_EXTINCT) &&
+                       mbirth_limit(mndx) != MAXMONNO) {
+                   if (!quietly)
+                       /* have just been given "You <do something with>
+                          the figurine and it transforms." message */
+                       pline("... into a pile of dust.");
+                   break;      /* mtmp is null */
+               }
            } else if (!rn2(3)) {
                pm = &mons[pet_type()];
            } else {