fire attack messages
Make sure the three instances of special fire effects stay
synchronized in the future by moving the relevant code into its own
routine.
Shouldn't fire vortices and fire elementals also yield "already
on fire"? How about ice vortices "melting"?
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* 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. */
|
||||
|
||||
@@ -688,11 +688,7 @@ mdamagem(magr, mdef, mattk)
|
||||
}
|
||||
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));
|
||||
|
||||
10
src/mhitu.c
10
src/mhitu.c
@@ -1,4 +1,4 @@
|
||||
/* 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. */
|
||||
|
||||
@@ -914,13 +914,7 @@ hitmu(mtmp, mattk)
|
||||
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!");
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* 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. */
|
||||
|
||||
@@ -664,6 +664,17 @@ const char *def;
|
||||
|
||||
}
|
||||
|
||||
/* 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*/
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
/* 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. */
|
||||
|
||||
@@ -1251,11 +1251,7 @@ register struct attack *mattk;
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user