touchstone: cannot rub on the stone gold

hack around the silly grammar
This commit is contained in:
cohrs
2002-02-19 07:50:42 +00:00
parent 7f946fca6c
commit 3b2aa68d24
+8 -4
View File
@@ -714,6 +714,7 @@ register const char *let,*word;
boolean usegold = FALSE; /* can't use gold because its illegal */ boolean usegold = FALSE; /* can't use gold because its illegal */
boolean allowall = FALSE; boolean allowall = FALSE;
boolean allownone = FALSE; boolean allownone = FALSE;
boolean touchstone = FALSE;
xchar foox = 0; xchar foox = 0;
long cnt; long cnt;
boolean prezero = FALSE; boolean prezero = FALSE;
@@ -727,14 +728,14 @@ register const char *let,*word;
if(*let == GOLD_CLASS) let++, usegold = TRUE; if(*let == GOLD_CLASS) let++, usegold = TRUE;
#endif #endif
/* Ugly check for touchstone */ /* Ugly check for touchstone */
if (!strncmp(word, "rub on", 6) if (!strncmp(word, "rub on", 6)) {
touchstone = TRUE; /* avoid silly "stone gold" */
#ifndef GOLDOBJ #ifndef GOLDOBJ
&& u.ugold) if(u.ugold) allowgold = usegold = TRUE;
allowgold = usegold = TRUE;
#else #else
)
usegold = TRUE; usegold = TRUE;
#endif #endif
}
/* Equivalent of an "ugly check" for gold */ /* Equivalent of an "ugly check" for gold */
if (usegold && !strcmp(word, "eat") && !metallivorous(youmonst.data)) if (usegold && !strcmp(word, "eat") && !metallivorous(youmonst.data))
@@ -918,6 +919,9 @@ register const char *let,*word;
} }
if(ilet == def_oc_syms[GOLD_CLASS]) { if(ilet == def_oc_syms[GOLD_CLASS]) {
if (!usegold) { if (!usegold) {
if (touchstone)
You("cannot rub gold on the stone.");
else
You("cannot %s gold.", word); You("cannot %s gold.", word);
return(struct obj *)0; return(struct obj *)0;
#ifndef GOLDOBJ #ifndef GOLDOBJ