]> granicus.if.org Git - nethack/commitdiff
display bit for spellbook gift (trunk only)
authornethack.rankin <nethack.rankin>
Tue, 28 Oct 2003 06:55:18 +0000 (06:55 +0000)
committernethack.rankin <nethack.rankin>
Tue, 28 Oct 2003 06:55:18 +0000 (06:55 +0000)
     From the newsgroup:  when invisible and unable to see invisible,
if successful prayer results in being given a spellbook you'll get the
message "an object appears at your feet" but the spellbook won't show on
the map.  Add a newsym() to force its location to be updated.  (I didn't
try to figure out why spellbooks use place_object() when all other divine
gifts use dropy() but that's why only this case has the display glitch.)

     This also fixes up the message vs map update sequencing for a couple
of other "at your feet" cases so that all of them use the same ordering:
first the message is given, then the object drops.

[Timing is the only reason not to put this simple change into 3.4.3.]

doc/fixes35.0
src/pray.c

index 223ef539daa1e8359f88ef930101040e5f344507..303d3c17ef9b39f9cb7fe6ac1fca6d729ccf6973 100644 (file)
@@ -47,6 +47,7 @@ make it possible for the code to recognize your starting pet throughout the
        game via is_starting_pet(mon) macro
 healers notice when a wand of undead turning revives a monster so the
        wand is then identified
+update display if bestowed a spellbook while unable to see invisible self
 
 
 Platform- and/or Interface-Specific Fixes
index a35259a9c6fbcf044e55d360d529d0c043e492da..18456f574932b2276ef4df2f69e79ab87be6b6de 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)pray.c     3.4     2003/03/23      */
+/*     SCCS Id: @(#)pray.c     3.4     2003/10/26      */
 /* Copyright (c) Benson I. Margulies, Mike Stephenson, Steve Linhart, 1989. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -748,8 +748,8 @@ gcrownu()
        } else if (!already_exists) {
            obj = mksobj(RUNESWORD, FALSE, FALSE);
            obj = oname(obj, artiname(ART_STORMBRINGER));
-           at_your_feet(An(swordbuf));
            obj->spe = 1;
+           at_your_feet(An(swordbuf));
            dropy(obj);
            u.ugifts++;
        }
@@ -989,7 +989,6 @@ pleased(g_align)
            struct obj *otmp;
            int sp_no, trycnt = u.ulevel + 1;
 
-           at_your_feet("An object");
            /* not yet known spells given preference over already known ones */
            /* Also, try to grant a spell for which there is a skill slot */
            otmp = mkobj(SPBOOK_CLASS, TRUE);
@@ -1007,7 +1006,9 @@ pleased(g_align)
                otmp->otyp = rnd_class(bases[SPBOOK_CLASS], SPE_BLANK_PAPER);
            }
            bless(otmp);
+           at_your_feet("A spellbook");
            place_object(otmp, u.ux, u.uy);
+           newsym(u.ux, u.uy);
            break;
        }
        default:        impossible("Confused deity!");
@@ -1472,8 +1473,8 @@ verbalize("In return for thy service, I grant thee the gift of Immortality!");
                    if (otmp->spe < 0) otmp->spe = 0;
                    if (otmp->cursed) uncurse(otmp);
                    otmp->oerodeproof = TRUE;
-                   dropy(otmp);
                    at_your_feet("An object");
+                   dropy(otmp);
                    godvoice(u.ualign.type, "Use my gift wisely!");
                    u.ugifts++;
                    u.ublesscnt = rnz(300 + (50 * nartifacts));