1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-11-13 20:27:10 +00:00

Make Orb of Magnetism and Curse of Repulsion leave saved tortoises alone

This commit is contained in:
Joseph C. Sible
2025-09-03 00:01:21 -04:00
parent 7c0d2649e3
commit 8109a39de0

View File

@@ -30,6 +30,8 @@ EX bool canPickupItemWithMagnetism(cell *c, cell *from) {
return false;
if(c->item == itCompass && from->item)
return false;
if(saved_tortoise_on(c))
return false;
return true;
}
@@ -41,7 +43,7 @@ EX bool doPickupItemsWithMagnetism(cell *c) {
cw += wstep;
for(int j=1; j<c3->type; j++) {
cell *c4 = (cw+j).peek();
if(!isNeighbor(c, c4) && c3->item && !c4->item && passable(c4, c3, ZERO)) {
if(!isNeighbor(c, c4) && c3->item && !c4->item && !saved_tortoise_on(c3) && passable(c4, c3, ZERO)) {
changes.ccell(c3);
changes.ccell(c4);
moveItem(c3, c4, false);