Make the Elbereth restrictions more flavour-consistent
Elbereth now has to be on a square by itself; it's hard to justify why text before it would prevent it working if text after it fails to prevent it working.
This commit is contained in:
+2
-3
@@ -257,8 +257,7 @@ xchar x, y;
|
|||||||
* Ignore headstones, in case the player names herself "Elbereth".
|
* Ignore headstones, in case the player names herself "Elbereth".
|
||||||
*
|
*
|
||||||
* If strict checking is requested, the word is only considered to be
|
* 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.
|
* present if it is intact and is the entire content of the engraving.
|
||||||
* ("Elbereth burrito" matches; "o Elbereth" does not.)
|
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
sengr_at(s, x, y, strict)
|
sengr_at(s, x, y, strict)
|
||||||
@@ -269,7 +268,7 @@ boolean strict;
|
|||||||
register struct engr *ep = engr_at(x, y);
|
register struct engr *ep = engr_at(x, y);
|
||||||
|
|
||||||
if (ep && ep->engr_type != HEADSTONE && ep->engr_time <= moves) {
|
if (ep && ep->engr_type != HEADSTONE && ep->engr_time <= moves) {
|
||||||
return strict ? (strncmpi(ep->engr_txt, s, strlen(s)) == 0)
|
return strict ? (fuzzymatch(ep->engr_txt, s, "", TRUE))
|
||||||
: (strstri(ep->engr_txt, s) != 0);
|
: (strstri(ep->engr_txt, s) != 0);
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|||||||
Reference in New Issue
Block a user