initial pass for toning down Elbereth
This commit is contained in:
@@ -220,16 +220,24 @@ xchar x, y;
|
||||
/* Decide whether a particular string is engraved at a specified
|
||||
* location; a case-insensitive substring match used.
|
||||
* Ignore headstones, in case the player names herself "Elbereth".
|
||||
*
|
||||
* If strict checking is requested, the word is only considered to be
|
||||
* present if it is intact and is the first word in the engraving.
|
||||
* ("Elbereth burrito" matches; "o Elbereth" does not.)
|
||||
*/
|
||||
int
|
||||
sengr_at(s, x, y)
|
||||
sengr_at(s, x, y, strict)
|
||||
const char *s;
|
||||
xchar x, y;
|
||||
boolean strict;
|
||||
{
|
||||
register struct engr *ep = engr_at(x,y);
|
||||
|
||||
return (ep && ep->engr_type != HEADSTONE &&
|
||||
ep->engr_time <= moves && strstri(ep->engr_txt, s) != 0);
|
||||
if (ep && ep->engr_type != HEADSTONE && ep->engr_time <= moves) {
|
||||
return strict ? (strncmpi(ep->engr_txt, s, strlen(s)) == 0) :
|
||||
(strstri(ep->engr_txt, s) != 0);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user