R677 - two swords slipping due to fried food prints same message

- report: twoweapon mode, eat fried food, get messages like:
Your sword slips from your hands.
Your sword also slips from your hands.
- the fix tracks the kind of the 1st weapon, and adds "other" to the 2nd
message if necessary
This commit is contained in:
cohrs
2002-03-25 07:48:03 +00:00
parent 9138c5daf3
commit e8d404f87c
2 changed files with 14 additions and 5 deletions

View File

@@ -15,6 +15,7 @@ two bad wizkit items in a row shouldn't make the user hit space many times
kicking thrones no longer loosens rocks
wall symbol not replaced when digging while blind and levitating
print regular death message when leashed, mounted steed dies of starvation
fix more funny messages, new and old
Platform- and/or Interface-Specific Fixes

View File

@@ -1553,6 +1553,7 @@ glibr()
register struct obj *otmp;
int xfl = 0;
boolean leftfall, rightfall;
const char *otherwep = 0;
leftfall = (uleft && !uleft->cursed &&
(!uwep || !welded(uwep) || !bimanual(uwep)));
@@ -1577,9 +1578,10 @@ glibr()
otmp = uswapwep;
if (u.twoweap && otmp) {
otherwep = is_sword(otmp) ? c_sword :
makesingular(oclass_names[(int)otmp->oclass]);
Your("%s %sslips from your %s.",
is_sword(otmp) ? c_sword :
makesingular(oclass_names[(int)otmp->oclass]),
otherwep,
xfl ? "also " : "",
makeplural(body_part(HAND)));
setuswapwep((struct obj *)0);
@@ -1589,10 +1591,16 @@ glibr()
}
otmp = uwep;
if (otmp && !welded(otmp)) {
const char *thiswep;
/* nice wording if both weapons are the same type */
thiswep = is_sword(otmp) ? c_sword :
makesingular(oclass_names[(int)otmp->oclass]);
if (otherwep && strcmp(thiswep, otherwep)) otherwep = 0;
/* changed so cursed weapons don't fall, GAN 10/30/86 */
Your("%s %sslips from your %s.",
is_sword(otmp) ? c_sword :
makesingular(oclass_names[(int)otmp->oclass]),
Your("%s%s %sslips from your %s.",
otherwep ? "other " : "", thiswep,
xfl ? "also " : "",
makeplural(body_part(HAND)));
setuwep((struct obj *)0);