MCPcopy Create free account
hub / github.com/NetHack/NetHack / mhitm_ad_halu

Function mhitm_ad_halu

src/uhitm.c:3896–3921  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3894}
3895
3896void
3897mhitm_ad_halu(
3898 struct monst *magr,
3899 struct attack *mattk UNUSED,
3900 struct monst *mdef, struct mhitm_data *mhm)
3901{
3902 struct permonst *pd = mdef->data;
3903
3904 if (magr == &gy.youmonst) {
3905 /* uhitm */
3906 mhm->damage = 0;
3907 } else if (mdef == &gy.youmonst) {
3908 /* mhitu */
3909 mhm->damage = 0;
3910 } else {
3911 /* mhitm */
3912 if (!magr->mcan && haseyes(pd) && mdef->mcansee) {
3913 if (gv.vis && canseemon(mdef))
3914 pline_mon(mdef, "%s looks %sconfused.", Monnam(mdef),
3915 mdef->mconf ? "more " : "");
3916 mdef->mconf = 1;
3917 mdef->mstrategy &= ~STRAT_WAITFORU;
3918 }
3919 mhm->damage = 0;
3920 }
3921}
3922
3923boolean
3924do_stone_u(struct monst *mtmp)

Callers 1

mhitm_adtypingFunction · 0.85

Calls 3

canseemonFunction · 0.85
pline_monFunction · 0.85
MonnamFunction · 0.85

Tested by

no test coverage detected