Add Sokoban penalty for dismounting onto a boulder

Because landing_spot will select a square containing a boulder as a
last-resort option, provided no other squares are accessible, it is
possible for the player to maneuver into a place where this could be
exploited when completing Sokoban (e.g. to get into a corner that would
normally be inaccessible, from which position an otherwise-blocked
boulder can be pushed away). This behavior should incur the same penalty
as exploitation of other Sokoban 'loopholes'.
This commit is contained in:
Michael Meyer
2020-12-24 15:07:10 -05:00
committed by Pasi Kallinen
parent e7e418c1ec
commit a29b76e1bf

View File

@@ -650,6 +650,8 @@ int reason; /* Player was thrown off etc. */
*/
g.in_steed_dismounting = TRUE;
teleds(cc.x, cc.y, TELEDS_ALLOW_DRAG);
if (sobj_at(BOULDER, cc.x, cc.y))
sokoban_guilt();
g.in_steed_dismounting = FALSE;
/* Put your steed in your trap */