1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-26 01:50:36 +00:00

if you are in water (and have no Fish), you can now see Orbs of Fish and Aether in adjacent water tiles, and also you can move there and pick them up

This commit is contained in:
Zeno Rogue 2024-03-24 19:29:44 +01:00
parent 8002f42d71
commit 15b711e099
2 changed files with 8 additions and 2 deletions

View File

@ -16,7 +16,12 @@ EX array<int, ittypes> items;
EX map<modecode_t, array<int, ittypes> > hiitems;
EX bool pickable_from_water(eItem it) {
return among(it, itOrbFish, itOrbAether);
}
EX bool cannotPickupItem(cell *c, bool telekinesis) {
if(pickable_from_water(c->item) && isWatery(c)) return false;
return itemHidden(c) && !telekinesis && !(isWatery(c) && markOrb(itOrbFish));
}
@ -737,7 +742,7 @@ EX void collectMessage(cell *c2, eItem which) {
EX bool itemHiddenFromSight(cell *c) {
return isWatery(c) && !items[itOrbInvis] && !(items[itOrbFish] && playerInWater())
&& !(shmup::on && shmup::boatAt(c));
&& !(shmup::on && shmup::boatAt(c)) && !(c->cpdist <= 1 && playerInWater());
}
}

View File

@ -258,7 +258,8 @@ EX bool passable(cell *w, cell *from, flagtype flags) {
}
if(isWatery(w)) {
if(in_gravity_zone(w)) ;
if((flags & P_ISPLAYER) && from && isWatery(from) && pickable_from_water(w->item)) ;
else if(in_gravity_zone(w)) ;
else if(from && from->wall == waBoat && F(P_USEBOAT) &&
(!againstCurrent(w, from) || F(P_MARKWATER)) && !(from->item == itOrbYendor)) ;
else if(from && isWatery(from) && F(P_CHAIN) && F(P_USEBOAT) && !againstCurrent(w, from)) ;