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

Function enter_explore_mode

src/cmd.c:951–983  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

949}
950
951int
952enter_explore_mode(void)
953{
954 if (discover) {
955 You("are already in explore mode.");
956 } else {
957 const char *oldmode = !wizard ? "normal game" : "debug mode";
958
959 if (!authorize_explore_mode()) {
960 if (!wizard) {
961 You("cannot access explore mode.");
962 return ECMD_OK;
963 } else {
964 pline(
965 "Note: normally you wouldn't be allowed into explore mode.");
966 /* keep going */
967 }
968 }
969 pline("Beware! From explore mode there will be no return to %s,",
970 oldmode);
971 if (paranoid_query(ParanoidQuit,
972 "Do you want to enter explore mode?")) {
973 discover = TRUE;
974 wizard = FALSE;
975 clear_nhwindow(WIN_MESSAGE);
976 You("are now in non-scoring explore mode.");
977 } else {
978 clear_nhwindow(WIN_MESSAGE);
979 pline("Continuing with %s.", oldmode);
980 }
981 }
982 return ECMD_OK;
983}
984
985void
986makemap_prepost(boolean pre, boolean wiztower)

Callers 1

moveloop_preambleFunction · 0.85

Calls 4

YouFunction · 0.85
paranoid_queryFunction · 0.85
plineFunction · 0.70
authorize_explore_modeFunction · 0.50

Tested by

no test coverage detected