Merge branch 'NetHack-3.6'
This commit is contained in:
+4
-1
@@ -1,4 +1,4 @@
|
|||||||
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.140 $ $NHDT-Date: 1571352531 2019/10/17 22:48:51 $
|
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.141 $ $NHDT-Date: 1571363147 2019/10/18 01:45:47 $
|
||||||
|
|
||||||
This fixes36.3 file is here to capture information about updates in the 3.6.x
|
This fixes36.3 file is here to capture information about updates in the 3.6.x
|
||||||
lineage following the release of 3.6.2 in May 2019. Please note, however,
|
lineage following the release of 3.6.2 in May 2019. Please note, however,
|
||||||
@@ -188,6 +188,9 @@ fix monster stepping on a land mine code accessing deleted trap
|
|||||||
revise 'O' to show symbol sets in the same order they appear in the symbols
|
revise 'O' to show symbol sets in the same order they appear in the symbols
|
||||||
file and order the sets in dat/symbols to yield a sensible symset menu
|
file and order the sets in dat/symbols to yield a sensible symset menu
|
||||||
yellow dragons had green breath
|
yellow dragons had green breath
|
||||||
|
partly eaten food in a bones level shop would show a non-zero sale price
|
||||||
|
while on the floor but not be placed on shop bill if picked up;
|
||||||
|
sale price should have been "no charge"
|
||||||
|
|
||||||
|
|
||||||
Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository
|
Fixes to Post-3.6.2 Problems that Were Exposed Via git Repository
|
||||||
|
|||||||
+19
-1
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 bones.c $NHDT-Date: 1557092711 2019/05/05 21:45:11 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.75 $ */
|
/* NetHack 3.6 bones.c $NHDT-Date: 1571363147 2019/10/18 01:45:47 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.76 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985,1993. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -85,6 +85,24 @@ boolean restore;
|
|||||||
} else if (has_oname(otmp)) {
|
} else if (has_oname(otmp)) {
|
||||||
sanitize_name(ONAME(otmp));
|
sanitize_name(ONAME(otmp));
|
||||||
}
|
}
|
||||||
|
/* 3.6.3: set no_charge for partly eaten food in shop;
|
||||||
|
all other items become goods for sale if in a shop */
|
||||||
|
if (otmp->oclass == FOOD_CLASS && otmp->oeaten) {
|
||||||
|
struct obj *top;
|
||||||
|
char *p;
|
||||||
|
xchar ox, oy;
|
||||||
|
|
||||||
|
for (top = otmp; top->where == OBJ_CONTAINED;
|
||||||
|
top = top->ocontainer)
|
||||||
|
continue;
|
||||||
|
otmp->no_charge = (top->where == OBJ_FLOOR
|
||||||
|
&& get_obj_location(top, &ox, &oy, 0)
|
||||||
|
/* can't use costly_spot() since its
|
||||||
|
result depends upon hero's location */
|
||||||
|
&& inside_shop(ox, oy)
|
||||||
|
&& *(p = in_rooms(ox, oy, SHOPBASE))
|
||||||
|
&& tended_shop(&g.rooms[*p - ROOMOFFSET]));
|
||||||
|
}
|
||||||
} else { /* saving */
|
} else { /* saving */
|
||||||
/* do not zero out o_ids for ghost levels anymore */
|
/* do not zero out o_ids for ghost levels anymore */
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -3301,7 +3301,7 @@ boolean FDECL((*proc), (char *));
|
|||||||
while (*ep == ' ' || *ep == '\t')
|
while (*ep == ' ' || *ep == '\t')
|
||||||
++ep;
|
++ep;
|
||||||
|
|
||||||
/* ingore empty lines and full-line comment lines */
|
/* ignore empty lines and full-line comment lines */
|
||||||
if (!*ep || *ep == '#')
|
if (!*ep || *ep == '#')
|
||||||
ignoreline = TRUE;
|
ignoreline = TRUE;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 shk.c $NHDT-Date: 1570236762 2019/10/05 00:52:42 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.168 $ */
|
/* NetHack 3.6 shk.c $NHDT-Date: 1571363715 2019/10/18 01:55:15 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.170 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
/*-Copyright (c) Robert Patrick Rankin, 2012. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -54,9 +54,10 @@ static long FDECL(stolen_container, (struct obj *, struct monst *,
|
|||||||
static long FDECL(getprice, (struct obj *, BOOLEAN_P));
|
static long FDECL(getprice, (struct obj *, BOOLEAN_P));
|
||||||
static void FDECL(shk_names_obj, (struct monst *, struct obj *,
|
static void FDECL(shk_names_obj, (struct monst *, struct obj *,
|
||||||
const char *, long, const char *));
|
const char *, long, const char *));
|
||||||
static struct obj *FDECL(bp_to_obj, (struct bill_x *));
|
|
||||||
static boolean FDECL(inherits, (struct monst *, int, int, BOOLEAN_P));
|
static boolean FDECL(inherits, (struct monst *, int, int, BOOLEAN_P));
|
||||||
static void FDECL(set_repo_loc, (struct monst *));
|
static void FDECL(set_repo_loc, (struct monst *));
|
||||||
|
static struct obj *FDECL(bp_to_obj, (struct bill_x *));
|
||||||
|
static long FDECL(get_pricing_units, (struct obj *));
|
||||||
static boolean NDECL(angry_shk_exists);
|
static boolean NDECL(angry_shk_exists);
|
||||||
static void FDECL(rile_shk, (struct monst *));
|
static void FDECL(rile_shk, (struct monst *));
|
||||||
static void FDECL(rouse_shk, (struct monst *, BOOLEAN_P));
|
static void FDECL(rouse_shk, (struct monst *, BOOLEAN_P));
|
||||||
@@ -74,7 +75,6 @@ static void FDECL(deserted_shop, (char *));
|
|||||||
static boolean FDECL(special_stock, (struct obj *, struct monst *,
|
static boolean FDECL(special_stock, (struct obj *, struct monst *,
|
||||||
BOOLEAN_P));
|
BOOLEAN_P));
|
||||||
static const char *FDECL(cad, (BOOLEAN_P));
|
static const char *FDECL(cad, (BOOLEAN_P));
|
||||||
static long FDECL(get_pricing_units, (struct obj *obj));
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
invariants: obj->unpaid iff onbill(obj) [unless bp->useup]
|
invariants: obj->unpaid iff onbill(obj) [unless bp->useup]
|
||||||
@@ -4853,7 +4853,7 @@ struct obj *obj_absorber, *obj_absorbed;
|
|||||||
* Scenario 1. Shop-owned glob absorbing into shop-owned glob
|
* Scenario 1. Shop-owned glob absorbing into shop-owned glob
|
||||||
**************************************************************/
|
**************************************************************/
|
||||||
if (bp && (!obj_absorber->no_charge
|
if (bp && (!obj_absorber->no_charge
|
||||||
|| billable(&shkp, obj_absorber, eshkp->shoproom, FALSE))) {
|
|| billable(&shkp, obj_absorber, eshkp->shoproom, FALSE))) {
|
||||||
/* the glob being absorbed has a billing record */
|
/* the glob being absorbed has a billing record */
|
||||||
amount = bp->price;
|
amount = bp->price;
|
||||||
eshkp->billct--;
|
eshkp->billct--;
|
||||||
@@ -4926,18 +4926,14 @@ struct obj *obj_absorber, *obj_absorbed;
|
|||||||
/**************************************************************
|
/**************************************************************
|
||||||
* Scenario 3. shop_owned glob merging into player_owned glob
|
* Scenario 3. shop_owned glob merging into player_owned glob
|
||||||
**************************************************************/
|
**************************************************************/
|
||||||
if (bp &&
|
if (bp && (obj_absorber->no_charge
|
||||||
(obj_absorber->no_charge
|
|| (floor_absorber && !costly_spot(x, y)))) {
|
||||||
|| (floor_absorber && !costly_spot(x, y)))) {
|
|
||||||
amount = bp->price;
|
amount = bp->price;
|
||||||
bill_dummy_object(obj_absorbed);
|
bill_dummy_object(obj_absorbed);
|
||||||
verbalize(
|
verbalize("You owe me %ld %s for my %s that you %s with your%s",
|
||||||
"You owe me %ld %s for my %s that you %s with your%s",
|
amount, currency(amount), obj_typename(obj_absorbed->otyp),
|
||||||
amount, currency(amount), obj_typename(obj_absorbed->otyp),
|
ANGRY(shkp) ? "had the audacity to mix" : "just mixed",
|
||||||
ANGRY(shkp) ? "had the audacity to mix" :
|
ANGRY(shkp) ? " stinking batch!" : "s.");
|
||||||
"just mixed",
|
|
||||||
ANGRY(shkp) ? " stinking batch!" :
|
|
||||||
"s.");
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/**************************************************************
|
/**************************************************************
|
||||||
|
|||||||
@@ -377,7 +377,6 @@ curses_str_remainder(const char *str, int width, int line_num)
|
|||||||
int strsize = strlen(str) + 1;
|
int strsize = strlen(str) + 1;
|
||||||
#if __STDC_VERSION__ >= 199901L
|
#if __STDC_VERSION__ >= 199901L
|
||||||
char substr[strsize];
|
char substr[strsize];
|
||||||
char curstr[strsize];
|
|
||||||
char tmpstr[strsize];
|
char tmpstr[strsize];
|
||||||
|
|
||||||
strcpy(substr, str);
|
strcpy(substr, str);
|
||||||
@@ -386,7 +385,6 @@ curses_str_remainder(const char *str, int width, int line_num)
|
|||||||
#define BUFSZ 256
|
#define BUFSZ 256
|
||||||
#endif
|
#endif
|
||||||
char substr[BUFSZ * 2];
|
char substr[BUFSZ * 2];
|
||||||
char curstr[BUFSZ * 2];
|
|
||||||
char tmpstr[BUFSZ * 2];
|
char tmpstr[BUFSZ * 2];
|
||||||
|
|
||||||
if (strsize > (BUFSZ * 2) - 1) {
|
if (strsize > (BUFSZ * 2) - 1) {
|
||||||
@@ -414,11 +412,7 @@ curses_str_remainder(const char *str, int width, int line_num)
|
|||||||
if (last_space == 0) { /* No spaces found */
|
if (last_space == 0) { /* No spaces found */
|
||||||
last_space = count - 1;
|
last_space = count - 1;
|
||||||
}
|
}
|
||||||
for (count = 0; count < last_space; count++) {
|
if (substr[last_space] == '\0') {
|
||||||
curstr[count] = substr[count];
|
|
||||||
}
|
|
||||||
curstr[count] = '\0';
|
|
||||||
if (substr[count] == '\0') {
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
for (count = (last_space + 1); count < (int) strlen(substr); count++) {
|
for (count = (last_space + 1); count < (int) strlen(substr); count++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user