]> granicus.if.org Git - nethack/commitdiff
<Someone>'s were_summon rules
authornethack.allison <nethack.allison>
Thu, 23 Oct 2003 12:13:21 +0000 (12:13 +0000)
committernethack.allison <nethack.allison>
Thu, 23 Oct 2003 12:13:21 +0000 (12:13 +0000)
>Hemmed in by one invisible wererat?
><Someone>: Should I feel hemmed in if I can see that a wererat summons
>zero rats? Can the invisible wererat hem me in all by itself? And
>even if it had summoned anything, wouldn't a different message had
>been clearer (for isntance, "Rats appear around you!"); after all,
>I could see *what* was hemming me in.
>I agree that the current messages (and even the ones aspired to by the
>comment) are non-ideal.

<Someone>'s suggested set-up:
Seen summoner, seen help    : "The wererat summons help!"
Seen summoner, unseen help: "The wererat summons help! You feel hemmed in."
Seen summoner, no help: "The wererat summons help! But none comes."
Unseen summoner, seen help: "(A rat appears|Rats appear) from
nowhere!"
Unseen summoner, unseen help: "You feel hemmed in."
Unseen summoner, no help: No message.

doc/fixes34.3
src/mhitu.c
src/polyself.c
src/were.c

index 212fafacfd185f0b03dc88edf4964f3c59fb0b56..21c022b325d3c178ebd16da4ab28043c57b11390 100644 (file)
@@ -73,6 +73,7 @@ reading a cursed scroll of light in a corridor wouldn't display correctly
 barbarians can become export in short sword skill
 samurai are now limited to master in martial arts skill; barbarians and
        cavemen are now limited to master in bare-handed combat skill
+tweak messages when werefoo summons help
 
 
 Platform- and/or Interface-Specific Fixes
index 859d82639531313b138eb7b07439a18941ed1656..d0b93cb3a1e3f32f5798d77a671631ce5fb5f7cb 100644 (file)
@@ -477,15 +477,36 @@ mattacku(mtmp)
            mdat = mtmp->data;
 
            if(!rn2(10) && !mtmp->mcan) {
-               if(youseeit) {
+               int numseen, numhelp;
+               char buf[BUFSZ];
+
+               numhelp = were_summon(mdat, FALSE, &numseen);
+               if (youseeit) {
                        pline("%s summons help!", Monnam(mtmp));
-               } else
-                       You_feel("hemmed in.");
-               /* Technically wrong; we really should check if you can see the
-                * help, but close enough...
-                */
-               if (!were_summon(mdat,FALSE) && youseeit)
-                   pline("But none comes.");
+                       if (numhelp > 0) {
+                           if (numseen == 0)
+                               You_feel("hemmed in.");
+                       } else pline("But none comes.");
+               } else {
+                       char *from_nowhere;
+                       if (!Deaf) {
+                               pline("%s %s!", Something,
+                                       makeplural(growl_sound(mtmp)));
+                               from_nowhere = "";
+                       } else from_nowhere = " from nowhere";
+                       if (numhelp > 0) {
+                           if (numseen < 1) You_feel("hemmed in.");
+                           else {
+                               if (numseen == 1)
+                                       Sprintf(buf, "%s appears",
+                                                       an(mdat->mname));
+                               else
+                                       Sprintf(buf, "%s appear",
+                                                       s_suffix(mdat->mname));
+                               pline("%s%s!", upstart(buf), from_nowhere);
+                           }
+                       } /* else no help came; but you didn't know it tried */
+               }
            }
        }
 
index 4b7bf73572556b68f7968c1b94a909508f1430b5..f6a311b2d7cf1725207ba76e58f97c2522717969 100644 (file)
@@ -913,6 +913,7 @@ dospinweb()
 int
 dosummon()
 {
+       int placeholder;
        if (u.uen < 10) {
            You("lack the energy to send forth a call for help!");
            return(0);
@@ -922,7 +923,7 @@ dosummon()
 
        You("call upon your brethren for help!");
        exercise(A_WIS, TRUE);
-       if (!were_summon(youmonst.data,TRUE))
+       if (!were_summon(youmonst.data, TRUE, &placeholder))
                pline("But none arrive.");
        return(1);
 }
index 14c994be0da3ccb6a5dda07405201d231e78728f..0e4ffb503093837c6a443bf80fc91bf0f64f0558 100644 (file)
@@ -81,17 +81,19 @@ register struct monst *mon;
        possibly_unwield(mon, FALSE);
 }
 
-boolean
-were_summon(ptr,yours) /* were-creature (even you) summons a horde */
+int
+were_summon(ptr,yours,visible) /* were-creature (even you) summons a horde */
 register struct permonst *ptr;
 register boolean yours;
+int *visible;                  /* number of visible helpers created */
 {
        register int i, typ, pm = monsndx(ptr);
        register struct monst *mtmp;
-       boolean success = FALSE;
+       int total = 0;
 
+       *visible = 0;
        if(Protection_from_shape_changers && !yours)
-               return FALSE;
+               return 0;
        for(i = rnd(5); i > 0; i--) {
           switch(pm) {
 
@@ -111,11 +113,14 @@ register boolean yours;
                        continue;
            }
            mtmp = makemon(&mons[typ], u.ux, u.uy, NO_MM_FLAGS);
-           if (mtmp) success = TRUE;
+           if (mtmp) {
+               total++;
+               if (canseemon(mtmp)) *visible += 1;
+           }
            if (yours && mtmp)
                (void) tamedog(mtmp, (struct obj *) 0);
        }
-       return success;
+       return total;
 }
 
 void