Unify ad_dise
This commit is contained in:
@@ -1022,9 +1022,9 @@ register struct attack *mattk;
|
||||
return mhm.hitflags;
|
||||
break;
|
||||
case AD_DISE:
|
||||
hitmsg(mtmp, mattk);
|
||||
if (!diseasemu(mdat))
|
||||
mhm.damage = 0;
|
||||
mhitm_ad_dise(mtmp, mattk, &g.youmonst, &mhm);
|
||||
if (mhm.done)
|
||||
return mhm.hitflags;
|
||||
break;
|
||||
case AD_FIRE:
|
||||
mhitm_ad_fire(mtmp, mattk, &g.youmonst, &mhm);
|
||||
|
||||
24
src/uhitm.c
24
src/uhitm.c
@@ -3985,6 +3985,30 @@ struct mhitm_data *mhm;
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
mhitm_ad_dise(magr, mattk, mdef, mhm)
|
||||
struct monst *magr;
|
||||
struct attack *mattk;
|
||||
struct monst *mdef;
|
||||
struct mhitm_data *mhm;
|
||||
{
|
||||
struct permonst *pa = magr->data;
|
||||
struct permonst *pd = mdef->data;
|
||||
|
||||
if (magr == &g.youmonst) {
|
||||
/* uhitm */
|
||||
mhm->damage = 0;
|
||||
} else if (mdef == &g.youmonst) {
|
||||
/* mhitu */
|
||||
hitmsg(magr, mattk);
|
||||
if (!diseasemu(pa))
|
||||
mhm->damage = 0;
|
||||
} else {
|
||||
/* mhitm */
|
||||
mhm->damage = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/* Template for monster hits monster for AD_FOO.
|
||||
- replace "break" with return
|
||||
|
||||
Reference in New Issue
Block a user