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

Function dbon

src/weapon.c:992–1016  ·  view source on GitHub ↗

damage bonus for strength */

Source from the content-addressed store, hash-verified

990
991/* damage bonus for strength */
992int
993dbon(void)
994{
995 int str = ACURR(A_STR);
996
997 if (Upolyd)
998 return 0;
999
1000 if (str < 6)
1001 return -1;
1002 else if (str < 16)
1003 return 0;
1004 else if (str < 18)
1005 return 1;
1006 else if (str == 18)
1007 return 2; /* up to 18 */
1008 else if (str <= STR18(75))
1009 return 3; /* up to 18/75 */
1010 else if (str <= STR18(90))
1011 return 4; /* up to 18/90 */
1012 else if (str < STR18(100))
1013 return 5; /* up to 18/99 */
1014 else
1015 return 6;
1016}
1017
1018/* called when wet_a_towel() or dry_a_towel() is changing a towel's wetness */
1019staticfn void

Callers 4

hmon_hitmon_dmg_recalcFunction · 0.85
digFunction · 0.85
use_pick_axe2Function · 0.85
use_whipFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected