From: cohrs Date: Thu, 24 Oct 2002 05:43:40 +0000 (+0000) Subject: consistent sokoban guilt for polymorphing boulders X-Git-Tag: MOVE2GIT~2355 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2c926521c130e2d64513c1a59e4c1f087a918042;p=nethack consistent sokoban guilt for polymorphing boulders Discussed a while back in the newsgroup. casting Stone to Flesh on a Sokoban boulder would affect luck, but simply polymorphing a boulder would not. --- diff --git a/src/zap.c b/src/zap.c index 0d7f977ad..00f87fd3e 100644 --- a/src/zap.c +++ b/src/zap.c @@ -1200,6 +1200,8 @@ poly_obj(obj, id) boolean can_merge = (id == STRANGE_OBJECT); int obj_location = obj->where; + if (obj->otyp == BOULDER && In_sokoban(&u.uz)) + change_luck(-1); /* Sokoban guilt */ if (id == STRANGE_OBJECT) { /* preserve symbol */ int try_limit = 3; /* Try up to 3 times to make the magic-or-not status of @@ -1603,8 +1605,6 @@ struct obj *obj, *otmp; case ROCK_CLASS: /* boulders and statues */ if (obj->otyp == BOULDER) { obj = poly_obj(obj, HUGE_CHUNK_OF_MEAT); - if (In_sokoban(&u.uz)) - change_luck(-1); /* Sokoban guilt */ goto smell; } else if (obj->otyp == STATUE) { xchar oox, ooy;