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

Function tmiss

src/dothrow.c:1950–1967  ·  view source on GitHub ↗

thrown object misses target monster */

Source from the content-addressed store, hash-verified

1948
1949/* thrown object misses target monster */
1950staticfn void
1951tmiss(struct obj *obj, struct monst *mon, boolean maybe_wakeup)
1952{
1953 const char *missile = mshot_xname(obj);
1954
1955 /* If the target can't be seen or doesn't look like a valid target,
1956 avoid "the arrow misses it," or worse, "the arrows misses the mimic."
1957 An attentive player will still notice that this is different from
1958 an arrow just landing short of any target (no message in that case),
1959 so will realize that there is a valid target here anyway. */
1960 if (!canseemon(mon) || (M_AP_TYPE(mon) && M_AP_TYPE(mon) != M_AP_MONSTER))
1961 pline("%s %s.", The(missile), otense(obj, "miss"));
1962 else
1963 miss(missile, mon);
1964 if (maybe_wakeup && !rn2(3))
1965 wakeup(mon, TRUE);
1966 return;
1967}
1968
1969#define special_obj_hits_leader(obj, mon) \
1970 ((is_quest_artifact(obj) || objects[obj->otyp].oc_unique \

Callers 1

thitmonstFunction · 0.85

Calls 8

mshot_xnameFunction · 0.85
canseemonFunction · 0.85
TheFunction · 0.85
otenseFunction · 0.85
missFunction · 0.85
rn2Function · 0.85
wakeupFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected