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

Function maybe_smudge_engr

src/hack.c:3019–3031  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3017}
3018
3019staticfn void
3020maybe_smudge_engr(coordxy x1, coordxy y1, coordxy x2, coordxy y2)
3021{
3022 struct engr *ep;
3023
3024 if (can_reach_floor(TRUE)) {
3025 if ((ep = engr_at(x1, y1)) && ep->engr_type != HEADSTONE)
3026 wipe_engr_at(x1, y1, rnd(5), FALSE);
3027 if ((x2 != x1 || y2 != y1)
3028 && (ep = engr_at(x2, y2)) && ep->engr_type != HEADSTONE)
3029 wipe_engr_at(x2, y2, rnd(5), FALSE);
3030 }
3031}
3032
3033/* HP loss or passing out from overexerting yourself */
3034void

Callers 1

domoveFunction · 0.85

Calls 4

can_reach_floorFunction · 0.85
engr_atFunction · 0.85
wipe_engr_atFunction · 0.85
rndFunction · 0.85

Tested by

no test coverage detected