-/* File: store.c */
-
-/*
- * Copyright (c) 1997 Ben Harrison, James E. Wilson, Robert A. Koeneke
- *
- * This software may be copied and distributed for educational, research,
- * and not for profit purposes provided that this copyright and statement
- * are included in all such copies. Other copyrights may also apply.
+/*!
+ * @file store.c
+ * @brief 店の処理 / Store commands
+ * @date 2014/02/02
+ * @author
+ * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke\n
+ * This software may be copied and distributed for educational, research, and\n
+ * not for profit purposes provided that this copyright and statement are\n
+ * included in all such copies.\n
+ * 2014 Deskull rearranged comment for Doxygen.
*/
-/* Purpose: Store commands */
-
#include "angband.h"
+#define MIN_STOCK 12
-#ifdef JP
-/* ²¼¤ÎÊý¤«¤é°ÜÆ°¤·¤Æ¤¤Þ¤·¤¿ */
static int cur_store_num = 0;
static int store_top = 0;
+static int store_bottom = 0;
+static int xtra_stock = 0;
static store_type *st_ptr = NULL;
-static owner_type *ot_ptr = NULL;
-#endif
+static const owner_type *ot_ptr = NULL;
static s16b old_town_num = 0;
static s16b inner_town_num = 0;
#define RUMOR_CHANCE 8
static cptr comment_1[MAX_COMMENT_1] =
{
#ifdef JP
- "¥ª¡¼¥±¡¼¤À¡£",
- "·ë¹½¤À¡£",
- "¤½¤¦¤·¤è¤¦¡ª",
- "»¿À®¤À¡ª",
- "¤è¤·¡ª",
- "¤ï¤«¤Ã¤¿¡ª"
+ "オーケーだ。",
+ "結構だ。",
+ "そうしよう!",
+ "賛成だ!",
+ "よし!",
+ "わかった!"
#else
"Okay.",
"Fine.",
};
#ifdef JP
-/* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥ÈÄɲåá¥Ã¥»¡¼¥¸¡Ê¾µÂú¡Ë */
+/*! ブラックマーケット追加メッセージ(承諾) */
static cptr comment_1_B[MAX_COMMENT_1] = {
- "¤Þ¤¢¡¢¤½¤ì¤Ç¤¤¤¤¤ä¡£",
- "º£Æü¤Ï¤½¤ì¤Ç´ªÊÛ¤·¤Æ¤ä¤ë¡£",
- "ʬ¤«¤Ã¤¿¤è¡£",
- "¤·¤ç¤¦¤¬¤Ê¤¤¡£",
- "¤½¤ì¤Ç²æËý¤¹¤ë¤è¡£",
- "¤³¤ó¤Ê¤â¤ó¤À¤í¤¦¡£"
+ "まあ、それでいいや。",
+ "今日はそれで勘弁してやる。",
+ "分かったよ。",
+ "しょうがない。",
+ "それで我慢するよ。",
+ "こんなもんだろう。"
};
#endif
#define MAX_COMMENT_2A 2
static cptr comment_2a[MAX_COMMENT_2A] =
{
#ifdef JP
- "»ä¤ÎǦÂÑÎϤò»î¤·¤Æ¤¤¤ë¤Î¤«¤¤¡© $%s ¤¬ºÇ¸å¤À¡£",
- "²æËý¤Ë¤â¸ÂÅÙ¤¬¤¢¤ë¤¾¡£ $%s ¤¬ºÇ¸å¤À¡£"
+ "私の忍耐力を試しているのかい? $%s が最後だ。",
+ "我慢にも限度があるぞ。 $%s が最後だ。"
#else
"You try my patience. %s is final.",
"My patience grows thin. %s is final."
static cptr comment_2b[MAX_COMMENT_2B] =
{
#ifdef JP
- " $%s ¤°¤é¤¤¤Ï½Ð¤µ¤Ê¤¤ã¥À¥á¤À¤è¡£",
- " $%s ¤Ê¤é¼õ¤±¼è¤Ã¤Æ¤â¤¤¤¤¤¬¡£",
- "¥Ï¡ª $%s °Ê²¼¤Ï¤Ê¤¤¤Í¡£",
- "²¿¤ÆÅÛ¤À¡ª $%s °Ê²¼¤Ï¤¢¤êÆÀ¤Ê¤¤¤¾¡£",
- "¤½¤ì¤¸¤ã¾¯¤Ê¤¹¤®¤ë¡ª $%s ¤ÏÍߤ·¤¤¤È¤³¤í¤À¡£",
- "¥Ð¥«¤Ë¤·¤Æ¤¤¤ë¡ª $%s ¤Ï¤â¤é¤ï¤Ê¤¤¤È¡£",
- "±³¤À¤í¤¦¡ª $%s ¤Ç¤É¤¦¤À¤¤¡©",
- "¤ª¤¤¤ª¤¤¡ª $%s ¤ò¹Í¤¨¤Æ¤¯¤ì¤Ê¤¤¤«¡©",
- "1000ɤ¤Î¥ª¡¼¥¯¤Î¥Î¥ß¤Ë¶ì¤·¤á¤é¤ì¤ë¤¬¤¤¤¤¡ª $%s ¤À¡£",
- "¤ªÁ°¤ÎÂçÀڤʤâ¤Î¤ËºÒ¤¤¤¢¤ì¡ª $%s ¤Ç¤É¤¦¤À¡£",
- "¥â¥ë¥´¥¹¤Ë¾ÞÌ£¤µ¤ì¤ë¤¬¤¤¤¤¡ªËÜÅö¤Ï $%s ¤Ê¤ó¤À¤í¤¦¡©",
- "¤ªÁ°¤ÎÊì¿Æ¤Ï¥ª¡¼¥¬¤«¡ª $%s ¤Ï½Ð¤¹¤Ä¤â¤ê¤Ê¤ó¤À¤í¡©"
+ " $%s ぐらいは出さなきゃダメだよ。",
+ " $%s なら受け取ってもいいが。",
+ "ハ! $%s 以下はないね。",
+ "何て奴だ! $%s 以下はあり得ないぞ。",
+ "それじゃ少なすぎる! $%s は欲しいところだ。",
+ "バカにしている! $%s はもらわないと。",
+ "嘘だろう! $%s でどうだい?",
+ "おいおい! $%s を考えてくれないか?",
+ "1000匹のオークのノミに苦しめられるがいい! $%s だ。",
+ "お前の大切なものに災いあれ! $%s でどうだ。",
+ "モルゴスに賞味されるがいい!本当は $%s なんだろう?",
+ "お前の母親はオーガか! $%s は出すつもりなんだろ?"
#else
"I can take no less than %s gold pieces.",
"I will accept no less than %s gold pieces.",
};
#ifdef JP
-/* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥ÈÍÑÄɲåá¥Ã¥»¡¼¥¸¡ÊÇä¤ë¤È¤¡Ë */
+/*! ブラックマーケット用追加メッセージ(売るとき) */
static cptr comment_2b_B[MAX_COMMENT_2B] = {
- "¤¤¤¯¤é²¶Íͤ¬¤ª¿Í¹¥¤·¤È¤Ï¤¤¤¨ $%s ¤¬¸Â³¦¤À¤Í¡£·ù¤Ê¤éµ¢¤ê¤Ê¡£",
- "¶â¤¬¤Ê¤¤¤Î¤«¤¤¡¢¤¢¤ó¤¿¡©¤Þ¤º¤Ï²È¤Ëµ¢¤Ã¤Æ $%s ·¤¨¤Æ¤¤Ê¡£",
- "ʪ¤Î²ÁÃͤ¬Ê¬¤«¤é¤óÅÛ¤À¤Ê¡£¤³¤ì¤Ï $%s ¤¬ÉáÄ̤ʤó¤À¤è¡£",
- "²¶¤ÎÉÕ¤±¤¿ÃÍÃʤËʸ¶ç¤¬¤¢¤ë¤Î¤«¡© $%s ¤¬¸Â³¦¤À¡£",
- "¤Ò¤ç¤Ã¤È¤·¤Æ¿·¼ê¤Î¾éÃ̤«¤¤¡© $%s »ý¤Ã¤Æ¤Ê¤¤¤Ê¤éµ¢¤ê¤Ê¡£",
- "¤¦¤Á¤Ï¾¤ÎŹ¤È¤Ï°ã¤¦¤ó¤À¤è¡£$%s ¤°¤é¤¤¤Ï½Ð¤·¤Ê¡£",
- "Ç㤦µ¤¤¬¤Ê¤¤¤Ê¤éµ¢¤ê¤Ê¡£ $%s ¤À¤È¸À¤Ã¤Æ¤¤¤ë¤ó¤À¡£",
- "Ïäˤʤé¤Ê¤¤¤Í¡£ $%s ¤¯¤é¤¤»ý¤Ã¤Æ¤¤¤ë¤ó¤À¤í¡©",
- "¤Ï¡©¤Ê¤ó¤À¤½¤ê¤ã¡© $%s ¤Î´Ö°ã¤¤¤«¡¢¤Ò¤ç¤Ã¤È¤·¤Æ¡©",
- "½Ð¸ý¤Ï¤¢¤Ã¤Á¤À¤è¡£¤½¤ì¤È¤â $%s ½Ð¤»¤ë¤Î¤«¤¤¡¢¤¢¤ó¤¿¤Ë¡£",
- "Ì¿ÃΤ餺¤ÊÅÛ¤À¤Ê¡£ $%s ½Ð¤»¤Ðº£Æü¤Î½ê¤Ï´ªÊÛ¤·¤Æ¤ä¤ë¤è¡£",
- "¤¦¤Á¤ÎŹ¤ÏÉÏ˳¿Í¤ªÃǤê¤À¡£ $%s ¤°¤é¤¤½Ð¤»¤Ê¤¤¤Î¤«¤¤¡©"
+ "いくら俺様がお人好しとはいえ $%s が限界だね。嫌なら帰りな。",
+ "金がないのかい、あんた?まずは家に帰って $%s 揃えてきな。",
+ "物の価値が分からん奴だな。これは $%s が普通なんだよ。",
+ "俺の付けた値段に文句があるのか? $%s が限界だ。",
+ "ひょっとして新手の冗談かい? $%s 持ってないなら帰りな。",
+ "うちは他の店とは違うんだよ。$%s ぐらいは出しな。",
+ "買う気がないなら帰りな。 $%s だと言っているんだ。",
+ "話にならないね。 $%s くらい持っているんだろ?",
+ "は?なんだそりゃ? $%s の間違いか、ひょっとして?",
+ "出口はあっちだよ。それとも $%s 出せるのかい、あんたに。",
+ "命知らずな奴だな。 $%s 出せば今日の所は勘弁してやるよ。",
+ "うちの店は貧乏人お断りだ。 $%s ぐらい出せないのかい?"
};
#endif
#define MAX_COMMENT_3A 2
static cptr comment_3a[MAX_COMMENT_3A] =
{
#ifdef JP
- "»ä¤ÎǦÂÑÎϤò»î¤·¤Æ¤¤¤ë¤Î¤«¤¤¡© $%s ¤¬ºÇ¸å¤À¡£",
- "²æËý¤Ë¤â¸ÂÅÙ¤¬¤¢¤ë¤¾¡£ $%s ¤¬ºÇ¸å¤À¡£"
+ "私の忍耐力を試しているのかい? $%s が最後だ。",
+ "我慢にも限度があるぞ。 $%s が最後だ。"
#else
"You try my patience. %s is final.",
"My patience grows thin. %s is final."
static cptr comment_3b[MAX_COMMENT_3B] =
{
#ifdef JP
- "Ëܲ»¤ò¸À¤¦¤È $%s ¤Ç¤¤¤¤¤ó¤À¤í¡©",
- " $%s ¤Ç¤É¤¦¤À¤¤¡©",
- " $%s ¤°¤é¤¤¤Ê¤é½Ð¤·¤Æ¤â¤¤¤¤¤¬¡£",
- " $%s °Ê¾åʧ¤¦¤Ê¤ó¤Æ¹Í¤¨¤é¤ì¤Ê¤¤¤Í¡£",
- "¤Þ¤¢Íî¤Á¤Ä¤¤¤Æ¡£ $%s ¤Ç¤É¤¦¤À¤¤¡©",
- "¤½¤Î¥¬¥é¥¯¥¿¤Ê¤é $%s ¤Ç°ú¤¼è¤ë¤è¡£",
- "¤½¤ì¤¸¤ã¹â¤¹¤®¤ë¡ª $%s ¤¬¤¤¤¤¤È¤³¤À¤í¡£",
- "¤É¤¦¤»¤¤¤é¤Ê¤¤¤ó¤À¤í¡ª $%s ¤Ç¤¤¤¤¤À¤í¡©",
- "¤À¤á¤À¤á¡ª $%s ¤¬¤º¤Ã¤È¤ª»÷¹ç¤¤¤À¤è¡£",
- "¥Ð¥«¤Ë¤·¤Æ¤¤¤ë¡ª $%s ¤¬¤»¤¤¤¼¤¤¤À¡£",
- " $%s ¤Ê¤é´ò¤·¤¤¤È¤³¤í¤À¤¬¤Ê¤¢¡£",
- " $%s ¡¢¤½¤ì°Ê¾å¤Ï¥Ó¥¿°ìʸ½Ð¤µ¤Ê¤¤¤è¡ª"
+ "本音を言うと $%s でいいんだろ?",
+ " $%s でどうだい?",
+ " $%s ぐらいなら出してもいいが。",
+ " $%s 以上払うなんて考えられないね。",
+ "まあ落ちついて。 $%s でどうだい?",
+ "そのガラクタなら $%s で引き取るよ。",
+ "それじゃ高すぎる! $%s がいいとこだろ。",
+ "どうせいらないんだろ! $%s でいいだろ?",
+ "だめだめ! $%s がずっとお似合いだよ。",
+ "バカにしている! $%s がせいぜいだ。",
+ " $%s なら嬉しいところだがなあ。",
+ " $%s 、それ以上はビタ一文出さないよ!"
#else
"Perhaps %s gold pieces?",
"How about %s gold pieces?",
};
#ifdef JP
-/* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥ÈÍÑÄɲåá¥Ã¥»¡¼¥¸¡ÊÇ㤤¼è¤ê¡Ë */
+/*! ブラックマーケット用追加メッセージ(買い取り) */
static cptr comment_3b_B[MAX_COMMENT_3B] = {
- " $%s ¤Ã¤Æ¤È¤³¤í¤À¤Í¡£¤½¤Î¤É¤¦¤·¤è¤¦¤â¤Ê¤¤¥¬¥é¥¯¥¿¤Ï¡£",
- "¤³¤Î²¶¤¬ $%s ¤Ã¤Æ¸À¤Ã¤Æ¤¤¤ë¤ó¤À¤«¤é¡¢¤½¤ÎÄ̤ê¤Ë¤·¤¿Êý¤¬¿È¤Î¤¿¤á¤À¤¾¡£",
- "²¶¤ÎÍ¥¤·¤µ¤Ë´Å¤¨¤ë¤Î¤â¤¤¤¤²Ã¸º¤Ë¤·¤Æ¤ª¤±¡£ $%s ¤À¡£",
- "¤½¤ÎÉʤʤé $%s ¤ÇÇä¤Ã¤Æ¤¯¤ì¤Æ¤¤¤ë¤¬¤Í¡¢¾ï¼±¤¢¤ë¿Â»Î¤Ï¤ß¤ó¤Ê¡£",
- "¤³¤ê¤ã¤Þ¤¿¡¢¤¬¤á¤Ä¤¤ÅÛ¤À¤Ê¡£¤¤¤¯¤é²¶¤¬²¹¸ü¤È¤Ï¤¤¤¨ $%s ¤¬¸Â³¦¤À¡£",
- " $%s ¤À¡£Ê̤˲¶¤Ï¤½¤ó¤Ê¥¬¥é¥¯¥¿Íߤ·¤¯¤Ï¤Ê¤¤¤ó¤À¤«¤é¡£",
- "²¶¤Î´ÕÄê³Û¤¬µ¤¤ËÆþ¤é¤Ê¤¤¤Î¤«¡© $%s ¡¢·ù¤Ê¤éµ¢¤ê¤Ê¡£",
- " $%s ¤Ç°ú¤¼è¤Ã¤Æ¤ä¤ë¤è¡£´î¤ó¤Ç¼õ¤±¼è¤ê¤Ê¡¢ÉÏ˳¿Í¡£",
- "ʪ¤Î²ÁÃͤ¬Ê¬¤«¤é¤óÅۤϻÏËö¤Ë¤ª¤¨¤ó¤Ê¡£¤½¤ì¤Ï $%s ¤Ê¤ó¤À¤è¡£",
- "¤½¤ó¤Ê¤Ë¶â¤¬Íߤ·¤¤¤Î¤«¡¢¤¢¤ó¤¿¡© $%s ¤ÇËþ¤Ǥ¤ó¤Î¤«¡©",
- "Æþ¤ëŹ´Ö°ã¤¨¤Æ¤ó¤¸¤ã¤Ê¤¤¤Î¤«¡© $%s ¤Ç·ù¤Ê¤é¾¤ò¤¢¤¿¤Ã¤Æ¤¯¤ì¡£",
- "²¶¤Î¸À¤¤Ãͤ˥±¥Á¤ò¤Ä¤±¤ëÅÛ¤¬¤¤¤ë¤È¤Ï¡ª ¤½¤ÎÅÙ¶»¤ËÌȤ¸¤Æ $%s ¤À¡£"
+ " $%s ってところだね。そのどうしようもないガラクタは。",
+ "この俺が $%s って言っているんだから、その通りにした方が身のためだぞ。",
+ "俺の優しさに甘えるのもいい加減にしておけ。 $%s だ。",
+ "その品なら $%s で売ってくれているがね、常識ある紳士はみんな。",
+ "こりゃまた、がめつい奴だな。いくら俺が温厚とはいえ $%s が限界だ。",
+ " $%s だ。別に俺はそんなガラクタ欲しくはないんだから。",
+ "俺の鑑定額が気に入らないのか? $%s 、嫌なら帰りな。",
+ " $%s で引き取ってやるよ。喜んで受け取りな、貧乏人。",
+ "物の価値が分からん奴は始末におえんな。それは $%s なんだよ。",
+ "そんなに金が欲しいのか、あんた? $%s で満足できんのか?",
+ "入る店間違えてんじゃないのか? $%s で嫌なら他をあたってくれ。",
+ "俺の言い値にケチをつける奴がいるとは! その度胸に免じて $%s だ。"
};
#endif
#define MAX_COMMENT_4A 4
static cptr comment_4a[MAX_COMMENT_4A] =
{
#ifdef JP
- "¤â¤¦¤¿¤¯¤µ¤ó¤À¡ª²¿ÅÙ¤â»ä¤ò¤ï¤º¤é¤ï¤»¤Ê¤¤¤Ç¤¯¤ì¡ª",
- "¤¦¤¬¡¼¡ª°ìÆü¤Î²æËý¤Î¸ÂÅÙ¤òĶ¤¨¤Æ¤¤¤ë¡ª",
- "¤â¤¦¤¤¤¤¡ª»þ´Ö¤Î̵Â̰ʳ°¤Î¤Ê¤Ë¤â¤Î¤Ç¤â¤Ê¤¤¡ª",
- "¤â¤¦¤ä¤Ã¤Æ¤é¤ì¤Ê¤¤¤è¡ª´é¤â¸«¤¿¤¯¤Ê¤¤¡ª"
+ "もうたくさんだ!何度も私をわずらわせないでくれ!",
+ "うがー!一日の我慢の限度を超えている!",
+ "もういい!時間の無駄以外のなにものでもない!",
+ "もうやってられないよ!顔も見たくない!"
#else
"Enough! You have abused me once too often!",
"Arghhh! I have had enough abuse for one day!",
};
#ifdef JP
-/* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥ÈÍÑÄɲåá¥Ã¥»¡¼¥¸¡ÊÅܤê¤ÎĺÅÀ¡Ë */
+/*! ブラックマーケット用追加メッセージ(怒りの頂点) */
static cptr comment_4a_B[MAX_COMMENT_4A] = {
- "¤Ê¤á¤ä¤¬¤Ã¤Æ¡ª²¹¸ü¤Ê²¶ÍͤǤâ¸Â³¦¤¬¤¢¤ë¤Ã¤Æ¤³¤È¤òÃΤ졪",
- "²¶¤ò¤³¤³¤Þ¤ÇÅܤ餻¤Æ...Ì¿¤¬¤¢¤ë¤À¤±¤Ç¤â¤¢¤ê¤¬¤¿¤¤¤È»×¤¨¡ª",
- "¤Õ¤¶¤±¤Æ¤ë¤Î¤«¡ªÎä¤ä¤«¤·¤Ê¤éÁê¼ê¤ò¸«¤Æ¤«¤é¤Ë¤·¤í¡ª",
- "¤¤¤¤¤«¤²¤ó¤Ë¤·¤í¡ªº£ÅÙ¤³¤ó¤Ê¤Þ¤Í¤·¤¿¤é¤¿¤À¤¸¤ã¤ª¤«¤Í¤¨¤¾¡ª"
+ "なめやがって!温厚な俺様でも限界があるってことを知れ!",
+ "俺をここまで怒らせて...命があるだけでもありがたいと思え!",
+ "ふざけてるのか!冷やかしなら相手を見てからにしろ!",
+ "いいかげんにしろ!今度こんなまねしたらただじゃおかねえぞ!"
};
#endif
#define MAX_COMMENT_4B 4
static cptr comment_4b[MAX_COMMENT_4B] =
{
#ifdef JP
- "Ź¤«¤é½Ð¤Æ¹Ô¤±¡ª",
- "²¶¤ÎÁ°¤«¤é¾Ã¤¨¼º¤»¤í¡ª",
- "¤É¤Ã¤«¤Ë¹Ô¤Ã¤Á¤Þ¤¨¡ª",
- "½Ð¤í¡¢½Ð¤í¡¢½Ð¤Æ¹Ô¤±¡ª"
+ "店から出て行け!",
+ "俺の前から消え失せろ!",
+ "どっかに行っちまえ!",
+ "出ろ、出ろ、出て行け!"
#else
"Leave my store!",
"Get out of my sight!",
};
#ifdef JP
-/* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥ÈÍÑÄɲåá¥Ã¥»¡¼¥¸¡ÊÄɤ¤½Ð¤·¡Ë */
+/*! ブラックマーケット用追加メッセージ(追い出し) */
static cptr comment_4b_B[MAX_COMMENT_4B] = {
- "ÆóÅ٤Ȥ¦¤Á¤ËÍè¤ë¤ó¤¸¤ã¤Í¤¨¡ª¡ª",
- "¤È¤Ã¤È¤È¡¢¤É¤Ã¤«¤Ø¼º¤»¤í¡ª¡ª",
- "º£¤¹¤°¾Ã¤¨¼º¤»¤í¡ª¡ª",
- "½Ð¤Æ¤¤¤±¡ª½Ð¤Æ¤¤¤±¡ª¡ª"
+ "二度とうちに来るんじゃねえ!!",
+ "とっとと、どっかへ失せろ!!",
+ "今すぐ消え失せろ!!",
+ "出ていけ!出ていけ!!"
};
#endif
#define MAX_COMMENT_5 8
static cptr comment_5[MAX_COMMENT_5] =
{
#ifdef JP
- "¹Í¤¨Ä¾¤·¤Æ¤¯¤ì¡£",
- "¤½¤ê¤ã¤ª¤«¤·¤¤¡ª",
- "¤â¤Ã¤È¿¿ÌÌÌܤ˸À¤Ã¤Æ¤¯¤ì¡ª",
- "¸ò¾Ä¤¹¤ëµ¤¤¬¤¢¤ë¤Î¤«¤¤¡©",
- "Îä¤ä¤«¤·¤ËÍ褿¤Î¤«¡ª",
- "°¤¤¾éÃ̤À¡ª",
- "²æËý¤¯¤é¤Ù¤«¤¤¡£",
- "¤Õ¡¼¤à¡¢Îɤ¤Å·µ¤¤À¡£"
+ "考え直してくれ。",
+ "そりゃおかしい!",
+ "もっと真面目に言ってくれ!",
+ "交渉する気があるのかい?",
+ "冷やかしに来たのか!",
+ "悪い冗談だ!",
+ "我慢くらべかい。",
+ "ふーむ、良い天気だ。"
#else
"Try again.",
"Ridiculous!",
};
#ifdef JP
-/* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥ÈÍÑÄɲåá¥Ã¥»¡¼¥¸¡ÊÅܤê¡Ë */
+/*! ブラックマーケット用追加メッセージ(怒り) */
static cptr comment_5_B[MAX_COMMENT_5] = {
- "»þ´Ö¤Î̵Â̤À¤Ê¡¢¤³¤ì¤Ï¡£",
- "Ìñ²ð¤Ê¤ªµÒÍͤÀ¤Ê¡ª",
- "Ïä·¤Æʬ¤«¤ëÁê¼ê¤¸¤ã¤Ê¤µ¤½¤¦¤À¡£",
- "Äˤ¤Ìܤˤ¢¤¤¤¿¤¤¤é¤·¤¤¤Ê¡ª",
- "¤Ê¤ó¤Æ¶¯ÍߤÊÅÛ¤À¡ª",
- "Ïäˤʤé¤óÇÚ¤À¡ª",
- "¤É¤¦¤·¤è¤¦¤â¤Ê¤¤ÉÏ˳¿Í¤À¡ª",
- "·ö²Þ¤òÇä¤Ã¤Æ¤¤¤ë¤Î¤«¡©"
+ "時間の無駄だな、これは。",
+ "厄介なお客様だな!",
+ "話して分かる相手じゃなさそうだ。",
+ "痛い目にあいたいらしいな!",
+ "なんて強欲な奴だ!",
+ "話にならん輩だ!",
+ "どうしようもない貧乏人だ!",
+ "喧嘩を売っているのか?"
};
#endif
#define MAX_COMMENT_6 4
static cptr comment_6[MAX_COMMENT_6] =
{
#ifdef JP
- "¤É¤¦¤ä¤éʹ¤´Ö°ã¤¨¤¿¤é¤·¤¤¡£",
- "¼ºÎé¡¢¤è¤¯Ê¹¤³¤¨¤Ê¤«¤Ã¤¿¤è¡£",
- "¤¹¤Þ¤Ê¤¤¡¢²¿¤À¤Ã¤Æ¡©",
- "°¤¤¡¢¤â¤¦°ìÅÙ¸À¤Ã¤Æ¤¯¤ì¤ë¡©"
+ "どうやら聞き間違えたらしい。",
+ "失礼、よく聞こえなかったよ。",
+ "すまない、何だって?",
+ "悪い、もう一度言ってくれる?"
#else
"I must have heard you wrong.",
"I'm sorry, I missed that.",
-/*
+/*!
+ * @brief 取引成功時の店主のメッセージ処理 /
* Successful haggle.
+ * @return なし
*/
static void say_comment_1(void)
{
- char rumour[1024];
-
#ifdef JP
- /* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥È¤Î¤È¤¤ÏÊ̤Υá¥Ã¥»¡¼¥¸¤ò½Ð¤¹ */
+ /* ブラックマーケットのときは別のメッセージを出す */
if ( cur_store_num == STORE_BLACK ) {
msg_print(comment_1_B[randint0(MAX_COMMENT_1)]);
}
if (one_in_(RUMOR_CHANCE))
{
#ifdef JP
-msg_print("Ź¼ç¤Ï¼ª¤¦¤Á¤·¤¿:");
+ msg_print("店主は耳うちした:");
#else
msg_print("The shopkeeper whispers something into your ear:");
#endif
-
-
-#ifdef JP
-if (!get_rnd_line_jonly("rumors_j.txt", 0, rumour, 10))
-#else
- if (!get_rnd_line("rumors.txt", 0, rumour))
-#endif
-
- msg_print(rumour);
+ display_rumor(TRUE);
}
}
-/*
+/*!
+ * @brief プレイヤーがアイテムを買う時の価格代案メッセージ処理 /
* Continue haggling (player is buying)
+ * @param value 店主の提示価格
+ * @param annoyed 店主のいらつき度
+ * @return なし
*/
static void say_comment_2(s32b value, int annoyed)
{
{
/* Formatted message */
#ifdef JP
- /* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥È¤Î»þ¤ÏÊ̤Υá¥Ã¥»¡¼¥¸¤ò½Ð¤¹ */
+ /* ブラックマーケットの時は別のメッセージを出す */
if ( cur_store_num == STORE_BLACK ){
msg_format(comment_2b_B[randint0(MAX_COMMENT_2B)], tmp_val);
}
}
-/*
+/*!
+ * @brief プレイヤーがアイテムを売る時の価格代案メッセージ処理 /
* Continue haggling (player is selling)
+ * @param value 店主の提示価格
+ * @param annoyed 店主のいらつき度
+ * @return なし
*/
static void say_comment_3(s32b value, int annoyed)
{
{
/* Formatted message */
#ifdef JP
- /* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥È¤Î»þ¤ÏÊ̤Υá¥Ã¥»¡¼¥¸¤ò½Ð¤¹ */
+ /* ブラックマーケットの時は別のメッセージを出す */
if ( cur_store_num == STORE_BLACK ){
msg_format(comment_3b_B[randint0(MAX_COMMENT_3B)], tmp_val);
}
}
-/*
+/*!
+ * @brief 店主がプレイヤーを追い出す時のメッセージ処理 /
* Kick 'da bum out. -RAK-
+ * @return なし
*/
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)]);
}
-/*
+/*!
+ * @brief 店主がプレイヤーに取り合わない時のメッセージ処理 /
* You are insulting me
+ * @return なし
*/
static void say_comment_5(void)
{
#ifdef JP
- /* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥È¤Î»þ¤ÏÊ̤Υá¥Ã¥»¡¼¥¸¤ò½Ð¤¹ */
+ /* ブラックマーケットの時は別のメッセージを出す */
if ( cur_store_num == STORE_BLACK ){
msg_print(comment_5_B[randint0(MAX_COMMENT_5)]);
}
}
-/*
+/*!
+ * @brief 店主がプレイヤーの提示を理解できなかった時のメッセージ処理 /
* That makes no sense.
+ * @return なし
*/
static void say_comment_6(void)
{
}
-
-/*
- * Messages for reacting to purchase prices.
- */
-
#define MAX_COMMENT_7A 4
static cptr comment_7a[MAX_COMMENT_7A] =
{
#ifdef JP
- "¤¦¤ï¤¢¤¢¤¡¤¡¡ª",
- "¤Ê¤ó¤Æ¤³¤Ã¤¿¡ª",
- "狼¤¬¤à¤»¤Óµã¤¯À¼¤¬Ê¹¤³¤¨¤ë...¡£",
- "Ź¼ç¤¬²ù¤·¤²¤Ë¤ï¤á¤¤¤Æ¤¤¤ë¡ª"
+ "うわああぁぁ!",
+ "なんてこった!",
+ "誰かがむせび泣く声が聞こえる...。",
+ "店主が悔しげにわめいている!"
#else
"Arrgghh!",
"You bastard!",
static cptr comment_7b[MAX_COMMENT_7B] =
{
#ifdef JP
- "¤¯¤½¤¦¡ª",
- "¤³¤Î°Ëâ¤á¡ª",
- "Ź¼ç¤¬º¨¤á¤·¤½¤¦¤Ë¸«¤Æ¤¤¤ë¡£",
- "Ź¼ç¤¬âˤó¤Ç¤¤¤ë¡£"
+ "くそう!",
+ "この悪魔め!",
+ "店主が恨めしそうに見ている。",
+ "店主が睨んでいる。"
#else
"Damn!",
"You fiend!",
static cptr comment_7c[MAX_COMMENT_7C] =
{
#ifdef JP
- "¤¹¤Ð¤é¤·¤¤¡ª",
- "·¯¤¬Å·»È¤Ë¸«¤¨¤ë¤è¡ª",
- "Ź¼ç¤¬¥¯¥¹¥¯¥¹¾Ð¤Ã¤Æ¤¤¤ë¡£",
- "Ź¼ç¤¬ÂçÀ¼¤Ç¾Ð¤Ã¤Æ¤¤¤ë¡£"
+ "すばらしい!",
+ "君が天使に見えるよ!",
+ "店主がクスクス笑っている。",
+ "店主が大声で笑っている。"
#else
"Cool!",
"You've made my day!",
static cptr comment_7d[MAX_COMMENT_7D] =
{
#ifdef JP
- "¤ä¤Ã¤Û¤¥¡ª",
- "¤³¤ó¤Ê¤ª¤¤¤·¤¤»×¤¤¤ò¤·¤¿¤é¡¢¿¿ÌÌÌܤËƯ¤±¤Ê¤¯¤Ê¤ë¤Ê¤¡¡£",
- "Ź¼ç¤Ï´ò¤·¤¯¤ÆÄ·¤Í²ó¤Ã¤Æ¤¤¤ë¡£",
- "Ź¼ç¤ÏËþÌ̤˾Фߤò¤¿¤¿¤¨¤Æ¤¤¤ë¡£"
+ "やっほぅ!",
+ "こんなおいしい思いをしたら、真面目に働けなくなるなぁ。",
+ "店主は嬉しくて跳ね回っている。",
+ "店主は満面に笑みをたたえている。"
#else
"Yipee!",
"I think I'll retire!",
};
-/*
+/*!
+ * @brief 店主が交渉を終えた際の反応を返す処理 /
* Let a shop-keeper React to a purchase
- *
+ * @param price アイテムの取引額
+ * @param value アイテムの実際価値
+ * @param guess 店主が当初予想していた価値
+ * @return なし
+ * @details
* We paid "price", it was worth "value", and we thought it was worth "guess"
*/
static void purchase_analyze(s32b price, s32b value, s32b guess)
-
-
-#ifdef JP
-/* ÆüËܸìÈǤξì¹ç¤Ï¾å¤ÎÊý¤Ë°ÜÆ°¤·¤Æ¤¢¤ê¤Þ¤¹ */
-#else
-/*
- * We store the current "store number" here so everyone can access it
- */
-static int cur_store_num = 7;
-
-/*
- * We store the current "store page" here so everyone can access it
- */
-static int store_top = 0;
-
-/*
- * We store the current "store pointer" here so everyone can access it
- */
-static store_type *st_ptr = NULL;
-
-/*
- * We store the current "owner type" here so everyone can access it
- */
-static owner_type *ot_ptr = NULL;
-#endif
-
/*
* We store the current "store feat" here so everyone can access it
*/
static int cur_store_feat;
-
-
-
-
-
/*
* Buying and selling adjustments for race combinations.
* Entry[owner][player] gives the basic "cost inflation".
/*Hum, HfE, Elf, Hal, Gno, Dwa, HfO, HfT, Dun, HiE, Barbarian,
HfOg, HGn, HTn, Cyc, Yek, Klc, Kbd, Nbl, DkE, Drc, Mind Flayer,
Imp, Glm, Skl, Zombie, Vampire, Spectre, Fairy, Beastman, Ent,
- Angel, Demon, Kuta*/
+ Angel, Demon, Kutar */
/* Human */
{ 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
110, 110, 112, 122, 110, 110, 110, 115, 110, 120, 120,
110, 101, 115, 110 },
- /* Kuta */
+ /* Kutar */
{ 110, 110, 105, 105, 110, 115, 115, 115, 110, 105, 110,
115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
115, 115, 125, 125, 125, 125, 105, 115, 105, 95, 140,
-
-/*
+/*!
+ * @brief 店舗価格を決定する /
* Determine the price of an item (qty one) in a store.
- *
+ * @param o_ptr 店舗に並べるオブジェクト構造体の参照ポインタ
+ * @param greed 店主の強欲度
+ * @param flip TRUEならば店主にとっての買取価格、FALSEなら売出価格を計算
+ * @return なし
+ * @details
+ * <pre>
* This function takes into account the player's charisma, and the
* shop-keepers friendliness, and the shop-keeper's base greed, but
* never lets a shop-keeper lose money in a transaction.
- *
* The "greed" value should exceed 100 when the player is "buying" the
* item, and should be less than 100 when the player is "selling" it.
- *
* Hack -- the black market always charges twice as much as it should.
- *
* Charisma adjustment runs from 80 to 130
* Racial adjustment runs from 95 to 130
- *
* Since greed/charisma/racial adjustments are centered at 100, we need
* to adjust (by 200) to extract a usable multiplier. Note that the
* "greed" value is always something (?).
+ * </pre>
*/
static s32b price_item(object_type *o_ptr, int greed, bool flip)
{
}
-/*
+/*!
+ * @brief 安価な消耗品の販売数を増やし、低確率で割引にする /
* Certain "cheap" objects should be created in "piles"
+ * @param o_ptr 店舗に並べるオブジェクト構造体の参照ポインタ
+ * @return なし
+ * @details
+ * <pre>
* Some objects can be sold at a "discount" (in small piles)
+ * </pre>
*/
static void mass_produce(object_type *o_ptr)
{
case TV_DEATH_BOOK:
case TV_TRUMP_BOOK:
case TV_ARCANE_BOOK:
- case TV_ENCHANT_BOOK:
+ case TV_CRAFT_BOOK:
case TV_DAEMON_BOOK:
case TV_CRUSADE_BOOK:
case TV_MUSIC_BOOK:
case TV_HISSATSU_BOOK:
+ case TV_HEX_BOOK:
{
if (cost <= 50L) size += damroll(2, 3);
if (cost <= 500L) size += damroll(1, 3);
case TV_DIGGING:
case TV_BOW:
{
- if (o_ptr->art_name) break;
- if (o_ptr->name2) break;
+ if (object_is_artifact(o_ptr)) break;
+ if (object_is_ego(o_ptr)) break;
if (cost <= 10L) size += damroll(3, 5);
if (cost <= 100L) size += damroll(3, 5);
break;
if (cost < 1601L) size += damroll(1, 5);
else if (cost < 3201L) size += damroll(1, 3);
}
-
- /* Ensure that mass-produced rods and wands get the correct pvals. */
- if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
- {
- o_ptr->pval *= size;
- }
break;
}
}
if (cheat_peek && discount)
{
#ifdef JP
-msg_print("¥é¥ó¥À¥à¥¢¡¼¥Æ¥£¥Õ¥¡¥¯¥È¤ÏÃÍ°ú¤¤Ê¤·¡£");
+msg_print("ランダムアーティファクトは値引きなし。");
#else
msg_print("No discount on random artifacts.");
#endif
/* Save the total pile size */
o_ptr->number = size - (size * discount / 100);
+
+ /* Ensure that mass-produced rods and wands get the correct pvals. */
+ if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
+ {
+ o_ptr->pval *= o_ptr->number;
+ }
}
-/*
+/*!
+ * @brief 店舗に並べた品を同一品であるかどうか判定する /
* Determine if a store item can "absorb" another item
- *
+ * @param o_ptr 判定するオブジェクト構造体の参照ポインタ1
+ * @param j_ptr 判定するオブジェクト構造体の参照ポインタ2
+ * @return 同一扱いできるならTRUEを返す
+ * @details
+ * <pre>
* See "object_similar()" for the same function for the "player"
+ * </pre>
*/
static bool store_object_similar(object_type *o_ptr, object_type *j_ptr)
{
if (o_ptr->to_d != j_ptr->to_d) return (0);
if (o_ptr->to_a != j_ptr->to_a) return (0);
- /* Require identical "artifact" names */
- if (o_ptr->name1 != j_ptr->name1) return (0);
-
/* Require identical "ego-item" names */
if (o_ptr->name2 != j_ptr->name2) return (0);
- /* Random artifacts don't stack !*/
- if (o_ptr->art_name || j_ptr->art_name) return (0);
+ /* Artifacts don't stack! */
+ if (object_is_artifact(o_ptr) || object_is_artifact(j_ptr)) return (0);
/* Hack -- Identical art_flags! */
for (i = 0; i < TR_FLAG_SIZE; i++)
}
-/*
+/*!
+ * @brief 店舗に並べた品を重ね合わせできるかどうか判定する /
* Allow a store item to absorb another item
+ * @param o_ptr 判定するオブジェクト構造体の参照ポインタ1
+ * @param j_ptr 判定するオブジェクト構造体の参照ポインタ2
+ * @return 重ね合わせできるならTRUEを返す
+ * @details
+ * <pre>
+ * See "object_similar()" for the same function for the "player"
+ * </pre>
*/
static void store_object_absorb(object_type *o_ptr, object_type *j_ptr)
{
}
-/*
+/*!
+ * @brief 店舗に品を置くスペースがあるかどうかの判定を返す /
* Check to see if the shop will be carrying too many objects -RAK-
+ * @param o_ptr 店舗に置きたいオブジェクト構造体の参照ポインタ
+ * @return 置き場がないなら0、重ね合わせできるアイテムがあるなら-1、スペースがあるなら1を返す。
+ * @details
+ * <pre>
* Note that the shop, just like a player, will not accept things
* it cannot hold. Before, one could "nuke" potions this way.
- *
* Return value is now int:
* 0 : No space
* -1 : Can be combined to existing slot.
* 1 : Cannot be combined but there are empty spaces.
+ * </pre>
*/
static int store_check_num(object_type *o_ptr)
{
/* The "home" acts like the player */
if ((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM))
{
+ bool old_stack_force_notes = stack_force_notes;
+ bool old_stack_force_costs = stack_force_costs;
+
+ if (cur_store_num != STORE_HOME)
+ {
+ stack_force_notes = FALSE;
+ stack_force_costs = FALSE;
+ }
+
/* Check all the items */
for (i = 0; i < st_ptr->stock_num; i++)
{
j_ptr = &st_ptr->stock[i];
/* Can the new object be combined with the old one? */
- if (object_similar(j_ptr, o_ptr)) return -1;
+ if (object_similar(j_ptr, o_ptr))
+ {
+ if (cur_store_num != STORE_HOME)
+ {
+ stack_force_notes = old_stack_force_notes;
+ stack_force_costs = old_stack_force_costs;
+ }
+
+ return -1;
+ }
+ }
+
+ if (cur_store_num != STORE_HOME)
+ {
+ stack_force_notes = old_stack_force_notes;
+ stack_force_costs = old_stack_force_costs;
}
}
/* Free space is always usable */
/*
- * ¥ª¥×¥·¥ç¥ó powerup_home ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¤È
- * ²æ¤¬²È¤¬ 20 ¥Ú¡¼¥¸¤Þ¤Ç»È¤¨¤ë
+ * オプション powerup_home が設定されていると
+ * 我が家が 20 ページまで使える
*/
if ((cur_store_num == STORE_HOME) && ( powerup_home == FALSE )) {
if (st_ptr->stock_num < ((st_ptr->stock_size) / 10)) {
return 0;
}
-
+/*!
+ * @brief オブジェクトが祝福されているかの判定を返す /
+ * @param o_ptr 判定したいオブジェクト構造体の参照ポインタ
+ * @return アイテムが祝福されたアイテムならばTRUEを返す
+ */
static bool is_blessed(object_type *o_ptr)
{
u32b flgs[TR_FLAG_SIZE];
-/*
+/*!
+ * @brief オブジェクトが所定の店舗で引き取れるかどうかを返す /
* Determine if the current store will purchase the given item
- *
+ * @param o_ptr 判定したいオブジェクト構造体の参照ポインタ
+ * @return アイテムが買い取れるならばTRUEを返す
+ * @note
* Note that a shop-keeper must refuse to buy "worthless" items
*/
static bool store_will_buy(object_type *o_ptr)
case TV_DEATH_BOOK:
case TV_TRUMP_BOOK:
case TV_ARCANE_BOOK:
- case TV_ENCHANT_BOOK:
+ case TV_CRAFT_BOOK:
case TV_DAEMON_BOOK:
case TV_MUSIC_BOOK:
+ case TV_HEX_BOOK:
case TV_AMULET:
case TV_RING:
case TV_STAFF:
case TV_LIFE_BOOK:
case TV_TRUMP_BOOK:
case TV_ARCANE_BOOK:
- case TV_ENCHANT_BOOK:
+ case TV_CRAFT_BOOK:
case TV_DAEMON_BOOK:
case TV_CRUSADE_BOOK:
case TV_MUSIC_BOOK:
+ case TV_HEX_BOOK:
break;
default:
return (FALSE);
}
+/*!
+ * @brief 現在の町の指定された店舗のアイテムを整理する /
+ * Combine and reorder items in store.
+ * @param store_num 店舗ID
+ * @return 実際に整理が行われたならばTRUEを返す。
+ */
+bool combine_and_reorder_home(int store_num)
+{
+ int i, j, k;
+ s32b o_value;
+ object_type forge, *o_ptr, *j_ptr;
+ bool flag = FALSE, combined;
+ store_type *old_st_ptr = st_ptr;
+ bool old_stack_force_notes = stack_force_notes;
+ bool old_stack_force_costs = stack_force_costs;
+
+ st_ptr = &town[1].store[store_num];
+ if (store_num != STORE_HOME)
+ {
+ stack_force_notes = FALSE;
+ stack_force_costs = FALSE;
+ }
-/*
+ do
+ {
+ combined = FALSE;
+
+ /* Combine the items in the home (backwards) */
+ for (i = st_ptr->stock_num - 1; i > 0; i--)
+ {
+ /* Get the item */
+ o_ptr = &st_ptr->stock[i];
+
+ /* Skip empty items */
+ if (!o_ptr->k_idx) continue;
+
+ /* Scan the items above that item */
+ for (j = 0; j < i; j++)
+ {
+ int max_num;
+
+ /* Get the item */
+ j_ptr = &st_ptr->stock[j];
+
+ /* Skip empty items */
+ if (!j_ptr->k_idx) continue;
+
+ /*
+ * Get maximum number of the stack if these
+ * are similar, get zero otherwise.
+ */
+ max_num = object_similar_part(j_ptr, o_ptr);
+
+ /* Can we (partialy) drop "o_ptr" onto "j_ptr"? */
+ if (max_num && j_ptr->number < max_num)
+ {
+ if (o_ptr->number + j_ptr->number <= max_num)
+ {
+ /* Add together the item counts */
+ object_absorb(j_ptr, o_ptr);
+
+ /* One object is gone */
+ st_ptr->stock_num--;
+
+ /* Slide everything down */
+ for (k = i; k < st_ptr->stock_num; k++)
+ {
+ /* Structure copy */
+ st_ptr->stock[k] = st_ptr->stock[k + 1];
+ }
+
+ /* Erase the "final" slot */
+ object_wipe(&st_ptr->stock[k]);
+ }
+ else
+ {
+ int old_num = o_ptr->number;
+ int remain = j_ptr->number + o_ptr->number - max_num;
+
+ /* Add together the item counts */
+ object_absorb(j_ptr, o_ptr);
+
+ o_ptr->number = remain;
+
+ /* Hack -- if rods are stacking, add the pvals (maximum timeouts) and current timeouts together. -LM- */
+ if (o_ptr->tval == TV_ROD)
+ {
+ o_ptr->pval = o_ptr->pval * remain / old_num;
+ o_ptr->timeout = o_ptr->timeout * remain / old_num;
+ }
+
+ /* Hack -- if wands are stacking, combine the charges. -LM- */
+ else if (o_ptr->tval == TV_WAND)
+ {
+ o_ptr->pval = o_ptr->pval * remain / old_num;
+ }
+ }
+
+ /* Take note */
+ combined = TRUE;
+
+ /* Done */
+ break;
+ }
+ }
+ }
+
+ flag |= combined;
+ }
+ while (combined);
+
+ /* Re-order the items in the home (forwards) */
+ for (i = 0; i < st_ptr->stock_num; i++)
+ {
+ /* Get the item */
+ o_ptr = &st_ptr->stock[i];
+
+ /* Skip empty slots */
+ if (!o_ptr->k_idx) continue;
+
+ /* Get the "value" of the item */
+ o_value = object_value(o_ptr);
+
+ /* Scan every occupied slot */
+ for (j = 0; j < st_ptr->stock_num; j++)
+ {
+ if (object_sort_comp(o_ptr, o_value, &st_ptr->stock[j])) break;
+ }
+
+ /* Never move down */
+ if (j >= i) continue;
+
+ /* Take note */
+ flag = TRUE;
+
+ /* Get local object */
+ j_ptr = &forge;
+
+ /* Save a copy of the moving item */
+ object_copy(j_ptr, &st_ptr->stock[i]);
+
+ /* Slide the objects */
+ for (k = i; k > j; k--)
+ {
+ /* Slide the item */
+ object_copy(&st_ptr->stock[k], &st_ptr->stock[k - 1]);
+ }
+
+ /* Insert the moving item */
+ object_copy(&st_ptr->stock[j], j_ptr);
+ }
+
+ st_ptr = old_st_ptr;
+ if (store_num != STORE_HOME)
+ {
+ stack_force_notes = old_stack_force_notes;
+ stack_force_costs = old_stack_force_costs;
+ }
+
+ return flag;
+}
+
+
+/*!
+ * @brief 我が家にオブジェクトを加える /
* Add the item "o_ptr" to the inventory of the "Home"
- *
+ * @param o_ptr 加えたいオブジェクトの構造体参照ポインタ
+ * @return 収めた先のID
+ * @details
+ * <pre>
* In all cases, return the slot (or -1) where the object was placed
- *
* Note that this is a hacked up version of "inven_carry()".
- *
* Also note that it may not correctly "adapt" to "knowledge" bacoming
* known, the player may have to pick stuff up and drop it again.
+ * </pre>
*/
static int home_carry(object_type *o_ptr)
{
int slot;
- s32b value, j_value;
+ s32b value;
int i;
object_type *j_ptr;
+ bool old_stack_force_notes = stack_force_notes;
+ bool old_stack_force_costs = stack_force_costs;
+ if (cur_store_num != STORE_HOME)
+ {
+ stack_force_notes = FALSE;
+ stack_force_costs = FALSE;
+ }
/* Check each existing item (try to combine) */
for (slot = 0; slot < st_ptr->stock_num; slot++)
/* Save the new number of items */
object_absorb(j_ptr, o_ptr);
+ if (cur_store_num != STORE_HOME)
+ {
+ stack_force_notes = old_stack_force_notes;
+ stack_force_costs = old_stack_force_costs;
+ }
+
/* All done */
return (slot);
}
}
+ if (cur_store_num != STORE_HOME)
+ {
+ stack_force_notes = old_stack_force_notes;
+ stack_force_costs = old_stack_force_costs;
+ }
+
/* No space? */
/*
- * ±£¤·µ¡Ç½: ¥ª¥×¥·¥ç¥ó powerup_home ¤¬ÀßÄꤵ¤ì¤Æ¤¤¤ë¤È
- * ²æ¤¬²È¤¬ 20 ¥Ú¡¼¥¸¤Þ¤Ç»È¤¨¤ë
+ * 隠し機能: オプション powerup_home が設定されていると
+ * 我が家が 20 ページまで使える
*/
/* No space? */
- if ( powerup_home == TRUE) {
+ if ((cur_store_num != STORE_HOME) || (powerup_home == TRUE)) {
if (st_ptr->stock_num >= st_ptr->stock_size) {
return (-1);
}
/* Check existing slots to see if we must "slide" */
for (slot = 0; slot < st_ptr->stock_num; slot++)
{
- /* Get that item */
- j_ptr = &st_ptr->stock[slot];
-
- /* Hack -- readable books always come first */
- if ((o_ptr->tval == mp_ptr->spell_book) &&
- (j_ptr->tval != mp_ptr->spell_book)) break;
- if ((j_ptr->tval == mp_ptr->spell_book) &&
- (o_ptr->tval != mp_ptr->spell_book)) continue;
-
- /* Objects sort by decreasing type */
- if (o_ptr->tval > j_ptr->tval) break;
- if (o_ptr->tval < j_ptr->tval) continue;
-
- /* Can happen in the home */
- if (!object_aware_p(o_ptr)) continue;
- if (!object_aware_p(j_ptr)) break;
-
- /* Objects sort by increasing sval */
- if (o_ptr->sval < j_ptr->sval) break;
- if (o_ptr->sval > j_ptr->sval) continue;
-
- /* Objects in the home can be unknown */
- if (!object_known_p(o_ptr)) continue;
- if (!object_known_p(j_ptr)) break;
-
- /*
- * Hack: otherwise identical rods sort by
- * increasing recharge time --dsb
- */
- if (o_ptr->tval == TV_ROD)
- {
- if (o_ptr->pval < j_ptr->pval) break;
- if (o_ptr->pval > j_ptr->pval) continue;
- }
- if ((o_ptr->tval == TV_CORPSE) || (o_ptr->tval == TV_FIGURINE) || (o_ptr->tval == TV_STATUE))
- {
- if (r_info[o_ptr->pval].level < r_info[j_ptr->pval].level) break;
- if ((r_info[o_ptr->pval].level == r_info[j_ptr->pval].level) && (o_ptr->pval < j_ptr->pval)) break;
- }
-
- /* Objects sort by decreasing value */
- j_value = object_value(j_ptr);
- if (value > j_value) break;
- if (value < j_value) continue;
+ if (object_sort_comp(o_ptr, value, &st_ptr->stock[slot])) break;
}
/* Slide the others up */
chg_virtue(V_SACRIFICE, -1);
+ (void)combine_and_reorder_home(cur_store_num);
+
/* Return the location */
return (slot);
}
-/*
+/*!
+ * @brief 店舗にオブジェクトを加える /
* Add the item "o_ptr" to a real stores inventory.
- *
- * If the item is "worthless", it is thrown away (except in the home).
- *
- * If the item cannot be combined with an object already in the inventory,
- * make a new slot for it, and calculate its "per item" price. Note that
- * this price will be negative, since the price will not be "fixed" yet.
- * Adding an item to a "fixed" price stack will not change the fixed price.
- *
+ * @param o_ptr 加えたいオブジェクトの構造体参照ポインタ
+ * @return 収めた先のID
+ * @details
+ * <pre>
* In all cases, return the slot (or -1) where the object was placed
+ * Note that this is a hacked up version of "inven_carry()".
+ * Also note that it may not correctly "adapt" to "knowledge" bacoming
+ * known, the player may have to pick stuff up and drop it again.
+ * </pre>
*/
static int store_carry(object_type *o_ptr)
{
}
-/*
+/*!
+ * @brief 店舗のオブジェクト数を増やす /
+ * Add the item "o_ptr" to a real stores inventory.
+ * @param item 増やしたいアイテムのID
+ * @param num 増やしたい数
+ * @return なし
+ * @details
+ * <pre>
* Increase, by a given amount, the number of a certain item
* in a certain store. This can result in zero items.
+ * </pre>
*/
static void store_item_increase(int item, int num)
{
}
-/*
+/*!
+ * @brief 店舗のオブジェクト数を削除する /
* Remove a slot if it is empty
+ * @param item 削除したいアイテムのID
+ * @return なし
*/
static void store_item_optimize(int item)
{
object_wipe(&st_ptr->stock[j]);
}
-
-/*
+/*!
+ * @brief ブラックマーケット用の無価値品の排除判定 /
* This function will keep 'crap' out of the black market.
+ * @param o_ptr 判定したいオブジェクトの構造体参照ポインタ
+ * @return ブラックマーケットにとって無価値な品ならばTRUEを返す
+ * @details
+ * <pre>
* Crap is defined as any item that is "available" elsewhere
* Based on a suggestion by "Lee Vogt" <lvogt@cig.mcel.mot.com>
+ * </pre>
*/
static bool black_market_crap(object_type *o_ptr)
{
int i, j;
/* Ego items are never crap */
- if (o_ptr->name2) return (FALSE);
+ if (object_is_ego(o_ptr)) return (FALSE);
/* Good items are never crap */
if (o_ptr->to_a > 0) return (FALSE);
}
-/*
+/*!
+ * @brief 店舗の品揃え変化のためにアイテムを削除する /
* Attempt to delete (some of) a random item from the store
+ * @return なし
+ * @details
+ * <pre>
* Hack -- we attempt to "maintain" piles of items when possible.
+ * </pre>
*/
static void store_delete(void)
{
}
-/*
+/*!
+ * @brief 店舗の品揃え変化のためにアイテムを追加する /
* Creates a random item and gives it to a store
+ * @return なし
+ * @details
+ * <pre>
* This algorithm needs to be rethought. A lot.
* Currently, "normal" stores use a pre-built array.
- *
* Note -- the "level" given to "obj_get_num()" is a "favored"
* level, that is, there is a much higher chance of getting
* items with a level approaching that of the given level...
- *
* Should we check for "permission" to have the given item?
+ * </pre>
*/
static void store_create(void)
{
}
-
-/*
+/*!
+ * @brief 店舗の割引対象外にするかどうかを判定 /
* Eliminate need to bargain if player has haggled well in the past
+ * @param minprice アイテムの最低販売価格
+ * @return 割引を禁止するならTRUEを返す。
*/
static bool noneedtobargain(s32b minprice)
{
}
-/*
+/*!
+ * @brief 店主の持つプレイヤーに対する売買の良し悪し経験を記憶する /
* Update the bargain info
+ * @param price 実際の取引価格
+ * @param minprice 店主の提示した価格
+ * @param num 売買数
+ * @return なし
*/
static void updatebargain(s32b price, s32b minprice, int num)
{
}
-
-/*
+/*!
+ * @brief 店の商品リストを再表示する /
* Re-displays a single store entry
+ * @param pos 表示行
+ * @return なし
*/
static void display_entry(int pos)
{
o_ptr = &st_ptr->stock[pos];
/* Get the "offset" */
- i = (pos % 12);
+ i = (pos % store_bottom);
/* Label it, clear the line --(-- */
- (void)sprintf(out_val, "%c) ", I2A(i));
+ (void)sprintf(out_val, "%c) ", ((i > 25) ? toupper(I2A(i - 26)) : I2A(i)));
prt(out_val, i+6, 0);
cur_col = 3;
byte a = object_attr(o_ptr);
char c = object_char(o_ptr);
-#ifdef AMIGA
- if (a & 0x80)
- a |= 0x40;
-#endif
-
Term_queue_bigchar(cur_col, i + 6, a, c, 0, 0);
+ if (use_bigtile) cur_col++;
+
cur_col += 2;
}
/* Actually draw the price (not fixed) */
#ifdef JP
-(void)sprintf(out_val, "%9ld¸Ç", (long)x);
+(void)sprintf(out_val, "%9ld固", (long)x);
#else
(void)sprintf(out_val, "%9ld F", (long)x);
#endif
}
-/*
+/*!
+ * @brief 店の商品リストを表示する /
* Displays a store's inventory -RAK-
+ * @return なし
+ * @details
* All prices are listed as "per individual object". -BEN-
*/
static void display_inventory(void)
int i, k;
/* Display the next 12 items */
- for (k = 0; k < 12; k++)
+ for (k = 0; k < store_bottom; k++)
{
/* Do not display "dead" items */
if (store_top + k >= st_ptr->stock_num) break;
}
/* Erase the extra lines and the "more" prompt */
- for (i = k; i < 13; i++) prt("", i + 6, 0);
+ for (i = k; i < store_bottom + 1; i++) prt("", i + 6, 0);
/* Assume "no current page" */
#ifdef JP
/* Visual reminder of "more items" */
- if (st_ptr->stock_num > 12)
+ if (st_ptr->stock_num > store_bottom)
{
/* Show "more" reminder (after the last item) */
#ifdef JP
- prt("-³¤¯-", k + 6, 3);
+ prt("-続く-", k + 6, 3);
#else
prt("-more-", k + 6, 3);
#endif
/* Indicate the "current page" */
/* Trailing spaces are to display (Page xx) and (Page x) */
#ifdef JP
- put_str(format("(%d¥Ú¡¼¥¸) ", store_top/12 + 1), 5, 20);
+ put_str(format("(%dページ) ", store_top/store_bottom + 1), 5, 20);
#else
- put_str(format("(Page %d) ", store_top/12 + 1), 5, 20);
+ put_str(format("(Page %d) ", store_top/store_bottom + 1), 5, 20);
#endif
}
+
+ if (cur_store_num == STORE_HOME || cur_store_num == STORE_MUSEUM)
+ {
+ k = st_ptr->stock_size;
+
+ if (cur_store_num == STORE_HOME && !powerup_home) k /= 10;
+#ifdef JP
+ put_str(format("アイテム数: %4d/%4d", st_ptr->stock_num, k), 19 + xtra_stock, 27);
+#else
+ put_str(format("Objects: %4d/%4d", st_ptr->stock_num, k), 19 + xtra_stock, 30);
+#endif
+ }
}
-/*
+/*!
+ * @brief プレイヤーの所持金を表示する /
* Displays players gold -RAK-
+ * @return なし
+ * @details
*/
static void store_prt_gold(void)
{
char out_val[64];
#ifdef JP
- prt("¼ê»ý¤Á¤Î¤ª¶â: ", 19, 53);
+ prt("手持ちのお金: ", 19 + xtra_stock, 53);
#else
- prt("Gold Remaining: ", 19, 53);
+ prt("Gold Remaining: ", 19 + xtra_stock, 53);
#endif
sprintf(out_val, "%9ld", (long)p_ptr->au);
- prt(out_val, 19, 68);
+ prt(out_val, 19 + xtra_stock, 68);
}
-
-/*
+/*!
+ * @brief 店舗情報全体を表示するメインルーチン /
* Displays store (after clearing screen) -RAK-
+ * @return なし
+ * @details
*/
static void display_store(void)
{
{
/* Put the owner name */
#ifdef JP
- put_str("²æ¤¬²È", 3, 31);
+ put_str("我が家", 3, 31);
#else
put_str("Your Home", 3, 30);
#endif
/* Label the item descriptions */
#ifdef JP
- put_str("¥¢¥¤¥Æ¥à¤Î°ìÍ÷", 5, 4);
+ put_str("アイテムの一覧", 5, 4);
#else
put_str("Item Description", 5, 3);
#endif
if (show_weights)
{
#ifdef JP
- put_str("½Å¤µ", 5, 72);
+ put_str("重さ", 5, 72);
#else
put_str("Weight", 5, 70);
#endif
{
/* Put the owner name */
#ifdef JP
- put_str("Çîʪ´Û", 3, 31);
+ put_str("博物館", 3, 31);
#else
put_str("Museum", 3, 30);
#endif
/* Label the item descriptions */
#ifdef JP
- put_str("¥¢¥¤¥Æ¥à¤Î°ìÍ÷", 5, 4);
+ put_str("アイテムの一覧", 5, 4);
#else
put_str("Item Description", 5, 3);
#endif
if (show_weights)
{
#ifdef JP
- put_str("½Å¤µ", 5, 72);
+ put_str("重さ", 5, 72);
#else
put_str("Weight", 5, 70);
#endif
/* Label the item descriptions */
#ifdef JP
- put_str("¾¦ÉʤΰìÍ÷", 5, 7);
+ put_str("商品の一覧", 5, 7);
#else
put_str("Item Description", 5, 3);
#endif
if (show_weights)
{
#ifdef JP
- put_str("½Å¤µ", 5, 62);
+ put_str("重さ", 5, 62);
#else
put_str("Weight", 5, 60);
#endif
/* Label the asking price (in stores) */
#ifdef JP
- put_str("²Á³Ê", 5, 73);
+ put_str("価格", 5, 73);
#else
put_str("Price", 5, 72);
#endif
-/*
+/*!
+ * @brief 店舗からアイテムを選択する /
* Get the ID of a store item and return its value -RAK-
+ * @param com_val 選択IDを返す参照ポインタ
+ * @param pmt メッセージキャプション
+ * @param i 選択範囲の最小値
+ * @param j 選択範囲の最大値
+ * @return 実際に選択したらTRUE、キャンセルしたらFALSE
*/
static int get_stock(int *com_val, cptr pmt, int i, int j)
{
char command;
-
char out_val[160];
+ char lo, hi;
#ifdef ALLOW_REPEAT /* TNB */
*com_val = (-1);
/* Build the prompt */
+ lo = I2A(i);
+ hi = (j > 25) ? toupper(I2A(j - 26)) : I2A(j);
#ifdef JP
- (void)sprintf(out_val, "(%s:%c-%c, ESC¤ÇÃæÃÇ) %s",
- (((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM)) ? "¥¢¥¤¥Æ¥à" : "¾¦ÉÊ"),
- I2A(i), I2A(j), pmt);
+ (void)sprintf(out_val, "(%s:%c-%c, ESCで中断) %s",
+ (((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM)) ? "アイテム" : "商品"),
+ lo, hi, pmt);
#else
(void)sprintf(out_val, "(Items %c-%c, ESC to exit) %s",
- I2A(i), I2A(j), pmt);
+ lo, hi, pmt);
#endif
if (!get_com(out_val, &command, FALSE)) break;
/* Convert */
- k = (islower(command) ? A2I(command) : -1);
+ if (islower(command))
+ k = A2I(command);
+ else if (isupper(command))
+ k = A2I(tolower(command)) + 26;
+ else
+ k = -1;
/* Legal responses */
if ((k >= i) && (k <= j))
}
-/*
+/*!
+ * @brief 店主の不満度を増やし、プレイヤーを締め出す判定と処理を行う /
* Increase the insult counter and get angry if too many -RAK-
+ * @return プレイヤーを締め出す場合TRUEを返す
*/
static int increase_insults(void)
{
}
-/*
+/*!
+ * @brief 店主の不満度を減らす /
* Decrease insults -RAK-
+ * @return プレイヤーを締め出す場合TRUEを返す
*/
static void decrease_insults(void)
{
}
-/*
+/*!
+ * @brief 店主の不満度が増えた場合のみのメッセージを表示する /
* Have insulted while haggling -RAK-
+ * @return プレイヤーを締め出す場合TRUEを返す
*/
static int haggle_insults(void)
{
static s32b last_inc = 0L;
-/*
+/*!
+ * @brief 交渉価格を確認と認証の是非を行う /
* Get a haggle
+ * @param pmt メッセージ
+ * @param poffer 別途価格提示をした場合の値を返す参照ポインタ
+ * @param price 現在の交渉価格
+ * @param final 最終確定価格ならばTRUE
+ * @return プレイヤーを締め出す場合TRUEを返す
*/
static int get_haggle(cptr pmt, s32b *poffer, s32b price, int final)
{
if (final)
{
#ifdef JP
- sprintf(buf, "%s [¾µÂú] ", pmt);
+ sprintf(buf, "%s [承諾] ", pmt);
#else
sprintf(buf, "%s [accept] ", pmt);
#endif
/* Warning */
#ifdef JP
- msg_print("Ãͤ¬¤ª¤«¤·¤¤¤Ç¤¹¡£");
+ msg_print("値がおかしいです。");
#else
msg_print("Invalid response.");
#endif
}
-/*
+/*!
+ * @brief 店主がプレイヤーからの交渉価格を判断する /
* Receive an offer (from the player)
- *
+ * @param pmt メッセージ
+ * @param poffer 店主からの交渉価格を返す参照ポインタ
+ * @param last_offer 現在の交渉価格
+ * @param factor 店主の価格基準倍率
+ * @param price アイテムの実価値
+ * @param final 最終価格確定ならばTRUE
+ * @return プレイヤーの価格に対して不服ならばTRUEを返す /
* Return TRUE if offer is NOT okay
*/
static bool receive_offer(cptr pmt, s32b *poffer,
}
-/*
+/*!
+ * @brief プレイヤーが購入する時の値切り処理メインルーチン /
* Haggling routine -RAK-
- *
+ * @param o_ptr オブジェクトの構造体参照ポインタ
+ * @param price 最終価格を返す参照ポインタ
+ * @return プレイヤーの価格に対して店主が不服ならばTRUEを返す /
* Return TRUE if purchase is NOT successful
*/
static bool purchase_haggle(object_type *o_ptr, s32b *price)
bool cancel = FALSE;
#ifdef JP
- cptr pmt = "Ä󼨲Á³Ê";
+ cptr pmt = "提示価格";
#else
cptr pmt = "Asking";
#endif
{
/* Message summary */
#ifdef JP
- msg_print("·ë¶É¤³¤Î¶â³Û¤Ë¤Þ¤È¤Þ¤Ã¤¿¡£");
+ msg_print("結局この金額にまとまった。");
#else
msg_print("You eventually agree upon the price.");
#endif
{
/* Message summary */
#ifdef JP
- msg_print("¤¹¤ó¤Ê¤ê¤È¤³¤Î¶â³Û¤Ë¤Þ¤È¤Þ¤Ã¤¿¡£");
+ msg_print("すんなりとこの金額にまとまった。");
#else
msg_print("You quickly agree upon the price.");
#endif
/* Go to final offer */
#ifdef JP
- pmt = "ºÇ½ªÄ󼨲Á³Ê";
+ pmt = "最終提示価格";
#else
pmt = "Final Offer";
#endif
(void)sprintf(out_val, "%s : %ld", pmt, (long)cur_ask);
put_str(out_val, 1, 0);
#ifdef JP
- cancel = receive_offer("Ä󼨤¹¤ë¶â³Û? ",
+ cancel = receive_offer("提示する金額? ",
#else
cancel = receive_offer("What do you offer? ",
#endif
final = TRUE;
cur_ask = final_ask;
#ifdef JP
- pmt = "ºÇ½ªÄ󼨲Á³Ê";
+ pmt = "最終提示価格";
#else
pmt = "Final Offer";
#endif
allow_inc = TRUE;
prt("", 1, 0);
#ifdef JP
-(void)sprintf(out_val, "Á°²ó¤ÎÄ󼨶â³Û: $%ld",
+(void)sprintf(out_val, "前回の提示金額: $%ld",
#else
(void)sprintf(out_val, "Your last offer: %ld",
#endif
}
-/*
+/*!
+ * @brief プレイヤーが売却する時の値切り処理メインルーチン /
* Haggling routine -RAK-
- *
+ * @param o_ptr オブジェクトの構造体参照ポインタ
+ * @param price 最終価格を返す参照ポインタ
+ * @return プレイヤーの価格に対して店主が不服ならばTRUEを返す /
* Return TRUE if purchase is NOT successful
*/
static bool sell_haggle(object_type *o_ptr, s32b *price)
int annoyed = 0, final = FALSE;
bool cancel = FALSE;
#ifdef JP
- cptr pmt = "Ä󼨶â³Û";
+ cptr pmt = "提示金額";
#else
cptr pmt = "Offer";
#endif
{
/* Message */
#ifdef JP
- msg_print("¨ºÂ¤Ë¤³¤Î¶â³Û¤Ë¤Þ¤È¤Þ¤Ã¤¿¡£");
+ msg_print("即座にこの金額にまとまった。");
#else
msg_print("You instantly agree upon the price.");
#endif
{
/* Message */
#ifdef JP
- msg_print("·ë¶É¤³¤Î¶â³Û¤Ë¤Þ¤È¤Þ¤Ã¤¿¡£");
+ msg_print("結局この金額にまとまった。");
#else
msg_print("You eventually agree upon the price.");
#endif
{
/* Message summary */
#ifdef JP
- msg_print("¤¹¤ó¤Ê¤ê¤È¤³¤Î¶â³Û¤Ë¤Þ¤È¤Þ¤Ã¤¿¡£");
+ msg_print("すんなりとこの金額にまとまった。");
#else
msg_print("You quickly agree upon the price.");
#endif
/* Final offer */
final = TRUE;
#ifdef JP
- pmt = "ºÇ½ªÄ󼨶â³Û";
+ pmt = "最終提示金額";
#else
pmt = "Final Offer";
#endif
(void)sprintf(out_val, "%s : %ld", pmt, (long)cur_ask);
put_str(out_val, 1, 0);
#ifdef JP
- cancel = receive_offer("Ä󼨤¹¤ë²Á³Ê? ",
+ cancel = receive_offer("提示する価格? ",
#else
cancel = receive_offer("What price do you ask? ",
#endif
cur_ask = final_ask;
final = TRUE;
#ifdef JP
- pmt = "ºÇ½ªÄ󼨶â³Û";
+ pmt = "最終提示金額";
#else
pmt = "Final Offer";
#endif
{
flag = TRUE;
#ifdef JP
- /* Äɲà $0 ¤ÇÇ㤤¼è¤é¤ì¤Æ¤·¤Þ¤¦¤Î¤òËÉ»ß By FIRST*/
+ /* 追加 $0 で買い取られてしまうのを防止 By FIRST*/
cancel = TRUE;
#endif
(void)(increase_insults());
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
}
-/*
+/*!
+ * @brief 店からの購入処理のメインルーチン /
* Buy an item from a store -RAK-
+ * @return なし
*/
static void store_purchase(void)
{
char out_val[160];
-
if (cur_store_num == STORE_MUSEUM)
{
#ifdef JP
- msg_print("Çîʪ´Û¤«¤é¼è¤ê½Ð¤¹¤³¤È¤Ï¤Ç¤¤Þ¤»¤ó¡£");
+ msg_print("博物館から取り出すことはできません。");
#else
msg_print("Museum.");
#endif
{
if (cur_store_num == STORE_HOME)
#ifdef JP
- msg_print("²æ¤¬²È¤Ë¤Ï²¿¤âÃÖ¤¤¤Æ¤¢¤ê¤Þ¤»¤ó¡£");
+ msg_print("我が家には何も置いてありません。");
#else
msg_print("Your home is empty.");
#endif
else
#ifdef JP
- msg_print("¸½ºß¾¦Éʤκ߸ˤòÀڤ餷¤Æ¤¤¤Þ¤¹¡£");
+ msg_print("現在商品の在庫を切らしています。");
#else
msg_print("I am currently out of stock.");
#endif
i = (st_ptr->stock_num - store_top);
/* And then restrict it to the current page */
- if (i > 12) i = 12;
+ if (i > store_bottom) i = store_bottom;
/* Prompt */
#ifdef JP
- /* ¥Ö¥é¥Ã¥¯¥Þ¡¼¥±¥Ã¥È¤Î»þ¤ÏÊ̤Υá¥Ã¥»¡¼¥¸ */
+ /* ã\83\96ã\83©ã\83\83ã\82¯ã\83\9eã\83¼ã\82±ã\83\83ã\83\88ã\81®æ\99\82ã\81¯å\88¥ã\81®ã\83¡ã\83\83ã\82»ã\83¼ã\82¸ */
switch( cur_store_num ) {
case 7:
- sprintf(out_val, "¤É¤Î¥¢¥¤¥Æ¥à¤ò¼è¤ê¤Þ¤¹¤«? ");
+ sprintf(out_val, "どのアイテムを取りますか? ");
break;
case 6:
- sprintf(out_val, "¤É¤ì? ");
+ sprintf(out_val, "どれ? ");
break;
default:
- sprintf(out_val, "¤É¤ÎÉÊʪ¤¬Íߤ·¤¤¤ó¤À¤¤? ");
+ sprintf(out_val, "どの品物が欲しいんだい? ");
break;
}
#else
if (!inven_carry_okay(j_ptr))
{
#ifdef JP
-msg_print("¤½¤ó¤Ê¤Ë¥¢¥¤¥Æ¥à¤ò»ý¤Æ¤Ê¤¤¡£");
+msg_print("そんなにアイテムを持てない。");
#else
msg_print("You cannot carry that many different items.");
#endif
(o_ptr->ident & IDENT_FIXED))
{
#ifdef JP
-msg_format("°ì¤Ä¤Ë¤Ä¤ $%ld¤Ç¤¹¡£", (long)(best));
+msg_format("一つにつき $%ldです。", (long)(best));
#else
msg_format("That costs %ld gold per item.", (long)(best));
#endif
if (!inven_carry_okay(j_ptr))
{
#ifdef JP
- msg_print("¥¶¥Ã¥¯¤Ë¤½¤Î¥¢¥¤¥Æ¥à¤òÆþ¤ì¤ë·ä´Ö¤¬¤Ê¤¤¡£");
+ msg_print("ザックにそのアイテムを入れる隙間がない。");
#else
msg_print("You cannot carry that many items.");
#endif
/* Message */
#ifdef JP
-msg_format("%s(%c)¤ò¹ØÆþ¤¹¤ë¡£", o_name, I2A(item));
+msg_format("%s(%c)を購入する。", o_name, I2A(item));
#else
msg_format("Buying %s (%c).", o_name, I2A(item));
#endif
/* Message */
#ifdef JP
-msg_format("%s¤ò $%ld¤Ç¹ØÆþ¤·¤Þ¤·¤¿¡£", o_name, (long)price);
+msg_format("%sを $%ldで購入しました。", o_name, (long)price);
#else
msg_format("You bought %s for %ld gold.", o_name, (long)price);
#endif
/* Message */
#ifdef JP
- msg_format("%s(%c)¤ò¼ê¤ËÆþ¤ì¤¿¡£", o_name, index_to_label(item_new));
+ msg_format("%s(%c)を手に入れた。", o_name, index_to_label(item_new));
#else
msg_format("You have %s (%c).",
o_name, index_to_label(item_new));
char buf[80];
/* Message */
#ifdef JP
- msg_print("Ź¼ç¤Ï°úÂष¤¿¡£");
+ msg_print("店主は引退した。");
#else
msg_print("The shopkeeper retires.");
#endif
{
/* Message */
#ifdef JP
- msg_print("Ź¼ç¤Ï¿·¤¿¤Êºß¸Ë¤ò¼è¤ê½Ð¤·¤¿¡£");
+ msg_print("店主は新たな在庫を取り出した。");
#else
msg_print("The shopkeeper brings out some new stock.");
#endif
else if (st_ptr->stock_num != i)
{
/* Pick the correct screen */
- if (store_top >= st_ptr->stock_num) store_top -= 12;
+ if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
/* Redraw everything */
display_inventory();
{
/* Simple message (no insult) */
#ifdef JP
- msg_print("¤ª¶â¤¬Â¤ê¤Þ¤»¤ó¡£");
+ msg_print("お金が足りません。");
#else
msg_print("You do not have enough gold.");
#endif
/* Home is much easier */
else
{
+ bool combined_or_reordered;
+
/* Distribute charges of wands/rods */
distribute_charges(o_ptr, j_ptr, amt);
/* Message */
#ifdef JP
- msg_format("%s(%c)¤ò¼è¤Ã¤¿¡£",
+ msg_format("%s(%c)を取った。",
#else
msg_format("You have %s (%c).",
#endif
store_item_increase(item, -amt);
store_item_optimize(item);
+ combined_or_reordered = combine_and_reorder_home(STORE_HOME);
+
/* Hack -- Item is still here */
if (i == st_ptr->stock_num)
{
+ /* Redraw everything */
+ if (combined_or_reordered) display_inventory();
+
/* Redraw the item */
- display_entry(item);
+ else display_entry(item);
}
/* The item is gone */
if (st_ptr->stock_num == 0) store_top = 0;
/* Nothing left on that screen */
- else if (store_top >= st_ptr->stock_num) store_top -= 12;
+ else if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
/* Redraw everything */
display_inventory();
}
-/*
+/*!
+ * @brief 店からの売却処理のメインルーチン /
* Sell an item to the store (or home)
+ * @return なし
*/
static void store_sell(void)
{
/* Prepare a prompt */
if (cur_store_num == STORE_HOME)
#ifdef JP
- q = "¤É¤Î¥¢¥¤¥Æ¥à¤òÃÖ¤¤Þ¤¹¤«? ";
+ q = "どのアイテムを置きますか? ";
#else
q = "Drop which item? ";
#endif
else if (cur_store_num == STORE_MUSEUM)
#ifdef JP
- q = "¤É¤Î¥¢¥¤¥Æ¥à¤ò´ó£¤·¤Þ¤¹¤«? ";
+ q = "どのアイテムを寄贈しますか? ";
#else
q = "Give which item? ";
#endif
else
#ifdef JP
- q = "¤É¤Î¥¢¥¤¥Æ¥à¤òÇä¤ê¤Þ¤¹¤«? ";
+ q = "どのアイテムを売りますか? ";
#else
q = "Sell which item? ";
#endif
item_tester_hook = store_will_buy;
/* Get an item */
- /* ²æ¤¬²È¤Ç¤ª¤«¤·¤Ê¥á¥Ã¥»¡¼¥¸¤¬½Ð¤ë¥ª¥ê¥¸¥Ê¥ë¤Î¥Ð¥°¤ò½¤Àµ */
+ /* 我が家でおかしなメッセージが出るオリジナルのバグを修正 */
if (cur_store_num == STORE_HOME)
{
#ifdef JP
- s = "ÃÖ¤±¤ë¥¢¥¤¥Æ¥à¤ò»ý¤Ã¤Æ¤¤¤Þ¤»¤ó¡£";
+ s = "置けるアイテムを持っていません。";
#else
s = "You don't have any item to drop.";
#endif
else if (cur_store_num == STORE_MUSEUM)
{
#ifdef JP
- s = "´ó£¤Ç¤¤ë¥¢¥¤¥Æ¥à¤ò»ý¤Ã¤Æ¤¤¤Þ¤»¤ó¡£";
+ s = "寄贈できるアイテムを持っていません。";
#else
s = "You don't have any item to give.";
#endif
else
{
#ifdef JP
- s = "Íߤ·¤¤Êª¤¬¤Ê¤¤¤Ç¤¹¤Í¤¨¡£";
+ s = "欲しい物がないですねえ。";
#else
s = "You have nothing that I want.";
#endif
/* Hack -- Cannot remove cursed items */
- if ((item >= INVEN_RARM) && cursed_p(o_ptr))
+ if ((item >= INVEN_RARM) && object_is_cursed(o_ptr))
{
/* Oops */
#ifdef JP
- msg_print("¤Õ¡¼¤à¡¢¤É¤¦¤ä¤é¤½¤ì¤Ï¼ö¤ï¤ì¤Æ¤¤¤ë¤è¤¦¤À¤Í¡£");
+ msg_print("ふーむ、どうやらそれは呪われているようだね。");
#else
msg_print("Hmmm, it seems to be cursed.");
#endif
{
if (cur_store_num == STORE_HOME)
#ifdef JP
- msg_print("²æ¤¬²È¤Ë¤Ï¤â¤¦ÃÖ¤¯¾ì½ê¤¬¤Ê¤¤¡£");
+ msg_print("我が家にはもう置く場所がない。");
#else
msg_print("Your home is full.");
#endif
else if (cur_store_num == STORE_MUSEUM)
#ifdef JP
- msg_print("Çîʪ´Û¤Ï¤â¤¦ËþÇÕ¤À¡£");
+ msg_print("博物館はもう満杯だ。");
#else
msg_print("Museum is full.");
#endif
else
#ifdef JP
- msg_print("¤¹¤¤¤Þ¤»¤ó¤¬¡¢Å¹¤Ë¤Ï¤â¤¦ÃÖ¤¯¾ì½ê¤¬¤¢¤ê¤Þ¤»¤ó¡£");
+ msg_print("すいませんが、店にはもう置く場所がありません。");
#else
msg_print("I have not the room in my store to keep it.");
#endif
{
/* Describe the transaction */
#ifdef JP
- msg_format("%s(%c)¤òÇäµÑ¤¹¤ë¡£", o_name, index_to_label(item));
+ msg_format("%s(%c)を売却する。", o_name, index_to_label(item));
#else
msg_format("Selling %s (%c).", o_name, index_to_label(item));
#endif
/* Describe the result (in message buffer) */
#ifdef JP
-msg_format("%s¤ò $%ld¤ÇÇäµÑ¤·¤Þ¤·¤¿¡£", o_name, (long)price);
+msg_format("%sを $%ldで売却しました。", o_name, (long)price);
#else
msg_format("You sold %s for %ld gold.", o_name, (long)price);
#endif
/* Re-display if item is now in store */
if (item_pos >= 0)
{
- store_top = (item_pos / 12) * 12;
+ store_top = (item_pos / store_bottom) * store_bottom;
display_inventory();
}
}
if (-1 == store_check_num(q_ptr))
{
#ifdef JP
- msg_print("¤½¤ì¤ÈƱ¤¸ÉÊʪ¤Ï´û¤ËÇîʪ´Û¤Ë¤¢¤ë¤è¤¦¤Ç¤¹¡£");
+ msg_print("それと同じ品物は既に博物館にあるようです。");
#else
msg_print("The same object as it is already in the Museum.");
#endif
else
{
#ifdef JP
- msg_print("Çîʪ´Û¤Ë´ó£¤·¤¿¤â¤Î¤Ï¼è¤ê½Ð¤¹¤³¤È¤¬¤Ç¤¤Þ¤»¤ó¡ª¡ª");
+ msg_print("博物館に寄贈したものは取り出すことができません!!");
#else
msg_print("You cannot take items which is given to the Museum back!!");
#endif
}
#ifdef JP
- if (!get_check(format("ËÜÅö¤Ë%s¤ò´ó£¤·¤Þ¤¹¤«¡©", o2_name))) return;
+ if (!get_check(format("本当に%sを寄贈しますか?", o2_name))) return;
#else
if (!get_check(format("Really give %s to the Museum? ", o2_name))) return;
#endif
/* Describe */
#ifdef JP
- msg_format("%s¤òÃÖ¤¤¤¿¡£(%c)", o_name, index_to_label(item));
+ msg_format("%sを置いた。(%c)", o_name, index_to_label(item));
#else
msg_format("You drop %s (%c).", o_name, index_to_label(item));
#endif
/* Update store display */
if (item_pos >= 0)
{
- store_top = (item_pos / 12) * 12;
+ store_top = (item_pos / store_bottom) * store_bottom;
display_inventory();
}
}
/* Describe */
#ifdef JP
- msg_format("%s¤òÃÖ¤¤¤¿¡£(%c)", o_name, index_to_label(item));
+ msg_format("%sを置いた。(%c)", o_name, index_to_label(item));
#else
msg_format("You drop %s (%c).", o_name, index_to_label(item));
#endif
/* Update store display */
if (item_pos >= 0)
{
- store_top = (item_pos / 12) * 12;
+ store_top = (item_pos / store_bottom) * store_bottom;
display_inventory();
}
}
- if (item >= INVEN_RARM) calc_android_exp();
- if ((choice == 0) && ((item == INVEN_RARM) || (item == INVEN_LARM))) kamaenaoshi(item);
+
+ if ((choice == 0) && (item >= INVEN_RARM))
+ {
+ calc_android_exp();
+ kamaenaoshi(item);
+ }
}
-/*
+/*!
+ * @brief 店のアイテムを調べるコマンドのメインルーチン /
* Examine an item in a store -JDL-
+ * @return なし
*/
static void store_examine(void)
{
{
if (cur_store_num == STORE_HOME)
#ifdef JP
- msg_print("²æ¤¬²È¤Ë¤Ï²¿¤âÃÖ¤¤¤Æ¤¢¤ê¤Þ¤»¤ó¡£");
+ msg_print("我が家には何も置いてありません。");
#else
msg_print("Your home is empty.");
#endif
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
i = (st_ptr->stock_num - store_top);
/* And then restrict it to the current page */
- if (i > 12) i = 12;
+ if (i > store_bottom) i = store_bottom;
/* Prompt */
#ifdef JP
-sprintf(out_val, "¤É¤ì¤òÄ´¤Ù¤Þ¤¹¤«¡©");
+sprintf(out_val, "どれを調べますか?");
#else
sprintf(out_val, "Which item do you want to examine? ");
#endif
{
/* This can only happen in the home */
#ifdef JP
-msg_print("¤³¤Î¥¢¥¤¥Æ¥à¤Ë¤Ä¤¤¤ÆÆäËÃΤäƤ¤¤ë¤³¤È¤Ï¤Ê¤¤¡£");
+msg_print("このアイテムについて特に知っていることはない。");
#else
msg_print("You have no special knowledge about that item.");
#endif
/* Describe */
#ifdef JP
-msg_format("%s¤òÄ´¤Ù¤Æ¤¤¤ë...", o_name);
+msg_format("%sを調べている...", o_name);
#else
msg_format("Examining %s...", o_name);
#endif
/* Describe it fully */
- if (!screen_object(o_ptr, TRUE))
+ if (!screen_object(o_ptr, SCROBJ_FORCE_DETAIL))
#ifdef JP
-msg_print("ÆäËÊѤï¤Ã¤¿¤È¤³¤í¤Ï¤Ê¤¤¤è¤¦¤À¡£");
+msg_print("特に変わったところはないようだ。");
#else
msg_print("You see nothing special.");
#endif
}
+/*!
+ * @brief 博物館のアイテムを除去するコマンドのメインルーチン /
+ * Remove an item from museum (Originally from TOband)
+ * @return なし
+ */
+static void museum_remove_object(void)
+{
+ int i;
+ int item;
+ object_type *o_ptr;
+ char o_name[MAX_NLEN];
+ char out_val[160];
+
+ /* Empty? */
+ if (st_ptr->stock_num <= 0)
+ {
+#ifdef JP
+ msg_print("博物館には何も置いてありません。");
+#else
+ msg_print("Museum is empty.");
+#endif
+
+ return;
+ }
+
+ /* Find the number of objects on this and following pages */
+ i = st_ptr->stock_num - store_top;
+
+ /* And then restrict it to the current page */
+ if (i > store_bottom) i = store_bottom;
+
+ /* Prompt */
+#ifdef JP
+ sprintf(out_val, "どのアイテムの展示をやめさせますか?");
+#else
+ sprintf(out_val, "Which item do you want to order to remove? ");
+#endif
+
+ /* Get the item number to be removed */
+ if (!get_stock(&item, out_val, 0, i - 1)) return;
+
+ /* Get the actual index */
+ item = item + store_top;
+
+ /* Get the actual item */
+ o_ptr = &st_ptr->stock[item];
+
+ /* Description */
+ object_desc(o_name, o_ptr, 0);
+
+#ifdef JP
+ msg_print("展示をやめさせたアイテムは二度と見ることはできません!");
+ if (!get_check(format("本当に%sの展示をやめさせますか?", o_name))) return;
+#else
+ msg_print("You cannot see items which is removed from the Museum!");
+ if (!get_check(format("Really order to remove %s from the Museum? ", o_name))) return;
+#endif
+
+ /* Message */
+#ifdef JP
+ msg_format("%sの展示をやめさせた。", o_name);
+#else
+ msg_format("You ordered to remove %s.", o_name);
+#endif
+
+ /* Remove the items from the home */
+ store_item_increase(item, -o_ptr->number);
+ store_item_optimize(item);
+
+ (void)combine_and_reorder_home(STORE_MUSEUM);
+
+ /* The item is gone */
+
+ /* Nothing left */
+ if (st_ptr->stock_num == 0) store_top = 0;
+
+ /* Nothing left on that screen */
+ else if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
+
+ /* Redraw everything */
+ display_inventory();
+
+ return;
+}
+
+
/*
* Hack -- set this to leave the store
*/
static bool leave_store = FALSE;
-/*
+/*!
+ * @brief 店舗処理コマンド選択のメインルーチン /
* Process a command in a store
- *
+ * @return なし
+ * @note
+ * <pre>
* Note that we must allow the use of a few "special" commands
* in the stores which are not allowed in the dungeon, and we
* must disable some commands which are allowed in the dungeon
* but not in the stores, to prevent chaos.
+ * </pre>
*/
static void store_process_command(void)
{
break;
}
- /* ÆüËܸìÈÇÄɲà */
- /* 1 ¥Ú¡¼¥¸Ìá¤ë¥³¥Þ¥ó¥É: ²æ¤¬²È¤Î¥Ú¡¼¥¸¿ô¤¬Â¿¤¤¤Î¤Ç½ÅÊõ¤¹¤ë¤Ï¤º By BUG */
+ /* 日本語版追加 */
+ /* 1 ページ戻るコマンド: 我が家のページ数が多いので重宝するはず By BUG */
case '-':
{
- if (st_ptr->stock_num <= 12) {
+ if (st_ptr->stock_num <= store_bottom) {
#ifdef JP
- msg_print("¤³¤ì¤ÇÁ´Éô¤Ç¤¹¡£");
+ msg_print("これで全部です。");
#else
msg_print("Entire inventory is shown.");
#endif
}
else{
- store_top -= 12;
+ store_top -= store_bottom;
if ( store_top < 0 )
- store_top = ((st_ptr->stock_num - 1 )/12) * 12;
+ store_top = ((st_ptr->stock_num - 1 )/store_bottom) * store_bottom;
if ( (cur_store_num == STORE_HOME) && (powerup_home == FALSE) )
- if ( store_top >= 12 ) store_top = 12;
+ if ( store_top >= store_bottom ) store_top = store_bottom;
display_inventory();
}
break;
/* Browse */
case ' ':
{
- if (st_ptr->stock_num <= 12)
+ if (st_ptr->stock_num <= store_bottom)
{
#ifdef JP
- msg_print("¤³¤ì¤ÇÁ´Éô¤Ç¤¹¡£");
+ msg_print("これで全部です。");
#else
msg_print("Entire inventory is shown.");
#endif
}
else
{
- store_top += 12;
+ store_top += store_bottom;
/*
- * ±£¤·¥ª¥×¥·¥ç¥ó(powerup_home)¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤Ê¤¤¤È¤¤Ï
- * ²æ¤¬²È¤Ç¤Ï 2 ¥Ú¡¼¥¸¤Þ¤Ç¤·¤«É½¼¨¤·¤Ê¤¤
+ * 隠しオプション(powerup_home)がセットされていないときは
+ * 我が家では 2 ページまでしか表示しない
*/
if ((cur_store_num == STORE_HOME) &&
(powerup_home == FALSE) &&
/* Browse a book */
case 'b':
{
- do_cmd_browse();
+ if ( (p_ptr->pclass == CLASS_MINDCRAFTER) ||
+ (p_ptr->pclass == CLASS_BERSERKER) ||
+ (p_ptr->pclass == CLASS_NINJA) ||
+ (p_ptr->pclass == CLASS_MIRROR_MASTER)
+ ) do_cmd_mind_browse();
+ else if (p_ptr->pclass == CLASS_SMITH)
+ do_cmd_kaji(TRUE);
+ else if (p_ptr->pclass == CLASS_MAGIC_EATER)
+ do_cmd_magic_eater(TRUE, FALSE);
+ else if (p_ptr->pclass == CLASS_SNIPER)
+ do_cmd_snipe_browse();
+ else do_cmd_browse();
break;
}
case '=':
{
do_cmd_options();
+ (void)combine_and_reorder_home(STORE_HOME);
+ do_cmd_redraw();
+ display_store();
break;
}
/* Hack -- Unknown command */
default:
{
+ if ((cur_store_num == STORE_MUSEUM) && (command_cmd == 'r'))
+ {
+ museum_remove_object();
+ }
+ else
+ {
#ifdef JP
- msg_print("¤½¤Î¥³¥Þ¥ó¥É¤ÏŹ¤ÎÃæ¤Ç¤Ï»È¤¨¤Þ¤»¤ó¡£");
+ msg_print("そのコマンドは店の中では使えません。");
#else
- msg_print("That command does not work in stores.");
+ msg_print("That command does not work in stores.");
#endif
+ }
break;
}
}
-/*
- * Enter a store, and interact with it.
- *
+/*!
+ * @brief 店舗処理全体のメインルーチン /
+ * Enter a store, and interact with it. *
+ * @return なし
+ * @note
+ * <pre>
* Note that we use the standard "request_command()" function
* to get a command, allowing us to use "command_arg" and all
* command macros and other nifty stuff, but we use the special
* "shopping" argument, to force certain commands to be converted
* into other commands, normally, we convert "p" (pray) and "m"
* (cast magic) into "g" (get), and "s" (search) into "d" (drop).
+ * </pre>
*/
void do_cmd_store(void)
{
int i;
cave_type *c_ptr;
bool need_redraw_store_inv; /* To redraw missiles damage and prices in store */
+ int w, h;
+ /* Get term size */
+ Term_get_size(&w, &h);
+
+ /* Calculate stocks per 1 page */
+ xtra_stock = MIN(14+26, ((h > 24) ? (h - 24) : 0));
+ store_bottom = MIN_STOCK + xtra_stock;
/* Access the player grid */
- c_ptr = &cave[py][px];
+ c_ptr = &cave[p_ptr->y][p_ptr->x];
/* Verify a store */
- if (!have_flag(f_flags_grid(c_ptr), FF_STORE))
+ if (!cave_have_flag_grid(c_ptr, FF_STORE))
{
#ifdef JP
- msg_print("¤³¤³¤Ë¤ÏŹ¤¬¤¢¤ê¤Þ¤»¤ó¡£");
+ msg_print("ここには店がありません。");
#else
msg_print("You see no store here.");
#endif
}
/* Extract the store code */
- which = f_info[c_ptr->feat].power;
+ which = f_info[c_ptr->feat].subtype;
old_town_num = p_ptr->town_num;
if ((which == STORE_HOME) || (which == STORE_MUSEUM)) p_ptr->town_num = 1;
(ironman_shops))
{
#ifdef JP
- msg_print("¥É¥¢¤Ë¸°¤¬¤«¤«¤Ã¤Æ¤¤¤ë¡£");
+ msg_print("ドアに鍵がかかっている。");
#else
msg_print("The doors are locked.");
#endif
/* No automatic command */
command_new = 0;
+ /* Do not expand macros */
+ get_com_no_macros = TRUE;
/* Save the store number */
cur_store_num = which;
/* Start at the beginning */
store_top = 0;
+ play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_BUILD);
+
/* Display the store */
display_store();
prt("", 1, 0);
/* Clear */
- clear_from(20);
+ clear_from(20 + xtra_stock);
/* Basic commands */
#ifdef JP
- prt(" ESC) ·úʪ¤«¤é½Ð¤ë", 21, 0);
+ prt(" ESC) 建物から出る", 21 + xtra_stock, 0);
#else
- prt(" ESC) Exit from Building.", 21, 0);
+ prt(" ESC) Exit from Building.", 21 + xtra_stock, 0);
#endif
/* Browse if necessary */
- if (st_ptr->stock_num > 12)
+ if (st_ptr->stock_num > store_bottom)
{
#ifdef JP
- prt(" -)Á°¥Ú¡¼¥¸", 22, 0);
- prt(" ¥¹¥Ú¡¼¥¹) ¼¡¥Ú¡¼¥¸", 23, 0);
+ prt(" -)前ページ", 22 + xtra_stock, 0);
+ prt(" スペース) 次ページ", 23 + xtra_stock, 0);
#else
- prt(" -) Previous page", 22, 0);
- prt(" SPACE) Next page", 23, 0);
+ prt(" -) Previous page", 22 + xtra_stock, 0);
+ prt(" SPACE) Next page", 23 + xtra_stock, 0);
#endif
}
if (cur_store_num == STORE_HOME)
{
#ifdef JP
- prt("g) ¥¢¥¤¥Æ¥à¤ò¼è¤ë", 21, 27);
- prt("d) ¥¢¥¤¥Æ¥à¤òÃÖ¤¯", 22, 27);
- prt("x) ²È¤Î¥¢¥¤¥Æ¥à¤òÄ´¤Ù¤ë", 23,27);
+ prt("g) アイテムを取る", 21 + xtra_stock, 27);
+ prt("d) アイテムを置く", 22 + xtra_stock, 27);
+ prt("x) 家のアイテムを調べる", 23 + xtra_stock, 27);
#else
- prt("g) Get an item.", 21, 27);
- prt("d) Drop an item.", 22, 27);
- prt("x) eXamine an item in the home.", 23,27);
+ prt("g) Get an item.", 21 + xtra_stock, 27);
+ prt("d) Drop an item.", 22 + xtra_stock, 27);
+ prt("x) eXamine an item in the home.", 23 + xtra_stock, 27);
#endif
-
}
/* Museum commands */
else if (cur_store_num == STORE_MUSEUM)
{
#ifdef JP
- prt("d) ¥¢¥¤¥Æ¥à¤òÃÖ¤¯", 21, 27);
- prt("x) Çîʪ´Û¤Î¥¢¥¤¥Æ¥à¤òÄ´¤Ù¤ë", 23,27);
+ prt("d) アイテムを置く", 21 + xtra_stock, 27);
+ prt("r) アイテムの展示をやめる", 22 + xtra_stock, 27);
+ prt("x) 博物館のアイテムを調べる", 23 + xtra_stock, 27);
#else
- prt("d) Drop an item.", 21, 27);
- prt("x) eXamine an item in the museum.", 23,27);
+ prt("d) Drop an item.", 21 + xtra_stock, 27);
+ prt("r) order to Remove an item.", 22 + xtra_stock, 27);
+ prt("x) eXamine an item in the museum.", 23 + xtra_stock, 27);
#endif
-
}
/* Shop commands XXX XXX XXX */
else
{
#ifdef JP
- prt("p) ¾¦ÉʤòÇ㤦", 21, 30);
- prt("s) ¥¢¥¤¥Æ¥à¤òÇä¤ë", 22, 30);
- prt("x) ¾¦ÉʤòÄ´¤Ù¤ë", 23,30);
+ prt("p) 商品を買う", 21 + xtra_stock, 30);
+ prt("s) アイテムを売る", 22 + xtra_stock, 30);
+ prt("x) 商品を調べる", 23 + xtra_stock,30);
#else
- prt("p) Purchase an item.", 21, 30);
- prt("s) Sell an item.", 22, 30);
- prt("x) eXamine an item in the shop", 23,30);
+ prt("p) Purchase an item.", 21 + xtra_stock, 30);
+ prt("s) Sell an item.", 22 + xtra_stock, 30);
+ prt("x) eXamine an item in the shop", 23 + xtra_stock,30);
#endif
-
}
#ifdef JP
- /* ´ðËÜŪ¤Ê¥³¥Þ¥ó¥É¤ÎÄɲÃɽ¼¨ */
+ /* 基本的なコマンドの追加表示 */
- prt("i/e) »ý¤Áʪ/ÁõÈ÷¤Î°ìÍ÷", 21, 56);
+ prt("i/e) 持ち物/装備の一覧", 21 + xtra_stock, 56);
- if( rogue_like_commands == TRUE )
+ if (rogue_like_commands)
{
- prt("w/T) ÁõÈ÷¤¹¤ë/¤Ï¤º¤¹", 22, 56);
+ prt("w/T) 装備する/はずす", 22 + xtra_stock, 56);
}
else
{
- prt("w/t) ÁõÈ÷¤¹¤ë/¤Ï¤º¤¹", 22, 56);
+ prt("w/t) 装備する/はずす", 22 + xtra_stock, 56);
}
#else
- prt("i/e) Inventry/Equipment list", 21, 56);
+ prt("i/e) Inventry/Equipment list", 21 + xtra_stock, 56);
- if( rogue_like_commands == TRUE )
+ if (rogue_like_commands)
{
- prt("w/T) Wear/Take off equipment", 22, 56);
+ prt("w/T) Wear/Take off equipment", 22 + xtra_stock, 56);
}
else
{
- prt("w/t) Wear/Take off equipment", 22, 56);
+ prt("w/t) Wear/Take off equipment", 22 + xtra_stock, 56);
}
#endif
/* Prompt */
#ifdef JP
- prt("¥³¥Þ¥ó¥É:", 20, 0);
+ prt("コマンド:", 20 + xtra_stock, 0);
#else
- prt("You may: ", 20, 0);
+ prt("You may: ", 20 + xtra_stock, 0);
#endif
/* Message */
#ifdef JP
if (cur_store_num == STORE_MUSEUM)
- msg_print("¥¶¥Ã¥¯¤«¤é¥¢¥¤¥Æ¥à¤¬¤¢¤Õ¤ì¤½¤¦¤Ê¤Î¤Ç¡¢¤¢¤ï¤Æ¤ÆÇîʪ´Û¤«¤é½Ð¤¿...");
+ msg_print("ザックからアイテムがあふれそうなので、あわてて博物館から出た...");
else
- msg_print("¥¶¥Ã¥¯¤«¤é¥¢¥¤¥Æ¥à¤¬¤¢¤Õ¤ì¤½¤¦¤Ê¤Î¤Ç¡¢¤¢¤ï¤Æ¤ÆŹ¤«¤é½Ð¤¿...");
+ msg_print("ザックからアイテムがあふれそうなので、あわてて店から出た...");
#else
if (cur_store_num == STORE_MUSEUM)
msg_print("Your pack is so full that you flee the Museum...");
{
/* Message */
#ifdef JP
- msg_print("¥¶¥Ã¥¯¤«¤é¥¢¥¤¥Æ¥à¤¬¤¢¤Õ¤ì¤½¤¦¤Ê¤Î¤Ç¡¢¤¢¤ï¤Æ¤Æ²È¤«¤é½Ð¤¿...");
+ msg_print("ザックからアイテムがあふれそうなので、あわてて家から出た...");
#else
msg_print("Your pack is so full that you flee your home...");
#endif
/* Give a message */
#ifdef JP
- msg_print("¥¶¥Ã¥¯¤«¤é¥¢¥¤¥Æ¥à¤¬¤¢¤Õ¤ì¤Æ¤·¤Þ¤Ã¤¿¡ª");
+ msg_print("ザックからアイテムがあふれてしまった!");
#else
msg_print("Your pack overflows!");
#endif
/* Message */
#ifdef JP
- msg_format("%s¤¬Íî¤Á¤¿¡£(%c)", o_name, index_to_label(item));
+ msg_format("%sが落ちた。(%c)", o_name, index_to_label(item));
#else
msg_format("You drop %s (%c).", o_name, index_to_label(item));
#endif
/* Redraw the home */
if (item_pos >= 0)
{
- store_top = (item_pos / 12) * 12;
+ store_top = (item_pos / store_bottom) * store_bottom;
display_inventory();
}
}
if (st_ptr->store_open >= turn) leave_store = TRUE;
}
+ select_floor_music();
+
p_ptr->town_num = old_town_num;
/* Free turn XXX XXX XXX */
- energy_use = 100;
+ p_ptr->energy_use = 100;
/* Hack -- Character is no longer in "icky" mode */
/* Hack -- Cancel "see" mode */
command_see = FALSE;
+ /* Allow expanding macros */
+ get_com_no_macros = FALSE;
/* Flush messages XXX XXX XXX */
msg_print(NULL);
-/*
+/*!
+ * @brief 現在の町の店主を交代させる /
* Shuffle one of the stores.
+ * @param which 店舗種類のID
+ * @return なし
*/
void store_shuffle(int which)
{
/* Get the item */
o_ptr = &st_ptr->stock[i];
- if (!(artifact_p(o_ptr) || o_ptr->art_name))
+ if (!object_is_artifact(o_ptr))
{
/* Hack -- Sell all non-artifact old items for "half price" */
o_ptr->discount = 50;
/* Mega-Hack -- Note that the item is "on sale" */
#ifdef JP
- o_ptr->inscription = quark_add("Çä½ÐÃæ");
+ o_ptr->inscription = quark_add("売出中");
#else
o_ptr->inscription = quark_add("on sale");
#endif
}
-/*
+/*!
+ * @brief 店の品揃えを変化させる /
* Maintain the inventory at the stores.
+ * @param town_num 町のID
+ * @param store_num 店舗種類のID
+ * @return なし
*/
void store_maint(int town_num, int store_num)
{
int j;
- int old_rating = rating;
-
cur_store_num = store_num;
/* Ignore home */
/* Acquire some new items */
while (st_ptr->stock_num < j) store_create();
-
-
- /* Hack -- Restore the rating */
- rating = old_rating;
}
-/*
+/*!
+ * @brief 店舗情報を初期化する /
* Initialize the stores
+ * @param town_num 町のID
+ * @param store_num 店舗種類のID
+ * @return なし
*/
void store_init(int town_num, int store_num)
{
}
+/*!
+ * @brief アイテムを町のブラックマーケットに移動させる /
+ * @param o_ptr 移動させたいオブジェクトの構造体参照ポインタ
+ * @return なし
+ */
void move_to_black_market(object_type *o_ptr)
{
/* Not in town */
object_wipe(o_ptr); /* Don't leave a bogus object behind... */
}
+