diff options
Diffstat (limited to 'crawl-ref/source/spells3.cc')
-rw-r--r-- | crawl-ref/source/spells3.cc | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/crawl-ref/source/spells3.cc b/crawl-ref/source/spells3.cc index f35ae60e35..9bbb8789e5 100644 --- a/crawl-ref/source/spells3.cc +++ b/crawl-ref/source/spells3.cc @@ -766,7 +766,29 @@ bool entomb(int powc) } if (number_built > 0) + { mpr("Walls emerge from the floor!"); + + for (int i = you.beheld_by.size() - 1; i >= 0; i--) + { + const monsters* mon = &menv[you.beheld_by[i]]; + const coord_def pos = mon->pos(); + int walls = num_feats_between(you.x_pos, you.y_pos, + pos.x, pos.y, DNGN_UNSEEN, + DNGN_MAXWALL); + + if (walls > 0) + { + update_beholders(mon, true); + if (you.beheld_by.empty()) + { + you.duration[DUR_BEHELD] = 0; + break; + } + continue; + } + } + } else canned_msg(MSG_NOTHING_HAPPENS); |