mines luckstone as achievement marker

It was possible to have the guaranteed luckstone at Mines' End become
merged with a random one and lose its specialness for achievement
tracking.  Mark it 'nomerge' when created and clear that if/when the
achievement is recorded.
This commit is contained in:
PatR
2018-12-27 13:31:42 -08:00
parent ceb446eaea
commit f8b4ad3fdc
3 changed files with 15 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
/* NetHack 3.6 sp_lev.c $NHDT-Date: 1524287226 2018/04/21 05:07:06 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.98 $ */
/* NetHack 3.6 sp_lev.c $NHDT-Date: 1545946257 2018/12/27 21:30:57 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.109 $ */
/* Copyright (c) 1989 by Jean-Christophe Collet */
/* NetHack may be freely redistributed. See license for details. */
@@ -2045,16 +2045,20 @@ struct mkroom *croom;
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");
}
} else if (Is_sokoend_level(&u.uz)) {
if (otmp->otyp == iflags.soko_prize_type1) {
otmp->record_achieve_special = SOKO_PRIZE1;
otmp->nomerge = 1; /* redundant; Sokoban prizes don't stack */
if (++soko_prize_count > 1)
impossible(prize_warning, "sokoban end");
} else if (otmp->otyp == iflags.soko_prize_type2) {
otmp->record_achieve_special = SOKO_PRIZE2;
otmp->nomerge = 1; /* redundant; Sokoban prizes don't stack */
if (++soko_prize_count > 1)
impossible(prize_warning, "sokoban end");
}