Some minor stuff that's been sitting around for a while.
-/* 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) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
goto giveback;
case RIN_SLOW_DIGESTION:
pline_The("ring is regurgitated!");
- giveback:
+ giveback:
obj->in_use = FALSE;
dropx(obj);
trycall(obj);
}
}
-drop_done:
+ drop_done:
return n_dropped;
}
where = corpse->where;
is_uwep = (corpse == uwep);
chewed = (corpse->oeaten != 0);
- Strcpy(cname,
- corpse_xname(corpse, chewed ? "bite-covered" : (const char *) 0,
- CXN_SINGULAR));
+ Strcpy(cname, corpse_xname(corpse,
+ chewed ? "bite-covered" : (const char *) 0,
+ CXN_SINGULAR));
mcarry = (where == OBJ_MINVENT) ? corpse->ocarry : 0;
if (where == OBJ_CONTAINED) {
struct monst *mtmp2;
container = corpse->ocontainer;
- mtmp2 =
- get_container_location(container, &container_where, (int *) 0);
+ mtmp2 = get_container_location(container, &container_where, (int *) 0);
/* container_where is the outermost container's location even if
* nested */
if (container_where == OBJ_MINVENT && mtmp2)
-/* 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. */
/* NetHack may be freely redistributed. See license for details. */
else if (uarm && objects[uarm->otyp].oc_bulky && ACURR(A_DEX) < rnd(25))
clumsy = TRUE;
-doit:
+ doit:
You("kick %s.", mon_nam(mon));
if (!rn2(clumsy ? 3 : 4) && (clumsy || !bigmonst(mon->data))
&& mon->mcansee && !mon->mtrapped && !thick_skinned(mon->data)
|| IS_STWALL(maploc->typ)) {
if (!IS_STWALL(maploc->typ) && maploc->ladder == LA_DOWN)
goto dumb;
- ouch:
+ ouch:
pline("Ouch! That hurts!");
exercise(A_DEX, FALSE);
exercise(A_STR, FALSE);
if (maploc->doormask == D_ISOPEN || maploc->doormask == D_BROKEN
|| maploc->doormask == D_NODOOR) {
- dumb:
+ dumb:
exercise(A_DEX, FALSE);
if (martial() || ACURR(A_DEX) >= 16 || rn2(3)) {
You("kick at empty space.");
obj_extract_self(obj);
if (costly) {
- price += stolen_value(
- obj, x, y, (costly_spot(u.ux, u.uy)
- && index(u.urooms, *in_rooms(x, y, SHOPBASE))),
- TRUE);
+ price += stolen_value(obj, x, y,
+ (costly_spot(u.ux, u.uy)
+ && index(u.urooms,
+ *in_rooms(x, y, SHOPBASE))),
+ TRUE);
/* set obj->no_charge to 0 */
if (Has_contents(obj))
picked_container(obj); /* does the right thing */
struct obj *otmp, *otmp2;
int where, maxobj = 1;
boolean at_crime_scene = In_mines(&u.uz);
-
+
if ((deliverflags & DF_RANDOM) && cnt > 1)
maxobj = rnd(cnt);
else if (deliverflags & DF_ALL)
-/* 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) Robert Patrick Rankin, 2011. */
/* NetHack may be freely redistributed. See license for details. */
if (!rn2(3) || otmp->oclass == POTION_CLASS) {
chest_shatter_msg(otmp);
if (costly)
- loss +=
- stolen_value(otmp, u.ux, u.uy, peaceful_shk, TRUE);
+ loss += stolen_value(otmp, u.ux, u.uy, peaceful_shk, TRUE);
if (otmp->quan == 1L) {
obfree(otmp, (struct obj *) 0);
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);
}
if (box->otyp == ICE_BOX && otmp->otyp == CORPSE) {
return TRUE;
}
if (OBJ_AT(x, y)) {
- objhere:
+ objhere:
if (!quietly)
pline("%s's in the way.", Something);
return TRUE;
else if (portcullis || door->typ == DRAWBRIDGE_DOWN)
There("is no obvious way to close the drawbridge.");
else {
- nodoor:
+ nodoor:
You("%s no door there.", Blind ? "feel" : "see");
}
return res;
-/* 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) Derek S. Ray, 2015. */
/* NetHack may be freely redistributed. See license for details. */
{
struct oextra *oextra;
- oextra = (struct oextra *) alloc(sizeof(struct oextra));
+ oextra = (struct oextra *) alloc(sizeof (struct oextra));
oextra->oname = 0;
oextra->omonst = 0;
oextra->omid = 0;
if (!OMONST(obj2))
newomonst(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)->nmon = (struct monst *) 0;
#if 0
if (!OMID(obj2))
newomid(obj2);
(void) memcpy((genericptr_t) OMID(obj2), (genericptr_t) OMID(obj1),
- sizeof(unsigned));
+ sizeof (unsigned));
}
if (has_olong(obj1)) {
if (!OLONG(obj2))
newolong(obj2);
(void) memcpy((genericptr_t) OLONG(obj2), (genericptr_t) OLONG(obj1),
- sizeof(long));
+ sizeof (long));
}
if (has_omailcmd(obj1)) {
new_omailcmd(obj2, OMAILCMD(obj1));
-/* 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) Robert Patrick Rankin, 2013. */
/* NetHack may be freely redistributed. See license for details. */
/*FALLTHRU*/
case POT_RESTORE_ABILITY:
case POT_GAIN_ABILITY:
- do_healing:
+ do_healing:
angermon = FALSE;
if (mon->mhp < mon->mhpmax) {
mon->mhp = mon->mhpmax;
pline("%s looks unharmed.", Monnam(mon));
break;
}
- do_illness:
+ do_illness:
if ((mon->mhpmax > 3) && !resist(mon, POTION_CLASS, 0, NOTELL))
mon->mhpmax /= 2;
if ((mon->mhp > 2) && !resist(mon, POTION_CLASS, 0, NOTELL))
useup(potion);
return 1;
}
-more_dips:
+ more_dips:
/* Allow filling of MAGIC_LAMPs to prevent identification by player */
if ((obj->otyp == OIL_LAMP || obj->otyp == MAGIC_LAMP)
}
}
obj_extract_self(singlepotion);
- singlepotion =
- hold_another_object(singlepotion, "You juggle and drop %s!",
- doname(singlepotion), (const char *) 0);
+ singlepotion = hold_another_object(singlepotion,
+ "You juggle and drop %s!",
+ doname(singlepotion),
+ (const char *) 0);
nhUse(singlepotion);
update_inventory();
return 1;
pline("Interesting...");
return 1;
-poof:
+ poof:
if (!objects[potion->otyp].oc_name_known
&& !objects[potion->otyp].oc_uname)
docall(potion);