diff --git a/doc/fixes35.0 b/doc/fixes35.0 index e9a97e822..5f9a2168c 100644 --- a/doc/fixes35.0 +++ b/doc/fixes35.0 @@ -104,6 +104,7 @@ being petrified by swallowing a cockatrice violates foodless conduct devouring Medusa whole is fatal eating pet won't continue eating after becoming paralyzed or falling asleep randomize shopkeeper names when hallucinating +fix wording for "leprechaun steals gold from between your feet" when mounted Platform- and/or Interface-Specific Fixes diff --git a/src/steal.c b/src/steal.c index 772cb04d2..a2baa7039 100644 --- a/src/steal.c +++ b/src/steal.c @@ -1,4 +1,4 @@ -/* SCCS Id: @(#)steal.c 3.5 2005/10/14 */ +/* SCCS Id: @(#)steal.c 3.5 2005/12/14 */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /* NetHack may be freely redistributed. See license for details. */ @@ -43,13 +43,31 @@ register struct monst *mtmp; { register struct obj *gold = g_at(u.ux, u.uy); register long tmp; + struct monst *who; + const char *whose, *what; - if (gold && ( !u.ugold || gold->quan > u.ugold || !rn2(5))) { + if (gold && (!u.ugold || gold->quan > u.ugold || !rn2(5))) { mtmp->mgold += gold->quan; delobj(gold); newsym(u.ux, u.uy); - pline("%s quickly snatches some gold from between your %s!", - Monnam(mtmp), makeplural(body_part(FOOT))); +#ifdef STEED + if (u.usteed) + who = u.usteed, + whose = s_suffix(y_monnam(who)), + what = makeplural(mbodypart(who, FOOT)); + else +#endif + who = &youmonst, + whose = "your", + what = makeplural(body_part(FOOT)); + /* [ avoid "between your rear regions" :-] */ + if (slithy(who->data)) what = "coils"; + /* reduce "rear hooves/claws" to "hooves/claws" */ + if (!strncmp(what, "rear ", 5)) what += 5; + pline("%s quickly snatches some gold from %s %s %s!", + Monnam(mtmp), + (Levitation || Flying) ? "beneath" : "between", + whose, what); if(!u.ugold || !rn2(5)) { if (!tele_restrict(mtmp)) (void) rloc(mtmp, FALSE); /* do not set mtmp->mavenge here; gold on the floor is fair game */ @@ -106,19 +124,37 @@ register struct monst *mtmp; register struct obj *fgold = g_at(u.ux, u.uy); register struct obj *ygold; register long tmp; + struct monst *who; + const char *whose, *what; - /* skip lesser coins on the floor */ - while (fgold && fgold->otyp != GOLD_PIECE) fgold = fgold->nexthere; + /* skip lesser coins on the floor */ + while (fgold && fgold->otyp != GOLD_PIECE) fgold = fgold->nexthere; - /* Do you have real gold? */ - ygold = findgold(invent); + /* Do you have real gold? */ + ygold = findgold(invent); - if (fgold && ( !ygold || fgold->quan > ygold->quan || !rn2(5))) { - obj_extract_self(fgold); + if (fgold && (!ygold || fgold->quan > ygold->quan || !rn2(5))) { + obj_extract_self(fgold); add_to_minv(mtmp, fgold); newsym(u.ux, u.uy); - pline("%s quickly snatches some gold from between your %s!", - Monnam(mtmp), makeplural(body_part(FOOT))); +#ifdef STEED + if (u.usteed) + who = u.usteed, + whose = s_suffix(y_monnam(who)), + what = makeplural(mbodypart(who, FOOT)); + else +#endif + who = &youmonst, + whose = "your", + what = makeplural(body_part(FOOT)); + /* [ avoid "between your rear regions" :-] */ + if (slithy(who->data)) what = "coils"; + /* reduce "rear hooves/claws" to "hooves/claws" */ + if (!strncmp(what, "rear ", 5)) what += 5; + pline("%s quickly snatches some gold from %s %s %s!", + Monnam(mtmp), + (Levitation || Flying) ? "beneath" : "between", + whose, what); if(!ygold || !rn2(5)) { if (!tele_restrict(mtmp)) (void) rloc(mtmp, FALSE); monflee(mtmp, 0, FALSE, FALSE);