1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-02-02 20:29:17 +00:00

bug fixed: Space mousing could mark Aether as used

This commit is contained in:
Zeno Rogue 2022-09-09 12:47:54 +02:00
parent e74d79583b
commit 92291c437a

View File

@ -1368,6 +1368,7 @@ EX eItem targetRangedOrb(cell *c, orbAction a) {
&& CHK(numplayers() == 1, XLAT("Cannot be used in multiplayer")) && CHK(numplayers() == 1, XLAT("Cannot be used in multiplayer"))
&& CHK(c->monst != moFriendlyIvy, XLAT("You cannot grow on yourself!")) && CHK(c->monst != moFriendlyIvy, XLAT("You cannot grow on yourself!"))
) { ) {
changes.init(isCheck(a));
vector<int> dirs; vector<int> dirs;
forCellIdCM(cf, d, c) forCellIdCM(cf, d, c)
if(cf->monst == moFriendlyIvy) { if(cf->monst == moFriendlyIvy) {
@ -1388,9 +1389,11 @@ EX eItem targetRangedOrb(cell *c, orbAction a) {
int di = hrand_elt(dirs, -1); int di = hrand_elt(dirs, -1);
if(CHK(di != -1, XLAT("You cannot grow there from any adjacent cell!"))) { if(CHK(di != -1, XLAT("You cannot grow there from any adjacent cell!"))) {
if(!isCheck(a)) growIvyTo(movei(c, di).rev()), apply_impact(c); if(!isCheck(a)) growIvyTo(movei(c, di).rev()), apply_impact(c), changes.commit();
else changes.rollback();
return itOrbNature; return itOrbNature;
} }
else changes.rollback();
} }
// (0'') jump // (0'') jump