Use macro for a location next to hero
This commit is contained in:
@@ -1251,7 +1251,7 @@ rloc_to_core(struct monst* mtmp,
|
||||
if (u.uswallow) {
|
||||
u_on_newpos(mtmp->mx, mtmp->my);
|
||||
docrt();
|
||||
} else if (distu(mtmp->mx, mtmp->my) > 2) {
|
||||
} else if (!next2u(mtmp->mx, mtmp->my)) {
|
||||
unstuck(mtmp);
|
||||
}
|
||||
}
|
||||
@@ -1264,7 +1264,7 @@ rloc_to_core(struct monst* mtmp,
|
||||
if (telemsg && (couldsee(x, y) || sensemon(mtmp))) {
|
||||
pline("%s vanishes and reappears%s.",
|
||||
Monnam(mtmp),
|
||||
distu(x, y) <= 2 ? " next to you"
|
||||
next2u(x, y) ? " next to you"
|
||||
: (distu(x, y) <= (BOLT_LIM * BOLT_LIM)) ? " close by"
|
||||
: (distu(x, y) < distu(oldx, oldy)) ? " closer to you"
|
||||
: " further away");
|
||||
@@ -1273,7 +1273,7 @@ rloc_to_core(struct monst* mtmp,
|
||||
appearmsg ? Amonnam(mtmp) : Monnam(mtmp),
|
||||
appearmsg ? "suddenly " : "",
|
||||
!Blind ? "appears" : "arrives",
|
||||
distu(x, y) <= 2 ? " next to you"
|
||||
next2u(x, y) ? " next to you"
|
||||
: (distu(x, y) <= (BOLT_LIM * BOLT_LIM)) ? " close by" : "");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user