Merge branch 'NetHack-3.6'

This commit is contained in:
nhmall
2019-09-28 20:23:05 -04:00
5 changed files with 20 additions and 13 deletions

View File

@@ -983,10 +983,10 @@ boolean vis; /* whether the action can be seen */
char *hittee; /* target's name: "you" or mon_nam(mdef) */
{
struct permonst *old_uasmon;
const char *verb, *fakename;
const char *verb;
boolean youattack = (magr == &g.youmonst), youdefend = (mdef == &g.youmonst),
resisted = FALSE, do_stun, do_confuse, result;
int attack_indx, scare_dieroll = MB_MAX_DIEROLL / 2;
int attack_indx, fakeidx, scare_dieroll = MB_MAX_DIEROLL / 2;
result = FALSE; /* no message given yet */
/* the most severe effects are less likely at higher enchantment */
@@ -1126,13 +1126,13 @@ char *hittee; /* target's name: "you" or mon_nam(mdef) */
mdef->mconf = 1;
}
/* now give message(s) describing side-effects;
don't let vtense() be fooled by assigned name ending in 's' */
fakename = youdefend ? "you" : "mon";
/* now give message(s) describing side-effects; Use fakename
so vtense() won't be fooled by assigned name ending in 's' */
fakeidx = youdefend ? 1 : 0;
if (youattack || youdefend || vis) {
(void) upstart(hittee); /* capitalize */
if (resisted) {
pline("%s %s!", hittee, vtense(fakename, "resist"));
pline("%s %s!", hittee, vtense(fakename[fakeidx], "resist"));
shieldeff(youdefend ? u.ux : mdef->mx,
youdefend ? u.uy : mdef->my);
}
@@ -1146,7 +1146,7 @@ char *hittee; /* target's name: "you" or mon_nam(mdef) */
Strcat(buf, " and ");
if (do_confuse)
Strcat(buf, "confused");
pline("%s %s %s%c", hittee, vtense(fakename, "are"), buf,
pline("%s %s %s%c", hittee, vtense(fakename[fakeidx], "are"), buf,
(do_stun && do_confuse) ? '!' : '.');
}
}