killer, level and rooms move to instance globals.
This commit is contained in:
@@ -461,7 +461,7 @@ register struct monst *mtmp;
|
||||
|
||||
/* some monsters teleport */
|
||||
if (mtmp->mflee && !rn2(40) && can_teleport(mdat) && !mtmp->iswiz
|
||||
&& !level.flags.noteleport) {
|
||||
&& !g.level.flags.noteleport) {
|
||||
(void) rloc(mtmp, TRUE);
|
||||
return 0;
|
||||
}
|
||||
@@ -1134,7 +1134,7 @@ register int after;
|
||||
if (is_minion(ptr) || is_rider(ptr))
|
||||
flag |= ALLOW_SANCT;
|
||||
/* unicorn may not be able to avoid hero on a noteleport level */
|
||||
if (is_unicorn(ptr) && !level.flags.noteleport)
|
||||
if (is_unicorn(ptr) && !g.level.flags.noteleport)
|
||||
flag |= NOTONL;
|
||||
if (passes_walls(ptr))
|
||||
flag |= (ALLOW_WALL | ALLOW_ROCK);
|
||||
@@ -1167,10 +1167,10 @@ register int after;
|
||||
chi = -1;
|
||||
nidist = dist2(nix, niy, gx, gy);
|
||||
/* allow monsters be shortsighted on some levels for balance */
|
||||
if (!mtmp->mpeaceful && level.flags.shortsighted
|
||||
if (!mtmp->mpeaceful && g.level.flags.shortsighted
|
||||
&& nidist > (couldsee(nix, niy) ? 144 : 36) && appr == 1)
|
||||
appr = 0;
|
||||
if (is_unicorn(ptr) && level.flags.noteleport) {
|
||||
if (is_unicorn(ptr) && g.level.flags.noteleport) {
|
||||
/* on noteleport levels, perhaps we cannot avoid hero */
|
||||
for (i = 0; i < cnt; i++)
|
||||
if (!(info[i] & NOTONL))
|
||||
|
||||
Reference in New Issue
Block a user