Merge branch 'NetHack-3.6.2'

This commit is contained in:
nhmall
2018-12-27 17:33:05 -05:00
3 changed files with 15 additions and 7 deletions

View File

@@ -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 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 an applied container with ':' showed prices of unpaid items but
looking into a looted one with ':' did not show prices for shop items 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 Fixes to Post-3.6.1 Problems that Were Exposed Via git Repository

View File

@@ -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) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/*-Copyright (c) Derek S. Ray, 2015. */ /*-Copyright (c) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -811,9 +811,11 @@ struct obj *obj;
if (is_mines_prize(obj)) { if (is_mines_prize(obj)) {
u.uachieve.mines_luckstone = 1; u.uachieve.mines_luckstone = 1;
obj->record_achieve_special = NON_PM; obj->record_achieve_special = NON_PM;
obj->nomerge = 0;
} else if (is_soko_prize(obj)) { } else if (is_soko_prize(obj)) {
u.uachieve.finish_sokoban = 1; u.uachieve.finish_sokoban = 1;
obj->record_achieve_special = NON_PM; obj->record_achieve_special = NON_PM;
obj->nomerge = 0;
} }
} }
@@ -3522,11 +3524,10 @@ register struct obj *otmp, *obj;
{ {
int objnamelth = 0, otmpnamelth = 0; int objnamelth = 0, otmpnamelth = 0;
if (obj == otmp) /* fail if already the same object, if different types, if either is
return FALSE; /* already the same object */ explicitly marked to prevent merge, or if not mergable in general */
if (obj->otyp != otmp->otyp) if (obj == otmp || obj->otyp != otmp->otyp
return FALSE; /* different types */ || obj->nomerge || otmp->nomerge || !objects[obj->otyp].oc_merge)
if (obj->nomerge) /* explicitly marked to prevent merge */
return FALSE; return FALSE;
/* coins of the same kind will always merge */ /* coins of the same kind will always merge */

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 */ /* Copyright (c) 1989 by Jean-Christophe Collet */
/* NetHack may be freely redistributed. See license for details. */ /* NetHack may be freely redistributed. See license for details. */
@@ -2024,16 +2024,20 @@ struct mkroom *croom;
if (Is_mineend_level(&u.uz)) { if (Is_mineend_level(&u.uz)) {
if (otmp->otyp == iflags.mines_prize_type) { if (otmp->otyp == iflags.mines_prize_type) {
otmp->record_achieve_special = MINES_PRIZE; otmp->record_achieve_special = MINES_PRIZE;
/* prevent stacking; cleared when achievement is recorded */
otmp->nomerge = 1;
if (++g.mines_prize_count > 1) if (++g.mines_prize_count > 1)
impossible(prize_warning, "mines end"); impossible(prize_warning, "mines end");
} }
} else if (Is_sokoend_level(&u.uz)) { } else if (Is_sokoend_level(&u.uz)) {
if (otmp->otyp == iflags.soko_prize_type1) { if (otmp->otyp == iflags.soko_prize_type1) {
otmp->record_achieve_special = SOKO_PRIZE1; otmp->record_achieve_special = SOKO_PRIZE1;
otmp->nomerge = 1; /* redundant; Sokoban prizes don't stack */
if (++g.soko_prize_count > 1) if (++g.soko_prize_count > 1)
impossible(prize_warning, "sokoban end"); impossible(prize_warning, "sokoban end");
} else if (otmp->otyp == iflags.soko_prize_type2) { } else if (otmp->otyp == iflags.soko_prize_type2) {
otmp->record_achieve_special = SOKO_PRIZE2; otmp->record_achieve_special = SOKO_PRIZE2;
otmp->nomerge = 1; /* redundant; Sokoban prizes don't stack */
if (++g.soko_prize_count > 1) if (++g.soko_prize_count > 1)
impossible(prize_warning, "sokoban end"); impossible(prize_warning, "sokoban end");
} }