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

Merge pull request #438 from josephcsible/leave-saved-tortoise

Make Orb of Magnetism and Curse of Repulsion leave saved tortoises alone
This commit is contained in:
Zeno Rogue
2025-10-09 08:22:17 +02:00
committed by GitHub

View File

@@ -33,6 +33,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;
}
@@ -44,7 +46,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);