Match object description via single function
making the code more readable. Instead of doing strcmp(OBJ_DESCR(objects[otyp]), "foo"), just call objdescr_is(obj, "foo") (via xNetHack)
This commit is contained in:
@@ -2134,7 +2134,7 @@ eatspecial()
|
||||
pline("Yuck%c", otmp->blessed ? '!' : '.');
|
||||
else if (otmp->oclass == SCROLL_CLASS
|
||||
/* check description after checking for specific scrolls */
|
||||
&& !strcmpi(OBJ_DESCR(objects[otmp->otyp]), "YUM YUM"))
|
||||
&& objdescr_is(otmp, "YUM YUM"))
|
||||
pline("Yum%c", otmp->blessed ? '!' : '.');
|
||||
else
|
||||
pline("Needs salt...");
|
||||
|
||||
Reference in New Issue
Block a user