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

Function hmon_hitmon_msg_hit

src/uhitm.c:1636–1660  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1634}
1635
1636staticfn void
1637hmon_hitmon_msg_hit(
1638 struct _hitmon_data *hmd,
1639 struct monst *mon,
1640 struct obj *obj) /* obj can be NULL for hand_to_hand; otherwise not */
1641{
1642 if (!hmd->hittxt /*( thrown => obj exists )*/
1643 && (!hmd->destroyed
1644 || (hmd->thrown && gm.m_shot.n > 1
1645 && gm.m_shot.o == obj->otyp))) {
1646 if (hmd->thrown)
1647 hit(mshot_xname(obj), mon, exclam(hmd->dmg));
1648 else if (!flags.verbose)
1649 You("hit it.");
1650 else /* hand_to_hand */
1651 You("%s %s%s",
1652 (obj && (is_shield(obj)
1653 || obj->otyp == HEAVY_IRON_BALL)) ? "bash"
1654 : (obj && (objects[obj->otyp].oc_skill == P_WHIP
1655 || is_wet_towel(obj))) ? "lash"
1656 : Role_if(PM_BARBARIAN) ? "smite"
1657 : "hit",
1658 mon_nam(mon), canseemon(mon) ? exclam(hmd->dmg) : ".");
1659 }
1660}
1661
1662staticfn void
1663hmon_hitmon_msg_silver(

Callers 1

hmon_hitmonFunction · 0.85

Calls 6

hitFunction · 0.85
mshot_xnameFunction · 0.85
exclamFunction · 0.85
YouFunction · 0.85
mon_namFunction · 0.85
canseemonFunction · 0.85

Tested by

no test coverage detected