From 8a5ffa4085c104a651cb532abf65ad8dbcfe74b1 Mon Sep 17 00:00:00 2001 From: nhmall Date: Sat, 25 May 2019 11:58:32 -0400 Subject: [PATCH] do not mark multiple luckstones as the prize in mines-end if one of the random objects happened to be a luckstone then it and the explicit one got marked as a prize. Following this change, only one will be marked as the prize, but a follow-up on the order of things in mines.des may be warranted to ensure it is the explicitly placed luckstone. --- doc/fixes36.3 | 2 ++ src/sp_lev.c | 12 +++++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/doc/fixes36.3 b/doc/fixes36.3 index 28564e3da..ebbf1c95b 100644 --- a/doc/fixes36.3 +++ b/doc/fixes36.3 @@ -21,6 +21,8 @@ xans fly, but could not reach your feet if you flew adjust vortex database entry to be consistent with fire and energy vortices when co-located with a boulder you could sometimes swap places with pets of any size +on rare occasions, multiple mines-end luckstones were being marked as the + prize and triggering an impossible() on a public server Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository diff --git a/src/sp_lev.c b/src/sp_lev.c index cd952108c..dbab1dfdc 100644 --- a/src/sp_lev.c +++ b/src/sp_lev.c @@ -2044,11 +2044,13 @@ struct mkroom *croom; might be short-circuited if a monster brings object to hero) */ if (Is_mineend_level(&u.uz)) { if (otmp->otyp == iflags.mines_prize_type) { - otmp->record_achieve_special = MINES_PRIZE; - /* prevent stacking; cleared when achievement is recorded */ - otmp->nomerge = 1; - if (++mines_prize_count > 1) - impossible(prize_warning, "mines end"); + if (!mines_prize_count++) { + /* Note: the first luckstone on lev will become the prize + even if its not the explicit one, but random */ + otmp->record_achieve_special = MINES_PRIZE; + /* prevent stacking; cleared when achievement is recorded */ + otmp->nomerge = 1; + } } } else if (Is_sokoend_level(&u.uz)) { if (otmp->otyp == iflags.soko_prize_type1) {