-/* SCCS Id: @(#)apply.c 3.4 2004/06/12 */
+/* SCCS Id: @(#)apply.c 3.4 2004/12/21 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
/* if it catches while you have it, then it's your tough luck */
check_unpaid(obj);
verbalize("That's in addition to the cost of %s %s, of course.",
- yname(obj), obj->quan == 1 ? "itself" : "themselves");
+ yname(obj), obj->quan == 1L ? "itself" : "themselves");
bill_dummy_object(obj);
}
begin_burn(obj, FALSE);
}
#endif
- if (obj == tstone && obj->quan == 1) {
+ if (obj == tstone && obj->quan == 1L) {
You_cant("rub %s on itself.", the(xname(obj)));
return;
}
pline("Oh, wow, look at the pretty shards.");
else
pline("A sharp crack shatters %s%s.",
- (obj->quan > 1) ? "one of " : "", the(xname(obj)));
+ (obj->quan > 1L) ? "one of " : "", the(xname(obj)));
#ifndef GOLDOBJ
/* assert(obj != &goldobj); */
#endif
-/* SCCS Id: @(#)dothrow.c 3.4 2004/11/11 */
+/* SCCS Id: @(#)dothrow.c 3.4 2004/12/21 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
You_hear("%s shatter!", something);
else
pline("%s shatter%s%s!", Doname2(obj),
- (obj->quan==1) ? "s" : "", to_pieces);
+ (obj->quan==1L) ? "s" : "", to_pieces);
break;
case EGG:
case MELON:
-/* SCCS Id: @(#)end.c 3.4 2004/12/17 */
+/* SCCS Id: @(#)end.c 3.4 2004/12/21 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
} else {
if (cat || deadcat) {
pline("%s%s contains Schroedinger's %scat!",
- (box->quan > 1) ? "One of the " : "",
- (box->quan > 1) ? xname(box) : upstart(xname(box)),
+ (box->quan > 1L) ? "One of the " : "",
+ (box->quan > 1L) ? xname(box) : upstart(xname(box)),
(deadcat) ? "dead " : "");
display_nhwindow(WIN_MESSAGE, FALSE);
}
-/* SCCS Id: @(#)explode.c 3.4 2004/06/12 */
+/* SCCS Id: @(#)explode.c 3.4 2004/12/21 */
/* Copyright (C) 1990 by Ken Arromdee */
/* NetHack may be freely redistributed. See license for details. */
while ((otmp = individual_object ? obj : level.objects[sx][sy]) != 0) {
if (otmp->quan > 1L) {
- qtmp = otmp->quan - 1;
+ qtmp = otmp->quan - 1L;
if (qtmp > LARGEST_INT) qtmp = LARGEST_INT;
qtmp = (long)rnd((int)qtmp);
otmp = splitobj(otmp, qtmp);
-/* SCCS Id: @(#)mhitu.c 3.4 2004/12/20 */
+/* SCCS Id: @(#)mhitu.c 3.4 2004/12/21 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
return;
pline("%s %s %s%s %s.", Monnam(mtmp),
(objects[otemp->otyp].oc_dir & PIERCE) ? "thrusts" : "swings",
- (otemp->quan > 1) ? "one of " : "",
+ (otemp->quan > 1L) ? "one of " : "",
mhis(mtmp), xname(otemp));
}
-/* SCCS Id: @(#)potion.c 3.4 2004/09/22 */
+/* SCCS Id: @(#)potion.c 3.4 2004/12/21 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
char oldbuf[BUFSZ], newbuf[BUFSZ];
short old_otyp = potion->otyp;
boolean old_dknown = FALSE;
- boolean more_than_one = potion->quan > 1;
+ boolean more_than_one = potion->quan > 1L;
oldbuf[0] = '\0';
if (potion->dknown) {
-/* SCCS Id: @(#)shk.c 3.4 2004/11/17 */
+/* SCCS Id: @(#)shk.c 3.4 2004/12/21 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
if (was_unknown) {
Sprintf(fmtbuf, "%%s; you %s", fmt);
obj_name[0] = highc(obj_name[0]);
- pline(fmtbuf, obj_name, (obj->quan > 1) ? "them" : "it",
+ pline(fmtbuf, obj_name, (obj->quan > 1L) ? "them" : "it",
amt, plur(amt), arg);
} else {
You(fmt, obj_name, amt, plur(amt), arg);
/* convert to an object */
otmp = mksobj((ttmp->ttyp == LANDMINE) ? LAND_MINE :
BEARTRAP, TRUE, FALSE);
- otmp->quan= 1;
+ otmp->quan= 1L;
otmp->owt = weight(otmp);
(void) mpickobj(shkp, otmp);
}
-/* SCCS Id: @(#)sit.c 3.4 2002/09/21 */
+/* SCCS Id: @(#)sit.c 3.4 2004/12/21 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
uegg = mksobj(EGG, FALSE, FALSE);
uegg->spe = 1;
- uegg->quan = 1;
+ uegg->quan = 1L;
uegg->owt = weight(uegg);
uegg->corpsenm = egg_type_from_parent(u.umonnum, FALSE);
uegg->known = uegg->dknown = 1;
-/* SCCS Id: @(#)trap.c 3.4 2004/11/11 */
+/* SCCS Id: @(#)trap.c 3.4 2004/12/21 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
}
dindx = (obj->oclass == SCROLL_CLASS) ? 2 : 3;
if (in_sight)
- pline("%s %s.", Yname2(obj), (obj->quan > 1) ?
+ pline("%s %s.", Yname2(obj), (obj->quan > 1L) ?
destroy_strings[dindx*3 + 1] : destroy_strings[dindx*3]);
delobj(obj);
retval++;
} else if (obj->oclass == POTION_CLASS) {
dindx = 1;
if (in_sight)
- pline("%s %s.", Yname2(obj), (obj->quan > 1) ?
+ pline("%s %s.", Yname2(obj), (obj->quan > 1L) ?
destroy_strings[dindx*3 + 1] : destroy_strings[dindx*3]);
delobj(obj);
retval++;
-/* SCCS Id: @(#)uhitm.c 3.4 2004/11/11 */
+/* SCCS Id: @(#)uhitm.c 3.4 2004/12/21 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
You("hit %s with %s %s.", mon_nam(mon),
obj->dknown ? the(mons[obj->corpsenm].mname) :
an(mons[obj->corpsenm].mname),
- (obj->quan > 1) ? makeplural(withwhat) : withwhat);
+ (obj->quan > 1L) ? makeplural(withwhat) : withwhat);
if (!munstone(mon, TRUE))
minstapetrify(mon, TRUE);
if (resists_ston(mon)) break;
hand-to-hand attack should yield a "bashing" mesg */
if (obj == uwep) unweapon = TRUE;
if (obj->spe && obj->corpsenm >= LOW_PM) {
- if (obj->quan < 5)
+ if (obj->quan < 5L)
change_luck((schar) -(obj->quan));
else
change_luck(-5);
} else {
char *whom = mon_nam(mon);
char *what = The(xname(obj));
- if (!thrown && obj->quan > 1)
+ if (!thrown && obj->quan > 1L)
what = An(singular(obj, xname));
/* note: s_suffix returns a modifiable buffer */
if (haseyes(mdat)
-/* SCCS Id: @(#)zap.c 3.4 2004/11/22 */
+/* SCCS Id: @(#)zap.c 3.4 2004/12/21 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
obj_resists(obj, 2, 100))
continue;
scrquan = obj->quan; /* number present */
- delquan = 0; /* number to destroy */
- for (i = scrquan; i > 0; i--)
+ delquan = 0L; /* number to destroy */
+ for (i = scrquan; i > 0L; i--)
if (!rn2(3)) delquan++;
if (delquan) {
/* save name before potential delobj() */
if (give_feedback) {
- obj->quan = 1;
+ obj->quan = 1L;
Strcpy(buf1, (x == u.ux && y == u.uy) ?
xname(obj) : distant_name(obj, xname));
- obj->quan = 2;
+ obj->quan = 2L;
Strcpy(buf2, (x == u.ux && y == u.uy) ?
xname(obj) : distant_name(obj, xname));
obj->quan = scrquan;
else delobj(obj);
cnt += delquan;
if (give_feedback) {
- if (delquan > 1)
+ if (delquan > 1L)
pline("%ld %s burn.", delquan, buf2);
else
pline("%s burns.", An(buf1));
physical_damage = FALSE;
if(obj->oclass != osym) continue; /* test only objs of type osym */
if(obj->oartifact) continue; /* don't destroy artifacts */
- if(obj->in_use && obj->quan == 1) continue; /* not available */
+ if(obj->in_use && obj->quan == 1L) continue; /* not available */
xresist = skip = 0;
#ifdef GCC_WARN
dmg = dindx = 0;