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

Function m_initthrow

src/makemon.c:147–158  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147staticfn void
148m_initthrow(struct monst *mtmp, int otyp, int oquan)
149{
150 struct obj *otmp;
151
152 otmp = mksobj(otyp, TRUE, FALSE);
153 otmp->quan = (long) rn1(oquan, 3);
154 otmp->owt = weight(otmp);
155 if (otyp == ORCISH_ARROW)
156 otmp->opoisoned = TRUE;
157 (void) mpickobj(mtmp, otmp);
158}
159
160staticfn void
161m_initweap(struct monst *mtmp)

Callers 1

m_initweapFunction · 0.85

Calls 3

mksobjFunction · 0.85
weightFunction · 0.85
mpickobjFunction · 0.85

Tested by

no test coverage detected