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.
19 #include "cmd-basic.h"
22 #include "cmd-smith.h"
23 #include "cmd-zapwand.h"
24 #include "cmd-magiceat.h"
28 #include "cmd-spell.h"
30 #include "player-status.h"
31 #include "player-class.h"
32 #include "object-flavor.h"
33 #include "object-hook.h"
34 #include "floor-events.h"
37 #include "player-effects.h"
38 #include "player-race.h"
41 #include "objectkind.h"
43 #include "floor-town.h"
45 #include "view-mainwindow.h"
51 * @brief 闘技場のモンスターID及び報酬アイテムテーブル /
52 * Store owners (exactly four "possible" owners per store, chosen randomly)
55 * { name, purse, max greed, min greed, haggle_per, tolerance, race, unused }
57 * Lifted extra shopkeepers from CthAngband (don't you just love open source
58 * development? ;-)). Since this gave less than 32 unique names for some
59 * shops, those have their first x names copied to reach 32.
61 * For the weapon and armour shops, several owners have a limit of 5k.
63 * I want to do 50k owners, but the purse is currently s16b. Perhaps
64 * we should just store 1/10th of the purse?
67 const owner_type owners[MAX_STORES][MAX_OWNERS] =
70 /* General store - 32 unique names */
72 Raistlin は dragonlance の powerful wizard 。
73 Rincewind the Chicken は Terry Pratchett の Discworld の登場人物 上記のパロディ?、
74 { "憶病者ラストリン", 200, 175, 108, 4, 12, RACE_HUMAN},
75 { "Raistlin the Chicken", 200, 175, 108, 4, 12, RACE_HUMAN},
79 { "フレンドリーなビルボ", 200, 170, 108, 5, 15, RACE_HOBBIT},
80 { "憶病者リンスウィンド", 200, 175, 108, 4, 12, RACE_HUMAN},
81 { "背の低いサルタン", 300, 170, 107, 5, 15, RACE_GNOME},
82 { "ハンサムなライア=エル", 300, 165, 107, 6, 18, RACE_ELF},
83 { "親切なファリルマウエン", 250, 170, 108, 5, 15, RACE_HOBBIT},
84 { "臆病者ヴォワラン", 500, 175, 108, 4, 12, RACE_HUMAN},
85 { "チビのエラシュナク", 750, 170, 107, 5, 15, RACE_BEASTMAN},
86 { "ハンサムなグラッグ", 1000, 165, 107, 6, 18, RACE_HALF_TITAN},
87 { "ケチなフォロビア", 250, 170, 108, 5, 15, RACE_HUMAN},
88 { "馬鹿のエリス", 500, 175, 108, 4, 12, RACE_HUMAN},
89 { "腹ペコのフィルバート", 750, 170, 107, 5, 15, RACE_VAMPIRE},
90 { "スナーグル・サシグア", 1000, 165, 107, 6, 18, RACE_MIND_FLAYER},
91 { "長死きエロワーズ", 250, 170, 108, 5, 15, RACE_SPECTRE},
92 { "ノロマのフンディ", 500, 175, 108, 4, 12, RACE_ZOMBIE},
93 { "グランサス", 750, 170, 107, 5, 15, RACE_SKELETON},
94 { "丁寧なロラックス", 1000, 165, 107, 6, 18, RACE_VAMPIRE},
95 { "ブッチ", 250, 170, 108, 5, 15, RACE_HALF_ORC},
96 { "美しきエルベレス", 500, 175, 108, 4, 12, RACE_HIGH_ELF},
97 { "こそこそサーレス", 750, 170, 107, 5, 15, RACE_GNOME},
98 { "ナーロック", 1000, 165, 107, 6, 18, RACE_DWARF},
99 { "チビのヘイネッカ", 250, 170, 108, 5, 15, RACE_GNOME},
100 { "きちがいロワラン", 500, 175, 108, 4, 12, RACE_HALF_GIANT},
101 { "毒息のウート", 750, 170, 107, 5, 15, RACE_DRACONIAN},
102 { "でぶっちょアラァカ", 1000, 165, 107, 6, 18, RACE_DRACONIAN},
103 { "低能なプーゴー", 250, 170, 108, 5, 15, RACE_BEASTMAN},
104 { "フェロールフィリアン", 500, 175, 108, 4, 12, RACE_ELF},
105 { "年寄りマロカ", 750, 170, 107, 5, 15, RACE_GNOME},
106 { "勇敢なサシン", 1000, 165, 107, 6, 18, RACE_HALF_GIANT},
107 { "田舎者アビエマール", 250, 170, 108, 5, 15, RACE_HUMAN},
108 { "貧乏なハーク", 500, 175, 108, 4, 12, RACE_HALF_ORC},
109 { "みじめなソアリン", 750, 170, 107, 5, 15, RACE_ZOMBIE},
110 { "質素なメルラ", 1000, 165, 107, 6, 18, RACE_ELF},
112 { "Bilbo the Friendly", 200, 170, 108, 5, 15, RACE_HOBBIT},
113 { "Rincewind the Chicken", 200, 175, 108, 4, 12, RACE_HUMAN},
114 { "Sultan the Midget", 300, 170, 107, 5, 15, RACE_GNOME},
115 { "Lyar-el the Comely", 300, 165, 107, 6, 18, RACE_ELF},
116 { "Falilmawen the Friendly", 250, 170, 108, 5, 15, RACE_HOBBIT},
117 { "Voirin the Cowardly", 500, 175, 108, 4, 12, RACE_HUMAN},
118 { "Erashnak the Midget", 750, 170, 107, 5, 15, RACE_BEASTMAN},
119 { "Grug the Comely", 1000, 165, 107, 6, 18, RACE_HALF_TITAN},
120 { "Forovir the Cheap", 250, 170, 108, 5, 15, RACE_HUMAN},
121 { "Ellis the Fool", 500, 175, 108, 4, 12, RACE_HUMAN},
122 { "Filbert the Hungry", 750, 170, 107, 5, 15, RACE_VAMPIRE},
123 { "Fthnargl Psathiggua", 1000, 165, 107, 6, 18, RACE_MIND_FLAYER},
124 { "Eloise Long-Dead", 250, 170, 108, 5, 15, RACE_SPECTRE},
125 { "Fundi the Slow", 500, 175, 108, 4, 12, RACE_ZOMBIE},
126 { "Granthus", 750, 170, 107, 5, 15, RACE_SKELETON},
127 { "Lorax the Suave", 1000, 165, 107, 6, 18, RACE_VAMPIRE},
128 { "Butch", 250, 170, 108, 5, 15, RACE_HALF_ORC},
129 { "Elbereth the Beautiful", 500, 175, 108, 4, 12, RACE_HIGH_ELF},
130 { "Sarleth the Sneaky", 750, 170, 107, 5, 15, RACE_GNOME},
131 { "Narlock", 1000, 165, 107, 6, 18, RACE_DWARF},
132 { "Haneka the Small", 250, 170, 108, 5, 15, RACE_GNOME},
133 { "Loirin the Mad", 500, 175, 108, 4, 12, RACE_HALF_GIANT},
134 { "Wuto Poisonbreath", 750, 170, 107, 5, 15, RACE_DRACONIAN},
135 { "Araaka the Rotund", 1000, 165, 107, 6, 18, RACE_DRACONIAN},
136 { "Poogor the Dumb", 250, 170, 108, 5, 15, RACE_BEASTMAN},
137 { "Felorfiliand", 500, 175, 108, 4, 12, RACE_ELF},
138 { "Maroka the Aged", 750, 170, 107, 5, 15, RACE_GNOME},
139 { "Sasin the Bold", 1000, 165, 107, 6, 18, RACE_HALF_GIANT},
140 { "Abiemar the Peasant", 250, 170, 108, 5, 15, RACE_HUMAN},
141 { "Hurk the Poor", 500, 175, 108, 4, 12, RACE_HALF_ORC},
142 { "Soalin the Wretched", 750, 170, 107, 5, 15, RACE_ZOMBIE},
143 { "Merulla the Humble", 1000, 165, 107, 6, 18, RACE_ELF},
147 /* Armoury - 28 unique names */
149 { "醜悪コン=ダー", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
150 { "頑固者ダーグ=ロウ", 10000, 190, 111, 4, 9, RACE_HUMAN},
151 { "賢者デカド", 25000, 200, 112, 4, 10, RACE_DUNADAN},
152 { "鍛冶屋のウィーランド", 30000, 200, 112, 4, 5, RACE_DWARF},
153 { "醜悪コン=ダー", 10000, 210, 115, 5, 7, RACE_HALF_ORC},
154 { "頑固者ダーグ=ロウ", 15000, 190, 111, 4, 9, RACE_HUMAN},
155 { "ハンサムなデカド", 25000, 200, 112, 4, 10, RACE_AMBERITE},
156 { "エロー・ドラゴンスケイル", 30000, 200, 112, 4, 5, RACE_ELF},
157 { "デリカトス", 10000, 210, 115, 5, 7, RACE_SPRITE},
158 { "巨大なグルース", 15000, 190, 111, 4, 9, RACE_HALF_GIANT},
159 { "アニムス", 25000, 200, 112, 4, 10, RACE_GOLEM},
160 { "マルヴァス", 30000, 200, 112, 4, 5, RACE_HALF_TITAN},
161 { "セラクシス", 10000, 210, 115, 5, 7, RACE_ZOMBIE},
162 { "デス・チル", 5000, 190, 111, 4, 9, RACE_SPECTRE},
163 { "微かなドリオス", 25000, 200, 112, 4, 10, RACE_SPECTRE},
164 { "冷たいバスリック", 30000, 200, 112, 4, 5, RACE_VAMPIRE},
165 { "冷酷ヴェンジェラ", 10000, 210, 115, 5, 7, RACE_HALF_TROLL},
166 { "強者ウィラナ", 15000, 190, 111, 4, 9, RACE_HUMAN},
167 { "ヨジョ二世", 25000, 200, 112, 4, 10, RACE_DWARF},
168 { "優しいラナラー", 30000, 200, 112, 4, 5, RACE_AMBERITE},
169 { "不浄のホルバグ", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
170 { "テレパスのエレレン", 15000, 190, 111, 4, 9, RACE_DARK_ELF},
171 { "イスドリリアス", 25000, 200, 112, 4, 10, RACE_SPRITE},
172 { "一つ目ヴェグナー", 5000, 200, 112, 4, 5, RACE_CYCLOPS},
173 { "混沌のロディッシュ", 10000, 210, 115, 5, 7, RACE_BEASTMAN},
174 { "剣豪ヘジン", 15000, 190, 111, 4, 9, RACE_NIBELUNG},
175 { "ずる屋のエルベレリス", 10000, 200, 112, 4, 10, RACE_DARK_ELF},
176 { "インプのザサス", 30000, 200, 112, 4, 5, RACE_IMP},
177 { "醜悪コン=ダー", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
178 { "頑固者ダーグ=ロウ", 10000, 190, 111, 4, 9, RACE_HUMAN},
179 { "ハンサムなデカド", 25000, 200, 112, 4, 10, RACE_AMBERITE},
180 { "鍛冶屋のウィーランド", 30000, 200, 112, 4, 5, RACE_DWARF},
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_DUNADAN},
185 { "Wieland the Smith", 30000, 200, 112, 4, 5, RACE_DWARF},
186 { "Kon-Dar the Ugly", 10000, 210, 115, 5, 7, RACE_HALF_ORC},
187 { "Darg-Low the Grim", 15000, 190, 111, 4, 9, RACE_HUMAN},
188 { "Decado the Handsome", 25000, 200, 112, 4, 10, RACE_AMBERITE},
189 { "Elo Dragonscale", 30000, 200, 112, 4, 5, RACE_ELF},
190 { "Delicatus", 10000, 210, 115, 5, 7, RACE_SPRITE},
191 { "Gruce the Huge", 15000, 190, 111, 4, 9, RACE_HALF_GIANT},
192 { "Animus", 25000, 200, 112, 4, 10, RACE_GOLEM},
193 { "Malvus", 30000, 200, 112, 4, 5, RACE_HALF_TITAN},
194 { "Selaxis", 10000, 210, 115, 5, 7, RACE_ZOMBIE},
195 { "Deathchill", 5000, 190, 111, 4, 9, RACE_SPECTRE},
196 { "Drios the Faint", 25000, 200, 112, 4, 10, RACE_SPECTRE},
197 { "Bathric the Cold", 30000, 200, 112, 4, 5, RACE_VAMPIRE},
198 { "Vengella the Cruel", 10000, 210, 115, 5, 7, RACE_HALF_TROLL},
199 { "Wyrana the Mighty", 15000, 190, 111, 4, 9, RACE_HUMAN},
200 { "Yojo II", 25000, 200, 112, 4, 10, RACE_DWARF},
201 { "Ranalar the Sweet", 30000, 200, 112, 4, 5, RACE_AMBERITE},
202 { "Horbag the Unclean", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
203 { "Elelen the Telepath", 15000, 190, 111, 4, 9, RACE_DARK_ELF},
204 { "Isedrelias", 25000, 200, 112, 4, 10, RACE_SPRITE},
205 { "Vegnar One-eye", 5000, 200, 112, 4, 5, RACE_CYCLOPS},
206 { "Rodish the Chaotic", 10000, 210, 115, 5, 7, RACE_BEASTMAN},
207 { "Hesin Swordmaster", 15000, 190, 111, 4, 9, RACE_NIBELUNG},
208 { "Elvererith the Cheat", 10000, 200, 112, 4, 10, RACE_DARK_ELF},
209 { "Zzathath the Imp", 30000, 200, 112, 4, 5, RACE_IMP},
210 { "Kon-Dar the Ugly", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
211 { "Darg-Low the Grim", 10000, 190, 111, 4, 9, RACE_HUMAN},
212 { "Decado the Handsome", 25000, 200, 112, 4, 10, RACE_AMBERITE},
213 { "Wieland the Smith", 30000, 200, 112, 4, 5, RACE_DWARF},
218 /* Weapon Smith - 28 unique names */
220 { "残忍なるアーノルド", 5000, 210, 115, 6, 6, RACE_HALF_TROLL},
221 { "獣殺しのアーンダル", 10000, 185, 110, 5, 9, RACE_HALF_ELF},
222 { "獣マスターのエディー", 25000, 190, 115, 5, 7, RACE_HOBBIT},
223 { "竜殺しのオグライン", 30000, 195, 112, 4, 8, RACE_DWARF},
224 { "熟練者ドリュー", 10000, 210, 115, 6, 6, RACE_HUMAN},
225 { "龍の子オラックス", 15000, 185, 110, 5, 9, RACE_DRACONIAN},
226 { "病気持ちのアンスラックス", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
227 { "頑丈者アルコス", 30000, 195, 112, 4, 8, RACE_DWARF},
228 { "腐れ者のサリアス", 5000, 210, 115, 6, 6, RACE_ZOMBIE},
229 { "晒し骨のトゥエシク", 15000, 185, 110, 5, 9, RACE_SKELETON},
230 { "ビリオス", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
231 { "ファスガル", 30000, 195, 112, 4, 8, RACE_ZOMBIE},
232 { "パラディンのエレフリス", 10000, 210, 115, 6, 6, RACE_BARBARIAN},
233 { "キ'トリッ'ク", 15000, 185, 110, 5, 9, RACE_KLACKON},
234 { "蜘蛛の友ドゥロカス", 25000, 190, 115, 5, 7, RACE_DARK_ELF},
235 { "巨人殺しのフングス", 30000, 195, 112, 4, 8, RACE_DWARF},
236 { "デランサ", 10000, 210, 115, 6, 6, RACE_ELF},
237 { "レンジャーのソルビスタニ", 15000, 185, 110, 5, 9, RACE_HALF_ELF},
238 { "ノロマのゾリル", 25000, 190, 115, 5, 7, RACE_GOLEM},
239 { "イーオン・フラックス", 20000, 195, 112, 4, 8, RACE_HALF_ELF},
240 { "強者ナドック", 10000, 210, 115, 6, 6, RACE_HOBBIT},
241 { "弱虫エラモグ", 15000, 185, 110, 5, 9, RACE_KOBOLD},
242 { "公正なエオウィリス", 25000, 190, 115, 5, 7, RACE_VAMPIRE},
243 { "バルログ殺しのヒュイモグ", 30000, 195, 112, 4, 8, RACE_HALF_ORC},
244 { "冷酷ピーダス", 5000, 210, 115, 6, 6, RACE_HUMAN},
245 { "ヴァモグ スレイヤー", 15000, 185, 110, 5, 9, RACE_HALF_OGRE},
246 { "性悪フーシュナク", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
247 { "舞闘バレン", 30000, 195, 112, 4, 8, RACE_BARBARIAN},
248 { "残忍なるアーノルド", 5000, 210, 115, 6, 6, RACE_BARBARIAN},
249 { "獣殺しのアーンダル", 10000, 185, 110, 5, 9, RACE_HALF_ELF},
250 { "ビーストマスター・エディー", 25000, 190, 115, 5, 7, RACE_HALF_ORC},
251 { "竜殺しのオグライン", 30000, 195, 112, 4, 8, RACE_DWARF},
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},
257 { "Drew the Skilled", 10000, 210, 115, 6, 6, RACE_HUMAN},
258 { "Orrax Dragonson", 15000, 185, 110, 5, 9, RACE_DRACONIAN},
259 { "Anthrax Disease-Carrier", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
260 { "Arkhoth the Stout", 30000, 195, 112, 4, 8, RACE_DWARF},
261 { "Sarlyas the Rotten", 5000, 210, 115, 6, 6, RACE_ZOMBIE},
262 { "Tuethic Bare-Bones", 15000, 185, 110, 5, 9, RACE_SKELETON},
263 { "Bilious", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
264 { "Fasgul", 30000, 195, 112, 4, 8, RACE_ZOMBIE},
265 { "Ellefris the Paladin", 10000, 210, 115, 6, 6, RACE_BARBARIAN},
266 { "K'trrik'k", 15000, 185, 110, 5, 9, RACE_KLACKON},
267 { "Drocus Spiderfriend", 25000, 190, 115, 5, 7, RACE_DARK_ELF},
268 { "Fungus Giant-Slayer", 30000, 195, 112, 4, 8, RACE_DWARF},
269 { "Delantha", 10000, 210, 115, 6, 6, RACE_ELF},
270 { "Solvistani the Ranger", 15000, 185, 110, 5, 9, RACE_HALF_ELF},
271 { "Xoril the Slow", 25000, 190, 115, 5, 7, RACE_GOLEM},
272 { "Aeon Flux", 20000, 195, 112, 4, 8, RACE_HALF_ELF},
273 { "Nadoc the Strong", 10000, 210, 115, 6, 6, RACE_HOBBIT},
274 { "Eramog the Weak", 15000, 185, 110, 5, 9, RACE_KOBOLD},
275 { "Eowilith the Fair", 25000, 190, 115, 5, 7, RACE_VAMPIRE},
276 { "Huimog Balrog-Slayer", 30000, 195, 112, 4, 8, RACE_HALF_ORC},
277 { "Peadus the Cruel", 5000, 210, 115, 6, 6, RACE_HUMAN},
278 { "Vamog Slayer", 15000, 185, 110, 5, 9, RACE_HALF_OGRE},
279 { "Hooshnak the Vicious", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
280 { "Balenn War-Dancer", 30000, 195, 112, 4, 8, RACE_BARBARIAN},
281 { "Arnold the Beastly", 5000, 210, 115, 6, 6, RACE_BARBARIAN},
282 { "Arndal Beast-Slayer", 10000, 185, 110, 5, 9, RACE_HALF_ELF},
283 { "Eddie Beast-Master", 25000, 190, 115, 5, 7, RACE_HALF_ORC},
284 { "Oglign Dragon-Slayer", 30000, 195, 112, 4, 8, RACE_DWARF},
288 /* Temple - 22 unique names */
290 { "質素なルードヴィヒ", 5000, 175, 109, 6, 15, RACE_HUMAN},
291 { "パラディンのガンナー", 10000, 185, 110, 5, 23, RACE_HUMAN},
292 { "選ばれしトリン", 25000, 180, 107, 6, 20, RACE_ELF},
293 { "賢明なるサラストロ", 30000, 185, 109, 5, 15, RACE_DWARF},
294 { "パーシヴァル卿", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
295 { "神聖なるアセナス", 30000, 185, 109, 5, 15, RACE_HUMAN},
296 { "マッキノン", 10000, 175, 109, 6, 15, RACE_HUMAN},
297 { "謹み婦人", 15000, 185, 110, 5, 23, RACE_HIGH_ELF},
298 { "ドルイドのハシュニック", 25000, 180, 107, 6, 20, RACE_HOBBIT},
299 { "フィナク", 30000, 185, 109, 5, 15, RACE_YEEK},
300 { "クリキック", 10000, 175, 109, 6, 15, RACE_KLACKON},
301 { "荒くれ者モリヴァル", 15000, 185, 110, 5, 23, RACE_ELF},
302 { "暗きホシャック", 25000, 180, 107, 6, 20, RACE_IMP},
303 { "賢者アタール", 30000, 185, 109, 5, 15, RACE_HUMAN},
304 { "清きイベニッド", 10000, 175, 109, 6, 15, RACE_HUMAN},
305 { "エリディシュ", 15000, 185, 110, 5, 23, RACE_HALF_TROLL},
306 { "呪術師ヴルドゥシュ", 25000, 180, 107, 6, 20, RACE_HALF_OGRE},
307 { "狂戦士ハオブ", 30000, 185, 109, 5, 15, RACE_BARBARIAN},
308 { "若きプルーグディシュ", 10000, 175, 109, 6, 15, RACE_HALF_OGRE},
309 { "きちがいラムワイズ", 15000, 185, 110, 5, 23, RACE_YEEK},
310 { "有徳者ムワート", 25000, 180, 107, 6, 20, RACE_KOBOLD},
311 { "弱虫ダードバード", 30000, 185, 109, 5, 15, RACE_SPECTRE},
312 { "質素なルードヴィヒ", 5000, 175, 109, 6, 15, RACE_HUMAN},
313 { "パラディンのガンナー", 10000, 185, 110, 5, 23, RACE_HUMAN},
314 { "選ばれしトリン", 25000, 180, 107, 6, 20, RACE_ELF},
315 { "賢明なるサラストロ", 30000, 185, 109, 5, 15, RACE_DWARF},
316 { "パーシヴァル卿", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
317 { "神聖なるアセナス", 30000, 185, 109, 5, 15, RACE_HUMAN},
318 { "マッキノン", 10000, 175, 109, 6, 15, RACE_HUMAN},
319 { "謹み婦人", 15000, 185, 110, 5, 23, RACE_HIGH_ELF},
320 { "ドルイドのハシュニック", 25000, 180, 107, 6, 20, RACE_HOBBIT},
321 { "フィナク", 30000, 185, 109, 5, 15, RACE_YEEK},
323 { "Ludwig the Humble", 5000, 175, 109, 6, 15, RACE_DWARF},
324 { "Gunnar the Paladin", 10000, 185, 110, 5, 23, RACE_HALF_TROLL},
325 { "Torin the Chosen", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
326 { "Sarastro the Wise", 30000, 185, 109, 5, 15, RACE_HUMAN},
327 { "Sir Parsival the Pure", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
328 { "Asenath the Holy", 30000, 185, 109, 5, 15, RACE_HUMAN},
329 { "McKinnon", 10000, 175, 109, 6, 15, RACE_HUMAN},
330 { "Mistress Chastity", 15000, 185, 110, 5, 23, RACE_HIGH_ELF},
331 { "Hashnik the Druid", 25000, 180, 107, 6, 20, RACE_HOBBIT},
332 { "Finak", 30000, 185, 109, 5, 15, RACE_YEEK},
333 { "Krikkik", 10000, 175, 109, 6, 15, RACE_KLACKON},
334 { "Morival the Wild", 15000, 185, 110, 5, 23, RACE_ELF},
335 { "Hoshak the Dark", 25000, 180, 107, 6, 20, RACE_IMP},
336 { "Atal the Wise", 30000, 185, 109, 5, 15, RACE_HUMAN},
337 { "Ibenidd the Chaste", 10000, 175, 109, 6, 15, RACE_HUMAN},
338 { "Eridish", 15000, 185, 110, 5, 23, RACE_HALF_TROLL},
339 { "Vrudush the Shaman", 25000, 180, 107, 6, 20, RACE_HALF_OGRE},
340 { "Haob the Berserker", 30000, 185, 109, 5, 15, RACE_BARBARIAN},
341 { "Proogdish the Youthfull", 10000, 175, 109, 6, 15, RACE_HALF_OGRE},
342 { "Lumwise the Mad", 15000, 185, 110, 5, 23, RACE_YEEK},
343 { "Muirt the Virtuous", 25000, 180, 107, 6, 20, RACE_KOBOLD},
344 { "Dardobard the Weak", 30000, 185, 109, 5, 15, RACE_SPECTRE},
345 { "Ludwig the Humble", 5000, 175, 109, 6, 15, RACE_DWARF},
346 { "Gunnar the Paladin", 10000, 185, 110, 5, 23, RACE_HALF_TROLL},
347 { "Torin the Chosen", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
348 { "Sarastro the Wise", 30000, 185, 109, 5, 15, RACE_HUMAN},
349 { "Sir Parsival the Pure", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
350 { "Asenath the Holy", 30000, 185, 109, 5, 15, RACE_HUMAN},
351 { "McKinnon", 10000, 175, 109, 6, 15, RACE_HUMAN},
352 { "Mistress Chastity", 15000, 185, 110, 5, 23, RACE_HIGH_ELF},
353 { "Hashnik the Druid", 25000, 180, 107, 6, 20, RACE_HOBBIT},
354 { "Finak", 30000, 185, 109, 5, 15, RACE_YEEK},
358 /* Alchemist - 26 unique names */
360 { "化学者マウザー", 10000, 190, 111, 5, 8, RACE_HALF_ELF},
361 { "カオスのウィズル", 10000, 190, 110, 6, 8, RACE_HOBBIT},
362 { "強欲ミダス", 15000, 200, 116, 6, 9, RACE_GNOME},
363 { "貧弱ジャ=ファー", 15000, 220, 111, 4, 9, RACE_ELF},/*FIRST*/
364 { "カカルラカカル", 15000, 200, 116, 6, 9, RACE_KLACKON},
365 { "錬金術師ジャル=エス", 15000, 220, 111, 4, 9, RACE_ELF},
366 { "用心深いファネラス", 10000, 190, 111, 5, 8, RACE_DWARF},
367 { "キチガイのルンシー", 10000, 190, 110, 6, 8, RACE_HUMAN},
368 { "グランブルワース", 15000, 200, 116, 6, 9, RACE_GNOME},
369 { "フリッター", 15000, 220, 111, 4, 9, RACE_SPRITE},
370 { "ザリルス", 10000, 190, 111, 5, 8, RACE_HUMAN},
371 { "古きエグバート", 10000, 190, 110, 6, 8, RACE_DWARF},
372 { "誇り高きヴァリンドラ", 15000, 200, 116, 6, 9, RACE_HIGH_ELF},
373 { "錬金術師タエン", 15000, 220, 111, 4, 9, RACE_HUMAN},
374 { "巧言カイド", 10000, 190, 111, 5, 8, RACE_VAMPIRE},
375 { "暗きフリア", 10000, 190, 110, 6, 8, RACE_NIBELUNG},
376 { "質素なドムリ", 15000, 200, 116, 6, 9, RACE_DWARF},
377 { "魔の子ヤァジュッカ", 15000, 220, 111, 4, 9, RACE_IMP},
378 { "薬草師ジェララルドール", 10000, 190, 111, 5, 8, RACE_HIGH_ELF},
379 { "賢者オレラルダン", 10000, 190, 110, 6, 8, RACE_BARBARIAN},
380 { "デモニシストのフゾグロ", 15000, 200, 116, 6, 9, RACE_IMP},
381 { "錬金術師ドゥリアシュ", 15000, 220, 111, 4, 9, RACE_HALF_ORC},
382 { "強者ネリア", 10000, 190, 111, 5, 8, RACE_CYCLOPS},
383 { "辛口リグナス", 10000, 190, 110, 6, 8, RACE_HALF_ORC},
384 { "ティルバ", 15000, 200, 116, 6, 9, RACE_HOBBIT},
385 { "金持ちミリルドリック", 15000, 220, 111, 4, 9, RACE_HUMAN},
387 { "科学者マウザー", 10000, 190, 111, 5, 8, RACE_HALF_ELF},
388 { "カオスのウィズル", 10000, 190, 110, 6, 8, RACE_HOBBIT},
389 { "強欲ミダス", 15000, 200, 116, 6, 9, RACE_GNOME},
390 { "錬金術師ジャ=ファー", 15000, 220, 111, 4, 9, RACE_ELF},
391 { "カカルラカカル", 15000, 200, 116, 6, 9, RACE_KLACKON},
392 { "錬金術師ジャル=エス", 15000, 220, 111, 4, 9, RACE_ELF},
394 { "Mauser the Chemist", 10000, 190, 111, 5, 8, RACE_HALF_ELF},
395 { "Wizzle the Chaotic", 10000, 190, 110, 6, 8, RACE_HOBBIT},
396 { "Midas the Greedy", 15000, 200, 116, 6, 9, RACE_GNOME},
397 { "Ja-Far the Alchemist", 15000, 220, 111, 4, 9, RACE_ELF},
398 { "Kakalrakakal", 15000, 200, 116, 6, 9, RACE_KLACKON},
399 { "Jal-Eth the Alchemist", 15000, 220, 111, 4, 9, RACE_ELF},
400 { "Fanelath the Cautious", 10000, 190, 111, 5, 8, RACE_DWARF},
401 { "Runcie the Insane", 10000, 190, 110, 6, 8, RACE_HUMAN},
402 { "Grumbleworth", 15000, 200, 116, 6, 9, RACE_GNOME},
403 { "Flitter", 15000, 220, 111, 4, 9, RACE_SPRITE},
404 { "Xarillus", 10000, 190, 111, 5, 8, RACE_HUMAN},
405 { "Egbert the Old", 10000, 190, 110, 6, 8, RACE_DWARF},
406 { "Valindra the Proud", 15000, 200, 116, 6, 9, RACE_HIGH_ELF},
407 { "Taen the Alchemist", 15000, 220, 111, 4, 9, RACE_HUMAN},
408 { "Cayd the Sweet", 10000, 190, 111, 5, 8, RACE_VAMPIRE},
409 { "Fulir the Dark", 10000, 190, 110, 6, 8, RACE_NIBELUNG},
410 { "Domli the Humble", 15000, 200, 116, 6, 9, RACE_DWARF},
411 { "Yaarjukka Demonspawn", 15000, 220, 111, 4, 9, RACE_IMP},
412 { "Gelaraldor the Herbmaster", 10000, 190, 111, 5, 8, RACE_HIGH_ELF},
413 { "Olelaldan the Wise", 10000, 190, 110, 6, 8, RACE_BARBARIAN},
414 { "Fthoglo the Demonicist", 15000, 200, 116, 6, 9, RACE_IMP},
415 { "Dridash the Alchemist", 15000, 220, 111, 4, 9, RACE_HALF_ORC},
416 { "Nelir the Strong", 10000, 190, 111, 5, 8, RACE_CYCLOPS},
417 { "Lignus the Pungent", 10000, 190, 110, 6, 8, RACE_HALF_ORC},
418 { "Tilba", 15000, 200, 116, 6, 9, RACE_HOBBIT},
419 { "Myrildric the Wealthy", 15000, 220, 111, 4, 9, RACE_HUMAN},
421 { "Mauser the Chemist", 10000, 190, 111, 5, 8, RACE_HALF_ELF},
422 { "Wizzle the Chaotic", 10000, 190, 110, 6, 8, RACE_HOBBIT},
423 { "Midas the Greedy", 15000, 200, 116, 6, 9, RACE_GNOME},
424 { "Ja-Far the Alchemist", 15000, 220, 111, 4, 9, RACE_ELF},
425 { "Kakalrakakal", 15000, 200, 116, 6, 9, RACE_KLACKON},
426 { "Jal-Eth the Alchemist", 15000, 220, 111, 4, 9, RACE_ELF},
431 /* Magic Shop - 23 unique names */
433 { "ソーサラーのロ=パン", 20000, 200, 110, 7, 8, RACE_HALF_ELF},
434 { "偉大なるブガービイ", 20000, 215, 113, 6, 10, RACE_GNOME},
435 { "イェンダーの魔法使い", 30000, 200, 110, 7, 10, RACE_HUMAN},
436 { "死霊使いリャク",30000, 175, 110, 5, 11, RACE_HIGH_ELF},
437 { "魔術師スキドゥニー", 15000, 200, 110, 7, 8, RACE_HALF_ELF},
438 { "幻術師キリア", 30000, 200, 110, 7, 10, RACE_HUMAN},
439 { "死霊術師ニッキ", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
440 { "ソロストラン", 15000, 200, 110, 7, 8, RACE_SPRITE},
441 { "烏賊口アチシェ", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
442 { "貴族のカザ", 30000, 200, 110, 7, 10, RACE_HIGH_ELF},
443 { "暗きファジル", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
444 { "偉大なるケルドーン", 15000, 200, 110, 7, 8, RACE_DWARF},
445 { "フィランスロプス", 20000, 215, 113, 6, 10, RACE_HOBBIT},
446 { "魔女のアグナー", 30000, 200, 110, 7, 10, RACE_HUMAN},
447 { "死霊術師ビュリアンス", 30000, 175, 110, 5, 11, RACE_BEASTMAN},
448 { "ハイメイジのヴイラク", 15000, 200, 110, 7, 8, RACE_BEASTMAN},
449 { "知恵者マディッシュ", 20000, 215, 113, 6, 10, RACE_BEASTMAN},
450 { "ファレブリンボール", 30000, 200, 110, 7, 10, RACE_HIGH_ELF},
451 { "陰険フェリル=ガンド", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
452 { "呪術師サレゴード", 15000, 200, 110, 7, 8, RACE_BARBARIAN},
453 { "神秘家クトゥアロス", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
454 { "幻術師イベリ", 30000, 200, 110, 7, 10, RACE_SKELETON},
455 { "死霊術師ヘトー", 30000, 175, 110, 5, 11, RACE_YEEK},
456 { "魔術師ロ=パン", 20000, 200, 110, 7, 8, RACE_HALF_ELF},
457 { "偉大なるブガービイ", 20000, 215, 113, 6, 10, RACE_GNOME},
458 { "イェンダーの魔法使い", 30000, 200, 110, 7, 10, RACE_HUMAN},
459 { "死霊術師リャク", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
460 { "魔術師スキドゥニー", 15000, 200, 110, 7, 8, RACE_HALF_ELF},
461 { "幻術師キリア", 30000, 200, 110, 7, 10, RACE_HUMAN},
462 { "死霊術師ニッキ", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
463 { "ソロストラン", 15000, 200, 110, 7, 8, RACE_SPRITE},
464 { "烏賊口アチシェ", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
466 { "Lo Pan the Sorcerer", 20000, 200, 110, 7, 8, RACE_HALF_ELF},
467 { "Buggerby the Great", 20000, 215, 113, 6, 10, RACE_GNOME},
468 { "The Wizard of Yendor", 30000, 200, 110, 7, 10, RACE_HUMAN},
469 { "Rjak the Necromancer", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
470 { "Skidney the Sorcerer", 15000, 200, 110, 7, 8, RACE_HALF_ELF},
471 { "Kyria the Illusionist", 30000, 200, 110, 7, 10, RACE_HUMAN},
472 { "Nikki the Necromancer", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
473 { "Solostoran", 15000, 200, 110, 7, 8, RACE_SPRITE},
474 { "Achshe the Tentacled", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
475 { "Kaza the Noble", 30000, 200, 110, 7, 10, RACE_HIGH_ELF},
476 { "Fazzil the Dark", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
477 { "Keldorn the Grand", 15000, 200, 110, 7, 8, RACE_DWARF},
478 { "Philanthropus", 20000, 215, 113, 6, 10, RACE_HOBBIT},
479 { "Agnar the Enchantress", 30000, 200, 110, 7, 10, RACE_HUMAN},
480 { "Buliance the Necromancer", 30000, 175, 110, 5, 11, RACE_BEASTMAN},
481 { "Vuirak the High-Mage", 15000, 200, 110, 7, 8, RACE_BEASTMAN},
482 { "Madish the Smart", 20000, 215, 113, 6, 10, RACE_BEASTMAN},
483 { "Falebrimbor", 30000, 200, 110, 7, 10, RACE_HIGH_ELF},
484 { "Felil-Gand the Subtle", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
485 { "Thalegord the Shaman", 15000, 200, 110, 7, 8, RACE_BARBARIAN},
486 { "Cthoaloth the Mystic", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
487 { "Ibeli the Illusionist", 30000, 200, 110, 7, 10, RACE_SKELETON},
488 { "Heto the Necromancer", 30000, 175, 110, 5, 11, RACE_YEEK},
489 { "Lo Pan the Sorcerer", 20000, 200, 110, 7, 8, RACE_HALF_ELF},
490 { "Buggerby the Great", 20000, 215, 113, 6, 10, RACE_GNOME},
491 { "The Wizard of Yendor", 30000, 200, 110, 7, 10, RACE_HUMAN},
492 { "Rjak the Necromancer", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
493 { "Skidney the Sorcerer", 15000, 200, 110, 7, 8, RACE_HALF_ELF},
494 { "Kyria the Illusionist", 30000, 200, 110, 7, 10, RACE_HUMAN},
495 { "Nikki the Necromancer", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
496 { "Solostoran", 15000, 200, 110, 7, 8, RACE_SPRITE},
497 { "Achshe the Tentacled", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
501 /* Black Market - 32 unique names */
503 { "ガリー=ギガズ", 20000, 250, 150, 10, 5, RACE_HALF_TROLL},
504 { "ゴブリンのヒストーア", 20000, 250, 150, 10, 5, RACE_HALF_ORC},
505 { "フェレンギ人クアーク", 30000, 250, 150, 10, 5, RACE_HUMAN},
506 { "公正なる(?)トッピ", 30000, 250, 150, 10, 5, RACE_ELF},
507 { "死人ヴァッサ", 20000, 250, 150, 10, 5, RACE_ZOMBIE},
508 { "裏切り者カイン", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
509 { "ブボニカス", 30000, 250, 150, 10, 5, RACE_BEASTMAN},
510 { "コープスライト", 30000, 250, 150, 10, 5, RACE_SPECTRE},
511 { "血に飢えしパリッシュ", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
512 { "ヴァイル", 20000, 250, 150, 10, 5, RACE_SKELETON},
513 { "信頼のプレンティス", 30000, 250, 150, 10, 5, RACE_SKELETON},
514 { "人間殺しのグリエラ", 30000, 250, 150, 10, 5, RACE_IMP},
515 { "エンジェル", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
516 { "水膨れフロツァム", 20000, 250, 150, 10, 5, RACE_ZOMBIE},
517 { "ニーヴァル", 30000, 250, 150, 10, 5, RACE_VAMPIRE},
518 { "明るいアナスタシア", 30000, 250, 150, 10, 5, RACE_SPECTRE},
519 { "死霊術師チャリティー", 20000, 250, 150, 10, 5, RACE_DARK_ELF},
520 { "ボクサーのプグナシオス", 20000, 250, 150, 10, 5, RACE_HALF_ORC},
521 { "幸運なフットソア", 30000, 250, 150, 10, 5, RACE_BEASTMAN},
522 { "光指のシドリア", 30000, 250, 150, 10, 5, RACE_HUMAN},
523 { "手品師リアソー", 20000, 250, 150, 10, 5, RACE_HOBBIT},
524 { "やりくり上手のジャナッカ", 20000, 250, 150, 10, 5, RACE_GNOME},
525 { "悪党シーナ", 30000, 250, 150, 10, 5, RACE_GNOME},
526 { "大爪アルニッキ", 30000, 250, 150, 10, 5, RACE_DRACONIAN},
527 { "貧乏チャエアンド", 20000, 250, 150, 10, 5, RACE_HUMAN},
528 { "山賊アファードーフ", 20000, 250, 150, 10, 5, RACE_BARBARIAN},
529 { "強欲ラザクスル", 30000, 250, 150, 10, 5, RACE_MIND_FLAYER},
530 { "ファラレウィン", 30000, 250, 150, 10, 5, RACE_SPRITE},
531 { "しわしわヴォスール", 20000, 250, 150, 10, 5, RACE_NIBELUNG},
532 { "ハンサムなアラオード", 20000, 250, 150, 10, 5, RACE_AMBERITE},
533 { "負け犬セラドフリド", 30000, 250, 150, 10, 5, RACE_HUMAN},
534 { "片足のエルーロ", 30000, 250, 150, 10, 5, RACE_HALF_OGRE},
536 { "Gary Gygaz", 20000, 250, 150, 10, 5, RACE_HALF_TROLL},
537 { "Histor the Goblin", 20000, 250, 150, 10, 5, RACE_HALF_ORC},
538 { "Quark the Ferengi", 30000, 250, 150, 10, 5, RACE_DWARF},
539 { "Topi the Fair(?)", 30000, 250, 150, 10, 5, RACE_HUMAN},
540 { "Vhassa the Dead", 20000, 250, 150, 10, 5, RACE_ZOMBIE},
541 { "Kyn the Treacherous", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
542 { "Bubonicus", 30000, 250, 150, 10, 5, RACE_BEASTMAN},
543 { "Corpselight", 30000, 250, 150, 10, 5, RACE_SPECTRE},
544 { "Parrish the Bloodthirsty", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
545 { "Vile", 20000, 250, 150, 10, 5, RACE_SKELETON},
546 { "Prentice the Trusted", 30000, 250, 150, 10, 5, RACE_SKELETON},
547 { "Griella Humanslayer", 30000, 250, 150, 10, 5, RACE_IMP},
548 { "Angel", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
549 { "Flotsam the Bloated", 20000, 250, 150, 10, 5, RACE_ZOMBIE},
550 { "Nieval", 30000, 250, 150, 10, 5, RACE_VAMPIRE},
551 { "Anastasia the Luminous", 30000, 250, 150, 10, 5, RACE_SPECTRE},
552 { "Charity the Necromancer", 20000, 250, 150, 10, 5, RACE_DARK_ELF},
553 { "Pugnacious the Pugilist", 20000, 250, 150, 10, 5, RACE_HALF_ORC},
554 { "Footsore the Lucky", 30000, 250, 150, 10, 5, RACE_BEASTMAN},
555 { "Sidria Lighfingered", 30000, 250, 150, 10, 5, RACE_HUMAN},
556 { "Riatho the Juggler", 20000, 250, 150, 10, 5, RACE_HOBBIT},
557 { "Janaaka the Shifty", 20000, 250, 150, 10, 5, RACE_GNOME},
558 { "Cina the Rogue", 30000, 250, 150, 10, 5, RACE_GNOME},
559 { "Arunikki Greatclaw", 30000, 250, 150, 10, 5, RACE_DRACONIAN},
560 { "Chaeand the Poor", 20000, 250, 150, 10, 5, RACE_HUMAN},
561 { "Afardorf the Brigand", 20000, 250, 150, 10, 5, RACE_BARBARIAN},
562 { "Lathaxl the Greedy", 30000, 250, 150, 10, 5, RACE_MIND_FLAYER},
563 { "Falarewyn", 30000, 250, 150, 10, 5, RACE_SPRITE},
564 { "Vosur the Wrinkled", 20000, 250, 150, 10, 5, RACE_NIBELUNG},
565 { "Araord the Handsome", 20000, 250, 150, 10, 5, RACE_AMBERITE},
566 { "Theradfrid the Loser", 30000, 250, 150, 10, 5, RACE_HUMAN},
567 { "One-Legged Eroolo", 30000, 250, 150, 10, 5, RACE_HALF_OGRE},
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},
577 { "我が家", 0, 100, 100, 0, 99, 99},
578 { "我が家", 0, 100, 100, 0, 99, 99},
579 { "我が家", 0, 100, 100, 0, 99, 99},
580 { "我が家", 0, 100, 100, 0, 99, 99},
581 { "我が家", 0, 100, 100, 0, 99, 99},
582 { "我が家", 0, 100, 100, 0, 99, 99},
583 { "我が家", 0, 100, 100, 0, 99, 99},
584 { "我が家", 0, 100, 100, 0, 99, 99},
585 { "我が家", 0, 100, 100, 0, 99, 99},
586 { "我が家", 0, 100, 100, 0, 99, 99},
587 { "我が家", 0, 100, 100, 0, 99, 99},
588 { "我が家", 0, 100, 100, 0, 99, 99},
589 { "我が家", 0, 100, 100, 0, 99, 99},
590 { "我が家", 0, 100, 100, 0, 99, 99},
591 { "我が家", 0, 100, 100, 0, 99, 99},
592 { "我が家", 0, 100, 100, 0, 99, 99},
593 { "我が家", 0, 100, 100, 0, 99, 99},
594 { "我が家", 0, 100, 100, 0, 99, 99},
595 { "我が家", 0, 100, 100, 0, 99, 99},
596 { "我が家", 0, 100, 100, 0, 99, 99},
597 { "我が家", 0, 100, 100, 0, 99, 99},
598 { "我が家", 0, 100, 100, 0, 99, 99},
599 { "我が家", 0, 100, 100, 0, 99, 99},
600 { "我が家", 0, 100, 100, 0, 99, 99},
601 { "我が家", 0, 100, 100, 0, 99, 99},
602 { "我が家", 0, 100, 100, 0, 99, 99},
603 { "我が家", 0, 100, 100, 0, 99, 99},
604 { "我が家", 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},
610 { "Your home", 0, 100, 100, 0, 99, 99},
611 { "Your home", 0, 100, 100, 0, 99, 99},
612 { "Your home", 0, 100, 100, 0, 99, 99},
613 { "Your home", 0, 100, 100, 0, 99, 99},
614 { "Your home", 0, 100, 100, 0, 99, 99},
615 { "Your home", 0, 100, 100, 0, 99, 99},
616 { "Your home", 0, 100, 100, 0, 99, 99},
617 { "Your home", 0, 100, 100, 0, 99, 99},
618 { "Your home", 0, 100, 100, 0, 99, 99},
619 { "Your home", 0, 100, 100, 0, 99, 99},
620 { "Your home", 0, 100, 100, 0, 99, 99},
621 { "Your home", 0, 100, 100, 0, 99, 99},
622 { "Your home", 0, 100, 100, 0, 99, 99},
623 { "Your home", 0, 100, 100, 0, 99, 99},
624 { "Your home", 0, 100, 100, 0, 99, 99},
625 { "Your home", 0, 100, 100, 0, 99, 99},
626 { "Your home", 0, 100, 100, 0, 99, 99},
627 { "Your home", 0, 100, 100, 0, 99, 99},
628 { "Your home", 0, 100, 100, 0, 99, 99},
629 { "Your home", 0, 100, 100, 0, 99, 99},
630 { "Your home", 0, 100, 100, 0, 99, 99},
631 { "Your home", 0, 100, 100, 0, 99, 99},
632 { "Your home", 0, 100, 100, 0, 99, 99},
633 { "Your home", 0, 100, 100, 0, 99, 99},
634 { "Your home", 0, 100, 100, 0, 99, 99},
635 { "Your home", 0, 100, 100, 0, 99, 99},
636 { "Your home", 0, 100, 100, 0, 99, 99},
637 { "Your home", 0, 100, 100, 0, 99, 99},
643 /* Bookstore - 21 unique names */
645 { "強欲ドラフ", 10000, 175, 108, 4, 12, RACE_HUMAN},
646 { "賢者オドナー", 15000, 120, 105, 6, 16, RACE_HIGH_ELF},
647 { "中立のガンダー", 25000, 120, 110, 7, 19, RACE_DARK_ELF},
648 { "忍耐の人ロ=シャ", 30000, 140, 105, 6, 12, RACE_ELF},
649 { "ランドルフ・カーター", 15000, 175, 108, 4, 12, RACE_HUMAN},
650 { "隼のサライ", 15000, 175, 108, 4, 12, RACE_HUMAN},
651 { "千里眼ボドリル", 20000, 120, 105, 6, 16, RACE_HIGH_ELF},
652 { "沈黙のヴェオロイン", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
653 { "学者のヴァンシラス", 30000, 140, 105, 6, 12, RACE_MIND_FLAYER},
654 { "物書きオセイン", 15000, 175, 108, 4, 12, RACE_SKELETON},
655 { "本の虫オルヴァー", 20000, 120, 105, 6, 16, RACE_VAMPIRE},
656 { "浅井墓男", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
657 { "デスマスク", 30000, 140, 105, 6, 12, RACE_ZOMBIE},
658 { "学者のアスーヌ", 15000, 175, 108, 4, 12, RACE_MIND_FLAYER},
659 { "死人のプリランド", 20000, 120, 105, 6, 16, RACE_ZOMBIE},
660 { "鉄のロナール", 25000, 120, 110, 7, 19, RACE_GOLEM},
662 { "Dolaf the Greedy", 10000, 175, 108, 4, 12, RACE_HUMAN},
663 { "Odnar the Sage", 15000, 120, 105, 6, 16, RACE_HIGH_ELF},
664 { "Gandar the Neutral", 25000, 120, 110, 7, 19, RACE_DARK_ELF},
665 { "Ro-sha the Patient", 30000, 140, 105, 6, 12, RACE_ELF},
666 { "Randolph Carter", 15000, 175, 108, 4, 12, RACE_HUMAN},
667 { "Sarai the Swift", 15000, 175, 108, 4, 12, RACE_HUMAN},
668 { "Bodril the Seer", 20000, 120, 105, 6, 16, RACE_HIGH_ELF},
669 { "Veloin the Quiet", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
670 { "Vanthylas the Learned", 30000, 140, 105, 6, 12, RACE_MIND_FLAYER},
671 { "Ossein the Literate", 15000, 175, 108, 4, 12, RACE_SKELETON},
672 { "Olvar Bookworm", 20000, 120, 105, 6, 16, RACE_VAMPIRE},
673 { "Shallowgrave", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
674 { "Death Mask", 30000, 140, 105, 6, 12, RACE_ZOMBIE},
675 { "Asuunu the Learned", 15000, 175, 108, 4, 12, RACE_MIND_FLAYER},
676 { "Prirand the Dead", 20000, 120, 105, 6, 16, RACE_ZOMBIE},
677 { "Ronar the Iron", 25000, 120, 110, 7, 19, RACE_GOLEM},
680 { "ガリル=ガミル", 30000, 140, 105, 6, 12, RACE_ELF},
681 { "本食いローバグ", 15000, 175, 108, 4, 12, RACE_KOBOLD},
682 { "キリアリキーク", 20000, 120, 105, 6, 16, RACE_KLACKON},
683 { "静かなるリリン", 25000, 120, 110, 7, 19, RACE_DWARF},
684 { "王者イサング", 30000, 140, 105, 6, 12, RACE_HIGH_ELF},
685 { "強欲ドラフ", 10000, 175, 108, 4, 12, RACE_HUMAN},
686 { "賢者オドナー", 15000, 120, 105, 6, 16, RACE_HIGH_ELF},
687 { "中立のガンダー", 25000, 120, 110, 7, 19, RACE_DARK_ELF},
688 { "忍耐の人ロ=シャ", 30000, 140, 105, 6, 12, RACE_ELF},
689 { "ランドルフ・カーター", 15000, 175, 108, 4, 12, RACE_HUMAN},
690 { "隼サライ", 15000, 175, 108, 4, 12, RACE_HUMAN},
691 { "千里眼ボドリル", 20000, 120, 105, 6, 16, RACE_HIGH_ELF},
692 { "沈黙のヴェオロイン", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
693 { "学者のヴァンシラス", 30000, 140, 105, 6, 12, RACE_MIND_FLAYER},
694 { "物書きオセイン", 15000, 175, 108, 4, 12, RACE_SKELETON},
695 { "本の虫オルヴァー", 20000, 120, 105, 6, 16, RACE_VAMPIRE},
697 { "Galil-Gamir", 30000, 140, 105, 6, 12, RACE_ELF},
698 { "Rorbag Book-Eater", 15000, 175, 108, 4, 12, RACE_KOBOLD},
699 { "Kiriarikirk", 20000, 120, 105, 6, 16, RACE_KLACKON},
700 { "Rilin the Quiet", 25000, 120, 110, 7, 19, RACE_DWARF},
701 { "Isung the Lord", 30000, 140, 105, 6, 12, RACE_HIGH_ELF},
702 { "Dolaf the Greedy", 10000, 175, 108, 4, 12, RACE_HUMAN},
703 { "Odnar the Sage", 15000, 120, 105, 6, 16, RACE_HIGH_ELF},
704 { "Gandar the Neutral", 25000, 120, 110, 7, 19, RACE_DARK_ELF},
705 { "Ro-sha the Patient", 30000, 140, 105, 6, 12, RACE_ELF},
706 { "Randolph Carter", 15000, 175, 108, 4, 12, RACE_HUMAN},
707 { "Sarai the Swift", 15000, 175, 108, 4, 12, RACE_HUMAN},
708 { "Bodril the Seer", 20000, 120, 105, 6, 16, RACE_HIGH_ELF},
709 { "Veloin the Quiet", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
710 { "Vanthylas the Learned", 30000, 140, 105, 6, 12, RACE_MIND_FLAYER},
711 { "Ossein the Literate", 15000, 175, 108, 4, 12, RACE_SKELETON},
712 { "Olvar Bookworm", 20000, 120, 105, 6, 16, RACE_VAMPIRE},
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},
723 { "博物館", 0, 100, 100, 0, 99, 99},
724 { "博物館", 0, 100, 100, 0, 99, 99},
725 { "博物館", 0, 100, 100, 0, 99, 99},
726 { "博物館", 0, 100, 100, 0, 99, 99},
727 { "博物館", 0, 100, 100, 0, 99, 99},
728 { "博物館", 0, 100, 100, 0, 99, 99},
729 { "博物館", 0, 100, 100, 0, 99, 99},
730 { "博物館", 0, 100, 100, 0, 99, 99},
731 { "博物館", 0, 100, 100, 0, 99, 99},
732 { "博物館", 0, 100, 100, 0, 99, 99},
733 { "博物館", 0, 100, 100, 0, 99, 99},
734 { "博物館", 0, 100, 100, 0, 99, 99},
735 { "博物館", 0, 100, 100, 0, 99, 99},
736 { "博物館", 0, 100, 100, 0, 99, 99},
737 { "博物館", 0, 100, 100, 0, 99, 99},
738 { "博物館", 0, 100, 100, 0, 99, 99},
739 { "博物館", 0, 100, 100, 0, 99, 99},
740 { "博物館", 0, 100, 100, 0, 99, 99},
741 { "博物館", 0, 100, 100, 0, 99, 99},
742 { "博物館", 0, 100, 100, 0, 99, 99},
743 { "博物館", 0, 100, 100, 0, 99, 99},
744 { "博物館", 0, 100, 100, 0, 99, 99},
745 { "博物館", 0, 100, 100, 0, 99, 99},
746 { "博物館", 0, 100, 100, 0, 99, 99},
747 { "博物館", 0, 100, 100, 0, 99, 99},
748 { "博物館", 0, 100, 100, 0, 99, 99},
749 { "博物館", 0, 100, 100, 0, 99, 99},
750 { "博物館", 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},
756 { "Museum", 0, 100, 100, 0, 99, 99},
757 { "Museum", 0, 100, 100, 0, 99, 99},
758 { "Museum", 0, 100, 100, 0, 99, 99},
759 { "Museum", 0, 100, 100, 0, 99, 99},
760 { "Museum", 0, 100, 100, 0, 99, 99},
761 { "Museum", 0, 100, 100, 0, 99, 99},
762 { "Museum", 0, 100, 100, 0, 99, 99},
763 { "Museum", 0, 100, 100, 0, 99, 99},
764 { "Museum", 0, 100, 100, 0, 99, 99},
765 { "Museum", 0, 100, 100, 0, 99, 99},
766 { "Museum", 0, 100, 100, 0, 99, 99},
767 { "Museum", 0, 100, 100, 0, 99, 99},
768 { "Museum", 0, 100, 100, 0, 99, 99},
769 { "Museum", 0, 100, 100, 0, 99, 99},
770 { "Museum", 0, 100, 100, 0, 99, 99},
771 { "Museum", 0, 100, 100, 0, 99, 99},
772 { "Museum", 0, 100, 100, 0, 99, 99},
773 { "Museum", 0, 100, 100, 0, 99, 99},
774 { "Museum", 0, 100, 100, 0, 99, 99},
775 { "Museum", 0, 100, 100, 0, 99, 99},
776 { "Museum", 0, 100, 100, 0, 99, 99},
777 { "Museum", 0, 100, 100, 0, 99, 99},
778 { "Museum", 0, 100, 100, 0, 99, 99},
779 { "Museum", 0, 100, 100, 0, 99, 99},
780 { "Museum", 0, 100, 100, 0, 99, 99},
781 { "Museum", 0, 100, 100, 0, 99, 99},
782 { "Museum", 0, 100, 100, 0, 99, 99},
783 { "Museum", 0, 100, 100, 0, 99, 99},
790 static int cur_store_num = 0;
791 static int store_top = 0;
792 static int store_bottom = 0;
793 static int xtra_stock = 0;
794 static store_type *st_ptr = NULL;
795 static const owner_type *ot_ptr = NULL;
796 static s16b old_town_num = 0;
797 static s16b inner_town_num = 0;
798 #define RUMOR_CHANCE 8
800 #define MAX_COMMENT_1 6
802 static concptr comment_1[MAX_COMMENT_1] =
823 /*! ブラックマーケット追加メッセージ(承諾) */
824 static concptr comment_1_B[MAX_COMMENT_1] = {
833 #define MAX_COMMENT_2A 2
835 static concptr comment_2a[MAX_COMMENT_2A] =
838 "私の忍耐力を試しているのかい? $%s が最後だ。",
839 "我慢にも限度があるぞ。 $%s が最後だ。"
841 "You try my patience. %s is final.",
842 "My patience grows thin. %s is final."
847 #define MAX_COMMENT_2B 12
849 static concptr comment_2b[MAX_COMMENT_2B] =
852 " $%s ぐらいは出さなきゃダメだよ。",
855 "何て奴だ! $%s 以下はあり得ないぞ。",
856 "それじゃ少なすぎる! $%s は欲しいところだ。",
857 "バカにしている! $%s はもらわないと。",
859 "おいおい! $%s を考えてくれないか?",
860 "1000匹のオークのノミに苦しめられるがいい! $%s だ。",
861 "お前の大切なものに災いあれ! $%s でどうだ。",
862 "モルゴスに賞味されるがいい!本当は $%s なんだろう?",
863 "お前の母親はオーガか! $%s は出すつもりなんだろ?"
865 "I can take no less than %s gold pieces.",
866 "I will accept no less than %s gold pieces.",
867 "Ha! No less than %s gold pieces.",
868 "You knave! No less than %s gold pieces.",
869 "That's a pittance! I want %s gold pieces.",
870 "That's an insult! I want %s gold pieces.",
871 "As if! How about %s gold pieces?",
872 "My arse! How about %s gold pieces?",
873 "May the fleas of 1000 orcs molest you! Try %s gold pieces.",
874 "May your most favourite parts go moldy! Try %s gold pieces.",
875 "May Morgoth find you tasty! Perhaps %s gold pieces?",
876 "Your mother was an Ogre! Perhaps %s gold pieces?"
882 /*! ブラックマーケット用追加メッセージ(売るとき) */
883 static concptr comment_2b_B[MAX_COMMENT_2B] = {
884 "いくら俺様がお人好しとはいえ $%s が限界だね。嫌なら帰りな。",
885 "金がないのかい、あんた?まずは家に帰って $%s 揃えてきな。",
886 "物の価値が分からん奴だな。これは $%s が普通なんだよ。",
887 "俺の付けた値段に文句があるのか? $%s が限界だ。",
888 "ひょっとして新手の冗談かい? $%s 持ってないなら帰りな。",
889 "うちは他の店とは違うんだよ。$%s ぐらいは出しな。",
890 "買う気がないなら帰りな。 $%s だと言っているんだ。",
891 "話にならないね。 $%s くらい持っているんだろ?",
892 "は?なんだそりゃ? $%s の間違いか、ひょっとして?",
893 "出口はあっちだよ。それとも $%s 出せるのかい、あんたに。",
894 "命知らずな奴だな。 $%s 出せば今日の所は勘弁してやるよ。",
895 "うちの店は貧乏人お断りだ。 $%s ぐらい出せないのかい?"
898 #define MAX_COMMENT_3A 2
900 static concptr comment_3a[MAX_COMMENT_3A] =
903 "私の忍耐力を試しているのかい? $%s が最後だ。",
904 "我慢にも限度があるぞ。 $%s が最後だ。"
906 "You try my patience. %s is final.",
907 "My patience grows thin. %s is final."
913 #define MAX_COMMENT_3B 12
915 static concptr comment_3b[MAX_COMMENT_3B] =
918 "本音を言うと $%s でいいんだろ?",
920 " $%s ぐらいなら出してもいいが。",
921 " $%s 以上払うなんて考えられないね。",
922 "まあ落ちついて。 $%s でどうだい?",
923 "そのガラクタなら $%s で引き取るよ。",
924 "それじゃ高すぎる! $%s がいいとこだろ。",
925 "どうせいらないんだろ! $%s でいいだろ?",
926 "だめだめ! $%s がずっとお似合いだよ。",
927 "バカにしている! $%s がせいぜいだ。",
928 " $%s なら嬉しいところだがなあ。",
929 " $%s 、それ以上はビタ一文出さないよ!"
931 "Perhaps %s gold pieces?",
932 "How about %s gold pieces?",
933 "I will pay no more than %s gold pieces.",
934 "I can afford no more than %s gold pieces.",
935 "Be reasonable. How about %s gold pieces?",
936 "I'll buy it as scrap for %s gold pieces.",
937 "That is too much! How about %s gold pieces?",
938 "That looks war surplus! Say %s gold pieces?",
939 "Never! %s is more like it.",
940 "That's an insult! %s is more like it.",
941 "%s gold pieces and be thankful for it!",
942 "%s gold pieces and not a copper more!"
948 /*! ブラックマーケット用追加メッセージ(買い取り) */
949 static concptr comment_3b_B[MAX_COMMENT_3B] = {
950 " $%s ってところだね。そのどうしようもないガラクタは。",
951 "この俺が $%s って言っているんだから、その通りにした方が身のためだぞ。",
952 "俺の優しさに甘えるのもいい加減にしておけ。 $%s だ。",
953 "その品なら $%s で売ってくれているがね、常識ある紳士はみんな。",
954 "こりゃまた、がめつい奴だな。いくら俺が温厚とはいえ $%s が限界だ。",
955 " $%s だ。別に俺はそんなガラクタ欲しくはないんだから。",
956 "俺の鑑定額が気に入らないのか? $%s 、嫌なら帰りな。",
957 " $%s で引き取ってやるよ。喜んで受け取りな、貧乏人。",
958 "物の価値が分からん奴は始末におえんな。それは $%s なんだよ。",
959 "そんなに金が欲しいのか、あんた? $%s で満足できんのか?",
960 "入る店間違えてんじゃないのか? $%s で嫌なら他をあたってくれ。",
961 "俺の言い値にケチをつける奴がいるとは! その度胸に免じて $%s だ。"
964 #define MAX_COMMENT_4A 4
966 static concptr comment_4a[MAX_COMMENT_4A] =
969 "もうたくさんだ!何度も私をわずらわせないでくれ!",
970 "うがー!一日の我慢の限度を超えている!",
971 "もういい!時間の無駄以外のなにものでもない!",
972 "もうやってられないよ!顔も見たくない!"
974 "Enough! You have abused me once too often!",
975 "Arghhh! I have had enough abuse for one day!",
976 "That does it! You shall waste my time no more!",
977 "This is getting nowhere! I'm going to Londis!"
983 /*! ブラックマーケット用追加メッセージ(怒りの頂点) */
984 static concptr comment_4a_B[MAX_COMMENT_4A] = {
985 "なめやがって!温厚な俺様でも限界があるってことを知れ!",
986 "俺をここまで怒らせて...命があるだけでもありがたいと思え!",
987 "ふざけてるのか!冷やかしなら相手を見てからにしろ!",
988 "いいかげんにしろ!今度こんなまねしたらただじゃおかねえぞ!"
991 #define MAX_COMMENT_4B 4
993 static concptr comment_4b[MAX_COMMENT_4B] =
1002 "Get out of my sight!",
1003 "Begone, you scoundrel!",
1010 /*! ブラックマーケット用追加メッセージ(追い出し) */
1011 static concptr comment_4b_B[MAX_COMMENT_4B] = {
1018 #define MAX_COMMENT_5 8
1020 static concptr comment_5[MAX_COMMENT_5] =
1034 "You will have to do better than that!",
1035 "Do you wish to do business or not?",
1036 "You've got to be kidding!",
1037 "You'd better be kidding!",
1038 "You try my patience.",
1039 "Hmmm, nice weather we're having."
1045 /*! ブラックマーケット用追加メッセージ(怒り) */
1046 static concptr comment_5_B[MAX_COMMENT_5] = {
1057 #define MAX_COMMENT_6 4
1059 static concptr comment_6[MAX_COMMENT_6] =
1067 "I must have heard you wrong.",
1068 "I'm sorry, I missed that.",
1069 "I'm sorry, what was that?",
1070 "Sorry, what was that again?"
1075 /*** Initialize others ***/
1078 * 店舗で販売するオブジェクトを定義する / Hack -- Objects sold in the stores -- by tval/sval pair.
1080 byte store_table[MAX_STORES][STORE_CHOICES][2] =
1085 { TV_FOOD, SV_FOOD_RATION },
1086 { TV_FOOD, SV_FOOD_RATION },
1087 { TV_FOOD, SV_FOOD_RATION },
1088 { TV_FOOD, SV_FOOD_RATION },
1090 { TV_FOOD, SV_FOOD_RATION },
1091 { TV_FOOD, SV_FOOD_BISCUIT },
1092 { TV_FOOD, SV_FOOD_JERKY },
1093 { TV_FOOD, SV_FOOD_JERKY },
1095 { TV_FOOD, SV_FOOD_PINT_OF_WINE },
1096 { TV_FOOD, SV_FOOD_PINT_OF_ALE },
1097 { TV_LITE, SV_LITE_TORCH },
1098 { TV_LITE, SV_LITE_TORCH },
1100 { TV_LITE, SV_LITE_TORCH },
1101 { TV_LITE, SV_LITE_TORCH },
1102 { TV_LITE, SV_LITE_LANTERN },
1103 { TV_LITE, SV_LITE_LANTERN },
1115 { TV_SHOT, SV_AMMO_NORMAL },
1116 { TV_ARROW, SV_AMMO_NORMAL },
1117 { TV_BOLT, SV_AMMO_NORMAL },
1118 { TV_DIGGING, SV_SHOVEL },
1120 { TV_DIGGING, SV_PICK },
1121 { TV_CLOAK, SV_CLOAK },
1122 { TV_CLOAK, SV_CLOAK },
1123 { TV_CLOAK, SV_FUR_CLOAK },
1125 { TV_FOOD, SV_FOOD_RATION },
1126 { TV_FOOD, SV_FOOD_RATION },
1127 { TV_FOOD, SV_FOOD_RATION },
1128 { TV_FOOD, SV_FOOD_RATION },
1130 { TV_POTION, SV_POTION_WATER },
1131 { TV_POTION, SV_POTION_WATER },
1132 { TV_LITE, SV_LITE_LANTERN },
1133 { TV_LITE, SV_LITE_LANTERN },
1135 { TV_FOOD, SV_FOOD_WAYBREAD },
1136 { TV_FOOD, SV_FOOD_WAYBREAD },
1140 { TV_SHOT, SV_AMMO_NORMAL },
1141 { TV_ARROW, SV_AMMO_NORMAL },
1142 { TV_BOLT, SV_AMMO_NORMAL },
1143 { TV_DIGGING, SV_SHOVEL }
1149 { TV_BOOTS, SV_PAIR_OF_SOFT_LEATHER_BOOTS },
1150 { TV_BOOTS, SV_PAIR_OF_SOFT_LEATHER_BOOTS },
1151 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
1152 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
1154 { TV_HELM, SV_HARD_LEATHER_CAP },
1155 { TV_HELM, SV_HARD_LEATHER_CAP },
1156 { TV_HELM, SV_METAL_CAP },
1157 { TV_HELM, SV_IRON_HELM },
1159 { TV_SOFT_ARMOR, SV_ROBE },
1160 { TV_SOFT_ARMOR, SV_ROBE },
1161 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
1162 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
1164 { TV_SOFT_ARMOR, SV_HARD_LEATHER_ARMOR },
1165 { TV_SOFT_ARMOR, SV_HARD_LEATHER_ARMOR },
1166 { TV_SOFT_ARMOR, SV_HARD_STUDDED_LEATHER },
1167 { TV_SOFT_ARMOR, SV_HARD_STUDDED_LEATHER },
1169 { TV_SOFT_ARMOR, SV_RHINO_HIDE_ARMOR },
1170 { TV_SOFT_ARMOR, SV_LEATHER_SCALE_MAIL },
1171 { TV_HARD_ARMOR, SV_METAL_SCALE_MAIL },
1172 { TV_HARD_ARMOR, SV_CHAIN_MAIL },
1174 { TV_HARD_ARMOR, SV_DOUBLE_RING_MAIL },
1175 { TV_HARD_ARMOR, SV_AUGMENTED_CHAIN_MAIL },
1176 { TV_HARD_ARMOR, SV_BAR_CHAIN_MAIL },
1177 { TV_HARD_ARMOR, SV_DOUBLE_CHAIN_MAIL },
1179 { TV_HARD_ARMOR, SV_METAL_BRIGANDINE_ARMOUR },
1180 { TV_HARD_ARMOR, SV_SPLINT_MAIL },
1181 { TV_GLOVES, SV_SET_OF_LEATHER_GLOVES },
1182 { TV_GLOVES, SV_SET_OF_LEATHER_GLOVES },
1184 { TV_GLOVES, SV_SET_OF_GAUNTLETS },
1185 { TV_SHIELD, SV_SMALL_LEATHER_SHIELD },
1186 { TV_SHIELD, SV_LARGE_LEATHER_SHIELD },
1187 { TV_SHIELD, SV_SMALL_METAL_SHIELD },
1189 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
1190 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
1191 { TV_HELM, SV_HARD_LEATHER_CAP },
1192 { TV_HELM, SV_HARD_LEATHER_CAP },
1194 { TV_SOFT_ARMOR, SV_ROBE },
1195 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
1196 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
1197 { TV_SOFT_ARMOR, SV_HARD_LEATHER_ARMOR },
1199 { TV_SOFT_ARMOR, SV_LEATHER_JACK },
1200 { TV_HARD_ARMOR, SV_METAL_SCALE_MAIL },
1201 { TV_HARD_ARMOR, SV_CHAIN_MAIL },
1202 { TV_HARD_ARMOR, SV_CHAIN_MAIL },
1204 { TV_GLOVES, SV_SET_OF_LEATHER_GLOVES },
1205 { TV_GLOVES, SV_SET_OF_GAUNTLETS },
1206 { TV_SHIELD, SV_SMALL_LEATHER_SHIELD },
1207 { TV_SHIELD, SV_SMALL_LEATHER_SHIELD }
1213 { TV_SWORD, SV_DAGGER },
1214 { TV_SWORD, SV_MAIN_GAUCHE },
1215 { TV_SWORD, SV_RAPIER },
1216 { TV_SWORD, SV_SMALL_SWORD },
1218 { TV_SWORD, SV_SHORT_SWORD },
1219 { TV_SWORD, SV_SABRE },
1220 { TV_SWORD, SV_CUTLASS },
1221 { TV_SWORD, SV_TULWAR },
1223 { TV_SWORD, SV_BROAD_SWORD },
1224 { TV_SWORD, SV_LONG_SWORD },
1225 { TV_SWORD, SV_SCIMITAR },
1226 { TV_SWORD, SV_KATANA },
1228 { TV_SWORD, SV_BASTARD_SWORD },
1229 { TV_POLEARM, SV_SPEAR },
1230 { TV_POLEARM, SV_AWL_PIKE },
1231 { TV_POLEARM, SV_TRIDENT },
1233 { TV_POLEARM, SV_PIKE },
1234 { TV_POLEARM, SV_BEAKED_AXE },
1235 { TV_POLEARM, SV_BROAD_AXE },
1236 { TV_POLEARM, SV_LANCE },
1238 { TV_POLEARM, SV_BATTLE_AXE },
1239 { TV_POLEARM, SV_HATCHET },
1240 { TV_BOW, SV_SLING },
1241 { TV_BOW, SV_SHORT_BOW },
1243 { TV_BOW, SV_LIGHT_XBOW },
1244 { TV_SHOT, SV_AMMO_NORMAL },
1245 { TV_SHOT, SV_AMMO_NORMAL },
1246 { TV_ARROW, SV_AMMO_NORMAL },
1248 { TV_ARROW, SV_AMMO_NORMAL },
1249 { TV_BOLT, SV_AMMO_NORMAL },
1250 { TV_BOLT, SV_AMMO_NORMAL },
1251 { TV_BOW, SV_LIGHT_XBOW },
1253 { TV_ARROW, SV_AMMO_NORMAL },
1254 { TV_BOLT, SV_AMMO_NORMAL },
1255 { TV_BOW, SV_SHORT_BOW },
1256 { TV_BOW, SV_LIGHT_XBOW },
1258 { TV_SWORD, SV_DAGGER },
1259 { TV_SWORD, SV_TANTO },
1260 { TV_SWORD, SV_RAPIER },
1261 { TV_SWORD, SV_SMALL_SWORD },
1263 { TV_SWORD, SV_SHORT_SWORD },
1264 { TV_SWORD, SV_LONG_SWORD },
1265 { TV_SWORD, SV_SCIMITAR },
1266 { TV_SWORD, SV_BROAD_SWORD },
1268 { TV_HISSATSU_BOOK, 0 },
1269 { TV_HISSATSU_BOOK, 0 },
1270 { TV_HISSATSU_BOOK, 1 },
1271 { TV_HISSATSU_BOOK, 1 },
1277 { TV_HAFTED, SV_NUNCHAKU },
1278 { TV_HAFTED, SV_QUARTERSTAFF },
1279 { TV_HAFTED, SV_MACE },
1280 { TV_HAFTED, SV_BO_STAFF },
1282 { TV_HAFTED, SV_WAR_HAMMER },
1283 { TV_HAFTED, SV_WAR_HAMMER },
1284 { TV_HAFTED, SV_MORNING_STAR },
1285 { TV_HAFTED, SV_FLAIL },
1287 { TV_HAFTED, SV_LEAD_FILLED_MACE },
1288 { TV_SCROLL, SV_SCROLL_REMOVE_CURSE },
1289 { TV_SCROLL, SV_SCROLL_BLESSING },
1290 { TV_SCROLL, SV_SCROLL_HOLY_CHANT },
1292 { TV_POTION, SV_POTION_HEROISM },
1293 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1294 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1295 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1297 { TV_POTION, SV_POTION_CURE_LIGHT },
1298 { TV_POTION, SV_POTION_CURE_SERIOUS },
1299 { TV_POTION, SV_POTION_CURE_SERIOUS },
1300 { TV_POTION, SV_POTION_CURE_CRITICAL },
1302 { TV_POTION, SV_POTION_CURE_CRITICAL },
1303 { TV_POTION, SV_POTION_RESTORE_EXP },
1304 { TV_POTION, SV_POTION_RESTORE_EXP },
1305 { TV_POTION, SV_POTION_RESTORE_EXP },
1307 { TV_LIFE_BOOK, 0 },
1308 { TV_LIFE_BOOK, 0 },
1309 { TV_LIFE_BOOK, 1 },
1310 { TV_LIFE_BOOK, 1 },
1312 { TV_CRUSADE_BOOK, 0 },
1313 { TV_CRUSADE_BOOK, 0 },
1314 { TV_CRUSADE_BOOK, 1 },
1315 { TV_CRUSADE_BOOK, 1 },
1317 { TV_HAFTED, SV_WHIP },
1318 { TV_HAFTED, SV_MACE },
1319 { TV_HAFTED, SV_BALL_AND_CHAIN },
1320 { TV_HAFTED, SV_WAR_HAMMER },
1322 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1323 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1324 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1325 { TV_POTION, SV_POTION_CURE_CRITICAL },
1327 { TV_POTION, SV_POTION_CURE_CRITICAL },
1328 { TV_POTION, SV_POTION_RESTORE_EXP },
1331 { TV_STATUE, SV_ANY },
1333 { TV_SCROLL, SV_SCROLL_REMOVE_CURSE },
1334 { TV_SCROLL, SV_SCROLL_REMOVE_CURSE },
1335 { TV_SCROLL, SV_SCROLL_STAR_REMOVE_CURSE },
1336 { TV_SCROLL, SV_SCROLL_STAR_REMOVE_CURSE }
1342 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_HIT },
1343 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_DAM },
1344 { TV_SCROLL, SV_SCROLL_ENCHANT_ARMOR },
1345 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1347 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1348 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1349 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1350 { TV_SCROLL, SV_SCROLL_LIGHT },
1352 { TV_SCROLL, SV_SCROLL_PHASE_DOOR },
1353 { TV_SCROLL, SV_SCROLL_PHASE_DOOR },
1354 { TV_SCROLL, SV_SCROLL_TELEPORT },
1355 { TV_SCROLL, SV_SCROLL_MONSTER_CONFUSION },
1357 { TV_SCROLL, SV_SCROLL_MAPPING },
1358 { TV_SCROLL, SV_SCROLL_DETECT_GOLD },
1359 { TV_SCROLL, SV_SCROLL_DETECT_ITEM },
1360 { TV_SCROLL, SV_SCROLL_DETECT_TRAP },
1362 { TV_SCROLL, SV_SCROLL_DETECT_INVIS },
1363 { TV_SCROLL, SV_SCROLL_RECHARGING },
1364 { TV_SCROLL, SV_SCROLL_TELEPORT },
1365 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1367 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1368 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1369 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1370 { TV_SCROLL, SV_SCROLL_TELEPORT },
1372 { TV_SCROLL, SV_SCROLL_TELEPORT },
1373 { TV_POTION, SV_POTION_RES_STR },
1374 { TV_POTION, SV_POTION_RES_INT },
1375 { TV_POTION, SV_POTION_RES_WIS },
1377 { TV_POTION, SV_POTION_RES_DEX },
1378 { TV_POTION, SV_POTION_RES_CON },
1379 { TV_POTION, SV_POTION_RES_CHR },
1380 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1382 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1383 { TV_SCROLL, SV_SCROLL_STAR_IDENTIFY }, /* Yep, occasionally! */
1384 { TV_SCROLL, SV_SCROLL_STAR_IDENTIFY },
1385 { TV_SCROLL, SV_SCROLL_LIGHT },
1387 { TV_POTION, SV_POTION_RES_STR },
1388 { TV_POTION, SV_POTION_RES_INT },
1389 { TV_POTION, SV_POTION_RES_WIS },
1390 { TV_POTION, SV_POTION_RES_DEX },
1392 { TV_POTION, SV_POTION_RES_CON },
1393 { TV_POTION, SV_POTION_RES_CHR },
1394 { TV_SCROLL, SV_SCROLL_ENCHANT_ARMOR },
1395 { TV_SCROLL, SV_SCROLL_ENCHANT_ARMOR },
1397 { TV_SCROLL, SV_SCROLL_RECHARGING },
1398 { TV_SCROLL, SV_SCROLL_PHASE_DOOR },
1399 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_HIT },
1400 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_DAM },
1405 /* Magic-User store */
1407 { TV_RING, SV_RING_PROTECTION },
1408 { TV_RING, SV_RING_LEVITATION_FALL },
1409 { TV_RING, SV_RING_PROTECTION },
1410 { TV_RING, SV_RING_RESIST_FIRE },
1412 { TV_RING, SV_RING_RESIST_COLD },
1413 { TV_AMULET, SV_AMULET_CHARISMA },
1414 { TV_RING, SV_RING_WARNING },
1415 { TV_AMULET, SV_AMULET_RESIST_ACID },
1417 { TV_AMULET, SV_AMULET_SEARCHING },
1418 { TV_WAND, SV_WAND_SLOW_MONSTER },
1419 { TV_WAND, SV_WAND_CONFUSE_MONSTER },
1420 { TV_WAND, SV_WAND_SLEEP_MONSTER },
1422 { TV_WAND, SV_WAND_MAGIC_MISSILE },
1423 { TV_WAND, SV_WAND_STINKING_CLOUD },
1424 { TV_WAND, SV_WAND_WONDER },
1425 { TV_WAND, SV_WAND_DISARMING },
1427 { TV_STAFF, SV_STAFF_LITE },
1428 { TV_STAFF, SV_STAFF_MAPPING },
1429 { TV_STAFF, SV_STAFF_DETECT_TRAP },
1430 { TV_STAFF, SV_STAFF_DETECT_DOOR },
1432 { TV_STAFF, SV_STAFF_DETECT_GOLD },
1433 { TV_STAFF, SV_STAFF_DETECT_ITEM },
1434 { TV_STAFF, SV_STAFF_DETECT_INVIS },
1435 { TV_STAFF, SV_STAFF_DETECT_EVIL },
1437 { TV_STAFF, SV_STAFF_TELEPORTATION },
1438 { TV_STAFF, SV_STAFF_TELEPORTATION },
1439 { TV_STAFF, SV_STAFF_TELEPORTATION },
1440 { TV_STAFF, SV_STAFF_TELEPORTATION },
1442 { TV_STAFF, SV_STAFF_IDENTIFY },
1443 { TV_STAFF, SV_STAFF_IDENTIFY },
1444 { TV_STAFF, SV_STAFF_IDENTIFY },
1446 { TV_STAFF, SV_STAFF_IDENTIFY },
1447 { TV_STAFF, SV_STAFF_REMOVE_CURSE },
1448 { TV_STAFF, SV_STAFF_CURE_LIGHT },
1449 { TV_STAFF, SV_STAFF_PROBING },
1453 { TV_SORCERY_BOOK, 0 },
1454 { TV_SORCERY_BOOK, 0 },
1455 { TV_SORCERY_BOOK, 1 },
1456 { TV_SORCERY_BOOK, 1 },
1458 { TV_ARCANE_BOOK, 0 },
1459 { TV_ARCANE_BOOK, 0 },
1460 { TV_ARCANE_BOOK, 1 },
1461 { TV_ARCANE_BOOK, 1 },
1463 { TV_ARCANE_BOOK, 2 },
1464 { TV_ARCANE_BOOK, 2 },
1465 { TV_ARCANE_BOOK, 3 },
1466 { TV_ARCANE_BOOK, 3 },
1471 /* Black Market (unused) */
1544 { TV_SORCERY_BOOK, 0 },
1545 { TV_SORCERY_BOOK, 0 },
1546 { TV_SORCERY_BOOK, 1 },
1547 { TV_SORCERY_BOOK, 1 },
1549 { TV_NATURE_BOOK, 0 },
1550 { TV_NATURE_BOOK, 0 },
1551 { TV_NATURE_BOOK, 1 },
1552 { TV_NATURE_BOOK, 1 },
1554 { TV_CHAOS_BOOK, 0 },
1555 { TV_CHAOS_BOOK, 0 },
1556 { TV_CHAOS_BOOK, 1 },
1557 { TV_CHAOS_BOOK, 1 },
1559 { TV_DEATH_BOOK, 0 },
1560 { TV_DEATH_BOOK, 0 },
1561 { TV_DEATH_BOOK, 1 },
1562 { TV_DEATH_BOOK, 1 },
1564 { TV_TRUMP_BOOK, 0 }, /* +16 */
1565 { TV_TRUMP_BOOK, 0 },
1566 { TV_TRUMP_BOOK, 1 },
1567 { TV_TRUMP_BOOK, 1 },
1569 { TV_ARCANE_BOOK, 0 },
1570 { TV_ARCANE_BOOK, 1 },
1571 { TV_ARCANE_BOOK, 2 },
1572 { TV_ARCANE_BOOK, 3 },
1574 { TV_CRAFT_BOOK, 0 },
1575 { TV_CRAFT_BOOK, 0 },
1576 { TV_CRAFT_BOOK, 1 },
1577 { TV_CRAFT_BOOK, 1 },
1579 { TV_DAEMON_BOOK, 0 },
1580 { TV_DAEMON_BOOK, 0 },
1581 { TV_DAEMON_BOOK, 1 },
1582 { TV_DAEMON_BOOK, 1 },
1584 { TV_MUSIC_BOOK, 0 },
1585 { TV_MUSIC_BOOK, 0 },
1586 { TV_MUSIC_BOOK, 1 },
1587 { TV_MUSIC_BOOK, 1 },
1596 /* Museum (unused) */
1635 * @brief 取引成功時の店主のメッセージ処理 /
1636 * Successful haggle.
1639 static void say_comment_1(void)
1642 /* ブラックマーケットのときは別のメッセージを出す */
1643 if ( cur_store_num == STORE_BLACK ) {
1644 msg_print(comment_1_B[randint0(MAX_COMMENT_1)]);
1647 msg_print(comment_1[randint0(MAX_COMMENT_1)]);
1650 msg_print(comment_1[randint0(MAX_COMMENT_1)]);
1654 if (one_in_(RUMOR_CHANCE))
1657 msg_print("店主は耳うちした:");
1659 msg_print("The shopkeeper whispers something into your ear:");
1661 display_rumor(TRUE);
1667 * @brief プレイヤーがアイテムを買う時の価格代案メッセージ処理 /
1668 * Continue haggling (player is buying)
1669 * @param value 店主の提示価格
1670 * @param annoyed 店主のいらつき度
1673 static void say_comment_2(PRICE value, int annoyed)
1677 /* Prepare a string to insert */
1678 sprintf(tmp_val, "%ld", (long)value);
1683 /* Formatted message */
1684 msg_format(comment_2a[randint0(MAX_COMMENT_2A)], tmp_val);
1690 /* Formatted message */
1692 /* ブラックマーケットの時は別のメッセージを出す */
1693 if ( cur_store_num == STORE_BLACK ){
1694 msg_format(comment_2b_B[randint0(MAX_COMMENT_2B)], tmp_val);
1697 msg_format(comment_2b[randint0(MAX_COMMENT_2B)], tmp_val);
1700 msg_format(comment_2b[randint0(MAX_COMMENT_2B)], tmp_val);
1708 * @brief プレイヤーがアイテムを売る時の価格代案メッセージ処理 /
1709 * Continue haggling (player is selling)
1710 * @param value 店主の提示価格
1711 * @param annoyed 店主のいらつき度
1714 static void say_comment_3(PRICE value, int annoyed)
1718 /* Prepare a string to insert */
1719 sprintf(tmp_val, "%ld", (long)value);
1724 /* Formatted message */
1725 msg_format(comment_3a[randint0(MAX_COMMENT_3A)], tmp_val);
1731 /* Formatted message */
1733 /* ブラックマーケットの時は別のメッセージを出す */
1734 if ( cur_store_num == STORE_BLACK ){
1735 msg_format(comment_3b_B[randint0(MAX_COMMENT_3B)], tmp_val);
1738 msg_format(comment_3b[randint0(MAX_COMMENT_3B)], tmp_val);
1741 msg_format(comment_3b[randint0(MAX_COMMENT_3B)], tmp_val);
1749 * @brief 店主がプレイヤーを追い出す時のメッセージ処理 /
1750 * Kick 'da bum out. -RAK-
1753 static void say_comment_4(void)
1756 /* ブラックマーケットの時は別のメッセージを出す */
1757 if ( cur_store_num == STORE_BLACK ){
1758 msg_print(comment_4a_B[randint0(MAX_COMMENT_4A)]);
1759 msg_print(comment_4b_B[randint0(MAX_COMMENT_4B)]);
1762 msg_print(comment_4a[randint0(MAX_COMMENT_4A)]);
1763 msg_print(comment_4b[randint0(MAX_COMMENT_4B)]);
1766 msg_print(comment_4a[randint0(MAX_COMMENT_4A)]);
1767 msg_print(comment_4b[randint0(MAX_COMMENT_4B)]);
1774 * @brief 店主がプレイヤーに取り合わない時のメッセージ処理 /
1775 * You are insulting me
1778 static void say_comment_5(void)
1781 /* ブラックマーケットの時は別のメッセージを出す */
1782 if ( cur_store_num == STORE_BLACK ){
1783 msg_print(comment_5_B[randint0(MAX_COMMENT_5)]);
1786 msg_print(comment_5[randint0(MAX_COMMENT_5)]);
1789 msg_print(comment_5[randint0(MAX_COMMENT_5)]);
1796 * @brief 店主がプレイヤーの提示を理解できなかった時のメッセージ処理 /
1797 * That makes no sense.
1800 static void say_comment_6(void)
1802 msg_print(comment_6[randint0(MAX_COMMENT_6)]);
1806 #define MAX_COMMENT_7A 4
1808 static concptr comment_7a[MAX_COMMENT_7A] =
1813 "誰かがむせび泣く声が聞こえる...。",
1818 "You hear someone sobbing...",
1819 "The shopkeeper howls in agony!"
1824 #define MAX_COMMENT_7B 4
1826 static concptr comment_7b[MAX_COMMENT_7B] =
1836 "The shopkeeper curses at you.",
1837 "The shopkeeper glares at you."
1842 #define MAX_COMMENT_7C 4
1844 static concptr comment_7c[MAX_COMMENT_7C] =
1853 "You've made my day!",
1854 "The shopkeeper giggles.",
1855 "The shopkeeper laughs loudly."
1860 #define MAX_COMMENT_7D 4
1862 static concptr comment_7d[MAX_COMMENT_7D] =
1866 "こんなおいしい思いをしたら、真面目に働けなくなるなぁ。",
1871 "I think I'll retire!",
1872 "The shopkeeper jumps for joy.",
1873 "The shopkeeper smiles gleefully."
1880 * @brief 店主が交渉を終えた際の反応を返す処理 /
1881 * Let a shop-keeper React to a purchase
1882 * @param price アイテムの取引額
1883 * @param value アイテムの実際価値
1884 * @param guess 店主が当初予想していた価値
1887 * We paid "price", it was worth "value", and we thought it was worth "guess"
1889 static void purchase_analyze(PRICE price, PRICE value, PRICE guess)
1891 /* Item was worthless, but we bought it */
1892 if ((value <= 0) && (price > value))
1894 msg_print(comment_7a[randint0(MAX_COMMENT_7A)]);
1895 chg_virtue(p_ptr, V_HONOUR, -1);
1896 chg_virtue(p_ptr, V_JUSTICE, -1);
1897 sound(SOUND_STORE1);
1900 /* Item was cheaper than we thought, and we paid more than necessary */
1901 else if ((value < guess) && (price > value))
1903 msg_print(comment_7b[randint0(MAX_COMMENT_7B)]);
1904 chg_virtue(p_ptr, V_JUSTICE, -1);
1905 if (one_in_(4)) chg_virtue(p_ptr, V_HONOUR, -1);
1906 sound(SOUND_STORE2);
1909 /* Item was a good bargain, and we got away with it */
1910 else if ((value > guess) && (value < (4 * guess)) && (price < value))
1912 msg_print(comment_7c[randint0(MAX_COMMENT_7C)]);
1913 if (one_in_(4)) chg_virtue(p_ptr, V_HONOUR, -1);
1914 else if (one_in_(4)) chg_virtue(p_ptr, V_HONOUR, 1);
1915 sound(SOUND_STORE3);
1918 /* Item was a great bargain, and we got away with it */
1919 else if ((value > guess) && (price < value))
1921 msg_print(comment_7d[randint0(MAX_COMMENT_7D)]);
1922 if (one_in_(2)) chg_virtue(p_ptr, V_HONOUR, -1);
1923 if (one_in_(4)) chg_virtue(p_ptr, V_HONOUR, 1);
1924 if (10 * price < value) chg_virtue(p_ptr, V_SACRIFICE, 1);
1925 sound(SOUND_STORE4);
1932 * We store the current "store feat" here so everyone can access it
1934 static int cur_store_feat;
1938 * Buying and selling adjustments for race combinations.
1939 * Entry[owner][player] gives the basic "cost inflation".
1941 static byte rgold_adj[MAX_RACES][MAX_RACES] =
1943 /*Hum, HfE, Elf, Hal, Gno, Dwa, HfO, HfT, Dun, HiE, Barbarian,
1944 HfOg, HGn, HTn, Cyc, Yek, Klc, Kbd, Nbl, DkE, Drc, Mind Flayer,
1945 Imp, Glm, Skl, Zombie, Vampire, Spectre, Fairy, Beastman, Ent,
1946 Angel, Demon, Kutar, Android, Merfolk */
1949 { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
1950 124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
1951 115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
1952 100, 120, 110, 105, 110 },
1955 { 110, 100, 100, 105, 110, 120, 125, 130, 110, 100, 110,
1956 120, 115, 108, 115, 110, 110, 120, 120, 115, 115, 110,
1957 120, 110, 110, 110, 120, 110, 100, 125, 100, 95, 140,
1958 110, 115, 110, 110, 110 },
1961 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
1962 120, 120, 105, 120, 110, 105, 125, 125, 110, 115, 108,
1963 120, 115, 110, 110, 120, 110, 100, 125, 100, 95, 140,
1964 110, 110, 105, 110, 110 },
1967 { 115, 110, 105, 95, 105, 110, 115, 130, 115, 105, 115,
1968 125, 120, 120, 125, 115, 110, 120, 120, 120, 115, 115,
1969 120, 110, 120, 120, 130, 110, 110, 130, 110, 95, 140,
1970 115, 120, 105, 115, 105 },
1973 { 115, 115, 110, 105, 95, 110, 115, 130, 115, 110, 115,
1974 120, 125, 110, 120, 110, 105, 120, 110, 110, 105, 110,
1975 120, 101, 110, 110, 120, 120, 115, 130, 115, 95, 140,
1976 115, 110, 110, 115, 110 },
1979 { 115, 120, 120, 110, 110, 95, 125, 135, 115, 120, 115,
1980 125, 140, 130, 130, 120, 115, 115, 115, 135, 125, 120,
1981 120, 105, 115, 115, 115, 115, 120, 130, 120, 95, 140,
1982 115, 110, 115, 115, 120 },
1985 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
1986 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
1987 115, 125, 120, 120, 115, 120, 125, 115, 125, 95, 140,
1988 115, 110, 115, 115, 125 },
1991 { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
1992 110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
1993 110, 115, 112, 112, 115, 112, 120, 110, 120, 95, 140,
1994 110, 110, 115, 110, 130 },
1997 { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
1998 120, 120, 105, 120, 115, 105, 115, 120, 110, 105, 105,
1999 120, 105, 120, 120, 125, 120, 105, 135, 105, 95, 140,
2000 100, 110, 110, 100, 110 },
2003 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2004 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2005 125, 115, 120, 120, 125, 120, 100, 125, 100, 95, 140,
2006 110, 110, 105, 110, 110 },
2008 /* Human / Barbarian (copied from human) */
2009 { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
2010 124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
2011 115, 105, 125, 125, 130, 125, 115, 120, 115, 95, 140,
2012 100, 120, 110, 100, 110 },
2014 /* Half-Ogre: theoretical, copied from half-troll */
2015 { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
2016 110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
2017 110, 115, 112, 112, 115, 112, 120, 110, 120, 95, 140,
2018 110, 110, 115, 110, 120 },
2020 /* Half-Giant: theoretical, copied from half-troll */
2021 { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
2022 110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
2023 110, 115, 112, 112, 115, 112, 130, 120, 130, 95, 140,
2024 110, 110, 115, 110, 115 },
2026 /* Half-Titan: theoretical, copied from High_Elf */
2027 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2028 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2029 125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2030 110, 110, 115, 110, 108 },
2032 /* Cyclops: theoretical, copied from half-troll */
2033 { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
2034 110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
2035 110, 115, 112, 112, 115, 112, 130, 130, 130, 95, 140,
2036 110, 110, 115, 110, 115 },
2038 /* Yeek: theoretical, copied from Half-Orc */
2039 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2040 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2041 115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2042 115, 110, 115, 115, 110 },
2044 /* Klackon: theoretical, copied from Gnome */
2045 { 115, 115, 110, 105, 95, 110, 115, 130, 115, 110, 115,
2046 120, 125, 110, 120, 110, 105, 120, 110, 110, 105, 110,
2047 120, 101, 110, 110, 120, 120, 130, 130, 130, 95, 140,
2048 115, 110, 115, 115, 110 },
2050 /* Kobold: theoretical, copied from Half-Orc */
2051 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2052 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2053 115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2054 115, 110, 115, 115, 120 },
2056 /* Nibelung: theoretical, copied from Dwarf */
2057 { 115, 120, 120, 110, 110, 95, 125, 135, 115, 120, 115,
2058 125, 140, 130, 130, 120, 115, 115, 115, 135, 125, 120,
2059 120, 105, 115, 115, 120, 120, 130, 130, 130, 95, 140,
2060 115, 135, 115, 115, 120 },
2063 { 110, 110, 110, 115, 120, 130, 115, 115, 120, 110, 115,
2064 115, 115, 116, 115, 120, 120, 115, 115, 101, 110, 110,
2065 110, 110, 112, 122, 110, 110, 110, 115, 110, 120, 120,
2066 110, 101, 115, 110, 115 },
2068 /* Draconian: theoretical, copied from High_Elf */
2069 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2070 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2071 125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2072 110, 110, 115, 110, 115 },
2074 /* Mind Flayer: theoretical, copied from High_Elf */
2075 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2076 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2077 125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2078 110, 110, 115, 110, 110 },
2080 /* Imp: theoretical, copied from High_Elf */
2081 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2082 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2083 125, 115, 120, 120, 120, 120, 130, 130, 130, 120, 120,
2084 110, 110, 115, 110, 120 },
2086 /* Golem: theoretical, copied from High_Elf */
2087 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2088 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2089 125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2090 110, 110, 115, 110, 110 },
2092 /* Skeleton: theoretical, copied from half-orc */
2093 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2094 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2095 115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
2096 115, 110, 125, 115, 110 },
2098 /* Zombie: Theoretical, copied from half-orc */
2099 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2100 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2101 115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
2102 115, 110, 125, 115, 110 },
2104 /* Vampire: Theoretical, copied from half-orc */
2105 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2106 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2107 115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
2108 115, 110, 125, 115, 120 },
2110 /* Spectre: Theoretical, copied from half-orc */
2111 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2112 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2113 115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
2114 115, 110, 125, 115, 110 },
2116 /* Sprite: Theoretical, copied from half-orc */
2117 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2118 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2119 115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2120 115, 110, 105, 115, 110 },
2122 /* Beastman: Theoretical, copied from half-orc */
2123 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2124 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2125 115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2126 115, 110, 115, 115, 125 },
2129 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2130 120, 120, 105, 120, 110, 105, 125, 125, 110, 115, 108,
2131 120, 115, 110, 110, 120, 110, 100, 125, 100, 95, 140,
2132 110, 110, 105, 110, 110 },
2135 { 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
2136 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
2137 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 160,
2138 95, 95, 95, 95, 95 },
2141 { 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
2142 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
2143 140, 140, 140, 140, 140, 140, 140, 140, 140, 160, 120,
2144 140, 140, 140, 140, 140 },
2147 { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
2148 124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
2149 115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
2150 100, 120, 110, 100, 110 },
2153 { 110, 110, 110, 115, 120, 130, 115, 115, 120, 110, 115,
2154 115, 115, 116, 115, 120, 120, 115, 115, 101, 110, 110,
2155 110, 110, 112, 122, 110, 110, 110, 115, 110, 120, 120,
2156 110, 101, 115, 110, 115 },
2159 { 110, 110, 105, 105, 110, 115, 115, 115, 110, 105, 110,
2160 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
2161 115, 115, 125, 125, 125, 125, 105, 115, 105, 95, 140,
2162 110, 115, 100, 110, 110 },
2165 { 105, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
2166 124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
2167 115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
2168 100, 120, 110, 100, 110 },
2171 { 110, 110, 110, 105, 110, 120, 125, 130, 110, 110, 110,
2172 120, 115, 108, 115, 110, 110, 120, 120, 115, 115, 110,
2173 120, 110, 110, 110, 120, 110, 110, 125, 110, 95, 140,
2174 110, 115, 110, 110, 100 },
2180 * @brief 店舗価格を決定する /
2181 * Determine the price of an item (qty one) in a store.
2182 * @param o_ptr 店舗に並べるオブジェクト構造体の参照ポインタ
2183 * @param greed 店主の強欲度
2184 * @param flip TRUEならば店主にとっての買取価格、FALSEなら売出価格を計算
2188 * This function takes into account the player's charisma, and the
2189 * shop-keepers friendliness, and the shop-keeper's base greed, but
2190 * never lets a shop-keeper lose money in a transaction.
2191 * The "greed" value should exceed 100 when the player is "buying" the
2192 * item, and should be less than 100 when the player is "selling" it.
2193 * Hack -- the black market always charges twice as much as it should.
2194 * Charisma adjustment runs from 80 to 130
2195 * Racial adjustment runs from 95 to 130
2196 * Since greed/charisma/racial adjustments are centered at 100, we need
2197 * to adjust (by 200) to extract a usable multiplier. Note that the
2198 * "greed" value is always something (?).
2201 static PRICE price_item(object_type *o_ptr, int greed, bool flip)
2207 /* Get the value of one of the items */
2208 price = object_value(o_ptr);
2210 /* Worthless items */
2211 if (price <= 0) return (0L);
2213 /* Compute the racial factor */
2214 factor = rgold_adj[ot_ptr->owner_race][p_ptr->prace];
2216 /* Add in the charisma factor */
2217 factor += adj_chr_gold[p_ptr->stat_ind[A_CHR]];
2220 /* Shop is buying */
2223 /* Adjust for greed */
2224 adjust = 100 + (300 - (greed + factor));
2226 /* Never get "silly" */
2227 if (adjust > 100) adjust = 100;
2229 /* Mega-Hack -- Black market sucks */
2230 if (cur_store_num == STORE_BLACK)
2233 /* Compute the final price (with rounding) */
2234 /* Hack -- prevent underflow */
2235 price = (price * adjust + 50L) / 100L;
2238 /* Shop is selling */
2241 /* Adjust for greed */
2242 adjust = 100 + ((greed + factor) - 300);
2244 /* Never get "silly" */
2245 if (adjust < 100) adjust = 100;
2247 /* Mega-Hack -- Black market sucks */
2248 if (cur_store_num == STORE_BLACK)
2251 /* Compute the final price (with rounding) */
2252 /* Hack -- prevent overflow */
2253 price = (s32b)(((u32b)price * (u32b)adjust + 50UL) / 100UL);
2256 /* Note -- Never become "free" */
2257 if (price <= 0L) return (1L);
2259 /* Return the price */
2265 * @brief 安価な消耗品の販売数を増やし、低確率で割引にする /
2266 * Certain "cheap" objects should be created in "piles"
2267 * @param o_ptr 店舗に並べるオブジェクト構造体の参照ポインタ
2271 * Some objects can be sold at a "discount" (in small piles)
2274 static void mass_produce(object_type *o_ptr)
2277 DISCOUNT_RATE discount = 0;
2279 PRICE cost = object_value(o_ptr);
2282 /* Analyze the type */
2283 switch (o_ptr->tval)
2285 /* Food, Flasks, and Lites */
2290 if (cost <= 5L) size += damroll(3, 5);
2291 if (cost <= 20L) size += damroll(3, 5);
2292 if (cost <= 50L) size += damroll(2, 2);
2299 if (cost <= 60L) size += damroll(3, 5);
2300 if (cost <= 240L) size += damroll(1, 5);
2301 if (o_ptr->sval == SV_SCROLL_STAR_IDENTIFY) size += damroll(3, 5);
2302 if (o_ptr->sval == SV_SCROLL_STAR_REMOVE_CURSE) size += damroll(1, 4);
2307 case TV_SORCERY_BOOK:
2308 case TV_NATURE_BOOK:
2312 case TV_ARCANE_BOOK:
2314 case TV_DAEMON_BOOK:
2315 case TV_CRUSADE_BOOK:
2317 case TV_HISSATSU_BOOK:
2320 if (cost <= 50L) size += damroll(2, 3);
2321 if (cost <= 500L) size += damroll(1, 3);
2339 if (object_is_artifact(o_ptr)) break;
2340 if (object_is_ego(o_ptr)) break;
2341 if (cost <= 10L) size += damroll(3, 5);
2342 if (cost <= 100L) size += damroll(3, 5);
2351 if (cost <= 5L) size += damroll(5, 5);
2352 if (cost <= 50L) size += damroll(5, 5);
2353 if (cost <= 500L) size += damroll(5, 5);
2359 if (cost <= 100L) size += damroll(2, 2);
2360 if (cost <= 1000L) size += damroll(2, 2);
2373 * Because many rods (and a few wands and staffs) are useful mainly
2374 * in quantity, the Black Market will occasionally have a bunch of
2381 if ((cur_store_num == STORE_BLACK) && one_in_(3))
2383 if (cost < 1601L) size += damroll(1, 5);
2384 else if (cost < 3201L) size += damroll(1, 3);
2391 /* Pick a discount */
2396 else if (one_in_(25))
2400 else if (one_in_(150))
2404 else if (one_in_(300))
2408 else if (one_in_(500))
2413 if (o_ptr->art_name)
2418 /* Save the discount */
2419 o_ptr->discount = discount;
2421 /* Save the total pile size */
2422 o_ptr->number = size - (size * discount / 100);
2424 /* Ensure that mass-produced rods and wands get the correct pvals. */
2425 if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
2427 o_ptr->pval *= (PARAMETER_VALUE)o_ptr->number;
2434 * @brief 店舗に並べた品を同一品であるかどうか判定する /
2435 * Determine if a store item can "absorb" another item
2436 * @param o_ptr 判定するオブジェクト構造体の参照ポインタ1
2437 * @param j_ptr 判定するオブジェクト構造体の参照ポインタ2
2438 * @return 同一扱いできるならTRUEを返す
2441 * See "object_similar()" for the same function for the "player"
2444 static bool store_object_similar(object_type *o_ptr, object_type *j_ptr)
2448 /* Hack -- Identical items cannot be stacked */
2449 if (o_ptr == j_ptr) return (0);
2451 /* Different objects cannot be stacked */
2452 if (o_ptr->k_idx != j_ptr->k_idx) return (0);
2454 /* Different charges (etc) cannot be stacked, unless wands or rods. */
2455 if ((o_ptr->pval != j_ptr->pval) && (o_ptr->tval != TV_WAND) && (o_ptr->tval != TV_ROD)) return (0);
2457 /* Require many identical values */
2458 if (o_ptr->to_h != j_ptr->to_h) return (0);
2459 if (o_ptr->to_d != j_ptr->to_d) return (0);
2460 if (o_ptr->to_a != j_ptr->to_a) return (0);
2462 /* Require identical "ego-item" names */
2463 if (o_ptr->name2 != j_ptr->name2) return (0);
2465 /* Artifacts don't stack! */
2466 if (object_is_artifact(o_ptr) || object_is_artifact(j_ptr)) return (0);
2468 /* Hack -- Identical art_flags! */
2469 for (i = 0; i < TR_FLAG_SIZE; i++)
2470 if (o_ptr->art_flags[i] != j_ptr->art_flags[i]) return (0);
2472 /* Hack -- Never stack "powerful" items */
2473 if (o_ptr->xtra1 || j_ptr->xtra1) return (0);
2475 /* Hack -- Never stack recharging items */
2476 if (o_ptr->timeout || j_ptr->timeout) return (0);
2478 /* Require many identical values */
2479 if (o_ptr->ac != j_ptr->ac) return (0);
2480 if (o_ptr->dd != j_ptr->dd) return (0);
2481 if (o_ptr->ds != j_ptr->ds) return (0);
2483 /* Hack -- Never stack chests */
2484 if (o_ptr->tval == TV_CHEST) return (0);
2485 if (o_ptr->tval == TV_STATUE) return (0);
2486 if (o_ptr->tval == TV_CAPTURE) return (0);
2488 /* Require matching discounts */
2489 if (o_ptr->discount != j_ptr->discount) return (0);
2491 /* They match, so they must be similar */
2497 * @brief 店舗に並べた品を重ね合わせできるかどうか判定する /
2498 * Allow a store item to absorb another item
2499 * @param o_ptr 判定するオブジェクト構造体の参照ポインタ1
2500 * @param j_ptr 判定するオブジェクト構造体の参照ポインタ2
2501 * @return 重ね合わせできるならTRUEを返す
2504 * See "object_similar()" for the same function for the "player"
2507 static void store_object_absorb(object_type *o_ptr, object_type *j_ptr)
2509 int max_num = (o_ptr->tval == TV_ROD) ?
2510 MIN(99, MAX_SHORT / k_info[o_ptr->k_idx].pval) : 99;
2511 int total = o_ptr->number + j_ptr->number;
2512 int diff = (total > max_num) ? total - max_num : 0;
2514 /* Combine quantity, lose excess items */
2515 o_ptr->number = (total > max_num) ? max_num : total;
2517 /* Hack -- if rods are stacking, add the pvals (maximum timeouts) together. -LM- */
2518 if (o_ptr->tval == TV_ROD)
2520 o_ptr->pval += j_ptr->pval * (j_ptr->number - diff) / j_ptr->number;
2523 /* Hack -- if wands are stacking, combine the charges. -LM- */
2524 if (o_ptr->tval == TV_WAND)
2526 o_ptr->pval += j_ptr->pval * (j_ptr->number - diff) / j_ptr->number;
2532 * @brief 店舗に品を置くスペースがあるかどうかの判定を返す /
2533 * Check to see if the shop will be carrying too many objects -RAK-
2534 * @param o_ptr 店舗に置きたいオブジェクト構造体の参照ポインタ
2535 * @return 置き場がないなら0、重ね合わせできるアイテムがあるなら-1、スペースがあるなら1を返す。
2538 * Note that the shop, just like a player, will not accept things
2539 * it cannot hold. Before, one could "nuke" potions this way.
2540 * Return value is now int:
2542 * -1 : Can be combined to existing slot.
2543 * 1 : Cannot be combined but there are empty spaces.
2546 static int store_check_num(object_type *o_ptr)
2551 /* The "home" acts like the player */
2552 if ((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM))
2554 bool old_stack_force_notes = stack_force_notes;
2555 bool old_stack_force_costs = stack_force_costs;
2557 if (cur_store_num != STORE_HOME)
2559 stack_force_notes = FALSE;
2560 stack_force_costs = FALSE;
2563 /* Check all the items */
2564 for (i = 0; i < st_ptr->stock_num; i++)
2566 /* Get the existing item */
2567 j_ptr = &st_ptr->stock[i];
2569 /* Can the new object be combined with the old one? */
2570 if (object_similar(j_ptr, o_ptr))
2572 if (cur_store_num != STORE_HOME)
2574 stack_force_notes = old_stack_force_notes;
2575 stack_force_costs = old_stack_force_costs;
2582 if (cur_store_num != STORE_HOME)
2584 stack_force_notes = old_stack_force_notes;
2585 stack_force_costs = old_stack_force_costs;
2589 /* Normal stores do special stuff */
2592 /* Check all the items */
2593 for (i = 0; i < st_ptr->stock_num; i++)
2595 /* Get the existing item */
2596 j_ptr = &st_ptr->stock[i];
2598 /* Can the new object be combined with the old one? */
2599 if (store_object_similar(j_ptr, o_ptr)) return -1;
2603 /* Free space is always usable */
2605 * オプション powerup_home が設定されていると
2608 if ((cur_store_num == STORE_HOME) && ( powerup_home == FALSE )) {
2609 if (st_ptr->stock_num < ((st_ptr->stock_size) / 10)) {
2614 if (st_ptr->stock_num < st_ptr->stock_size) {
2619 /* But there was no room at the inn... */
2624 * @brief オブジェクトが祝福されているかの判定を返す /
2625 * @param o_ptr 判定したいオブジェクト構造体の参照ポインタ
2626 * @return アイテムが祝福されたアイテムならばTRUEを返す
2628 static bool is_blessed(object_type *o_ptr)
2630 BIT_FLAGS flgs[TR_FLAG_SIZE];
2631 object_flags(o_ptr, flgs);
2632 if (have_flag(flgs, TR_BLESSED)) return (TRUE);
2633 else return (FALSE);
2639 * @brief オブジェクトが所定の店舗で引き取れるかどうかを返す /
2640 * Determine if the current store will purchase the given item
2641 * @param o_ptr 判定したいオブジェクト構造体の参照ポインタ
2642 * @return アイテムが買い取れるならばTRUEを返す
2644 * Note that a shop-keeper must refuse to buy "worthless" items
2646 static bool store_will_buy(object_type *o_ptr)
2648 /* Hack -- The Home is simple */
2649 if ((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM)) return (TRUE);
2651 /* Switch on the store */
2652 switch (cur_store_num)
2657 /* Analyze the type */
2658 switch (o_ptr->tval)
2661 if (o_ptr->sval != SV_POTION_WATER) return FALSE;
2673 case TV_BOTTLE: /* 'Green', recycling Angband */
2688 /* Analyze the type */
2689 switch (o_ptr->tval)
2710 /* Analyze the type */
2711 switch (o_ptr->tval)
2720 case TV_HISSATSU_BOOK:
2724 if(o_ptr->sval == SV_WIZSTAFF) return (FALSE);
2736 /* Analyze the type */
2737 switch (o_ptr->tval)
2740 case TV_CRUSADE_BOOK:
2750 monster_race *r_ptr = &r_info[o_ptr->pval];
2753 if (!(r_ptr->flags3 & RF3_EVIL))
2756 if (r_ptr->flags3 & RF3_GOOD) break;
2758 /* Accept animals */
2759 if (r_ptr->flags3 & RF3_ANIMAL) break;
2762 if (my_strchr("?!", r_ptr->d_char)) break;
2768 if (is_blessed(o_ptr)) break;
2777 case STORE_ALCHEMIST:
2779 /* Analyze the type */
2780 switch (o_ptr->tval)
2794 /* Analyze the type */
2795 switch (o_ptr->tval)
2797 case TV_SORCERY_BOOK:
2798 case TV_NATURE_BOOK:
2802 case TV_ARCANE_BOOK:
2804 case TV_DAEMON_BOOK:
2818 if(o_ptr->sval == SV_WIZSTAFF) break;
2819 else return (FALSE);
2826 /* Bookstore Shop */
2829 /* Analyze the type */
2830 switch (o_ptr->tval)
2832 case TV_SORCERY_BOOK:
2833 case TV_NATURE_BOOK:
2838 case TV_ARCANE_BOOK:
2840 case TV_DAEMON_BOOK:
2841 case TV_CRUSADE_BOOK:
2852 /* Ignore "worthless" items */
2853 if (object_value(o_ptr) <= 0) return (FALSE);
2861 * @brief 現在の町の指定された店舗のアイテムを整理する /
2862 * Combine and reorder items in store.
2863 * @param store_num 店舗ID
2864 * @return 実際に整理が行われたならばTRUEを返す。
2866 bool combine_and_reorder_home(int store_num)
2870 object_type forge, *o_ptr, *j_ptr;
2871 bool flag = FALSE, combined;
2872 store_type *old_st_ptr = st_ptr;
2873 bool old_stack_force_notes = stack_force_notes;
2874 bool old_stack_force_costs = stack_force_costs;
2876 st_ptr = &town_info[1].store[store_num];
2877 if (store_num != STORE_HOME)
2879 stack_force_notes = FALSE;
2880 stack_force_costs = FALSE;
2887 /* Combine the items in the home (backwards) */
2888 for (i = st_ptr->stock_num - 1; i > 0; i--)
2890 o_ptr = &st_ptr->stock[i];
2892 /* Skip empty items */
2893 if (!o_ptr->k_idx) continue;
2895 /* Scan the items above that item */
2896 for (j = 0; j < i; j++)
2900 j_ptr = &st_ptr->stock[j];
2902 /* Skip empty items */
2903 if (!j_ptr->k_idx) continue;
2906 * Get maximum number of the stack if these
2907 * are similar, get zero otherwise.
2909 max_num = object_similar_part(j_ptr, o_ptr);
2911 /* Can we (partialy) drop "o_ptr" onto "j_ptr"? */
2912 if (max_num && j_ptr->number < max_num)
2914 if (o_ptr->number + j_ptr->number <= max_num)
2916 /* Add together the item counts */
2917 object_absorb(j_ptr, o_ptr);
2919 /* One object is gone */
2920 st_ptr->stock_num--;
2922 /* Slide everything down */
2923 for (k = i; k < st_ptr->stock_num; k++)
2925 /* Structure copy */
2926 st_ptr->stock[k] = st_ptr->stock[k + 1];
2929 /* Erase the "final" slot */
2930 object_wipe(&st_ptr->stock[k]);
2934 ITEM_NUMBER old_num = o_ptr->number;
2935 ITEM_NUMBER remain = j_ptr->number + o_ptr->number - max_num;
2937 /* Add together the item counts */
2938 object_absorb(j_ptr, o_ptr);
2940 o_ptr->number = remain;
2942 /* Hack -- if rods are stacking, add the pvals (maximum timeouts) and current timeouts together. -LM- */
2943 if (o_ptr->tval == TV_ROD)
2945 o_ptr->pval = o_ptr->pval * remain / old_num;
2946 o_ptr->timeout = o_ptr->timeout * remain / old_num;
2949 /* Hack -- if wands are stacking, combine the charges. -LM- */
2950 else if (o_ptr->tval == TV_WAND)
2952 o_ptr->pval = o_ptr->pval * remain / old_num;
2967 /* Re-order the items in the home (forwards) */
2968 for (i = 0; i < st_ptr->stock_num; i++)
2970 o_ptr = &st_ptr->stock[i];
2972 /* Skip empty slots */
2973 if (!o_ptr->k_idx) continue;
2975 /* Get the "value" of the item */
2976 o_value = object_value(o_ptr);
2978 /* Scan every occupied slot */
2979 for (j = 0; j < st_ptr->stock_num; j++)
2981 if (object_sort_comp(o_ptr, o_value, &st_ptr->stock[j])) break;
2984 /* Never move down */
2985 if (j >= i) continue;
2991 /* Save a copy of the moving item */
2992 object_copy(j_ptr, &st_ptr->stock[i]);
2994 /* Slide the objects */
2995 for (k = i; k > j; k--)
2997 /* Slide the item */
2998 object_copy(&st_ptr->stock[k], &st_ptr->stock[k - 1]);
3001 /* Insert the moving item */
3002 object_copy(&st_ptr->stock[j], j_ptr);
3005 st_ptr = old_st_ptr;
3006 if (store_num != STORE_HOME)
3008 stack_force_notes = old_stack_force_notes;
3009 stack_force_costs = old_stack_force_costs;
3017 * @brief 我が家にオブジェクトを加える /
3018 * Add the item "o_ptr" to the p_ptr->inventory_list of the "Home"
3019 * @param o_ptr 加えたいオブジェクトの構造体参照ポインタ
3023 * In all cases, return the slot (or -1) where the object was placed
3024 * Note that this is a hacked up version of "inven_carry()".
3025 * Also note that it may not correctly "adapt" to "knowledge" bacoming
3026 * known, the player may have to pick stuff up and drop it again.
3029 static int home_carry(object_type *o_ptr)
3035 bool old_stack_force_notes = stack_force_notes;
3036 bool old_stack_force_costs = stack_force_costs;
3038 if (cur_store_num != STORE_HOME)
3040 stack_force_notes = FALSE;
3041 stack_force_costs = FALSE;
3044 /* Check each existing item (try to combine) */
3045 for (slot = 0; slot < st_ptr->stock_num; slot++)
3047 /* Get the existing item */
3048 j_ptr = &st_ptr->stock[slot];
3050 /* The home acts just like the player */
3051 if (object_similar(j_ptr, o_ptr))
3053 /* Save the new number of items */
3054 object_absorb(j_ptr, o_ptr);
3056 if (cur_store_num != STORE_HOME)
3058 stack_force_notes = old_stack_force_notes;
3059 stack_force_costs = old_stack_force_costs;
3067 if (cur_store_num != STORE_HOME)
3069 stack_force_notes = old_stack_force_notes;
3070 stack_force_costs = old_stack_force_costs;
3075 * 隠し機能: オプション powerup_home が設定されていると
3079 if ((cur_store_num != STORE_HOME) || (powerup_home == TRUE)) {
3080 if (st_ptr->stock_num >= st_ptr->stock_size) {
3085 if (st_ptr->stock_num >= ((st_ptr->stock_size) / 10)) {
3091 /* Determine the "value" of the item */
3092 value = object_value(o_ptr);
3094 /* Check existing slots to see if we must "slide" */
3095 for (slot = 0; slot < st_ptr->stock_num; slot++)
3097 if (object_sort_comp(o_ptr, value, &st_ptr->stock[slot])) break;
3100 /* Slide the others up */
3101 for (i = st_ptr->stock_num; i > slot; i--)
3103 st_ptr->stock[i] = st_ptr->stock[i-1];
3106 /* More stuff now */
3107 st_ptr->stock_num++;
3109 /* Insert the new item */
3110 st_ptr->stock[slot] = *o_ptr;
3112 chg_virtue(p_ptr, V_SACRIFICE, -1);
3114 (void)combine_and_reorder_home(cur_store_num);
3116 /* Return the location */
3122 * @brief 店舗にオブジェクトを加える /
3123 * Add the item "o_ptr" to a real stores p_ptr->inventory_list.
3124 * @param o_ptr 加えたいオブジェクトの構造体参照ポインタ
3128 * In all cases, return the slot (or -1) where the object was placed
3129 * Note that this is a hacked up version of "inven_carry()".
3130 * Also note that it may not correctly "adapt" to "knowledge" bacoming
3131 * known, the player may have to pick stuff up and drop it again.
3134 static int store_carry(object_type *o_ptr)
3137 PRICE value, j_value;
3141 /* Evaluate the object */
3142 value = object_value(o_ptr);
3144 /* Cursed/Worthless items "disappear" when sold */
3145 if (value <= 0) return (-1);
3147 /* All store items are fully *identified* */
3148 o_ptr->ident |= IDENT_MENTAL;
3150 /* Erase the inscription */
3151 o_ptr->inscription = 0;
3153 /* Erase the "feeling" */
3154 o_ptr->feeling = FEEL_NONE;
3156 /* Check each existing item (try to combine) */
3157 for (slot = 0; slot < st_ptr->stock_num; slot++)
3159 /* Get the existing item */
3160 j_ptr = &st_ptr->stock[slot];
3162 /* Can the existing items be incremented? */
3163 if (store_object_similar(j_ptr, o_ptr))
3165 /* Hack -- extra items disappear */
3166 store_object_absorb(j_ptr, o_ptr);
3174 if (st_ptr->stock_num >= st_ptr->stock_size) return (-1);
3177 /* Check existing slots to see if we must "slide" */
3178 for (slot = 0; slot < st_ptr->stock_num; slot++)
3181 j_ptr = &st_ptr->stock[slot];
3183 /* Objects sort by decreasing type */
3184 if (o_ptr->tval > j_ptr->tval) break;
3185 if (o_ptr->tval < j_ptr->tval) continue;
3187 /* Objects sort by increasing sval */
3188 if (o_ptr->sval < j_ptr->sval) break;
3189 if (o_ptr->sval > j_ptr->sval) continue;
3192 * Hack: otherwise identical rods sort by
3193 * increasing recharge time --dsb
3195 if (o_ptr->tval == TV_ROD)
3197 if (o_ptr->pval < j_ptr->pval) break;
3198 if (o_ptr->pval > j_ptr->pval) continue;
3201 /* Evaluate that slot */
3202 j_value = object_value(j_ptr);
3204 /* Objects sort by decreasing value */
3205 if (value > j_value) break;
3206 if (value < j_value) continue;
3209 /* Slide the others up */
3210 for (i = st_ptr->stock_num; i > slot; i--)
3212 st_ptr->stock[i] = st_ptr->stock[i-1];
3215 /* More stuff now */
3216 st_ptr->stock_num++;
3218 /* Insert the new item */
3219 st_ptr->stock[slot] = *o_ptr;
3221 /* Return the location */
3227 * @brief 店舗のオブジェクト数を増やす /
3228 * Add the item "o_ptr" to a real stores p_ptr->inventory_list.
3229 * @param item 増やしたいアイテムのID
3234 * Increase, by a given amount, the number of a certain item
3235 * in a certain store. This can result in zero items.
3237 * @todo numは本来ITEM_NUMBER型にしたい。
3239 static void store_item_increase(INVENTORY_IDX item, int num)
3244 o_ptr = &st_ptr->stock[item];
3246 /* Verify the number */
3247 cnt = o_ptr->number + num;
3248 if (cnt > 255) cnt = 255;
3249 else if (cnt < 0) cnt = 0;
3250 num = cnt - o_ptr->number;
3252 /* Save the new number */
3253 o_ptr->number += (ITEM_NUMBER)num;
3258 * @brief 店舗のオブジェクト数を削除する /
3259 * Remove a slot if it is empty
3260 * @param item 削除したいアイテムのID
3263 static void store_item_optimize(INVENTORY_IDX item)
3268 o_ptr = &st_ptr->stock[item];
3271 if (!o_ptr->k_idx) return;
3273 /* Must have no items */
3274 if (o_ptr->number) return;
3277 st_ptr->stock_num--;
3279 /* Slide everyone */
3280 for (j = item; j < st_ptr->stock_num; j++)
3282 st_ptr->stock[j] = st_ptr->stock[j + 1];
3285 /* Nuke the final slot */
3286 object_wipe(&st_ptr->stock[j]);
3290 * @brief ブラックマーケット用の無価値品の排除判定 /
3291 * This function will keep 'crap' out of the black market.
3292 * @param o_ptr 判定したいオブジェクトの構造体参照ポインタ
3293 * @return ブラックマーケットにとって無価値な品ならばTRUEを返す
3296 * Crap is defined as any item that is "available" elsewhere
3297 * Based on a suggestion by "Lee Vogt" <lvogt@cig.mcel.mot.com>
3300 static bool black_market_crap(object_type *o_ptr)
3304 /* Ego items are never crap */
3305 if (object_is_ego(o_ptr)) return (FALSE);
3307 /* Good items are never crap */
3308 if (o_ptr->to_a > 0) return (FALSE);
3309 if (o_ptr->to_h > 0) return (FALSE);
3310 if (o_ptr->to_d > 0) return (FALSE);
3312 /* Check all stores */
3313 for (i = 0; i < MAX_STORES; i++)
3315 if (i == STORE_HOME) continue;
3316 if (i == STORE_MUSEUM) continue;
3318 /* Check every item in the store */
3319 for (j = 0; j < town_info[p_ptr->town_num].store[i].stock_num; j++)
3321 object_type *j_ptr = &town_info[p_ptr->town_num].store[i].stock[j];
3323 /* Duplicate item "type", assume crappy */
3324 if (o_ptr->k_idx == j_ptr->k_idx) return (TRUE);
3334 * @brief 店舗の品揃え変化のためにアイテムを削除する /
3335 * Attempt to delete (some of) a random item from the store
3339 * Hack -- we attempt to "maintain" piles of items when possible.
3342 static void store_delete(void)
3347 /* Pick a random slot */
3348 what = (INVENTORY_IDX)randint0(st_ptr->stock_num);
3350 /* Determine how many items are here */
3351 num = st_ptr->stock[what].number;
3353 /* Hack -- sometimes, only destroy half the items */
3354 if (randint0(100) < 50) num = (num + 1) / 2;
3356 /* Hack -- sometimes, only destroy a single item */
3357 if (randint0(100) < 50) num = 1;
3359 /* Hack -- decrement the maximum timeouts and total charges of rods and wands. -LM- */
3360 if ((st_ptr->stock[what].tval == TV_ROD) || (st_ptr->stock[what].tval == TV_WAND))
3362 st_ptr->stock[what].pval -= num * st_ptr->stock[what].pval / st_ptr->stock[what].number;
3365 /* Actually destroy (part of) the item */
3366 store_item_increase(what, -num);
3367 store_item_optimize(what);
3372 * @brief 店舗の品揃え変化のためにアイテムを追加する /
3373 * Creates a random item and gives it to a store
3377 * This algorithm needs to be rethought. A lot.
3378 * Currently, "normal" stores use a pre-built array.
3379 * Note -- the "level" given to "obj_get_num()" is a "favored"
3380 * level, that is, there is a much higher chance of getting
3381 * items with a level approaching that of the given level...
3382 * Should we check for "permission" to have the given item?
3385 static void store_create(void)
3394 /* Paranoia -- no room left */
3395 if (st_ptr->stock_num >= st_ptr->stock_size) return;
3397 /* Hack -- consider up to four items */
3398 for (tries = 0; tries < 4; tries++)
3401 if (cur_store_num == STORE_BLACK)
3403 /* Pick a level for object/magic */
3404 level = 25 + randint0(25);
3406 /* Random item (usually of given level) */
3407 i = get_obj_num(level, 0x00000000);
3409 /* Handle failure */
3416 /* Hack -- Pick an item to sell */
3417 i = st_ptr->table[randint0(st_ptr->table_num)];
3419 /* Hack -- fake level for apply_magic() */
3420 level = rand_range(1, STORE_OBJ_LEVEL);
3425 /* Create a new object of the chosen kind */
3426 object_prep(q_ptr, i);
3428 /* Apply some "low-level" magic (no artifacts) */
3429 apply_magic(q_ptr, level, AM_NO_FIXED_ART);
3431 /* Require valid object */
3432 if (!store_will_buy(q_ptr)) continue;
3434 /* Hack -- Charge lite's */
3435 if (q_ptr->tval == TV_LITE)
3437 if (q_ptr->sval == SV_LITE_TORCH) q_ptr->xtra4 = FUEL_TORCH / 2;
3438 if (q_ptr->sval == SV_LITE_LANTERN) q_ptr->xtra4 = FUEL_LAMP / 2;
3442 /* The item is "known" */
3443 object_known(q_ptr);
3445 /* Mark it storebought */
3446 q_ptr->ident |= IDENT_STORE;
3448 /* Mega-Hack -- no chests in stores */
3449 if (q_ptr->tval == TV_CHEST) continue;
3451 /* Prune the black market */
3452 if (cur_store_num == STORE_BLACK)
3454 /* Hack -- No "crappy" items */
3455 if (black_market_crap(q_ptr)) continue;
3457 /* Hack -- No "cheap" items */
3458 if (object_value(q_ptr) < 10) continue;
3460 /* No "worthless" items */
3461 /* if (object_value(q_ptr) <= 0) continue; */
3464 /* Prune normal stores */
3467 /* No "worthless" items */
3468 if (object_value(q_ptr) <= 0) continue;
3472 /* Mass produce and/or Apply discount */
3473 mass_produce(q_ptr);
3475 /* Attempt to carry the (known) item */
3476 (void)store_carry(q_ptr);
3478 /* Definitely done */
3485 * @brief 店舗の割引対象外にするかどうかを判定 /
3486 * Eliminate need to bargain if player has haggled well in the past
3487 * @param minprice アイテムの最低販売価格
3488 * @return 割引を禁止するならTRUEを返す。
3490 static bool noneedtobargain(PRICE minprice)
3492 PRICE good = st_ptr->good_buy;
3493 PRICE bad = st_ptr->bad_buy;
3495 /* Cheap items are "boring" */
3496 if (minprice < 10L) return (TRUE);
3498 /* Perfect haggling */
3499 if (good == MAX_SHORT) return (TRUE);
3501 /* Reward good haggles, punish bad haggles, notice price */
3502 if (good > ((3 * bad) + (5 + (minprice/50)))) return (TRUE);
3504 /* Return the flag */
3510 * @brief 店主の持つプレイヤーに対する売買の良し悪し経験を記憶する /
3511 * Update the bargain info
3512 * @param price 実際の取引価格
3513 * @param minprice 店主の提示した価格
3517 static void updatebargain(PRICE price, PRICE minprice, int num)
3519 /* Hack -- auto-haggle */
3520 if (!manual_haggle) return;
3522 /* Cheap items are "boring" */
3523 if ((minprice/num) < 10L) return;
3525 /* Count the successful haggles */
3526 if (price == minprice)
3528 /* Just count the good haggles */
3529 if (st_ptr->good_buy < MAX_SHORT)
3535 /* Count the failed haggles */
3538 /* Just count the bad haggles */
3539 if (st_ptr->bad_buy < MAX_SHORT)
3548 * @brief 店の商品リストを再表示する /
3549 * Re-displays a single store entry
3553 static void display_entry(int pos)
3559 GAME_TEXT o_name[MAX_NLEN];
3564 o_ptr = &st_ptr->stock[pos];
3566 /* Get the "offset" */
3567 i = (pos % store_bottom);
3569 /* Label it, clear the line --(-- */
3570 (void)sprintf(out_val, "%c) ", ((i > 25) ? toupper(I2A(i - 26)) : I2A(i)));
3571 prt(out_val, i+6, 0);
3574 if (show_item_graph)
3576 TERM_COLOR a = object_attr(o_ptr);
3577 SYMBOL_CODE c = object_char(o_ptr);
3579 Term_queue_bigchar(cur_col, i + 6, a, c, 0, 0);
3580 if (use_bigtile) cur_col++;
3585 /* Describe an item in the home */
3586 if ((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM))
3590 /* Leave room for weights, if necessary -DRS- */
3591 if (show_weights) maxwid -= 10;
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 WEIGHT wgt = o_ptr->weight;
3603 sprintf(out_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
3604 put_str(out_val, i+6, 67);
3606 (void)sprintf(out_val, "%3d.%d lb", wgt / 10, wgt % 10);
3607 put_str(out_val, i+6, 68);
3613 /* Describe an item (fully) in a store */
3616 /* Must leave room for the "price" */
3619 /* Leave room for weights, if necessary -DRS- */
3620 if (show_weights) maxwid -= 7;
3622 /* Describe the object (fully) */
3623 object_desc(o_name, o_ptr, 0);
3624 o_name[maxwid] = '\0';
3625 c_put_str(tval_to_attr[o_ptr->tval], o_name, i+6, cur_col);
3630 /* Only show the weight of an individual item */
3631 int wgt = o_ptr->weight;
3633 sprintf(out_val, "%3d.%1d", lbtokg1(wgt) , lbtokg2(wgt) );
3634 put_str(out_val, i+6, 60);
3636 (void)sprintf(out_val, "%3d.%d", wgt / 10, wgt % 10);
3637 put_str(out_val, i+6, 61);
3642 /* Display a "fixed" cost */
3643 if (o_ptr->ident & (IDENT_FIXED))
3645 /* Extract the "minimum" price */
3646 x = price_item(o_ptr, ot_ptr->min_inflate, FALSE);
3648 /* Actually draw the price (not fixed) */
3650 (void)sprintf(out_val, "%9ld固", (long)x);
3652 (void)sprintf(out_val, "%9ld F", (long)x);
3654 put_str(out_val, i+6, 68);
3657 /* Display a "taxed" cost */
3658 else if (!manual_haggle)
3660 /* Extract the "minimum" price */
3661 x = price_item(o_ptr, ot_ptr->min_inflate, FALSE);
3663 /* Hack -- Apply Sales Tax if needed */
3664 if (!noneedtobargain(x)) x += x / 10;
3666 /* Actually draw the price (with tax) */
3667 (void)sprintf(out_val, "%9ld ", (long)x);
3668 put_str(out_val, i+6, 68);
3671 /* Display a "haggle" cost */
3674 /* Extrect the "maximum" price */
3675 x = price_item(o_ptr, ot_ptr->max_inflate, FALSE);
3677 /* Actually draw the price (not fixed) */
3678 (void)sprintf(out_val, "%9ld ", (long)x);
3679 put_str(out_val, i+6, 68);
3686 * @brief 店の商品リストを表示する /
3687 * Displays a store's p_ptr->inventory_list -RAK-
3690 * All prices are listed as "per individual object". -BEN-
3692 static void display_inventory(void)
3696 /* Display the next 12 items */
3697 for (k = 0; k < store_bottom; k++)
3699 /* Do not display "dead" items */
3700 if (store_top + k >= st_ptr->stock_num) break;
3702 /* Display that line */
3703 display_entry(store_top + k);
3706 /* Erase the extra lines and the "more" prompt */
3707 for (i = k; i < store_bottom + 1; i++) prt("", i + 6, 0);
3709 /* Assume "no current page" */
3711 put_str(" ", 5, 20);
3713 put_str(" ", 5, 20);
3717 /* Visual reminder of "more items" */
3718 if (st_ptr->stock_num > store_bottom)
3720 /* Show "more" reminder (after the last item) */
3721 prt(_("-続く-", "-more-"), k + 6, 3);
3723 /* Indicate the "current page" */
3724 /* Trailing spaces are to display (Page xx) and (Page x) */
3725 put_str(format(_("(%dページ) ", "(Page %d) "), store_top/store_bottom + 1), 5, 20);
3728 if (cur_store_num == STORE_HOME || cur_store_num == STORE_MUSEUM)
3730 k = st_ptr->stock_size;
3732 if (cur_store_num == STORE_HOME && !powerup_home) k /= 10;
3734 put_str(format("アイテム数: %4d/%4d", st_ptr->stock_num, k), 19 + xtra_stock, 27);
3736 put_str(format("Objects: %4d/%4d", st_ptr->stock_num, k), 19 + xtra_stock, 30);
3743 * @brief プレイヤーの所持金を表示する /
3744 * Displays players gold -RAK-
3748 static void store_prt_gold(void)
3752 prt(_("手持ちのお金: ", "Gold Remaining: "), 19 + xtra_stock, 53);
3753 sprintf(out_val, "%9ld", (long)p_ptr->au);
3754 prt(out_val, 19 + xtra_stock, 68);
3758 * @brief 店舗情報全体を表示するメインルーチン /
3759 * Displays store (after clearing screen) -RAK-
3763 static void display_store(void)
3769 /* The "Home" is special */
3770 if (cur_store_num == STORE_HOME)
3772 /* Put the owner name */
3773 put_str(_("我が家", "Your Home"), 3, 31);
3775 /* Label the item descriptions */
3776 put_str(_("アイテムの一覧", "Item Description"), 5, 4);
3778 /* If showing weights, show label */
3781 put_str(_(" 重さ", "Weight"), 5, 70);
3785 /* The "Home" is special */
3786 else if (cur_store_num == STORE_MUSEUM)
3788 /* Put the owner name */
3789 put_str(_("博物館", "Museum"), 3, 31);
3791 /* Label the item descriptions */
3792 put_str(_("アイテムの一覧", "Item Description"), 5, 4);
3794 /* If showing weights, show label */
3797 put_str(_(" 重さ", "Weight"), 5, 70);
3804 concptr store_name = (f_name + f_info[cur_store_feat].name);
3805 concptr owner_name = (ot_ptr->owner_name);
3806 concptr race_name = race_info[ot_ptr->owner_race].title;
3808 /* Put the owner name and race */
3809 sprintf(buf, "%s (%s)", owner_name, race_name);
3810 put_str(buf, 3, 10);
3812 /* Show the max price in the store (above prices) */
3813 sprintf(buf, "%s (%ld)", store_name, (long)(ot_ptr->max_cost));
3816 /* Label the item descriptions */
3817 put_str(_("商品の一覧", "Item Description"), 5, 5);
3820 /* If showing weights, show label */
3823 put_str(_(" 重さ", "Weight"), 5, 60);
3826 /* Label the asking price (in stores) */
3827 put_str(_(" 価格", "Price"), 5, 72);
3830 /* Display the current gold */
3833 /* Draw in the p_ptr->inventory_list */
3834 display_inventory();
3840 * @brief 店舗からアイテムを選択する /
3841 * Get the ID of a store item and return its value -RAK-
3842 * @param com_val 選択IDを返す参照ポインタ
3843 * @param pmt メッセージキャプション
3846 * @return 実際に選択したらTRUE、キャンセルしたらFALSE
3848 static int get_stock(COMMAND_CODE *com_val, concptr pmt, int i, int j)
3854 /* Get the item index */
3855 if (repeat_pull(com_val))
3857 /* Verify the item */
3858 if ((*com_val >= i) && (*com_val <= j))
3866 /* Assume failure */
3869 /* Build the prompt */
3871 hi = (j > 25) ? toupper(I2A(j - 26)) : I2A(j);
3873 (void)sprintf(out_val, "(%s:%c-%c, ESCで中断) %s",
3874 (((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM)) ? "アイテム" : "商品"),
3877 (void)sprintf(out_val, "(Items %c-%c, ESC to exit) %s",
3882 /* Ask until done */
3888 if (!get_com(out_val, &command, FALSE)) break;
3891 if (islower(command))
3893 else if (isupper(command))
3894 k = A2I(tolower(command)) + 26;
3898 /* Legal responses */
3899 if ((k >= i) && (k <= j))
3908 /* Clear the prompt */
3911 if (command == ESCAPE) return (FALSE);
3913 repeat_push(*com_val);
3921 * @brief 店主の不満度を増やし、プレイヤーを締め出す判定と処理を行う /
3922 * Increase the insult counter and get angry if too many -RAK-
3923 * @return プレイヤーを締め出す場合TRUEを返す
3925 static int increase_insults(void)
3927 /* Increase insults */
3928 st_ptr->insult_cur++;
3930 /* Become insulted */
3931 if (st_ptr->insult_cur > ot_ptr->insult_max)
3937 st_ptr->insult_cur = 0;
3938 st_ptr->good_buy = 0;
3939 st_ptr->bad_buy = 0;
3942 st_ptr->store_open = current_world_ptr->game_turn + TURNS_PER_TICK*TOWN_DAWN/8 + randint1(TURNS_PER_TICK*TOWN_DAWN/8);
3954 * @brief 店主の不満度を減らす /
3955 * Decrease insults -RAK-
3956 * @return プレイヤーを締め出す場合TRUEを返す
3958 static void decrease_insults(void)
3960 /* Decrease insults */
3961 if (st_ptr->insult_cur) st_ptr->insult_cur--;
3966 * @brief 店主の不満度が増えた場合のみのメッセージを表示する /
3967 * Have insulted while haggling -RAK-
3968 * @return プレイヤーを締め出す場合TRUEを返す
3970 static int haggle_insults(void)
3972 /* Increase insults */
3973 if (increase_insults()) return (TRUE);
3975 /* Display and flush insult */
3984 * Mega-Hack -- Enable "increments"
3986 static bool allow_inc = FALSE;
3989 * Mega-Hack -- Last "increment" during haggling
3991 static s32b last_inc = 0L;
3995 * @brief 交渉価格を確認と認証の是非を行う /
3998 * @param poffer 別途価格提示をした場合の値を返す参照ポインタ
3999 * @param price 現在の交渉価格
4000 * @param final 最終確定価格ならばTRUE
4001 * @return プレイヤーを締め出す場合TRUEを返す
4003 static int get_haggle(concptr pmt, s32b *poffer, PRICE price, int final)
4008 GAME_TEXT out_val[160];
4010 /* Clear old increment if necessary */
4011 if (!allow_inc) last_inc = 0L;
4016 sprintf(buf, _("%s [承諾] ", "%s [accept] "), pmt);
4019 /* Old (negative) increment, and not final */
4020 else if (last_inc < 0)
4022 sprintf(buf, _("%s [-$%ld] ", "%s [-%ld] "), pmt, (long)(ABS(last_inc)));
4025 /* Old (positive) increment, and not final */
4026 else if (last_inc > 0)
4028 sprintf(buf, _("%s [+$%ld] ", "%s [+%ld] "), pmt, (long)(ABS(last_inc)));
4034 sprintf(buf, "%s ", pmt);
4038 /* Ask until done */
4043 /* Display prompt */
4047 strcpy(out_val, "");
4050 * Ask the user for a response.
4051 * Don't allow to use numpad as cursor key.
4053 res = askfor_aux(out_val, 32, FALSE);
4059 if (!res) return FALSE;
4061 /* Skip leading spaces */
4062 for (p = out_val; *p == ' '; p++) /* loop */;
4064 /* Empty response */
4067 /* Accept current price */
4075 /* Use previous increment */
4076 if (allow_inc && last_inc)
4078 *poffer += last_inc;
4083 /* Normal response */
4086 /* Extract a number */
4089 /* Handle "incremental" number */
4090 if ((*p == '+' || *p == '-'))
4092 /* Allow increments */
4095 /* Use the given "increment" */
4102 /* Handle normal number */
4105 /* Use the given "number" */
4113 msg_print(_("値がおかしいです。", "Invalid response."));
4123 * @brief 店主がプレイヤーからの交渉価格を判断する /
4124 * Receive an offer (from the player)
4126 * @param poffer 店主からの交渉価格を返す参照ポインタ
4127 * @param last_offer 現在の交渉価格
4128 * @param factor 店主の価格基準倍率
4129 * @param price アイテムの実価値
4130 * @param final 最終価格確定ならばTRUE
4131 * @return プレイヤーの価格に対して不服ならばTRUEを返す /
4132 * Return TRUE if offer is NOT okay
4134 static bool receive_offer(concptr pmt, s32b *poffer,
4135 s32b last_offer, int factor,
4136 PRICE price, int final)
4138 /* Haggle till done */
4141 /* Get a haggle (or cancel) */
4142 if (!get_haggle(pmt, poffer, price, final)) return (TRUE);
4144 /* Acceptable offer */
4145 if (((*poffer) * factor) >= (last_offer * factor)) break;
4147 /* Insult, and check for kicked out */
4148 if (haggle_insults()) return (TRUE);
4150 /* Reject offer (correctly) */
4151 (*poffer) = last_offer;
4160 * @brief プレイヤーが購入する時の値切り処理メインルーチン /
4161 * Haggling routine -RAK-
4162 * @param o_ptr オブジェクトの構造体参照ポインタ
4163 * @param price 最終価格を返す参照ポインタ
4164 * @return プレイヤーの価格に対して店主が不服ならばTRUEを返す /
4165 * Return TRUE if purchase is NOT successful
4167 static bool purchase_haggle(object_type *o_ptr, s32b *price)
4169 s32b cur_ask, final_ask;
4170 s32b last_offer, offer;
4172 s32b min_per, max_per;
4173 int flag, loop_flag, noneed;
4174 int annoyed = 0, final = FALSE;
4175 bool cancel = FALSE;
4179 concptr pmt = _("提示価格", "Asking");
4181 /* Extract the starting offer and the final offer */
4182 cur_ask = price_item(o_ptr, ot_ptr->max_inflate, FALSE);
4183 final_ask = price_item(o_ptr, ot_ptr->min_inflate, FALSE);
4185 /* Determine if haggling is necessary */
4186 noneed = noneedtobargain(final_ask);
4188 /* No need to haggle */
4189 if (noneed || !manual_haggle)
4191 /* No need to haggle */
4194 /* Message summary */
4195 msg_print(_("結局この金額にまとまった。", "You eventually agree upon the price."));
4199 /* No haggle option */
4202 /* Message summary */
4203 msg_print(_("すんなりとこの金額にまとまった。", "You quickly agree upon the price."));
4206 /* Apply Sales Tax */
4207 final_ask += final_ask / 10;
4211 cur_ask = final_ask;
4213 /* Go to final offer */
4214 pmt = _("最終提示価格", "Final Offer");
4219 /* Haggle for the whole pile */
4220 cur_ask *= o_ptr->number;
4221 final_ask *= o_ptr->number;
4224 /* Haggle parameters */
4225 min_per = ot_ptr->haggle_per;
4226 max_per = min_per * 3;
4228 /* Mega-Hack -- artificial "last offer" value */
4229 last_offer = object_value(o_ptr) * o_ptr->number;
4230 last_offer = last_offer * (200 - (int)(ot_ptr->max_inflate)) / 100L;
4231 if (last_offer <= 0) last_offer = 1;
4236 /* No incremental haggling yet */
4239 /* Haggle until done */
4240 for (flag = FALSE; !flag; )
4244 while (!flag && loop_flag)
4246 (void)sprintf(out_val, "%s : %ld", pmt, (long)cur_ask);
4247 put_str(out_val, 1, 0);
4248 cancel = receive_offer(_("提示する金額? ", "What do you offer? "), &offer, last_offer, 1, cur_ask, final);
4253 else if (offer > cur_ask)
4258 else if (offer == cur_ask)
4271 x1 = 100 * (offer - last_offer) / (cur_ask - last_offer);
4274 if (haggle_insults())
4280 else if (x1 > max_per)
4283 if (x1 < max_per) x1 = max_per;
4285 x2 = rand_range(x1-2, x1+2);
4286 x3 = ((cur_ask - offer) * x2 / 100L) + 1;
4287 /* don't let the price go up */
4292 if (cur_ask < final_ask)
4295 cur_ask = final_ask;
4296 pmt = _("最終提示価格", "What do you offer? ");
4300 (void)(increase_insults());
4305 else if (offer >= cur_ask)
4316 (void)sprintf(out_val, _("前回の提示金額: $%ld", "Your last offer: %ld"), (long)last_offer);
4317 put_str(out_val, 1, 39);
4318 say_comment_2(cur_ask, annoyed);
4323 if (cancel) return (TRUE);
4325 updatebargain(*price, final_ask, o_ptr->number);
4333 * @brief プレイヤーが売却する時の値切り処理メインルーチン /
4334 * Haggling routine -RAK-
4335 * @param o_ptr オブジェクトの構造体参照ポインタ
4336 * @param price 最終価格を返す参照ポインタ
4337 * @return プレイヤーの価格に対して店主が不服ならばTRUEを返す /
4338 * Return TRUE if purchase is NOT successful
4340 static bool sell_haggle(object_type *o_ptr, s32b *price)
4342 s32b purse, cur_ask, final_ask;
4343 s32b last_offer = 0, offer = 0;
4345 s32b min_per, max_per;
4346 int flag, loop_flag, noneed;
4347 int annoyed = 0, final = FALSE;
4348 bool cancel = FALSE;
4349 concptr pmt = _("提示金額", "Offer");
4355 /* Obtain the starting offer and the final offer */
4356 cur_ask = price_item(o_ptr, ot_ptr->max_inflate, TRUE);
4357 final_ask = price_item(o_ptr, ot_ptr->min_inflate, TRUE);
4359 /* Determine if haggling is necessary */
4360 noneed = noneedtobargain(final_ask);
4362 /* Get the owner's payout limit */
4363 purse = (s32b)(ot_ptr->max_cost);
4365 /* No need to haggle */
4366 if (noneed || !manual_haggle || (final_ask >= purse))
4368 /* Apply Sales Tax (if needed) */
4369 if (!manual_haggle && !noneed)
4371 final_ask -= final_ask / 10;
4374 /* No reason to haggle */
4375 if (final_ask >= purse)
4377 msg_print(_("即座にこの金額にまとまった。", "You instantly agree upon the price."));
4380 /* Offer full purse */
4384 /* No need to haggle */
4387 msg_print(_("結局この金額にまとまった。", "You eventually agree upon the price."));
4391 /* No haggle option */
4394 /* Message summary */
4395 msg_print(_("すんなりとこの金額にまとまった。", "You quickly agree upon the price."));
4400 cur_ask = final_ask;
4404 pmt = _("最終提示金額", "Final Offer");
4407 /* Haggle for the whole pile */
4408 cur_ask *= o_ptr->number;
4409 final_ask *= o_ptr->number;
4412 /* Display commands */
4414 /* Haggling parameters */
4415 min_per = ot_ptr->haggle_per;
4416 max_per = min_per * 3;
4418 /* Mega-Hack -- artificial "last offer" value */
4419 last_offer = object_value(o_ptr) * o_ptr->number;
4420 last_offer = last_offer * ot_ptr->max_inflate / 100L;
4425 /* No incremental haggling yet */
4429 for (flag = FALSE; !flag; )
4435 (void)sprintf(out_val, "%s : %ld", pmt, (long)cur_ask);
4436 put_str(out_val, 1, 0);
4437 cancel = receive_offer(_("提示する価格? ", "What price do you ask? "),
4438 &offer, last_offer, -1, cur_ask, final);
4444 else if (offer < cur_ask)
4447 /* rejected, reset offer for incremental haggling */
4450 else if (offer == cur_ask)
4461 if (flag || !loop_flag) break;
4466 x1 = 100 * (last_offer - offer) / (last_offer - cur_ask);
4469 if (haggle_insults())
4475 else if (x1 > max_per)
4478 if (x1 < max_per) x1 = max_per;
4480 x2 = rand_range(x1-2, x1+2);
4481 x3 = ((offer - cur_ask) * x2 / 100L) + 1;
4482 /* don't let the price go down */
4486 if (cur_ask > final_ask)
4488 cur_ask = final_ask;
4490 pmt = _("最終提示金額", "Final Offer");
4497 /* 追加 $0 で買い取られてしまうのを防止 By FIRST*/
4500 (void)(increase_insults());
4503 else if (offer <= cur_ask)
4514 (void)sprintf(out_val,
4515 _("前回の提示価格 $%ld", "Your last bid %ld"), (long)last_offer);
4516 put_str(out_val, 1, 39);
4517 say_comment_3(cur_ask, annoyed);
4522 if (cancel) return (TRUE);
4524 updatebargain(*price, final_ask, o_ptr->number);
4532 * @brief 店からの購入処理のメインルーチン /
4533 * Buy an item from a store -RAK-
4536 static void store_purchase(void)
4539 COMMAND_CODE item, item_new;
4550 GAME_TEXT o_name[MAX_NLEN];
4554 if (cur_store_num == STORE_MUSEUM)
4556 msg_print(_("博物館から取り出すことはできません。", "Museum."));
4561 if (st_ptr->stock_num <= 0)
4563 if (cur_store_num == STORE_HOME)
4564 msg_print(_("我が家には何も置いてありません。", "Your home is empty."));
4566 msg_print(_("現在商品の在庫を切らしています。", "I am currently out of stock."));
4570 /* Find the number of objects on this and following pages */
4571 i = (st_ptr->stock_num - store_top);
4573 /* And then restrict it to the current page */
4574 if (i > store_bottom) i = store_bottom;
4578 /* ブラックマーケットの時は別のメッセージ */
4579 switch( cur_store_num ) {
4581 sprintf(out_val, "どのアイテムを取りますか? ");
4584 sprintf(out_val, "どれ? ");
4587 sprintf(out_val, "どの品物が欲しいんだい? ");
4591 if (cur_store_num == STORE_HOME)
4593 sprintf(out_val, "Which item do you want to take? ");
4597 sprintf(out_val, "Which item are you interested in? ");
4602 /* Get the item number to be bought */
4603 if (!get_stock(&item, out_val, 0, i - 1)) return;
4605 /* Get the actual index */
4606 item = item + store_top;
4608 /* Get the actual item */
4609 o_ptr = &st_ptr->stock[item];
4611 /* Assume the player wants just one of them */
4615 /* Get a copy of the object */
4616 object_copy(j_ptr, o_ptr);
4619 * If a rod or wand, allocate total maximum timeouts or charges
4620 * between those purchased and left on the shelf.
4622 reduce_charges(j_ptr, o_ptr->number - amt);
4624 /* Modify quantity */
4625 j_ptr->number = amt;
4627 /* Hack -- require room in pack */
4628 if (!inven_carry_okay(j_ptr))
4630 msg_print(_("そんなにアイテムを持てない。", "You cannot carry that many different items."));
4634 /* Determine the "best" price (per item) */
4635 best = price_item(j_ptr, ot_ptr->min_inflate, FALSE);
4637 /* Find out how many the player wants */
4638 if (o_ptr->number > 1)
4640 /* Hack -- note cost of "fixed" items */
4641 if ((cur_store_num != STORE_HOME) &&
4642 (o_ptr->ident & IDENT_FIXED))
4644 msg_format(_("一つにつき $%ldです。", "That costs %ld gold per item."), (long)(best));
4646 amt = get_quantity(NULL, o_ptr->number);
4647 if (amt <= 0) return;
4651 /* Get desired object */
4652 object_copy(j_ptr, o_ptr);
4655 * If a rod or wand, allocate total maximum timeouts or charges
4656 * between those purchased and left on the shelf.
4658 reduce_charges(j_ptr, o_ptr->number - amt);
4660 /* Modify quantity */
4661 j_ptr->number = amt;
4663 /* Hack -- require room in pack */
4664 if (!inven_carry_okay(j_ptr))
4666 msg_print(_("ザックにそのアイテムを入れる隙間がない。", "You cannot carry that many items."));
4670 /* Attempt to buy it */
4671 if (cur_store_num != STORE_HOME)
4673 /* Fixed price, quick buy */
4674 if (o_ptr->ident & (IDENT_FIXED))
4679 /* Go directly to the "best" deal */
4680 price = (best * j_ptr->number);
4686 /* Describe the object (fully) */
4687 object_desc(o_name, j_ptr, 0);
4688 msg_format(_("%s(%c)を購入する。", "Buying %s (%c)."), o_name, I2A(item));
4691 /* Haggle for a final price */
4692 choice = purchase_haggle(j_ptr, &price);
4694 /* Hack -- Got kicked out */
4695 if (st_ptr->store_open >= current_world_ptr->game_turn) return;
4698 /* Player wants it */
4701 /* Fix the item price (if "correctly" haggled) */
4702 if (price == (best * j_ptr->number)) o_ptr->ident |= (IDENT_FIXED);
4704 /* Player can afford it */
4705 if (p_ptr->au >= price)
4710 if (cur_store_num == STORE_BLACK) /* The black market is illegal! */
4711 chg_virtue(p_ptr, V_JUSTICE, -1);
4712 if((o_ptr->tval == TV_BOTTLE) && (cur_store_num != STORE_HOME))
4713 chg_virtue(p_ptr, V_NATURE, -1);
4721 /* Spend the money */
4724 /* Update the display */
4727 /* Hack -- buying an item makes you aware of it */
4728 object_aware(j_ptr);
4730 /* Hack -- clear the "fixed" flag from the item */
4731 j_ptr->ident &= ~(IDENT_FIXED);
4733 /* Describe the transaction */
4734 object_desc(o_name, j_ptr, 0);
4736 msg_format(_("%sを $%ldで購入しました。", "You bought %s for %ld gold."), o_name, (long)price);
4738 strcpy(record_o_name, o_name);
4739 record_turn = current_world_ptr->game_turn;
4741 if (record_buy) do_cmd_write_nikki(NIKKI_BUY, 0, o_name);
4742 object_desc(o_name, o_ptr, OD_NAME_ONLY);
4743 if(record_rand_art && o_ptr->art_name)
4744 do_cmd_write_nikki(NIKKI_ART, 0, o_name);
4746 /* Erase the inscription */
4747 j_ptr->inscription = 0;
4749 /* Erase the "feeling" */
4750 j_ptr->feeling = FEEL_NONE;
4751 j_ptr->ident &= ~(IDENT_STORE);
4752 /* Give it to the player */
4753 item_new = inven_carry(j_ptr);
4755 /* Describe the final result */
4756 object_desc(o_name, &p_ptr->inventory_list[item_new], 0);
4757 msg_format(_("%s(%c)を手に入れた。", "You have %s (%c)."), o_name, index_to_label(item_new));
4759 /* Auto-inscription */
4760 autopick_alter_item(item_new, FALSE);
4762 /* Now, reduce the original stack's pval. */
4763 if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
4765 o_ptr->pval -= j_ptr->pval;
4769 /* Note how many slots the store used to have */
4770 i = st_ptr->stock_num;
4772 /* Remove the bought items from the store */
4773 store_item_increase(item, -amt);
4774 store_item_optimize(item);
4776 /* Store is empty */
4777 if (st_ptr->stock_num == 0)
4780 if (one_in_(STORE_SHUFFLE))
4783 msg_print(_("店主は引退した。", "The shopkeeper retires."));
4785 /* Shuffle the store */
4786 store_shuffle(cur_store_num);
4789 sprintf(buf, "%s (%s)",
4790 ot_ptr->owner_name, race_info[ot_ptr->owner_race].title);
4791 put_str(buf, 3, 10);
4792 sprintf(buf, "%s (%ld)",
4793 (f_name + f_info[cur_store_feat].name), (long)(ot_ptr->max_cost));
4800 msg_print(_("店主は新たな在庫を取り出した。", "The shopkeeper brings out some new stock."));
4803 /* New p_ptr->inventory_list */
4804 for (i = 0; i < 10; i++)
4806 /* Maintain the store */
4807 store_maint(p_ptr->town_num, cur_store_num);
4812 display_inventory();
4815 /* The item is gone */
4816 else if (st_ptr->stock_num != i)
4818 /* Pick the correct screen */
4819 if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
4820 display_inventory();
4823 /* Item is still here */
4826 /* Redraw the item */
4827 display_entry(item);
4831 /* Player cannot afford it */
4834 /* Simple message (no insult) */
4835 msg_print(_("お金が足りません。", "You do not have enough gold."));
4840 /* Home is much easier */
4843 bool combined_or_reordered;
4845 /* Distribute charges of wands/rods */
4846 distribute_charges(o_ptr, j_ptr, amt);
4848 /* Give it to the player */
4849 item_new = inven_carry(j_ptr);
4851 /* Describe just the result */
4852 object_desc(o_name, &p_ptr->inventory_list[item_new], 0);
4854 msg_format(_("%s(%c)を取った。", "You have %s (%c)."), o_name, index_to_label(item_new));
4857 /* Take note if we take the last one */
4858 i = st_ptr->stock_num;
4860 /* Remove the items from the home */
4861 store_item_increase(item, -amt);
4862 store_item_optimize(item);
4864 combined_or_reordered = combine_and_reorder_home(STORE_HOME);
4866 /* Hack -- Item is still here */
4867 if (i == st_ptr->stock_num)
4869 if (combined_or_reordered) display_inventory();
4871 /* Redraw the item */
4872 else display_entry(item);
4875 /* The item is gone */
4879 if (st_ptr->stock_num == 0) store_top = 0;
4881 /* Nothing left on that screen */
4882 else if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
4883 display_inventory();
4885 chg_virtue(p_ptr, V_SACRIFICE, 1);
4889 /* Not kicked out */
4895 * @brief 店からの売却処理のメインルーチン /
4896 * Sell an item to the store (or home)
4899 static void store_sell(void)
4906 PRICE price, value, dummy;
4914 GAME_TEXT o_name[MAX_NLEN];
4917 /* Prepare a prompt */
4918 if (cur_store_num == STORE_HOME)
4919 q = _("どのアイテムを置きますか? ", "Drop which item? ");
4921 else if (cur_store_num == STORE_MUSEUM)
4922 q = _("どのアイテムを寄贈しますか? ", "Give which item? ");
4925 q = _("どのアイテムを売りますか? ", "Sell which item? ");
4927 /* Only allow items the store will buy */
4928 item_tester_hook = store_will_buy;
4930 /* 我が家でおかしなメッセージが出るオリジナルのバグを修正 */
4931 if (cur_store_num == STORE_HOME)
4933 s = _("置けるアイテムを持っていません。", "You don't have any item to drop.");
4935 else if (cur_store_num == STORE_MUSEUM)
4937 s = _("寄贈できるアイテムを持っていません。", "You don't have any item to give.");
4941 s = _("欲しい物がないですねえ。", "You have nothing that I want.");
4944 o_ptr = choose_object(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT), 0);
4947 /* Hack -- Cannot remove cursed items */
4948 if ((item >= INVEN_RARM) && object_is_cursed(o_ptr))
4950 msg_print(_("ふーむ、どうやらそれは呪われているようだね。", "Hmmm, it seems to be cursed."));
4954 /* Assume one item */
4957 if (o_ptr->number > 1)
4959 amt = get_quantity(NULL, o_ptr->number);
4960 if (amt <= 0) return;
4964 /* Get a copy of the object */
4965 object_copy(q_ptr, o_ptr);
4967 /* Modify quantity */
4968 q_ptr->number = amt;
4971 * Hack -- If a rod or wand, allocate total maximum
4972 * timeouts or charges to those being sold. -LM-
4974 if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
4976 q_ptr->pval = o_ptr->pval * amt / o_ptr->number;
4979 /* Get a full description */
4980 object_desc(o_name, q_ptr, 0);
4982 /* Remove any inscription, feeling for stores */
4983 if ((cur_store_num != STORE_HOME) && (cur_store_num != STORE_MUSEUM))
4985 q_ptr->inscription = 0;
4986 q_ptr->feeling = FEEL_NONE;
4989 /* Is there room in the store (or the home?) */
4990 if (!store_check_num(q_ptr))
4992 if (cur_store_num == STORE_HOME)
4993 msg_print(_("我が家にはもう置く場所がない。", "Your home is full."));
4995 else if (cur_store_num == STORE_MUSEUM)
4996 msg_print(_("博物館はもう満杯だ。", "Museum is full."));
4999 msg_print(_("すいませんが、店にはもう置く場所がありません。", "I have not the room in my store to keep it."));
5006 if ((cur_store_num != STORE_HOME) && (cur_store_num != STORE_MUSEUM))
5008 /* Describe the transaction */
5009 msg_format(_("%s(%c)を売却する。", "Selling %s (%c)."), o_name, index_to_label(item));
5014 choice = sell_haggle(q_ptr, &price);
5017 if (st_ptr->store_open >= current_world_ptr->game_turn) return;
5029 if (cur_store_num == STORE_BLACK) /* The black market is illegal! */
5030 chg_virtue(p_ptr, V_JUSTICE, -1);
5032 if((o_ptr->tval == TV_BOTTLE) && (cur_store_num != STORE_HOME))
5033 chg_virtue(p_ptr, V_NATURE, 1);
5036 /* Get some money */
5039 /* Update the display */
5042 /* Get the "apparent" value */
5043 dummy = object_value(q_ptr) * q_ptr->number;
5045 identify_item(o_ptr);
5048 /* Get a copy of the object */
5049 object_copy(q_ptr, o_ptr);
5051 /* Modify quantity */
5052 q_ptr->number = amt;
5054 /* Make it look like to be known */
5055 q_ptr->ident |= IDENT_STORE;
5058 * Hack -- If a rod or wand, let the shopkeeper know just
5059 * how many charges he really paid for. -LM-
5061 if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
5063 q_ptr->pval = o_ptr->pval * amt / o_ptr->number;
5066 /* Get the "actual" value */
5067 value = object_value(q_ptr) * q_ptr->number;
5069 /* Get the description all over again */
5070 object_desc(o_name, q_ptr, 0);
5072 /* Describe the result (in message buffer) */
5073 msg_format(_("%sを $%ldで売却しました。", "You sold %s for %ld gold."), o_name, (long)price);
5075 if (record_sell) do_cmd_write_nikki(NIKKI_SELL, 0, o_name);
5077 if (!((o_ptr->tval == TV_FIGURINE) && (value > 0)))
5079 /* Analyze the prices (and comment verbally) unless a figurine*/
5080 purchase_analyze(price, value, dummy);
5084 * Hack -- Allocate charges between those wands or rods sold
5085 * and retained, unless all are being sold. -LM-
5087 distribute_charges(o_ptr, q_ptr, amt);
5089 /* Reset timeouts of the sold items */
5092 /* Take the item from the player, describe the result */
5093 inven_item_increase(item, -amt);
5094 inven_item_describe(item);
5096 /* If items remain, auto-inscribe before optimizing */
5097 if (o_ptr->number > 0)
5098 autopick_alter_item(item, FALSE);
5100 inven_item_optimize(item);
5103 /* The store gets that (known) item */
5104 item_pos = store_carry(q_ptr);
5106 /* Re-display if item is now in store */
5109 store_top = (item_pos / store_bottom) * store_bottom;
5110 display_inventory();
5115 /* Player is at museum */
5116 else if (cur_store_num == STORE_MUSEUM)
5118 char o2_name[MAX_NLEN];
5119 object_desc(o2_name, q_ptr, OD_NAME_ONLY);
5121 if (-1 == store_check_num(q_ptr))
5123 msg_print(_("それと同じ品物は既に博物館にあるようです。", "The same object as it is already in the Museum."));
5127 msg_print(_("博物館に寄贈したものは取り出すことができません!!", "You cannot take items which is given to the Museum back!!"));
5130 if (!get_check(format(_("本当に%sを寄贈しますか?", "Really give %s to the Museum? "), o2_name))) return;
5132 identify_item(q_ptr);
5133 q_ptr->ident |= IDENT_MENTAL;
5135 /* Distribute charges of wands/rods */
5136 distribute_charges(o_ptr, q_ptr, amt);
5137 msg_format(_("%sを置いた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
5140 /* Take it from the players p_ptr->inventory_list */
5141 inven_item_increase(item, -amt);
5142 inven_item_describe(item);
5143 inven_item_optimize(item);
5146 /* Let the home carry it */
5147 item_pos = home_carry(q_ptr);
5149 /* Update store display */
5152 store_top = (item_pos / store_bottom) * store_bottom;
5153 display_inventory();
5156 /* Player is at home */
5159 /* Distribute charges of wands/rods */
5160 distribute_charges(o_ptr, q_ptr, amt);
5161 msg_format(_("%sを置いた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
5165 /* Take it from the players p_ptr->inventory_list */
5166 inven_item_increase(item, -amt);
5167 inven_item_describe(item);
5168 inven_item_optimize(item);
5171 /* Let the home carry it */
5172 item_pos = home_carry(q_ptr);
5174 /* Update store display */
5177 store_top = (item_pos / store_bottom) * store_bottom;
5178 display_inventory();
5182 if ((choice == 0) && (item >= INVEN_RARM))
5184 calc_android_exp(p_ptr);
5191 * @brief 店のアイテムを調べるコマンドのメインルーチン /
5192 * Examine an item in a store -JDL-
5195 static void store_examine(void)
5200 GAME_TEXT o_name[MAX_NLEN];
5204 if (st_ptr->stock_num <= 0)
5206 if (cur_store_num == STORE_HOME)
5207 msg_print(_("我が家には何も置いてありません。", "Your home is empty."));
5208 else if (cur_store_num == STORE_MUSEUM)
5209 msg_print(_("博物館には何も置いてありません。", "Museum is empty."));
5211 msg_print(_("現在商品の在庫を切らしています。", "I am currently out of stock."));
5215 /* Find the number of objects on this and following pages */
5216 i = (st_ptr->stock_num - store_top);
5218 /* And then restrict it to the current page */
5219 if (i > store_bottom) i = store_bottom;
5222 sprintf(out_val, _("どれを調べますか?", "Which item do you want to examine? "));
5224 /* Get the item number to be examined */
5225 if (!get_stock(&item, out_val, 0, i - 1)) return;
5227 /* Get the actual index */
5228 item = item + store_top;
5230 /* Get the actual item */
5231 o_ptr = &st_ptr->stock[item];
5233 /* Require full knowledge */
5234 if (!(o_ptr->ident & IDENT_MENTAL))
5236 /* This can only happen in the home */
5237 msg_print(_("このアイテムについて特に知っていることはない。", "You have no special knowledge about that item."));
5241 object_desc(o_name, o_ptr, 0);
5242 msg_format(_("%sを調べている...", "Examining %s..."), o_name);
5244 if (!screen_object(o_ptr, SCROBJ_FORCE_DETAIL))
5245 msg_print(_("特に変わったところはないようだ。", "You see nothing special."));
5252 * @brief 博物館のアイテムを除去するコマンドのメインルーチン /
5253 * Remove an item from museum (Originally from TOband)
5256 static void museum_remove_object(void)
5261 GAME_TEXT o_name[MAX_NLEN];
5265 if (st_ptr->stock_num <= 0)
5267 msg_print(_("博物館には何も置いてありません。", "Museum is empty."));
5271 /* Find the number of objects on this and following pages */
5272 i = st_ptr->stock_num - store_top;
5274 /* And then restrict it to the current page */
5275 if (i > store_bottom) i = store_bottom;
5278 sprintf(out_val, _("どのアイテムの展示をやめさせますか?", "Which item do you want to order to remove? "));
5280 /* Get the item number to be removed */
5281 if (!get_stock(&item, out_val, 0, i - 1)) return;
5283 /* Get the actual index */
5284 item = item + store_top;
5286 /* Get the actual item */
5287 o_ptr = &st_ptr->stock[item];
5289 object_desc(o_name, o_ptr, 0);
5291 msg_print(_("展示をやめさせたアイテムは二度と見ることはできません!", "You cannot see items which is removed from the Museum!"));
5292 if (!get_check(format(_("本当に%sの展示をやめさせますか?", "Really order to remove %s from the Museum? "), o_name))) return;
5294 msg_format(_("%sの展示をやめさせた。", "You ordered to remove %s."), o_name);
5296 /* Remove the items from the home */
5297 store_item_increase(item, -o_ptr->number);
5298 store_item_optimize(item);
5300 (void)combine_and_reorder_home(STORE_MUSEUM);
5302 /* The item is gone */
5305 if (st_ptr->stock_num == 0) store_top = 0;
5307 /* Nothing left on that screen */
5308 else if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
5309 display_inventory();
5316 * Hack -- set this to leave the store
5318 static bool leave_store = FALSE;
5322 * @brief 店舗処理コマンド選択のメインルーチン /
5323 * Process a command in a store
5327 * Note that we must allow the use of a few "special" commands
5328 * in the stores which are not allowed in the dungeon, and we
5329 * must disable some commands which are allowed in the dungeon
5330 * but not in the stores, to prevent chaos.
5333 static void store_process_command(void)
5335 /* Handle repeating the last command */
5338 if (rogue_like_commands && command_cmd == 'l')
5340 command_cmd = 'x'; /* hack! */
5343 /* Parse the command */
5344 switch (command_cmd)
5354 /* 1 ページ戻るコマンド: 我が家のページ数が多いので重宝するはず By BUG */
5357 if (st_ptr->stock_num <= store_bottom) {
5358 msg_print(_("これで全部です。", "Entire p_ptr->inventory_list is shown."));
5361 store_top -= store_bottom;
5362 if ( store_top < 0 )
5363 store_top = ((st_ptr->stock_num - 1 )/store_bottom) * store_bottom;
5364 if ( (cur_store_num == STORE_HOME) && (powerup_home == FALSE) )
5365 if ( store_top >= store_bottom ) store_top = store_bottom;
5366 display_inventory();
5374 if (st_ptr->stock_num <= store_bottom)
5376 msg_print(_("これで全部です。", "Entire p_ptr->inventory_list is shown."));
5380 store_top += store_bottom;
5382 * 隠しオプション(powerup_home)がセットされていないときは
5383 * 我が家では 2 ページまでしか表示しない
5385 if ((cur_store_num == STORE_HOME) &&
5386 (powerup_home == FALSE) &&
5387 (st_ptr->stock_num >= STORE_INVEN_MAX))
5389 if (store_top >= (STORE_INVEN_MAX - 1))
5396 if (store_top >= st_ptr->stock_num) store_top = 0;
5399 display_inventory();
5411 /* Get (purchase) */
5438 /*** Inventory Commands ***/
5440 /* Wear/wield equipment */
5447 /* Take off equipment */
5454 /* Destroy an item */
5461 /* Equipment list */
5468 /* Inventory list */
5476 /*** Various commands ***/
5478 /* Identify an object */
5485 /* Hack -- toggle windows */
5488 toggle_inven_equip();
5492 /*** Use various objects ***/
5497 if ( (p_ptr->pclass == CLASS_MINDCRAFTER) ||
5498 (p_ptr->pclass == CLASS_BERSERKER) ||
5499 (p_ptr->pclass == CLASS_NINJA) ||
5500 (p_ptr->pclass == CLASS_MIRROR_MASTER)
5501 ) do_cmd_mind_browse();
5502 else if (p_ptr->pclass == CLASS_SMITH)
5504 else if (p_ptr->pclass == CLASS_MAGIC_EATER)
5505 do_cmd_magic_eater(TRUE, FALSE);
5506 else if (p_ptr->pclass == CLASS_SNIPER)
5507 do_cmd_snipe_browse();
5508 else do_cmd_browse();
5512 /* Inscribe an object */
5519 /* Uninscribe an object */
5522 do_cmd_uninscribe();
5528 /*** Help and Such ***/
5537 /* Identify symbol */
5540 do_cmd_query_symbol();
5544 /* Character description */
5547 p_ptr->town_num = old_town_num;
5548 do_cmd_player_status();
5549 p_ptr->town_num = inner_town_num;
5555 /*** System Commands ***/
5557 /* Hack -- User interface */
5564 /* Single line from a pref file */
5567 p_ptr->town_num = old_town_num;
5569 p_ptr->town_num = inner_town_num;
5573 /* Interact with macros */
5576 p_ptr->town_num = old_town_num;
5578 p_ptr->town_num = inner_town_num;
5582 /* Interact with visuals */
5585 p_ptr->town_num = old_town_num;
5587 p_ptr->town_num = inner_town_num;
5591 /* Interact with colors */
5594 p_ptr->town_num = old_town_num;
5596 p_ptr->town_num = inner_town_num;
5600 /* Interact with options */
5604 (void)combine_and_reorder_home(STORE_HOME);
5610 /*** Misc Commands ***/
5626 /* Repeat level feeling */
5633 /* Show previous message */
5636 do_cmd_message_one();
5640 /* Show previous messages */
5653 /* Check artifacts, uniques etc. */
5660 /* Load "screen dump" */
5663 do_cmd_load_screen();
5667 /* Save "screen dump" */
5670 do_cmd_save_screen();
5674 /* Hack -- Unknown command */
5677 if ((cur_store_num == STORE_MUSEUM) && (command_cmd == 'r'))
5679 museum_remove_object();
5683 msg_print(_("そのコマンドは店の中では使えません。", "That command does not work in stores."));
5692 * @brief 店舗処理全体のメインルーチン /
5693 * Enter a store, and interact with it. *
5697 * Note that we use the standard "request_command()" function
5698 * to get a command, allowing us to use "command_arg" and all
5699 * command macros and other nifty stuff, but we use the special
5700 * "shopping" argument, to force certain commands to be converted
5701 * into other commands, normally, we convert "p" (pray) and "m"
5702 * (cast magic) into "g" (get), and "s" (search) into "d" (drop).
5705 void do_cmd_store(void)
5711 bool need_redraw_store_inv; /* To redraw missiles damage and prices in store */
5714 if(p_ptr->wild_mode) return;
5715 Term_get_size(&w, &h);
5717 /* Calculate stocks per 1 page */
5718 xtra_stock = MIN(14+26, ((h > 24) ? (h - 24) : 0));
5719 store_bottom = MIN_STOCK + xtra_stock;
5721 /* Access the player grid */
5722 g_ptr = ¤t_floor_ptr->grid_array[p_ptr->y][p_ptr->x];
5724 /* Verify a store */
5725 if (!cave_have_flag_grid(g_ptr, FF_STORE))
5727 msg_print(_("ここには店がありません。", "You see no store here."));
5731 /* Extract the store code */
5732 which = f_info[g_ptr->feat].subtype;
5734 old_town_num = p_ptr->town_num;
5735 if ((which == STORE_HOME) || (which == STORE_MUSEUM)) p_ptr->town_num = 1;
5736 if (current_floor_ptr->dun_level) p_ptr->town_num = NO_TOWN;
5737 inner_town_num = p_ptr->town_num;
5739 /* Hack -- Check the "locked doors" */
5740 if ((town_info[p_ptr->town_num].store[which].store_open >= current_world_ptr->game_turn) ||
5743 msg_print(_("ドアに鍵がかかっている。", "The doors are locked."));
5744 p_ptr->town_num = old_town_num;
5748 /* Calculate the number of store maintainances since the last visit */
5749 maintain_num = (current_world_ptr->game_turn - town_info[p_ptr->town_num].store[which].last_visit) / (TURNS_PER_TICK * STORE_TICKS);
5751 /* Maintain the store max. 10 times */
5752 if (maintain_num > 10) maintain_num = 10;
5756 /* Maintain the store */
5757 for (i = 0; i < maintain_num; i++)
5758 store_maint(p_ptr->town_num, which);
5760 /* Save the visit */
5761 town_info[p_ptr->town_num].store[which].last_visit = current_world_ptr->game_turn;
5767 /* Hack -- Character is in "icky" mode */
5768 current_world_ptr->character_icky = TRUE;
5775 /* Do not expand macros */
5776 get_com_no_macros = TRUE;
5778 /* Save the store number */
5779 cur_store_num = which;
5781 /* Hack -- save the store feature */
5782 cur_store_feat = g_ptr->feat;
5784 /* Save the store and owner pointers */
5785 st_ptr = &town_info[p_ptr->town_num].store[cur_store_num];
5786 ot_ptr = &owners[cur_store_num][st_ptr->owner];
5788 /* Start at the beginning */
5791 play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_BUILD);
5796 leave_store = FALSE;
5798 /* Interact with player */
5799 while (!leave_store)
5801 /* Hack -- Clear line 1 */
5805 clear_from(20 + xtra_stock);
5807 /* Basic commands */
5808 prt(_(" ESC) 建物から出る", " ESC) Exit from Building."), 21 + xtra_stock, 0);
5810 /* Browse if necessary */
5811 if (st_ptr->stock_num > store_bottom)
5813 prt(_(" -)前ページ", " -) Previous page"), 22 + xtra_stock, 0);
5814 prt(_(" スペース) 次ページ", " SPACE) Next page"), 23 + xtra_stock, 0);
5818 if (cur_store_num == STORE_HOME)
5820 prt(_("g) アイテムを取る", "g) Get an item."), 21 + xtra_stock, 27);
5821 prt(_("d) アイテムを置く", "d) Drop an item."), 22 + xtra_stock, 27);
5822 prt(_("x) 家のアイテムを調べる", "x) eXamine an item in the home."), 23 + xtra_stock, 27);
5825 /* Museum commands */
5826 else if (cur_store_num == STORE_MUSEUM)
5828 prt(_("d) アイテムを置く", "d) Drop an item."), 21 + xtra_stock, 27);
5829 prt(_("r) アイテムの展示をやめる", "r) order to Remove an item."), 22 + xtra_stock, 27);
5830 prt(_("x) 博物館のアイテムを調べる", "x) eXamine an item in the museum."), 23 + xtra_stock, 27);
5836 prt(_("p) 商品を買う", "p) Purchase an item."), 21 + xtra_stock, 30);
5837 prt(_("s) アイテムを売る", "s) Sell an item."), 22 + xtra_stock, 30);
5838 prt(_("x) 商品を調べる", "x) eXamine an item in the shop"), 23 + xtra_stock,30);
5842 prt(_("i/e) 持ち物/装備の一覧", "i/e) Inventry/Equipment list"), 21 + xtra_stock, 56);
5844 if (rogue_like_commands)
5846 prt(_("w/T) 装備する/はずす", "w/T) Wear/Take off equipment"), 22 + xtra_stock, 56);
5850 prt(_("w/t) 装備する/はずす", "w/t) Wear/Take off equipment"), 22 + xtra_stock, 56);
5854 prt(_("コマンド:", "You may: "), 20 + xtra_stock, 0);
5856 request_command(TRUE);
5858 /* Process the command */
5859 store_process_command();
5862 * Hack -- To redraw missiles damage and prices in store
5863 * If player's charisma changes, or if player changes a bow, PU_BONUS is set
5865 need_redraw_store_inv = (p_ptr->update & PU_BONUS) ? TRUE : FALSE;
5867 /* Hack -- Character is still in "icky" mode */
5868 current_world_ptr->character_icky = TRUE;
5873 if (p_ptr->inventory_list[INVEN_PACK].k_idx)
5875 INVENTORY_IDX item = INVEN_PACK;
5877 object_type *o_ptr = &p_ptr->inventory_list[item];
5879 /* Hack -- Flee from the store */
5880 if (cur_store_num != STORE_HOME)
5882 if (cur_store_num == STORE_MUSEUM)
5883 msg_print(_("ザックからアイテムがあふれそうなので、あわてて博物館から出た...", "Your pack is so full that you flee the Museum..."));
5885 msg_print(_("ザックからアイテムがあふれそうなので、あわてて店から出た...", "Your pack is so full that you flee the store..."));
5891 /* Hack -- Flee from the home */
5892 else if (!store_check_num(o_ptr))
5894 msg_print(_("ザックからアイテムがあふれそうなので、あわてて家から出た...", "Your pack is so full that you flee your home..."));
5899 /* Hack -- Drop items into the home */
5907 GAME_TEXT o_name[MAX_NLEN];
5909 /* Give a message */
5910 msg_print(_("ザックからアイテムがあふれてしまった!", "Your pack overflows!"));
5914 object_copy(q_ptr, o_ptr);
5915 object_desc(o_name, q_ptr, 0);
5917 msg_format(_("%sが落ちた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
5919 /* Remove it from the players p_ptr->inventory_list */
5920 inven_item_increase(item, -255);
5921 inven_item_describe(item);
5922 inven_item_optimize(item);
5925 /* Let the home carry it */
5926 item_pos = home_carry(q_ptr);
5928 /* Redraw the home */
5931 store_top = (item_pos / store_bottom) * store_bottom;
5932 display_inventory();
5937 /* Hack -- Redisplay store prices if charisma changes */
5938 /* Hack -- Redraw missiles damage if player changes bow */
5939 if (need_redraw_store_inv) display_inventory();
5941 /* Hack -- get kicked out of the store */
5942 if (st_ptr->store_open >= current_world_ptr->game_turn) leave_store = TRUE;
5945 select_floor_music();
5947 p_ptr->town_num = old_town_num;
5949 take_turn(p_ptr, 100);
5951 /* Hack -- Character is no longer in "icky" mode */
5952 current_world_ptr->character_icky = FALSE;
5954 /* Hack -- Cancel automatic command */
5957 /* Hack -- Cancel "see" mode */
5958 command_see = FALSE;
5960 /* Allow expanding macros */
5961 get_com_no_macros = FALSE;
5966 /* Update everything */
5967 p_ptr->update |= (PU_VIEW | PU_LITE | PU_MON_LITE);
5968 p_ptr->update |= (PU_MONSTERS);
5970 /* Redraw entire screen */
5971 p_ptr->redraw |= (PR_BASIC | PR_EXTRA | PR_EQUIPPY);
5972 p_ptr->redraw |= (PR_MAP);
5973 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
5979 * @brief 現在の町の店主を交代させる /
5980 * Shuffle one of the stores.
5981 * @param which 店舗種類のID
5984 void store_shuffle(int which)
5990 if (which == STORE_HOME) return;
5991 if (which == STORE_MUSEUM) return;
5994 /* Save the store index */
5995 cur_store_num = which;
5997 /* Activate that store */
5998 st_ptr = &town_info[p_ptr->town_num].store[cur_store_num];
6001 /* Pick a new owner */
6004 st_ptr->owner = (byte)randint0(MAX_OWNERS);
6005 if (j == st_ptr->owner) continue;
6006 for (i = 1;i < max_towns; i++)
6008 if (i == p_ptr->town_num) continue;
6009 if (st_ptr->owner == town_info[i].store[cur_store_num].owner) break;
6011 if (i == max_towns) break;
6014 /* Activate the new owner */
6015 ot_ptr = &owners[cur_store_num][st_ptr->owner];
6018 /* Reset the owner data */
6019 st_ptr->insult_cur = 0;
6020 st_ptr->store_open = 0;
6021 st_ptr->good_buy = 0;
6022 st_ptr->bad_buy = 0;
6025 /* Hack -- discount all the items */
6026 for (i = 0; i < st_ptr->stock_num; i++)
6030 o_ptr = &st_ptr->stock[i];
6032 if (!object_is_artifact(o_ptr))
6034 /* Hack -- Sell all non-artifact old items for "half price" */
6035 o_ptr->discount = 50;
6037 /* Hack -- Items are no longer "fixed price" */
6038 o_ptr->ident &= ~(IDENT_FIXED);
6040 /* Mega-Hack -- Note that the item is "on sale" */
6041 o_ptr->inscription = quark_add(_("売出中", "on sale"));
6048 * @brief 店の品揃えを変化させる /
6049 * Maintain the p_ptr->inventory_list at the stores.
6050 * @param town_num 町のID
6051 * @param store_num 店舗種類のID
6054 void store_maint(int town_num, int store_num)
6058 cur_store_num = store_num;
6061 if (store_num == STORE_HOME) return;
6062 if (store_num == STORE_MUSEUM) return;
6064 /* Activate that store */
6065 st_ptr = &town_info[town_num].store[store_num];
6067 /* Activate the owner */
6068 ot_ptr = &owners[store_num][st_ptr->owner];
6070 /* Store keeper forgives the player */
6071 st_ptr->insult_cur = 0;
6073 /* Mega-Hack -- prune the black market */
6074 if (store_num == STORE_BLACK)
6076 /* Destroy crappy black market items */
6077 for (j = st_ptr->stock_num - 1; j >= 0; j--)
6079 object_type *o_ptr = &st_ptr->stock[j];
6081 /* Destroy crappy items */
6082 if (black_market_crap(o_ptr))
6084 /* Destroy the item */
6085 store_item_increase(j, 0 - o_ptr->number);
6086 store_item_optimize(j);
6092 /* Choose the number of slots to keep */
6093 j = st_ptr->stock_num;
6095 /* Sell a few items */
6096 j = j - randint1(STORE_TURNOVER);
6098 /* Never keep more than "STORE_MAX_KEEP" slots */
6099 if (j > STORE_MAX_KEEP) j = STORE_MAX_KEEP;
6101 /* Always "keep" at least "STORE_MIN_KEEP" items */
6102 if (j < STORE_MIN_KEEP) j = STORE_MIN_KEEP;
6104 /* Hack -- prevent "underflow" */
6107 /* Destroy objects until only "j" slots are left */
6108 while (st_ptr->stock_num > j) store_delete();
6111 /* Choose the number of slots to fill */
6112 j = st_ptr->stock_num;
6114 /* Buy some more items */
6115 j = j + randint1(STORE_TURNOVER);
6117 /* Never keep more than "STORE_MAX_KEEP" slots */
6118 if (j > STORE_MAX_KEEP) j = STORE_MAX_KEEP;
6120 /* Always "keep" at least "STORE_MIN_KEEP" items */
6121 if (j < STORE_MIN_KEEP) j = STORE_MIN_KEEP;
6123 /* Hack -- prevent "overflow" */
6124 if (j >= st_ptr->stock_size) j = st_ptr->stock_size - 1;
6126 /* Acquire some new items */
6127 while (st_ptr->stock_num < j) store_create();
6132 * @brief 店舗情報を初期化する /
6133 * Initialize the stores
6134 * @param town_num 町のID
6135 * @param store_num 店舗種類のID
6138 void store_init(int town_num, int store_num)
6141 cur_store_num = store_num;
6143 /* Activate that store */
6144 st_ptr = &town_info[town_num].store[store_num];
6152 st_ptr->owner = (byte)randint0(MAX_OWNERS);
6153 for (i = 1;i < max_towns; i++)
6155 if (i == town_num) continue;
6156 if (st_ptr->owner == town_info[i].store[store_num].owner) break;
6158 if (i == max_towns) break;
6161 /* Activate the new owner */
6162 ot_ptr = &owners[store_num][st_ptr->owner];
6165 /* Initialize the store */
6166 st_ptr->store_open = 0;
6167 st_ptr->insult_cur = 0;
6168 st_ptr->good_buy = 0;
6169 st_ptr->bad_buy = 0;
6171 /* Nothing in stock */
6172 st_ptr->stock_num = 0;
6175 * MEGA-HACK - Last visit to store is
6176 * BEFORE player birth to enable store restocking
6178 st_ptr->last_visit = -10L * TURNS_PER_TICK * STORE_TICKS;
6180 /* Clear any old items */
6181 for (k = 0; k < st_ptr->stock_size; k++)
6183 object_wipe(&st_ptr->stock[k]);
6189 * @brief アイテムを町のブラックマーケットに移動させる /
6190 * @param o_ptr 移動させたいオブジェクトの構造体参照ポインタ
6193 void move_to_black_market(object_type *o_ptr)
6196 if (!p_ptr->town_num) return;
6198 st_ptr = &town_info[p_ptr->town_num].store[STORE_BLACK];
6200 o_ptr->ident |= IDENT_STORE;
6202 (void)store_carry(o_ptr);
6204 object_wipe(o_ptr); /* Don't leave a bogus object behind... */