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

Function mpoisons_subj

src/mhitu.c:144–159  ·  view source on GitHub ↗

return how a poison attack was delivered */

Source from the content-addressed store, hash-verified

142
143/* return how a poison attack was delivered */
144const char *
145mpoisons_subj(
146 struct monst *mtmp,
147 struct attack *mattk)
148{
149 if (mattk->aatyp == AT_WEAP) {
150 struct obj *mwep = (mtmp == &gy.youmonst) ? uwep : MON_WEP(mtmp);
151 /* "Foo's attack was poisoned." is pretty lame, but at least
152 it's better than "sting" when not a stinging attack... */
153 return (!mwep || !mwep->opoisoned) ? "attack" : "weapon";
154 } else {
155 return (mattk->aatyp == AT_TUCH) ? "contact"
156 : (mattk->aatyp == AT_GAZE) ? "gaze"
157 : (mattk->aatyp == AT_BITE) ? "bite" : "sting";
158 }
159}
160
161/* called when your intrinsic speed is taken away */
162void

Callers 3

mhitm_really_poisonFunction · 0.85
mhitm_ad_drstFunction · 0.85
mhitm_ad_physFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected