MCPcopy Index your code
hub / github.com/NetHack/NetHack / demonpet

Function demonpet

src/uhitm.c:2132–2145  ·  view source on GitHub ↗

send in a demon pet for the hero; exercise wisdom */

Source from the content-addressed store, hash-verified

2130
2131/* send in a demon pet for the hero; exercise wisdom */
2132staticfn void
2133demonpet(void)
2134{
2135 int i;
2136 struct permonst *pm;
2137 struct monst *dtmp;
2138
2139 pline("Some hell-p has arrived!");
2140 i = !rn2(6) ? ndemon(u.ualign.type) : NON_PM;
2141 pm = i != NON_PM ? &mons[i] : gy.youmonst.data;
2142 if ((dtmp = makemon(pm, u.ux, u.uy, NO_MM_FLAGS)) != 0)
2143 (void) tamedog(dtmp, (struct obj *) 0, FALSE);
2144 exercise(A_WIS, TRUE);
2145}
2146
2147staticfn boolean
2148theft_petrifies(struct obj *otmp)

Callers 1

damageumFunction · 0.85

Calls 6

rn2Function · 0.85
ndemonFunction · 0.85
makemonFunction · 0.85
tamedogFunction · 0.85
exerciseFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected