E int FDECL(big_to_little, (int));
E const char *FDECL(locomotion, (const struct permonst *,const char *));
E const char *FDECL(stagger, (const struct permonst *,const char *));
+E const char *FDECL(on_fire, (struct permonst *,struct attack *));
/* ### monmove.c ### */
-/* SCCS Id: @(#)mhitm.c 3.4 2002/11/07 */
+/* SCCS Id: @(#)mhitm.c 3.4 2002/12/09 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
}
if (vis)
pline("%s is %s!", Monnam(mdef),
- mdef->data == &mons[PM_WATER_ELEMENTAL] ? "boiling" :
- mdef->data == &mons[PM_FLAMING_SPHERE] ?
- "already on fire" :
- mattk->aatyp == AT_HUGS ?
- "being roasted" : "on fire");
+ on_fire(mdef->data, mattk));
if (pd == &mons[PM_STRAW_GOLEM] ||
pd == &mons[PM_PAPER_GOLEM]) {
if (vis) pline("%s burns completely!", Monnam(mdef));
-/* SCCS Id: @(#)mhitu.c 3.4 2002/10/17 */
+/* SCCS Id: @(#)mhitu.c 3.4 2002/12/09 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
case AD_FIRE:
hitmsg(mtmp, mattk);
if (uncancelled) {
- pline("You're %s!",
- youmonst.data == &mons[PM_WATER_ELEMENTAL] ?
- "boiling" :
- youmonst.data == &mons[PM_FLAMING_SPHERE] ?
- "already on fire" :
- mattk->aatyp == AT_HUGS ? "being roasted" :
- "on fire");
+ pline("You're %s!", on_fire(youmonst.data, mattk));
if (youmonst.data == &mons[PM_STRAW_GOLEM] ||
youmonst.data == &mons[PM_PAPER_GOLEM]) {
You("roast!");
-/* SCCS Id: @(#)mondata.c 3.4 2002/04/06 */
+/* SCCS Id: @(#)mondata.c 3.4 2002/12/09 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
}
+/* return a phrase describing the effect of fire attack on a type of monster */
+const char *
+on_fire(mptr, mattk)
+struct permonst *mptr;
+struct attack *mattk;
+{
+ return (mptr == &mons[PM_WATER_ELEMENTAL]) ? "boiling" :
+ (mptr == &mons[PM_FLAMING_SPHERE]) ? "already on fire" :
+ (mattk->aatyp == AT_HUGS) ? "being roasted" : "on fire";
+}
+
#endif /* OVLB */
/*mondata.c*/
-/* SCCS Id: @(#)uhitm.c 3.4 2002/11/29 */
+/* SCCS Id: @(#)uhitm.c 3.4 2002/12/09 */
/* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
/* NetHack may be freely redistributed. See license for details. */
case AD_FIRE:
if (!Blind)
pline("%s is %s!", Monnam(mdef),
- mdef->data == &mons[PM_WATER_ELEMENTAL] ? "boiling" :
- mdef->data == &mons[PM_FLAMING_SPHERE] ?
- "already on fire" :
- mattk->aatyp == AT_HUGS ?
- "being roasted" : "on fire");
+ on_fire(mdef->data, mattk));
if (pd == &mons[PM_STRAW_GOLEM] ||
pd == &mons[PM_PAPER_GOLEM]) {
if (!Blind)