From b5bbb05d0778bdde70d327f44300aa0a9212e4e4 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Sat, 26 Oct 2019 14:47:22 +0200 Subject: [PATCH] warning on entering pits --- game.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/game.cpp b/game.cpp index a7aae0dd..db338e92 100644 --- a/game.cpp +++ b/game.cpp @@ -8469,6 +8469,14 @@ EX bool movepcto(int d, int subdir IS(1), bool checkonly IS(false)) { else if(fmsMove) { if(mineMarked(c2) && !minesafe() && !checkonly && warningprotection(XLAT("Are you sure you want to step there?"))) return false; + + if(snakelevel(c2) <= snakelevel(cwt.at)-2) { + bool can_leave = false; + forCellEx(c3, c2) if(passable(c3, c2, P_ISPLAYER | P_MONSTER)) can_leave = true; + if(!can_leave && !checkonly && warningprotection(XLAT("Are you sure you want to step there?"))) + return false; + } + if(monstersnear(c2, NULL, moPlayer, NULL, cwt.at)) { if(checkonly) return false;