3 * @brief 店の処理 / Store commands
6 * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke\n
7 * This software may be copied and distributed for educational, research, and\n
8 * not for profit purposes provided that this copyright and statement are\n
9 * included in all such copies.\n
10 * 2014 Deskull rearranged comment for Doxygen.
15 #include "cmd-zapwand.h"
16 #include "cmd-magiceat.h"
23 * @brief 闘技場のモンスターID及び報酬アイテムテーブル /
24 * Store owners (exactly four "possible" owners per store, chosen randomly)
27 * { name, purse, max greed, min greed, haggle_per, tolerance, race, unused }
29 * Lifted extra shopkeepers from CthAngband (don't you just love open source
30 * development? ;-)). Since this gave less than 32 unique names for some
31 * shops, those have their first x names copied to reach 32.
33 * For the weapon and armour shops, several owners have a limit of 5k.
35 * I want to do 50k owners, but the purse is currently s16b. Perhaps
36 * we should just store 1/10th of the purse?
39 const owner_type owners[MAX_STORES][MAX_OWNERS] =
42 /* General store - 32 unique names */
44 Raistlin は dragonlance の powerful wizard 。
45 Rincewind the Chicken は Terry Pratchett の Discworld の登場人物 上記のパロディ?、
46 { "憶病者ラストリン", 200, 175, 108, 4, 12, RACE_HUMAN},
47 { "Raistlin the Chicken", 200, 175, 108, 4, 12, RACE_HUMAN},
51 { "フレンドリーなビルボ", 200, 170, 108, 5, 15, RACE_HOBBIT},
52 { "憶病者リンスウィンド", 200, 175, 108, 4, 12, RACE_HUMAN},
53 { "背の低いサルタン", 300, 170, 107, 5, 15, RACE_GNOME},
54 { "ハンサムなライア=エル", 300, 165, 107, 6, 18, RACE_ELF},
55 { "親切なファリルマウエン", 250, 170, 108, 5, 15, RACE_HOBBIT},
56 { "臆病者ヴォワラン", 500, 175, 108, 4, 12, RACE_HUMAN},
57 { "チビのエラシュナク", 750, 170, 107, 5, 15, RACE_BEASTMAN},
58 { "ハンサムなグラッグ", 1000, 165, 107, 6, 18, RACE_HALF_TITAN},
59 { "ケチなフォロビア", 250, 170, 108, 5, 15, RACE_HUMAN},
60 { "馬鹿のエリス", 500, 175, 108, 4, 12, RACE_HUMAN},
61 { "腹ペコのフィルバート", 750, 170, 107, 5, 15, RACE_VAMPIRE},
62 { "スナーグル・サシグア", 1000, 165, 107, 6, 18, RACE_MIND_FLAYER},
63 { "長死きエロワーズ", 250, 170, 108, 5, 15, RACE_SPECTRE},
64 { "ノロマのフンディ", 500, 175, 108, 4, 12, RACE_ZOMBIE},
65 { "グランサス", 750, 170, 107, 5, 15, RACE_SKELETON},
66 { "丁寧なロラックス", 1000, 165, 107, 6, 18, RACE_VAMPIRE},
67 { "ブッチ", 250, 170, 108, 5, 15, RACE_HALF_ORC},
68 { "美しきエルベレス", 500, 175, 108, 4, 12, RACE_HIGH_ELF},
69 { "こそこそサーレス", 750, 170, 107, 5, 15, RACE_GNOME},
70 { "ナーロック", 1000, 165, 107, 6, 18, RACE_DWARF},
71 { "チビのヘイネッカ", 250, 170, 108, 5, 15, RACE_GNOME},
72 { "きちがいロワラン", 500, 175, 108, 4, 12, RACE_HALF_GIANT},
73 { "毒息のウート", 750, 170, 107, 5, 15, RACE_DRACONIAN},
74 { "でぶっちょアラァカ", 1000, 165, 107, 6, 18, RACE_DRACONIAN},
75 { "低能なプーゴー", 250, 170, 108, 5, 15, RACE_BEASTMAN},
76 { "フェロールフィリアン", 500, 175, 108, 4, 12, RACE_ELF},
77 { "年寄りマロカ", 750, 170, 107, 5, 15, RACE_GNOME},
78 { "勇敢なサシン", 1000, 165, 107, 6, 18, RACE_HALF_GIANT},
79 { "田舎者アビエマール", 250, 170, 108, 5, 15, RACE_HUMAN},
80 { "貧乏なハーク", 500, 175, 108, 4, 12, RACE_HALF_ORC},
81 { "みじめなソアリン", 750, 170, 107, 5, 15, RACE_ZOMBIE},
82 { "質素なメルラ", 1000, 165, 107, 6, 18, RACE_ELF},
84 { "Bilbo the Friendly", 200, 170, 108, 5, 15, RACE_HOBBIT},
85 { "Rincewind the Chicken", 200, 175, 108, 4, 12, RACE_HUMAN},
86 { "Sultan the Midget", 300, 170, 107, 5, 15, RACE_GNOME},
87 { "Lyar-el the Comely", 300, 165, 107, 6, 18, RACE_ELF},
88 { "Falilmawen the Friendly", 250, 170, 108, 5, 15, RACE_HOBBIT},
89 { "Voirin the Cowardly", 500, 175, 108, 4, 12, RACE_HUMAN},
90 { "Erashnak the Midget", 750, 170, 107, 5, 15, RACE_BEASTMAN},
91 { "Grug the Comely", 1000, 165, 107, 6, 18, RACE_HALF_TITAN},
92 { "Forovir the Cheap", 250, 170, 108, 5, 15, RACE_HUMAN},
93 { "Ellis the Fool", 500, 175, 108, 4, 12, RACE_HUMAN},
94 { "Filbert the Hungry", 750, 170, 107, 5, 15, RACE_VAMPIRE},
95 { "Fthnargl Psathiggua", 1000, 165, 107, 6, 18, RACE_MIND_FLAYER},
96 { "Eloise Long-Dead", 250, 170, 108, 5, 15, RACE_SPECTRE},
97 { "Fundi the Slow", 500, 175, 108, 4, 12, RACE_ZOMBIE},
98 { "Granthus", 750, 170, 107, 5, 15, RACE_SKELETON},
99 { "Lorax the Suave", 1000, 165, 107, 6, 18, RACE_VAMPIRE},
100 { "Butch", 250, 170, 108, 5, 15, RACE_HALF_ORC},
101 { "Elbereth the Beautiful", 500, 175, 108, 4, 12, RACE_HIGH_ELF},
102 { "Sarleth the Sneaky", 750, 170, 107, 5, 15, RACE_GNOME},
103 { "Narlock", 1000, 165, 107, 6, 18, RACE_DWARF},
104 { "Haneka the Small", 250, 170, 108, 5, 15, RACE_GNOME},
105 { "Loirin the Mad", 500, 175, 108, 4, 12, RACE_HALF_GIANT},
106 { "Wuto Poisonbreath", 750, 170, 107, 5, 15, RACE_DRACONIAN},
107 { "Araaka the Rotund", 1000, 165, 107, 6, 18, RACE_DRACONIAN},
108 { "Poogor the Dumb", 250, 170, 108, 5, 15, RACE_BEASTMAN},
109 { "Felorfiliand", 500, 175, 108, 4, 12, RACE_ELF},
110 { "Maroka the Aged", 750, 170, 107, 5, 15, RACE_GNOME},
111 { "Sasin the Bold", 1000, 165, 107, 6, 18, RACE_HALF_GIANT},
112 { "Abiemar the Peasant", 250, 170, 108, 5, 15, RACE_HUMAN},
113 { "Hurk the Poor", 500, 175, 108, 4, 12, RACE_HALF_ORC},
114 { "Soalin the Wretched", 750, 170, 107, 5, 15, RACE_ZOMBIE},
115 { "Merulla the Humble", 1000, 165, 107, 6, 18, RACE_ELF},
119 /* Armoury - 28 unique names */
121 { "醜悪コン=ダー", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
122 { "頑固者ダーグ=ロウ", 10000, 190, 111, 4, 9, RACE_HUMAN},
123 { "賢者デカド", 25000, 200, 112, 4, 10, RACE_DUNADAN},
124 { "鍛冶屋のウィーランド", 30000, 200, 112, 4, 5, RACE_DWARF},
125 { "醜悪コン=ダー", 10000, 210, 115, 5, 7, RACE_HALF_ORC},
126 { "頑固者ダーグ=ロウ", 15000, 190, 111, 4, 9, RACE_HUMAN},
127 { "ハンサムなデカド", 25000, 200, 112, 4, 10, RACE_AMBERITE},
128 { "エロー・ドラゴンスケイル", 30000, 200, 112, 4, 5, RACE_ELF},
129 { "デリカトス", 10000, 210, 115, 5, 7, RACE_SPRITE},
130 { "巨大なグルース", 15000, 190, 111, 4, 9, RACE_HALF_GIANT},
131 { "アニムス", 25000, 200, 112, 4, 10, RACE_GOLEM},
132 { "マルヴァス", 30000, 200, 112, 4, 5, RACE_HALF_TITAN},
133 { "セラクシス", 10000, 210, 115, 5, 7, RACE_ZOMBIE},
134 { "デス・チル", 5000, 190, 111, 4, 9, RACE_SPECTRE},
135 { "微かなドリオス", 25000, 200, 112, 4, 10, RACE_SPECTRE},
136 { "冷たいバスリック", 30000, 200, 112, 4, 5, RACE_VAMPIRE},
137 { "冷酷ヴェンジェラ", 10000, 210, 115, 5, 7, RACE_HALF_TROLL},
138 { "強者ウィラナ", 15000, 190, 111, 4, 9, RACE_HUMAN},
139 { "ヨジョ二世", 25000, 200, 112, 4, 10, RACE_DWARF},
140 { "優しいラナラー", 30000, 200, 112, 4, 5, RACE_AMBERITE},
141 { "不浄のホルバグ", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
142 { "テレパスのエレレン", 15000, 190, 111, 4, 9, RACE_DARK_ELF},
143 { "イスドリリアス", 25000, 200, 112, 4, 10, RACE_SPRITE},
144 { "一つ目ヴェグナー", 5000, 200, 112, 4, 5, RACE_CYCLOPS},
145 { "混沌のロディッシュ", 10000, 210, 115, 5, 7, RACE_BEASTMAN},
146 { "剣豪ヘジン", 15000, 190, 111, 4, 9, RACE_NIBELUNG},
147 { "ずる屋のエルベレリス", 10000, 200, 112, 4, 10, RACE_DARK_ELF},
148 { "インプのザサス", 30000, 200, 112, 4, 5, RACE_IMP},
149 { "醜悪コン=ダー", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
150 { "頑固者ダーグ=ロウ", 10000, 190, 111, 4, 9, RACE_HUMAN},
151 { "ハンサムなデカド", 25000, 200, 112, 4, 10, RACE_AMBERITE},
152 { "鍛冶屋のウィーランド", 30000, 200, 112, 4, 5, RACE_DWARF},
154 { "Kon-Dar the Ugly", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
155 { "Darg-Low the Grim", 10000, 190, 111, 4, 9, RACE_HUMAN},
156 { "Decado the Handsome", 25000, 200, 112, 4, 10, RACE_DUNADAN},
157 { "Wieland the Smith", 30000, 200, 112, 4, 5, RACE_DWARF},
158 { "Kon-Dar the Ugly", 10000, 210, 115, 5, 7, RACE_HALF_ORC},
159 { "Darg-Low the Grim", 15000, 190, 111, 4, 9, RACE_HUMAN},
160 { "Decado the Handsome", 25000, 200, 112, 4, 10, RACE_AMBERITE},
161 { "Elo Dragonscale", 30000, 200, 112, 4, 5, RACE_ELF},
162 { "Delicatus", 10000, 210, 115, 5, 7, RACE_SPRITE},
163 { "Gruce the Huge", 15000, 190, 111, 4, 9, RACE_HALF_GIANT},
164 { "Animus", 25000, 200, 112, 4, 10, RACE_GOLEM},
165 { "Malvus", 30000, 200, 112, 4, 5, RACE_HALF_TITAN},
166 { "Selaxis", 10000, 210, 115, 5, 7, RACE_ZOMBIE},
167 { "Deathchill", 5000, 190, 111, 4, 9, RACE_SPECTRE},
168 { "Drios the Faint", 25000, 200, 112, 4, 10, RACE_SPECTRE},
169 { "Bathric the Cold", 30000, 200, 112, 4, 5, RACE_VAMPIRE},
170 { "Vengella the Cruel", 10000, 210, 115, 5, 7, RACE_HALF_TROLL},
171 { "Wyrana the Mighty", 15000, 190, 111, 4, 9, RACE_HUMAN},
172 { "Yojo II", 25000, 200, 112, 4, 10, RACE_DWARF},
173 { "Ranalar the Sweet", 30000, 200, 112, 4, 5, RACE_AMBERITE},
174 { "Horbag the Unclean", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
175 { "Elelen the Telepath", 15000, 190, 111, 4, 9, RACE_DARK_ELF},
176 { "Isedrelias", 25000, 200, 112, 4, 10, RACE_SPRITE},
177 { "Vegnar One-eye", 5000, 200, 112, 4, 5, RACE_CYCLOPS},
178 { "Rodish the Chaotic", 10000, 210, 115, 5, 7, RACE_BEASTMAN},
179 { "Hesin Swordmaster", 15000, 190, 111, 4, 9, RACE_NIBELUNG},
180 { "Elvererith the Cheat", 10000, 200, 112, 4, 10, RACE_DARK_ELF},
181 { "Zzathath the Imp", 30000, 200, 112, 4, 5, RACE_IMP},
182 { "Kon-Dar the Ugly", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
183 { "Darg-Low the Grim", 10000, 190, 111, 4, 9, RACE_HUMAN},
184 { "Decado the Handsome", 25000, 200, 112, 4, 10, RACE_AMBERITE},
185 { "Wieland the Smith", 30000, 200, 112, 4, 5, RACE_DWARF},
190 /* Weapon Smith - 28 unique names */
192 { "残忍なるアーノルド", 5000, 210, 115, 6, 6, RACE_HALF_TROLL},
193 { "獣殺しのアーンダル", 10000, 185, 110, 5, 9, RACE_HALF_ELF},
194 { "獣マスターのエディー", 25000, 190, 115, 5, 7, RACE_HOBBIT},
195 { "竜殺しのオグライン", 30000, 195, 112, 4, 8, RACE_DWARF},
196 { "熟練者ドリュー", 10000, 210, 115, 6, 6, RACE_HUMAN},
197 { "龍の子オラックス", 15000, 185, 110, 5, 9, RACE_DRACONIAN},
198 { "病気持ちのアンスラックス", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
199 { "頑丈者アルコス", 30000, 195, 112, 4, 8, RACE_DWARF},
200 { "腐れ者のサリアス", 5000, 210, 115, 6, 6, RACE_ZOMBIE},
201 { "晒し骨のトゥエシク", 15000, 185, 110, 5, 9, RACE_SKELETON},
202 { "ビリオス", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
203 { "ファスガル", 30000, 195, 112, 4, 8, RACE_ZOMBIE},
204 { "パラディンのエレフリス", 10000, 210, 115, 6, 6, RACE_BARBARIAN},
205 { "キ'トリッ'ク", 15000, 185, 110, 5, 9, RACE_KLACKON},
206 { "蜘蛛の友ドゥロカス", 25000, 190, 115, 5, 7, RACE_DARK_ELF},
207 { "巨人殺しのフングス", 30000, 195, 112, 4, 8, RACE_DWARF},
208 { "デランサ", 10000, 210, 115, 6, 6, RACE_ELF},
209 { "レンジャーのソルビスタニ", 15000, 185, 110, 5, 9, RACE_HALF_ELF},
210 { "ノロマのゾリル", 25000, 190, 115, 5, 7, RACE_GOLEM},
211 { "イーオン・フラックス", 20000, 195, 112, 4, 8, RACE_HALF_ELF},
212 { "強者ナドック", 10000, 210, 115, 6, 6, RACE_HOBBIT},
213 { "弱虫エラモグ", 15000, 185, 110, 5, 9, RACE_KOBOLD},
214 { "公正なエオウィリス", 25000, 190, 115, 5, 7, RACE_VAMPIRE},
215 { "バルログ殺しのヒュイモグ", 30000, 195, 112, 4, 8, RACE_HALF_ORC},
216 { "冷酷ピーダス", 5000, 210, 115, 6, 6, RACE_HUMAN},
217 { "ヴァモグ スレイヤー", 15000, 185, 110, 5, 9, RACE_HALF_OGRE},
218 { "性悪フーシュナク", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
219 { "舞闘バレン", 30000, 195, 112, 4, 8, RACE_BARBARIAN},
220 { "残忍なるアーノルド", 5000, 210, 115, 6, 6, RACE_BARBARIAN},
221 { "獣殺しのアーンダル", 10000, 185, 110, 5, 9, RACE_HALF_ELF},
222 { "ビーストマスター・エディー", 25000, 190, 115, 5, 7, RACE_HALF_ORC},
223 { "竜殺しのオグライン", 30000, 195, 112, 4, 8, RACE_DWARF},
225 { "Arnold the Beastly", 5000, 210, 115, 6, 6, RACE_BARBARIAN},
226 { "Arndal Beast-Slayer", 10000, 185, 110, 5, 9, RACE_HALF_ELF},
227 { "Eddie Beast-Master", 25000, 190, 115, 5, 7, RACE_HALF_ORC},
228 { "Oglign Dragon-Slayer", 30000, 195, 112, 4, 8, RACE_DWARF},
229 { "Drew the Skilled", 10000, 210, 115, 6, 6, RACE_HUMAN},
230 { "Orrax Dragonson", 15000, 185, 110, 5, 9, RACE_DRACONIAN},
231 { "Anthrax Disease-Carrier", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
232 { "Arkhoth the Stout", 30000, 195, 112, 4, 8, RACE_DWARF},
233 { "Sarlyas the Rotten", 5000, 210, 115, 6, 6, RACE_ZOMBIE},
234 { "Tuethic Bare-Bones", 15000, 185, 110, 5, 9, RACE_SKELETON},
235 { "Bilious", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
236 { "Fasgul", 30000, 195, 112, 4, 8, RACE_ZOMBIE},
237 { "Ellefris the Paladin", 10000, 210, 115, 6, 6, RACE_BARBARIAN},
238 { "K'trrik'k", 15000, 185, 110, 5, 9, RACE_KLACKON},
239 { "Drocus Spiderfriend", 25000, 190, 115, 5, 7, RACE_DARK_ELF},
240 { "Fungus Giant-Slayer", 30000, 195, 112, 4, 8, RACE_DWARF},
241 { "Delantha", 10000, 210, 115, 6, 6, RACE_ELF},
242 { "Solvistani the Ranger", 15000, 185, 110, 5, 9, RACE_HALF_ELF},
243 { "Xoril the Slow", 25000, 190, 115, 5, 7, RACE_GOLEM},
244 { "Aeon Flux", 20000, 195, 112, 4, 8, RACE_HALF_ELF},
245 { "Nadoc the Strong", 10000, 210, 115, 6, 6, RACE_HOBBIT},
246 { "Eramog the Weak", 15000, 185, 110, 5, 9, RACE_KOBOLD},
247 { "Eowilith the Fair", 25000, 190, 115, 5, 7, RACE_VAMPIRE},
248 { "Huimog Balrog-Slayer", 30000, 195, 112, 4, 8, RACE_HALF_ORC},
249 { "Peadus the Cruel", 5000, 210, 115, 6, 6, RACE_HUMAN},
250 { "Vamog Slayer", 15000, 185, 110, 5, 9, RACE_HALF_OGRE},
251 { "Hooshnak the Vicious", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
252 { "Balenn War-Dancer", 30000, 195, 112, 4, 8, RACE_BARBARIAN},
253 { "Arnold the Beastly", 5000, 210, 115, 6, 6, RACE_BARBARIAN},
254 { "Arndal Beast-Slayer", 10000, 185, 110, 5, 9, RACE_HALF_ELF},
255 { "Eddie Beast-Master", 25000, 190, 115, 5, 7, RACE_HALF_ORC},
256 { "Oglign Dragon-Slayer", 30000, 195, 112, 4, 8, RACE_DWARF},
260 /* Temple - 22 unique names */
262 { "質素なルードヴィヒ", 5000, 175, 109, 6, 15, RACE_HUMAN},
263 { "パラディンのガンナー", 10000, 185, 110, 5, 23, RACE_HUMAN},
264 { "選ばれしトリン", 25000, 180, 107, 6, 20, RACE_ELF},
265 { "賢明なるサラストロ", 30000, 185, 109, 5, 15, RACE_DWARF},
266 { "パーシヴァル卿", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
267 { "神聖なるアセナス", 30000, 185, 109, 5, 15, RACE_HUMAN},
268 { "マッキノン", 10000, 175, 109, 6, 15, RACE_HUMAN},
269 { "謹み婦人", 15000, 185, 110, 5, 23, RACE_HIGH_ELF},
270 { "ドルイドのハシュニック", 25000, 180, 107, 6, 20, RACE_HOBBIT},
271 { "フィナク", 30000, 185, 109, 5, 15, RACE_YEEK},
272 { "クリキック", 10000, 175, 109, 6, 15, RACE_KLACKON},
273 { "荒くれ者モリヴァル", 15000, 185, 110, 5, 23, RACE_ELF},
274 { "暗きホシャック", 25000, 180, 107, 6, 20, RACE_IMP},
275 { "賢者アタール", 30000, 185, 109, 5, 15, RACE_HUMAN},
276 { "清きイベニッド", 10000, 175, 109, 6, 15, RACE_HUMAN},
277 { "エリディシュ", 15000, 185, 110, 5, 23, RACE_HALF_TROLL},
278 { "呪術師ヴルドゥシュ", 25000, 180, 107, 6, 20, RACE_HALF_OGRE},
279 { "狂戦士ハオブ", 30000, 185, 109, 5, 15, RACE_BARBARIAN},
280 { "若きプルーグディシュ", 10000, 175, 109, 6, 15, RACE_HALF_OGRE},
281 { "きちがいラムワイズ", 15000, 185, 110, 5, 23, RACE_YEEK},
282 { "有徳者ムワート", 25000, 180, 107, 6, 20, RACE_KOBOLD},
283 { "弱虫ダードバード", 30000, 185, 109, 5, 15, RACE_SPECTRE},
284 { "質素なルードヴィヒ", 5000, 175, 109, 6, 15, RACE_HUMAN},
285 { "パラディンのガンナー", 10000, 185, 110, 5, 23, RACE_HUMAN},
286 { "選ばれしトリン", 25000, 180, 107, 6, 20, RACE_ELF},
287 { "賢明なるサラストロ", 30000, 185, 109, 5, 15, RACE_DWARF},
288 { "パーシヴァル卿", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
289 { "神聖なるアセナス", 30000, 185, 109, 5, 15, RACE_HUMAN},
290 { "マッキノン", 10000, 175, 109, 6, 15, RACE_HUMAN},
291 { "謹み婦人", 15000, 185, 110, 5, 23, RACE_HIGH_ELF},
292 { "ドルイドのハシュニック", 25000, 180, 107, 6, 20, RACE_HOBBIT},
293 { "フィナク", 30000, 185, 109, 5, 15, RACE_YEEK},
295 { "Ludwig the Humble", 5000, 175, 109, 6, 15, RACE_DWARF},
296 { "Gunnar the Paladin", 10000, 185, 110, 5, 23, RACE_HALF_TROLL},
297 { "Torin the Chosen", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
298 { "Sarastro the Wise", 30000, 185, 109, 5, 15, RACE_HUMAN},
299 { "Sir Parsival the Pure", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
300 { "Asenath the Holy", 30000, 185, 109, 5, 15, RACE_HUMAN},
301 { "McKinnon", 10000, 175, 109, 6, 15, RACE_HUMAN},
302 { "Mistress Chastity", 15000, 185, 110, 5, 23, RACE_HIGH_ELF},
303 { "Hashnik the Druid", 25000, 180, 107, 6, 20, RACE_HOBBIT},
304 { "Finak", 30000, 185, 109, 5, 15, RACE_YEEK},
305 { "Krikkik", 10000, 175, 109, 6, 15, RACE_KLACKON},
306 { "Morival the Wild", 15000, 185, 110, 5, 23, RACE_ELF},
307 { "Hoshak the Dark", 25000, 180, 107, 6, 20, RACE_IMP},
308 { "Atal the Wise", 30000, 185, 109, 5, 15, RACE_HUMAN},
309 { "Ibenidd the Chaste", 10000, 175, 109, 6, 15, RACE_HUMAN},
310 { "Eridish", 15000, 185, 110, 5, 23, RACE_HALF_TROLL},
311 { "Vrudush the Shaman", 25000, 180, 107, 6, 20, RACE_HALF_OGRE},
312 { "Haob the Berserker", 30000, 185, 109, 5, 15, RACE_BARBARIAN},
313 { "Proogdish the Youthfull", 10000, 175, 109, 6, 15, RACE_HALF_OGRE},
314 { "Lumwise the Mad", 15000, 185, 110, 5, 23, RACE_YEEK},
315 { "Muirt the Virtuous", 25000, 180, 107, 6, 20, RACE_KOBOLD},
316 { "Dardobard the Weak", 30000, 185, 109, 5, 15, RACE_SPECTRE},
317 { "Ludwig the Humble", 5000, 175, 109, 6, 15, RACE_DWARF},
318 { "Gunnar the Paladin", 10000, 185, 110, 5, 23, RACE_HALF_TROLL},
319 { "Torin the Chosen", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
320 { "Sarastro the Wise", 30000, 185, 109, 5, 15, RACE_HUMAN},
321 { "Sir Parsival the Pure", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
322 { "Asenath the Holy", 30000, 185, 109, 5, 15, RACE_HUMAN},
323 { "McKinnon", 10000, 175, 109, 6, 15, RACE_HUMAN},
324 { "Mistress Chastity", 15000, 185, 110, 5, 23, RACE_HIGH_ELF},
325 { "Hashnik the Druid", 25000, 180, 107, 6, 20, RACE_HOBBIT},
326 { "Finak", 30000, 185, 109, 5, 15, RACE_YEEK},
330 /* Alchemist - 26 unique names */
332 { "化学者マウザー", 10000, 190, 111, 5, 8, RACE_HALF_ELF},
333 { "カオスのウィズル", 10000, 190, 110, 6, 8, RACE_HOBBIT},
334 { "強欲ミダス", 15000, 200, 116, 6, 9, RACE_GNOME},
335 { "貧弱ジャ=ファー", 15000, 220, 111, 4, 9, RACE_ELF},/*FIRST*/
336 { "カカルラカカル", 15000, 200, 116, 6, 9, RACE_KLACKON},
337 { "錬金術師ジャル=エス", 15000, 220, 111, 4, 9, RACE_ELF},
338 { "用心深いファネラス", 10000, 190, 111, 5, 8, RACE_DWARF},
339 { "キチガイのルンシー", 10000, 190, 110, 6, 8, RACE_HUMAN},
340 { "グランブルワース", 15000, 200, 116, 6, 9, RACE_GNOME},
341 { "フリッター", 15000, 220, 111, 4, 9, RACE_SPRITE},
342 { "ザリルス", 10000, 190, 111, 5, 8, RACE_HUMAN},
343 { "古きエグバート", 10000, 190, 110, 6, 8, RACE_DWARF},
344 { "誇り高きヴァリンドラ", 15000, 200, 116, 6, 9, RACE_HIGH_ELF},
345 { "錬金術師タエン", 15000, 220, 111, 4, 9, RACE_HUMAN},
346 { "巧言カイド", 10000, 190, 111, 5, 8, RACE_VAMPIRE},
347 { "暗きフリア", 10000, 190, 110, 6, 8, RACE_NIBELUNG},
348 { "質素なドムリ", 15000, 200, 116, 6, 9, RACE_DWARF},
349 { "魔の子ヤァジュッカ", 15000, 220, 111, 4, 9, RACE_IMP},
350 { "薬草師ジェララルドール", 10000, 190, 111, 5, 8, RACE_HIGH_ELF},
351 { "賢者オレラルダン", 10000, 190, 110, 6, 8, RACE_BARBARIAN},
352 { "デモニシストのフゾグロ", 15000, 200, 116, 6, 9, RACE_IMP},
353 { "錬金術師ドゥリアシュ", 15000, 220, 111, 4, 9, RACE_HALF_ORC},
354 { "強者ネリア", 10000, 190, 111, 5, 8, RACE_CYCLOPS},
355 { "辛口リグナス", 10000, 190, 110, 6, 8, RACE_HALF_ORC},
356 { "ティルバ", 15000, 200, 116, 6, 9, RACE_HOBBIT},
357 { "金持ちミリルドリック", 15000, 220, 111, 4, 9, RACE_HUMAN},
359 { "科学者マウザー", 10000, 190, 111, 5, 8, RACE_HALF_ELF},
360 { "カオスのウィズル", 10000, 190, 110, 6, 8, RACE_HOBBIT},
361 { "強欲ミダス", 15000, 200, 116, 6, 9, RACE_GNOME},
362 { "錬金術師ジャ=ファー", 15000, 220, 111, 4, 9, RACE_ELF},
363 { "カカルラカカル", 15000, 200, 116, 6, 9, RACE_KLACKON},
364 { "錬金術師ジャル=エス", 15000, 220, 111, 4, 9, RACE_ELF},
366 { "Mauser the Chemist", 10000, 190, 111, 5, 8, RACE_HALF_ELF},
367 { "Wizzle the Chaotic", 10000, 190, 110, 6, 8, RACE_HOBBIT},
368 { "Midas the Greedy", 15000, 200, 116, 6, 9, RACE_GNOME},
369 { "Ja-Far the Alchemist", 15000, 220, 111, 4, 9, RACE_ELF},
370 { "Kakalrakakal", 15000, 200, 116, 6, 9, RACE_KLACKON},
371 { "Jal-Eth the Alchemist", 15000, 220, 111, 4, 9, RACE_ELF},
372 { "Fanelath the Cautious", 10000, 190, 111, 5, 8, RACE_DWARF},
373 { "Runcie the Insane", 10000, 190, 110, 6, 8, RACE_HUMAN},
374 { "Grumbleworth", 15000, 200, 116, 6, 9, RACE_GNOME},
375 { "Flitter", 15000, 220, 111, 4, 9, RACE_SPRITE},
376 { "Xarillus", 10000, 190, 111, 5, 8, RACE_HUMAN},
377 { "Egbert the Old", 10000, 190, 110, 6, 8, RACE_DWARF},
378 { "Valindra the Proud", 15000, 200, 116, 6, 9, RACE_HIGH_ELF},
379 { "Taen the Alchemist", 15000, 220, 111, 4, 9, RACE_HUMAN},
380 { "Cayd the Sweet", 10000, 190, 111, 5, 8, RACE_VAMPIRE},
381 { "Fulir the Dark", 10000, 190, 110, 6, 8, RACE_NIBELUNG},
382 { "Domli the Humble", 15000, 200, 116, 6, 9, RACE_DWARF},
383 { "Yaarjukka Demonspawn", 15000, 220, 111, 4, 9, RACE_IMP},
384 { "Gelaraldor the Herbmaster", 10000, 190, 111, 5, 8, RACE_HIGH_ELF},
385 { "Olelaldan the Wise", 10000, 190, 110, 6, 8, RACE_BARBARIAN},
386 { "Fthoglo the Demonicist", 15000, 200, 116, 6, 9, RACE_IMP},
387 { "Dridash the Alchemist", 15000, 220, 111, 4, 9, RACE_HALF_ORC},
388 { "Nelir the Strong", 10000, 190, 111, 5, 8, RACE_CYCLOPS},
389 { "Lignus the Pungent", 10000, 190, 110, 6, 8, RACE_HALF_ORC},
390 { "Tilba", 15000, 200, 116, 6, 9, RACE_HOBBIT},
391 { "Myrildric the Wealthy", 15000, 220, 111, 4, 9, RACE_HUMAN},
393 { "Mauser the Chemist", 10000, 190, 111, 5, 8, RACE_HALF_ELF},
394 { "Wizzle the Chaotic", 10000, 190, 110, 6, 8, RACE_HOBBIT},
395 { "Midas the Greedy", 15000, 200, 116, 6, 9, RACE_GNOME},
396 { "Ja-Far the Alchemist", 15000, 220, 111, 4, 9, RACE_ELF},
397 { "Kakalrakakal", 15000, 200, 116, 6, 9, RACE_KLACKON},
398 { "Jal-Eth the Alchemist", 15000, 220, 111, 4, 9, RACE_ELF},
403 /* Magic Shop - 23 unique names */
405 { "ソーサラーのロ=パン", 20000, 200, 110, 7, 8, RACE_HALF_ELF},
406 { "偉大なるブガービイ", 20000, 215, 113, 6, 10, RACE_GNOME},
407 { "イェンダーの魔法使い", 30000, 200, 110, 7, 10, RACE_HUMAN},
408 { "死霊使いリャク",30000, 175, 110, 5, 11, RACE_HIGH_ELF},
409 { "魔術師スキドゥニー", 15000, 200, 110, 7, 8, RACE_HALF_ELF},
410 { "幻術師キリア", 30000, 200, 110, 7, 10, RACE_HUMAN},
411 { "死霊術師ニッキ", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
412 { "ソロストラン", 15000, 200, 110, 7, 8, RACE_SPRITE},
413 { "烏賊口アチシェ", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
414 { "貴族のカザ", 30000, 200, 110, 7, 10, RACE_HIGH_ELF},
415 { "暗きファジル", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
416 { "偉大なるケルドーン", 15000, 200, 110, 7, 8, RACE_DWARF},
417 { "フィランスロプス", 20000, 215, 113, 6, 10, RACE_HOBBIT},
418 { "魔女のアグナー", 30000, 200, 110, 7, 10, RACE_HUMAN},
419 { "死霊術師ビュリアンス", 30000, 175, 110, 5, 11, RACE_BEASTMAN},
420 { "ハイメイジのヴイラク", 15000, 200, 110, 7, 8, RACE_BEASTMAN},
421 { "知恵者マディッシュ", 20000, 215, 113, 6, 10, RACE_BEASTMAN},
422 { "ファレブリンボール", 30000, 200, 110, 7, 10, RACE_HIGH_ELF},
423 { "陰険フェリル=ガンド", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
424 { "呪術師サレゴード", 15000, 200, 110, 7, 8, RACE_BARBARIAN},
425 { "神秘家クトゥアロス", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
426 { "幻術師イベリ", 30000, 200, 110, 7, 10, RACE_SKELETON},
427 { "死霊術師ヘトー", 30000, 175, 110, 5, 11, RACE_YEEK},
428 { "魔術師ロ=パン", 20000, 200, 110, 7, 8, RACE_HALF_ELF},
429 { "偉大なるブガービイ", 20000, 215, 113, 6, 10, RACE_GNOME},
430 { "イェンダーの魔法使い", 30000, 200, 110, 7, 10, RACE_HUMAN},
431 { "死霊術師リャク", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
432 { "魔術師スキドゥニー", 15000, 200, 110, 7, 8, RACE_HALF_ELF},
433 { "幻術師キリア", 30000, 200, 110, 7, 10, RACE_HUMAN},
434 { "死霊術師ニッキ", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
435 { "ソロストラン", 15000, 200, 110, 7, 8, RACE_SPRITE},
436 { "烏賊口アチシェ", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
438 { "Lo Pan the Sorcerer", 20000, 200, 110, 7, 8, RACE_HALF_ELF},
439 { "Buggerby the Great", 20000, 215, 113, 6, 10, RACE_GNOME},
440 { "The Wizard of Yendor", 30000, 200, 110, 7, 10, RACE_HUMAN},
441 { "Rjak the Necromancer", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
442 { "Skidney the Sorcerer", 15000, 200, 110, 7, 8, RACE_HALF_ELF},
443 { "Kyria the Illusionist", 30000, 200, 110, 7, 10, RACE_HUMAN},
444 { "Nikki the Necromancer", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
445 { "Solostoran", 15000, 200, 110, 7, 8, RACE_SPRITE},
446 { "Achshe the Tentacled", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
447 { "Kaza the Noble", 30000, 200, 110, 7, 10, RACE_HIGH_ELF},
448 { "Fazzil the Dark", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
449 { "Keldorn the Grand", 15000, 200, 110, 7, 8, RACE_DWARF},
450 { "Philanthropus", 20000, 215, 113, 6, 10, RACE_HOBBIT},
451 { "Agnar the Enchantress", 30000, 200, 110, 7, 10, RACE_HUMAN},
452 { "Buliance the Necromancer", 30000, 175, 110, 5, 11, RACE_BEASTMAN},
453 { "Vuirak the High-Mage", 15000, 200, 110, 7, 8, RACE_BEASTMAN},
454 { "Madish the Smart", 20000, 215, 113, 6, 10, RACE_BEASTMAN},
455 { "Falebrimbor", 30000, 200, 110, 7, 10, RACE_HIGH_ELF},
456 { "Felil-Gand the Subtle", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
457 { "Thalegord the Shaman", 15000, 200, 110, 7, 8, RACE_BARBARIAN},
458 { "Cthoaloth the Mystic", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
459 { "Ibeli the Illusionist", 30000, 200, 110, 7, 10, RACE_SKELETON},
460 { "Heto the Necromancer", 30000, 175, 110, 5, 11, RACE_YEEK},
461 { "Lo Pan the Sorcerer", 20000, 200, 110, 7, 8, RACE_HALF_ELF},
462 { "Buggerby the Great", 20000, 215, 113, 6, 10, RACE_GNOME},
463 { "The Wizard of Yendor", 30000, 200, 110, 7, 10, RACE_HUMAN},
464 { "Rjak the Necromancer", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
465 { "Skidney the Sorcerer", 15000, 200, 110, 7, 8, RACE_HALF_ELF},
466 { "Kyria the Illusionist", 30000, 200, 110, 7, 10, RACE_HUMAN},
467 { "Nikki the Necromancer", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
468 { "Solostoran", 15000, 200, 110, 7, 8, RACE_SPRITE},
469 { "Achshe the Tentacled", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
473 /* Black Market - 32 unique names */
475 { "ガリー=ギガズ", 20000, 250, 150, 10, 5, RACE_HALF_TROLL},
476 { "ゴブリンのヒストーア", 20000, 250, 150, 10, 5, RACE_HALF_ORC},
477 { "フェレンギ人クアーク", 30000, 250, 150, 10, 5, RACE_HUMAN},
478 { "公正なる(?)トッピ", 30000, 250, 150, 10, 5, RACE_ELF},
479 { "死人ヴァッサ", 20000, 250, 150, 10, 5, RACE_ZOMBIE},
480 { "裏切り者カイン", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
481 { "ブボニカス", 30000, 250, 150, 10, 5, RACE_BEASTMAN},
482 { "コープスライト", 30000, 250, 150, 10, 5, RACE_SPECTRE},
483 { "血に飢えしパリッシュ", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
484 { "ヴァイル", 20000, 250, 150, 10, 5, RACE_SKELETON},
485 { "信頼のプレンティス", 30000, 250, 150, 10, 5, RACE_SKELETON},
486 { "人間殺しのグリエラ", 30000, 250, 150, 10, 5, RACE_IMP},
487 { "エンジェル", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
488 { "水膨れフロツァム", 20000, 250, 150, 10, 5, RACE_ZOMBIE},
489 { "ニーヴァル", 30000, 250, 150, 10, 5, RACE_VAMPIRE},
490 { "明るいアナスタシア", 30000, 250, 150, 10, 5, RACE_SPECTRE},
491 { "死霊術師チャリティー", 20000, 250, 150, 10, 5, RACE_DARK_ELF},
492 { "ボクサーのプグナシオス", 20000, 250, 150, 10, 5, RACE_HALF_ORC},
493 { "幸運なフットソア", 30000, 250, 150, 10, 5, RACE_BEASTMAN},
494 { "光指のシドリア", 30000, 250, 150, 10, 5, RACE_HUMAN},
495 { "手品師リアソー", 20000, 250, 150, 10, 5, RACE_HOBBIT},
496 { "やりくり上手のジャナッカ", 20000, 250, 150, 10, 5, RACE_GNOME},
497 { "悪党シーナ", 30000, 250, 150, 10, 5, RACE_GNOME},
498 { "大爪アルニッキ", 30000, 250, 150, 10, 5, RACE_DRACONIAN},
499 { "貧乏チャエアンド", 20000, 250, 150, 10, 5, RACE_HUMAN},
500 { "山賊アファードーフ", 20000, 250, 150, 10, 5, RACE_BARBARIAN},
501 { "強欲ラザクスル", 30000, 250, 150, 10, 5, RACE_MIND_FLAYER},
502 { "ファラレウィン", 30000, 250, 150, 10, 5, RACE_SPRITE},
503 { "しわしわヴォスール", 20000, 250, 150, 10, 5, RACE_NIBELUNG},
504 { "ハンサムなアラオード", 20000, 250, 150, 10, 5, RACE_AMBERITE},
505 { "負け犬セラドフリド", 30000, 250, 150, 10, 5, RACE_HUMAN},
506 { "片足のエルーロ", 30000, 250, 150, 10, 5, RACE_HALF_OGRE},
508 { "Gary Gygaz", 20000, 250, 150, 10, 5, RACE_HALF_TROLL},
509 { "Histor the Goblin", 20000, 250, 150, 10, 5, RACE_HALF_ORC},
510 { "Quark the Ferengi", 30000, 250, 150, 10, 5, RACE_DWARF},
511 { "Topi the Fair(?)", 30000, 250, 150, 10, 5, RACE_HUMAN},
512 { "Vhassa the Dead", 20000, 250, 150, 10, 5, RACE_ZOMBIE},
513 { "Kyn the Treacherous", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
514 { "Bubonicus", 30000, 250, 150, 10, 5, RACE_BEASTMAN},
515 { "Corpselight", 30000, 250, 150, 10, 5, RACE_SPECTRE},
516 { "Parrish the Bloodthirsty", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
517 { "Vile", 20000, 250, 150, 10, 5, RACE_SKELETON},
518 { "Prentice the Trusted", 30000, 250, 150, 10, 5, RACE_SKELETON},
519 { "Griella Humanslayer", 30000, 250, 150, 10, 5, RACE_IMP},
520 { "Angel", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
521 { "Flotsam the Bloated", 20000, 250, 150, 10, 5, RACE_ZOMBIE},
522 { "Nieval", 30000, 250, 150, 10, 5, RACE_VAMPIRE},
523 { "Anastasia the Luminous", 30000, 250, 150, 10, 5, RACE_SPECTRE},
524 { "Charity the Necromancer", 20000, 250, 150, 10, 5, RACE_DARK_ELF},
525 { "Pugnacious the Pugilist", 20000, 250, 150, 10, 5, RACE_HALF_ORC},
526 { "Footsore the Lucky", 30000, 250, 150, 10, 5, RACE_BEASTMAN},
527 { "Sidria Lighfingered", 30000, 250, 150, 10, 5, RACE_HUMAN},
528 { "Riatho the Juggler", 20000, 250, 150, 10, 5, RACE_HOBBIT},
529 { "Janaaka the Shifty", 20000, 250, 150, 10, 5, RACE_GNOME},
530 { "Cina the Rogue", 30000, 250, 150, 10, 5, RACE_GNOME},
531 { "Arunikki Greatclaw", 30000, 250, 150, 10, 5, RACE_DRACONIAN},
532 { "Chaeand the Poor", 20000, 250, 150, 10, 5, RACE_HUMAN},
533 { "Afardorf the Brigand", 20000, 250, 150, 10, 5, RACE_BARBARIAN},
534 { "Lathaxl the Greedy", 30000, 250, 150, 10, 5, RACE_MIND_FLAYER},
535 { "Falarewyn", 30000, 250, 150, 10, 5, RACE_SPRITE},
536 { "Vosur the Wrinkled", 20000, 250, 150, 10, 5, RACE_NIBELUNG},
537 { "Araord the Handsome", 20000, 250, 150, 10, 5, RACE_AMBERITE},
538 { "Theradfrid the Loser", 30000, 250, 150, 10, 5, RACE_HUMAN},
539 { "One-Legged Eroolo", 30000, 250, 150, 10, 5, RACE_HALF_OGRE},
545 { "我が家", 0, 100, 100, 0, 99, 99},
546 { "我が家", 0, 100, 100, 0, 99, 99},
547 { "我が家", 0, 100, 100, 0, 99, 99},
548 { "我が家", 0, 100, 100, 0, 99, 99},
549 { "我が家", 0, 100, 100, 0, 99, 99},
550 { "我が家", 0, 100, 100, 0, 99, 99},
551 { "我が家", 0, 100, 100, 0, 99, 99},
552 { "我が家", 0, 100, 100, 0, 99, 99},
553 { "我が家", 0, 100, 100, 0, 99, 99},
554 { "我が家", 0, 100, 100, 0, 99, 99},
555 { "我が家", 0, 100, 100, 0, 99, 99},
556 { "我が家", 0, 100, 100, 0, 99, 99},
557 { "我が家", 0, 100, 100, 0, 99, 99},
558 { "我が家", 0, 100, 100, 0, 99, 99},
559 { "我が家", 0, 100, 100, 0, 99, 99},
560 { "我が家", 0, 100, 100, 0, 99, 99},
561 { "我が家", 0, 100, 100, 0, 99, 99},
562 { "我が家", 0, 100, 100, 0, 99, 99},
563 { "我が家", 0, 100, 100, 0, 99, 99},
564 { "我が家", 0, 100, 100, 0, 99, 99},
565 { "我が家", 0, 100, 100, 0, 99, 99},
566 { "我が家", 0, 100, 100, 0, 99, 99},
567 { "我が家", 0, 100, 100, 0, 99, 99},
568 { "我が家", 0, 100, 100, 0, 99, 99},
569 { "我が家", 0, 100, 100, 0, 99, 99},
570 { "我が家", 0, 100, 100, 0, 99, 99},
571 { "我が家", 0, 100, 100, 0, 99, 99},
572 { "我が家", 0, 100, 100, 0, 99, 99},
573 { "我が家", 0, 100, 100, 0, 99, 99},
574 { "我が家", 0, 100, 100, 0, 99, 99},
575 { "我が家", 0, 100, 100, 0, 99, 99},
576 { "我が家", 0, 100, 100, 0, 99, 99},
578 { "Your home", 0, 100, 100, 0, 99, 99},
579 { "Your home", 0, 100, 100, 0, 99, 99},
580 { "Your home", 0, 100, 100, 0, 99, 99},
581 { "Your home", 0, 100, 100, 0, 99, 99},
582 { "Your home", 0, 100, 100, 0, 99, 99},
583 { "Your home", 0, 100, 100, 0, 99, 99},
584 { "Your home", 0, 100, 100, 0, 99, 99},
585 { "Your home", 0, 100, 100, 0, 99, 99},
586 { "Your home", 0, 100, 100, 0, 99, 99},
587 { "Your home", 0, 100, 100, 0, 99, 99},
588 { "Your home", 0, 100, 100, 0, 99, 99},
589 { "Your home", 0, 100, 100, 0, 99, 99},
590 { "Your home", 0, 100, 100, 0, 99, 99},
591 { "Your home", 0, 100, 100, 0, 99, 99},
592 { "Your home", 0, 100, 100, 0, 99, 99},
593 { "Your home", 0, 100, 100, 0, 99, 99},
594 { "Your home", 0, 100, 100, 0, 99, 99},
595 { "Your home", 0, 100, 100, 0, 99, 99},
596 { "Your home", 0, 100, 100, 0, 99, 99},
597 { "Your home", 0, 100, 100, 0, 99, 99},
598 { "Your home", 0, 100, 100, 0, 99, 99},
599 { "Your home", 0, 100, 100, 0, 99, 99},
600 { "Your home", 0, 100, 100, 0, 99, 99},
601 { "Your home", 0, 100, 100, 0, 99, 99},
602 { "Your home", 0, 100, 100, 0, 99, 99},
603 { "Your home", 0, 100, 100, 0, 99, 99},
604 { "Your home", 0, 100, 100, 0, 99, 99},
605 { "Your home", 0, 100, 100, 0, 99, 99},
606 { "Your home", 0, 100, 100, 0, 99, 99},
607 { "Your home", 0, 100, 100, 0, 99, 99},
608 { "Your home", 0, 100, 100, 0, 99, 99},
609 { "Your home", 0, 100, 100, 0, 99, 99},
615 /* Bookstore - 21 unique names */
617 { "強欲ドラフ", 10000, 175, 108, 4, 12, RACE_HUMAN},
618 { "賢者オドナー", 15000, 120, 105, 6, 16, RACE_HIGH_ELF},
619 { "中立のガンダー", 25000, 120, 110, 7, 19, RACE_DARK_ELF},
620 { "忍耐の人ロ=シャ", 30000, 140, 105, 6, 12, RACE_ELF},
621 { "ランドルフ・カーター", 15000, 175, 108, 4, 12, RACE_HUMAN},
622 { "隼のサライ", 15000, 175, 108, 4, 12, RACE_HUMAN},
623 { "千里眼ボドリル", 20000, 120, 105, 6, 16, RACE_HIGH_ELF},
624 { "沈黙のヴェオロイン", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
625 { "学者のヴァンシラス", 30000, 140, 105, 6, 12, RACE_MIND_FLAYER},
626 { "物書きオセイン", 15000, 175, 108, 4, 12, RACE_SKELETON},
627 { "本の虫オルヴァー", 20000, 120, 105, 6, 16, RACE_VAMPIRE},
628 { "浅井墓男", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
629 { "デスマスク", 30000, 140, 105, 6, 12, RACE_ZOMBIE},
630 { "学者のアスーヌ", 15000, 175, 108, 4, 12, RACE_MIND_FLAYER},
631 { "死人のプリランド", 20000, 120, 105, 6, 16, RACE_ZOMBIE},
632 { "鉄のロナール", 25000, 120, 110, 7, 19, RACE_GOLEM},
634 { "Dolaf the Greedy", 10000, 175, 108, 4, 12, RACE_HUMAN},
635 { "Odnar the Sage", 15000, 120, 105, 6, 16, RACE_HIGH_ELF},
636 { "Gandar the Neutral", 25000, 120, 110, 7, 19, RACE_DARK_ELF},
637 { "Ro-sha the Patient", 30000, 140, 105, 6, 12, RACE_ELF},
638 { "Randolph Carter", 15000, 175, 108, 4, 12, RACE_HUMAN},
639 { "Sarai the Swift", 15000, 175, 108, 4, 12, RACE_HUMAN},
640 { "Bodril the Seer", 20000, 120, 105, 6, 16, RACE_HIGH_ELF},
641 { "Veloin the Quiet", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
642 { "Vanthylas the Learned", 30000, 140, 105, 6, 12, RACE_MIND_FLAYER},
643 { "Ossein the Literate", 15000, 175, 108, 4, 12, RACE_SKELETON},
644 { "Olvar Bookworm", 20000, 120, 105, 6, 16, RACE_VAMPIRE},
645 { "Shallowgrave", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
646 { "Death Mask", 30000, 140, 105, 6, 12, RACE_ZOMBIE},
647 { "Asuunu the Learned", 15000, 175, 108, 4, 12, RACE_MIND_FLAYER},
648 { "Prirand the Dead", 20000, 120, 105, 6, 16, RACE_ZOMBIE},
649 { "Ronar the Iron", 25000, 120, 110, 7, 19, RACE_GOLEM},
652 { "ガリル=ガミル", 30000, 140, 105, 6, 12, RACE_ELF},
653 { "本食いローバグ", 15000, 175, 108, 4, 12, RACE_KOBOLD},
654 { "キリアリキーク", 20000, 120, 105, 6, 16, RACE_KLACKON},
655 { "静かなるリリン", 25000, 120, 110, 7, 19, RACE_DWARF},
656 { "王者イサング", 30000, 140, 105, 6, 12, RACE_HIGH_ELF},
657 { "強欲ドラフ", 10000, 175, 108, 4, 12, RACE_HUMAN},
658 { "賢者オドナー", 15000, 120, 105, 6, 16, RACE_HIGH_ELF},
659 { "中立のガンダー", 25000, 120, 110, 7, 19, RACE_DARK_ELF},
660 { "忍耐の人ロ=シャ", 30000, 140, 105, 6, 12, RACE_ELF},
661 { "ランドルフ・カーター", 15000, 175, 108, 4, 12, RACE_HUMAN},
662 { "隼サライ", 15000, 175, 108, 4, 12, RACE_HUMAN},
663 { "千里眼ボドリル", 20000, 120, 105, 6, 16, RACE_HIGH_ELF},
664 { "沈黙のヴェオロイン", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
665 { "学者のヴァンシラス", 30000, 140, 105, 6, 12, RACE_MIND_FLAYER},
666 { "物書きオセイン", 15000, 175, 108, 4, 12, RACE_SKELETON},
667 { "本の虫オルヴァー", 20000, 120, 105, 6, 16, RACE_VAMPIRE},
669 { "Galil-Gamir", 30000, 140, 105, 6, 12, RACE_ELF},
670 { "Rorbag Book-Eater", 15000, 175, 108, 4, 12, RACE_KOBOLD},
671 { "Kiriarikirk", 20000, 120, 105, 6, 16, RACE_KLACKON},
672 { "Rilin the Quiet", 25000, 120, 110, 7, 19, RACE_DWARF},
673 { "Isung the Lord", 30000, 140, 105, 6, 12, RACE_HIGH_ELF},
674 { "Dolaf the Greedy", 10000, 175, 108, 4, 12, RACE_HUMAN},
675 { "Odnar the Sage", 15000, 120, 105, 6, 16, RACE_HIGH_ELF},
676 { "Gandar the Neutral", 25000, 120, 110, 7, 19, RACE_DARK_ELF},
677 { "Ro-sha the Patient", 30000, 140, 105, 6, 12, RACE_ELF},
678 { "Randolph Carter", 15000, 175, 108, 4, 12, RACE_HUMAN},
679 { "Sarai the Swift", 15000, 175, 108, 4, 12, RACE_HUMAN},
680 { "Bodril the Seer", 20000, 120, 105, 6, 16, RACE_HIGH_ELF},
681 { "Veloin the Quiet", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
682 { "Vanthylas the Learned", 30000, 140, 105, 6, 12, RACE_MIND_FLAYER},
683 { "Ossein the Literate", 15000, 175, 108, 4, 12, RACE_SKELETON},
684 { "Olvar Bookworm", 20000, 120, 105, 6, 16, RACE_VAMPIRE},
691 { "博物館", 0, 100, 100, 0, 99, 99},
692 { "博物館", 0, 100, 100, 0, 99, 99},
693 { "博物館", 0, 100, 100, 0, 99, 99},
694 { "博物館", 0, 100, 100, 0, 99, 99},
695 { "博物館", 0, 100, 100, 0, 99, 99},
696 { "博物館", 0, 100, 100, 0, 99, 99},
697 { "博物館", 0, 100, 100, 0, 99, 99},
698 { "博物館", 0, 100, 100, 0, 99, 99},
699 { "博物館", 0, 100, 100, 0, 99, 99},
700 { "博物館", 0, 100, 100, 0, 99, 99},
701 { "博物館", 0, 100, 100, 0, 99, 99},
702 { "博物館", 0, 100, 100, 0, 99, 99},
703 { "博物館", 0, 100, 100, 0, 99, 99},
704 { "博物館", 0, 100, 100, 0, 99, 99},
705 { "博物館", 0, 100, 100, 0, 99, 99},
706 { "博物館", 0, 100, 100, 0, 99, 99},
707 { "博物館", 0, 100, 100, 0, 99, 99},
708 { "博物館", 0, 100, 100, 0, 99, 99},
709 { "博物館", 0, 100, 100, 0, 99, 99},
710 { "博物館", 0, 100, 100, 0, 99, 99},
711 { "博物館", 0, 100, 100, 0, 99, 99},
712 { "博物館", 0, 100, 100, 0, 99, 99},
713 { "博物館", 0, 100, 100, 0, 99, 99},
714 { "博物館", 0, 100, 100, 0, 99, 99},
715 { "博物館", 0, 100, 100, 0, 99, 99},
716 { "博物館", 0, 100, 100, 0, 99, 99},
717 { "博物館", 0, 100, 100, 0, 99, 99},
718 { "博物館", 0, 100, 100, 0, 99, 99},
719 { "博物館", 0, 100, 100, 0, 99, 99},
720 { "博物館", 0, 100, 100, 0, 99, 99},
721 { "博物館", 0, 100, 100, 0, 99, 99},
722 { "博物館", 0, 100, 100, 0, 99, 99},
724 { "Museum", 0, 100, 100, 0, 99, 99},
725 { "Museum", 0, 100, 100, 0, 99, 99},
726 { "Museum", 0, 100, 100, 0, 99, 99},
727 { "Museum", 0, 100, 100, 0, 99, 99},
728 { "Museum", 0, 100, 100, 0, 99, 99},
729 { "Museum", 0, 100, 100, 0, 99, 99},
730 { "Museum", 0, 100, 100, 0, 99, 99},
731 { "Museum", 0, 100, 100, 0, 99, 99},
732 { "Museum", 0, 100, 100, 0, 99, 99},
733 { "Museum", 0, 100, 100, 0, 99, 99},
734 { "Museum", 0, 100, 100, 0, 99, 99},
735 { "Museum", 0, 100, 100, 0, 99, 99},
736 { "Museum", 0, 100, 100, 0, 99, 99},
737 { "Museum", 0, 100, 100, 0, 99, 99},
738 { "Museum", 0, 100, 100, 0, 99, 99},
739 { "Museum", 0, 100, 100, 0, 99, 99},
740 { "Museum", 0, 100, 100, 0, 99, 99},
741 { "Museum", 0, 100, 100, 0, 99, 99},
742 { "Museum", 0, 100, 100, 0, 99, 99},
743 { "Museum", 0, 100, 100, 0, 99, 99},
744 { "Museum", 0, 100, 100, 0, 99, 99},
745 { "Museum", 0, 100, 100, 0, 99, 99},
746 { "Museum", 0, 100, 100, 0, 99, 99},
747 { "Museum", 0, 100, 100, 0, 99, 99},
748 { "Museum", 0, 100, 100, 0, 99, 99},
749 { "Museum", 0, 100, 100, 0, 99, 99},
750 { "Museum", 0, 100, 100, 0, 99, 99},
751 { "Museum", 0, 100, 100, 0, 99, 99},
752 { "Museum", 0, 100, 100, 0, 99, 99},
753 { "Museum", 0, 100, 100, 0, 99, 99},
754 { "Museum", 0, 100, 100, 0, 99, 99},
755 { "Museum", 0, 100, 100, 0, 99, 99},
762 static int cur_store_num = 0;
763 static int store_top = 0;
764 static int store_bottom = 0;
765 static int xtra_stock = 0;
766 static store_type *st_ptr = NULL;
767 static const owner_type *ot_ptr = NULL;
768 static s16b old_town_num = 0;
769 static s16b inner_town_num = 0;
770 #define RUMOR_CHANCE 8
772 #define MAX_COMMENT_1 6
774 static concptr comment_1[MAX_COMMENT_1] =
795 /*! ブラックマーケット追加メッセージ(承諾) */
796 static concptr comment_1_B[MAX_COMMENT_1] = {
805 #define MAX_COMMENT_2A 2
807 static concptr comment_2a[MAX_COMMENT_2A] =
810 "私の忍耐力を試しているのかい? $%s が最後だ。",
811 "我慢にも限度があるぞ。 $%s が最後だ。"
813 "You try my patience. %s is final.",
814 "My patience grows thin. %s is final."
819 #define MAX_COMMENT_2B 12
821 static concptr comment_2b[MAX_COMMENT_2B] =
824 " $%s ぐらいは出さなきゃダメだよ。",
827 "何て奴だ! $%s 以下はあり得ないぞ。",
828 "それじゃ少なすぎる! $%s は欲しいところだ。",
829 "バカにしている! $%s はもらわないと。",
831 "おいおい! $%s を考えてくれないか?",
832 "1000匹のオークのノミに苦しめられるがいい! $%s だ。",
833 "お前の大切なものに災いあれ! $%s でどうだ。",
834 "モルゴスに賞味されるがいい!本当は $%s なんだろう?",
835 "お前の母親はオーガか! $%s は出すつもりなんだろ?"
837 "I can take no less than %s gold pieces.",
838 "I will accept no less than %s gold pieces.",
839 "Ha! No less than %s gold pieces.",
840 "You knave! No less than %s gold pieces.",
841 "That's a pittance! I want %s gold pieces.",
842 "That's an insult! I want %s gold pieces.",
843 "As if! How about %s gold pieces?",
844 "My arse! How about %s gold pieces?",
845 "May the fleas of 1000 orcs molest you! Try %s gold pieces.",
846 "May your most favourite parts go moldy! Try %s gold pieces.",
847 "May Morgoth find you tasty! Perhaps %s gold pieces?",
848 "Your mother was an Ogre! Perhaps %s gold pieces?"
854 /*! ブラックマーケット用追加メッセージ(売るとき) */
855 static concptr comment_2b_B[MAX_COMMENT_2B] = {
856 "いくら俺様がお人好しとはいえ $%s が限界だね。嫌なら帰りな。",
857 "金がないのかい、あんた?まずは家に帰って $%s 揃えてきな。",
858 "物の価値が分からん奴だな。これは $%s が普通なんだよ。",
859 "俺の付けた値段に文句があるのか? $%s が限界だ。",
860 "ひょっとして新手の冗談かい? $%s 持ってないなら帰りな。",
861 "うちは他の店とは違うんだよ。$%s ぐらいは出しな。",
862 "買う気がないなら帰りな。 $%s だと言っているんだ。",
863 "話にならないね。 $%s くらい持っているんだろ?",
864 "は?なんだそりゃ? $%s の間違いか、ひょっとして?",
865 "出口はあっちだよ。それとも $%s 出せるのかい、あんたに。",
866 "命知らずな奴だな。 $%s 出せば今日の所は勘弁してやるよ。",
867 "うちの店は貧乏人お断りだ。 $%s ぐらい出せないのかい?"
870 #define MAX_COMMENT_3A 2
872 static concptr comment_3a[MAX_COMMENT_3A] =
875 "私の忍耐力を試しているのかい? $%s が最後だ。",
876 "我慢にも限度があるぞ。 $%s が最後だ。"
878 "You try my patience. %s is final.",
879 "My patience grows thin. %s is final."
885 #define MAX_COMMENT_3B 12
887 static concptr comment_3b[MAX_COMMENT_3B] =
890 "本音を言うと $%s でいいんだろ?",
892 " $%s ぐらいなら出してもいいが。",
893 " $%s 以上払うなんて考えられないね。",
894 "まあ落ちついて。 $%s でどうだい?",
895 "そのガラクタなら $%s で引き取るよ。",
896 "それじゃ高すぎる! $%s がいいとこだろ。",
897 "どうせいらないんだろ! $%s でいいだろ?",
898 "だめだめ! $%s がずっとお似合いだよ。",
899 "バカにしている! $%s がせいぜいだ。",
900 " $%s なら嬉しいところだがなあ。",
901 " $%s 、それ以上はビタ一文出さないよ!"
903 "Perhaps %s gold pieces?",
904 "How about %s gold pieces?",
905 "I will pay no more than %s gold pieces.",
906 "I can afford no more than %s gold pieces.",
907 "Be reasonable. How about %s gold pieces?",
908 "I'll buy it as scrap for %s gold pieces.",
909 "That is too much! How about %s gold pieces?",
910 "That looks war surplus! Say %s gold pieces?",
911 "Never! %s is more like it.",
912 "That's an insult! %s is more like it.",
913 "%s gold pieces and be thankful for it!",
914 "%s gold pieces and not a copper more!"
920 /*! ブラックマーケット用追加メッセージ(買い取り) */
921 static concptr comment_3b_B[MAX_COMMENT_3B] = {
922 " $%s ってところだね。そのどうしようもないガラクタは。",
923 "この俺が $%s って言っているんだから、その通りにした方が身のためだぞ。",
924 "俺の優しさに甘えるのもいい加減にしておけ。 $%s だ。",
925 "その品なら $%s で売ってくれているがね、常識ある紳士はみんな。",
926 "こりゃまた、がめつい奴だな。いくら俺が温厚とはいえ $%s が限界だ。",
927 " $%s だ。別に俺はそんなガラクタ欲しくはないんだから。",
928 "俺の鑑定額が気に入らないのか? $%s 、嫌なら帰りな。",
929 " $%s で引き取ってやるよ。喜んで受け取りな、貧乏人。",
930 "物の価値が分からん奴は始末におえんな。それは $%s なんだよ。",
931 "そんなに金が欲しいのか、あんた? $%s で満足できんのか?",
932 "入る店間違えてんじゃないのか? $%s で嫌なら他をあたってくれ。",
933 "俺の言い値にケチをつける奴がいるとは! その度胸に免じて $%s だ。"
936 #define MAX_COMMENT_4A 4
938 static concptr comment_4a[MAX_COMMENT_4A] =
941 "もうたくさんだ!何度も私をわずらわせないでくれ!",
942 "うがー!一日の我慢の限度を超えている!",
943 "もういい!時間の無駄以外のなにものでもない!",
944 "もうやってられないよ!顔も見たくない!"
946 "Enough! You have abused me once too often!",
947 "Arghhh! I have had enough abuse for one day!",
948 "That does it! You shall waste my time no more!",
949 "This is getting nowhere! I'm going to Londis!"
955 /*! ブラックマーケット用追加メッセージ(怒りの頂点) */
956 static concptr comment_4a_B[MAX_COMMENT_4A] = {
957 "なめやがって!温厚な俺様でも限界があるってことを知れ!",
958 "俺をここまで怒らせて...命があるだけでもありがたいと思え!",
959 "ふざけてるのか!冷やかしなら相手を見てからにしろ!",
960 "いいかげんにしろ!今度こんなまねしたらただじゃおかねえぞ!"
963 #define MAX_COMMENT_4B 4
965 static concptr comment_4b[MAX_COMMENT_4B] =
974 "Get out of my sight!",
975 "Begone, you scoundrel!",
982 /*! ブラックマーケット用追加メッセージ(追い出し) */
983 static concptr comment_4b_B[MAX_COMMENT_4B] = {
990 #define MAX_COMMENT_5 8
992 static concptr comment_5[MAX_COMMENT_5] =
1006 "You will have to do better than that!",
1007 "Do you wish to do business or not?",
1008 "You've got to be kidding!",
1009 "You'd better be kidding!",
1010 "You try my patience.",
1011 "Hmmm, nice weather we're having."
1017 /*! ブラックマーケット用追加メッセージ(怒り) */
1018 static concptr comment_5_B[MAX_COMMENT_5] = {
1029 #define MAX_COMMENT_6 4
1031 static concptr comment_6[MAX_COMMENT_6] =
1039 "I must have heard you wrong.",
1040 "I'm sorry, I missed that.",
1041 "I'm sorry, what was that?",
1042 "Sorry, what was that again?"
1047 /*** Initialize others ***/
1050 * 店舗で販売するオブジェクトを定義する / Hack -- Objects sold in the stores -- by tval/sval pair.
1052 byte store_table[MAX_STORES][STORE_CHOICES][2] =
1057 { TV_FOOD, SV_FOOD_RATION },
1058 { TV_FOOD, SV_FOOD_RATION },
1059 { TV_FOOD, SV_FOOD_RATION },
1060 { TV_FOOD, SV_FOOD_RATION },
1062 { TV_FOOD, SV_FOOD_RATION },
1063 { TV_FOOD, SV_FOOD_BISCUIT },
1064 { TV_FOOD, SV_FOOD_JERKY },
1065 { TV_FOOD, SV_FOOD_JERKY },
1067 { TV_FOOD, SV_FOOD_PINT_OF_WINE },
1068 { TV_FOOD, SV_FOOD_PINT_OF_ALE },
1069 { TV_LITE, SV_LITE_TORCH },
1070 { TV_LITE, SV_LITE_TORCH },
1072 { TV_LITE, SV_LITE_TORCH },
1073 { TV_LITE, SV_LITE_TORCH },
1074 { TV_LITE, SV_LITE_LANTERN },
1075 { TV_LITE, SV_LITE_LANTERN },
1087 { TV_SHOT, SV_AMMO_NORMAL },
1088 { TV_ARROW, SV_AMMO_NORMAL },
1089 { TV_BOLT, SV_AMMO_NORMAL },
1090 { TV_DIGGING, SV_SHOVEL },
1092 { TV_DIGGING, SV_PICK },
1093 { TV_CLOAK, SV_CLOAK },
1094 { TV_CLOAK, SV_CLOAK },
1095 { TV_CLOAK, SV_FUR_CLOAK },
1097 { TV_FOOD, SV_FOOD_RATION },
1098 { TV_FOOD, SV_FOOD_RATION },
1099 { TV_FOOD, SV_FOOD_RATION },
1100 { TV_FOOD, SV_FOOD_RATION },
1102 { TV_POTION, SV_POTION_WATER },
1103 { TV_POTION, SV_POTION_WATER },
1104 { TV_LITE, SV_LITE_LANTERN },
1105 { TV_LITE, SV_LITE_LANTERN },
1107 { TV_FOOD, SV_FOOD_WAYBREAD },
1108 { TV_FOOD, SV_FOOD_WAYBREAD },
1112 { TV_SHOT, SV_AMMO_NORMAL },
1113 { TV_ARROW, SV_AMMO_NORMAL },
1114 { TV_BOLT, SV_AMMO_NORMAL },
1115 { TV_DIGGING, SV_SHOVEL }
1121 { TV_BOOTS, SV_PAIR_OF_SOFT_LEATHER_BOOTS },
1122 { TV_BOOTS, SV_PAIR_OF_SOFT_LEATHER_BOOTS },
1123 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
1124 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
1126 { TV_HELM, SV_HARD_LEATHER_CAP },
1127 { TV_HELM, SV_HARD_LEATHER_CAP },
1128 { TV_HELM, SV_METAL_CAP },
1129 { TV_HELM, SV_IRON_HELM },
1131 { TV_SOFT_ARMOR, SV_ROBE },
1132 { TV_SOFT_ARMOR, SV_ROBE },
1133 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
1134 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
1136 { TV_SOFT_ARMOR, SV_HARD_LEATHER_ARMOR },
1137 { TV_SOFT_ARMOR, SV_HARD_LEATHER_ARMOR },
1138 { TV_SOFT_ARMOR, SV_HARD_STUDDED_LEATHER },
1139 { TV_SOFT_ARMOR, SV_HARD_STUDDED_LEATHER },
1141 { TV_SOFT_ARMOR, SV_RHINO_HIDE_ARMOR },
1142 { TV_SOFT_ARMOR, SV_LEATHER_SCALE_MAIL },
1143 { TV_HARD_ARMOR, SV_METAL_SCALE_MAIL },
1144 { TV_HARD_ARMOR, SV_CHAIN_MAIL },
1146 { TV_HARD_ARMOR, SV_DOUBLE_RING_MAIL },
1147 { TV_HARD_ARMOR, SV_AUGMENTED_CHAIN_MAIL },
1148 { TV_HARD_ARMOR, SV_BAR_CHAIN_MAIL },
1149 { TV_HARD_ARMOR, SV_DOUBLE_CHAIN_MAIL },
1151 { TV_HARD_ARMOR, SV_METAL_BRIGANDINE_ARMOUR },
1152 { TV_HARD_ARMOR, SV_SPLINT_MAIL },
1153 { TV_GLOVES, SV_SET_OF_LEATHER_GLOVES },
1154 { TV_GLOVES, SV_SET_OF_LEATHER_GLOVES },
1156 { TV_GLOVES, SV_SET_OF_GAUNTLETS },
1157 { TV_SHIELD, SV_SMALL_LEATHER_SHIELD },
1158 { TV_SHIELD, SV_LARGE_LEATHER_SHIELD },
1159 { TV_SHIELD, SV_SMALL_METAL_SHIELD },
1161 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
1162 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
1163 { TV_HELM, SV_HARD_LEATHER_CAP },
1164 { TV_HELM, SV_HARD_LEATHER_CAP },
1166 { TV_SOFT_ARMOR, SV_ROBE },
1167 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
1168 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
1169 { TV_SOFT_ARMOR, SV_HARD_LEATHER_ARMOR },
1171 { TV_SOFT_ARMOR, SV_LEATHER_JACK },
1172 { TV_HARD_ARMOR, SV_METAL_SCALE_MAIL },
1173 { TV_HARD_ARMOR, SV_CHAIN_MAIL },
1174 { TV_HARD_ARMOR, SV_CHAIN_MAIL },
1176 { TV_GLOVES, SV_SET_OF_LEATHER_GLOVES },
1177 { TV_GLOVES, SV_SET_OF_GAUNTLETS },
1178 { TV_SHIELD, SV_SMALL_LEATHER_SHIELD },
1179 { TV_SHIELD, SV_SMALL_LEATHER_SHIELD }
1185 { TV_SWORD, SV_DAGGER },
1186 { TV_SWORD, SV_MAIN_GAUCHE },
1187 { TV_SWORD, SV_RAPIER },
1188 { TV_SWORD, SV_SMALL_SWORD },
1190 { TV_SWORD, SV_SHORT_SWORD },
1191 { TV_SWORD, SV_SABRE },
1192 { TV_SWORD, SV_CUTLASS },
1193 { TV_SWORD, SV_TULWAR },
1195 { TV_SWORD, SV_BROAD_SWORD },
1196 { TV_SWORD, SV_LONG_SWORD },
1197 { TV_SWORD, SV_SCIMITAR },
1198 { TV_SWORD, SV_KATANA },
1200 { TV_SWORD, SV_BASTARD_SWORD },
1201 { TV_POLEARM, SV_SPEAR },
1202 { TV_POLEARM, SV_AWL_PIKE },
1203 { TV_POLEARM, SV_TRIDENT },
1205 { TV_POLEARM, SV_PIKE },
1206 { TV_POLEARM, SV_BEAKED_AXE },
1207 { TV_POLEARM, SV_BROAD_AXE },
1208 { TV_POLEARM, SV_LANCE },
1210 { TV_POLEARM, SV_BATTLE_AXE },
1211 { TV_POLEARM, SV_HATCHET },
1212 { TV_BOW, SV_SLING },
1213 { TV_BOW, SV_SHORT_BOW },
1215 { TV_BOW, SV_LIGHT_XBOW },
1216 { TV_SHOT, SV_AMMO_NORMAL },
1217 { TV_SHOT, SV_AMMO_NORMAL },
1218 { TV_ARROW, SV_AMMO_NORMAL },
1220 { TV_ARROW, SV_AMMO_NORMAL },
1221 { TV_BOLT, SV_AMMO_NORMAL },
1222 { TV_BOLT, SV_AMMO_NORMAL },
1223 { TV_BOW, SV_LIGHT_XBOW },
1225 { TV_ARROW, SV_AMMO_NORMAL },
1226 { TV_BOLT, SV_AMMO_NORMAL },
1227 { TV_BOW, SV_SHORT_BOW },
1228 { TV_BOW, SV_LIGHT_XBOW },
1230 { TV_SWORD, SV_DAGGER },
1231 { TV_SWORD, SV_TANTO },
1232 { TV_SWORD, SV_RAPIER },
1233 { TV_SWORD, SV_SMALL_SWORD },
1235 { TV_SWORD, SV_SHORT_SWORD },
1236 { TV_SWORD, SV_LONG_SWORD },
1237 { TV_SWORD, SV_SCIMITAR },
1238 { TV_SWORD, SV_BROAD_SWORD },
1240 { TV_HISSATSU_BOOK, 0 },
1241 { TV_HISSATSU_BOOK, 0 },
1242 { TV_HISSATSU_BOOK, 1 },
1243 { TV_HISSATSU_BOOK, 1 },
1249 { TV_HAFTED, SV_NUNCHAKU },
1250 { TV_HAFTED, SV_QUARTERSTAFF },
1251 { TV_HAFTED, SV_MACE },
1252 { TV_HAFTED, SV_BO_STAFF },
1254 { TV_HAFTED, SV_WAR_HAMMER },
1255 { TV_HAFTED, SV_WAR_HAMMER },
1256 { TV_HAFTED, SV_MORNING_STAR },
1257 { TV_HAFTED, SV_FLAIL },
1259 { TV_HAFTED, SV_LEAD_FILLED_MACE },
1260 { TV_SCROLL, SV_SCROLL_REMOVE_CURSE },
1261 { TV_SCROLL, SV_SCROLL_BLESSING },
1262 { TV_SCROLL, SV_SCROLL_HOLY_CHANT },
1264 { TV_POTION, SV_POTION_HEROISM },
1265 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1266 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1267 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1269 { TV_POTION, SV_POTION_CURE_LIGHT },
1270 { TV_POTION, SV_POTION_CURE_SERIOUS },
1271 { TV_POTION, SV_POTION_CURE_SERIOUS },
1272 { TV_POTION, SV_POTION_CURE_CRITICAL },
1274 { TV_POTION, SV_POTION_CURE_CRITICAL },
1275 { TV_POTION, SV_POTION_RESTORE_EXP },
1276 { TV_POTION, SV_POTION_RESTORE_EXP },
1277 { TV_POTION, SV_POTION_RESTORE_EXP },
1279 { TV_LIFE_BOOK, 0 },
1280 { TV_LIFE_BOOK, 0 },
1281 { TV_LIFE_BOOK, 1 },
1282 { TV_LIFE_BOOK, 1 },
1284 { TV_CRUSADE_BOOK, 0 },
1285 { TV_CRUSADE_BOOK, 0 },
1286 { TV_CRUSADE_BOOK, 1 },
1287 { TV_CRUSADE_BOOK, 1 },
1289 { TV_HAFTED, SV_WHIP },
1290 { TV_HAFTED, SV_MACE },
1291 { TV_HAFTED, SV_BALL_AND_CHAIN },
1292 { TV_HAFTED, SV_WAR_HAMMER },
1294 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1295 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1296 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1297 { TV_POTION, SV_POTION_CURE_CRITICAL },
1299 { TV_POTION, SV_POTION_CURE_CRITICAL },
1300 { TV_POTION, SV_POTION_RESTORE_EXP },
1303 { TV_STATUE, SV_ANY },
1305 { TV_SCROLL, SV_SCROLL_REMOVE_CURSE },
1306 { TV_SCROLL, SV_SCROLL_REMOVE_CURSE },
1307 { TV_SCROLL, SV_SCROLL_STAR_REMOVE_CURSE },
1308 { TV_SCROLL, SV_SCROLL_STAR_REMOVE_CURSE }
1314 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_HIT },
1315 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_DAM },
1316 { TV_SCROLL, SV_SCROLL_ENCHANT_ARMOR },
1317 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1319 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1320 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1321 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1322 { TV_SCROLL, SV_SCROLL_LIGHT },
1324 { TV_SCROLL, SV_SCROLL_PHASE_DOOR },
1325 { TV_SCROLL, SV_SCROLL_PHASE_DOOR },
1326 { TV_SCROLL, SV_SCROLL_TELEPORT },
1327 { TV_SCROLL, SV_SCROLL_MONSTER_CONFUSION },
1329 { TV_SCROLL, SV_SCROLL_MAPPING },
1330 { TV_SCROLL, SV_SCROLL_DETECT_GOLD },
1331 { TV_SCROLL, SV_SCROLL_DETECT_ITEM },
1332 { TV_SCROLL, SV_SCROLL_DETECT_TRAP },
1334 { TV_SCROLL, SV_SCROLL_DETECT_INVIS },
1335 { TV_SCROLL, SV_SCROLL_RECHARGING },
1336 { TV_SCROLL, SV_SCROLL_TELEPORT },
1337 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1339 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1340 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1341 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1342 { TV_SCROLL, SV_SCROLL_TELEPORT },
1344 { TV_SCROLL, SV_SCROLL_TELEPORT },
1345 { TV_POTION, SV_POTION_RES_STR },
1346 { TV_POTION, SV_POTION_RES_INT },
1347 { TV_POTION, SV_POTION_RES_WIS },
1349 { TV_POTION, SV_POTION_RES_DEX },
1350 { TV_POTION, SV_POTION_RES_CON },
1351 { TV_POTION, SV_POTION_RES_CHR },
1352 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1354 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1355 { TV_SCROLL, SV_SCROLL_STAR_IDENTIFY }, /* Yep, occasionally! */
1356 { TV_SCROLL, SV_SCROLL_STAR_IDENTIFY },
1357 { TV_SCROLL, SV_SCROLL_LIGHT },
1359 { TV_POTION, SV_POTION_RES_STR },
1360 { TV_POTION, SV_POTION_RES_INT },
1361 { TV_POTION, SV_POTION_RES_WIS },
1362 { TV_POTION, SV_POTION_RES_DEX },
1364 { TV_POTION, SV_POTION_RES_CON },
1365 { TV_POTION, SV_POTION_RES_CHR },
1366 { TV_SCROLL, SV_SCROLL_ENCHANT_ARMOR },
1367 { TV_SCROLL, SV_SCROLL_ENCHANT_ARMOR },
1369 { TV_SCROLL, SV_SCROLL_RECHARGING },
1370 { TV_SCROLL, SV_SCROLL_PHASE_DOOR },
1371 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_HIT },
1372 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_DAM },
1377 /* Magic-User store */
1379 { TV_RING, SV_RING_PROTECTION },
1380 { TV_RING, SV_RING_LEVITATION_FALL },
1381 { TV_RING, SV_RING_PROTECTION },
1382 { TV_RING, SV_RING_RESIST_FIRE },
1384 { TV_RING, SV_RING_RESIST_COLD },
1385 { TV_AMULET, SV_AMULET_CHARISMA },
1386 { TV_RING, SV_RING_WARNING },
1387 { TV_AMULET, SV_AMULET_RESIST_ACID },
1389 { TV_AMULET, SV_AMULET_SEARCHING },
1390 { TV_WAND, SV_WAND_SLOW_MONSTER },
1391 { TV_WAND, SV_WAND_CONFUSE_MONSTER },
1392 { TV_WAND, SV_WAND_SLEEP_MONSTER },
1394 { TV_WAND, SV_WAND_MAGIC_MISSILE },
1395 { TV_WAND, SV_WAND_STINKING_CLOUD },
1396 { TV_WAND, SV_WAND_WONDER },
1397 { TV_WAND, SV_WAND_DISARMING },
1399 { TV_STAFF, SV_STAFF_LITE },
1400 { TV_STAFF, SV_STAFF_MAPPING },
1401 { TV_STAFF, SV_STAFF_DETECT_TRAP },
1402 { TV_STAFF, SV_STAFF_DETECT_DOOR },
1404 { TV_STAFF, SV_STAFF_DETECT_GOLD },
1405 { TV_STAFF, SV_STAFF_DETECT_ITEM },
1406 { TV_STAFF, SV_STAFF_DETECT_INVIS },
1407 { TV_STAFF, SV_STAFF_DETECT_EVIL },
1409 { TV_STAFF, SV_STAFF_TELEPORTATION },
1410 { TV_STAFF, SV_STAFF_TELEPORTATION },
1411 { TV_STAFF, SV_STAFF_TELEPORTATION },
1412 { TV_STAFF, SV_STAFF_TELEPORTATION },
1414 { TV_STAFF, SV_STAFF_IDENTIFY },
1415 { TV_STAFF, SV_STAFF_IDENTIFY },
1416 { TV_STAFF, SV_STAFF_IDENTIFY },
1418 { TV_STAFF, SV_STAFF_IDENTIFY },
1419 { TV_STAFF, SV_STAFF_REMOVE_CURSE },
1420 { TV_STAFF, SV_STAFF_CURE_LIGHT },
1421 { TV_STAFF, SV_STAFF_PROBING },
1425 { TV_SORCERY_BOOK, 0 },
1426 { TV_SORCERY_BOOK, 0 },
1427 { TV_SORCERY_BOOK, 1 },
1428 { TV_SORCERY_BOOK, 1 },
1430 { TV_ARCANE_BOOK, 0 },
1431 { TV_ARCANE_BOOK, 0 },
1432 { TV_ARCANE_BOOK, 1 },
1433 { TV_ARCANE_BOOK, 1 },
1435 { TV_ARCANE_BOOK, 2 },
1436 { TV_ARCANE_BOOK, 2 },
1437 { TV_ARCANE_BOOK, 3 },
1438 { TV_ARCANE_BOOK, 3 },
1443 /* Black Market (unused) */
1516 { TV_SORCERY_BOOK, 0 },
1517 { TV_SORCERY_BOOK, 0 },
1518 { TV_SORCERY_BOOK, 1 },
1519 { TV_SORCERY_BOOK, 1 },
1521 { TV_NATURE_BOOK, 0 },
1522 { TV_NATURE_BOOK, 0 },
1523 { TV_NATURE_BOOK, 1 },
1524 { TV_NATURE_BOOK, 1 },
1526 { TV_CHAOS_BOOK, 0 },
1527 { TV_CHAOS_BOOK, 0 },
1528 { TV_CHAOS_BOOK, 1 },
1529 { TV_CHAOS_BOOK, 1 },
1531 { TV_DEATH_BOOK, 0 },
1532 { TV_DEATH_BOOK, 0 },
1533 { TV_DEATH_BOOK, 1 },
1534 { TV_DEATH_BOOK, 1 },
1536 { TV_TRUMP_BOOK, 0 }, /* +16 */
1537 { TV_TRUMP_BOOK, 0 },
1538 { TV_TRUMP_BOOK, 1 },
1539 { TV_TRUMP_BOOK, 1 },
1541 { TV_ARCANE_BOOK, 0 },
1542 { TV_ARCANE_BOOK, 1 },
1543 { TV_ARCANE_BOOK, 2 },
1544 { TV_ARCANE_BOOK, 3 },
1546 { TV_CRAFT_BOOK, 0 },
1547 { TV_CRAFT_BOOK, 0 },
1548 { TV_CRAFT_BOOK, 1 },
1549 { TV_CRAFT_BOOK, 1 },
1551 { TV_DAEMON_BOOK, 0 },
1552 { TV_DAEMON_BOOK, 0 },
1553 { TV_DAEMON_BOOK, 1 },
1554 { TV_DAEMON_BOOK, 1 },
1556 { TV_MUSIC_BOOK, 0 },
1557 { TV_MUSIC_BOOK, 0 },
1558 { TV_MUSIC_BOOK, 1 },
1559 { TV_MUSIC_BOOK, 1 },
1568 /* Museum (unused) */
1607 * @brief 取引成功時の店主のメッセージ処理 /
1608 * Successful haggle.
1611 static void say_comment_1(void)
1614 /* ブラックマーケットのときは別のメッセージを出す */
1615 if ( cur_store_num == STORE_BLACK ) {
1616 msg_print(comment_1_B[randint0(MAX_COMMENT_1)]);
1619 msg_print(comment_1[randint0(MAX_COMMENT_1)]);
1622 msg_print(comment_1[randint0(MAX_COMMENT_1)]);
1626 if (one_in_(RUMOR_CHANCE))
1629 msg_print("店主は耳うちした:");
1631 msg_print("The shopkeeper whispers something into your ear:");
1633 display_rumor(TRUE);
1639 * @brief プレイヤーがアイテムを買う時の価格代案メッセージ処理 /
1640 * Continue haggling (player is buying)
1641 * @param value 店主の提示価格
1642 * @param annoyed 店主のいらつき度
1645 static void say_comment_2(PRICE value, int annoyed)
1649 /* Prepare a string to insert */
1650 sprintf(tmp_val, "%ld", (long)value);
1655 /* Formatted message */
1656 msg_format(comment_2a[randint0(MAX_COMMENT_2A)], tmp_val);
1662 /* Formatted message */
1664 /* ブラックマーケットの時は別のメッセージを出す */
1665 if ( cur_store_num == STORE_BLACK ){
1666 msg_format(comment_2b_B[randint0(MAX_COMMENT_2B)], tmp_val);
1669 msg_format(comment_2b[randint0(MAX_COMMENT_2B)], tmp_val);
1672 msg_format(comment_2b[randint0(MAX_COMMENT_2B)], tmp_val);
1680 * @brief プレイヤーがアイテムを売る時の価格代案メッセージ処理 /
1681 * Continue haggling (player is selling)
1682 * @param value 店主の提示価格
1683 * @param annoyed 店主のいらつき度
1686 static void say_comment_3(PRICE value, int annoyed)
1690 /* Prepare a string to insert */
1691 sprintf(tmp_val, "%ld", (long)value);
1696 /* Formatted message */
1697 msg_format(comment_3a[randint0(MAX_COMMENT_3A)], tmp_val);
1703 /* Formatted message */
1705 /* ブラックマーケットの時は別のメッセージを出す */
1706 if ( cur_store_num == STORE_BLACK ){
1707 msg_format(comment_3b_B[randint0(MAX_COMMENT_3B)], tmp_val);
1710 msg_format(comment_3b[randint0(MAX_COMMENT_3B)], tmp_val);
1713 msg_format(comment_3b[randint0(MAX_COMMENT_3B)], tmp_val);
1721 * @brief 店主がプレイヤーを追い出す時のメッセージ処理 /
1722 * Kick 'da bum out. -RAK-
1725 static void say_comment_4(void)
1728 /* ブラックマーケットの時は別のメッセージを出す */
1729 if ( cur_store_num == STORE_BLACK ){
1730 msg_print(comment_4a_B[randint0(MAX_COMMENT_4A)]);
1731 msg_print(comment_4b_B[randint0(MAX_COMMENT_4B)]);
1734 msg_print(comment_4a[randint0(MAX_COMMENT_4A)]);
1735 msg_print(comment_4b[randint0(MAX_COMMENT_4B)]);
1738 msg_print(comment_4a[randint0(MAX_COMMENT_4A)]);
1739 msg_print(comment_4b[randint0(MAX_COMMENT_4B)]);
1746 * @brief 店主がプレイヤーに取り合わない時のメッセージ処理 /
1747 * You are insulting me
1750 static void say_comment_5(void)
1753 /* ブラックマーケットの時は別のメッセージを出す */
1754 if ( cur_store_num == STORE_BLACK ){
1755 msg_print(comment_5_B[randint0(MAX_COMMENT_5)]);
1758 msg_print(comment_5[randint0(MAX_COMMENT_5)]);
1761 msg_print(comment_5[randint0(MAX_COMMENT_5)]);
1768 * @brief 店主がプレイヤーの提示を理解できなかった時のメッセージ処理 /
1769 * That makes no sense.
1772 static void say_comment_6(void)
1774 msg_print(comment_6[randint0(MAX_COMMENT_6)]);
1778 #define MAX_COMMENT_7A 4
1780 static concptr comment_7a[MAX_COMMENT_7A] =
1785 "誰かがむせび泣く声が聞こえる...。",
1790 "You hear someone sobbing...",
1791 "The shopkeeper howls in agony!"
1796 #define MAX_COMMENT_7B 4
1798 static concptr comment_7b[MAX_COMMENT_7B] =
1808 "The shopkeeper curses at you.",
1809 "The shopkeeper glares at you."
1814 #define MAX_COMMENT_7C 4
1816 static concptr comment_7c[MAX_COMMENT_7C] =
1825 "You've made my day!",
1826 "The shopkeeper giggles.",
1827 "The shopkeeper laughs loudly."
1832 #define MAX_COMMENT_7D 4
1834 static concptr comment_7d[MAX_COMMENT_7D] =
1838 "こんなおいしい思いをしたら、真面目に働けなくなるなぁ。",
1843 "I think I'll retire!",
1844 "The shopkeeper jumps for joy.",
1845 "The shopkeeper smiles gleefully."
1852 * @brief 店主が交渉を終えた際の反応を返す処理 /
1853 * Let a shop-keeper React to a purchase
1854 * @param price アイテムの取引額
1855 * @param value アイテムの実際価値
1856 * @param guess 店主が当初予想していた価値
1859 * We paid "price", it was worth "value", and we thought it was worth "guess"
1861 static void purchase_analyze(PRICE price, PRICE value, PRICE guess)
1863 /* Item was worthless, but we bought it */
1864 if ((value <= 0) && (price > value))
1866 msg_print(comment_7a[randint0(MAX_COMMENT_7A)]);
1867 chg_virtue(V_HONOUR, -1);
1868 chg_virtue(V_JUSTICE, -1);
1869 sound(SOUND_STORE1);
1872 /* Item was cheaper than we thought, and we paid more than necessary */
1873 else if ((value < guess) && (price > value))
1875 msg_print(comment_7b[randint0(MAX_COMMENT_7B)]);
1876 chg_virtue(V_JUSTICE, -1);
1877 if (one_in_(4)) chg_virtue(V_HONOUR, -1);
1878 sound(SOUND_STORE2);
1881 /* Item was a good bargain, and we got away with it */
1882 else if ((value > guess) && (value < (4 * guess)) && (price < value))
1884 msg_print(comment_7c[randint0(MAX_COMMENT_7C)]);
1885 if (one_in_(4)) chg_virtue(V_HONOUR, -1);
1886 else if (one_in_(4)) chg_virtue(V_HONOUR, 1);
1887 sound(SOUND_STORE3);
1890 /* Item was a great bargain, and we got away with it */
1891 else if ((value > guess) && (price < value))
1893 msg_print(comment_7d[randint0(MAX_COMMENT_7D)]);
1894 if (one_in_(2)) chg_virtue(V_HONOUR, -1);
1895 if (one_in_(4)) chg_virtue(V_HONOUR, 1);
1896 if (10 * price < value) chg_virtue(V_SACRIFICE, 1);
1897 sound(SOUND_STORE4);
1904 * We store the current "store feat" here so everyone can access it
1906 static int cur_store_feat;
1910 * Buying and selling adjustments for race combinations.
1911 * Entry[owner][player] gives the basic "cost inflation".
1913 static byte rgold_adj[MAX_RACES][MAX_RACES] =
1915 /*Hum, HfE, Elf, Hal, Gno, Dwa, HfO, HfT, Dun, HiE, Barbarian,
1916 HfOg, HGn, HTn, Cyc, Yek, Klc, Kbd, Nbl, DkE, Drc, Mind Flayer,
1917 Imp, Glm, Skl, Zombie, Vampire, Spectre, Fairy, Beastman, Ent,
1918 Angel, Demon, Kutar */
1921 { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
1922 124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
1923 115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
1924 100, 120, 110, 105 },
1927 { 110, 100, 100, 105, 110, 120, 125, 130, 110, 100, 110,
1928 120, 115, 108, 115, 110, 110, 120, 120, 115, 115, 110,
1929 120, 110, 110, 110, 120, 110, 100, 125, 100, 95, 140,
1930 110, 115, 110, 110 },
1933 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
1934 120, 120, 105, 120, 110, 105, 125, 125, 110, 115, 108,
1935 120, 115, 110, 110, 120, 110, 100, 125, 100, 95, 140,
1936 110, 110, 105, 110 },
1939 { 115, 110, 105, 95, 105, 110, 115, 130, 115, 105, 115,
1940 125, 120, 120, 125, 115, 110, 120, 120, 120, 115, 115,
1941 120, 110, 120, 120, 130, 110, 110, 130, 110, 95, 140,
1942 115, 120, 105, 115 },
1945 { 115, 115, 110, 105, 95, 110, 115, 130, 115, 110, 115,
1946 120, 125, 110, 120, 110, 105, 120, 110, 110, 105, 110,
1947 120, 101, 110, 110, 120, 120, 115, 130, 115, 95, 140,
1948 115, 110, 110, 115 },
1951 { 115, 120, 120, 110, 110, 95, 125, 135, 115, 120, 115,
1952 125, 140, 130, 130, 120, 115, 115, 115, 135, 125, 120,
1953 120, 105, 115, 115, 115, 115, 120, 130, 120, 95, 140,
1954 115, 110, 115, 115 },
1957 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
1958 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
1959 115, 125, 120, 120, 115, 120, 125, 115, 125, 95, 140,
1960 115, 110, 115, 115 },
1963 { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
1964 110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
1965 110, 115, 112, 112, 115, 112, 120, 110, 120, 95, 140,
1966 110, 110, 115, 110 },
1969 { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
1970 120, 120, 105, 120, 115, 105, 115, 120, 110, 105, 105,
1971 120, 105, 120, 120, 125, 120, 105, 135, 105, 95, 140,
1972 100, 110, 110, 100 },
1975 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
1976 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
1977 125, 115, 120, 120, 125, 120, 100, 125, 100, 95, 140,
1978 110, 110, 105, 110 },
1980 /* Human / Barbarian (copied from human) */
1981 { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
1982 124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
1983 115, 105, 125, 125, 130, 125, 115, 120, 115, 95, 140,
1984 100, 120, 110, 100 },
1986 /* Half-Ogre: theoretical, copied from half-troll */
1987 { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
1988 110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
1989 110, 115, 112, 112, 115, 112, 120, 110, 120, 95, 140,
1990 110, 110, 115, 110 },
1992 /* Half-Giant: theoretical, copied from half-troll */
1993 { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
1994 110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
1995 110, 115, 112, 112, 115, 112, 130, 120, 130, 95, 140,
1996 110, 110, 115, 110 },
1998 /* Half-Titan: theoretical, copied from High_Elf */
1999 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2000 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2001 125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2002 110, 110, 115, 110 },
2004 /* Cyclops: theoretical, copied from half-troll */
2005 { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
2006 110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
2007 110, 115, 112, 112, 115, 112, 130, 130, 130, 95, 140,
2008 110, 110, 115, 110 },
2010 /* Yeek: theoretical, copied from Half-Orc */
2011 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2012 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2013 115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2014 115, 110, 115, 115 },
2016 /* Klackon: theoretical, copied from Gnome */
2017 { 115, 115, 110, 105, 95, 110, 115, 130, 115, 110, 115,
2018 120, 125, 110, 120, 110, 105, 120, 110, 110, 105, 110,
2019 120, 101, 110, 110, 120, 120, 130, 130, 130, 95, 140,
2020 115, 110, 115, 115 },
2022 /* Kobold: theoretical, copied from Half-Orc */
2023 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2024 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2025 115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2026 115, 110, 115, 115 },
2028 /* Nibelung: theoretical, copied from Dwarf */
2029 { 115, 120, 120, 110, 110, 95, 125, 135, 115, 120, 115,
2030 125, 140, 130, 130, 120, 115, 115, 115, 135, 125, 120,
2031 120, 105, 115, 115, 120, 120, 130, 130, 130, 95, 140,
2032 115, 135, 115, 115 },
2035 { 110, 110, 110, 115, 120, 130, 115, 115, 120, 110, 115,
2036 115, 115, 116, 115, 120, 120, 115, 115, 101, 110, 110,
2037 110, 110, 112, 122, 110, 110, 110, 115, 110, 120, 120,
2038 110, 101, 115, 110 },
2040 /* Draconian: theoretical, copied from High_Elf */
2041 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2042 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2043 125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2044 110, 110, 115, 110 },
2046 /* Mind Flayer: theoretical, copied from High_Elf */
2047 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2048 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2049 125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2050 110, 110, 115, 110 },
2052 /* Imp: theoretical, copied from High_Elf */
2053 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2054 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2055 125, 115, 120, 120, 120, 120, 130, 130, 130, 120, 120,
2056 110, 110, 115, 110 },
2058 /* Golem: theoretical, copied from High_Elf */
2059 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2060 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2061 125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2062 110, 110, 115, 110 },
2064 /* Skeleton: theoretical, copied from half-orc */
2065 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2066 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2067 115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
2068 115, 110, 125, 115 },
2070 /* Zombie: Theoretical, copied from half-orc */
2071 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2072 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2073 115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
2074 115, 110, 125, 115 },
2076 /* Vampire: Theoretical, copied from half-orc */
2077 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2078 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2079 115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
2080 115, 110, 125, 115 },
2082 /* Spectre: Theoretical, copied from half-orc */
2083 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2084 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2085 115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
2086 115, 110, 125, 115 },
2088 /* Sprite: Theoretical, copied from half-orc */
2089 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2090 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2091 115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2092 115, 110, 105, 115 },
2094 /* Beastman: Theoretical, copied from half-orc */
2095 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2096 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2097 115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2098 115, 110, 115, 115 },
2101 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2102 120, 120, 105, 120, 110, 105, 125, 125, 110, 115, 108,
2103 120, 115, 110, 110, 120, 110, 100, 125, 100, 95, 140,
2104 110, 110, 105, 110 },
2107 { 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
2108 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
2109 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 160,
2113 { 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
2114 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
2115 140, 140, 140, 140, 140, 140, 140, 140, 140, 160, 120,
2116 140, 140, 140, 140 },
2119 { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
2120 124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
2121 115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
2122 100, 120, 110, 100 },
2125 { 110, 110, 110, 115, 120, 130, 115, 115, 120, 110, 115,
2126 115, 115, 116, 115, 120, 120, 115, 115, 101, 110, 110,
2127 110, 110, 112, 122, 110, 110, 110, 115, 110, 120, 120,
2128 110, 101, 115, 110 },
2131 { 110, 110, 105, 105, 110, 115, 115, 115, 110, 105, 110,
2132 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
2133 115, 115, 125, 125, 125, 125, 105, 115, 105, 95, 140,
2134 110, 115, 100, 110 },
2137 { 105, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
2138 124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
2139 115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
2140 100, 120, 110, 100 },
2146 * @brief 店舗価格を決定する /
2147 * Determine the price of an item (qty one) in a store.
2148 * @param o_ptr 店舗に並べるオブジェクト構造体の参照ポインタ
2149 * @param greed 店主の強欲度
2150 * @param flip TRUEならば店主にとっての買取価格、FALSEなら売出価格を計算
2154 * This function takes into account the player's charisma, and the
2155 * shop-keepers friendliness, and the shop-keeper's base greed, but
2156 * never lets a shop-keeper lose money in a transaction.
2157 * The "greed" value should exceed 100 when the player is "buying" the
2158 * item, and should be less than 100 when the player is "selling" it.
2159 * Hack -- the black market always charges twice as much as it should.
2160 * Charisma adjustment runs from 80 to 130
2161 * Racial adjustment runs from 95 to 130
2162 * Since greed/charisma/racial adjustments are centered at 100, we need
2163 * to adjust (by 200) to extract a usable multiplier. Note that the
2164 * "greed" value is always something (?).
2167 static s32b price_item(object_type *o_ptr, int greed, bool flip)
2174 /* Get the value of one of the items */
2175 price = object_value(o_ptr);
2177 /* Worthless items */
2178 if (price <= 0) return (0L);
2181 /* Compute the racial factor */
2182 factor = rgold_adj[ot_ptr->owner_race][p_ptr->prace];
2184 /* Add in the charisma factor */
2185 factor += adj_chr_gold[p_ptr->stat_ind[A_CHR]];
2188 /* Shop is buying */
2191 /* Adjust for greed */
2192 adjust = 100 + (300 - (greed + factor));
2194 /* Never get "silly" */
2195 if (adjust > 100) adjust = 100;
2197 /* Mega-Hack -- Black market sucks */
2198 if (cur_store_num == STORE_BLACK)
2201 /* Compute the final price (with rounding) */
2202 /* Hack -- prevent underflow */
2203 price = (price * adjust + 50L) / 100L;
2206 /* Shop is selling */
2209 /* Adjust for greed */
2210 adjust = 100 + ((greed + factor) - 300);
2212 /* Never get "silly" */
2213 if (adjust < 100) adjust = 100;
2215 /* Mega-Hack -- Black market sucks */
2216 if (cur_store_num == STORE_BLACK)
2219 /* Compute the final price (with rounding) */
2220 /* Hack -- prevent overflow */
2221 price = (s32b)(((u32b)price * (u32b)adjust + 50UL) / 100UL);
2224 /* Note -- Never become "free" */
2225 if (price <= 0L) return (1L);
2227 /* Return the price */
2233 * @brief 安価な消耗品の販売数を増やし、低確率で割引にする /
2234 * Certain "cheap" objects should be created in "piles"
2235 * @param o_ptr 店舗に並べるオブジェクト構造体の参照ポインタ
2239 * Some objects can be sold at a "discount" (in small piles)
2242 static void mass_produce(object_type *o_ptr)
2245 DISCOUNT_RATE discount = 0;
2247 s32b cost = object_value(o_ptr);
2250 /* Analyze the type */
2251 switch (o_ptr->tval)
2253 /* Food, Flasks, and Lites */
2258 if (cost <= 5L) size += damroll(3, 5);
2259 if (cost <= 20L) size += damroll(3, 5);
2260 if (cost <= 50L) size += damroll(2, 2);
2267 if (cost <= 60L) size += damroll(3, 5);
2268 if (cost <= 240L) size += damroll(1, 5);
2269 if (o_ptr->sval == SV_SCROLL_STAR_IDENTIFY) size += damroll(3, 5);
2270 if (o_ptr->sval == SV_SCROLL_STAR_REMOVE_CURSE) size += damroll(1, 4);
2275 case TV_SORCERY_BOOK:
2276 case TV_NATURE_BOOK:
2280 case TV_ARCANE_BOOK:
2282 case TV_DAEMON_BOOK:
2283 case TV_CRUSADE_BOOK:
2285 case TV_HISSATSU_BOOK:
2288 if (cost <= 50L) size += damroll(2, 3);
2289 if (cost <= 500L) size += damroll(1, 3);
2307 if (object_is_artifact(o_ptr)) break;
2308 if (object_is_ego(o_ptr)) break;
2309 if (cost <= 10L) size += damroll(3, 5);
2310 if (cost <= 100L) size += damroll(3, 5);
2319 if (cost <= 5L) size += damroll(5, 5);
2320 if (cost <= 50L) size += damroll(5, 5);
2321 if (cost <= 500L) size += damroll(5, 5);
2327 if (cost <= 100L) size += damroll(2, 2);
2328 if (cost <= 1000L) size += damroll(2, 2);
2341 * Because many rods (and a few wands and staffs) are useful mainly
2342 * in quantity, the Black Market will occasionally have a bunch of
2349 if ((cur_store_num == STORE_BLACK) && one_in_(3))
2351 if (cost < 1601L) size += damroll(1, 5);
2352 else if (cost < 3201L) size += damroll(1, 3);
2359 /* Pick a discount */
2364 else if (one_in_(25))
2368 else if (one_in_(150))
2372 else if (one_in_(300))
2376 else if (one_in_(500))
2381 if (o_ptr->art_name)
2386 /* Save the discount */
2387 o_ptr->discount = discount;
2389 /* Save the total pile size */
2390 o_ptr->number = size - (size * discount / 100);
2392 /* Ensure that mass-produced rods and wands get the correct pvals. */
2393 if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
2395 o_ptr->pval *= (PARAMETER_VALUE)o_ptr->number;
2402 * @brief 店舗に並べた品を同一品であるかどうか判定する /
2403 * Determine if a store item can "absorb" another item
2404 * @param o_ptr 判定するオブジェクト構造体の参照ポインタ1
2405 * @param j_ptr 判定するオブジェクト構造体の参照ポインタ2
2406 * @return 同一扱いできるならTRUEを返す
2409 * See "object_similar()" for the same function for the "player"
2412 static bool store_object_similar(object_type *o_ptr, object_type *j_ptr)
2416 /* Hack -- Identical items cannot be stacked */
2417 if (o_ptr == j_ptr) return (0);
2419 /* Different objects cannot be stacked */
2420 if (o_ptr->k_idx != j_ptr->k_idx) return (0);
2422 /* Different charges (etc) cannot be stacked, unless wands or rods. */
2423 if ((o_ptr->pval != j_ptr->pval) && (o_ptr->tval != TV_WAND) && (o_ptr->tval != TV_ROD)) return (0);
2425 /* Require many identical values */
2426 if (o_ptr->to_h != j_ptr->to_h) return (0);
2427 if (o_ptr->to_d != j_ptr->to_d) return (0);
2428 if (o_ptr->to_a != j_ptr->to_a) return (0);
2430 /* Require identical "ego-item" names */
2431 if (o_ptr->name2 != j_ptr->name2) return (0);
2433 /* Artifacts don't stack! */
2434 if (object_is_artifact(o_ptr) || object_is_artifact(j_ptr)) return (0);
2436 /* Hack -- Identical art_flags! */
2437 for (i = 0; i < TR_FLAG_SIZE; i++)
2438 if (o_ptr->art_flags[i] != j_ptr->art_flags[i]) return (0);
2440 /* Hack -- Never stack "powerful" items */
2441 if (o_ptr->xtra1 || j_ptr->xtra1) return (0);
2443 /* Hack -- Never stack recharging items */
2444 if (o_ptr->timeout || j_ptr->timeout) return (0);
2446 /* Require many identical values */
2447 if (o_ptr->ac != j_ptr->ac) return (0);
2448 if (o_ptr->dd != j_ptr->dd) return (0);
2449 if (o_ptr->ds != j_ptr->ds) return (0);
2451 /* Hack -- Never stack chests */
2452 if (o_ptr->tval == TV_CHEST) return (0);
2453 if (o_ptr->tval == TV_STATUE) return (0);
2454 if (o_ptr->tval == TV_CAPTURE) return (0);
2456 /* Require matching discounts */
2457 if (o_ptr->discount != j_ptr->discount) return (0);
2459 /* They match, so they must be similar */
2465 * @brief 店舗に並べた品を重ね合わせできるかどうか判定する /
2466 * Allow a store item to absorb another item
2467 * @param o_ptr 判定するオブジェクト構造体の参照ポインタ1
2468 * @param j_ptr 判定するオブジェクト構造体の参照ポインタ2
2469 * @return 重ね合わせできるならTRUEを返す
2472 * See "object_similar()" for the same function for the "player"
2475 static void store_object_absorb(object_type *o_ptr, object_type *j_ptr)
2477 int max_num = (o_ptr->tval == TV_ROD) ?
2478 MIN(99, MAX_SHORT / k_info[o_ptr->k_idx].pval) : 99;
2479 int total = o_ptr->number + j_ptr->number;
2480 int diff = (total > max_num) ? total - max_num : 0;
2482 /* Combine quantity, lose excess items */
2483 o_ptr->number = (total > max_num) ? max_num : total;
2485 /* Hack -- if rods are stacking, add the pvals (maximum timeouts) together. -LM- */
2486 if (o_ptr->tval == TV_ROD)
2488 o_ptr->pval += j_ptr->pval * (j_ptr->number - diff) / j_ptr->number;
2491 /* Hack -- if wands are stacking, combine the charges. -LM- */
2492 if (o_ptr->tval == TV_WAND)
2494 o_ptr->pval += j_ptr->pval * (j_ptr->number - diff) / j_ptr->number;
2500 * @brief 店舗に品を置くスペースがあるかどうかの判定を返す /
2501 * Check to see if the shop will be carrying too many objects -RAK-
2502 * @param o_ptr 店舗に置きたいオブジェクト構造体の参照ポインタ
2503 * @return 置き場がないなら0、重ね合わせできるアイテムがあるなら-1、スペースがあるなら1を返す。
2506 * Note that the shop, just like a player, will not accept things
2507 * it cannot hold. Before, one could "nuke" potions this way.
2508 * Return value is now int:
2510 * -1 : Can be combined to existing slot.
2511 * 1 : Cannot be combined but there are empty spaces.
2514 static int store_check_num(object_type *o_ptr)
2519 /* The "home" acts like the player */
2520 if ((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM))
2522 bool old_stack_force_notes = stack_force_notes;
2523 bool old_stack_force_costs = stack_force_costs;
2525 if (cur_store_num != STORE_HOME)
2527 stack_force_notes = FALSE;
2528 stack_force_costs = FALSE;
2531 /* Check all the items */
2532 for (i = 0; i < st_ptr->stock_num; i++)
2534 /* Get the existing item */
2535 j_ptr = &st_ptr->stock[i];
2537 /* Can the new object be combined with the old one? */
2538 if (object_similar(j_ptr, o_ptr))
2540 if (cur_store_num != STORE_HOME)
2542 stack_force_notes = old_stack_force_notes;
2543 stack_force_costs = old_stack_force_costs;
2550 if (cur_store_num != STORE_HOME)
2552 stack_force_notes = old_stack_force_notes;
2553 stack_force_costs = old_stack_force_costs;
2557 /* Normal stores do special stuff */
2560 /* Check all the items */
2561 for (i = 0; i < st_ptr->stock_num; i++)
2563 /* Get the existing item */
2564 j_ptr = &st_ptr->stock[i];
2566 /* Can the new object be combined with the old one? */
2567 if (store_object_similar(j_ptr, o_ptr)) return -1;
2571 /* Free space is always usable */
2573 * オプション powerup_home が設定されていると
2576 if ((cur_store_num == STORE_HOME) && ( powerup_home == FALSE )) {
2577 if (st_ptr->stock_num < ((st_ptr->stock_size) / 10)) {
2582 if (st_ptr->stock_num < st_ptr->stock_size) {
2587 /* But there was no room at the inn... */
2592 * @brief オブジェクトが祝福されているかの判定を返す /
2593 * @param o_ptr 判定したいオブジェクト構造体の参照ポインタ
2594 * @return アイテムが祝福されたアイテムならばTRUEを返す
2596 static bool is_blessed(object_type *o_ptr)
2598 BIT_FLAGS flgs[TR_FLAG_SIZE];
2599 object_flags(o_ptr, flgs);
2600 if (have_flag(flgs, TR_BLESSED)) return (TRUE);
2601 else return (FALSE);
2607 * @brief オブジェクトが所定の店舗で引き取れるかどうかを返す /
2608 * Determine if the current store will purchase the given item
2609 * @param o_ptr 判定したいオブジェクト構造体の参照ポインタ
2610 * @return アイテムが買い取れるならばTRUEを返す
2612 * Note that a shop-keeper must refuse to buy "worthless" items
2614 static bool store_will_buy(object_type *o_ptr)
2616 /* Hack -- The Home is simple */
2617 if ((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM)) return (TRUE);
2619 /* Switch on the store */
2620 switch (cur_store_num)
2625 /* Analyze the type */
2626 switch (o_ptr->tval)
2629 if (o_ptr->sval != SV_POTION_WATER) return FALSE;
2641 case TV_BOTTLE: /* 'Green', recycling Angband */
2656 /* Analyze the type */
2657 switch (o_ptr->tval)
2678 /* Analyze the type */
2679 switch (o_ptr->tval)
2688 case TV_HISSATSU_BOOK:
2692 if(o_ptr->sval == SV_WIZSTAFF) return (FALSE);
2704 /* Analyze the type */
2705 switch (o_ptr->tval)
2708 case TV_CRUSADE_BOOK:
2718 monster_race *r_ptr = &r_info[o_ptr->pval];
2721 if (!(r_ptr->flags3 & RF3_EVIL))
2724 if (r_ptr->flags3 & RF3_GOOD) break;
2726 /* Accept animals */
2727 if (r_ptr->flags3 & RF3_ANIMAL) break;
2730 if (my_strchr("?!", r_ptr->d_char)) break;
2736 if (is_blessed(o_ptr)) break;
2745 case STORE_ALCHEMIST:
2747 /* Analyze the type */
2748 switch (o_ptr->tval)
2762 /* Analyze the type */
2763 switch (o_ptr->tval)
2765 case TV_SORCERY_BOOK:
2766 case TV_NATURE_BOOK:
2770 case TV_ARCANE_BOOK:
2772 case TV_DAEMON_BOOK:
2786 if(o_ptr->sval == SV_WIZSTAFF) break;
2787 else return (FALSE);
2794 /* Bookstore Shop */
2797 /* Analyze the type */
2798 switch (o_ptr->tval)
2800 case TV_SORCERY_BOOK:
2801 case TV_NATURE_BOOK:
2806 case TV_ARCANE_BOOK:
2808 case TV_DAEMON_BOOK:
2809 case TV_CRUSADE_BOOK:
2820 /* Ignore "worthless" items */
2821 if (object_value(o_ptr) <= 0) return (FALSE);
2829 * @brief 現在の町の指定された店舗のアイテムを整理する /
2830 * Combine and reorder items in store.
2831 * @param store_num 店舗ID
2832 * @return 実際に整理が行われたならばTRUEを返す。
2834 bool combine_and_reorder_home(int store_num)
2838 object_type forge, *o_ptr, *j_ptr;
2839 bool flag = FALSE, combined;
2840 store_type *old_st_ptr = st_ptr;
2841 bool old_stack_force_notes = stack_force_notes;
2842 bool old_stack_force_costs = stack_force_costs;
2844 st_ptr = &town[1].store[store_num];
2845 if (store_num != STORE_HOME)
2847 stack_force_notes = FALSE;
2848 stack_force_costs = FALSE;
2855 /* Combine the items in the home (backwards) */
2856 for (i = st_ptr->stock_num - 1; i > 0; i--)
2858 o_ptr = &st_ptr->stock[i];
2860 /* Skip empty items */
2861 if (!o_ptr->k_idx) continue;
2863 /* Scan the items above that item */
2864 for (j = 0; j < i; j++)
2868 j_ptr = &st_ptr->stock[j];
2870 /* Skip empty items */
2871 if (!j_ptr->k_idx) continue;
2874 * Get maximum number of the stack if these
2875 * are similar, get zero otherwise.
2877 max_num = object_similar_part(j_ptr, o_ptr);
2879 /* Can we (partialy) drop "o_ptr" onto "j_ptr"? */
2880 if (max_num && j_ptr->number < max_num)
2882 if (o_ptr->number + j_ptr->number <= max_num)
2884 /* Add together the item counts */
2885 object_absorb(j_ptr, o_ptr);
2887 /* One object is gone */
2888 st_ptr->stock_num--;
2890 /* Slide everything down */
2891 for (k = i; k < st_ptr->stock_num; k++)
2893 /* Structure copy */
2894 st_ptr->stock[k] = st_ptr->stock[k + 1];
2897 /* Erase the "final" slot */
2898 object_wipe(&st_ptr->stock[k]);
2902 ITEM_NUMBER old_num = o_ptr->number;
2903 ITEM_NUMBER remain = j_ptr->number + o_ptr->number - max_num;
2905 /* Add together the item counts */
2906 object_absorb(j_ptr, o_ptr);
2908 o_ptr->number = remain;
2910 /* Hack -- if rods are stacking, add the pvals (maximum timeouts) and current timeouts together. -LM- */
2911 if (o_ptr->tval == TV_ROD)
2913 o_ptr->pval = o_ptr->pval * remain / old_num;
2914 o_ptr->timeout = o_ptr->timeout * remain / old_num;
2917 /* Hack -- if wands are stacking, combine the charges. -LM- */
2918 else if (o_ptr->tval == TV_WAND)
2920 o_ptr->pval = o_ptr->pval * remain / old_num;
2935 /* Re-order the items in the home (forwards) */
2936 for (i = 0; i < st_ptr->stock_num; i++)
2938 o_ptr = &st_ptr->stock[i];
2940 /* Skip empty slots */
2941 if (!o_ptr->k_idx) continue;
2943 /* Get the "value" of the item */
2944 o_value = object_value(o_ptr);
2946 /* Scan every occupied slot */
2947 for (j = 0; j < st_ptr->stock_num; j++)
2949 if (object_sort_comp(o_ptr, o_value, &st_ptr->stock[j])) break;
2952 /* Never move down */
2953 if (j >= i) continue;
2959 /* Save a copy of the moving item */
2960 object_copy(j_ptr, &st_ptr->stock[i]);
2962 /* Slide the objects */
2963 for (k = i; k > j; k--)
2965 /* Slide the item */
2966 object_copy(&st_ptr->stock[k], &st_ptr->stock[k - 1]);
2969 /* Insert the moving item */
2970 object_copy(&st_ptr->stock[j], j_ptr);
2973 st_ptr = old_st_ptr;
2974 if (store_num != STORE_HOME)
2976 stack_force_notes = old_stack_force_notes;
2977 stack_force_costs = old_stack_force_costs;
2985 * @brief 我が家にオブジェクトを加える /
2986 * Add the item "o_ptr" to the inventory of the "Home"
2987 * @param o_ptr 加えたいオブジェクトの構造体参照ポインタ
2991 * In all cases, return the slot (or -1) where the object was placed
2992 * Note that this is a hacked up version of "inven_carry()".
2993 * Also note that it may not correctly "adapt" to "knowledge" bacoming
2994 * known, the player may have to pick stuff up and drop it again.
2997 static int home_carry(object_type *o_ptr)
3003 bool old_stack_force_notes = stack_force_notes;
3004 bool old_stack_force_costs = stack_force_costs;
3006 if (cur_store_num != STORE_HOME)
3008 stack_force_notes = FALSE;
3009 stack_force_costs = FALSE;
3012 /* Check each existing item (try to combine) */
3013 for (slot = 0; slot < st_ptr->stock_num; slot++)
3015 /* Get the existing item */
3016 j_ptr = &st_ptr->stock[slot];
3018 /* The home acts just like the player */
3019 if (object_similar(j_ptr, o_ptr))
3021 /* Save the new number of items */
3022 object_absorb(j_ptr, o_ptr);
3024 if (cur_store_num != STORE_HOME)
3026 stack_force_notes = old_stack_force_notes;
3027 stack_force_costs = old_stack_force_costs;
3035 if (cur_store_num != STORE_HOME)
3037 stack_force_notes = old_stack_force_notes;
3038 stack_force_costs = old_stack_force_costs;
3043 * 隠し機能: オプション powerup_home が設定されていると
3047 if ((cur_store_num != STORE_HOME) || (powerup_home == TRUE)) {
3048 if (st_ptr->stock_num >= st_ptr->stock_size) {
3053 if (st_ptr->stock_num >= ((st_ptr->stock_size) / 10)) {
3059 /* Determine the "value" of the item */
3060 value = object_value(o_ptr);
3062 /* Check existing slots to see if we must "slide" */
3063 for (slot = 0; slot < st_ptr->stock_num; slot++)
3065 if (object_sort_comp(o_ptr, value, &st_ptr->stock[slot])) break;
3068 /* Slide the others up */
3069 for (i = st_ptr->stock_num; i > slot; i--)
3071 st_ptr->stock[i] = st_ptr->stock[i-1];
3074 /* More stuff now */
3075 st_ptr->stock_num++;
3077 /* Insert the new item */
3078 st_ptr->stock[slot] = *o_ptr;
3080 chg_virtue(V_SACRIFICE, -1);
3082 (void)combine_and_reorder_home(cur_store_num);
3084 /* Return the location */
3090 * @brief 店舗にオブジェクトを加える /
3091 * Add the item "o_ptr" to a real stores inventory.
3092 * @param o_ptr 加えたいオブジェクトの構造体参照ポインタ
3096 * In all cases, return the slot (or -1) where the object was placed
3097 * Note that this is a hacked up version of "inven_carry()".
3098 * Also note that it may not correctly "adapt" to "knowledge" bacoming
3099 * known, the player may have to pick stuff up and drop it again.
3102 static int store_carry(object_type *o_ptr)
3105 s32b value, j_value;
3109 /* Evaluate the object */
3110 value = object_value(o_ptr);
3112 /* Cursed/Worthless items "disappear" when sold */
3113 if (value <= 0) return (-1);
3115 /* All store items are fully *identified* */
3116 o_ptr->ident |= IDENT_MENTAL;
3118 /* Erase the inscription */
3119 o_ptr->inscription = 0;
3121 /* Erase the "feeling" */
3122 o_ptr->feeling = FEEL_NONE;
3124 /* Check each existing item (try to combine) */
3125 for (slot = 0; slot < st_ptr->stock_num; slot++)
3127 /* Get the existing item */
3128 j_ptr = &st_ptr->stock[slot];
3130 /* Can the existing items be incremented? */
3131 if (store_object_similar(j_ptr, o_ptr))
3133 /* Hack -- extra items disappear */
3134 store_object_absorb(j_ptr, o_ptr);
3142 if (st_ptr->stock_num >= st_ptr->stock_size) return (-1);
3145 /* Check existing slots to see if we must "slide" */
3146 for (slot = 0; slot < st_ptr->stock_num; slot++)
3149 j_ptr = &st_ptr->stock[slot];
3151 /* Objects sort by decreasing type */
3152 if (o_ptr->tval > j_ptr->tval) break;
3153 if (o_ptr->tval < j_ptr->tval) continue;
3155 /* Objects sort by increasing sval */
3156 if (o_ptr->sval < j_ptr->sval) break;
3157 if (o_ptr->sval > j_ptr->sval) continue;
3160 * Hack: otherwise identical rods sort by
3161 * increasing recharge time --dsb
3163 if (o_ptr->tval == TV_ROD)
3165 if (o_ptr->pval < j_ptr->pval) break;
3166 if (o_ptr->pval > j_ptr->pval) continue;
3169 /* Evaluate that slot */
3170 j_value = object_value(j_ptr);
3172 /* Objects sort by decreasing value */
3173 if (value > j_value) break;
3174 if (value < j_value) continue;
3177 /* Slide the others up */
3178 for (i = st_ptr->stock_num; i > slot; i--)
3180 st_ptr->stock[i] = st_ptr->stock[i-1];
3183 /* More stuff now */
3184 st_ptr->stock_num++;
3186 /* Insert the new item */
3187 st_ptr->stock[slot] = *o_ptr;
3189 /* Return the location */
3195 * @brief 店舗のオブジェクト数を増やす /
3196 * Add the item "o_ptr" to a real stores inventory.
3197 * @param item 増やしたいアイテムのID
3202 * Increase, by a given amount, the number of a certain item
3203 * in a certain store. This can result in zero items.
3205 * @todo numは本来ITEM_NUMBER型にしたい。
3207 static void store_item_increase(INVENTORY_IDX item, int num)
3212 o_ptr = &st_ptr->stock[item];
3214 /* Verify the number */
3215 cnt = o_ptr->number + num;
3216 if (cnt > 255) cnt = 255;
3217 else if (cnt < 0) cnt = 0;
3218 num = cnt - o_ptr->number;
3220 /* Save the new number */
3221 o_ptr->number += (ITEM_NUMBER)num;
3226 * @brief 店舗のオブジェクト数を削除する /
3227 * Remove a slot if it is empty
3228 * @param item 削除したいアイテムのID
3231 static void store_item_optimize(INVENTORY_IDX item)
3236 o_ptr = &st_ptr->stock[item];
3239 if (!o_ptr->k_idx) return;
3241 /* Must have no items */
3242 if (o_ptr->number) return;
3245 st_ptr->stock_num--;
3247 /* Slide everyone */
3248 for (j = item; j < st_ptr->stock_num; j++)
3250 st_ptr->stock[j] = st_ptr->stock[j + 1];
3253 /* Nuke the final slot */
3254 object_wipe(&st_ptr->stock[j]);
3258 * @brief ブラックマーケット用の無価値品の排除判定 /
3259 * This function will keep 'crap' out of the black market.
3260 * @param o_ptr 判定したいオブジェクトの構造体参照ポインタ
3261 * @return ブラックマーケットにとって無価値な品ならばTRUEを返す
3264 * Crap is defined as any item that is "available" elsewhere
3265 * Based on a suggestion by "Lee Vogt" <lvogt@cig.mcel.mot.com>
3268 static bool black_market_crap(object_type *o_ptr)
3272 /* Ego items are never crap */
3273 if (object_is_ego(o_ptr)) return (FALSE);
3275 /* Good items are never crap */
3276 if (o_ptr->to_a > 0) return (FALSE);
3277 if (o_ptr->to_h > 0) return (FALSE);
3278 if (o_ptr->to_d > 0) return (FALSE);
3280 /* Check all stores */
3281 for (i = 0; i < MAX_STORES; i++)
3283 if (i == STORE_HOME) continue;
3284 if (i == STORE_MUSEUM) continue;
3286 /* Check every item in the store */
3287 for (j = 0; j < town[p_ptr->town_num].store[i].stock_num; j++)
3289 object_type *j_ptr = &town[p_ptr->town_num].store[i].stock[j];
3291 /* Duplicate item "type", assume crappy */
3292 if (o_ptr->k_idx == j_ptr->k_idx) return (TRUE);
3302 * @brief 店舗の品揃え変化のためにアイテムを削除する /
3303 * Attempt to delete (some of) a random item from the store
3307 * Hack -- we attempt to "maintain" piles of items when possible.
3310 static void store_delete(void)
3315 /* Pick a random slot */
3316 what = (INVENTORY_IDX)randint0(st_ptr->stock_num);
3318 /* Determine how many items are here */
3319 num = st_ptr->stock[what].number;
3321 /* Hack -- sometimes, only destroy half the items */
3322 if (randint0(100) < 50) num = (num + 1) / 2;
3324 /* Hack -- sometimes, only destroy a single item */
3325 if (randint0(100) < 50) num = 1;
3327 /* Hack -- decrement the maximum timeouts and total charges of rods and wands. -LM- */
3328 if ((st_ptr->stock[what].tval == TV_ROD) || (st_ptr->stock[what].tval == TV_WAND))
3330 st_ptr->stock[what].pval -= num * st_ptr->stock[what].pval / st_ptr->stock[what].number;
3333 /* Actually destroy (part of) the item */
3334 store_item_increase(what, -num);
3335 store_item_optimize(what);
3340 * @brief 店舗の品揃え変化のためにアイテムを追加する /
3341 * Creates a random item and gives it to a store
3345 * This algorithm needs to be rethought. A lot.
3346 * Currently, "normal" stores use a pre-built array.
3347 * Note -- the "level" given to "obj_get_num()" is a "favored"
3348 * level, that is, there is a much higher chance of getting
3349 * items with a level approaching that of the given level...
3350 * Should we check for "permission" to have the given item?
3353 static void store_create(void)
3363 /* Paranoia -- no room left */
3364 if (st_ptr->stock_num >= st_ptr->stock_size) return;
3367 /* Hack -- consider up to four items */
3368 for (tries = 0; tries < 4; tries++)
3371 if (cur_store_num == STORE_BLACK)
3373 /* Pick a level for object/magic */
3374 level = 25 + randint0(25);
3376 /* Random item (usually of given level) */
3377 i = get_obj_num(level);
3379 /* Handle failure */
3386 /* Hack -- Pick an item to sell */
3387 i = st_ptr->table[randint0(st_ptr->table_num)];
3389 /* Hack -- fake level for apply_magic() */
3390 level = rand_range(1, STORE_OBJ_LEVEL);
3395 /* Create a new object of the chosen kind */
3396 object_prep(q_ptr, i);
3398 /* Apply some "low-level" magic (no artifacts) */
3399 apply_magic(q_ptr, level, AM_NO_FIXED_ART);
3401 /* Require valid object */
3402 if (!store_will_buy(q_ptr)) continue;
3404 /* Hack -- Charge lite's */
3405 if (q_ptr->tval == TV_LITE)
3407 if (q_ptr->sval == SV_LITE_TORCH) q_ptr->xtra4 = FUEL_TORCH / 2;
3408 if (q_ptr->sval == SV_LITE_LANTERN) q_ptr->xtra4 = FUEL_LAMP / 2;
3412 /* The item is "known" */
3413 object_known(q_ptr);
3415 /* Mark it storebought */
3416 q_ptr->ident |= IDENT_STORE;
3418 /* Mega-Hack -- no chests in stores */
3419 if (q_ptr->tval == TV_CHEST) continue;
3421 /* Prune the black market */
3422 if (cur_store_num == STORE_BLACK)
3424 /* Hack -- No "crappy" items */
3425 if (black_market_crap(q_ptr)) continue;
3427 /* Hack -- No "cheap" items */
3428 if (object_value(q_ptr) < 10) continue;
3430 /* No "worthless" items */
3431 /* if (object_value(q_ptr) <= 0) continue; */
3434 /* Prune normal stores */
3437 /* No "worthless" items */
3438 if (object_value(q_ptr) <= 0) continue;
3442 /* Mass produce and/or Apply discount */
3443 mass_produce(q_ptr);
3445 /* Attempt to carry the (known) item */
3446 (void)store_carry(q_ptr);
3448 /* Definitely done */
3455 * @brief 店舗の割引対象外にするかどうかを判定 /
3456 * Eliminate need to bargain if player has haggled well in the past
3457 * @param minprice アイテムの最低販売価格
3458 * @return 割引を禁止するならTRUEを返す。
3460 static bool noneedtobargain(PRICE minprice)
3462 s32b good = st_ptr->good_buy;
3463 s32b bad = st_ptr->bad_buy;
3465 /* Cheap items are "boring" */
3466 if (minprice < 10L) return (TRUE);
3468 /* Perfect haggling */
3469 if (good == MAX_SHORT) return (TRUE);
3471 /* Reward good haggles, punish bad haggles, notice price */
3472 if (good > ((3 * bad) + (5 + (minprice/50)))) return (TRUE);
3474 /* Return the flag */
3480 * @brief 店主の持つプレイヤーに対する売買の良し悪し経験を記憶する /
3481 * Update the bargain info
3482 * @param price 実際の取引価格
3483 * @param minprice 店主の提示した価格
3487 static void updatebargain(PRICE price, PRICE minprice, int num)
3489 /* Hack -- auto-haggle */
3490 if (!manual_haggle) return;
3492 /* Cheap items are "boring" */
3493 if ((minprice/num) < 10L) return;
3495 /* Count the successful haggles */
3496 if (price == minprice)
3498 /* Just count the good haggles */
3499 if (st_ptr->good_buy < MAX_SHORT)
3505 /* Count the failed haggles */
3508 /* Just count the bad haggles */
3509 if (st_ptr->bad_buy < MAX_SHORT)
3518 * @brief 店の商品リストを再表示する /
3519 * Re-displays a single store entry
3523 static void display_entry(int pos)
3529 GAME_TEXT o_name[MAX_NLEN];
3534 o_ptr = &st_ptr->stock[pos];
3536 /* Get the "offset" */
3537 i = (pos % store_bottom);
3539 /* Label it, clear the line --(-- */
3540 (void)sprintf(out_val, "%c) ", ((i > 25) ? toupper(I2A(i - 26)) : I2A(i)));
3541 prt(out_val, i+6, 0);
3544 if (show_item_graph)
3546 TERM_COLOR a = object_attr(o_ptr);
3547 SYMBOL_CODE c = object_char(o_ptr);
3549 Term_queue_bigchar(cur_col, i + 6, a, c, 0, 0);
3550 if (use_bigtile) cur_col++;
3555 /* Describe an item in the home */
3556 if ((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM))
3560 /* Leave room for weights, if necessary -DRS- */
3561 if (show_weights) maxwid -= 10;
3563 object_desc(o_name, o_ptr, 0);
3564 o_name[maxwid] = '\0';
3565 c_put_str(tval_to_attr[o_ptr->tval], o_name, i+6, cur_col);
3570 /* Only show the weight of an individual item */
3571 WEIGHT wgt = o_ptr->weight;
3573 sprintf(out_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
3574 put_str(out_val, i+6, 67);
3576 (void)sprintf(out_val, "%3d.%d lb", wgt / 10, wgt % 10);
3577 put_str(out_val, i+6, 68);
3583 /* Describe an item (fully) in a store */
3586 /* Must leave room for the "price" */
3589 /* Leave room for weights, if necessary -DRS- */
3590 if (show_weights) maxwid -= 7;
3592 /* Describe the object (fully) */
3593 object_desc(o_name, o_ptr, 0);
3594 o_name[maxwid] = '\0';
3595 c_put_str(tval_to_attr[o_ptr->tval], o_name, i+6, cur_col);
3600 /* Only show the weight of an individual item */
3601 int wgt = o_ptr->weight;
3603 sprintf(out_val, "%3d.%1d", lbtokg1(wgt) , lbtokg2(wgt) );
3604 put_str(out_val, i+6, 60);
3606 (void)sprintf(out_val, "%3d.%d", wgt / 10, wgt % 10);
3607 put_str(out_val, i+6, 61);
3612 /* Display a "fixed" cost */
3613 if (o_ptr->ident & (IDENT_FIXED))
3615 /* Extract the "minimum" price */
3616 x = price_item(o_ptr, ot_ptr->min_inflate, FALSE);
3618 /* Actually draw the price (not fixed) */
3620 (void)sprintf(out_val, "%9ld固", (long)x);
3622 (void)sprintf(out_val, "%9ld F", (long)x);
3625 put_str(out_val, i+6, 68);
3628 /* Display a "taxed" cost */
3629 else if (!manual_haggle)
3631 /* Extract the "minimum" price */
3632 x = price_item(o_ptr, ot_ptr->min_inflate, FALSE);
3634 /* Hack -- Apply Sales Tax if needed */
3635 if (!noneedtobargain(x)) x += x / 10;
3637 /* Actually draw the price (with tax) */
3638 (void)sprintf(out_val, "%9ld ", (long)x);
3639 put_str(out_val, i+6, 68);
3642 /* Display a "haggle" cost */
3645 /* Extrect the "maximum" price */
3646 x = price_item(o_ptr, ot_ptr->max_inflate, FALSE);
3648 /* Actually draw the price (not fixed) */
3649 (void)sprintf(out_val, "%9ld ", (long)x);
3650 put_str(out_val, i+6, 68);
3657 * @brief 店の商品リストを表示する /
3658 * Displays a store's inventory -RAK-
3661 * All prices are listed as "per individual object". -BEN-
3663 static void display_inventory(void)
3667 /* Display the next 12 items */
3668 for (k = 0; k < store_bottom; k++)
3670 /* Do not display "dead" items */
3671 if (store_top + k >= st_ptr->stock_num) break;
3673 /* Display that line */
3674 display_entry(store_top + k);
3677 /* Erase the extra lines and the "more" prompt */
3678 for (i = k; i < store_bottom + 1; i++) prt("", i + 6, 0);
3680 /* Assume "no current page" */
3682 put_str(" ", 5, 20);
3684 put_str(" ", 5, 20);
3688 /* Visual reminder of "more items" */
3689 if (st_ptr->stock_num > store_bottom)
3691 /* Show "more" reminder (after the last item) */
3693 prt("-続く-", k + 6, 3);
3695 prt("-more-", k + 6, 3);
3699 /* Indicate the "current page" */
3700 /* Trailing spaces are to display (Page xx) and (Page x) */
3702 put_str(format("(%dページ) ", store_top/store_bottom + 1), 5, 20);
3704 put_str(format("(Page %d) ", store_top/store_bottom + 1), 5, 20);
3709 if (cur_store_num == STORE_HOME || cur_store_num == STORE_MUSEUM)
3711 k = st_ptr->stock_size;
3713 if (cur_store_num == STORE_HOME && !powerup_home) k /= 10;
3715 put_str(format("アイテム数: %4d/%4d", st_ptr->stock_num, k), 19 + xtra_stock, 27);
3717 put_str(format("Objects: %4d/%4d", st_ptr->stock_num, k), 19 + xtra_stock, 30);
3724 * @brief プレイヤーの所持金を表示する /
3725 * Displays players gold -RAK-
3729 static void store_prt_gold(void)
3734 prt("手持ちのお金: ", 19 + xtra_stock, 53);
3736 prt("Gold Remaining: ", 19 + xtra_stock, 53);
3740 sprintf(out_val, "%9ld", (long)p_ptr->au);
3741 prt(out_val, 19 + xtra_stock, 68);
3745 * @brief 店舗情報全体を表示するメインルーチン /
3746 * Displays store (after clearing screen) -RAK-
3750 static void display_store(void)
3756 /* The "Home" is special */
3757 if (cur_store_num == STORE_HOME)
3759 /* Put the owner name */
3760 put_str(_("我が家", "Your Home"), 3, 31);
3762 /* Label the item descriptions */
3763 put_str(_("アイテムの一覧", "Item Description"), 5, 4);
3765 /* If showing weights, show label */
3768 put_str(_(" 重さ", "Weight"), 5, 70);
3772 /* The "Home" is special */
3773 else if (cur_store_num == STORE_MUSEUM)
3775 /* Put the owner name */
3776 put_str(_("博物館", "Museum"), 3, 31);
3778 /* Label the item descriptions */
3779 put_str(_("アイテムの一覧", "Item Description"), 5, 4);
3781 /* If showing weights, show label */
3784 put_str(_(" 重さ", "Weight"), 5, 70);
3791 concptr store_name = (f_name + f_info[cur_store_feat].name);
3792 concptr owner_name = (ot_ptr->owner_name);
3793 concptr race_name = race_info[ot_ptr->owner_race].title;
3795 /* Put the owner name and race */
3796 sprintf(buf, "%s (%s)", owner_name, race_name);
3797 put_str(buf, 3, 10);
3799 /* Show the max price in the store (above prices) */
3800 sprintf(buf, "%s (%ld)", store_name, (long)(ot_ptr->max_cost));
3803 /* Label the item descriptions */
3804 put_str(_("商品の一覧", "Item Description"), 5, 5);
3807 /* If showing weights, show label */
3810 put_str(_(" 重さ", "Weight"), 5, 60);
3813 /* Label the asking price (in stores) */
3814 put_str(_(" 価格", "Price"), 5, 72);
3817 /* Display the current gold */
3820 /* Draw in the inventory */
3821 display_inventory();
3827 * @brief 店舗からアイテムを選択する /
3828 * Get the ID of a store item and return its value -RAK-
3829 * @param com_val 選択IDを返す参照ポインタ
3830 * @param pmt メッセージキャプション
3833 * @return 実際に選択したらTRUE、キャンセルしたらFALSE
3835 static int get_stock(COMMAND_CODE *com_val, concptr pmt, int i, int j)
3841 /* Get the item index */
3842 if (repeat_pull(com_val))
3844 /* Verify the item */
3845 if ((*com_val >= i) && (*com_val <= j))
3855 /* Assume failure */
3858 /* Build the prompt */
3860 hi = (j > 25) ? toupper(I2A(j - 26)) : I2A(j);
3862 (void)sprintf(out_val, "(%s:%c-%c, ESCで中断) %s",
3863 (((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM)) ? "アイテム" : "商品"),
3866 (void)sprintf(out_val, "(Items %c-%c, ESC to exit) %s",
3871 /* Ask until done */
3877 if (!get_com(out_val, &command, FALSE)) break;
3880 if (islower(command))
3882 else if (isupper(command))
3883 k = A2I(tolower(command)) + 26;
3887 /* Legal responses */
3888 if ((k >= i) && (k <= j))
3897 /* Clear the prompt */
3900 if (command == ESCAPE) return (FALSE);
3902 repeat_push(*com_val);
3910 * @brief 店主の不満度を増やし、プレイヤーを締め出す判定と処理を行う /
3911 * Increase the insult counter and get angry if too many -RAK-
3912 * @return プレイヤーを締め出す場合TRUEを返す
3914 static int increase_insults(void)
3916 /* Increase insults */
3917 st_ptr->insult_cur++;
3919 /* Become insulted */
3920 if (st_ptr->insult_cur > ot_ptr->insult_max)
3926 st_ptr->insult_cur = 0;
3927 st_ptr->good_buy = 0;
3928 st_ptr->bad_buy = 0;
3931 st_ptr->store_open = turn + TURNS_PER_TICK*TOWN_DAWN/8 + randint1(TURNS_PER_TICK*TOWN_DAWN/8);
3943 * @brief 店主の不満度を減らす /
3944 * Decrease insults -RAK-
3945 * @return プレイヤーを締め出す場合TRUEを返す
3947 static void decrease_insults(void)
3949 /* Decrease insults */
3950 if (st_ptr->insult_cur) st_ptr->insult_cur--;
3955 * @brief 店主の不満度が増えた場合のみのメッセージを表示する /
3956 * Have insulted while haggling -RAK-
3957 * @return プレイヤーを締め出す場合TRUEを返す
3959 static int haggle_insults(void)
3961 /* Increase insults */
3962 if (increase_insults()) return (TRUE);
3964 /* Display and flush insult */
3973 * Mega-Hack -- Enable "increments"
3975 static bool allow_inc = FALSE;
3978 * Mega-Hack -- Last "increment" during haggling
3980 static s32b last_inc = 0L;
3984 * @brief 交渉価格を確認と認証の是非を行う /
3987 * @param poffer 別途価格提示をした場合の値を返す参照ポインタ
3988 * @param price 現在の交渉価格
3989 * @param final 最終確定価格ならばTRUE
3990 * @return プレイヤーを締め出す場合TRUEを返す
3992 static int get_haggle(concptr pmt, s32b *poffer, PRICE price, int final)
4002 /* Clear old increment if necessary */
4003 if (!allow_inc) last_inc = 0L;
4010 sprintf(buf, "%s [承諾] ", pmt);
4012 sprintf(buf, "%s [accept] ", pmt);
4017 /* Old (negative) increment, and not final */
4018 else if (last_inc < 0)
4021 sprintf(buf, "%s [-$%ld] ", pmt, (long)(ABS(last_inc)));
4023 sprintf(buf, "%s [-%ld] ", pmt, (long)(ABS(last_inc)));
4028 /* Old (positive) increment, and not final */
4029 else if (last_inc > 0)
4032 sprintf(buf, "%s [+$%ld] ", pmt, (long)(ABS(last_inc)));
4034 sprintf(buf, "%s [+%ld] ", pmt, (long)(ABS(last_inc)));
4042 sprintf(buf, "%s ", pmt);
4050 /* Ask until done */
4055 /* Display prompt */
4059 strcpy(out_val, "");
4062 * Ask the user for a response.
4063 * Don't allow to use numpad as cursor key.
4065 res = askfor_aux(out_val, 32, FALSE);
4071 if (!res) return FALSE;
4073 /* Skip leading spaces */
4074 for (p = out_val; *p == ' '; p++) /* loop */;
4076 /* Empty response */
4079 /* Accept current price */
4087 /* Use previous increment */
4088 if (allow_inc && last_inc)
4090 *poffer += last_inc;
4095 /* Normal response */
4098 /* Extract a number */
4101 /* Handle "incremental" number */
4102 if ((*p == '+' || *p == '-'))
4104 /* Allow increments */
4107 /* Use the given "increment" */
4114 /* Handle normal number */
4117 /* Use the given "number" */
4126 msg_print("値がおかしいです。");
4128 msg_print("Invalid response.");
4140 * @brief 店主がプレイヤーからの交渉価格を判断する /
4141 * Receive an offer (from the player)
4143 * @param poffer 店主からの交渉価格を返す参照ポインタ
4144 * @param last_offer 現在の交渉価格
4145 * @param factor 店主の価格基準倍率
4146 * @param price アイテムの実価値
4147 * @param final 最終価格確定ならばTRUE
4148 * @return プレイヤーの価格に対して不服ならばTRUEを返す /
4149 * Return TRUE if offer is NOT okay
4151 static bool receive_offer(concptr pmt, s32b *poffer,
4152 s32b last_offer, int factor,
4153 PRICE price, int final)
4155 /* Haggle till done */
4158 /* Get a haggle (or cancel) */
4159 if (!get_haggle(pmt, poffer, price, final)) return (TRUE);
4161 /* Acceptable offer */
4162 if (((*poffer) * factor) >= (last_offer * factor)) break;
4164 /* Insult, and check for kicked out */
4165 if (haggle_insults()) return (TRUE);
4167 /* Reject offer (correctly) */
4168 (*poffer) = last_offer;
4177 * @brief プレイヤーが購入する時の値切り処理メインルーチン /
4178 * Haggling routine -RAK-
4179 * @param o_ptr オブジェクトの構造体参照ポインタ
4180 * @param price 最終価格を返す参照ポインタ
4181 * @return プレイヤーの価格に対して店主が不服ならばTRUEを返す /
4182 * Return TRUE if purchase is NOT successful
4184 static bool purchase_haggle(object_type *o_ptr, s32b *price)
4186 s32b cur_ask, final_ask;
4187 s32b last_offer, offer;
4189 s32b min_per, max_per;
4190 int flag, loop_flag, noneed;
4191 int annoyed = 0, final = FALSE;
4193 bool cancel = FALSE;
4196 concptr pmt = "提示価格";
4198 concptr pmt = "Asking";
4208 /* Extract the starting offer and the final offer */
4209 cur_ask = price_item(o_ptr, ot_ptr->max_inflate, FALSE);
4210 final_ask = price_item(o_ptr, ot_ptr->min_inflate, FALSE);
4212 /* Determine if haggling is necessary */
4213 noneed = noneedtobargain(final_ask);
4215 /* No need to haggle */
4216 if (noneed || !manual_haggle)
4218 /* No need to haggle */
4221 /* Message summary */
4223 msg_print("結局この金額にまとまった。");
4225 msg_print("You eventually agree upon the price.");
4231 /* No haggle option */
4234 /* Message summary */
4236 msg_print("すんなりとこの金額にまとまった。");
4238 msg_print("You quickly agree upon the price.");
4243 /* Apply Sales Tax */
4244 final_ask += final_ask / 10;
4248 cur_ask = final_ask;
4250 /* Go to final offer */
4254 pmt = "Final Offer";
4261 /* Haggle for the whole pile */
4262 cur_ask *= o_ptr->number;
4263 final_ask *= o_ptr->number;
4266 /* Haggle parameters */
4267 min_per = ot_ptr->haggle_per;
4268 max_per = min_per * 3;
4270 /* Mega-Hack -- artificial "last offer" value */
4271 last_offer = object_value(o_ptr) * o_ptr->number;
4272 last_offer = last_offer * (200 - (int)(ot_ptr->max_inflate)) / 100L;
4273 if (last_offer <= 0) last_offer = 1;
4278 /* No incremental haggling yet */
4281 /* Haggle until done */
4282 for (flag = FALSE; !flag; )
4286 while (!flag && loop_flag)
4288 (void)sprintf(out_val, "%s : %ld", pmt, (long)cur_ask);
4289 put_str(out_val, 1, 0);
4291 cancel = receive_offer("提示する金額? ",
4293 cancel = receive_offer("What do you offer? ",
4296 &offer, last_offer, 1, cur_ask, final);
4302 else if (offer > cur_ask)
4307 else if (offer == cur_ask)
4320 x1 = 100 * (offer - last_offer) / (cur_ask - last_offer);
4323 if (haggle_insults())
4329 else if (x1 > max_per)
4332 if (x1 < max_per) x1 = max_per;
4334 x2 = rand_range(x1-2, x1+2);
4335 x3 = ((cur_ask - offer) * x2 / 100L) + 1;
4336 /* don't let the price go up */
4341 if (cur_ask < final_ask)
4344 cur_ask = final_ask;
4348 pmt = "Final Offer";
4354 (void)(increase_insults());
4359 else if (offer >= cur_ask)
4371 (void)sprintf(out_val, "前回の提示金額: $%ld",
4373 (void)sprintf(out_val, "Your last offer: %ld",
4377 put_str(out_val, 1, 39);
4378 say_comment_2(cur_ask, annoyed);
4383 if (cancel) return (TRUE);
4385 updatebargain(*price, final_ask, o_ptr->number);
4393 * @brief プレイヤーが売却する時の値切り処理メインルーチン /
4394 * Haggling routine -RAK-
4395 * @param o_ptr オブジェクトの構造体参照ポインタ
4396 * @param price 最終価格を返す参照ポインタ
4397 * @return プレイヤーの価格に対して店主が不服ならばTRUEを返す /
4398 * Return TRUE if purchase is NOT successful
4400 static bool sell_haggle(object_type *o_ptr, s32b *price)
4402 s32b purse, cur_ask, final_ask;
4403 s32b last_offer = 0, offer = 0;
4405 s32b min_per, max_per;
4406 int flag, loop_flag, noneed;
4407 int annoyed = 0, final = FALSE;
4408 bool cancel = FALSE;
4410 concptr pmt = "提示金額";
4412 concptr pmt = "Offer";
4421 /* Obtain the starting offer and the final offer */
4422 cur_ask = price_item(o_ptr, ot_ptr->max_inflate, TRUE);
4423 final_ask = price_item(o_ptr, ot_ptr->min_inflate, TRUE);
4425 /* Determine if haggling is necessary */
4426 noneed = noneedtobargain(final_ask);
4428 /* Get the owner's payout limit */
4429 purse = (s32b)(ot_ptr->max_cost);
4431 /* No need to haggle */
4432 if (noneed || !manual_haggle || (final_ask >= purse))
4434 /* Apply Sales Tax (if needed) */
4435 if (!manual_haggle && !noneed)
4437 final_ask -= final_ask / 10;
4440 /* No reason to haggle */
4441 if (final_ask >= purse)
4444 msg_print("即座にこの金額にまとまった。");
4446 msg_print("You instantly agree upon the price.");
4451 /* Offer full purse */
4455 /* No need to haggle */
4459 msg_print("結局この金額にまとまった。");
4461 msg_print("You eventually agree upon the price.");
4467 /* No haggle option */
4470 /* Message summary */
4472 msg_print("すんなりとこの金額にまとまった。");
4474 msg_print("You quickly agree upon the price.");
4481 cur_ask = final_ask;
4488 pmt = "Final Offer";
4493 /* Haggle for the whole pile */
4494 cur_ask *= o_ptr->number;
4495 final_ask *= o_ptr->number;
4498 /* Display commands */
4500 /* Haggling parameters */
4501 min_per = ot_ptr->haggle_per;
4502 max_per = min_per * 3;
4504 /* Mega-Hack -- artificial "last offer" value */
4505 last_offer = object_value(o_ptr) * o_ptr->number;
4506 last_offer = last_offer * ot_ptr->max_inflate / 100L;
4511 /* No incremental haggling yet */
4515 for (flag = FALSE; !flag; )
4521 (void)sprintf(out_val, "%s : %ld", pmt, (long)cur_ask);
4522 put_str(out_val, 1, 0);
4524 cancel = receive_offer("提示する価格? ",
4526 cancel = receive_offer("What price do you ask? ",
4529 &offer, last_offer, -1, cur_ask, final);
4535 else if (offer < cur_ask)
4538 /* rejected, reset offer for incremental haggling */
4541 else if (offer == cur_ask)
4552 if (flag || !loop_flag) break;
4557 x1 = 100 * (last_offer - offer) / (last_offer - cur_ask);
4560 if (haggle_insults())
4566 else if (x1 > max_per)
4569 if (x1 < max_per) x1 = max_per;
4571 x2 = rand_range(x1-2, x1+2);
4572 x3 = ((offer - cur_ask) * x2 / 100L) + 1;
4573 /* don't let the price go down */
4577 if (cur_ask > final_ask)
4579 cur_ask = final_ask;
4584 pmt = "Final Offer";
4592 /* 追加 $0 で買い取られてしまうのを防止 By FIRST*/
4595 (void)(increase_insults());
4598 else if (offer <= cur_ask)
4609 (void)sprintf(out_val,
4611 "前回の提示価格 $%ld", (long)last_offer);
4613 "Your last bid %ld", (long)last_offer);
4616 put_str(out_val, 1, 39);
4617 say_comment_3(cur_ask, annoyed);
4622 if (cancel) return (TRUE);
4624 updatebargain(*price, final_ask, o_ptr->number);
4632 * @brief 店からの購入処理のメインルーチン /
4633 * Buy an item from a store -RAK-
4636 static void store_purchase(void)
4639 COMMAND_CODE item, item_new;
4650 GAME_TEXT o_name[MAX_NLEN];
4654 if (cur_store_num == STORE_MUSEUM)
4657 msg_print("博物館から取り出すことはできません。");
4659 msg_print("Museum.");
4665 if (st_ptr->stock_num <= 0)
4667 if (cur_store_num == STORE_HOME)
4669 msg_print("我が家には何も置いてありません。");
4671 msg_print("Your home is empty.");
4676 msg_print("現在商品の在庫を切らしています。");
4678 msg_print("I am currently out of stock.");
4685 /* Find the number of objects on this and following pages */
4686 i = (st_ptr->stock_num - store_top);
4688 /* And then restrict it to the current page */
4689 if (i > store_bottom) i = store_bottom;
4693 /* ブラックマーケットの時は別のメッセージ */
4694 switch( cur_store_num ) {
4696 sprintf(out_val, "どのアイテムを取りますか? ");
4699 sprintf(out_val, "どれ? ");
4702 sprintf(out_val, "どの品物が欲しいんだい? ");
4706 if (cur_store_num == STORE_HOME)
4708 sprintf(out_val, "Which item do you want to take? ");
4712 sprintf(out_val, "Which item are you interested in? ");
4717 /* Get the item number to be bought */
4718 if (!get_stock(&item, out_val, 0, i - 1)) return;
4720 /* Get the actual index */
4721 item = item + store_top;
4723 /* Get the actual item */
4724 o_ptr = &st_ptr->stock[item];
4726 /* Assume the player wants just one of them */
4730 /* Get a copy of the object */
4731 object_copy(j_ptr, o_ptr);
4734 * If a rod or wand, allocate total maximum timeouts or charges
4735 * between those purchased and left on the shelf.
4737 reduce_charges(j_ptr, o_ptr->number - amt);
4739 /* Modify quantity */
4740 j_ptr->number = amt;
4742 /* Hack -- require room in pack */
4743 if (!inven_carry_okay(j_ptr))
4745 msg_print(_("そんなにアイテムを持てない。", "You cannot carry that many different items."));
4749 /* Determine the "best" price (per item) */
4750 best = price_item(j_ptr, ot_ptr->min_inflate, FALSE);
4752 /* Find out how many the player wants */
4753 if (o_ptr->number > 1)
4755 /* Hack -- note cost of "fixed" items */
4756 if ((cur_store_num != STORE_HOME) &&
4757 (o_ptr->ident & IDENT_FIXED))
4759 msg_format(_("一つにつき $%ldです。", "That costs %ld gold per item."), (long)(best));
4762 /* Get a quantity */
4763 amt = get_quantity(NULL, o_ptr->number);
4765 /* Allow user abort */
4766 if (amt <= 0) return;
4770 /* Get desired object */
4771 object_copy(j_ptr, o_ptr);
4774 * If a rod or wand, allocate total maximum timeouts or charges
4775 * between those purchased and left on the shelf.
4777 reduce_charges(j_ptr, o_ptr->number - amt);
4779 /* Modify quantity */
4780 j_ptr->number = amt;
4782 /* Hack -- require room in pack */
4783 if (!inven_carry_okay(j_ptr))
4785 msg_print(_("ザックにそのアイテムを入れる隙間がない。", "You cannot carry that many items."));
4789 /* Attempt to buy it */
4790 if (cur_store_num != STORE_HOME)
4792 /* Fixed price, quick buy */
4793 if (o_ptr->ident & (IDENT_FIXED))
4798 /* Go directly to the "best" deal */
4799 price = (best * j_ptr->number);
4805 /* Describe the object (fully) */
4806 object_desc(o_name, j_ptr, 0);
4807 msg_format(_("%s(%c)を購入する。", "Buying %s (%c)."), o_name, I2A(item));
4810 /* Haggle for a final price */
4811 choice = purchase_haggle(j_ptr, &price);
4813 /* Hack -- Got kicked out */
4814 if (st_ptr->store_open >= turn) return;
4817 /* Player wants it */
4820 /* Fix the item price (if "correctly" haggled) */
4821 if (price == (best * j_ptr->number)) o_ptr->ident |= (IDENT_FIXED);
4823 /* Player can afford it */
4824 if (p_ptr->au >= price)
4829 if (cur_store_num == STORE_BLACK) /* The black market is illegal! */
4830 chg_virtue(V_JUSTICE, -1);
4831 if((o_ptr->tval == TV_BOTTLE) && (cur_store_num != STORE_HOME))
4832 chg_virtue(V_NATURE, -1);
4840 /* Spend the money */
4843 /* Update the display */
4846 /* Hack -- buying an item makes you aware of it */
4847 object_aware(j_ptr);
4849 /* Hack -- clear the "fixed" flag from the item */
4850 j_ptr->ident &= ~(IDENT_FIXED);
4852 /* Describe the transaction */
4853 object_desc(o_name, j_ptr, 0);
4855 msg_format(_("%sを $%ldで購入しました。", "You bought %s for %ld gold."), o_name, (long)price);
4857 strcpy(record_o_name, o_name);
4860 if (record_buy) do_cmd_write_nikki(NIKKI_BUY, 0, o_name);
4861 object_desc(o_name, o_ptr, OD_NAME_ONLY);
4862 if(record_rand_art && o_ptr->art_name)
4863 do_cmd_write_nikki(NIKKI_ART, 0, o_name);
4865 /* Erase the inscription */
4866 j_ptr->inscription = 0;
4868 /* Erase the "feeling" */
4869 j_ptr->feeling = FEEL_NONE;
4870 j_ptr->ident &= ~(IDENT_STORE);
4871 /* Give it to the player */
4872 item_new = inven_carry(j_ptr);
4874 /* Describe the final result */
4875 object_desc(o_name, &inventory[item_new], 0);
4876 msg_format(_("%s(%c)を手に入れた。", "You have %s (%c)."), o_name, index_to_label(item_new));
4878 /* Auto-inscription */
4879 autopick_alter_item(item_new, FALSE);
4881 /* Now, reduce the original stack's pval. */
4882 if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
4884 o_ptr->pval -= j_ptr->pval;
4888 /* Note how many slots the store used to have */
4889 i = st_ptr->stock_num;
4891 /* Remove the bought items from the store */
4892 store_item_increase(item, -amt);
4893 store_item_optimize(item);
4895 /* Store is empty */
4896 if (st_ptr->stock_num == 0)
4899 if (one_in_(STORE_SHUFFLE))
4902 msg_print(_("店主は引退した。", "The shopkeeper retires."));
4904 /* Shuffle the store */
4905 store_shuffle(cur_store_num);
4908 sprintf(buf, "%s (%s)",
4909 ot_ptr->owner_name, race_info[ot_ptr->owner_race].title);
4910 put_str(buf, 3, 10);
4911 sprintf(buf, "%s (%ld)",
4912 (f_name + f_info[cur_store_feat].name), (long)(ot_ptr->max_cost));
4919 msg_print(_("店主は新たな在庫を取り出した。", "The shopkeeper brings out some new stock."));
4923 for (i = 0; i < 10; i++)
4925 /* Maintain the store */
4926 store_maint(p_ptr->town_num, cur_store_num);
4931 display_inventory();
4934 /* The item is gone */
4935 else if (st_ptr->stock_num != i)
4937 /* Pick the correct screen */
4938 if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
4939 display_inventory();
4942 /* Item is still here */
4945 /* Redraw the item */
4946 display_entry(item);
4950 /* Player cannot afford it */
4953 /* Simple message (no insult) */
4954 msg_print(_("お金が足りません。", "You do not have enough gold."));
4959 /* Home is much easier */
4962 bool combined_or_reordered;
4964 /* Distribute charges of wands/rods */
4965 distribute_charges(o_ptr, j_ptr, amt);
4967 /* Give it to the player */
4968 item_new = inven_carry(j_ptr);
4970 /* Describe just the result */
4971 object_desc(o_name, &inventory[item_new], 0);
4973 msg_format(_("%s(%c)を取った。", "You have %s (%c)."), o_name, index_to_label(item_new));
4976 /* Take note if we take the last one */
4977 i = st_ptr->stock_num;
4979 /* Remove the items from the home */
4980 store_item_increase(item, -amt);
4981 store_item_optimize(item);
4983 combined_or_reordered = combine_and_reorder_home(STORE_HOME);
4985 /* Hack -- Item is still here */
4986 if (i == st_ptr->stock_num)
4988 if (combined_or_reordered) display_inventory();
4990 /* Redraw the item */
4991 else display_entry(item);
4994 /* The item is gone */
4998 if (st_ptr->stock_num == 0) store_top = 0;
5000 /* Nothing left on that screen */
5001 else if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
5002 display_inventory();
5004 chg_virtue(V_SACRIFICE, 1);
5008 /* Not kicked out */
5014 * @brief 店からの売却処理のメインルーチン /
5015 * Sell an item to the store (or home)
5018 static void store_sell(void)
5025 PRICE price, value, dummy;
5034 GAME_TEXT o_name[MAX_NLEN];
5037 /* Prepare a prompt */
5038 if (cur_store_num == STORE_HOME)
5039 q = _("どのアイテムを置きますか? ", "Drop which item? ");
5041 else if (cur_store_num == STORE_MUSEUM)
5042 q = _("どのアイテムを寄贈しますか? ", "Give which item? ");
5045 q = _("どのアイテムを売りますか? ", "Sell which item? ");
5047 /* Only allow items the store will buy */
5048 item_tester_hook = store_will_buy;
5050 /* 我が家でおかしなメッセージが出るオリジナルのバグを修正 */
5051 if (cur_store_num == STORE_HOME)
5053 s = _("置けるアイテムを持っていません。", "You don't have any item to drop.");
5055 else if (cur_store_num == STORE_MUSEUM)
5057 s = _("寄贈できるアイテムを持っていません。", "You don't have any item to give.");
5061 s = _("欲しい物がないですねえ。", "You have nothing that I want.");
5064 o_ptr = choose_object(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT));
5067 /* Hack -- Cannot remove cursed items */
5068 if ((item >= INVEN_RARM) && object_is_cursed(o_ptr))
5070 msg_print(_("ふーむ、どうやらそれは呪われているようだね。", "Hmmm, it seems to be cursed."));
5074 /* Assume one item */
5077 /* Find out how many the player wants (letter means "all") */
5078 if (o_ptr->number > 1)
5080 /* Get a quantity */
5081 amt = get_quantity(NULL, o_ptr->number);
5083 /* Allow user abort */
5084 if (amt <= 0) return;
5088 /* Get a copy of the object */
5089 object_copy(q_ptr, o_ptr);
5091 /* Modify quantity */
5092 q_ptr->number = amt;
5095 * Hack -- If a rod or wand, allocate total maximum
5096 * timeouts or charges to those being sold. -LM-
5098 if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
5100 q_ptr->pval = o_ptr->pval * amt / o_ptr->number;
5103 /* Get a full description */
5104 object_desc(o_name, q_ptr, 0);
5106 /* Remove any inscription, feeling for stores */
5107 if ((cur_store_num != STORE_HOME) && (cur_store_num != STORE_MUSEUM))
5109 q_ptr->inscription = 0;
5110 q_ptr->feeling = FEEL_NONE;
5113 /* Is there room in the store (or the home?) */
5114 if (!store_check_num(q_ptr))
5116 if (cur_store_num == STORE_HOME)
5117 msg_print(_("我が家にはもう置く場所がない。", "Your home is full."));
5119 else if (cur_store_num == STORE_MUSEUM)
5120 msg_print(_("博物館はもう満杯だ。", "Museum is full."));
5123 msg_print(_("すいませんが、店にはもう置く場所がありません。", "I have not the room in my store to keep it."));
5130 if ((cur_store_num != STORE_HOME) && (cur_store_num != STORE_MUSEUM))
5132 /* Describe the transaction */
5133 msg_format(_("%s(%c)を売却する。", "Selling %s (%c)."), o_name, index_to_label(item));
5138 choice = sell_haggle(q_ptr, &price);
5141 if (st_ptr->store_open >= turn) return;
5153 if (cur_store_num == STORE_BLACK) /* The black market is illegal! */
5154 chg_virtue(V_JUSTICE, -1);
5156 if((o_ptr->tval == TV_BOTTLE) && (cur_store_num != STORE_HOME))
5157 chg_virtue(V_NATURE, 1);
5160 /* Get some money */
5163 /* Update the display */
5166 /* Get the "apparent" value */
5167 dummy = object_value(q_ptr) * q_ptr->number;
5169 identify_item(o_ptr);
5172 /* Get a copy of the object */
5173 object_copy(q_ptr, o_ptr);
5175 /* Modify quantity */
5176 q_ptr->number = amt;
5178 /* Make it look like to be known */
5179 q_ptr->ident |= IDENT_STORE;
5182 * Hack -- If a rod or wand, let the shopkeeper know just
5183 * how many charges he really paid for. -LM-
5185 if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
5187 q_ptr->pval = o_ptr->pval * amt / o_ptr->number;
5190 /* Get the "actual" value */
5191 value = object_value(q_ptr) * q_ptr->number;
5193 /* Get the description all over again */
5194 object_desc(o_name, q_ptr, 0);
5196 /* Describe the result (in message buffer) */
5197 msg_format(_("%sを $%ldで売却しました。", "You sold %s for %ld gold."), o_name, (long)price);
5199 if (record_sell) do_cmd_write_nikki(NIKKI_SELL, 0, o_name);
5201 if (!((o_ptr->tval == TV_FIGURINE) && (value > 0)))
5203 /* Analyze the prices (and comment verbally) unless a figurine*/
5204 purchase_analyze(price, value, dummy);
5208 * Hack -- Allocate charges between those wands or rods sold
5209 * and retained, unless all are being sold. -LM-
5211 distribute_charges(o_ptr, q_ptr, amt);
5213 /* Reset timeouts of the sold items */
5216 /* Take the item from the player, describe the result */
5217 inven_item_increase(item, -amt);
5218 inven_item_describe(item);
5220 /* If items remain, auto-inscribe before optimizing */
5221 if (o_ptr->number > 0)
5222 autopick_alter_item(item, FALSE);
5224 inven_item_optimize(item);
5227 /* The store gets that (known) item */
5228 item_pos = store_carry(q_ptr);
5230 /* Re-display if item is now in store */
5233 store_top = (item_pos / store_bottom) * store_bottom;
5234 display_inventory();
5239 /* Player is at museum */
5240 else if (cur_store_num == STORE_MUSEUM)
5242 char o2_name[MAX_NLEN];
5243 object_desc(o2_name, q_ptr, OD_NAME_ONLY);
5245 if (-1 == store_check_num(q_ptr))
5247 msg_print(_("それと同じ品物は既に博物館にあるようです。", "The same object as it is already in the Museum."));
5251 msg_print(_("博物館に寄贈したものは取り出すことができません!!", "You cannot take items which is given to the Museum back!!"));
5254 if (!get_check(format(_("本当に%sを寄贈しますか?", "Really give %s to the Museum? "), o2_name))) return;
5256 identify_item(q_ptr);
5257 q_ptr->ident |= IDENT_MENTAL;
5259 /* Distribute charges of wands/rods */
5260 distribute_charges(o_ptr, q_ptr, amt);
5261 msg_format(_("%sを置いた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
5264 /* Take it from the players inventory */
5265 inven_item_increase(item, -amt);
5266 inven_item_describe(item);
5267 inven_item_optimize(item);
5270 /* Let the home carry it */
5271 item_pos = home_carry(q_ptr);
5273 /* Update store display */
5276 store_top = (item_pos / store_bottom) * store_bottom;
5277 display_inventory();
5280 /* Player is at home */
5283 /* Distribute charges of wands/rods */
5284 distribute_charges(o_ptr, q_ptr, amt);
5285 msg_format(_("%sを置いた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
5289 /* Take it from the players inventory */
5290 inven_item_increase(item, -amt);
5291 inven_item_describe(item);
5292 inven_item_optimize(item);
5295 /* Let the home carry it */
5296 item_pos = home_carry(q_ptr);
5298 /* Update store display */
5301 store_top = (item_pos / store_bottom) * store_bottom;
5302 display_inventory();
5306 if ((choice == 0) && (item >= INVEN_RARM))
5315 * @brief 店のアイテムを調べるコマンドのメインルーチン /
5316 * Examine an item in a store -JDL-
5319 static void store_examine(void)
5324 GAME_TEXT o_name[MAX_NLEN];
5328 if (st_ptr->stock_num <= 0)
5330 if (cur_store_num == STORE_HOME)
5331 msg_print(_("我が家には何も置いてありません。", "Your home is empty."));
5332 else if (cur_store_num == STORE_MUSEUM)
5333 msg_print(_("博物館には何も置いてありません。", "Museum is empty."));
5335 msg_print(_("現在商品の在庫を切らしています。", "I am currently out of stock."));
5339 /* Find the number of objects on this and following pages */
5340 i = (st_ptr->stock_num - store_top);
5342 /* And then restrict it to the current page */
5343 if (i > store_bottom) i = store_bottom;
5346 sprintf(out_val, _("どれを調べますか?", "Which item do you want to examine? "));
5348 /* Get the item number to be examined */
5349 if (!get_stock(&item, out_val, 0, i - 1)) return;
5351 /* Get the actual index */
5352 item = item + store_top;
5354 /* Get the actual item */
5355 o_ptr = &st_ptr->stock[item];
5357 /* Require full knowledge */
5358 if (!(o_ptr->ident & IDENT_MENTAL))
5360 /* This can only happen in the home */
5361 msg_print(_("このアイテムについて特に知っていることはない。", "You have no special knowledge about that item."));
5365 object_desc(o_name, o_ptr, 0);
5366 msg_format(_("%sを調べている...", "Examining %s..."), o_name);
5368 if (!screen_object(o_ptr, SCROBJ_FORCE_DETAIL))
5369 msg_print(_("特に変わったところはないようだ。", "You see nothing special."));
5376 * @brief 博物館のアイテムを除去するコマンドのメインルーチン /
5377 * Remove an item from museum (Originally from TOband)
5380 static void museum_remove_object(void)
5385 GAME_TEXT o_name[MAX_NLEN];
5389 if (st_ptr->stock_num <= 0)
5391 msg_print(_("博物館には何も置いてありません。", "Museum is empty."));
5395 /* Find the number of objects on this and following pages */
5396 i = st_ptr->stock_num - store_top;
5398 /* And then restrict it to the current page */
5399 if (i > store_bottom) i = store_bottom;
5402 sprintf(out_val, _("どのアイテムの展示をやめさせますか?", "Which item do you want to order to remove? "));
5404 /* Get the item number to be removed */
5405 if (!get_stock(&item, out_val, 0, i - 1)) return;
5407 /* Get the actual index */
5408 item = item + store_top;
5410 /* Get the actual item */
5411 o_ptr = &st_ptr->stock[item];
5413 object_desc(o_name, o_ptr, 0);
5415 msg_print(_("展示をやめさせたアイテムは二度と見ることはできません!", "You cannot see items which is removed from the Museum!"));
5416 if (!get_check(format(_("本当に%sの展示をやめさせますか?", "Really order to remove %s from the Museum? "), o_name))) return;
5418 msg_format(_("%sの展示をやめさせた。", "You ordered to remove %s."), o_name);
5420 /* Remove the items from the home */
5421 store_item_increase(item, -o_ptr->number);
5422 store_item_optimize(item);
5424 (void)combine_and_reorder_home(STORE_MUSEUM);
5426 /* The item is gone */
5429 if (st_ptr->stock_num == 0) store_top = 0;
5431 /* Nothing left on that screen */
5432 else if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
5433 display_inventory();
5440 * Hack -- set this to leave the store
5442 static bool leave_store = FALSE;
5446 * @brief 店舗処理コマンド選択のメインルーチン /
5447 * Process a command in a store
5451 * Note that we must allow the use of a few "special" commands
5452 * in the stores which are not allowed in the dungeon, and we
5453 * must disable some commands which are allowed in the dungeon
5454 * but not in the stores, to prevent chaos.
5457 static void store_process_command(void)
5459 /* Handle repeating the last command */
5462 if (rogue_like_commands && command_cmd == 'l')
5464 command_cmd = 'x'; /* hack! */
5467 /* Parse the command */
5468 switch (command_cmd)
5478 /* 1 ページ戻るコマンド: 我が家のページ数が多いので重宝するはず By BUG */
5481 if (st_ptr->stock_num <= store_bottom) {
5482 msg_print(_("これで全部です。", "Entire inventory is shown."));
5485 store_top -= store_bottom;
5486 if ( store_top < 0 )
5487 store_top = ((st_ptr->stock_num - 1 )/store_bottom) * store_bottom;
5488 if ( (cur_store_num == STORE_HOME) && (powerup_home == FALSE) )
5489 if ( store_top >= store_bottom ) store_top = store_bottom;
5490 display_inventory();
5498 if (st_ptr->stock_num <= store_bottom)
5500 msg_print(_("これで全部です。", "Entire inventory is shown."));
5504 store_top += store_bottom;
5506 * 隠しオプション(powerup_home)がセットされていないときは
5507 * 我が家では 2 ページまでしか表示しない
5509 if ((cur_store_num == STORE_HOME) &&
5510 (powerup_home == FALSE) &&
5511 (st_ptr->stock_num >= STORE_INVEN_MAX))
5513 if (store_top >= (STORE_INVEN_MAX - 1))
5520 if (store_top >= st_ptr->stock_num) store_top = 0;
5523 display_inventory();
5535 /* Get (purchase) */
5562 /*** Inventory Commands ***/
5564 /* Wear/wield equipment */
5571 /* Take off equipment */
5578 /* Destroy an item */
5585 /* Equipment list */
5592 /* Inventory list */
5600 /*** Various commands ***/
5602 /* Identify an object */
5609 /* Hack -- toggle windows */
5612 toggle_inven_equip();
5616 /*** Use various objects ***/
5621 if ( (p_ptr->pclass == CLASS_MINDCRAFTER) ||
5622 (p_ptr->pclass == CLASS_BERSERKER) ||
5623 (p_ptr->pclass == CLASS_NINJA) ||
5624 (p_ptr->pclass == CLASS_MIRROR_MASTER)
5625 ) do_cmd_mind_browse();
5626 else if (p_ptr->pclass == CLASS_SMITH)
5628 else if (p_ptr->pclass == CLASS_MAGIC_EATER)
5629 do_cmd_magic_eater(TRUE, FALSE);
5630 else if (p_ptr->pclass == CLASS_SNIPER)
5631 do_cmd_snipe_browse();
5632 else do_cmd_browse();
5636 /* Inscribe an object */
5643 /* Uninscribe an object */
5646 do_cmd_uninscribe();
5652 /*** Help and Such ***/
5661 /* Identify symbol */
5664 do_cmd_query_symbol();
5668 /* Character description */
5671 p_ptr->town_num = old_town_num;
5672 do_cmd_change_name();
5673 p_ptr->town_num = inner_town_num;
5679 /*** System Commands ***/
5681 /* Hack -- User interface */
5688 /* Single line from a pref file */
5691 p_ptr->town_num = old_town_num;
5693 p_ptr->town_num = inner_town_num;
5697 /* Interact with macros */
5700 p_ptr->town_num = old_town_num;
5702 p_ptr->town_num = inner_town_num;
5706 /* Interact with visuals */
5709 p_ptr->town_num = old_town_num;
5711 p_ptr->town_num = inner_town_num;
5715 /* Interact with colors */
5718 p_ptr->town_num = old_town_num;
5720 p_ptr->town_num = inner_town_num;
5724 /* Interact with options */
5728 (void)combine_and_reorder_home(STORE_HOME);
5734 /*** Misc Commands ***/
5750 /* Repeat level feeling */
5757 /* Show previous message */
5760 do_cmd_message_one();
5764 /* Show previous messages */
5777 /* Check artifacts, uniques etc. */
5784 /* Load "screen dump" */
5787 do_cmd_load_screen();
5791 /* Save "screen dump" */
5794 do_cmd_save_screen();
5798 /* Hack -- Unknown command */
5801 if ((cur_store_num == STORE_MUSEUM) && (command_cmd == 'r'))
5803 museum_remove_object();
5807 msg_print(_("そのコマンドは店の中では使えません。", "That command does not work in stores."));
5816 * @brief 店舗処理全体のメインルーチン /
5817 * Enter a store, and interact with it. *
5821 * Note that we use the standard "request_command()" function
5822 * to get a command, allowing us to use "command_arg" and all
5823 * command macros and other nifty stuff, but we use the special
5824 * "shopping" argument, to force certain commands to be converted
5825 * into other commands, normally, we convert "p" (pray) and "m"
5826 * (cast magic) into "g" (get), and "s" (search) into "d" (drop).
5829 void do_cmd_store(void)
5835 bool need_redraw_store_inv; /* To redraw missiles damage and prices in store */
5838 if(p_ptr->wild_mode) return;
5839 Term_get_size(&w, &h);
5841 /* Calculate stocks per 1 page */
5842 xtra_stock = MIN(14+26, ((h > 24) ? (h - 24) : 0));
5843 store_bottom = MIN_STOCK + xtra_stock;
5845 /* Access the player grid */
5846 c_ptr = &cave[p_ptr->y][p_ptr->x];
5848 /* Verify a store */
5849 if (!cave_have_flag_grid(c_ptr, FF_STORE))
5851 msg_print(_("ここには店がありません。", "You see no store here."));
5855 /* Extract the store code */
5856 which = f_info[c_ptr->feat].subtype;
5858 old_town_num = p_ptr->town_num;
5859 if ((which == STORE_HOME) || (which == STORE_MUSEUM)) p_ptr->town_num = 1;
5860 if (dun_level) p_ptr->town_num = NO_TOWN;
5861 inner_town_num = p_ptr->town_num;
5863 /* Hack -- Check the "locked doors" */
5864 if ((town[p_ptr->town_num].store[which].store_open >= turn) ||
5867 msg_print(_("ドアに鍵がかかっている。", "The doors are locked."));
5868 p_ptr->town_num = old_town_num;
5872 /* Calculate the number of store maintainances since the last visit */
5873 maintain_num = (turn - town[p_ptr->town_num].store[which].last_visit) / (TURNS_PER_TICK * STORE_TICKS);
5875 /* Maintain the store max. 10 times */
5876 if (maintain_num > 10) maintain_num = 10;
5880 /* Maintain the store */
5881 for (i = 0; i < maintain_num; i++)
5882 store_maint(p_ptr->town_num, which);
5884 /* Save the visit */
5885 town[p_ptr->town_num].store[which].last_visit = turn;
5891 /* Hack -- Character is in "icky" mode */
5892 character_icky = TRUE;
5899 /* Do not expand macros */
5900 get_com_no_macros = TRUE;
5902 /* Save the store number */
5903 cur_store_num = which;
5905 /* Hack -- save the store feature */
5906 cur_store_feat = c_ptr->feat;
5908 /* Save the store and owner pointers */
5909 st_ptr = &town[p_ptr->town_num].store[cur_store_num];
5910 ot_ptr = &owners[cur_store_num][st_ptr->owner];
5912 /* Start at the beginning */
5915 play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_BUILD);
5920 leave_store = FALSE;
5922 /* Interact with player */
5923 while (!leave_store)
5925 /* Hack -- Clear line 1 */
5929 clear_from(20 + xtra_stock);
5931 /* Basic commands */
5932 prt(_(" ESC) 建物から出る", " ESC) Exit from Building."), 21 + xtra_stock, 0);
5934 /* Browse if necessary */
5935 if (st_ptr->stock_num > store_bottom)
5937 prt(_(" -)前ページ", " -) Previous page"), 22 + xtra_stock, 0);
5938 prt(_(" スペース) 次ページ", " SPACE) Next page"), 23 + xtra_stock, 0);
5942 if (cur_store_num == STORE_HOME)
5944 prt(_("g) アイテムを取る", "g) Get an item."), 21 + xtra_stock, 27);
5945 prt(_("d) アイテムを置く", "d) Drop an item."), 22 + xtra_stock, 27);
5946 prt(_("x) 家のアイテムを調べる", "x) eXamine an item in the home."), 23 + xtra_stock, 27);
5949 /* Museum commands */
5950 else if (cur_store_num == STORE_MUSEUM)
5952 prt(_("d) アイテムを置く", "d) Drop an item."), 21 + xtra_stock, 27);
5953 prt(_("r) アイテムの展示をやめる", "r) order to Remove an item."), 22 + xtra_stock, 27);
5954 prt(_("x) 博物館のアイテムを調べる", "x) eXamine an item in the museum."), 23 + xtra_stock, 27);
5960 prt(_("p) 商品を買う", "p) Purchase an item."), 21 + xtra_stock, 30);
5961 prt(_("s) アイテムを売る", "s) Sell an item."), 22 + xtra_stock, 30);
5962 prt(_("x) 商品を調べる", "x) eXamine an item in the shop"), 23 + xtra_stock,30);
5966 prt(_("i/e) 持ち物/装備の一覧", "i/e) Inventry/Equipment list"), 21 + xtra_stock, 56);
5968 if (rogue_like_commands)
5970 prt(_("w/T) 装備する/はずす", "w/T) Wear/Take off equipment"), 22 + xtra_stock, 56);
5974 prt(_("w/t) 装備する/はずす", "w/t) Wear/Take off equipment"), 22 + xtra_stock, 56);
5978 prt(_("コマンド:", "You may: "), 20 + xtra_stock, 0);
5980 request_command(TRUE);
5982 /* Process the command */
5983 store_process_command();
5986 * Hack -- To redraw missiles damage and prices in store
5987 * If player's charisma changes, or if player changes a bow, PU_BONUS is set
5989 need_redraw_store_inv = (p_ptr->update & PU_BONUS) ? TRUE : FALSE;
5991 /* Hack -- Character is still in "icky" mode */
5992 character_icky = TRUE;
5997 if (inventory[INVEN_PACK].k_idx)
5999 INVENTORY_IDX item = INVEN_PACK;
6001 object_type *o_ptr = &inventory[item];
6003 /* Hack -- Flee from the store */
6004 if (cur_store_num != STORE_HOME)
6006 if (cur_store_num == STORE_MUSEUM)
6007 msg_print(_("ザックからアイテムがあふれそうなので、あわてて博物館から出た...", "Your pack is so full that you flee the Museum..."));
6009 msg_print(_("ザックからアイテムがあふれそうなので、あわてて店から出た...", "Your pack is so full that you flee the store..."));
6015 /* Hack -- Flee from the home */
6016 else if (!store_check_num(o_ptr))
6018 msg_print(_("ザックからアイテムがあふれそうなので、あわてて家から出た...", "Your pack is so full that you flee your home..."));
6023 /* Hack -- Drop items into the home */
6031 GAME_TEXT o_name[MAX_NLEN];
6033 /* Give a message */
6034 msg_print(_("ザックからアイテムがあふれてしまった!", "Your pack overflows!"));
6038 object_copy(q_ptr, o_ptr);
6039 object_desc(o_name, q_ptr, 0);
6041 msg_format(_("%sが落ちた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
6043 /* Remove it from the players inventory */
6044 inven_item_increase(item, -255);
6045 inven_item_describe(item);
6046 inven_item_optimize(item);
6049 /* Let the home carry it */
6050 item_pos = home_carry(q_ptr);
6052 /* Redraw the home */
6055 store_top = (item_pos / store_bottom) * store_bottom;
6056 display_inventory();
6061 /* Hack -- Redisplay store prices if charisma changes */
6062 /* Hack -- Redraw missiles damage if player changes bow */
6063 if (need_redraw_store_inv) display_inventory();
6065 /* Hack -- get kicked out of the store */
6066 if (st_ptr->store_open >= turn) leave_store = TRUE;
6069 select_floor_music();
6071 p_ptr->town_num = old_town_num;
6074 p_ptr->energy_use = 100;
6077 /* Hack -- Character is no longer in "icky" mode */
6078 character_icky = FALSE;
6081 /* Hack -- Cancel automatic command */
6084 /* Hack -- Cancel "see" mode */
6085 command_see = FALSE;
6087 /* Allow expanding macros */
6088 get_com_no_macros = FALSE;
6093 /* Update everything */
6094 p_ptr->update |= (PU_VIEW | PU_LITE | PU_MON_LITE);
6095 p_ptr->update |= (PU_MONSTERS);
6097 /* Redraw entire screen */
6098 p_ptr->redraw |= (PR_BASIC | PR_EXTRA | PR_EQUIPPY);
6099 p_ptr->redraw |= (PR_MAP);
6100 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
6106 * @brief 現在の町の店主を交代させる /
6107 * Shuffle one of the stores.
6108 * @param which 店舗種類のID
6111 void store_shuffle(int which)
6117 if (which == STORE_HOME) return;
6118 if (which == STORE_MUSEUM) return;
6121 /* Save the store index */
6122 cur_store_num = which;
6124 /* Activate that store */
6125 st_ptr = &town[p_ptr->town_num].store[cur_store_num];
6128 /* Pick a new owner */
6131 st_ptr->owner = (byte)randint0(MAX_OWNERS);
6132 if (j == st_ptr->owner) continue;
6133 for (i = 1;i < max_towns; i++)
6135 if (i == p_ptr->town_num) continue;
6136 if (st_ptr->owner == town[i].store[cur_store_num].owner) break;
6138 if (i == max_towns) break;
6141 /* Activate the new owner */
6142 ot_ptr = &owners[cur_store_num][st_ptr->owner];
6145 /* Reset the owner data */
6146 st_ptr->insult_cur = 0;
6147 st_ptr->store_open = 0;
6148 st_ptr->good_buy = 0;
6149 st_ptr->bad_buy = 0;
6152 /* Hack -- discount all the items */
6153 for (i = 0; i < st_ptr->stock_num; i++)
6157 o_ptr = &st_ptr->stock[i];
6159 if (!object_is_artifact(o_ptr))
6161 /* Hack -- Sell all non-artifact old items for "half price" */
6162 o_ptr->discount = 50;
6164 /* Hack -- Items are no longer "fixed price" */
6165 o_ptr->ident &= ~(IDENT_FIXED);
6167 /* Mega-Hack -- Note that the item is "on sale" */
6168 o_ptr->inscription = quark_add(_("売出中", "on sale"));
6175 * @brief 店の品揃えを変化させる /
6176 * Maintain the inventory at the stores.
6177 * @param town_num 町のID
6178 * @param store_num 店舗種類のID
6181 void store_maint(int town_num, int store_num)
6185 cur_store_num = store_num;
6188 if (store_num == STORE_HOME) return;
6189 if (store_num == STORE_MUSEUM) return;
6191 /* Activate that store */
6192 st_ptr = &town[town_num].store[store_num];
6194 /* Activate the owner */
6195 ot_ptr = &owners[store_num][st_ptr->owner];
6197 /* Store keeper forgives the player */
6198 st_ptr->insult_cur = 0;
6200 /* Mega-Hack -- prune the black market */
6201 if (store_num == STORE_BLACK)
6203 /* Destroy crappy black market items */
6204 for (j = st_ptr->stock_num - 1; j >= 0; j--)
6206 object_type *o_ptr = &st_ptr->stock[j];
6208 /* Destroy crappy items */
6209 if (black_market_crap(o_ptr))
6211 /* Destroy the item */
6212 store_item_increase(j, 0 - o_ptr->number);
6213 store_item_optimize(j);
6219 /* Choose the number of slots to keep */
6220 j = st_ptr->stock_num;
6222 /* Sell a few items */
6223 j = j - randint1(STORE_TURNOVER);
6225 /* Never keep more than "STORE_MAX_KEEP" slots */
6226 if (j > STORE_MAX_KEEP) j = STORE_MAX_KEEP;
6228 /* Always "keep" at least "STORE_MIN_KEEP" items */
6229 if (j < STORE_MIN_KEEP) j = STORE_MIN_KEEP;
6231 /* Hack -- prevent "underflow" */
6234 /* Destroy objects until only "j" slots are left */
6235 while (st_ptr->stock_num > j) store_delete();
6238 /* Choose the number of slots to fill */
6239 j = st_ptr->stock_num;
6241 /* Buy some more items */
6242 j = j + randint1(STORE_TURNOVER);
6244 /* Never keep more than "STORE_MAX_KEEP" slots */
6245 if (j > STORE_MAX_KEEP) j = STORE_MAX_KEEP;
6247 /* Always "keep" at least "STORE_MIN_KEEP" items */
6248 if (j < STORE_MIN_KEEP) j = STORE_MIN_KEEP;
6250 /* Hack -- prevent "overflow" */
6251 if (j >= st_ptr->stock_size) j = st_ptr->stock_size - 1;
6253 /* Acquire some new items */
6254 while (st_ptr->stock_num < j) store_create();
6259 * @brief 店舗情報を初期化する /
6260 * Initialize the stores
6261 * @param town_num 町のID
6262 * @param store_num 店舗種類のID
6265 void store_init(int town_num, int store_num)
6268 cur_store_num = store_num;
6270 /* Activate that store */
6271 st_ptr = &town[town_num].store[store_num];
6279 st_ptr->owner = (byte)randint0(MAX_OWNERS);
6280 for (i = 1;i < max_towns; i++)
6282 if (i == town_num) continue;
6283 if (st_ptr->owner == town[i].store[store_num].owner) break;
6285 if (i == max_towns) break;
6288 /* Activate the new owner */
6289 ot_ptr = &owners[store_num][st_ptr->owner];
6292 /* Initialize the store */
6293 st_ptr->store_open = 0;
6294 st_ptr->insult_cur = 0;
6295 st_ptr->good_buy = 0;
6296 st_ptr->bad_buy = 0;
6298 /* Nothing in stock */
6299 st_ptr->stock_num = 0;
6302 * MEGA-HACK - Last visit to store is
6303 * BEFORE player birth to enable store restocking
6305 st_ptr->last_visit = -10L * TURNS_PER_TICK * STORE_TICKS;
6307 /* Clear any old items */
6308 for (k = 0; k < st_ptr->stock_size; k++)
6310 object_wipe(&st_ptr->stock[k]);
6316 * @brief アイテムを町のブラックマーケットに移動させる /
6317 * @param o_ptr 移動させたいオブジェクトの構造体参照ポインタ
6320 void move_to_black_market(object_type *o_ptr)
6323 if (!p_ptr->town_num) return;
6325 st_ptr = &town[p_ptr->town_num].store[STORE_BLACK];
6327 o_ptr->ident |= IDENT_STORE;
6329 (void)store_carry(o_ptr);
6331 object_wipe(o_ptr); /* Don't leave a bogus object behind... */