fix message when were_summoning

This commit is contained in:
nethack.allison
2003-12-07 09:45:34 +00:00
parent 19976253a0
commit 2a91bc6a50
4 changed files with 12 additions and 7 deletions

View File

@@ -2307,7 +2307,7 @@ E void FDECL(skill_init, (const struct def_skill *));
E void FDECL(were_change, (struct monst *));
E void FDECL(new_were, (struct monst *));
E int FDECL(were_summon, (struct permonst *,BOOLEAN_P,int *));
E int FDECL(were_summon, (struct permonst *,BOOLEAN_P,int *,char *));
E void NDECL(you_were);
E void FDECL(you_unwere, (BOOLEAN_P));

View File

@@ -482,9 +482,10 @@ mattacku(mtmp)
if(!rn2(10) && !mtmp->mcan) {
int numseen, numhelp;
char buf[BUFSZ];
char buf[BUFSZ], genericwere[BUFSZ];
numhelp = were_summon(mdat, FALSE, &numseen);
Strcpy(genericwere, "creature");
numhelp = were_summon(mdat, FALSE, &numseen, genericwere);
if (youseeit) {
pline("%s summons help!", Monnam(mtmp));
if (numhelp > 0) {
@@ -504,10 +505,10 @@ mattacku(mtmp)
else {
if (numseen == 1)
Sprintf(buf, "%s appears",
an(mdat->mname));
an(genericwere));
else
Sprintf(buf, "%s appear",
makeplural(mdat->mname));
makeplural(genericwere));
pline("%s%s!", upstart(buf), from_nowhere);
}
} /* else no help came; but you didn't know it tried */

View File

@@ -926,7 +926,7 @@ dosummon()
You("call upon your brethren for help!");
exercise(A_WIS, TRUE);
if (!were_summon(youmonst.data, TRUE, &placeholder))
if (!were_summon(youmonst.data, TRUE, &placeholder, (char *)0))
pline("But none arrive.");
return(1);
}

View File

@@ -82,10 +82,11 @@ register struct monst *mon;
}
int
were_summon(ptr,yours,visible) /* were-creature (even you) summons a horde */
were_summon(ptr,yours,visible,genbuf) /* were-creature (even you) summons a horde */
register struct permonst *ptr;
register boolean yours;
int *visible; /* number of visible helpers created */
char *genbuf;
{
register int i, typ, pm = monsndx(ptr);
register struct monst *mtmp;
@@ -100,14 +101,17 @@ int *visible; /* number of visible helpers created */
case PM_WERERAT:
case PM_HUMAN_WERERAT:
typ = rn2(3) ? PM_SEWER_RAT : rn2(3) ? PM_GIANT_RAT : PM_RABID_RAT ;
if (genbuf) Strcpy(genbuf, "rat");
break;
case PM_WEREJACKAL:
case PM_HUMAN_WEREJACKAL:
typ = PM_JACKAL;
if (genbuf) Strcpy(genbuf, "jackal");
break;
case PM_WEREWOLF:
case PM_HUMAN_WEREWOLF:
typ = rn2(5) ? PM_WOLF : PM_WINTER_WOLF ;
if (genbuf) Strcpy(genbuf, "wolf");
break;
default:
continue;