Unify ad_famn
This commit is contained in:
@@ -2780,6 +2780,7 @@ E void FDECL(mhitm_ad_ench, (struct monst *, struct attack *, struct monst *, st
|
||||
E void FDECL(mhitm_ad_slow, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
|
||||
E void FDECL(mhitm_ad_conf, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
|
||||
E void FDECL(mhitm_ad_poly, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
|
||||
E void FDECL(mhitm_ad_famn, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
|
||||
E int FDECL(damageum, (struct monst *, struct attack *, int));
|
||||
E void FDECL(missum, (struct monst *, struct attack *, BOOLEAN_P));
|
||||
E int FDECL(passive, (struct monst *, struct obj *, BOOLEAN_P, int,
|
||||
|
||||
@@ -1463,11 +1463,9 @@ register struct attack *mattk;
|
||||
(void) diseasemu(mdat); /* plus the normal damage */
|
||||
break;
|
||||
case AD_FAMN:
|
||||
pline("%s reaches out, and your body shrivels.", Monnam(mtmp));
|
||||
exercise(A_CON, FALSE);
|
||||
if (!is_fainted())
|
||||
morehungry(rn1(40, 40));
|
||||
/* plus the normal damage */
|
||||
mhitm_ad_famn(mtmp, mattk, &g.youmonst, &mhm);
|
||||
if (mhm.done)
|
||||
return mhm.hitflags;
|
||||
break;
|
||||
case AD_SLIM:
|
||||
mhitm_ad_slim(mtmp, mattk, &g.youmonst, &mhm);
|
||||
|
||||
25
src/uhitm.c
25
src/uhitm.c
@@ -3216,6 +3216,31 @@ struct mhitm_data *mhm;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
mhitm_ad_famn(magr, mattk, mdef, mhm)
|
||||
struct monst *magr;
|
||||
struct attack *mattk;
|
||||
struct monst *mdef;
|
||||
struct mhitm_data *mhm;
|
||||
{
|
||||
struct permonst *pd = mdef->data;
|
||||
|
||||
if (magr == &g.youmonst) {
|
||||
/* uhitm */
|
||||
mhm->damage = 0;
|
||||
} else if (mdef == &g.youmonst) {
|
||||
/* mhitu */
|
||||
pline("%s reaches out, and your body shrivels.", Monnam(magr));
|
||||
exercise(A_CON, FALSE);
|
||||
if (!is_fainted())
|
||||
morehungry(rn1(40, 40));
|
||||
/* plus the normal damage */
|
||||
} else {
|
||||
/* mhitm */
|
||||
mhm->damage = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* Template for monster hits monster for AD_FOO.
|
||||
- replace "break" with return
|
||||
- replace "return" with mhm->done = TRUE
|
||||
|
||||
Reference in New Issue
Block a user