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

Function digcheck_fail_message

src/dig.c:254–297  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

252}
253
254void
255digcheck_fail_message(enum digcheck_result digresult, struct monst *madeby,
256 coordxy x, coordxy y)
257{
258 const char *verb =
259 (madeby == BY_YOU && uwep && is_axe(uwep)) ? "chop" : "dig in";
260
261 if (digresult < DIGCHECK_FAILED)
262 return;
263
264 switch (digresult) {
265 case DIGCHECK_FAIL_AIRLEVEL:
266 You("cannot %s thin air.", verb);
267 break;
268 case DIGCHECK_FAIL_ALTAR:
269 pline_The("altar is too hard to break apart.");
270 break;
271 case DIGCHECK_FAIL_BOULDER:
272 There("isn't enough room to %s here.", verb);
273 break;
274 case DIGCHECK_FAIL_ONLADDER:
275 pline_The("ladder resists your effort.");
276 break;
277 case DIGCHECK_FAIL_ONSTAIRS:
278 pline_The("stairs are too hard to %s.", verb);
279 break;
280 case DIGCHECK_FAIL_THRONE:
281 pline_The("throne is too hard to break apart.");
282 break;
283 case DIGCHECK_FAIL_CANTDIG:
284 case DIGCHECK_FAIL_TOOHARD:
285 case DIGCHECK_FAIL_UNDESTROYABLETRAP:
286 pline_The("%s here is too hard to %s.", surface(x, y), verb);
287 break;
288 case DIGCHECK_FAIL_WATERLEVEL:
289 pline_The("%s splashes and subsides.", hliquid("water"));
290 break;
291 case DIGCHECK_FAIL_OBJ_POOL_OR_TRAP:
292 case DIGCHECK_PASSED:
293 case DIGCHECK_PASSED_PITONLY:
294 case DIGCHECK_PASSED_DESTROY_TRAP:
295 break;
296 }
297}
298
299staticfn int
300dig(void)

Callers 1

digFunction · 0.85

Calls 5

YouFunction · 0.85
pline_TheFunction · 0.85
ThereFunction · 0.85
surfaceFunction · 0.85
hliquidFunction · 0.85

Tested by

no test coverage detected