fix part of #2629 - feedback for reverse genocide (trunk only)
From a bug report, if reading a cursed scroll of genocide created only one monster it would give the plural message "Sent in some <monsters>." Now it will say "Sent in a(n) <monster>." in such case. (The grammar is accurate even if you can't see what happened; that situation is unusual enough that I'm not going to worry about giving information away.)
This commit is contained in:
@@ -411,6 +411,7 @@ theft of worn armor with wear/unwear delay would interfere with completion of
|
|||||||
#sit while swallowed would give the wrong message
|
#sit while swallowed would give the wrong message
|
||||||
alchemical explosion or evaporation only used up one potion instead of all
|
alchemical explosion or evaporation only used up one potion instead of all
|
||||||
the potions being dipped
|
the potions being dipped
|
||||||
|
feedback for reverse-genocide was plural even when just one monster was created
|
||||||
|
|
||||||
|
|
||||||
Platform- and/or Interface-Specific Fixes
|
Platform- and/or Interface-Specific Fixes
|
||||||
|
|||||||
+8
-4
@@ -1934,7 +1934,7 @@ int how;
|
|||||||
kill_genocided_monsters();
|
kill_genocided_monsters();
|
||||||
update_inventory(); /* in case identified eggs were affected */
|
update_inventory(); /* in case identified eggs were affected */
|
||||||
} else {
|
} else {
|
||||||
int cnt = 0;
|
int cnt = 0, census = monster_census(FALSE);
|
||||||
|
|
||||||
if (!(mons[mndx].geno & G_UNIQ) &&
|
if (!(mons[mndx].geno & G_UNIQ) &&
|
||||||
!(mvitals[mndx].mvflags & (G_GENOD | G_EXTINCT)))
|
!(mvitals[mndx].mvflags & (G_GENOD | G_EXTINCT)))
|
||||||
@@ -1945,9 +1945,13 @@ int how;
|
|||||||
if (mvitals[mndx].mvflags & G_EXTINCT)
|
if (mvitals[mndx].mvflags & G_EXTINCT)
|
||||||
break; /* just made last one */
|
break; /* just made last one */
|
||||||
}
|
}
|
||||||
if (cnt)
|
if (cnt) {
|
||||||
pline("Sent in some %s.", makeplural(buf));
|
/* accumulated 'cnt' doesn't take groups into account;
|
||||||
else
|
assume bringing in new mon(s) didn't remove any old ones */
|
||||||
|
cnt = monster_census(FALSE) - census;
|
||||||
|
pline("Sent in %s%s.", (cnt > 1) ? "some " : "",
|
||||||
|
(cnt > 1) ? makeplural(buf) : an(buf));
|
||||||
|
} else
|
||||||
pline1(nothing_happens);
|
pline1(nothing_happens);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user