1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-17 10:44:48 +00:00

the magic of Orb of Yendor makes them immobile using boats

This commit is contained in:
Zeno Rogue 2019-04-05 13:44:52 +02:00
parent 463e874520
commit 743af3217d

View File

@ -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;