| 406 | } |
| 407 | |
| 408 | RESTORE_WARNING_FORMAT_NONLITERAL |
| 409 | |
| 410 | /* #wizfliplevel - transpose the current level */ |
| 411 | int |
| 412 | wiz_flip_level(void) |
| 413 | { |
| 414 | static const char choices[] = "0123", |
| 415 | prmpt[] = "Flip 0=randomly, 1=vertically, 2=horizontally, 3=both:"; |
| 416 | |
| 417 | /* |
| 418 | * Does not handle |
| 419 | * levregions, |
| 420 | * monster mtrack, |
| 421 | * migrating monsters aimed at returning to specific coordinates |
| 422 | * on this level |
| 423 | * as flipping is normally done only during level creation. |
| 424 | */ |
| 425 | if (wizard) { |
| 426 | char c = yn_function(prmpt, choices, '\0', TRUE); |
| 427 | |
| 428 | if (c && strchr(choices, c)) { |
| 429 | c -= '0'; |
| 430 | |
| 431 | if (!c) |
| 432 | flip_level_rnd(3, TRUE); |
| 433 | else |
| 434 | flip_level((int) c, TRUE); |
| 435 | |
| 436 | docrt(); |
| 437 | } else { |
| 438 | pline("%s", Never_mind); |
| 439 | } |
| 440 | } |
| 441 | return ECMD_OK; |
| 442 | } |
| 443 | |
| 444 | /* #levelchange command - adjust hero's experience level */ |
| 445 | int |
nothing calls this directly
no test coverage detected