From 743af3217d49b0727f0b26e75b7d6c41a624e4e6 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 5 Apr 2019 13:44:52 +0200 Subject: [PATCH] the magic of Orb of Yendor makes them immobile using boats --- game.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/game.cpp b/game.cpp index fbaa6f77..294cd4e0 100644 --- a/game.cpp +++ b/game.cpp @@ -626,6 +626,9 @@ bool passable(cell *w, cell *from, flagtype flags) { } if(F(P_LEADER)) { + if(from && from->wall == waBoat && isWatery(w) && from->item == itOrbYendor) + return false; + if(from && from->wall == waBoat && isWateryOrBoat(w) && !againstCurrent(w, from)) return true; @@ -674,7 +677,7 @@ bool passable(cell *w, cell *from, flagtype flags) { if(isWatery(w)) { if(in_gravity_zone(w)) ; else if(from && from->wall == waBoat && F(P_USEBOAT) && - (!againstCurrent(w, from) || F(P_MARKWATER))) ; + (!againstCurrent(w, from) || F(P_MARKWATER)) && !(from->item == itOrbYendor)) ; else if(!F(P_AETHER | P_FISH | P_FLYING | P_BLOW | P_JUMP1 | P_BULLET | P_DEADLY | P_REPTILE)) return false; } if(isChasmy(w)) { @@ -7859,6 +7862,11 @@ bool movepcto(int d, int subdir, bool checkonly) { return false; } + if(cwt.at->item == itOrbYendor) { + addMessage(XLAT("The Orb of Yendor is locked in with powerful magic.")); + return false; + } + if(monstersnear(c2, NULL, moPlayer, NULL, cwt.at)) { if(!checkonly && errormsgs) wouldkill("%The1 would kill you there!"); return false;