| 616 | } |
| 617 | |
| 618 | staticfn void |
| 619 | disclose(int how, boolean taken) |
| 620 | { |
| 621 | char c = '\0', defquery; |
| 622 | char qbuf[QBUFSZ]; |
| 623 | boolean ask = FALSE; |
| 624 | |
| 625 | if (gi.invent && !done_stopprint) { |
| 626 | if (taken) |
| 627 | Sprintf(qbuf, "Do you want to see what you had when you %s?", |
| 628 | (how == QUIT) ? "quit" : "died"); |
| 629 | else |
| 630 | Strcpy(qbuf, "Do you want your possessions identified?"); |
| 631 | |
| 632 | ask = should_query_disclose_option('i', &defquery); |
| 633 | c = ask ? yn_function(qbuf, ynqchars, defquery, TRUE) : defquery; |
| 634 | if (c == 'y') { |
| 635 | /* caller has already ID'd everything; we pass 'want_reply=True' |
| 636 | to force display_pickinv() to avoid using WIN_INVENT */ |
| 637 | iflags.force_invmenu = FALSE; |
| 638 | (void) display_inventory((char *) 0, TRUE); |
| 639 | container_contents(gi.invent, TRUE, TRUE, FALSE); |
| 640 | } |
| 641 | if (c == 'q') |
| 642 | done_stopprint++; |
| 643 | } |
| 644 | |
| 645 | if (!done_stopprint) { |
| 646 | ask = should_query_disclose_option('a', &defquery); |
| 647 | c = ask ? yn_function("Do you want to see your attributes?", ynqchars, |
| 648 | defquery, TRUE) |
| 649 | : defquery; |
| 650 | if (c == 'y') |
| 651 | enlightenment((BASICENLIGHTENMENT | MAGICENLIGHTENMENT), |
| 652 | (how >= PANICKED) ? ENL_GAMEOVERALIVE |
| 653 | : ENL_GAMEOVERDEAD); |
| 654 | if (c == 'q') |
| 655 | done_stopprint++; |
| 656 | } |
| 657 | |
| 658 | if (!done_stopprint) { |
| 659 | ask = should_query_disclose_option('v', &defquery); |
| 660 | list_vanquished(defquery, ask); |
| 661 | } |
| 662 | |
| 663 | if (!done_stopprint) { |
| 664 | ask = should_query_disclose_option('g', &defquery); |
| 665 | list_genocided(defquery, ask); |
| 666 | } |
| 667 | |
| 668 | if (!done_stopprint) { |
| 669 | if (should_query_disclose_option('c', &defquery)) { |
| 670 | int acnt = count_achievements(); |
| 671 | |
| 672 | Sprintf(qbuf, "Do you want to see your conduct%s?", |
| 673 | /* this was distinguishing between one achievement and |
| 674 | multiple achievements, but "conduct and achievement" |
| 675 | looked strange if multiple conducts got shown (which |
no test coverage detected