From: Michael Meyer Date: Thu, 24 Dec 2020 20:07:10 +0000 (-0500) Subject: Add Sokoban penalty for dismounting onto a boulder X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=a29b76e1bf9f8df8d4153067c3a3e89c81115bfa;p=nethack 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'. --- diff --git a/src/steed.c b/src/steed.c index 941a2292f..c7fb2f329 100644 --- a/src/steed.c +++ b/src/steed.c @@ -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 */