From e8d404f87cc5d244770b9a83171950a4c0b831dd Mon Sep 17 00:00:00 2001 From: cohrs Date: Mon, 25 Mar 2002 07:48:03 +0000 Subject: [PATCH] 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 --- doc/fixes34.1 | 1 + src/do_wear.c | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/doc/fixes34.1 b/doc/fixes34.1 index 7137dce00..f64340949 100644 --- a/doc/fixes34.1 +++ b/doc/fixes34.1 @@ -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 diff --git a/src/do_wear.c b/src/do_wear.c index d361696b1..b4363c55d 100644 --- a/src/do_wear.c +++ b/src/do_wear.c @@ -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); -- 2.40.0