miscellaneous formatting
Some minor stuff that's been sitting around for a while.
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 do.c $NHDT-Date: 1545597418 2018/12/23 20:36:58 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.182 $ */
|
/* NetHack 3.6 do.c $NHDT-Date: 1547086513 2019/01/10 02:15:13 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.183 $ */
|
||||||
/* 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. */
|
||||||
@@ -371,7 +371,7 @@ register struct obj *obj;
|
|||||||
goto giveback;
|
goto giveback;
|
||||||
case RIN_SLOW_DIGESTION:
|
case RIN_SLOW_DIGESTION:
|
||||||
pline_The("ring is regurgitated!");
|
pline_The("ring is regurgitated!");
|
||||||
giveback:
|
giveback:
|
||||||
obj->in_use = FALSE;
|
obj->in_use = FALSE;
|
||||||
dropx(obj);
|
dropx(obj);
|
||||||
trycall(obj);
|
trycall(obj);
|
||||||
@@ -890,7 +890,7 @@ int retry;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
drop_done:
|
drop_done:
|
||||||
return n_dropped;
|
return n_dropped;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1698,17 +1698,16 @@ struct obj *corpse;
|
|||||||
where = corpse->where;
|
where = corpse->where;
|
||||||
is_uwep = (corpse == uwep);
|
is_uwep = (corpse == uwep);
|
||||||
chewed = (corpse->oeaten != 0);
|
chewed = (corpse->oeaten != 0);
|
||||||
Strcpy(cname,
|
Strcpy(cname, corpse_xname(corpse,
|
||||||
corpse_xname(corpse, chewed ? "bite-covered" : (const char *) 0,
|
chewed ? "bite-covered" : (const char *) 0,
|
||||||
CXN_SINGULAR));
|
CXN_SINGULAR));
|
||||||
mcarry = (where == OBJ_MINVENT) ? corpse->ocarry : 0;
|
mcarry = (where == OBJ_MINVENT) ? corpse->ocarry : 0;
|
||||||
|
|
||||||
if (where == OBJ_CONTAINED) {
|
if (where == OBJ_CONTAINED) {
|
||||||
struct monst *mtmp2;
|
struct monst *mtmp2;
|
||||||
|
|
||||||
container = corpse->ocontainer;
|
container = corpse->ocontainer;
|
||||||
mtmp2 =
|
mtmp2 = get_container_location(container, &container_where, (int *) 0);
|
||||||
get_container_location(container, &container_where, (int *) 0);
|
|
||||||
/* container_where is the outermost container's location even if
|
/* container_where is the outermost container's location even if
|
||||||
* nested */
|
* nested */
|
||||||
if (container_where == OBJ_MINVENT && mtmp2)
|
if (container_where == OBJ_MINVENT && mtmp2)
|
||||||
|
|||||||
+9
-8
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 dokick.c $NHDT-Date: 1543185070 2018/11/25 22:31:10 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.128 $ */
|
/* NetHack 3.6 dokick.c $NHDT-Date: 1547086527 2019/01/10 02:15:27 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.129 $ */
|
||||||
/* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */
|
/* Copyright (c) Izchak Miller, Mike Stephenson, Steve Linhart, 1989. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
|
|
||||||
@@ -247,7 +247,7 @@ xchar x, y;
|
|||||||
|
|
||||||
else if (uarm && objects[uarm->otyp].oc_bulky && ACURR(A_DEX) < rnd(25))
|
else if (uarm && objects[uarm->otyp].oc_bulky && ACURR(A_DEX) < rnd(25))
|
||||||
clumsy = TRUE;
|
clumsy = TRUE;
|
||||||
doit:
|
doit:
|
||||||
You("kick %s.", mon_nam(mon));
|
You("kick %s.", mon_nam(mon));
|
||||||
if (!rn2(clumsy ? 3 : 4) && (clumsy || !bigmonst(mon->data))
|
if (!rn2(clumsy ? 3 : 4) && (clumsy || !bigmonst(mon->data))
|
||||||
&& mon->mcansee && !mon->mtrapped && !thick_skinned(mon->data)
|
&& mon->mcansee && !mon->mtrapped && !thick_skinned(mon->data)
|
||||||
@@ -1203,7 +1203,7 @@ dokick()
|
|||||||
|| IS_STWALL(maploc->typ)) {
|
|| IS_STWALL(maploc->typ)) {
|
||||||
if (!IS_STWALL(maploc->typ) && maploc->ladder == LA_DOWN)
|
if (!IS_STWALL(maploc->typ) && maploc->ladder == LA_DOWN)
|
||||||
goto dumb;
|
goto dumb;
|
||||||
ouch:
|
ouch:
|
||||||
pline("Ouch! That hurts!");
|
pline("Ouch! That hurts!");
|
||||||
exercise(A_DEX, FALSE);
|
exercise(A_DEX, FALSE);
|
||||||
exercise(A_STR, FALSE);
|
exercise(A_STR, FALSE);
|
||||||
@@ -1230,7 +1230,7 @@ dokick()
|
|||||||
|
|
||||||
if (maploc->doormask == D_ISOPEN || maploc->doormask == D_BROKEN
|
if (maploc->doormask == D_ISOPEN || maploc->doormask == D_BROKEN
|
||||||
|| maploc->doormask == D_NODOOR) {
|
|| maploc->doormask == D_NODOOR) {
|
||||||
dumb:
|
dumb:
|
||||||
exercise(A_DEX, FALSE);
|
exercise(A_DEX, FALSE);
|
||||||
if (martial() || ACURR(A_DEX) >= 16 || rn2(3)) {
|
if (martial() || ACURR(A_DEX) >= 16 || rn2(3)) {
|
||||||
You("kick at empty space.");
|
You("kick at empty space.");
|
||||||
@@ -1412,10 +1412,11 @@ xchar dlev; /* if !0 send to dlev near player */
|
|||||||
obj_extract_self(obj);
|
obj_extract_self(obj);
|
||||||
|
|
||||||
if (costly) {
|
if (costly) {
|
||||||
price += stolen_value(
|
price += stolen_value(obj, x, y,
|
||||||
obj, x, y, (costly_spot(u.ux, u.uy)
|
(costly_spot(u.ux, u.uy)
|
||||||
&& index(u.urooms, *in_rooms(x, y, SHOPBASE))),
|
&& index(u.urooms,
|
||||||
TRUE);
|
*in_rooms(x, y, SHOPBASE))),
|
||||||
|
TRUE);
|
||||||
/* set obj->no_charge to 0 */
|
/* set obj->no_charge to 0 */
|
||||||
if (Has_contents(obj))
|
if (Has_contents(obj))
|
||||||
picked_container(obj); /* does the right thing */
|
picked_container(obj); /* does the right thing */
|
||||||
|
|||||||
+6
-5
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 lock.c $NHDT-Date: 1544442712 2018/12/10 11:51:52 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.82 $ */
|
/* NetHack 3.6 lock.c $NHDT-Date: 1547086531 2019/01/10 02:15:31 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.83 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
/*-Copyright (c) Robert Patrick Rankin, 2011. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -195,12 +195,13 @@ boolean destroyit;
|
|||||||
if (!rn2(3) || otmp->oclass == POTION_CLASS) {
|
if (!rn2(3) || otmp->oclass == POTION_CLASS) {
|
||||||
chest_shatter_msg(otmp);
|
chest_shatter_msg(otmp);
|
||||||
if (costly)
|
if (costly)
|
||||||
loss +=
|
loss += stolen_value(otmp, u.ux, u.uy, peaceful_shk, TRUE);
|
||||||
stolen_value(otmp, u.ux, u.uy, peaceful_shk, TRUE);
|
|
||||||
if (otmp->quan == 1L) {
|
if (otmp->quan == 1L) {
|
||||||
obfree(otmp, (struct obj *) 0);
|
obfree(otmp, (struct obj *) 0);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
/* this works because we're sure to have at least 1 left;
|
||||||
|
otherwise it would fail since otmp is not in inventory */
|
||||||
useup(otmp);
|
useup(otmp);
|
||||||
}
|
}
|
||||||
if (box->otyp == ICE_BOX && otmp->otyp == CORPSE) {
|
if (box->otyp == ICE_BOX && otmp->otyp == CORPSE) {
|
||||||
@@ -746,7 +747,7 @@ boolean quietly;
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
if (OBJ_AT(x, y)) {
|
if (OBJ_AT(x, y)) {
|
||||||
objhere:
|
objhere:
|
||||||
if (!quietly)
|
if (!quietly)
|
||||||
pline("%s's in the way.", Something);
|
pline("%s's in the way.", Something);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@@ -812,7 +813,7 @@ doclose()
|
|||||||
else if (portcullis || door->typ == DRAWBRIDGE_DOWN)
|
else if (portcullis || door->typ == DRAWBRIDGE_DOWN)
|
||||||
There("is no obvious way to close the drawbridge.");
|
There("is no obvious way to close the drawbridge.");
|
||||||
else {
|
else {
|
||||||
nodoor:
|
nodoor:
|
||||||
You("%s no door there.", Blind ? "feel" : "see");
|
You("%s no door there.", Blind ? "feel" : "see");
|
||||||
}
|
}
|
||||||
return res;
|
return res;
|
||||||
|
|||||||
+5
-5
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 mkobj.c $NHDT-Date: 1546837153 2019/01/07 04:59:13 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.140 $ */
|
/* NetHack 3.6 mkobj.c $NHDT-Date: 1547086532 2019/01/10 02:15:32 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.141 $ */
|
||||||
/* 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. */
|
||||||
@@ -71,7 +71,7 @@ newoextra()
|
|||||||
{
|
{
|
||||||
struct oextra *oextra;
|
struct oextra *oextra;
|
||||||
|
|
||||||
oextra = (struct oextra *) alloc(sizeof(struct oextra));
|
oextra = (struct oextra *) alloc(sizeof (struct oextra));
|
||||||
oextra->oname = 0;
|
oextra->oname = 0;
|
||||||
oextra->omonst = 0;
|
oextra->omonst = 0;
|
||||||
oextra->omid = 0;
|
oextra->omid = 0;
|
||||||
@@ -391,7 +391,7 @@ struct obj *obj2, *obj1;
|
|||||||
if (!OMONST(obj2))
|
if (!OMONST(obj2))
|
||||||
newomonst(obj2);
|
newomonst(obj2);
|
||||||
(void) memcpy((genericptr_t) OMONST(obj2),
|
(void) memcpy((genericptr_t) OMONST(obj2),
|
||||||
(genericptr_t) OMONST(obj1), sizeof(struct monst));
|
(genericptr_t) OMONST(obj1), sizeof (struct monst));
|
||||||
OMONST(obj2)->mextra = (struct mextra *) 0;
|
OMONST(obj2)->mextra = (struct mextra *) 0;
|
||||||
OMONST(obj2)->nmon = (struct monst *) 0;
|
OMONST(obj2)->nmon = (struct monst *) 0;
|
||||||
#if 0
|
#if 0
|
||||||
@@ -406,13 +406,13 @@ struct obj *obj2, *obj1;
|
|||||||
if (!OMID(obj2))
|
if (!OMID(obj2))
|
||||||
newomid(obj2);
|
newomid(obj2);
|
||||||
(void) memcpy((genericptr_t) OMID(obj2), (genericptr_t) OMID(obj1),
|
(void) memcpy((genericptr_t) OMID(obj2), (genericptr_t) OMID(obj1),
|
||||||
sizeof(unsigned));
|
sizeof (unsigned));
|
||||||
}
|
}
|
||||||
if (has_olong(obj1)) {
|
if (has_olong(obj1)) {
|
||||||
if (!OLONG(obj2))
|
if (!OLONG(obj2))
|
||||||
newolong(obj2);
|
newolong(obj2);
|
||||||
(void) memcpy((genericptr_t) OLONG(obj2), (genericptr_t) OLONG(obj1),
|
(void) memcpy((genericptr_t) OLONG(obj2), (genericptr_t) OLONG(obj1),
|
||||||
sizeof(long));
|
sizeof (long));
|
||||||
}
|
}
|
||||||
if (has_omailcmd(obj1)) {
|
if (has_omailcmd(obj1)) {
|
||||||
new_omailcmd(obj2, OMAILCMD(obj1));
|
new_omailcmd(obj2, OMAILCMD(obj1));
|
||||||
|
|||||||
+9
-8
@@ -1,4 +1,4 @@
|
|||||||
/* NetHack 3.6 potion.c $NHDT-Date: 1545597429 2018/12/23 20:37:09 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.157 $ */
|
/* NetHack 3.6 potion.c $NHDT-Date: 1547086533 2019/01/10 02:15:33 $ $NHDT-Branch: NetHack-3.6.2-beta01 $:$NHDT-Revision: 1.158 $ */
|
||||||
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
|
||||||
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
/*-Copyright (c) Robert Patrick Rankin, 2013. */
|
||||||
/* NetHack may be freely redistributed. See license for details. */
|
/* NetHack may be freely redistributed. See license for details. */
|
||||||
@@ -1402,7 +1402,7 @@ int how;
|
|||||||
/*FALLTHRU*/
|
/*FALLTHRU*/
|
||||||
case POT_RESTORE_ABILITY:
|
case POT_RESTORE_ABILITY:
|
||||||
case POT_GAIN_ABILITY:
|
case POT_GAIN_ABILITY:
|
||||||
do_healing:
|
do_healing:
|
||||||
angermon = FALSE;
|
angermon = FALSE;
|
||||||
if (mon->mhp < mon->mhpmax) {
|
if (mon->mhp < mon->mhpmax) {
|
||||||
mon->mhp = mon->mhpmax;
|
mon->mhp = mon->mhpmax;
|
||||||
@@ -1424,7 +1424,7 @@ int how;
|
|||||||
pline("%s looks unharmed.", Monnam(mon));
|
pline("%s looks unharmed.", Monnam(mon));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
do_illness:
|
do_illness:
|
||||||
if ((mon->mhpmax > 3) && !resist(mon, POTION_CLASS, 0, NOTELL))
|
if ((mon->mhpmax > 3) && !resist(mon, POTION_CLASS, 0, NOTELL))
|
||||||
mon->mhpmax /= 2;
|
mon->mhpmax /= 2;
|
||||||
if ((mon->mhp > 2) && !resist(mon, POTION_CLASS, 0, NOTELL))
|
if ((mon->mhp > 2) && !resist(mon, POTION_CLASS, 0, NOTELL))
|
||||||
@@ -2146,7 +2146,7 @@ dodip()
|
|||||||
useup(potion);
|
useup(potion);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
more_dips:
|
more_dips:
|
||||||
|
|
||||||
/* Allow filling of MAGIC_LAMPs to prevent identification by player */
|
/* Allow filling of MAGIC_LAMPs to prevent identification by player */
|
||||||
if ((obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP)
|
if ((obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP)
|
||||||
@@ -2234,9 +2234,10 @@ more_dips:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
obj_extract_self(singlepotion);
|
obj_extract_self(singlepotion);
|
||||||
singlepotion =
|
singlepotion = hold_another_object(singlepotion,
|
||||||
hold_another_object(singlepotion, "You juggle and drop %s!",
|
"You juggle and drop %s!",
|
||||||
doname(singlepotion), (const char *) 0);
|
doname(singlepotion),
|
||||||
|
(const char *) 0);
|
||||||
nhUse(singlepotion);
|
nhUse(singlepotion);
|
||||||
update_inventory();
|
update_inventory();
|
||||||
return 1;
|
return 1;
|
||||||
@@ -2245,7 +2246,7 @@ more_dips:
|
|||||||
pline("Interesting...");
|
pline("Interesting...");
|
||||||
return 1;
|
return 1;
|
||||||
|
|
||||||
poof:
|
poof:
|
||||||
if (!objects[potion->otyp].oc_name_known
|
if (!objects[potion->otyp].oc_name_known
|
||||||
&& !objects[potion->otyp].oc_uname)
|
&& !objects[potion->otyp].oc_uname)
|
||||||
docall(potion);
|
docall(potion);
|
||||||
|
|||||||
Reference in New Issue
Block a user