From 3434a157f816de2c9b47eb3360ff93f763081708 Mon Sep 17 00:00:00 2001 From: Pasi Kallinen Date: Sat, 21 Mar 2015 11:03:54 +0200 Subject: [PATCH] More C343-108: Handle "rub on the stone" --- src/invent.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/invent.c b/src/invent.c index 66e7e7307..12f0ef1b3 100644 --- a/src/invent.c +++ b/src/invent.c @@ -973,12 +973,18 @@ register const char *let,*word; } if(ilet == '-') { if (!allownone) { + char *suf = NULL; strcpy(buf, word); + if ((bp = strstr(buf, " on the ")) != NULL) { /* rub on the stone[s] */ + *bp = '\0'; + suf = (bp + 1); + } if ((bp = strstr(buf, " or ")) != NULL) { *bp = '\0'; bp = (rn2(2) ? buf : (bp + 4)); } else bp = buf; - You("mime %s something.", ing_suffix(bp)); + You("mime %s something%s%s.", ing_suffix(bp), + suf ? " " : "", suf ? suf : ""); } return(allownone ? &zeroobj : (struct obj *) 0); }