1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-25 09:30:35 +00:00

illegal moves into dice now become kills if you have an Orb of Slaying

This commit is contained in:
Zeno Rogue 2024-06-06 15:20:57 +02:00
parent 93dcc68acb
commit 2fccfdf0c5

View File

@ -809,23 +809,32 @@ bool pcmove::actual_move() {
c2->wall = waRichDie; c2->wall = waRichDie;
} }
else { else {
if(markOrb(itOrbSlaying)) goto after_die;
if(vmsg(miWALL, siWALL, c2, c2->monst)) if(vmsg(miWALL, siWALL, c2, c2->monst))
addMessage(XLAT("You can only push this die if the highest number would be on the top!")); addMessage(XLAT("You can only push this die if the highest number would be on the top!"));
return false; return false;
} }
} }
else if(mip.d == NO_SPACE) { else if(mip.d == NO_SPACE) {
if(markOrb(itOrbSlaying)) goto after_die;
if(vmsg(miWALL, siWALL, c2, c2->monst)) if(vmsg(miWALL, siWALL, c2, c2->monst))
addMessage(XLAT("No room to push %the1.", c2->monst)); addMessage(XLAT("No room to push %the1.", c2->monst));
return false; return false;
} }
} }
#endif #endif
after_die:
if(isPushable(c2->wall) && !c2->monst && !nonAdjacentPlayer(c2, cwt.at) && fmsMove) { if(isPushable(c2->wall) && !c2->monst && !nonAdjacentPlayer(c2, cwt.at) && fmsMove) {
mip = determinePush(cwt, subdir, [] (movei mi) { return canPushThumperOn(mi, cwt.at); }); mip = determinePush(cwt, subdir, [] (movei mi) { return canPushThumperOn(mi, cwt.at); });
if(mip.t) changes.ccell(mip.t); if(mip.t) changes.ccell(mip.t);
if(mip.d == NO_SPACE) { if(mip.d == NO_SPACE) {
if(isDie(c2->wall) && markOrb(itOrbSlaying)) {
changes.ccell(c2);
c2->monst = moAngryDie;
c2->wall = waNone;
goto after_die;
}
if(vmsg(miWALL, siWALL, c2, moNone)) addMessage(XLAT("No room to push %the1.", c2->wall)); if(vmsg(miWALL, siWALL, c2, moNone)) addMessage(XLAT("No room to push %the1.", c2->wall));
return false; return false;
} }