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:
@@ -309,6 +309,9 @@ bag of holding explosion inside shop billed hero for unpaid contents if it
|
||||
happened when applied while carried but not when looted while on floor
|
||||
looking into an applied container with ':' showed prices of unpaid items but
|
||||
looking into a looted one with ':' did not show prices for shop items
|
||||
prevent achievement luckstone from merging with other luckstones if kicked or
|
||||
dropped by monster (not applicable for dropped by player; achievement
|
||||
would have been recorded and luckstone reverted to normal if picked up)
|
||||
|
||||
|
||||
Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository
|
||||
|
||||
13
src/invent.c
13
src/invent.c
@@ -1,4 +1,4 @@
|
||||
/* NetHack 3.6 invent.c $NHDT-Date: 1545785120 2018/12/26 00:45:20 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.246 $ */
|
||||
/* NetHack 3.6 invent.c $NHDT-Date: 1545946249 2018/12/27 21:30:49 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.247 $ */
|
||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||
/*-Copyright (c) Derek S. Ray, 2015. */
|
||||
/* NetHack may be freely redistributed. See license for details. */
|
||||
@@ -816,9 +816,11 @@ struct obj *obj;
|
||||
if (is_mines_prize(obj)) {
|
||||
u.uachieve.mines_luckstone = 1;
|
||||
obj->record_achieve_special = NON_PM;
|
||||
obj->nomerge = 0;
|
||||
} else if (is_soko_prize(obj)) {
|
||||
u.uachieve.finish_sokoban = 1;
|
||||
obj->record_achieve_special = NON_PM;
|
||||
obj->nomerge = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3534,11 +3536,10 @@ register struct obj *otmp, *obj;
|
||||
{
|
||||
int objnamelth = 0, otmpnamelth = 0;
|
||||
|
||||
if (obj == otmp)
|
||||
return FALSE; /* already the same object */
|
||||
if (obj->otyp != otmp->otyp)
|
||||
return FALSE; /* different types */
|
||||
if (obj->nomerge) /* explicitly marked to prevent merge */
|
||||
/* fail if already the same object, if different types, if either is
|
||||
explicitly marked to prevent merge, or if not mergable in general */
|
||||
if (obj == otmp || obj->otyp != otmp->otyp
|
||||
|| obj->nomerge || otmp->nomerge || !objects[obj->otyp].oc_merge)
|
||||
return FALSE;
|
||||
|
||||
/* coins of the same kind will always merge */
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user