/** * Display an item's properties */ static void wiz_display_item(object_type * o_ptr) { int j = 0; char buf[256]; /* Clear screen */ Term_clear(); /* Describe fully */ object_desc(buf, sizeof(buf), o_ptr, ODESC_PREFIX | ODESC_FULL | ODESC_SPOIL); prt(buf, 2, j); prt(format ("kind = %-5d level = %-4d tval = %-5d sval = %-5d", o_ptr->k_idx, k_info[o_ptr->k_idx].level, o_ptr->tval, o_ptr->sval), 4, j); prt(format ("number = %-3d wgt = %-6d ac = %-5d damage = %dd%d", o_ptr->number, o_ptr->weight, o_ptr->ac, o_ptr->dd, o_ptr->ds), 5, j); prt(format ("pval = %-5d toac = %-5d tohit = %-4d todam = %-4d", o_ptr->pval, o_ptr->to_a, o_ptr->to_h, o_ptr->to_d), 6, j); prt(format ("name1 = %-4d name2 = %-4d cost = %ld", o_ptr->name1, o_ptr->name2, (long) object_value(o_ptr)), 7, j); prt(format ("ident = %04x timeout = %-d", o_ptr->ident, o_ptr->timeout), 8, j); prt("+------------FLAGS_------------+", 10, j); prt("..SUST..POWERS....OTHER.........", 11, j); prt(" ", 12, j); prt("tbsiwdcc re s ttbiaefc f..", 13, j); prt("hatnieohsfessfhefphhlmcliosspr..", 14, j); prt("rlrtsxnadfgpialerlrdspppppmcca..", 15, j); prt_binary(o_ptr->flags_obj, 0, 16, j, '*', 32); prt("+------------CURSES------------+", 17, j); prt(" n r b b b ", 18, j); prt("ttaasahppcuhdaassppdddd.........", 19, j); prt("eeggrfuooutawduttaaxssc.........", 20, j); prt("llggerniitrlemncwrrppth.........", 21, j); prt_binary(o_ptr->flags_curse, 0, 22, j, '*', 32); prt("Resists, bonuses and slays coming soon...", 23, j); }
/* * Just display an item's properties (debug-info) * Originally by David Reeve Sward <*****@*****.**> * Verbose item flags by -Bernd- */ static void wiz_display_item(const object_type *o_ptr) { int i, j = 13; u32b f1, f2, f3, f4, f5, f6; char buf[256]; /* Extract the flags */ object_flags(o_ptr, &f1, &f2, &f3, &f4, &f5, &f6); /* Clear the screen */ for (i = 1; i <= 23; i++) prt("", i, j - 2); /* Describe fully */ object_desc_store(buf, o_ptr, TRUE, 3); prt(buf, 2, j); prt(format("kind = %-5d level = %-4d tval = %-5d sval = %-5d", o_ptr->k_idx, get_object_level(o_ptr), o_ptr->tval, o_ptr->sval), 4, j); prt(format("number = %-3d wgt = %-6d ac = %-5d damage = %dd%d", o_ptr->number, o_ptr->weight, o_ptr->ac, o_ptr->dd, o_ptr->ds), 5, j); prt(format("pval = %-5d toac = %-5d tohit = %-4d todam = %-4d", o_ptr->pval, o_ptr->to_a, o_ptr->to_h, o_ptr->to_d), 6, j); prt(format("activate = %-4d cost = %ld", o_ptr->activate, (long)object_value_real(o_ptr)), 7, j); prt(format("ident = %04x timeout = %-d", o_ptr->ident, o_ptr->timeout), 8, j); prt("+------------FLAGS1------------+", 10, j); prt("AFFECT........SLAY........BRAND.", 11, j); prt(" cvae xsqpaefc", 12, j); prt("siwdcc ssidsahanvudotgddhuoclio", 13, j); prt("tnieoh trnipttmiinmrrnrrraiierl", 14, j); prt("rtsxna..lcfgdkcpmldncltggpksdced", 15, j); prt_binary(f1, 16, j); prt("+------------FLAGS2------------+", 17, j); prt("SUST...IMMUN..RESIST............", 18, j); prt(" aefctrpsaefcpfldbc sn ", 19, j); prt("siwdcc clioheatcliooeialoshtncd", 20, j); prt("tnieoh ierlrfraierliatrnnnrhehi", 21, j); prt("rtsxna..dcedwlatdcedsrekdfddrxss", 22, j); prt_binary(f2, 23, j); prt("+------------FLAGS3------------+", 10, j+32); prt("fe ehsi st iiiiadta hp", 11, j+32); prt("il n taihnf ee ggggcregb vr", 12, j+32); prt("re no ysdose eld nnnntalrl ym", 13, j+32); prt("ec om cyewta ieirmsrrrriieaeccc", 14, j+32); prt("aa ta uktmatlnpgeihaefcvnpvsuuu", 15, j+32); prt("uu eg rnyoahivaeggoclioaeoasrrr", 16, j+32); prt("rr li sopdretitsehtierltxrtesss", 17, j+32); prt("aa ec ewestreshtntsdcedeptedeee", 18, j+32); prt_binary(f3, 19, j+32); }
/* * Display an item's properties */ static void wiz_display_item(const object_type *o_ptr, bool all) { int j = 0; bitflag f[OF_SIZE]; char buf[256]; /* Extract the flags */ if (all) object_flags(o_ptr, f); else object_flags_known(o_ptr, f); /* Clear screen */ Term_clear(); /* Describe fully */ object_desc(buf, sizeof(buf), o_ptr, ODESC_PREFIX | ODESC_FULL | ODESC_SPOIL); prt(buf, 2, j); prt(format("combat = (%dd%d) (%+d,%+d) [%d,%+d]", o_ptr->dd, o_ptr->ds, o_ptr->to_h, o_ptr->to_d, o_ptr->ac, o_ptr->to_a), 4, j); prt(format("kind = %-5d tval = %-5d sval = %-5d wgt = %-3d timeout = %-d", o_ptr->kind->kidx, o_ptr->tval, o_ptr->sval, o_ptr->weight, o_ptr->timeout), 5, j); /* CC: multiple pvals not shown, pending #1290 */ prt(format("number = %-3d pval = %-5d name1 = %-4d egoidx = %-4d cost = %ld", o_ptr->number, o_ptr->pval[DEFAULT_PVAL], o_ptr->artifact ? o_ptr->artifact->aidx : 0, o_ptr->ego ? o_ptr->ego->eidx : 0, (long)object_value(o_ptr, 1, FALSE)), 6, j); prt("+------------FLAGS0------------+", 8, j); prt("AFFECT..........SLAY.......BRAND", 9, j); prt(" ae xxxpaefc", 10, j); prt("siwdcc ssidsasmnvudotgddduoclio", 11, j); prt("tnieoh trnipthgiinmrrnrrmniierl", 12, j); prt("rtsxna..lcfgdkttmldncltggndsdced", 13, j); prt_binary(f, 0, 14, j, '*', 32); prt_binary(o_ptr->known_flags, 0, 15, j, '+', 32); prt("+------------FLAGS1------------+", 16, j); prt("SUST........IMM.RESIST.........", 17, j); prt(" afecaefcpfldbc s n ", 18, j); prt("siwdcc cilocliooeialoshnecd", 19, j); prt("tnieoh irelierliatrnnnrethi", 20, j); prt("rtsxna......decddcedsrekdfddxhss", 21, j); prt_binary(f, 32, 22, j, '*', 32); prt_binary(o_ptr->known_flags, 32, 23, j, '+', 32); prt("+------------FLAGS2------------+", 8, j+34); prt("s ts hn tadiiii aiehs hp", 9, j+34); prt("lf eefoo egrgggg bcnaih vr", 10, j+34); prt("we lerlf ilgannnn ltssdo ym", 11, j+34); prt("da reiedu merirrrr eityew ccc", 12, j+34); prt("itlepnele ppanaefc svaktm uuu", 13, j+34); prt("ghigavail aoveclio saanyo rrr", 14, j+34); prt("seteticf craxierl etropd sss", 15, j+34); prt("trenhste tttpdced detwes eee", 16, j+34); prt_binary(f, 64, 17, j + 34, '*', 32); prt_binary(o_ptr->known_flags, 64, 18, j + 34, '+', 32); prt("o_ptr->ident:", 20, j+34); prt(format("sense %c worn %c empty %c known %c", (o_ptr->ident & IDENT_SENSE) ? '+' : ' ', (o_ptr->ident & IDENT_WORN) ? '+' : ' ', (o_ptr->ident & IDENT_EMPTY) ? '+' : ' ', (o_ptr->ident & IDENT_KNOWN) ? '+' : ' '), 21, j+34); prt(format("store %c attack %c defence %c effect %c", (o_ptr->ident & IDENT_STORE) ? '+' : ' ', (o_ptr->ident & IDENT_ATTACK) ? '+' : ' ', (o_ptr->ident & IDENT_DEFENCE) ? '+' : ' ', (o_ptr->ident & IDENT_EFFECT) ? '+' : ' '), 22, j+34); prt(format("indest %c ego %c", (o_ptr->ident & IDENT_INDESTRUCT) ? '+' : ' ', (o_ptr->ident & IDENT_NAME) ? '+' : ' '), 23, j+34); }
/* * Display an item's properties */ static void wiz_display_item(const object_type *o_ptr) { int j = 0; u32b f1, f2, f3; char buf[256]; /* Extract the flags */ object_flags(o_ptr, &f1, &f2, &f3); /* Clear screen */ Term_clear(); /* Describe fully */ object_desc_store(buf, o_ptr, TRUE, 3); prt(buf, 2, j); prt(format("kind = %-5d level = %-4d tval = %-5d sval = %-5d", o_ptr->k_idx, k_info[o_ptr->k_idx].level, o_ptr->tval, o_ptr->sval), 4, j); prt(format("number = %-3d wgt = %-6d ac = %-5d damage = %dd%d", o_ptr->number, o_ptr->weight, o_ptr->ac, o_ptr->dd, o_ptr->ds), 5, j); prt(format("pval = %-5d toac = %-5d tohit = %-4d todam = %-4d", o_ptr->pval, o_ptr->to_a, o_ptr->to_h, o_ptr->to_d), 6, j); prt(format("name1 = %-4d name2 = %-4d cost = %ld", o_ptr->name1, o_ptr->name2, (long)object_value(o_ptr)), 7, j); prt(format("ident = %04x timeout = %-d", o_ptr->ident, o_ptr->timeout), 8, j); prt("+------------FLAGS1------------+", 10, j); prt("AFFECT..........SLAY.......BRAND", 11, j); prt(" ae x paefc", 12, j); prt("siwdcc ssidsasmnvudotgdd oclio", 13, j); prt("tnieoh trnipthgiinmrrnrr iierl", 14, j); prt("rtsxna..lcfgdkttmldncltgg..sdced", 15, j); prt_binary(f1, 16, j); prt("+------------FLAGS2------------+", 17, j); prt("SUST........IMM.RESIST.........", 18, j); prt(" afecaefcpfldbc s n ", 19, j); prt("siwdcc cilocliooeialoshnecd", 20, j); prt("tnieoh irelierliatrnnnrethi", 21, j); prt("rtsxna......decddcedsrekdfddxhss", 22, j); prt_binary(f2, 23, j); prt("+------------FLAGS3------------+", 10, j+32); prt("s ts h tadiiii aiehs hp", 11, j+32); prt("lf eefo egrgggg bcnaih vr", 12, j+32); prt("we lerl ilgannnn ltssdo ym", 13, j+32); prt("da reied merirrrr eityew ccc", 14, j+32); prt("itlepnel ppanaefc svaktm uuu", 15, j+32); prt("ghigavai aoveclio saanyo rrr", 16, j+32); prt("seteticf craxierl etropd sss", 17, j+32); prt("trenhste tttpdced detwes eee", 18, j+32); prt_binary(f3, 19, j+32); }
/*! * @brief アイテムの詳細ステータスを表示する / * Change various "permanent" player variables. * @param o_ptr 詳細を表示するアイテム情報の参照ポインタ * @return なし * @details * Wizard routines for creating objects -RAK- * And for manipulating them! -Bernd- * * This has been rewritten to make the whole procedure * of debugging objects much easier and more comfortable. * * The following functions are meant to play with objects: * Create, modify, roll for them (for statistic purposes) and more. * The original functions were by RAK. * The function to show an item's debug information was written * by David Reeve Sward <*****@*****.**>. * Bernd ([email protected]) * * Here are the low-level functions * - wiz_display_item() * display an item's debug-info * - wiz_create_itemtype() * specify tval and sval (type and subtype of object) * - wiz_tweak_item() * specify pval, +AC, +tohit, +todam * Note that the wizard can leave this function anytime, * thus accepting the default-values for the remaining values. * pval comes first now, since it is most important. * - wiz_reroll_item() * apply some magic to the item or turn it into an artifact. * - wiz_roll_item() * Get some statistics about the rarity of an item: * We create a lot of fake items and see if they are of the * same type (tval and sval), then we compare pval and +AC. * If the fake-item is better or equal it is counted. * Note that cursed items that are better or equal (absolute values) * are counted, too. * HINT: This is *very* useful for balancing the game! * - wiz_quantity_item() * change the quantity of an item, but be sane about it. * * And now the high-level functions * - do_cmd_wiz_play() * play with an existing object * - wiz_create_item() * create a new object * * Note -- You do not have to specify "pval" and other item-properties * directly. Just apply magic until you are satisfied with the item. * * Note -- For some items (such as wands, staffs, some rings, etc), you * must apply magic, or you will get "broken" or "uncharged" objects. * * Note -- Redefining artifacts via "do_cmd_wiz_play()" may destroy * the artifact. Be careful. * * Hack -- this function will allow you to create multiple artifacts. * This "feature" may induce crashes or other nasty effects. * Just display an item's properties (debug-info) * Originally by David Reeve Sward <*****@*****.**> * Verbose item flags by -Bernd- */ static void wiz_display_item(object_type *o_ptr) { int i, j = 13; u32b flgs[TR_FLAG_SIZE]; char buf[256]; /* Extract the flags */ object_flags(o_ptr, flgs); /* Clear the screen */ for (i = 1; i <= 23; i++) prt("", i, j - 2); prt_alloc(o_ptr->tval, o_ptr->sval, 1, 0); /* Describe fully */ object_desc(buf, o_ptr, OD_STORE); prt(buf, 2, j); prt(format("kind = %-5d level = %-4d tval = %-5d sval = %-5d", o_ptr->k_idx, k_info[o_ptr->k_idx].level, o_ptr->tval, o_ptr->sval), 4, j); prt(format("number = %-3d wgt = %-6d ac = %-5d damage = %dd%d", o_ptr->number, o_ptr->weight, o_ptr->ac, o_ptr->dd, o_ptr->ds), 5, j); prt(format("pval = %-5d toac = %-5d tohit = %-4d todam = %-4d", o_ptr->pval, o_ptr->to_a, o_ptr->to_h, o_ptr->to_d), 6, j); prt(format("name1 = %-4d name2 = %-4d cost = %ld", o_ptr->name1, o_ptr->name2, (long)object_value_real(o_ptr)), 7, j); prt(format("ident = %04x xtra1 = %-4d xtra2 = %-4d timeout = %-d", o_ptr->ident, o_ptr->xtra1, o_ptr->xtra2, o_ptr->timeout), 8, j); prt(format("xtra3 = %-4d xtra4 = %-4d xtra5 = %-4d cursed = %-d", o_ptr->xtra3, o_ptr->xtra4, o_ptr->xtra5, o_ptr->curse_flags), 9, j); prt("+------------FLAGS1------------+", 10, j); prt("AFFECT........SLAY........BRAND.", 11, j); prt(" mf cvae xsqpaefc", 12, j); prt("siwdccsossidsahanvudotgddhuoclio", 13, j); prt("tnieohtctrnipttmiinmrrnrrraiierl", 14, j); prt("rtsxnarelcfgdkcpmldncltggpksdced", 15, j); prt_binary(flgs[0], 16, j); prt("+------------FLAGS2------------+", 17, j); prt("SUST....IMMUN.RESIST............", 18, j); prt(" reaefctrpsaefcpfldbc sn ", 19, j); prt("siwdcciaclioheatcliooeialoshtncd", 20, j); prt("tnieohdsierlrfraierliatrnnnrhehi", 21, j); prt("rtsxnaeydcedwlatdcedsrekdfddrxss", 22, j); prt_binary(flgs[1], 23, j); prt("+------------FLAGS3------------+", 10, j+32); prt("fe cnn t stdrmsiiii d ab ", 11, j+32); prt("aa aoomywhs lleeieihgggg rtgl ", 12, j+32); prt("uu utmacaih eielgggonnnnaaere ", 13, j+32); prt("rr reanurdo vtieeehtrrrrcilas ", 14, j+32); prt("aa algarnew ienpsntsaefctnevs ", 15, j+32); prt_binary(flgs[2], 16, j+32); prt("+------------FLAGS4------------+", 17, j+32); prt("KILL....ESP......... ", 18, j+32); prt("aeud tghaud tgdhegnu ", 19, j+32); prt("nvneoriunneoriruvoon ", 20, j+32); prt("iidmroamidmroagmionq ", 21, j+32); prt("mlenclnmmenclnnnldlu ", 22, j+32); prt_binary(flgs[3], 23, j+32); }