From 1c909655550b4e05df63b21a6bc77318ff2dd797 Mon Sep 17 00:00:00 2001 From: PatR Date: Thu, 8 Sep 2022 09:18:43 -0700 Subject: [PATCH] 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. --- src/hack.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/hack.c b/src/hack.c index 9cc61178f..72af80af6 100644 --- a/src/hack.c +++ b/src/hack.c @@ -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;