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

Function earth_sense

src/dungeon.c:1547–1565  ·  view source on GitHub ↗

Dwarves have "earth sense", able to sense if something is buried under their feet */

Source from the content-addressed store, hash-verified

1545/* Dwarves have "earth sense",
1546 able to sense if something is buried under their feet */
1547staticfn void
1548earth_sense(void)
1549{
1550 struct obj *otmp;
1551
1552 if (!Race_if(PM_DWARF))
1553 return;
1554 if (u.usteed || Flying || Levitation || Upolyd)
1555 return;
1556 if (levl[u.ux][u.uy].typ != CORR
1557 && levl[u.ux][u.uy].typ != ROOM)
1558 return;
1559
1560 for (otmp = svl.level.buriedobjlist; otmp; otmp = otmp->nobj)
1561 if (u_at(otmp->ox, otmp->oy)) {
1562 You("sense something below your %s.", makeplural(body_part(FOOT)));
1563 return;
1564 }
1565}
1566
1567void
1568u_on_newpos(coordxy x, coordxy y)

Callers 1

u_on_newposFunction · 0.85

Calls 3

YouFunction · 0.85
makepluralFunction · 0.85
body_partFunction · 0.85

Tested by

no test coverage detected