Passes_walls

While testing the secret door message handling, I wanted to phaze
through solid rock to get near some secret corridors.  Instead of
polymorphing into a xorn, I used #wizintrinsic to get temporary pass
through walls.  That let me move orthogonally through rock but not
diagonally.  Polymorph to xorn did allow diagonal movement.  I think
the difference was gaining 18/100 strength in that form.

Have wall phazing override narrow diagonal checks.
This commit is contained in:
PatR
2022-09-08 09:18:43 -07:00
parent cebc9e9416
commit 1c90965555

View File

@@ -834,6 +834,9 @@ cant_squeeze_thru(struct monst *mon)
int amt;
struct permonst *ptr = mon->data;
if ((mon == &g.youmonst) ? Passes_walls : passes_walls(ptr))
return 0;
/* too big? */
if (bigmonst(ptr)
&& !(amorphous(ptr) || is_whirly(ptr) || noncorporeal(ptr)
@@ -842,7 +845,7 @@ cant_squeeze_thru(struct monst *mon)
/* lugging too much junk? */
amt = (mon == &g.youmonst) ? inv_weight() + weight_cap()
: curr_mon_load(mon);
: curr_mon_load(mon);
if (amt > 600)
return 2;