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

Function openit

src/detect.c:1901–1925  ·  view source on GitHub ↗

returns number of things found and opened */

Source from the content-addressed store, hash-verified

1899
1900/* returns number of things found and opened */
1901int
1902openit(void)
1903{
1904 int num = 0;
1905
1906 if (u.uswallow) {
1907 if (digests(u.ustuck->data)) {
1908 /* purple worm */
1909 if (Blind)
1910 pline("Its mouth opens!");
1911 else
1912 pline("%s opens its mouth!", Monnam(u.ustuck));
1913#if 0 /* expels() will take care of this */
1914 } else if (enfolds(u.ustuck->data)) {
1915 /* trapper or lurker above */
1916 pline("%s unfolds!", Monnam(u.ustuck));
1917#endif
1918 }
1919 expels(u.ustuck, u.ustuck->data, TRUE);
1920 return -1;
1921 }
1922
1923 do_clear_area(u.ux, u.uy, BOLT_LIM, openone, (genericptr_t) &num);
1924 return num;
1925}
1926
1927/* callback hack for overriding vision in do_clear_area() */
1928boolean

Callers 1

use_bellFunction · 0.85

Calls 4

MonnamFunction · 0.85
expelsFunction · 0.85
do_clear_areaFunction · 0.85
plineFunction · 0.70

Tested by

no test coverage detected