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,
(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);
}
}
+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