/* 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);
}
}
/* 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);