char rumour[1024];
#ifdef JP
- /* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥È¤Î¤È¤¤ÏÊ̤Υá¥Ã¥»¡¼¥¸¤ò½Ð¤¹ */
- if ( cur_store_num == STORE_BLACK ) {
- msg_print(comment_1_B[randint0(MAX_COMMENT_1)]);
- }
- else{
- msg_print(comment_1[randint0(MAX_COMMENT_1)]);
- }
+ /* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥È¤Î¤È¤¤ÏÊ̤Υá¥Ã¥»¡¼¥¸¤ò½Ð¤¹ */
+ if ( cur_store_num == STORE_BLACK ) {
+ msg_print(comment_1_B[randint0(MAX_COMMENT_1)]);
+ }
+ else{
+ msg_print(comment_1[randint0(MAX_COMMENT_1)]);
+ }
#else
msg_print(comment_1[randint0(MAX_COMMENT_1)]);
#endif
static void say_comment_4(void)
{
#ifdef JP
- /* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥È¤Î»þ¤ÏÊ̤Υá¥Ã¥»¡¼¥¸¤ò½Ð¤¹ */
- if ( cur_store_num == STORE_BLACK ){
- msg_print(comment_4a_B[randint0(MAX_COMMENT_4A)]);
- msg_print(comment_4b_B[randint0(MAX_COMMENT_4B)]);
- }
- else{
- msg_print(comment_4a[randint0(MAX_COMMENT_4A)]);
- msg_print(comment_4b[randint0(MAX_COMMENT_4B)]);
- }
+ /* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥È¤Î»þ¤ÏÊ̤Υá¥Ã¥»¡¼¥¸¤ò½Ð¤¹ */
+ if ( cur_store_num == STORE_BLACK ){
+ msg_print(comment_4a_B[randint0(MAX_COMMENT_4A)]);
+ msg_print(comment_4b_B[randint0(MAX_COMMENT_4B)]);
+ }
+ else{
+ msg_print(comment_4a[randint0(MAX_COMMENT_4A)]);
+ msg_print(comment_4b[randint0(MAX_COMMENT_4B)]);
+ }
#else
msg_print(comment_4a[randint0(MAX_COMMENT_4A)]);
msg_print(comment_4b[randint0(MAX_COMMENT_4B)]);
static void say_comment_5(void)
{
#ifdef JP
- /* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥È¤Î»þ¤ÏÊ̤Υá¥Ã¥»¡¼¥¸¤ò½Ð¤¹ */
- if ( cur_store_num == STORE_BLACK ){
- msg_print(comment_5_B[randint0(MAX_COMMENT_5)]);
- }
- else{
- msg_print(comment_5[randint0(MAX_COMMENT_5)]);
- }
+ /* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥È¤Î»þ¤ÏÊ̤Υá¥Ã¥»¡¼¥¸¤ò½Ð¤¹ */
+ if ( cur_store_num == STORE_BLACK ){
+ msg_print(comment_5_B[randint0(MAX_COMMENT_5)]);
+ }
+ else{
+ msg_print(comment_5[randint0(MAX_COMMENT_5)]);
+ }
#else
msg_print(comment_5[randint0(MAX_COMMENT_5)]);
#endif
{
if (cost <= 5L) size += damroll(3, 5);
if (cost <= 20L) size += damroll(3, 5);
+ if (cost <= 50L) size += damroll(2, 2);
break;
}
*/
static bool store_object_similar(object_type *o_ptr, object_type *j_ptr)
{
+ int i;
+
/* Hack -- Identical items cannot be stacked */
if (o_ptr == j_ptr) return (0);
if (o_ptr->art_name || j_ptr->art_name) return (0);
/* Hack -- Identical art_flags! */
- if ((o_ptr->art_flags1 != j_ptr->art_flags1) ||
- (o_ptr->art_flags2 != j_ptr->art_flags2) ||
- (o_ptr->art_flags3 != j_ptr->art_flags3))
- return (0);
+ for (i = 0; i < TR_FLAG_SIZE; i++)
+ if (o_ptr->art_flags[i] != j_ptr->art_flags[i]) return (0);
/* Hack -- Never stack "powerful" items */
if (o_ptr->xtra1 || j_ptr->xtra1) return (0);
*/
static void store_object_absorb(object_type *o_ptr, object_type *j_ptr)
{
+ int max_num = (o_ptr->tval == TV_ROD) ?
+ MIN(99, MAX_SHORT / k_info[o_ptr->k_idx].pval) : 99;
int total = o_ptr->number + j_ptr->number;
+ int diff = (total > max_num) ? total - max_num : 0;
/* Combine quantity, lose excess items */
- o_ptr->number = (total > 99) ? 99 : total;
+ o_ptr->number = (total > max_num) ? max_num : total;
/* Hack -- if rods are stacking, add the pvals (maximum timeouts) together. -LM- */
if (o_ptr->tval == TV_ROD)
{
- o_ptr->pval += j_ptr->pval;
+ o_ptr->pval += j_ptr->pval * (j_ptr->number - diff) / j_ptr->number;
}
/* Hack -- if wands are stacking, combine the charges. -LM- */
if (o_ptr->tval == TV_WAND)
{
- o_ptr->pval += j_ptr->pval;
+ o_ptr->pval += j_ptr->pval * (j_ptr->number - diff) / j_ptr->number;
}
}
static bool is_blessed(object_type *o_ptr)
{
- u32b f1, f2, f3;
- object_flags(o_ptr, &f1, &f2, &f3);
- if (f3 & TR3_BLESSED) return (TRUE);
+ u32b flgs[TR_FLAG_SIZE];
+ object_flags(o_ptr, flgs);
+ if (have_flag(flgs, TR_BLESSED)) return (TRUE);
else return (FALSE);
}
/* Analyze the type */
switch (o_ptr->tval)
{
+ case TV_POTION:
+ if (o_ptr->sval != SV_POTION_WATER) return FALSE;
+
case TV_WHISTLE:
case TV_FOOD:
case TV_LITE:
case TV_ARCANE_BOOK:
case TV_ENCHANT_BOOK:
case TV_DAEMON_BOOK:
+ case TV_CRUSADE_BOOK:
case TV_MUSIC_BOOK:
break;
default:
/* 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) );
- put_str(out_val, i+6, 67);
+ 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);
put_str(out_val, i+6, 68);
/* Only show the weight of an individual item */
int wgt = o_ptr->weight;
#ifdef JP
- sprintf(out_val, "%3d.%1d", lbtokg1(wgt) , lbtokg2(wgt) );
- put_str(out_val, i+6, 60);
+ sprintf(out_val, "%3d.%1d", lbtokg1(wgt) , lbtokg2(wgt) );
+ put_str(out_val, i+6, 60);
#else
(void)sprintf(out_val, "%3d.%d", wgt / 10, wgt % 10);
put_str(out_val, i+6, 61);
/* Build the prompt */
#ifdef JP
- (void)sprintf(out_val, "(%s:%c-%c, ESC¤ÇÃæÃÇ) %s",
- (((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM)) ? "¥¢¥¤¥Æ¥à" : "¾¦ÉÊ"),
+ (void)sprintf(out_val, "(%s:%c-%c, ESC¤ÇÃæÃÇ) %s",
+ (((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM)) ? "¥¢¥¤¥Æ¥à" : "¾¦ÉÊ"),
I2A(i), I2A(j), pmt);
#else
(void)sprintf(out_val, "(Items %c-%c, ESC to exit) %s",
* Return TRUE if offer is NOT okay
*/
static bool receive_offer(cptr pmt, s32b *poffer,
- s32b last_offer, int factor,
- s32b price, int final)
+ s32b last_offer, int factor,
+ s32b price, int final)
{
/* Haggle till done */
while (TRUE)
cancel = receive_offer("What do you offer? ",
#endif
- &offer, last_offer, 1, cur_ask, final);
+ &offer, last_offer, 1, cur_ask, final);
if (cancel)
{
prt("", 1, 0);
(void)sprintf(out_val,
#ifdef JP
- "Á°²ó¤ÎÄ󼨲Á³Ê $%ld", (long)last_offer);
+ "Á°²ó¤ÎÄ󼨲Á³Ê $%ld", (long)last_offer);
#else
"Your last bid %ld", (long)last_offer);
#endif
/* Prompt */
#ifdef JP
- /* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥È¤Î»þ¤ÏÊ̤Υá¥Ã¥»¡¼¥¸ */
- switch( cur_store_num ) {
- case 7:
- sprintf(out_val, "¤É¤Î¥¢¥¤¥Æ¥à¤ò¼è¤ê¤Þ¤¹¤«? ");
- break;
- case 6:
- sprintf(out_val, "¤É¤ì? ");
- break;
- default:
- sprintf(out_val, "¤É¤ÎÉÊʪ¤¬Íߤ·¤¤¤ó¤À¤¤? ");
- break;
- }
+ /* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥È¤Î»þ¤ÏÊ̤Υá¥Ã¥»¡¼¥¸ */
+ switch( cur_store_num ) {
+ case 7:
+ sprintf(out_val, "¤É¤Î¥¢¥¤¥Æ¥à¤ò¼è¤ê¤Þ¤¹¤«? ");
+ break;
+ case 6:
+ sprintf(out_val, "¤É¤ì? ");
+ break;
+ default:
+ sprintf(out_val, "¤É¤ÎÉÊʪ¤¬Íߤ·¤¤¤ó¤À¤¤? ");
+ break;
+ }
#else
if (cur_store_num == STORE_HOME)
{
{
if (cur_store_num == STORE_HOME)
#ifdef JP
-msg_print("²æ¤¬²È¤Ë¤Ï²¿¤âÃÖ¤¤¤Æ¤¢¤ê¤Þ¤»¤ó¡£");
+ msg_print("²æ¤¬²È¤Ë¤Ï²¿¤âÃÖ¤¤¤Æ¤¢¤ê¤Þ¤»¤ó¡£");
#else
msg_print("Your home is empty.");
#endif
- if (cur_store_num == STORE_MUSEUM)
+ else if (cur_store_num == STORE_MUSEUM)
#ifdef JP
-msg_print("Çîʪ´Û¤Ë¤Ï²¿¤âÃÖ¤¤¤Æ¤¢¤ê¤Þ¤»¤ó¡£");
+ msg_print("Çîʪ´Û¤Ë¤Ï²¿¤âÃÖ¤¤¤Æ¤¢¤ê¤Þ¤»¤ó¡£");
#else
msg_print("Museum is empty.");
#endif
else
#ifdef JP
-msg_print("¸½ºß¾¦Éʤκ߸ˤòÀڤ餷¤Æ¤¤¤Þ¤¹¡£");
+ msg_print("¸½ºß¾¦Éʤκ߸ˤòÀڤ餷¤Æ¤¤¤Þ¤¹¡£");
#else
msg_print("I am currently out of stock.");
#endif
/* Describe it fully */
- if (!identify_fully_aux(o_ptr))
+ if (!screen_object(o_ptr, TRUE))
#ifdef JP
msg_print("ÆäËÊѤï¤Ã¤¿¤È¤³¤í¤Ï¤Ê¤¤¤è¤¦¤À¡£");
#else
else
{
store_top += 12;
- /*
- * ±£¤·¥ª¥×¥·¥ç¥ó(powerup_home)¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¤È¤¤Ï
- * ²æ¤¬²È¤Ç¤Ï 2 ¥Ú¡¼¥¸¤Þ¤Ç¤·¤«É½¼¨¤·¤Ê¤¤
- */
- if ((cur_store_num == STORE_HOME) &&
- (powerup_home == FALSE) &&
- (st_ptr->stock_num >= STORE_INVEN_MAX))
- {
- if (store_top >= (STORE_INVEN_MAX - 1))
- {
- store_top = 0;
- }
- }
- else
- {
- if (store_top >= st_ptr->stock_num) store_top = 0;
- }
+ /*
+ * ±£¤·¥ª¥×¥·¥ç¥ó(powerup_home)¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¤È¤¤Ï
+ * ²æ¤¬²È¤Ç¤Ï 2 ¥Ú¡¼¥¸¤Þ¤Ç¤·¤«É½¼¨¤·¤Ê¤¤
+ */
+ if ((cur_store_num == STORE_HOME) &&
+ (powerup_home == FALSE) &&
+ (st_ptr->stock_num >= STORE_INVEN_MAX))
+ {
+ if (store_top >= (STORE_INVEN_MAX - 1))
+ {
+ store_top = 0;
+ }
+ }
+ else
+ {
+ if (store_top >= st_ptr->stock_num) store_top = 0;
+ }
display_inventory();
}
if (cur_store_num == STORE_HOME)
{
#ifdef JP
- prt("g) ¥¢¥¤¥Æ¥à¤ò¼è¤ë", 21, 27);
- prt("d) ¥¢¥¤¥Æ¥à¤òÃÖ¤¯", 22, 27);
+ prt("g) ¥¢¥¤¥Æ¥à¤ò¼è¤ë", 21, 27);
+ prt("d) ¥¢¥¤¥Æ¥à¤òÃÖ¤¯", 22, 27);
prt("x) ²È¤Î¥¢¥¤¥Æ¥à¤òÄ´¤Ù¤ë", 23,27);
#else
prt("g) Get an item.", 21, 27);
else if (cur_store_num == STORE_MUSEUM)
{
#ifdef JP
- prt("d) ¥¢¥¤¥Æ¥à¤òÃÖ¤¯", 21, 27);
+ prt("d) ¥¢¥¤¥Æ¥à¤òÃÖ¤¯", 21, 27);
prt("x) Çîʪ´Û¤Î¥¢¥¤¥Æ¥à¤òÄ´¤Ù¤ë", 23,27);
#else
prt("d) Drop an item.", 21, 27);
else
{
#ifdef JP
- prt("p) ¾¦ÉʤòÇ㤦", 21, 30);
- prt("s) ¥¢¥¤¥Æ¥à¤òÇä¤ë", 22, 30);
+ prt("p) ¾¦ÉʤòÇ㤦", 21, 30);
+ prt("s) ¥¢¥¤¥Æ¥à¤òÇä¤ë", 22, 30);
prt("x) ¾¦ÉʤòÄ´¤Ù¤ë", 23,30);
#else
prt("p) Purchase an item.", 21, 30);
}
#ifdef JP
- /* ´ðËÜŪ¤Ê¥³¥Þ¥ó¥É¤ÎÄɲÃɽ¼¨ */
-
- prt("i/e) »ý¤Áʪ/ÁõÈ÷¤Î°ìÍ÷", 21, 56);
-
- if( rogue_like_commands == TRUE )
- {
- prt("w/T) ÁõÈ÷¤¹¤ë/¤Ï¤º¤¹", 22, 56);
- }
- else
- {
- prt("w/t) ÁõÈ÷¤¹¤ë/¤Ï¤º¤¹", 22, 56);
- }
+ /* ´ðËÜŪ¤Ê¥³¥Þ¥ó¥É¤ÎÄɲÃɽ¼¨ */
+
+ prt("i/e) »ý¤Áʪ/ÁõÈ÷¤Î°ìÍ÷", 21, 56);
+
+ if( rogue_like_commands == TRUE )
+ {
+ prt("w/T) ÁõÈ÷¤¹¤ë/¤Ï¤º¤¹", 22, 56);
+ }
+ else
+ {
+ prt("w/t) ÁõÈ÷¤¹¤ë/¤Ï¤º¤¹", 22, 56);
+ }
#else
- prt("i/e) Inventry/Equipment list", 21, 56);
-
- if( rogue_like_commands == TRUE )
- {
- prt("w/T) Wear/Take off equipment", 22, 56);
- }
- else
- {
- prt("w/t) Wear/Take off equipment", 22, 56);
- }
+ prt("i/e) Inventry/Equipment list", 21, 56);
+
+ if( rogue_like_commands == TRUE )
+ {
+ prt("w/T) Wear/Take off equipment", 22, 56);
+ }
+ else
+ {
+ prt("w/t) Wear/Take off equipment", 22, 56);
+ }
#endif
/* Prompt */
#ifdef JP