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

Function hit

src/zap.c:3555–3568  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3553}
3554
3555void
3556hit(
3557 const char *str, /* zap text or missile name */
3558 struct monst *mtmp, /* target; for missile, might be hero */
3559 const char *force) /* usually either "." or "!" via exclam() */
3560{
3561 boolean verbosely = (mtmp == &gy.youmonst
3562 || (flags.verbose
3563 && (cansee(gb.bhitpos.x, gb.bhitpos.y)
3564 || canspotmon(mtmp) || engulfing_u(mtmp))));
3565
3566 pline("%s %s %s%s", The(str), vtense(str, "hit"),
3567 verbosely ? mon_nam(mtmp) : "it", force);
3568}
3569
3570void
3571miss(const char *str, struct monst *mtmp)

Callers 8

hmon_hitmon_do_hitFunction · 0.85
hmon_hitmon_msg_hitFunction · 0.85
toss_upFunction · 0.85
bhitmFunction · 0.85
disintegrate_monFunction · 0.85
dobuzzFunction · 0.85
mbhitmFunction · 0.85
ohitmonFunction · 0.85

Calls 4

TheFunction · 0.85
vtenseFunction · 0.85
mon_namFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected