Пример #1
0
/* like disclose, but don't ask any questions */
static void
dump_disclose(int how)
{
    struct obj *obj;

    /* temporarily redirect menu window output into the dumpfile */
    dump_catch_menus(TRUE);

    /* re-"display" all the disclosure menus */
    /* make sure the inventory is fully identified, even if DYWYPI = n */
    for (obj = invent; obj; obj = obj->nobj) {
        discover_object(obj->otyp, TRUE, FALSE, TRUE);
        obj->known = obj->bknown = obj->dknown = obj->rknown = 1;
    }
    display_inventory(NULL, TRUE);
    container_contents(invent, TRUE, TRUE);
    dump_spells();
    dump_skills();
    enlighten_mon(&youmonst, how > LAST_KILLER ? 1 : 2, 1);     /* final */
    list_vanquished('y', FALSE);
    list_genocided('y', FALSE);
    show_conduct(how > LAST_KILLER ? 1 : 2);
    dooverview(&(struct nh_cmd_arg){.argtype = 0});
Пример #2
0
static void
cb_display_inventory()
{
    display_inventory((char *)0, FALSE);
}
Пример #3
0
static void
disclose(int how, boolean taken, long umoney)
{
    char c = 0, defquery;
    const char *qbuf;
    boolean ask = should_query_disclose_options(&defquery);

    if (invent) {
        if (taken)
            qbuf = msgprintf("Do you want to see what you had when you %s?",
                             (how == QUIT) ? "quit" : "died");
        else
            /* This phrase is so fundamentally NetHack, I felt a huge sense of
               pride when I got to edit it, even though I was just changing it
               from a stack allocation to a string literal. Then I felt I should
               add a comment to it because it feels important enough to be
               dignified with one. So here it is. --AIS */
            qbuf = "Do you want your possessions identified?";

        if (!done_stopprint) {
            c = ask ? yn_function(qbuf, ynqchars, defquery) : defquery;
            if (c == 'y') {
                struct obj *obj;

                for (obj = invent; obj; obj = obj->nobj) {
                    discover_object(obj->otyp, TRUE, FALSE, TRUE);
                    obj->known = obj->bknown = obj->dknown = obj->rknown = 1;
                }
                display_inventory(NULL, FALSE);
                container_contents(invent, TRUE, TRUE);
            }
            if (c == 'q')
                done_stopprint++;
        }
    }

    if (!done_stopprint) {
        c = ask ? yn_function("Do you want to see your attributes?", ynqchars,
                              defquery) : defquery;
        if (c == 'y')
            enlighten_mon(&youmonst, how > LAST_KILLER ? 1 : 2, 1); /* final */
        if (c == 'q')
            done_stopprint++;
    }

    if (!done_stopprint)
        list_vanquished(defquery, ask);

    if (!done_stopprint)
        list_genocided(defquery, ask);

    if (!done_stopprint) {
        c = ask ? yn_function("Do you want to see your conduct?", ynqchars,
                              defquery) : defquery;
        if (c == 'y')
            show_conduct(how > LAST_KILLER ? 1 : 2);
        if (c == 'q')
            done_stopprint++;
    }

    if (!done_stopprint) {
        c = ask ? yn_function("Do you want to see a breakdown of your score?",
                              ynqchars, defquery) : defquery;
        if (c == 'y')
            calc_score(how, TRUE, umoney);
        if (c == 'q')
            done_stopprint++;
    }
}
Пример #4
0
void Web_update_inventory() { display_inventory(NULL, FALSE); }