set up for wizard mode if player or save file has requested it; called from port-specific startup code to handle `nethack -D' or OPTIONS=playmode:debug, or from dorecover()'s restgamestate() if restoring a game which was saved in wizard mode */
| 10131 | OPTIONS=playmode:debug, or from dorecover()'s restgamestate() if |
| 10132 | restoring a game which was saved in wizard mode */ |
| 10133 | void |
| 10134 | set_playmode(void) |
| 10135 | { |
| 10136 | if (wizard) { |
| 10137 | if (authorize_wizard_mode()) |
| 10138 | gp.plnamelen = (int) strlen(strcpy(svp.plname, "wizard")); |
| 10139 | else |
| 10140 | wizard = FALSE; /* not allowed or not available */ |
| 10141 | /* try explore mode if we didn't make it into wizard mode */ |
| 10142 | /* if requesting wizard mode when restoring a normal game, this will |
| 10143 | set iflags.deferred_X and prompt to activate explore mode after the |
| 10144 | save file has already been deleted */ |
| 10145 | discover = !wizard; |
| 10146 | iflags.deferred_X = FALSE; |
| 10147 | } |
| 10148 | if (discover && !authorize_explore_mode()) { |
| 10149 | discover = iflags.deferred_X = FALSE; |
| 10150 | } |
| 10151 | /* don't need to do anything special for normal play */ |
| 10152 | } |
| 10153 | |
| 10154 | staticfn void |
| 10155 | enhance_menu_text( |
no test coverage detected