E void FDECL(mhitm_ad_stun, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_legs, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E void FDECL(mhitm_ad_dgst, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
+E void FDECL(mhitm_ad_samu, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E boolean FDECL(do_stone_u, (struct monst *));
E void FDECL(do_stone_mon, (struct monst *, struct attack *, struct monst *, struct mhitm_data *));
E int FDECL(damageum, (struct monst *, struct attack *, int));
break;
case AD_SAMU:
- hitmsg(mtmp, mattk);
- /* when the Wizard or quest nemesis hits, there's a 1/20 chance
- to steal a quest artifact (any, not just the one for the hero's
- own role) or the Amulet or one of the invocation tools */
- if (!rn2(20))
- stealamulet(mtmp);
+ mhitm_ad_samu(mtmp, mattk, &g.youmonst, &mhm);
+ if (mhm.done)
+ return mhm.hitflags;
break;
-
case AD_TLPT:
mhitm_ad_tlpt(mtmp, mattk, &g.youmonst, &mhm);
if (mhm.done)
}
}
+void
+mhitm_ad_samu(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 */
+ hitmsg(magr, mattk);
+ /* when the Wizard or quest nemesis hits, there's a 1/20 chance
+ to steal a quest artifact (any, not just the one for the hero's
+ own role) or the Amulet or one of the invocation tools */
+ if (!rn2(20))
+ stealamulet(magr);
+ } else {
+ /* mhitm */
+ mhm->damage = 0;
+ }
+}
+
+
/* Template for monster hits monster for AD_FOO.
- replace "break" with return
- replace "return" with mhm->done = TRUE