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
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 */
+ }
}
}
int
dosummon()
{
+ int placeholder;
if (u.uen < 10) {
You("lack the energy to send forth a call for help!");
return(0);
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);
}
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) {
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