dochugw(mon, X)
Reverse the sense of dochugw()'s new 'X' argument. Use True for the usual case and False for the special case rather than the other way around. Call the special case variant when a monster teleports so that hero stops occupation if the monster jumps to a position where it becomes a threat.
This commit is contained in:
@@ -1324,15 +1324,16 @@ rloc_to_core(
|
||||
Monnam(mtmp),
|
||||
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");
|
||||
: (distu(x, y) < distu(oldx, oldy)) ? " closer to you"
|
||||
: " further away");
|
||||
} else {
|
||||
pline("%s %s%s%s!",
|
||||
appearmsg ? Amonnam(mtmp) : Monnam(mtmp),
|
||||
appearmsg ? "suddenly " : "",
|
||||
!Blind ? "appears" : "arrives",
|
||||
next2u(x, y) ? " next to you"
|
||||
: (distu(x, y) <= (BOLT_LIM * BOLT_LIM)) ? " close by" : "");
|
||||
: (distu(x, y) <= (BOLT_LIM * BOLT_LIM)) ? " close by"
|
||||
: "");
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1342,6 +1343,10 @@ rloc_to_core(
|
||||
if (resident_shk && !inhishop(mtmp))
|
||||
make_angry_shk(mtmp, oldx, oldy);
|
||||
|
||||
/* if hero is busy, maybe stop occupation */
|
||||
if (g.occupation)
|
||||
(void) dochugw(mtmp, FALSE);
|
||||
|
||||
/* trapped monster teleported away */
|
||||
if (mtmp->mtrapped && !mtmp->wormno)
|
||||
(void) mintrap(mtmp, NO_TRAP_FLAGS);
|
||||
|
||||
Reference in New Issue
Block a user