Use macro for a location next to hero

This commit is contained in:
Pasi Kallinen
2022-02-12 11:05:07 +02:00
parent 2b4cf04281
commit 91e2d3633e
23 changed files with 53 additions and 50 deletions

View File

@@ -5178,7 +5178,7 @@ openholdingtrap(
pline("%s%s opens.", upstart(strcpy(buf, which)), trapdescr);
}
/* might pacify monster if adjacent */
if (rn2(2) && distu(mon->mx, mon->my) <= 2)
if (rn2(2) && next2u(mon->mx, mon->my))
reward_untrap(t, mon);
}
return TRUE;