]> granicus.if.org Git - nethack/commitdiff
Add Sokoban penalty for dismounting onto a boulder
authorMichael Meyer <me@entrez.cc>
Thu, 24 Dec 2020 20:07:10 +0000 (15:07 -0500)
committerPasi Kallinen <paxed@alt.org>
Thu, 7 Jan 2021 16:55:46 +0000 (18:55 +0200)
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'.

src/steed.c

index 941a2292f5a74db9343026b1174801f186cb9414..c7fb2f329fa7fe77c19be9ec4b139b8d8b8ad757 100644 (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 */