diff --git a/include/extern.h b/include/extern.h index c51a00058..d262eab95 100644 --- a/include/extern.h +++ b/include/extern.h @@ -103,7 +103,7 @@ E int NDECL(doinvoke); E boolean FDECL(finesse_ahriman, (struct obj *)); E void FDECL(arti_speak, (struct obj *)); E boolean FDECL(artifact_light, (struct obj *)); -E int FDECL(artifact_wet, (struct obj *, BOOLEAN_P)); +E boolean FDECL(artifact_wet, (struct obj *)); E long FDECL(spec_mh, (struct obj *)); E boolean FDECL(artifact_has_invprop, (struct obj *, UCHAR_P)); E long FDECL(arti_cost, (struct obj *)); diff --git a/src/artifact.c b/src/artifact.c index 1a4b463f0..adcafa257 100644 --- a/src/artifact.c +++ b/src/artifact.c @@ -4036,40 +4036,29 @@ struct obj *obj; * This only prints messages about the actual artifact. */ -int -artifact_wet(obj, silent) +boolean +artifact_wet(obj) struct obj *obj; -boolean silent; { if (!obj->oartifact) - return (-1); + return FALSE; switch (artilist[(int) (obj)->oartifact].attk.adtyp) { - case AD_FIRE: - if (!silent) { + case AD_FIRE: pline("A cloud of steam rises."); - pline("%s is untouched.", The(xname(obj))); - } - return (AD_FIRE); - case AD_COLD: - if (!silent) { + return TRUE; + case AD_COLD: pline("Icicles form and fall from the freezing %s.", xname(obj)); - } - return (AD_COLD); - case AD_ELEC: - if (!silent) { - pline_The("humid air crackles with electricity from %s.", - xname(obj)); - } - return (AD_ELEC); - case AD_DRLI: - if (!silent) { + return TRUE; + case AD_ELEC: + pline_The("humid air crackles with electricity from %s.", xname(obj)); + return TRUE; + case AD_DRLI: pline("%s absorbs the water!", The(xname(obj))); - } - return (AD_DRLI); - default: - break; + return TRUE; + default: + break; } - return (-1); + return FALSE; } /* WAC return TRUE if artifact is always lit */ diff --git a/src/fountain.c b/src/fountain.c index 3cf3c3457..a80131066 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -1092,7 +1092,7 @@ register struct obj *obj; } /* If it is an artifact, it might have a special effect. */ - artifact_wet(obj, FALSE); + artifact_wet(obj); switch (rnd(30)) { case 16: /* Curse the item */ diff --git a/src/potion.c b/src/potion.c index c82538d86..f69b4c801 100644 --- a/src/potion.c +++ b/src/potion.c @@ -3068,7 +3068,7 @@ boolean ourfault; /* Just "fall through" to generic rustprone check for now. */ /* fall through */ default: - if (artifact_wet(targobj, FALSE) != -1) + if (artifact_wet(targobj)) return TRUE; if (targobj->spe > 0) {