mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-24 01:00:25 +00:00
warning on entering pits
This commit is contained in:
parent
3d427cac61
commit
b5bbb05d07
8
game.cpp
8
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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user