X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=src%2Fstore.c;h=f169c6e728469fab86ad93dd8617fd876ae9d06e;hb=4298e5c3d360216738f452e5595ce430016e2d28;hp=c5e93a47b513df9b58c5e89aec4b9a9cca8f7414;hpb=5d3509382b96bb3cecc04023caa87c22da6f5943;p=hengband%2Fhengband.git diff --git a/src/store.c b/src/store.c index c5e93a47b..f169c6e72 100644 --- a/src/store.c +++ b/src/store.c @@ -564,56 +564,37 @@ static void purchase_analyze(PRICE price, PRICE value, PRICE guess) /* Item was worthless, but we bought it */ if ((value <= 0) && (price > value)) { - /* Comment */ msg_print(comment_7a[randint0(MAX_COMMENT_7A)]); - chg_virtue(V_HONOUR, -1); chg_virtue(V_JUSTICE, -1); - sound(SOUND_STORE1); } /* Item was cheaper than we thought, and we paid more than necessary */ else if ((value < guess) && (price > value)) { - /* Comment */ msg_print(comment_7b[randint0(MAX_COMMENT_7B)]); - chg_virtue(V_JUSTICE, -1); - if (one_in_(4)) - chg_virtue(V_HONOUR, -1); - + if (one_in_(4)) chg_virtue(V_HONOUR, -1); sound(SOUND_STORE2); } /* Item was a good bargain, and we got away with it */ else if ((value > guess) && (value < (4 * guess)) && (price < value)) { - /* Comment */ msg_print(comment_7c[randint0(MAX_COMMENT_7C)]); - - if (one_in_(4)) - chg_virtue(V_HONOUR, -1); - else if (one_in_(4)) - chg_virtue(V_HONOUR, 1); - + if (one_in_(4)) chg_virtue(V_HONOUR, -1); + else if (one_in_(4)) chg_virtue(V_HONOUR, 1); sound(SOUND_STORE3); } /* Item was a great bargain, and we got away with it */ else if ((value > guess) && (price < value)) { - /* Comment */ msg_print(comment_7d[randint0(MAX_COMMENT_7D)]); - - if (one_in_(2)) - chg_virtue(V_HONOUR, -1); - if (one_in_(4)) - chg_virtue(V_HONOUR, 1); - - if (10 * price < value) - chg_virtue(V_SACRIFICE, 1); - + if (one_in_(2)) chg_virtue(V_HONOUR, -1); + if (one_in_(4)) chg_virtue(V_HONOUR, 1); + if (10 * price < value) chg_virtue(V_SACRIFICE, 1); sound(SOUND_STORE4); } } @@ -2285,18 +2266,17 @@ static void display_entry(int pos) /* Leave room for weights, if necessary -DRS- */ if (show_weights) maxwid -= 10; - /* Describe the object */ object_desc(o_name, o_ptr, 0); o_name[maxwid] = '\0'; c_put_str(tval_to_attr[o_ptr->tval], o_name, i+6, cur_col); /* Show weights */ - if (show_weights) + if(show_weights) { /* Only show the weight of an individual item */ int wgt = o_ptr->weight; #ifdef JP - sprintf(out_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt) ); + sprintf(out_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt)); put_str(out_val, i+6, 67); #else (void)sprintf(out_val, "%3d.%d lb", wgt / 10, wgt % 10);