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:
@@ -446,7 +446,7 @@ register struct obj *spellbook;
|
||||
|
||||
/* attempting to read dull book may make hero fall asleep */
|
||||
if (!confused && !Sleep_resistance
|
||||
&& !strcmp(OBJ_DESCR(objects[booktype]), "dull")) {
|
||||
&& objdescr_is(spellbook, "dull")) {
|
||||
const char *eyes;
|
||||
int dullbook = rnd(25) - ACURR(A_WIS);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user