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.
20 #include "cmd-smith.h"
21 #include "cmd-zapwand.h"
22 #include "cmd-magiceat.h"
26 #include "cmd-spell.h"
28 #include "player-status.h"
29 #include "object-flavor.h"
30 #include "object-hook.h"
31 #include "floor-events.h"
34 #include "player-effects.h"
35 #include "player-race.h"
38 #include "objectkind.h"
40 #include "floor-town.h"
45 * @brief 闘技場のモンスターID及び報酬アイテムテーブル /
46 * Store owners (exactly four "possible" owners per store, chosen randomly)
49 * { name, purse, max greed, min greed, haggle_per, tolerance, race, unused }
51 * Lifted extra shopkeepers from CthAngband (don't you just love open source
52 * development? ;-)). Since this gave less than 32 unique names for some
53 * shops, those have their first x names copied to reach 32.
55 * For the weapon and armour shops, several owners have a limit of 5k.
57 * I want to do 50k owners, but the purse is currently s16b. Perhaps
58 * we should just store 1/10th of the purse?
61 const owner_type owners[MAX_STORES][MAX_OWNERS] =
64 /* General store - 32 unique names */
66 Raistlin は dragonlance の powerful wizard 。
67 Rincewind the Chicken は Terry Pratchett の Discworld の登場人物 上記のパロディ?、
68 { "憶病者ラストリン", 200, 175, 108, 4, 12, RACE_HUMAN},
69 { "Raistlin the Chicken", 200, 175, 108, 4, 12, RACE_HUMAN},
73 { "フレンドリーなビルボ", 200, 170, 108, 5, 15, RACE_HOBBIT},
74 { "憶病者リンスウィンド", 200, 175, 108, 4, 12, RACE_HUMAN},
75 { "背の低いサルタン", 300, 170, 107, 5, 15, RACE_GNOME},
76 { "ハンサムなライア=エル", 300, 165, 107, 6, 18, RACE_ELF},
77 { "親切なファリルマウエン", 250, 170, 108, 5, 15, RACE_HOBBIT},
78 { "臆病者ヴォワラン", 500, 175, 108, 4, 12, RACE_HUMAN},
79 { "チビのエラシュナク", 750, 170, 107, 5, 15, RACE_BEASTMAN},
80 { "ハンサムなグラッグ", 1000, 165, 107, 6, 18, RACE_HALF_TITAN},
81 { "ケチなフォロビア", 250, 170, 108, 5, 15, RACE_HUMAN},
82 { "馬鹿のエリス", 500, 175, 108, 4, 12, RACE_HUMAN},
83 { "腹ペコのフィルバート", 750, 170, 107, 5, 15, RACE_VAMPIRE},
84 { "スナーグル・サシグア", 1000, 165, 107, 6, 18, RACE_MIND_FLAYER},
85 { "長死きエロワーズ", 250, 170, 108, 5, 15, RACE_SPECTRE},
86 { "ノロマのフンディ", 500, 175, 108, 4, 12, RACE_ZOMBIE},
87 { "グランサス", 750, 170, 107, 5, 15, RACE_SKELETON},
88 { "丁寧なロラックス", 1000, 165, 107, 6, 18, RACE_VAMPIRE},
89 { "ブッチ", 250, 170, 108, 5, 15, RACE_HALF_ORC},
90 { "美しきエルベレス", 500, 175, 108, 4, 12, RACE_HIGH_ELF},
91 { "こそこそサーレス", 750, 170, 107, 5, 15, RACE_GNOME},
92 { "ナーロック", 1000, 165, 107, 6, 18, RACE_DWARF},
93 { "チビのヘイネッカ", 250, 170, 108, 5, 15, RACE_GNOME},
94 { "きちがいロワラン", 500, 175, 108, 4, 12, RACE_HALF_GIANT},
95 { "毒息のウート", 750, 170, 107, 5, 15, RACE_DRACONIAN},
96 { "でぶっちょアラァカ", 1000, 165, 107, 6, 18, RACE_DRACONIAN},
97 { "低能なプーゴー", 250, 170, 108, 5, 15, RACE_BEASTMAN},
98 { "フェロールフィリアン", 500, 175, 108, 4, 12, RACE_ELF},
99 { "年寄りマロカ", 750, 170, 107, 5, 15, RACE_GNOME},
100 { "勇敢なサシン", 1000, 165, 107, 6, 18, RACE_HALF_GIANT},
101 { "田舎者アビエマール", 250, 170, 108, 5, 15, RACE_HUMAN},
102 { "貧乏なハーク", 500, 175, 108, 4, 12, RACE_HALF_ORC},
103 { "みじめなソアリン", 750, 170, 107, 5, 15, RACE_ZOMBIE},
104 { "質素なメルラ", 1000, 165, 107, 6, 18, RACE_ELF},
106 { "Bilbo the Friendly", 200, 170, 108, 5, 15, RACE_HOBBIT},
107 { "Rincewind the Chicken", 200, 175, 108, 4, 12, RACE_HUMAN},
108 { "Sultan the Midget", 300, 170, 107, 5, 15, RACE_GNOME},
109 { "Lyar-el the Comely", 300, 165, 107, 6, 18, RACE_ELF},
110 { "Falilmawen the Friendly", 250, 170, 108, 5, 15, RACE_HOBBIT},
111 { "Voirin the Cowardly", 500, 175, 108, 4, 12, RACE_HUMAN},
112 { "Erashnak the Midget", 750, 170, 107, 5, 15, RACE_BEASTMAN},
113 { "Grug the Comely", 1000, 165, 107, 6, 18, RACE_HALF_TITAN},
114 { "Forovir the Cheap", 250, 170, 108, 5, 15, RACE_HUMAN},
115 { "Ellis the Fool", 500, 175, 108, 4, 12, RACE_HUMAN},
116 { "Filbert the Hungry", 750, 170, 107, 5, 15, RACE_VAMPIRE},
117 { "Fthnargl Psathiggua", 1000, 165, 107, 6, 18, RACE_MIND_FLAYER},
118 { "Eloise Long-Dead", 250, 170, 108, 5, 15, RACE_SPECTRE},
119 { "Fundi the Slow", 500, 175, 108, 4, 12, RACE_ZOMBIE},
120 { "Granthus", 750, 170, 107, 5, 15, RACE_SKELETON},
121 { "Lorax the Suave", 1000, 165, 107, 6, 18, RACE_VAMPIRE},
122 { "Butch", 250, 170, 108, 5, 15, RACE_HALF_ORC},
123 { "Elbereth the Beautiful", 500, 175, 108, 4, 12, RACE_HIGH_ELF},
124 { "Sarleth the Sneaky", 750, 170, 107, 5, 15, RACE_GNOME},
125 { "Narlock", 1000, 165, 107, 6, 18, RACE_DWARF},
126 { "Haneka the Small", 250, 170, 108, 5, 15, RACE_GNOME},
127 { "Loirin the Mad", 500, 175, 108, 4, 12, RACE_HALF_GIANT},
128 { "Wuto Poisonbreath", 750, 170, 107, 5, 15, RACE_DRACONIAN},
129 { "Araaka the Rotund", 1000, 165, 107, 6, 18, RACE_DRACONIAN},
130 { "Poogor the Dumb", 250, 170, 108, 5, 15, RACE_BEASTMAN},
131 { "Felorfiliand", 500, 175, 108, 4, 12, RACE_ELF},
132 { "Maroka the Aged", 750, 170, 107, 5, 15, RACE_GNOME},
133 { "Sasin the Bold", 1000, 165, 107, 6, 18, RACE_HALF_GIANT},
134 { "Abiemar the Peasant", 250, 170, 108, 5, 15, RACE_HUMAN},
135 { "Hurk the Poor", 500, 175, 108, 4, 12, RACE_HALF_ORC},
136 { "Soalin the Wretched", 750, 170, 107, 5, 15, RACE_ZOMBIE},
137 { "Merulla the Humble", 1000, 165, 107, 6, 18, RACE_ELF},
141 /* Armoury - 28 unique names */
143 { "醜悪コン=ダー", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
144 { "頑固者ダーグ=ロウ", 10000, 190, 111, 4, 9, RACE_HUMAN},
145 { "賢者デカド", 25000, 200, 112, 4, 10, RACE_DUNADAN},
146 { "鍛冶屋のウィーランド", 30000, 200, 112, 4, 5, RACE_DWARF},
147 { "醜悪コン=ダー", 10000, 210, 115, 5, 7, RACE_HALF_ORC},
148 { "頑固者ダーグ=ロウ", 15000, 190, 111, 4, 9, RACE_HUMAN},
149 { "ハンサムなデカド", 25000, 200, 112, 4, 10, RACE_AMBERITE},
150 { "エロー・ドラゴンスケイル", 30000, 200, 112, 4, 5, RACE_ELF},
151 { "デリカトス", 10000, 210, 115, 5, 7, RACE_SPRITE},
152 { "巨大なグルース", 15000, 190, 111, 4, 9, RACE_HALF_GIANT},
153 { "アニムス", 25000, 200, 112, 4, 10, RACE_GOLEM},
154 { "マルヴァス", 30000, 200, 112, 4, 5, RACE_HALF_TITAN},
155 { "セラクシス", 10000, 210, 115, 5, 7, RACE_ZOMBIE},
156 { "デス・チル", 5000, 190, 111, 4, 9, RACE_SPECTRE},
157 { "微かなドリオス", 25000, 200, 112, 4, 10, RACE_SPECTRE},
158 { "冷たいバスリック", 30000, 200, 112, 4, 5, RACE_VAMPIRE},
159 { "冷酷ヴェンジェラ", 10000, 210, 115, 5, 7, RACE_HALF_TROLL},
160 { "強者ウィラナ", 15000, 190, 111, 4, 9, RACE_HUMAN},
161 { "ヨジョ二世", 25000, 200, 112, 4, 10, RACE_DWARF},
162 { "優しいラナラー", 30000, 200, 112, 4, 5, RACE_AMBERITE},
163 { "不浄のホルバグ", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
164 { "テレパスのエレレン", 15000, 190, 111, 4, 9, RACE_DARK_ELF},
165 { "イスドリリアス", 25000, 200, 112, 4, 10, RACE_SPRITE},
166 { "一つ目ヴェグナー", 5000, 200, 112, 4, 5, RACE_CYCLOPS},
167 { "混沌のロディッシュ", 10000, 210, 115, 5, 7, RACE_BEASTMAN},
168 { "剣豪ヘジン", 15000, 190, 111, 4, 9, RACE_NIBELUNG},
169 { "ずる屋のエルベレリス", 10000, 200, 112, 4, 10, RACE_DARK_ELF},
170 { "インプのザサス", 30000, 200, 112, 4, 5, RACE_IMP},
171 { "醜悪コン=ダー", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
172 { "頑固者ダーグ=ロウ", 10000, 190, 111, 4, 9, RACE_HUMAN},
173 { "ハンサムなデカド", 25000, 200, 112, 4, 10, RACE_AMBERITE},
174 { "鍛冶屋のウィーランド", 30000, 200, 112, 4, 5, RACE_DWARF},
176 { "Kon-Dar the Ugly", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
177 { "Darg-Low the Grim", 10000, 190, 111, 4, 9, RACE_HUMAN},
178 { "Decado the Handsome", 25000, 200, 112, 4, 10, RACE_DUNADAN},
179 { "Wieland the Smith", 30000, 200, 112, 4, 5, RACE_DWARF},
180 { "Kon-Dar the Ugly", 10000, 210, 115, 5, 7, RACE_HALF_ORC},
181 { "Darg-Low the Grim", 15000, 190, 111, 4, 9, RACE_HUMAN},
182 { "Decado the Handsome", 25000, 200, 112, 4, 10, RACE_AMBERITE},
183 { "Elo Dragonscale", 30000, 200, 112, 4, 5, RACE_ELF},
184 { "Delicatus", 10000, 210, 115, 5, 7, RACE_SPRITE},
185 { "Gruce the Huge", 15000, 190, 111, 4, 9, RACE_HALF_GIANT},
186 { "Animus", 25000, 200, 112, 4, 10, RACE_GOLEM},
187 { "Malvus", 30000, 200, 112, 4, 5, RACE_HALF_TITAN},
188 { "Selaxis", 10000, 210, 115, 5, 7, RACE_ZOMBIE},
189 { "Deathchill", 5000, 190, 111, 4, 9, RACE_SPECTRE},
190 { "Drios the Faint", 25000, 200, 112, 4, 10, RACE_SPECTRE},
191 { "Bathric the Cold", 30000, 200, 112, 4, 5, RACE_VAMPIRE},
192 { "Vengella the Cruel", 10000, 210, 115, 5, 7, RACE_HALF_TROLL},
193 { "Wyrana the Mighty", 15000, 190, 111, 4, 9, RACE_HUMAN},
194 { "Yojo II", 25000, 200, 112, 4, 10, RACE_DWARF},
195 { "Ranalar the Sweet", 30000, 200, 112, 4, 5, RACE_AMBERITE},
196 { "Horbag the Unclean", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
197 { "Elelen the Telepath", 15000, 190, 111, 4, 9, RACE_DARK_ELF},
198 { "Isedrelias", 25000, 200, 112, 4, 10, RACE_SPRITE},
199 { "Vegnar One-eye", 5000, 200, 112, 4, 5, RACE_CYCLOPS},
200 { "Rodish the Chaotic", 10000, 210, 115, 5, 7, RACE_BEASTMAN},
201 { "Hesin Swordmaster", 15000, 190, 111, 4, 9, RACE_NIBELUNG},
202 { "Elvererith the Cheat", 10000, 200, 112, 4, 10, RACE_DARK_ELF},
203 { "Zzathath the Imp", 30000, 200, 112, 4, 5, RACE_IMP},
204 { "Kon-Dar the Ugly", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
205 { "Darg-Low the Grim", 10000, 190, 111, 4, 9, RACE_HUMAN},
206 { "Decado the Handsome", 25000, 200, 112, 4, 10, RACE_AMBERITE},
207 { "Wieland the Smith", 30000, 200, 112, 4, 5, RACE_DWARF},
212 /* Weapon Smith - 28 unique names */
214 { "残忍なるアーノルド", 5000, 210, 115, 6, 6, RACE_HALF_TROLL},
215 { "獣殺しのアーンダル", 10000, 185, 110, 5, 9, RACE_HALF_ELF},
216 { "獣マスターのエディー", 25000, 190, 115, 5, 7, RACE_HOBBIT},
217 { "竜殺しのオグライン", 30000, 195, 112, 4, 8, RACE_DWARF},
218 { "熟練者ドリュー", 10000, 210, 115, 6, 6, RACE_HUMAN},
219 { "龍の子オラックス", 15000, 185, 110, 5, 9, RACE_DRACONIAN},
220 { "病気持ちのアンスラックス", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
221 { "頑丈者アルコス", 30000, 195, 112, 4, 8, RACE_DWARF},
222 { "腐れ者のサリアス", 5000, 210, 115, 6, 6, RACE_ZOMBIE},
223 { "晒し骨のトゥエシク", 15000, 185, 110, 5, 9, RACE_SKELETON},
224 { "ビリオス", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
225 { "ファスガル", 30000, 195, 112, 4, 8, RACE_ZOMBIE},
226 { "パラディンのエレフリス", 10000, 210, 115, 6, 6, RACE_BARBARIAN},
227 { "キ'トリッ'ク", 15000, 185, 110, 5, 9, RACE_KLACKON},
228 { "蜘蛛の友ドゥロカス", 25000, 190, 115, 5, 7, RACE_DARK_ELF},
229 { "巨人殺しのフングス", 30000, 195, 112, 4, 8, RACE_DWARF},
230 { "デランサ", 10000, 210, 115, 6, 6, RACE_ELF},
231 { "レンジャーのソルビスタニ", 15000, 185, 110, 5, 9, RACE_HALF_ELF},
232 { "ノロマのゾリル", 25000, 190, 115, 5, 7, RACE_GOLEM},
233 { "イーオン・フラックス", 20000, 195, 112, 4, 8, RACE_HALF_ELF},
234 { "強者ナドック", 10000, 210, 115, 6, 6, RACE_HOBBIT},
235 { "弱虫エラモグ", 15000, 185, 110, 5, 9, RACE_KOBOLD},
236 { "公正なエオウィリス", 25000, 190, 115, 5, 7, RACE_VAMPIRE},
237 { "バルログ殺しのヒュイモグ", 30000, 195, 112, 4, 8, RACE_HALF_ORC},
238 { "冷酷ピーダス", 5000, 210, 115, 6, 6, RACE_HUMAN},
239 { "ヴァモグ スレイヤー", 15000, 185, 110, 5, 9, RACE_HALF_OGRE},
240 { "性悪フーシュナク", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
241 { "舞闘バレン", 30000, 195, 112, 4, 8, RACE_BARBARIAN},
242 { "残忍なるアーノルド", 5000, 210, 115, 6, 6, RACE_BARBARIAN},
243 { "獣殺しのアーンダル", 10000, 185, 110, 5, 9, RACE_HALF_ELF},
244 { "ビーストマスター・エディー", 25000, 190, 115, 5, 7, RACE_HALF_ORC},
245 { "竜殺しのオグライン", 30000, 195, 112, 4, 8, RACE_DWARF},
247 { "Arnold the Beastly", 5000, 210, 115, 6, 6, RACE_BARBARIAN},
248 { "Arndal Beast-Slayer", 10000, 185, 110, 5, 9, RACE_HALF_ELF},
249 { "Eddie Beast-Master", 25000, 190, 115, 5, 7, RACE_HALF_ORC},
250 { "Oglign Dragon-Slayer", 30000, 195, 112, 4, 8, RACE_DWARF},
251 { "Drew the Skilled", 10000, 210, 115, 6, 6, RACE_HUMAN},
252 { "Orrax Dragonson", 15000, 185, 110, 5, 9, RACE_DRACONIAN},
253 { "Anthrax Disease-Carrier", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
254 { "Arkhoth the Stout", 30000, 195, 112, 4, 8, RACE_DWARF},
255 { "Sarlyas the Rotten", 5000, 210, 115, 6, 6, RACE_ZOMBIE},
256 { "Tuethic Bare-Bones", 15000, 185, 110, 5, 9, RACE_SKELETON},
257 { "Bilious", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
258 { "Fasgul", 30000, 195, 112, 4, 8, RACE_ZOMBIE},
259 { "Ellefris the Paladin", 10000, 210, 115, 6, 6, RACE_BARBARIAN},
260 { "K'trrik'k", 15000, 185, 110, 5, 9, RACE_KLACKON},
261 { "Drocus Spiderfriend", 25000, 190, 115, 5, 7, RACE_DARK_ELF},
262 { "Fungus Giant-Slayer", 30000, 195, 112, 4, 8, RACE_DWARF},
263 { "Delantha", 10000, 210, 115, 6, 6, RACE_ELF},
264 { "Solvistani the Ranger", 15000, 185, 110, 5, 9, RACE_HALF_ELF},
265 { "Xoril the Slow", 25000, 190, 115, 5, 7, RACE_GOLEM},
266 { "Aeon Flux", 20000, 195, 112, 4, 8, RACE_HALF_ELF},
267 { "Nadoc the Strong", 10000, 210, 115, 6, 6, RACE_HOBBIT},
268 { "Eramog the Weak", 15000, 185, 110, 5, 9, RACE_KOBOLD},
269 { "Eowilith the Fair", 25000, 190, 115, 5, 7, RACE_VAMPIRE},
270 { "Huimog Balrog-Slayer", 30000, 195, 112, 4, 8, RACE_HALF_ORC},
271 { "Peadus the Cruel", 5000, 210, 115, 6, 6, RACE_HUMAN},
272 { "Vamog Slayer", 15000, 185, 110, 5, 9, RACE_HALF_OGRE},
273 { "Hooshnak the Vicious", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
274 { "Balenn War-Dancer", 30000, 195, 112, 4, 8, RACE_BARBARIAN},
275 { "Arnold the Beastly", 5000, 210, 115, 6, 6, RACE_BARBARIAN},
276 { "Arndal Beast-Slayer", 10000, 185, 110, 5, 9, RACE_HALF_ELF},
277 { "Eddie Beast-Master", 25000, 190, 115, 5, 7, RACE_HALF_ORC},
278 { "Oglign Dragon-Slayer", 30000, 195, 112, 4, 8, RACE_DWARF},
282 /* Temple - 22 unique names */
284 { "質素なルードヴィヒ", 5000, 175, 109, 6, 15, RACE_HUMAN},
285 { "パラディンのガンナー", 10000, 185, 110, 5, 23, RACE_HUMAN},
286 { "選ばれしトリン", 25000, 180, 107, 6, 20, RACE_ELF},
287 { "賢明なるサラストロ", 30000, 185, 109, 5, 15, RACE_DWARF},
288 { "パーシヴァル卿", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
289 { "神聖なるアセナス", 30000, 185, 109, 5, 15, RACE_HUMAN},
290 { "マッキノン", 10000, 175, 109, 6, 15, RACE_HUMAN},
291 { "謹み婦人", 15000, 185, 110, 5, 23, RACE_HIGH_ELF},
292 { "ドルイドのハシュニック", 25000, 180, 107, 6, 20, RACE_HOBBIT},
293 { "フィナク", 30000, 185, 109, 5, 15, RACE_YEEK},
294 { "クリキック", 10000, 175, 109, 6, 15, RACE_KLACKON},
295 { "荒くれ者モリヴァル", 15000, 185, 110, 5, 23, RACE_ELF},
296 { "暗きホシャック", 25000, 180, 107, 6, 20, RACE_IMP},
297 { "賢者アタール", 30000, 185, 109, 5, 15, RACE_HUMAN},
298 { "清きイベニッド", 10000, 175, 109, 6, 15, RACE_HUMAN},
299 { "エリディシュ", 15000, 185, 110, 5, 23, RACE_HALF_TROLL},
300 { "呪術師ヴルドゥシュ", 25000, 180, 107, 6, 20, RACE_HALF_OGRE},
301 { "狂戦士ハオブ", 30000, 185, 109, 5, 15, RACE_BARBARIAN},
302 { "若きプルーグディシュ", 10000, 175, 109, 6, 15, RACE_HALF_OGRE},
303 { "きちがいラムワイズ", 15000, 185, 110, 5, 23, RACE_YEEK},
304 { "有徳者ムワート", 25000, 180, 107, 6, 20, RACE_KOBOLD},
305 { "弱虫ダードバード", 30000, 185, 109, 5, 15, RACE_SPECTRE},
306 { "質素なルードヴィヒ", 5000, 175, 109, 6, 15, RACE_HUMAN},
307 { "パラディンのガンナー", 10000, 185, 110, 5, 23, RACE_HUMAN},
308 { "選ばれしトリン", 25000, 180, 107, 6, 20, RACE_ELF},
309 { "賢明なるサラストロ", 30000, 185, 109, 5, 15, RACE_DWARF},
310 { "パーシヴァル卿", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
311 { "神聖なるアセナス", 30000, 185, 109, 5, 15, RACE_HUMAN},
312 { "マッキノン", 10000, 175, 109, 6, 15, RACE_HUMAN},
313 { "謹み婦人", 15000, 185, 110, 5, 23, RACE_HIGH_ELF},
314 { "ドルイドのハシュニック", 25000, 180, 107, 6, 20, RACE_HOBBIT},
315 { "フィナク", 30000, 185, 109, 5, 15, RACE_YEEK},
317 { "Ludwig the Humble", 5000, 175, 109, 6, 15, RACE_DWARF},
318 { "Gunnar the Paladin", 10000, 185, 110, 5, 23, RACE_HALF_TROLL},
319 { "Torin the Chosen", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
320 { "Sarastro the Wise", 30000, 185, 109, 5, 15, RACE_HUMAN},
321 { "Sir Parsival the Pure", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
322 { "Asenath the Holy", 30000, 185, 109, 5, 15, RACE_HUMAN},
323 { "McKinnon", 10000, 175, 109, 6, 15, RACE_HUMAN},
324 { "Mistress Chastity", 15000, 185, 110, 5, 23, RACE_HIGH_ELF},
325 { "Hashnik the Druid", 25000, 180, 107, 6, 20, RACE_HOBBIT},
326 { "Finak", 30000, 185, 109, 5, 15, RACE_YEEK},
327 { "Krikkik", 10000, 175, 109, 6, 15, RACE_KLACKON},
328 { "Morival the Wild", 15000, 185, 110, 5, 23, RACE_ELF},
329 { "Hoshak the Dark", 25000, 180, 107, 6, 20, RACE_IMP},
330 { "Atal the Wise", 30000, 185, 109, 5, 15, RACE_HUMAN},
331 { "Ibenidd the Chaste", 10000, 175, 109, 6, 15, RACE_HUMAN},
332 { "Eridish", 15000, 185, 110, 5, 23, RACE_HALF_TROLL},
333 { "Vrudush the Shaman", 25000, 180, 107, 6, 20, RACE_HALF_OGRE},
334 { "Haob the Berserker", 30000, 185, 109, 5, 15, RACE_BARBARIAN},
335 { "Proogdish the Youthfull", 10000, 175, 109, 6, 15, RACE_HALF_OGRE},
336 { "Lumwise the Mad", 15000, 185, 110, 5, 23, RACE_YEEK},
337 { "Muirt the Virtuous", 25000, 180, 107, 6, 20, RACE_KOBOLD},
338 { "Dardobard the Weak", 30000, 185, 109, 5, 15, RACE_SPECTRE},
339 { "Ludwig the Humble", 5000, 175, 109, 6, 15, RACE_DWARF},
340 { "Gunnar the Paladin", 10000, 185, 110, 5, 23, RACE_HALF_TROLL},
341 { "Torin the Chosen", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
342 { "Sarastro the Wise", 30000, 185, 109, 5, 15, RACE_HUMAN},
343 { "Sir Parsival the Pure", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
344 { "Asenath the Holy", 30000, 185, 109, 5, 15, RACE_HUMAN},
345 { "McKinnon", 10000, 175, 109, 6, 15, RACE_HUMAN},
346 { "Mistress Chastity", 15000, 185, 110, 5, 23, RACE_HIGH_ELF},
347 { "Hashnik the Druid", 25000, 180, 107, 6, 20, RACE_HOBBIT},
348 { "Finak", 30000, 185, 109, 5, 15, RACE_YEEK},
352 /* Alchemist - 26 unique names */
354 { "化学者マウザー", 10000, 190, 111, 5, 8, RACE_HALF_ELF},
355 { "カオスのウィズル", 10000, 190, 110, 6, 8, RACE_HOBBIT},
356 { "強欲ミダス", 15000, 200, 116, 6, 9, RACE_GNOME},
357 { "貧弱ジャ=ファー", 15000, 220, 111, 4, 9, RACE_ELF},/*FIRST*/
358 { "カカルラカカル", 15000, 200, 116, 6, 9, RACE_KLACKON},
359 { "錬金術師ジャル=エス", 15000, 220, 111, 4, 9, RACE_ELF},
360 { "用心深いファネラス", 10000, 190, 111, 5, 8, RACE_DWARF},
361 { "キチガイのルンシー", 10000, 190, 110, 6, 8, RACE_HUMAN},
362 { "グランブルワース", 15000, 200, 116, 6, 9, RACE_GNOME},
363 { "フリッター", 15000, 220, 111, 4, 9, RACE_SPRITE},
364 { "ザリルス", 10000, 190, 111, 5, 8, RACE_HUMAN},
365 { "古きエグバート", 10000, 190, 110, 6, 8, RACE_DWARF},
366 { "誇り高きヴァリンドラ", 15000, 200, 116, 6, 9, RACE_HIGH_ELF},
367 { "錬金術師タエン", 15000, 220, 111, 4, 9, RACE_HUMAN},
368 { "巧言カイド", 10000, 190, 111, 5, 8, RACE_VAMPIRE},
369 { "暗きフリア", 10000, 190, 110, 6, 8, RACE_NIBELUNG},
370 { "質素なドムリ", 15000, 200, 116, 6, 9, RACE_DWARF},
371 { "魔の子ヤァジュッカ", 15000, 220, 111, 4, 9, RACE_IMP},
372 { "薬草師ジェララルドール", 10000, 190, 111, 5, 8, RACE_HIGH_ELF},
373 { "賢者オレラルダン", 10000, 190, 110, 6, 8, RACE_BARBARIAN},
374 { "デモニシストのフゾグロ", 15000, 200, 116, 6, 9, RACE_IMP},
375 { "錬金術師ドゥリアシュ", 15000, 220, 111, 4, 9, RACE_HALF_ORC},
376 { "強者ネリア", 10000, 190, 111, 5, 8, RACE_CYCLOPS},
377 { "辛口リグナス", 10000, 190, 110, 6, 8, RACE_HALF_ORC},
378 { "ティルバ", 15000, 200, 116, 6, 9, RACE_HOBBIT},
379 { "金持ちミリルドリック", 15000, 220, 111, 4, 9, RACE_HUMAN},
381 { "科学者マウザー", 10000, 190, 111, 5, 8, RACE_HALF_ELF},
382 { "カオスのウィズル", 10000, 190, 110, 6, 8, RACE_HOBBIT},
383 { "強欲ミダス", 15000, 200, 116, 6, 9, RACE_GNOME},
384 { "錬金術師ジャ=ファー", 15000, 220, 111, 4, 9, RACE_ELF},
385 { "カカルラカカル", 15000, 200, 116, 6, 9, RACE_KLACKON},
386 { "錬金術師ジャル=エス", 15000, 220, 111, 4, 9, RACE_ELF},
388 { "Mauser the Chemist", 10000, 190, 111, 5, 8, RACE_HALF_ELF},
389 { "Wizzle the Chaotic", 10000, 190, 110, 6, 8, RACE_HOBBIT},
390 { "Midas the Greedy", 15000, 200, 116, 6, 9, RACE_GNOME},
391 { "Ja-Far the Alchemist", 15000, 220, 111, 4, 9, RACE_ELF},
392 { "Kakalrakakal", 15000, 200, 116, 6, 9, RACE_KLACKON},
393 { "Jal-Eth the Alchemist", 15000, 220, 111, 4, 9, RACE_ELF},
394 { "Fanelath the Cautious", 10000, 190, 111, 5, 8, RACE_DWARF},
395 { "Runcie the Insane", 10000, 190, 110, 6, 8, RACE_HUMAN},
396 { "Grumbleworth", 15000, 200, 116, 6, 9, RACE_GNOME},
397 { "Flitter", 15000, 220, 111, 4, 9, RACE_SPRITE},
398 { "Xarillus", 10000, 190, 111, 5, 8, RACE_HUMAN},
399 { "Egbert the Old", 10000, 190, 110, 6, 8, RACE_DWARF},
400 { "Valindra the Proud", 15000, 200, 116, 6, 9, RACE_HIGH_ELF},
401 { "Taen the Alchemist", 15000, 220, 111, 4, 9, RACE_HUMAN},
402 { "Cayd the Sweet", 10000, 190, 111, 5, 8, RACE_VAMPIRE},
403 { "Fulir the Dark", 10000, 190, 110, 6, 8, RACE_NIBELUNG},
404 { "Domli the Humble", 15000, 200, 116, 6, 9, RACE_DWARF},
405 { "Yaarjukka Demonspawn", 15000, 220, 111, 4, 9, RACE_IMP},
406 { "Gelaraldor the Herbmaster", 10000, 190, 111, 5, 8, RACE_HIGH_ELF},
407 { "Olelaldan the Wise", 10000, 190, 110, 6, 8, RACE_BARBARIAN},
408 { "Fthoglo the Demonicist", 15000, 200, 116, 6, 9, RACE_IMP},
409 { "Dridash the Alchemist", 15000, 220, 111, 4, 9, RACE_HALF_ORC},
410 { "Nelir the Strong", 10000, 190, 111, 5, 8, RACE_CYCLOPS},
411 { "Lignus the Pungent", 10000, 190, 110, 6, 8, RACE_HALF_ORC},
412 { "Tilba", 15000, 200, 116, 6, 9, RACE_HOBBIT},
413 { "Myrildric the Wealthy", 15000, 220, 111, 4, 9, RACE_HUMAN},
415 { "Mauser the Chemist", 10000, 190, 111, 5, 8, RACE_HALF_ELF},
416 { "Wizzle the Chaotic", 10000, 190, 110, 6, 8, RACE_HOBBIT},
417 { "Midas the Greedy", 15000, 200, 116, 6, 9, RACE_GNOME},
418 { "Ja-Far the Alchemist", 15000, 220, 111, 4, 9, RACE_ELF},
419 { "Kakalrakakal", 15000, 200, 116, 6, 9, RACE_KLACKON},
420 { "Jal-Eth the Alchemist", 15000, 220, 111, 4, 9, RACE_ELF},
425 /* Magic Shop - 23 unique names */
427 { "ソーサラーのロ=パン", 20000, 200, 110, 7, 8, RACE_HALF_ELF},
428 { "偉大なるブガービイ", 20000, 215, 113, 6, 10, RACE_GNOME},
429 { "イェンダーの魔法使い", 30000, 200, 110, 7, 10, RACE_HUMAN},
430 { "死霊使いリャク",30000, 175, 110, 5, 11, RACE_HIGH_ELF},
431 { "魔術師スキドゥニー", 15000, 200, 110, 7, 8, RACE_HALF_ELF},
432 { "幻術師キリア", 30000, 200, 110, 7, 10, RACE_HUMAN},
433 { "死霊術師ニッキ", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
434 { "ソロストラン", 15000, 200, 110, 7, 8, RACE_SPRITE},
435 { "烏賊口アチシェ", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
436 { "貴族のカザ", 30000, 200, 110, 7, 10, RACE_HIGH_ELF},
437 { "暗きファジル", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
438 { "偉大なるケルドーン", 15000, 200, 110, 7, 8, RACE_DWARF},
439 { "フィランスロプス", 20000, 215, 113, 6, 10, RACE_HOBBIT},
440 { "魔女のアグナー", 30000, 200, 110, 7, 10, RACE_HUMAN},
441 { "死霊術師ビュリアンス", 30000, 175, 110, 5, 11, RACE_BEASTMAN},
442 { "ハイメイジのヴイラク", 15000, 200, 110, 7, 8, RACE_BEASTMAN},
443 { "知恵者マディッシュ", 20000, 215, 113, 6, 10, RACE_BEASTMAN},
444 { "ファレブリンボール", 30000, 200, 110, 7, 10, RACE_HIGH_ELF},
445 { "陰険フェリル=ガンド", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
446 { "呪術師サレゴード", 15000, 200, 110, 7, 8, RACE_BARBARIAN},
447 { "神秘家クトゥアロス", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
448 { "幻術師イベリ", 30000, 200, 110, 7, 10, RACE_SKELETON},
449 { "死霊術師ヘトー", 30000, 175, 110, 5, 11, RACE_YEEK},
450 { "魔術師ロ=パン", 20000, 200, 110, 7, 8, RACE_HALF_ELF},
451 { "偉大なるブガービイ", 20000, 215, 113, 6, 10, RACE_GNOME},
452 { "イェンダーの魔法使い", 30000, 200, 110, 7, 10, RACE_HUMAN},
453 { "死霊術師リャク", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
454 { "魔術師スキドゥニー", 15000, 200, 110, 7, 8, RACE_HALF_ELF},
455 { "幻術師キリア", 30000, 200, 110, 7, 10, RACE_HUMAN},
456 { "死霊術師ニッキ", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
457 { "ソロストラン", 15000, 200, 110, 7, 8, RACE_SPRITE},
458 { "烏賊口アチシェ", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
460 { "Lo Pan the Sorcerer", 20000, 200, 110, 7, 8, RACE_HALF_ELF},
461 { "Buggerby the Great", 20000, 215, 113, 6, 10, RACE_GNOME},
462 { "The Wizard of Yendor", 30000, 200, 110, 7, 10, RACE_HUMAN},
463 { "Rjak the Necromancer", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
464 { "Skidney the Sorcerer", 15000, 200, 110, 7, 8, RACE_HALF_ELF},
465 { "Kyria the Illusionist", 30000, 200, 110, 7, 10, RACE_HUMAN},
466 { "Nikki the Necromancer", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
467 { "Solostoran", 15000, 200, 110, 7, 8, RACE_SPRITE},
468 { "Achshe the Tentacled", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
469 { "Kaza the Noble", 30000, 200, 110, 7, 10, RACE_HIGH_ELF},
470 { "Fazzil the Dark", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
471 { "Keldorn the Grand", 15000, 200, 110, 7, 8, RACE_DWARF},
472 { "Philanthropus", 20000, 215, 113, 6, 10, RACE_HOBBIT},
473 { "Agnar the Enchantress", 30000, 200, 110, 7, 10, RACE_HUMAN},
474 { "Buliance the Necromancer", 30000, 175, 110, 5, 11, RACE_BEASTMAN},
475 { "Vuirak the High-Mage", 15000, 200, 110, 7, 8, RACE_BEASTMAN},
476 { "Madish the Smart", 20000, 215, 113, 6, 10, RACE_BEASTMAN},
477 { "Falebrimbor", 30000, 200, 110, 7, 10, RACE_HIGH_ELF},
478 { "Felil-Gand the Subtle", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
479 { "Thalegord the Shaman", 15000, 200, 110, 7, 8, RACE_BARBARIAN},
480 { "Cthoaloth the Mystic", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
481 { "Ibeli the Illusionist", 30000, 200, 110, 7, 10, RACE_SKELETON},
482 { "Heto the Necromancer", 30000, 175, 110, 5, 11, RACE_YEEK},
483 { "Lo Pan the Sorcerer", 20000, 200, 110, 7, 8, RACE_HALF_ELF},
484 { "Buggerby the Great", 20000, 215, 113, 6, 10, RACE_GNOME},
485 { "The Wizard of Yendor", 30000, 200, 110, 7, 10, RACE_HUMAN},
486 { "Rjak the Necromancer", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
487 { "Skidney the Sorcerer", 15000, 200, 110, 7, 8, RACE_HALF_ELF},
488 { "Kyria the Illusionist", 30000, 200, 110, 7, 10, RACE_HUMAN},
489 { "Nikki the Necromancer", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
490 { "Solostoran", 15000, 200, 110, 7, 8, RACE_SPRITE},
491 { "Achshe the Tentacled", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
495 /* Black Market - 32 unique names */
497 { "ガリー=ギガズ", 20000, 250, 150, 10, 5, RACE_HALF_TROLL},
498 { "ゴブリンのヒストーア", 20000, 250, 150, 10, 5, RACE_HALF_ORC},
499 { "フェレンギ人クアーク", 30000, 250, 150, 10, 5, RACE_HUMAN},
500 { "公正なる(?)トッピ", 30000, 250, 150, 10, 5, RACE_ELF},
501 { "死人ヴァッサ", 20000, 250, 150, 10, 5, RACE_ZOMBIE},
502 { "裏切り者カイン", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
503 { "ブボニカス", 30000, 250, 150, 10, 5, RACE_BEASTMAN},
504 { "コープスライト", 30000, 250, 150, 10, 5, RACE_SPECTRE},
505 { "血に飢えしパリッシュ", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
506 { "ヴァイル", 20000, 250, 150, 10, 5, RACE_SKELETON},
507 { "信頼のプレンティス", 30000, 250, 150, 10, 5, RACE_SKELETON},
508 { "人間殺しのグリエラ", 30000, 250, 150, 10, 5, RACE_IMP},
509 { "エンジェル", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
510 { "水膨れフロツァム", 20000, 250, 150, 10, 5, RACE_ZOMBIE},
511 { "ニーヴァル", 30000, 250, 150, 10, 5, RACE_VAMPIRE},
512 { "明るいアナスタシア", 30000, 250, 150, 10, 5, RACE_SPECTRE},
513 { "死霊術師チャリティー", 20000, 250, 150, 10, 5, RACE_DARK_ELF},
514 { "ボクサーのプグナシオス", 20000, 250, 150, 10, 5, RACE_HALF_ORC},
515 { "幸運なフットソア", 30000, 250, 150, 10, 5, RACE_BEASTMAN},
516 { "光指のシドリア", 30000, 250, 150, 10, 5, RACE_HUMAN},
517 { "手品師リアソー", 20000, 250, 150, 10, 5, RACE_HOBBIT},
518 { "やりくり上手のジャナッカ", 20000, 250, 150, 10, 5, RACE_GNOME},
519 { "悪党シーナ", 30000, 250, 150, 10, 5, RACE_GNOME},
520 { "大爪アルニッキ", 30000, 250, 150, 10, 5, RACE_DRACONIAN},
521 { "貧乏チャエアンド", 20000, 250, 150, 10, 5, RACE_HUMAN},
522 { "山賊アファードーフ", 20000, 250, 150, 10, 5, RACE_BARBARIAN},
523 { "強欲ラザクスル", 30000, 250, 150, 10, 5, RACE_MIND_FLAYER},
524 { "ファラレウィン", 30000, 250, 150, 10, 5, RACE_SPRITE},
525 { "しわしわヴォスール", 20000, 250, 150, 10, 5, RACE_NIBELUNG},
526 { "ハンサムなアラオード", 20000, 250, 150, 10, 5, RACE_AMBERITE},
527 { "負け犬セラドフリド", 30000, 250, 150, 10, 5, RACE_HUMAN},
528 { "片足のエルーロ", 30000, 250, 150, 10, 5, RACE_HALF_OGRE},
530 { "Gary Gygaz", 20000, 250, 150, 10, 5, RACE_HALF_TROLL},
531 { "Histor the Goblin", 20000, 250, 150, 10, 5, RACE_HALF_ORC},
532 { "Quark the Ferengi", 30000, 250, 150, 10, 5, RACE_DWARF},
533 { "Topi the Fair(?)", 30000, 250, 150, 10, 5, RACE_HUMAN},
534 { "Vhassa the Dead", 20000, 250, 150, 10, 5, RACE_ZOMBIE},
535 { "Kyn the Treacherous", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
536 { "Bubonicus", 30000, 250, 150, 10, 5, RACE_BEASTMAN},
537 { "Corpselight", 30000, 250, 150, 10, 5, RACE_SPECTRE},
538 { "Parrish the Bloodthirsty", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
539 { "Vile", 20000, 250, 150, 10, 5, RACE_SKELETON},
540 { "Prentice the Trusted", 30000, 250, 150, 10, 5, RACE_SKELETON},
541 { "Griella Humanslayer", 30000, 250, 150, 10, 5, RACE_IMP},
542 { "Angel", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
543 { "Flotsam the Bloated", 20000, 250, 150, 10, 5, RACE_ZOMBIE},
544 { "Nieval", 30000, 250, 150, 10, 5, RACE_VAMPIRE},
545 { "Anastasia the Luminous", 30000, 250, 150, 10, 5, RACE_SPECTRE},
546 { "Charity the Necromancer", 20000, 250, 150, 10, 5, RACE_DARK_ELF},
547 { "Pugnacious the Pugilist", 20000, 250, 150, 10, 5, RACE_HALF_ORC},
548 { "Footsore the Lucky", 30000, 250, 150, 10, 5, RACE_BEASTMAN},
549 { "Sidria Lighfingered", 30000, 250, 150, 10, 5, RACE_HUMAN},
550 { "Riatho the Juggler", 20000, 250, 150, 10, 5, RACE_HOBBIT},
551 { "Janaaka the Shifty", 20000, 250, 150, 10, 5, RACE_GNOME},
552 { "Cina the Rogue", 30000, 250, 150, 10, 5, RACE_GNOME},
553 { "Arunikki Greatclaw", 30000, 250, 150, 10, 5, RACE_DRACONIAN},
554 { "Chaeand the Poor", 20000, 250, 150, 10, 5, RACE_HUMAN},
555 { "Afardorf the Brigand", 20000, 250, 150, 10, 5, RACE_BARBARIAN},
556 { "Lathaxl the Greedy", 30000, 250, 150, 10, 5, RACE_MIND_FLAYER},
557 { "Falarewyn", 30000, 250, 150, 10, 5, RACE_SPRITE},
558 { "Vosur the Wrinkled", 20000, 250, 150, 10, 5, RACE_NIBELUNG},
559 { "Araord the Handsome", 20000, 250, 150, 10, 5, RACE_AMBERITE},
560 { "Theradfrid the Loser", 30000, 250, 150, 10, 5, RACE_HUMAN},
561 { "One-Legged Eroolo", 30000, 250, 150, 10, 5, RACE_HALF_OGRE},
567 { "我が家", 0, 100, 100, 0, 99, 99},
568 { "我が家", 0, 100, 100, 0, 99, 99},
569 { "我が家", 0, 100, 100, 0, 99, 99},
570 { "我が家", 0, 100, 100, 0, 99, 99},
571 { "我が家", 0, 100, 100, 0, 99, 99},
572 { "我が家", 0, 100, 100, 0, 99, 99},
573 { "我が家", 0, 100, 100, 0, 99, 99},
574 { "我が家", 0, 100, 100, 0, 99, 99},
575 { "我が家", 0, 100, 100, 0, 99, 99},
576 { "我が家", 0, 100, 100, 0, 99, 99},
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},
600 { "Your home", 0, 100, 100, 0, 99, 99},
601 { "Your home", 0, 100, 100, 0, 99, 99},
602 { "Your home", 0, 100, 100, 0, 99, 99},
603 { "Your home", 0, 100, 100, 0, 99, 99},
604 { "Your home", 0, 100, 100, 0, 99, 99},
605 { "Your home", 0, 100, 100, 0, 99, 99},
606 { "Your home", 0, 100, 100, 0, 99, 99},
607 { "Your home", 0, 100, 100, 0, 99, 99},
608 { "Your home", 0, 100, 100, 0, 99, 99},
609 { "Your home", 0, 100, 100, 0, 99, 99},
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},
637 /* Bookstore - 21 unique names */
639 { "強欲ドラフ", 10000, 175, 108, 4, 12, RACE_HUMAN},
640 { "賢者オドナー", 15000, 120, 105, 6, 16, RACE_HIGH_ELF},
641 { "中立のガンダー", 25000, 120, 110, 7, 19, RACE_DARK_ELF},
642 { "忍耐の人ロ=シャ", 30000, 140, 105, 6, 12, RACE_ELF},
643 { "ランドルフ・カーター", 15000, 175, 108, 4, 12, RACE_HUMAN},
644 { "隼のサライ", 15000, 175, 108, 4, 12, RACE_HUMAN},
645 { "千里眼ボドリル", 20000, 120, 105, 6, 16, RACE_HIGH_ELF},
646 { "沈黙のヴェオロイン", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
647 { "学者のヴァンシラス", 30000, 140, 105, 6, 12, RACE_MIND_FLAYER},
648 { "物書きオセイン", 15000, 175, 108, 4, 12, RACE_SKELETON},
649 { "本の虫オルヴァー", 20000, 120, 105, 6, 16, RACE_VAMPIRE},
650 { "浅井墓男", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
651 { "デスマスク", 30000, 140, 105, 6, 12, RACE_ZOMBIE},
652 { "学者のアスーヌ", 15000, 175, 108, 4, 12, RACE_MIND_FLAYER},
653 { "死人のプリランド", 20000, 120, 105, 6, 16, RACE_ZOMBIE},
654 { "鉄のロナール", 25000, 120, 110, 7, 19, RACE_GOLEM},
656 { "Dolaf the Greedy", 10000, 175, 108, 4, 12, RACE_HUMAN},
657 { "Odnar the Sage", 15000, 120, 105, 6, 16, RACE_HIGH_ELF},
658 { "Gandar the Neutral", 25000, 120, 110, 7, 19, RACE_DARK_ELF},
659 { "Ro-sha the Patient", 30000, 140, 105, 6, 12, RACE_ELF},
660 { "Randolph Carter", 15000, 175, 108, 4, 12, RACE_HUMAN},
661 { "Sarai the Swift", 15000, 175, 108, 4, 12, RACE_HUMAN},
662 { "Bodril the Seer", 20000, 120, 105, 6, 16, RACE_HIGH_ELF},
663 { "Veloin the Quiet", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
664 { "Vanthylas the Learned", 30000, 140, 105, 6, 12, RACE_MIND_FLAYER},
665 { "Ossein the Literate", 15000, 175, 108, 4, 12, RACE_SKELETON},
666 { "Olvar Bookworm", 20000, 120, 105, 6, 16, RACE_VAMPIRE},
667 { "Shallowgrave", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
668 { "Death Mask", 30000, 140, 105, 6, 12, RACE_ZOMBIE},
669 { "Asuunu the Learned", 15000, 175, 108, 4, 12, RACE_MIND_FLAYER},
670 { "Prirand the Dead", 20000, 120, 105, 6, 16, RACE_ZOMBIE},
671 { "Ronar the Iron", 25000, 120, 110, 7, 19, RACE_GOLEM},
674 { "ガリル=ガミル", 30000, 140, 105, 6, 12, RACE_ELF},
675 { "本食いローバグ", 15000, 175, 108, 4, 12, RACE_KOBOLD},
676 { "キリアリキーク", 20000, 120, 105, 6, 16, RACE_KLACKON},
677 { "静かなるリリン", 25000, 120, 110, 7, 19, RACE_DWARF},
678 { "王者イサング", 30000, 140, 105, 6, 12, RACE_HIGH_ELF},
679 { "強欲ドラフ", 10000, 175, 108, 4, 12, RACE_HUMAN},
680 { "賢者オドナー", 15000, 120, 105, 6, 16, RACE_HIGH_ELF},
681 { "中立のガンダー", 25000, 120, 110, 7, 19, RACE_DARK_ELF},
682 { "忍耐の人ロ=シャ", 30000, 140, 105, 6, 12, RACE_ELF},
683 { "ランドルフ・カーター", 15000, 175, 108, 4, 12, RACE_HUMAN},
684 { "隼サライ", 15000, 175, 108, 4, 12, RACE_HUMAN},
685 { "千里眼ボドリル", 20000, 120, 105, 6, 16, RACE_HIGH_ELF},
686 { "沈黙のヴェオロイン", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
687 { "学者のヴァンシラス", 30000, 140, 105, 6, 12, RACE_MIND_FLAYER},
688 { "物書きオセイン", 15000, 175, 108, 4, 12, RACE_SKELETON},
689 { "本の虫オルヴァー", 20000, 120, 105, 6, 16, RACE_VAMPIRE},
691 { "Galil-Gamir", 30000, 140, 105, 6, 12, RACE_ELF},
692 { "Rorbag Book-Eater", 15000, 175, 108, 4, 12, RACE_KOBOLD},
693 { "Kiriarikirk", 20000, 120, 105, 6, 16, RACE_KLACKON},
694 { "Rilin the Quiet", 25000, 120, 110, 7, 19, RACE_DWARF},
695 { "Isung the Lord", 30000, 140, 105, 6, 12, RACE_HIGH_ELF},
696 { "Dolaf the Greedy", 10000, 175, 108, 4, 12, RACE_HUMAN},
697 { "Odnar the Sage", 15000, 120, 105, 6, 16, RACE_HIGH_ELF},
698 { "Gandar the Neutral", 25000, 120, 110, 7, 19, RACE_DARK_ELF},
699 { "Ro-sha the Patient", 30000, 140, 105, 6, 12, RACE_ELF},
700 { "Randolph Carter", 15000, 175, 108, 4, 12, RACE_HUMAN},
701 { "Sarai the Swift", 15000, 175, 108, 4, 12, RACE_HUMAN},
702 { "Bodril the Seer", 20000, 120, 105, 6, 16, RACE_HIGH_ELF},
703 { "Veloin the Quiet", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
704 { "Vanthylas the Learned", 30000, 140, 105, 6, 12, RACE_MIND_FLAYER},
705 { "Ossein the Literate", 15000, 175, 108, 4, 12, RACE_SKELETON},
706 { "Olvar Bookworm", 20000, 120, 105, 6, 16, RACE_VAMPIRE},
713 { "博物館", 0, 100, 100, 0, 99, 99},
714 { "博物館", 0, 100, 100, 0, 99, 99},
715 { "博物館", 0, 100, 100, 0, 99, 99},
716 { "博物館", 0, 100, 100, 0, 99, 99},
717 { "博物館", 0, 100, 100, 0, 99, 99},
718 { "博物館", 0, 100, 100, 0, 99, 99},
719 { "博物館", 0, 100, 100, 0, 99, 99},
720 { "博物館", 0, 100, 100, 0, 99, 99},
721 { "博物館", 0, 100, 100, 0, 99, 99},
722 { "博物館", 0, 100, 100, 0, 99, 99},
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},
746 { "Museum", 0, 100, 100, 0, 99, 99},
747 { "Museum", 0, 100, 100, 0, 99, 99},
748 { "Museum", 0, 100, 100, 0, 99, 99},
749 { "Museum", 0, 100, 100, 0, 99, 99},
750 { "Museum", 0, 100, 100, 0, 99, 99},
751 { "Museum", 0, 100, 100, 0, 99, 99},
752 { "Museum", 0, 100, 100, 0, 99, 99},
753 { "Museum", 0, 100, 100, 0, 99, 99},
754 { "Museum", 0, 100, 100, 0, 99, 99},
755 { "Museum", 0, 100, 100, 0, 99, 99},
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},
784 static int cur_store_num = 0;
785 static int store_top = 0;
786 static int store_bottom = 0;
787 static int xtra_stock = 0;
788 static store_type *st_ptr = NULL;
789 static const owner_type *ot_ptr = NULL;
790 static s16b old_town_num = 0;
791 static s16b inner_town_num = 0;
792 #define RUMOR_CHANCE 8
794 #define MAX_COMMENT_1 6
796 static concptr comment_1[MAX_COMMENT_1] =
817 /*! ブラックマーケット追加メッセージ(承諾) */
818 static concptr comment_1_B[MAX_COMMENT_1] = {
827 #define MAX_COMMENT_2A 2
829 static concptr comment_2a[MAX_COMMENT_2A] =
832 "私の忍耐力を試しているのかい? $%s が最後だ。",
833 "我慢にも限度があるぞ。 $%s が最後だ。"
835 "You try my patience. %s is final.",
836 "My patience grows thin. %s is final."
841 #define MAX_COMMENT_2B 12
843 static concptr comment_2b[MAX_COMMENT_2B] =
846 " $%s ぐらいは出さなきゃダメだよ。",
849 "何て奴だ! $%s 以下はあり得ないぞ。",
850 "それじゃ少なすぎる! $%s は欲しいところだ。",
851 "バカにしている! $%s はもらわないと。",
853 "おいおい! $%s を考えてくれないか?",
854 "1000匹のオークのノミに苦しめられるがいい! $%s だ。",
855 "お前の大切なものに災いあれ! $%s でどうだ。",
856 "モルゴスに賞味されるがいい!本当は $%s なんだろう?",
857 "お前の母親はオーガか! $%s は出すつもりなんだろ?"
859 "I can take no less than %s gold pieces.",
860 "I will accept no less than %s gold pieces.",
861 "Ha! No less than %s gold pieces.",
862 "You knave! No less than %s gold pieces.",
863 "That's a pittance! I want %s gold pieces.",
864 "That's an insult! I want %s gold pieces.",
865 "As if! How about %s gold pieces?",
866 "My arse! How about %s gold pieces?",
867 "May the fleas of 1000 orcs molest you! Try %s gold pieces.",
868 "May your most favourite parts go moldy! Try %s gold pieces.",
869 "May Morgoth find you tasty! Perhaps %s gold pieces?",
870 "Your mother was an Ogre! Perhaps %s gold pieces?"
876 /*! ブラックマーケット用追加メッセージ(売るとき) */
877 static concptr comment_2b_B[MAX_COMMENT_2B] = {
878 "いくら俺様がお人好しとはいえ $%s が限界だね。嫌なら帰りな。",
879 "金がないのかい、あんた?まずは家に帰って $%s 揃えてきな。",
880 "物の価値が分からん奴だな。これは $%s が普通なんだよ。",
881 "俺の付けた値段に文句があるのか? $%s が限界だ。",
882 "ひょっとして新手の冗談かい? $%s 持ってないなら帰りな。",
883 "うちは他の店とは違うんだよ。$%s ぐらいは出しな。",
884 "買う気がないなら帰りな。 $%s だと言っているんだ。",
885 "話にならないね。 $%s くらい持っているんだろ?",
886 "は?なんだそりゃ? $%s の間違いか、ひょっとして?",
887 "出口はあっちだよ。それとも $%s 出せるのかい、あんたに。",
888 "命知らずな奴だな。 $%s 出せば今日の所は勘弁してやるよ。",
889 "うちの店は貧乏人お断りだ。 $%s ぐらい出せないのかい?"
892 #define MAX_COMMENT_3A 2
894 static concptr comment_3a[MAX_COMMENT_3A] =
897 "私の忍耐力を試しているのかい? $%s が最後だ。",
898 "我慢にも限度があるぞ。 $%s が最後だ。"
900 "You try my patience. %s is final.",
901 "My patience grows thin. %s is final."
907 #define MAX_COMMENT_3B 12
909 static concptr comment_3b[MAX_COMMENT_3B] =
912 "本音を言うと $%s でいいんだろ?",
914 " $%s ぐらいなら出してもいいが。",
915 " $%s 以上払うなんて考えられないね。",
916 "まあ落ちついて。 $%s でどうだい?",
917 "そのガラクタなら $%s で引き取るよ。",
918 "それじゃ高すぎる! $%s がいいとこだろ。",
919 "どうせいらないんだろ! $%s でいいだろ?",
920 "だめだめ! $%s がずっとお似合いだよ。",
921 "バカにしている! $%s がせいぜいだ。",
922 " $%s なら嬉しいところだがなあ。",
923 " $%s 、それ以上はビタ一文出さないよ!"
925 "Perhaps %s gold pieces?",
926 "How about %s gold pieces?",
927 "I will pay no more than %s gold pieces.",
928 "I can afford no more than %s gold pieces.",
929 "Be reasonable. How about %s gold pieces?",
930 "I'll buy it as scrap for %s gold pieces.",
931 "That is too much! How about %s gold pieces?",
932 "That looks war surplus! Say %s gold pieces?",
933 "Never! %s is more like it.",
934 "That's an insult! %s is more like it.",
935 "%s gold pieces and be thankful for it!",
936 "%s gold pieces and not a copper more!"
942 /*! ブラックマーケット用追加メッセージ(買い取り) */
943 static concptr comment_3b_B[MAX_COMMENT_3B] = {
944 " $%s ってところだね。そのどうしようもないガラクタは。",
945 "この俺が $%s って言っているんだから、その通りにした方が身のためだぞ。",
946 "俺の優しさに甘えるのもいい加減にしておけ。 $%s だ。",
947 "その品なら $%s で売ってくれているがね、常識ある紳士はみんな。",
948 "こりゃまた、がめつい奴だな。いくら俺が温厚とはいえ $%s が限界だ。",
949 " $%s だ。別に俺はそんなガラクタ欲しくはないんだから。",
950 "俺の鑑定額が気に入らないのか? $%s 、嫌なら帰りな。",
951 " $%s で引き取ってやるよ。喜んで受け取りな、貧乏人。",
952 "物の価値が分からん奴は始末におえんな。それは $%s なんだよ。",
953 "そんなに金が欲しいのか、あんた? $%s で満足できんのか?",
954 "入る店間違えてんじゃないのか? $%s で嫌なら他をあたってくれ。",
955 "俺の言い値にケチをつける奴がいるとは! その度胸に免じて $%s だ。"
958 #define MAX_COMMENT_4A 4
960 static concptr comment_4a[MAX_COMMENT_4A] =
963 "もうたくさんだ!何度も私をわずらわせないでくれ!",
964 "うがー!一日の我慢の限度を超えている!",
965 "もういい!時間の無駄以外のなにものでもない!",
966 "もうやってられないよ!顔も見たくない!"
968 "Enough! You have abused me once too often!",
969 "Arghhh! I have had enough abuse for one day!",
970 "That does it! You shall waste my time no more!",
971 "This is getting nowhere! I'm going to Londis!"
977 /*! ブラックマーケット用追加メッセージ(怒りの頂点) */
978 static concptr comment_4a_B[MAX_COMMENT_4A] = {
979 "なめやがって!温厚な俺様でも限界があるってことを知れ!",
980 "俺をここまで怒らせて...命があるだけでもありがたいと思え!",
981 "ふざけてるのか!冷やかしなら相手を見てからにしろ!",
982 "いいかげんにしろ!今度こんなまねしたらただじゃおかねえぞ!"
985 #define MAX_COMMENT_4B 4
987 static concptr comment_4b[MAX_COMMENT_4B] =
996 "Get out of my sight!",
997 "Begone, you scoundrel!",
1004 /*! ブラックマーケット用追加メッセージ(追い出し) */
1005 static concptr comment_4b_B[MAX_COMMENT_4B] = {
1012 #define MAX_COMMENT_5 8
1014 static concptr comment_5[MAX_COMMENT_5] =
1028 "You will have to do better than that!",
1029 "Do you wish to do business or not?",
1030 "You've got to be kidding!",
1031 "You'd better be kidding!",
1032 "You try my patience.",
1033 "Hmmm, nice weather we're having."
1039 /*! ブラックマーケット用追加メッセージ(怒り) */
1040 static concptr comment_5_B[MAX_COMMENT_5] = {
1051 #define MAX_COMMENT_6 4
1053 static concptr comment_6[MAX_COMMENT_6] =
1061 "I must have heard you wrong.",
1062 "I'm sorry, I missed that.",
1063 "I'm sorry, what was that?",
1064 "Sorry, what was that again?"
1069 /*** Initialize others ***/
1072 * 店舗で販売するオブジェクトを定義する / Hack -- Objects sold in the stores -- by tval/sval pair.
1074 byte store_table[MAX_STORES][STORE_CHOICES][2] =
1079 { TV_FOOD, SV_FOOD_RATION },
1080 { TV_FOOD, SV_FOOD_RATION },
1081 { TV_FOOD, SV_FOOD_RATION },
1082 { TV_FOOD, SV_FOOD_RATION },
1084 { TV_FOOD, SV_FOOD_RATION },
1085 { TV_FOOD, SV_FOOD_BISCUIT },
1086 { TV_FOOD, SV_FOOD_JERKY },
1087 { TV_FOOD, SV_FOOD_JERKY },
1089 { TV_FOOD, SV_FOOD_PINT_OF_WINE },
1090 { TV_FOOD, SV_FOOD_PINT_OF_ALE },
1091 { TV_LITE, SV_LITE_TORCH },
1092 { TV_LITE, SV_LITE_TORCH },
1094 { TV_LITE, SV_LITE_TORCH },
1095 { TV_LITE, SV_LITE_TORCH },
1096 { TV_LITE, SV_LITE_LANTERN },
1097 { TV_LITE, SV_LITE_LANTERN },
1109 { TV_SHOT, SV_AMMO_NORMAL },
1110 { TV_ARROW, SV_AMMO_NORMAL },
1111 { TV_BOLT, SV_AMMO_NORMAL },
1112 { TV_DIGGING, SV_SHOVEL },
1114 { TV_DIGGING, SV_PICK },
1115 { TV_CLOAK, SV_CLOAK },
1116 { TV_CLOAK, SV_CLOAK },
1117 { TV_CLOAK, SV_FUR_CLOAK },
1119 { TV_FOOD, SV_FOOD_RATION },
1120 { TV_FOOD, SV_FOOD_RATION },
1121 { TV_FOOD, SV_FOOD_RATION },
1122 { TV_FOOD, SV_FOOD_RATION },
1124 { TV_POTION, SV_POTION_WATER },
1125 { TV_POTION, SV_POTION_WATER },
1126 { TV_LITE, SV_LITE_LANTERN },
1127 { TV_LITE, SV_LITE_LANTERN },
1129 { TV_FOOD, SV_FOOD_WAYBREAD },
1130 { TV_FOOD, SV_FOOD_WAYBREAD },
1134 { TV_SHOT, SV_AMMO_NORMAL },
1135 { TV_ARROW, SV_AMMO_NORMAL },
1136 { TV_BOLT, SV_AMMO_NORMAL },
1137 { TV_DIGGING, SV_SHOVEL }
1143 { TV_BOOTS, SV_PAIR_OF_SOFT_LEATHER_BOOTS },
1144 { TV_BOOTS, SV_PAIR_OF_SOFT_LEATHER_BOOTS },
1145 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
1146 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
1148 { TV_HELM, SV_HARD_LEATHER_CAP },
1149 { TV_HELM, SV_HARD_LEATHER_CAP },
1150 { TV_HELM, SV_METAL_CAP },
1151 { TV_HELM, SV_IRON_HELM },
1153 { TV_SOFT_ARMOR, SV_ROBE },
1154 { TV_SOFT_ARMOR, SV_ROBE },
1155 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
1156 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
1158 { TV_SOFT_ARMOR, SV_HARD_LEATHER_ARMOR },
1159 { TV_SOFT_ARMOR, SV_HARD_LEATHER_ARMOR },
1160 { TV_SOFT_ARMOR, SV_HARD_STUDDED_LEATHER },
1161 { TV_SOFT_ARMOR, SV_HARD_STUDDED_LEATHER },
1163 { TV_SOFT_ARMOR, SV_RHINO_HIDE_ARMOR },
1164 { TV_SOFT_ARMOR, SV_LEATHER_SCALE_MAIL },
1165 { TV_HARD_ARMOR, SV_METAL_SCALE_MAIL },
1166 { TV_HARD_ARMOR, SV_CHAIN_MAIL },
1168 { TV_HARD_ARMOR, SV_DOUBLE_RING_MAIL },
1169 { TV_HARD_ARMOR, SV_AUGMENTED_CHAIN_MAIL },
1170 { TV_HARD_ARMOR, SV_BAR_CHAIN_MAIL },
1171 { TV_HARD_ARMOR, SV_DOUBLE_CHAIN_MAIL },
1173 { TV_HARD_ARMOR, SV_METAL_BRIGANDINE_ARMOUR },
1174 { TV_HARD_ARMOR, SV_SPLINT_MAIL },
1175 { TV_GLOVES, SV_SET_OF_LEATHER_GLOVES },
1176 { TV_GLOVES, SV_SET_OF_LEATHER_GLOVES },
1178 { TV_GLOVES, SV_SET_OF_GAUNTLETS },
1179 { TV_SHIELD, SV_SMALL_LEATHER_SHIELD },
1180 { TV_SHIELD, SV_LARGE_LEATHER_SHIELD },
1181 { TV_SHIELD, SV_SMALL_METAL_SHIELD },
1183 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
1184 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
1185 { TV_HELM, SV_HARD_LEATHER_CAP },
1186 { TV_HELM, SV_HARD_LEATHER_CAP },
1188 { TV_SOFT_ARMOR, SV_ROBE },
1189 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
1190 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
1191 { TV_SOFT_ARMOR, SV_HARD_LEATHER_ARMOR },
1193 { TV_SOFT_ARMOR, SV_LEATHER_JACK },
1194 { TV_HARD_ARMOR, SV_METAL_SCALE_MAIL },
1195 { TV_HARD_ARMOR, SV_CHAIN_MAIL },
1196 { TV_HARD_ARMOR, SV_CHAIN_MAIL },
1198 { TV_GLOVES, SV_SET_OF_LEATHER_GLOVES },
1199 { TV_GLOVES, SV_SET_OF_GAUNTLETS },
1200 { TV_SHIELD, SV_SMALL_LEATHER_SHIELD },
1201 { TV_SHIELD, SV_SMALL_LEATHER_SHIELD }
1207 { TV_SWORD, SV_DAGGER },
1208 { TV_SWORD, SV_MAIN_GAUCHE },
1209 { TV_SWORD, SV_RAPIER },
1210 { TV_SWORD, SV_SMALL_SWORD },
1212 { TV_SWORD, SV_SHORT_SWORD },
1213 { TV_SWORD, SV_SABRE },
1214 { TV_SWORD, SV_CUTLASS },
1215 { TV_SWORD, SV_TULWAR },
1217 { TV_SWORD, SV_BROAD_SWORD },
1218 { TV_SWORD, SV_LONG_SWORD },
1219 { TV_SWORD, SV_SCIMITAR },
1220 { TV_SWORD, SV_KATANA },
1222 { TV_SWORD, SV_BASTARD_SWORD },
1223 { TV_POLEARM, SV_SPEAR },
1224 { TV_POLEARM, SV_AWL_PIKE },
1225 { TV_POLEARM, SV_TRIDENT },
1227 { TV_POLEARM, SV_PIKE },
1228 { TV_POLEARM, SV_BEAKED_AXE },
1229 { TV_POLEARM, SV_BROAD_AXE },
1230 { TV_POLEARM, SV_LANCE },
1232 { TV_POLEARM, SV_BATTLE_AXE },
1233 { TV_POLEARM, SV_HATCHET },
1234 { TV_BOW, SV_SLING },
1235 { TV_BOW, SV_SHORT_BOW },
1237 { TV_BOW, SV_LIGHT_XBOW },
1238 { TV_SHOT, SV_AMMO_NORMAL },
1239 { TV_SHOT, SV_AMMO_NORMAL },
1240 { TV_ARROW, SV_AMMO_NORMAL },
1242 { TV_ARROW, SV_AMMO_NORMAL },
1243 { TV_BOLT, SV_AMMO_NORMAL },
1244 { TV_BOLT, SV_AMMO_NORMAL },
1245 { TV_BOW, SV_LIGHT_XBOW },
1247 { TV_ARROW, SV_AMMO_NORMAL },
1248 { TV_BOLT, SV_AMMO_NORMAL },
1249 { TV_BOW, SV_SHORT_BOW },
1250 { TV_BOW, SV_LIGHT_XBOW },
1252 { TV_SWORD, SV_DAGGER },
1253 { TV_SWORD, SV_TANTO },
1254 { TV_SWORD, SV_RAPIER },
1255 { TV_SWORD, SV_SMALL_SWORD },
1257 { TV_SWORD, SV_SHORT_SWORD },
1258 { TV_SWORD, SV_LONG_SWORD },
1259 { TV_SWORD, SV_SCIMITAR },
1260 { TV_SWORD, SV_BROAD_SWORD },
1262 { TV_HISSATSU_BOOK, 0 },
1263 { TV_HISSATSU_BOOK, 0 },
1264 { TV_HISSATSU_BOOK, 1 },
1265 { TV_HISSATSU_BOOK, 1 },
1271 { TV_HAFTED, SV_NUNCHAKU },
1272 { TV_HAFTED, SV_QUARTERSTAFF },
1273 { TV_HAFTED, SV_MACE },
1274 { TV_HAFTED, SV_BO_STAFF },
1276 { TV_HAFTED, SV_WAR_HAMMER },
1277 { TV_HAFTED, SV_WAR_HAMMER },
1278 { TV_HAFTED, SV_MORNING_STAR },
1279 { TV_HAFTED, SV_FLAIL },
1281 { TV_HAFTED, SV_LEAD_FILLED_MACE },
1282 { TV_SCROLL, SV_SCROLL_REMOVE_CURSE },
1283 { TV_SCROLL, SV_SCROLL_BLESSING },
1284 { TV_SCROLL, SV_SCROLL_HOLY_CHANT },
1286 { TV_POTION, SV_POTION_HEROISM },
1287 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1288 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1289 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1291 { TV_POTION, SV_POTION_CURE_LIGHT },
1292 { TV_POTION, SV_POTION_CURE_SERIOUS },
1293 { TV_POTION, SV_POTION_CURE_SERIOUS },
1294 { TV_POTION, SV_POTION_CURE_CRITICAL },
1296 { TV_POTION, SV_POTION_CURE_CRITICAL },
1297 { TV_POTION, SV_POTION_RESTORE_EXP },
1298 { TV_POTION, SV_POTION_RESTORE_EXP },
1299 { TV_POTION, SV_POTION_RESTORE_EXP },
1301 { TV_LIFE_BOOK, 0 },
1302 { TV_LIFE_BOOK, 0 },
1303 { TV_LIFE_BOOK, 1 },
1304 { TV_LIFE_BOOK, 1 },
1306 { TV_CRUSADE_BOOK, 0 },
1307 { TV_CRUSADE_BOOK, 0 },
1308 { TV_CRUSADE_BOOK, 1 },
1309 { TV_CRUSADE_BOOK, 1 },
1311 { TV_HAFTED, SV_WHIP },
1312 { TV_HAFTED, SV_MACE },
1313 { TV_HAFTED, SV_BALL_AND_CHAIN },
1314 { TV_HAFTED, SV_WAR_HAMMER },
1316 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1317 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1318 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1319 { TV_POTION, SV_POTION_CURE_CRITICAL },
1321 { TV_POTION, SV_POTION_CURE_CRITICAL },
1322 { TV_POTION, SV_POTION_RESTORE_EXP },
1325 { TV_STATUE, SV_ANY },
1327 { TV_SCROLL, SV_SCROLL_REMOVE_CURSE },
1328 { TV_SCROLL, SV_SCROLL_REMOVE_CURSE },
1329 { TV_SCROLL, SV_SCROLL_STAR_REMOVE_CURSE },
1330 { TV_SCROLL, SV_SCROLL_STAR_REMOVE_CURSE }
1336 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_HIT },
1337 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_DAM },
1338 { TV_SCROLL, SV_SCROLL_ENCHANT_ARMOR },
1339 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1341 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1342 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1343 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1344 { TV_SCROLL, SV_SCROLL_LIGHT },
1346 { TV_SCROLL, SV_SCROLL_PHASE_DOOR },
1347 { TV_SCROLL, SV_SCROLL_PHASE_DOOR },
1348 { TV_SCROLL, SV_SCROLL_TELEPORT },
1349 { TV_SCROLL, SV_SCROLL_MONSTER_CONFUSION },
1351 { TV_SCROLL, SV_SCROLL_MAPPING },
1352 { TV_SCROLL, SV_SCROLL_DETECT_GOLD },
1353 { TV_SCROLL, SV_SCROLL_DETECT_ITEM },
1354 { TV_SCROLL, SV_SCROLL_DETECT_TRAP },
1356 { TV_SCROLL, SV_SCROLL_DETECT_INVIS },
1357 { TV_SCROLL, SV_SCROLL_RECHARGING },
1358 { TV_SCROLL, SV_SCROLL_TELEPORT },
1359 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1361 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1362 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1363 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1364 { TV_SCROLL, SV_SCROLL_TELEPORT },
1366 { TV_SCROLL, SV_SCROLL_TELEPORT },
1367 { TV_POTION, SV_POTION_RES_STR },
1368 { TV_POTION, SV_POTION_RES_INT },
1369 { TV_POTION, SV_POTION_RES_WIS },
1371 { TV_POTION, SV_POTION_RES_DEX },
1372 { TV_POTION, SV_POTION_RES_CON },
1373 { TV_POTION, SV_POTION_RES_CHR },
1374 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1376 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1377 { TV_SCROLL, SV_SCROLL_STAR_IDENTIFY }, /* Yep, occasionally! */
1378 { TV_SCROLL, SV_SCROLL_STAR_IDENTIFY },
1379 { TV_SCROLL, SV_SCROLL_LIGHT },
1381 { TV_POTION, SV_POTION_RES_STR },
1382 { TV_POTION, SV_POTION_RES_INT },
1383 { TV_POTION, SV_POTION_RES_WIS },
1384 { TV_POTION, SV_POTION_RES_DEX },
1386 { TV_POTION, SV_POTION_RES_CON },
1387 { TV_POTION, SV_POTION_RES_CHR },
1388 { TV_SCROLL, SV_SCROLL_ENCHANT_ARMOR },
1389 { TV_SCROLL, SV_SCROLL_ENCHANT_ARMOR },
1391 { TV_SCROLL, SV_SCROLL_RECHARGING },
1392 { TV_SCROLL, SV_SCROLL_PHASE_DOOR },
1393 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_HIT },
1394 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_DAM },
1399 /* Magic-User store */
1401 { TV_RING, SV_RING_PROTECTION },
1402 { TV_RING, SV_RING_LEVITATION_FALL },
1403 { TV_RING, SV_RING_PROTECTION },
1404 { TV_RING, SV_RING_RESIST_FIRE },
1406 { TV_RING, SV_RING_RESIST_COLD },
1407 { TV_AMULET, SV_AMULET_CHARISMA },
1408 { TV_RING, SV_RING_WARNING },
1409 { TV_AMULET, SV_AMULET_RESIST_ACID },
1411 { TV_AMULET, SV_AMULET_SEARCHING },
1412 { TV_WAND, SV_WAND_SLOW_MONSTER },
1413 { TV_WAND, SV_WAND_CONFUSE_MONSTER },
1414 { TV_WAND, SV_WAND_SLEEP_MONSTER },
1416 { TV_WAND, SV_WAND_MAGIC_MISSILE },
1417 { TV_WAND, SV_WAND_STINKING_CLOUD },
1418 { TV_WAND, SV_WAND_WONDER },
1419 { TV_WAND, SV_WAND_DISARMING },
1421 { TV_STAFF, SV_STAFF_LITE },
1422 { TV_STAFF, SV_STAFF_MAPPING },
1423 { TV_STAFF, SV_STAFF_DETECT_TRAP },
1424 { TV_STAFF, SV_STAFF_DETECT_DOOR },
1426 { TV_STAFF, SV_STAFF_DETECT_GOLD },
1427 { TV_STAFF, SV_STAFF_DETECT_ITEM },
1428 { TV_STAFF, SV_STAFF_DETECT_INVIS },
1429 { TV_STAFF, SV_STAFF_DETECT_EVIL },
1431 { TV_STAFF, SV_STAFF_TELEPORTATION },
1432 { TV_STAFF, SV_STAFF_TELEPORTATION },
1433 { TV_STAFF, SV_STAFF_TELEPORTATION },
1434 { TV_STAFF, SV_STAFF_TELEPORTATION },
1436 { TV_STAFF, SV_STAFF_IDENTIFY },
1437 { TV_STAFF, SV_STAFF_IDENTIFY },
1438 { TV_STAFF, SV_STAFF_IDENTIFY },
1440 { TV_STAFF, SV_STAFF_IDENTIFY },
1441 { TV_STAFF, SV_STAFF_REMOVE_CURSE },
1442 { TV_STAFF, SV_STAFF_CURE_LIGHT },
1443 { TV_STAFF, SV_STAFF_PROBING },
1447 { TV_SORCERY_BOOK, 0 },
1448 { TV_SORCERY_BOOK, 0 },
1449 { TV_SORCERY_BOOK, 1 },
1450 { TV_SORCERY_BOOK, 1 },
1452 { TV_ARCANE_BOOK, 0 },
1453 { TV_ARCANE_BOOK, 0 },
1454 { TV_ARCANE_BOOK, 1 },
1455 { TV_ARCANE_BOOK, 1 },
1457 { TV_ARCANE_BOOK, 2 },
1458 { TV_ARCANE_BOOK, 2 },
1459 { TV_ARCANE_BOOK, 3 },
1460 { TV_ARCANE_BOOK, 3 },
1465 /* Black Market (unused) */
1538 { TV_SORCERY_BOOK, 0 },
1539 { TV_SORCERY_BOOK, 0 },
1540 { TV_SORCERY_BOOK, 1 },
1541 { TV_SORCERY_BOOK, 1 },
1543 { TV_NATURE_BOOK, 0 },
1544 { TV_NATURE_BOOK, 0 },
1545 { TV_NATURE_BOOK, 1 },
1546 { TV_NATURE_BOOK, 1 },
1548 { TV_CHAOS_BOOK, 0 },
1549 { TV_CHAOS_BOOK, 0 },
1550 { TV_CHAOS_BOOK, 1 },
1551 { TV_CHAOS_BOOK, 1 },
1553 { TV_DEATH_BOOK, 0 },
1554 { TV_DEATH_BOOK, 0 },
1555 { TV_DEATH_BOOK, 1 },
1556 { TV_DEATH_BOOK, 1 },
1558 { TV_TRUMP_BOOK, 0 }, /* +16 */
1559 { TV_TRUMP_BOOK, 0 },
1560 { TV_TRUMP_BOOK, 1 },
1561 { TV_TRUMP_BOOK, 1 },
1563 { TV_ARCANE_BOOK, 0 },
1564 { TV_ARCANE_BOOK, 1 },
1565 { TV_ARCANE_BOOK, 2 },
1566 { TV_ARCANE_BOOK, 3 },
1568 { TV_CRAFT_BOOK, 0 },
1569 { TV_CRAFT_BOOK, 0 },
1570 { TV_CRAFT_BOOK, 1 },
1571 { TV_CRAFT_BOOK, 1 },
1573 { TV_DAEMON_BOOK, 0 },
1574 { TV_DAEMON_BOOK, 0 },
1575 { TV_DAEMON_BOOK, 1 },
1576 { TV_DAEMON_BOOK, 1 },
1578 { TV_MUSIC_BOOK, 0 },
1579 { TV_MUSIC_BOOK, 0 },
1580 { TV_MUSIC_BOOK, 1 },
1581 { TV_MUSIC_BOOK, 1 },
1590 /* Museum (unused) */
1629 * @brief 取引成功時の店主のメッセージ処理 /
1630 * Successful haggle.
1633 static void say_comment_1(void)
1636 /* ブラックマーケットのときは別のメッセージを出す */
1637 if ( cur_store_num == STORE_BLACK ) {
1638 msg_print(comment_1_B[randint0(MAX_COMMENT_1)]);
1641 msg_print(comment_1[randint0(MAX_COMMENT_1)]);
1644 msg_print(comment_1[randint0(MAX_COMMENT_1)]);
1648 if (one_in_(RUMOR_CHANCE))
1651 msg_print("店主は耳うちした:");
1653 msg_print("The shopkeeper whispers something into your ear:");
1655 display_rumor(TRUE);
1661 * @brief プレイヤーがアイテムを買う時の価格代案メッセージ処理 /
1662 * Continue haggling (player is buying)
1663 * @param value 店主の提示価格
1664 * @param annoyed 店主のいらつき度
1667 static void say_comment_2(PRICE value, int annoyed)
1671 /* Prepare a string to insert */
1672 sprintf(tmp_val, "%ld", (long)value);
1677 /* Formatted message */
1678 msg_format(comment_2a[randint0(MAX_COMMENT_2A)], tmp_val);
1684 /* Formatted message */
1686 /* ブラックマーケットの時は別のメッセージを出す */
1687 if ( cur_store_num == STORE_BLACK ){
1688 msg_format(comment_2b_B[randint0(MAX_COMMENT_2B)], tmp_val);
1691 msg_format(comment_2b[randint0(MAX_COMMENT_2B)], tmp_val);
1694 msg_format(comment_2b[randint0(MAX_COMMENT_2B)], tmp_val);
1702 * @brief プレイヤーがアイテムを売る時の価格代案メッセージ処理 /
1703 * Continue haggling (player is selling)
1704 * @param value 店主の提示価格
1705 * @param annoyed 店主のいらつき度
1708 static void say_comment_3(PRICE value, int annoyed)
1712 /* Prepare a string to insert */
1713 sprintf(tmp_val, "%ld", (long)value);
1718 /* Formatted message */
1719 msg_format(comment_3a[randint0(MAX_COMMENT_3A)], tmp_val);
1725 /* Formatted message */
1727 /* ブラックマーケットの時は別のメッセージを出す */
1728 if ( cur_store_num == STORE_BLACK ){
1729 msg_format(comment_3b_B[randint0(MAX_COMMENT_3B)], tmp_val);
1732 msg_format(comment_3b[randint0(MAX_COMMENT_3B)], tmp_val);
1735 msg_format(comment_3b[randint0(MAX_COMMENT_3B)], tmp_val);
1743 * @brief 店主がプレイヤーを追い出す時のメッセージ処理 /
1744 * Kick 'da bum out. -RAK-
1747 static void say_comment_4(void)
1750 /* ブラックマーケットの時は別のメッセージを出す */
1751 if ( cur_store_num == STORE_BLACK ){
1752 msg_print(comment_4a_B[randint0(MAX_COMMENT_4A)]);
1753 msg_print(comment_4b_B[randint0(MAX_COMMENT_4B)]);
1756 msg_print(comment_4a[randint0(MAX_COMMENT_4A)]);
1757 msg_print(comment_4b[randint0(MAX_COMMENT_4B)]);
1760 msg_print(comment_4a[randint0(MAX_COMMENT_4A)]);
1761 msg_print(comment_4b[randint0(MAX_COMMENT_4B)]);
1768 * @brief 店主がプレイヤーに取り合わない時のメッセージ処理 /
1769 * You are insulting me
1772 static void say_comment_5(void)
1775 /* ブラックマーケットの時は別のメッセージを出す */
1776 if ( cur_store_num == STORE_BLACK ){
1777 msg_print(comment_5_B[randint0(MAX_COMMENT_5)]);
1780 msg_print(comment_5[randint0(MAX_COMMENT_5)]);
1783 msg_print(comment_5[randint0(MAX_COMMENT_5)]);
1790 * @brief 店主がプレイヤーの提示を理解できなかった時のメッセージ処理 /
1791 * That makes no sense.
1794 static void say_comment_6(void)
1796 msg_print(comment_6[randint0(MAX_COMMENT_6)]);
1800 #define MAX_COMMENT_7A 4
1802 static concptr comment_7a[MAX_COMMENT_7A] =
1807 "誰かがむせび泣く声が聞こえる...。",
1812 "You hear someone sobbing...",
1813 "The shopkeeper howls in agony!"
1818 #define MAX_COMMENT_7B 4
1820 static concptr comment_7b[MAX_COMMENT_7B] =
1830 "The shopkeeper curses at you.",
1831 "The shopkeeper glares at you."
1836 #define MAX_COMMENT_7C 4
1838 static concptr comment_7c[MAX_COMMENT_7C] =
1847 "You've made my day!",
1848 "The shopkeeper giggles.",
1849 "The shopkeeper laughs loudly."
1854 #define MAX_COMMENT_7D 4
1856 static concptr comment_7d[MAX_COMMENT_7D] =
1860 "こんなおいしい思いをしたら、真面目に働けなくなるなぁ。",
1865 "I think I'll retire!",
1866 "The shopkeeper jumps for joy.",
1867 "The shopkeeper smiles gleefully."
1874 * @brief 店主が交渉を終えた際の反応を返す処理 /
1875 * Let a shop-keeper React to a purchase
1876 * @param price アイテムの取引額
1877 * @param value アイテムの実際価値
1878 * @param guess 店主が当初予想していた価値
1881 * We paid "price", it was worth "value", and we thought it was worth "guess"
1883 static void purchase_analyze(PRICE price, PRICE value, PRICE guess)
1885 /* Item was worthless, but we bought it */
1886 if ((value <= 0) && (price > value))
1888 msg_print(comment_7a[randint0(MAX_COMMENT_7A)]);
1889 chg_virtue(V_HONOUR, -1);
1890 chg_virtue(V_JUSTICE, -1);
1891 sound(SOUND_STORE1);
1894 /* Item was cheaper than we thought, and we paid more than necessary */
1895 else if ((value < guess) && (price > value))
1897 msg_print(comment_7b[randint0(MAX_COMMENT_7B)]);
1898 chg_virtue(V_JUSTICE, -1);
1899 if (one_in_(4)) chg_virtue(V_HONOUR, -1);
1900 sound(SOUND_STORE2);
1903 /* Item was a good bargain, and we got away with it */
1904 else if ((value > guess) && (value < (4 * guess)) && (price < value))
1906 msg_print(comment_7c[randint0(MAX_COMMENT_7C)]);
1907 if (one_in_(4)) chg_virtue(V_HONOUR, -1);
1908 else if (one_in_(4)) chg_virtue(V_HONOUR, 1);
1909 sound(SOUND_STORE3);
1912 /* Item was a great bargain, and we got away with it */
1913 else if ((value > guess) && (price < value))
1915 msg_print(comment_7d[randint0(MAX_COMMENT_7D)]);
1916 if (one_in_(2)) chg_virtue(V_HONOUR, -1);
1917 if (one_in_(4)) chg_virtue(V_HONOUR, 1);
1918 if (10 * price < value) chg_virtue(V_SACRIFICE, 1);
1919 sound(SOUND_STORE4);
1926 * We store the current "store feat" here so everyone can access it
1928 static int cur_store_feat;
1932 * Buying and selling adjustments for race combinations.
1933 * Entry[owner][player] gives the basic "cost inflation".
1935 static byte rgold_adj[MAX_RACES][MAX_RACES] =
1937 /*Hum, HfE, Elf, Hal, Gno, Dwa, HfO, HfT, Dun, HiE, Barbarian,
1938 HfOg, HGn, HTn, Cyc, Yek, Klc, Kbd, Nbl, DkE, Drc, Mind Flayer,
1939 Imp, Glm, Skl, Zombie, Vampire, Spectre, Fairy, Beastman, Ent,
1940 Angel, Demon, Kutar, Android, Merfolk */
1943 { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
1944 124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
1945 115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
1946 100, 120, 110, 105, 110 },
1949 { 110, 100, 100, 105, 110, 120, 125, 130, 110, 100, 110,
1950 120, 115, 108, 115, 110, 110, 120, 120, 115, 115, 110,
1951 120, 110, 110, 110, 120, 110, 100, 125, 100, 95, 140,
1952 110, 115, 110, 110, 110 },
1955 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
1956 120, 120, 105, 120, 110, 105, 125, 125, 110, 115, 108,
1957 120, 115, 110, 110, 120, 110, 100, 125, 100, 95, 140,
1958 110, 110, 105, 110, 110 },
1961 { 115, 110, 105, 95, 105, 110, 115, 130, 115, 105, 115,
1962 125, 120, 120, 125, 115, 110, 120, 120, 120, 115, 115,
1963 120, 110, 120, 120, 130, 110, 110, 130, 110, 95, 140,
1964 115, 120, 105, 115, 105 },
1967 { 115, 115, 110, 105, 95, 110, 115, 130, 115, 110, 115,
1968 120, 125, 110, 120, 110, 105, 120, 110, 110, 105, 110,
1969 120, 101, 110, 110, 120, 120, 115, 130, 115, 95, 140,
1970 115, 110, 110, 115, 110 },
1973 { 115, 120, 120, 110, 110, 95, 125, 135, 115, 120, 115,
1974 125, 140, 130, 130, 120, 115, 115, 115, 135, 125, 120,
1975 120, 105, 115, 115, 115, 115, 120, 130, 120, 95, 140,
1976 115, 110, 115, 115, 120 },
1979 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
1980 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
1981 115, 125, 120, 120, 115, 120, 125, 115, 125, 95, 140,
1982 115, 110, 115, 115, 125 },
1985 { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
1986 110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
1987 110, 115, 112, 112, 115, 112, 120, 110, 120, 95, 140,
1988 110, 110, 115, 110, 130 },
1991 { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
1992 120, 120, 105, 120, 115, 105, 115, 120, 110, 105, 105,
1993 120, 105, 120, 120, 125, 120, 105, 135, 105, 95, 140,
1994 100, 110, 110, 100, 110 },
1997 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
1998 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
1999 125, 115, 120, 120, 125, 120, 100, 125, 100, 95, 140,
2000 110, 110, 105, 110, 110 },
2002 /* Human / Barbarian (copied from human) */
2003 { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
2004 124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
2005 115, 105, 125, 125, 130, 125, 115, 120, 115, 95, 140,
2006 100, 120, 110, 100, 110 },
2008 /* Half-Ogre: theoretical, copied from half-troll */
2009 { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
2010 110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
2011 110, 115, 112, 112, 115, 112, 120, 110, 120, 95, 140,
2012 110, 110, 115, 110, 120 },
2014 /* Half-Giant: 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, 130, 120, 130, 95, 140,
2018 110, 110, 115, 110, 115 },
2020 /* Half-Titan: theoretical, copied from High_Elf */
2021 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2022 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2023 125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2024 110, 110, 115, 110, 108 },
2026 /* Cyclops: theoretical, copied from half-troll */
2027 { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
2028 110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
2029 110, 115, 112, 112, 115, 112, 130, 130, 130, 95, 140,
2030 110, 110, 115, 110, 115 },
2032 /* Yeek: theoretical, copied from Half-Orc */
2033 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2034 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2035 115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2036 115, 110, 115, 115, 110 },
2038 /* Klackon: theoretical, copied from Gnome */
2039 { 115, 115, 110, 105, 95, 110, 115, 130, 115, 110, 115,
2040 120, 125, 110, 120, 110, 105, 120, 110, 110, 105, 110,
2041 120, 101, 110, 110, 120, 120, 130, 130, 130, 95, 140,
2042 115, 110, 115, 115, 110 },
2044 /* Kobold: theoretical, copied from Half-Orc */
2045 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2046 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2047 115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2048 115, 110, 115, 115, 120 },
2050 /* Nibelung: theoretical, copied from Dwarf */
2051 { 115, 120, 120, 110, 110, 95, 125, 135, 115, 120, 115,
2052 125, 140, 130, 130, 120, 115, 115, 115, 135, 125, 120,
2053 120, 105, 115, 115, 120, 120, 130, 130, 130, 95, 140,
2054 115, 135, 115, 115, 120 },
2057 { 110, 110, 110, 115, 120, 130, 115, 115, 120, 110, 115,
2058 115, 115, 116, 115, 120, 120, 115, 115, 101, 110, 110,
2059 110, 110, 112, 122, 110, 110, 110, 115, 110, 120, 120,
2060 110, 101, 115, 110, 115 },
2062 /* Draconian: theoretical, copied from High_Elf */
2063 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2064 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2065 125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2066 110, 110, 115, 110, 115 },
2068 /* Mind Flayer: 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, 110 },
2074 /* Imp: 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, 120, 120,
2078 110, 110, 115, 110, 120 },
2080 /* Golem: 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, 95, 140,
2084 110, 110, 115, 110, 110 },
2086 /* Skeleton: theoretical, copied from half-orc */
2087 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2088 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2089 115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
2090 115, 110, 125, 115, 110 },
2092 /* Zombie: 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 /* Vampire: 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, 120 },
2104 /* Spectre: 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, 110 },
2110 /* Sprite: 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, 95, 140,
2114 115, 110, 105, 115, 110 },
2116 /* Beastman: 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, 115, 115, 125 },
2123 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2124 120, 120, 105, 120, 110, 105, 125, 125, 110, 115, 108,
2125 120, 115, 110, 110, 120, 110, 100, 125, 100, 95, 140,
2126 110, 110, 105, 110, 110 },
2129 { 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
2130 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
2131 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 160,
2132 95, 95, 95, 95, 95 },
2135 { 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
2136 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
2137 140, 140, 140, 140, 140, 140, 140, 140, 140, 160, 120,
2138 140, 140, 140, 140, 140 },
2141 { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
2142 124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
2143 115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
2144 100, 120, 110, 100, 110 },
2147 { 110, 110, 110, 115, 120, 130, 115, 115, 120, 110, 115,
2148 115, 115, 116, 115, 120, 120, 115, 115, 101, 110, 110,
2149 110, 110, 112, 122, 110, 110, 110, 115, 110, 120, 120,
2150 110, 101, 115, 110, 115 },
2153 { 110, 110, 105, 105, 110, 115, 115, 115, 110, 105, 110,
2154 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
2155 115, 115, 125, 125, 125, 125, 105, 115, 105, 95, 140,
2156 110, 115, 100, 110, 110 },
2159 { 105, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
2160 124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
2161 115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
2162 100, 120, 110, 100, 110 },
2165 { 110, 110, 110, 105, 110, 120, 125, 130, 110, 110, 110,
2166 120, 115, 108, 115, 110, 110, 120, 120, 115, 115, 110,
2167 120, 110, 110, 110, 120, 110, 110, 125, 110, 95, 140,
2168 110, 115, 110, 110, 100 },
2174 * @brief 店舗価格を決定する /
2175 * Determine the price of an item (qty one) in a store.
2176 * @param o_ptr 店舗に並べるオブジェクト構造体の参照ポインタ
2177 * @param greed 店主の強欲度
2178 * @param flip TRUEならば店主にとっての買取価格、FALSEなら売出価格を計算
2182 * This function takes into account the player's charisma, and the
2183 * shop-keepers friendliness, and the shop-keeper's base greed, but
2184 * never lets a shop-keeper lose money in a transaction.
2185 * The "greed" value should exceed 100 when the player is "buying" the
2186 * item, and should be less than 100 when the player is "selling" it.
2187 * Hack -- the black market always charges twice as much as it should.
2188 * Charisma adjustment runs from 80 to 130
2189 * Racial adjustment runs from 95 to 130
2190 * Since greed/charisma/racial adjustments are centered at 100, we need
2191 * to adjust (by 200) to extract a usable multiplier. Note that the
2192 * "greed" value is always something (?).
2195 static s32b price_item(object_type *o_ptr, int greed, bool flip)
2202 /* Get the value of one of the items */
2203 price = object_value(o_ptr);
2205 /* Worthless items */
2206 if (price <= 0) return (0L);
2209 /* Compute the racial factor */
2210 factor = rgold_adj[ot_ptr->owner_race][p_ptr->prace];
2212 /* Add in the charisma factor */
2213 factor += adj_chr_gold[p_ptr->stat_ind[A_CHR]];
2216 /* Shop is buying */
2219 /* Adjust for greed */
2220 adjust = 100 + (300 - (greed + factor));
2222 /* Never get "silly" */
2223 if (adjust > 100) adjust = 100;
2225 /* Mega-Hack -- Black market sucks */
2226 if (cur_store_num == STORE_BLACK)
2229 /* Compute the final price (with rounding) */
2230 /* Hack -- prevent underflow */
2231 price = (price * adjust + 50L) / 100L;
2234 /* Shop is selling */
2237 /* Adjust for greed */
2238 adjust = 100 + ((greed + factor) - 300);
2240 /* Never get "silly" */
2241 if (adjust < 100) adjust = 100;
2243 /* Mega-Hack -- Black market sucks */
2244 if (cur_store_num == STORE_BLACK)
2247 /* Compute the final price (with rounding) */
2248 /* Hack -- prevent overflow */
2249 price = (s32b)(((u32b)price * (u32b)adjust + 50UL) / 100UL);
2252 /* Note -- Never become "free" */
2253 if (price <= 0L) return (1L);
2255 /* Return the price */
2261 * @brief 安価な消耗品の販売数を増やし、低確率で割引にする /
2262 * Certain "cheap" objects should be created in "piles"
2263 * @param o_ptr 店舗に並べるオブジェクト構造体の参照ポインタ
2267 * Some objects can be sold at a "discount" (in small piles)
2270 static void mass_produce(object_type *o_ptr)
2273 DISCOUNT_RATE discount = 0;
2275 PRICE cost = object_value(o_ptr);
2278 /* Analyze the type */
2279 switch (o_ptr->tval)
2281 /* Food, Flasks, and Lites */
2286 if (cost <= 5L) size += damroll(3, 5);
2287 if (cost <= 20L) size += damroll(3, 5);
2288 if (cost <= 50L) size += damroll(2, 2);
2295 if (cost <= 60L) size += damroll(3, 5);
2296 if (cost <= 240L) size += damroll(1, 5);
2297 if (o_ptr->sval == SV_SCROLL_STAR_IDENTIFY) size += damroll(3, 5);
2298 if (o_ptr->sval == SV_SCROLL_STAR_REMOVE_CURSE) size += damroll(1, 4);
2303 case TV_SORCERY_BOOK:
2304 case TV_NATURE_BOOK:
2308 case TV_ARCANE_BOOK:
2310 case TV_DAEMON_BOOK:
2311 case TV_CRUSADE_BOOK:
2313 case TV_HISSATSU_BOOK:
2316 if (cost <= 50L) size += damroll(2, 3);
2317 if (cost <= 500L) size += damroll(1, 3);
2335 if (object_is_artifact(o_ptr)) break;
2336 if (object_is_ego(o_ptr)) break;
2337 if (cost <= 10L) size += damroll(3, 5);
2338 if (cost <= 100L) size += damroll(3, 5);
2347 if (cost <= 5L) size += damroll(5, 5);
2348 if (cost <= 50L) size += damroll(5, 5);
2349 if (cost <= 500L) size += damroll(5, 5);
2355 if (cost <= 100L) size += damroll(2, 2);
2356 if (cost <= 1000L) size += damroll(2, 2);
2369 * Because many rods (and a few wands and staffs) are useful mainly
2370 * in quantity, the Black Market will occasionally have a bunch of
2377 if ((cur_store_num == STORE_BLACK) && one_in_(3))
2379 if (cost < 1601L) size += damroll(1, 5);
2380 else if (cost < 3201L) size += damroll(1, 3);
2387 /* Pick a discount */
2392 else if (one_in_(25))
2396 else if (one_in_(150))
2400 else if (one_in_(300))
2404 else if (one_in_(500))
2409 if (o_ptr->art_name)
2414 /* Save the discount */
2415 o_ptr->discount = discount;
2417 /* Save the total pile size */
2418 o_ptr->number = size - (size * discount / 100);
2420 /* Ensure that mass-produced rods and wands get the correct pvals. */
2421 if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
2423 o_ptr->pval *= (PARAMETER_VALUE)o_ptr->number;
2430 * @brief 店舗に並べた品を同一品であるかどうか判定する /
2431 * Determine if a store item can "absorb" another item
2432 * @param o_ptr 判定するオブジェクト構造体の参照ポインタ1
2433 * @param j_ptr 判定するオブジェクト構造体の参照ポインタ2
2434 * @return 同一扱いできるならTRUEを返す
2437 * See "object_similar()" for the same function for the "player"
2440 static bool store_object_similar(object_type *o_ptr, object_type *j_ptr)
2444 /* Hack -- Identical items cannot be stacked */
2445 if (o_ptr == j_ptr) return (0);
2447 /* Different objects cannot be stacked */
2448 if (o_ptr->k_idx != j_ptr->k_idx) return (0);
2450 /* Different charges (etc) cannot be stacked, unless wands or rods. */
2451 if ((o_ptr->pval != j_ptr->pval) && (o_ptr->tval != TV_WAND) && (o_ptr->tval != TV_ROD)) return (0);
2453 /* Require many identical values */
2454 if (o_ptr->to_h != j_ptr->to_h) return (0);
2455 if (o_ptr->to_d != j_ptr->to_d) return (0);
2456 if (o_ptr->to_a != j_ptr->to_a) return (0);
2458 /* Require identical "ego-item" names */
2459 if (o_ptr->name2 != j_ptr->name2) return (0);
2461 /* Artifacts don't stack! */
2462 if (object_is_artifact(o_ptr) || object_is_artifact(j_ptr)) return (0);
2464 /* Hack -- Identical art_flags! */
2465 for (i = 0; i < TR_FLAG_SIZE; i++)
2466 if (o_ptr->art_flags[i] != j_ptr->art_flags[i]) return (0);
2468 /* Hack -- Never stack "powerful" items */
2469 if (o_ptr->xtra1 || j_ptr->xtra1) return (0);
2471 /* Hack -- Never stack recharging items */
2472 if (o_ptr->timeout || j_ptr->timeout) return (0);
2474 /* Require many identical values */
2475 if (o_ptr->ac != j_ptr->ac) return (0);
2476 if (o_ptr->dd != j_ptr->dd) return (0);
2477 if (o_ptr->ds != j_ptr->ds) return (0);
2479 /* Hack -- Never stack chests */
2480 if (o_ptr->tval == TV_CHEST) return (0);
2481 if (o_ptr->tval == TV_STATUE) return (0);
2482 if (o_ptr->tval == TV_CAPTURE) return (0);
2484 /* Require matching discounts */
2485 if (o_ptr->discount != j_ptr->discount) return (0);
2487 /* They match, so they must be similar */
2493 * @brief 店舗に並べた品を重ね合わせできるかどうか判定する /
2494 * Allow a store item to absorb another item
2495 * @param o_ptr 判定するオブジェクト構造体の参照ポインタ1
2496 * @param j_ptr 判定するオブジェクト構造体の参照ポインタ2
2497 * @return 重ね合わせできるならTRUEを返す
2500 * See "object_similar()" for the same function for the "player"
2503 static void store_object_absorb(object_type *o_ptr, object_type *j_ptr)
2505 int max_num = (o_ptr->tval == TV_ROD) ?
2506 MIN(99, MAX_SHORT / k_info[o_ptr->k_idx].pval) : 99;
2507 int total = o_ptr->number + j_ptr->number;
2508 int diff = (total > max_num) ? total - max_num : 0;
2510 /* Combine quantity, lose excess items */
2511 o_ptr->number = (total > max_num) ? max_num : total;
2513 /* Hack -- if rods are stacking, add the pvals (maximum timeouts) together. -LM- */
2514 if (o_ptr->tval == TV_ROD)
2516 o_ptr->pval += j_ptr->pval * (j_ptr->number - diff) / j_ptr->number;
2519 /* Hack -- if wands are stacking, combine the charges. -LM- */
2520 if (o_ptr->tval == TV_WAND)
2522 o_ptr->pval += j_ptr->pval * (j_ptr->number - diff) / j_ptr->number;
2528 * @brief 店舗に品を置くスペースがあるかどうかの判定を返す /
2529 * Check to see if the shop will be carrying too many objects -RAK-
2530 * @param o_ptr 店舗に置きたいオブジェクト構造体の参照ポインタ
2531 * @return 置き場がないなら0、重ね合わせできるアイテムがあるなら-1、スペースがあるなら1を返す。
2534 * Note that the shop, just like a player, will not accept things
2535 * it cannot hold. Before, one could "nuke" potions this way.
2536 * Return value is now int:
2538 * -1 : Can be combined to existing slot.
2539 * 1 : Cannot be combined but there are empty spaces.
2542 static int store_check_num(object_type *o_ptr)
2547 /* The "home" acts like the player */
2548 if ((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM))
2550 bool old_stack_force_notes = stack_force_notes;
2551 bool old_stack_force_costs = stack_force_costs;
2553 if (cur_store_num != STORE_HOME)
2555 stack_force_notes = FALSE;
2556 stack_force_costs = FALSE;
2559 /* Check all the items */
2560 for (i = 0; i < st_ptr->stock_num; i++)
2562 /* Get the existing item */
2563 j_ptr = &st_ptr->stock[i];
2565 /* Can the new object be combined with the old one? */
2566 if (object_similar(j_ptr, o_ptr))
2568 if (cur_store_num != STORE_HOME)
2570 stack_force_notes = old_stack_force_notes;
2571 stack_force_costs = old_stack_force_costs;
2578 if (cur_store_num != STORE_HOME)
2580 stack_force_notes = old_stack_force_notes;
2581 stack_force_costs = old_stack_force_costs;
2585 /* Normal stores do special stuff */
2588 /* Check all the items */
2589 for (i = 0; i < st_ptr->stock_num; i++)
2591 /* Get the existing item */
2592 j_ptr = &st_ptr->stock[i];
2594 /* Can the new object be combined with the old one? */
2595 if (store_object_similar(j_ptr, o_ptr)) return -1;
2599 /* Free space is always usable */
2601 * オプション powerup_home が設定されていると
2604 if ((cur_store_num == STORE_HOME) && ( powerup_home == FALSE )) {
2605 if (st_ptr->stock_num < ((st_ptr->stock_size) / 10)) {
2610 if (st_ptr->stock_num < st_ptr->stock_size) {
2615 /* But there was no room at the inn... */
2620 * @brief オブジェクトが祝福されているかの判定を返す /
2621 * @param o_ptr 判定したいオブジェクト構造体の参照ポインタ
2622 * @return アイテムが祝福されたアイテムならばTRUEを返す
2624 static bool is_blessed(object_type *o_ptr)
2626 BIT_FLAGS flgs[TR_FLAG_SIZE];
2627 object_flags(o_ptr, flgs);
2628 if (have_flag(flgs, TR_BLESSED)) return (TRUE);
2629 else return (FALSE);
2635 * @brief オブジェクトが所定の店舗で引き取れるかどうかを返す /
2636 * Determine if the current store will purchase the given item
2637 * @param o_ptr 判定したいオブジェクト構造体の参照ポインタ
2638 * @return アイテムが買い取れるならばTRUEを返す
2640 * Note that a shop-keeper must refuse to buy "worthless" items
2642 static bool store_will_buy(object_type *o_ptr)
2644 /* Hack -- The Home is simple */
2645 if ((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM)) return (TRUE);
2647 /* Switch on the store */
2648 switch (cur_store_num)
2653 /* Analyze the type */
2654 switch (o_ptr->tval)
2657 if (o_ptr->sval != SV_POTION_WATER) return FALSE;
2669 case TV_BOTTLE: /* 'Green', recycling Angband */
2684 /* Analyze the type */
2685 switch (o_ptr->tval)
2706 /* Analyze the type */
2707 switch (o_ptr->tval)
2716 case TV_HISSATSU_BOOK:
2720 if(o_ptr->sval == SV_WIZSTAFF) return (FALSE);
2732 /* Analyze the type */
2733 switch (o_ptr->tval)
2736 case TV_CRUSADE_BOOK:
2746 monster_race *r_ptr = &r_info[o_ptr->pval];
2749 if (!(r_ptr->flags3 & RF3_EVIL))
2752 if (r_ptr->flags3 & RF3_GOOD) break;
2754 /* Accept animals */
2755 if (r_ptr->flags3 & RF3_ANIMAL) break;
2758 if (my_strchr("?!", r_ptr->d_char)) break;
2764 if (is_blessed(o_ptr)) break;
2773 case STORE_ALCHEMIST:
2775 /* Analyze the type */
2776 switch (o_ptr->tval)
2790 /* Analyze the type */
2791 switch (o_ptr->tval)
2793 case TV_SORCERY_BOOK:
2794 case TV_NATURE_BOOK:
2798 case TV_ARCANE_BOOK:
2800 case TV_DAEMON_BOOK:
2814 if(o_ptr->sval == SV_WIZSTAFF) break;
2815 else return (FALSE);
2822 /* Bookstore Shop */
2825 /* Analyze the type */
2826 switch (o_ptr->tval)
2828 case TV_SORCERY_BOOK:
2829 case TV_NATURE_BOOK:
2834 case TV_ARCANE_BOOK:
2836 case TV_DAEMON_BOOK:
2837 case TV_CRUSADE_BOOK:
2848 /* Ignore "worthless" items */
2849 if (object_value(o_ptr) <= 0) return (FALSE);
2857 * @brief 現在の町の指定された店舗のアイテムを整理する /
2858 * Combine and reorder items in store.
2859 * @param store_num 店舗ID
2860 * @return 実際に整理が行われたならばTRUEを返す。
2862 bool combine_and_reorder_home(int store_num)
2866 object_type forge, *o_ptr, *j_ptr;
2867 bool flag = FALSE, combined;
2868 store_type *old_st_ptr = st_ptr;
2869 bool old_stack_force_notes = stack_force_notes;
2870 bool old_stack_force_costs = stack_force_costs;
2872 st_ptr = &town_info[1].store[store_num];
2873 if (store_num != STORE_HOME)
2875 stack_force_notes = FALSE;
2876 stack_force_costs = FALSE;
2883 /* Combine the items in the home (backwards) */
2884 for (i = st_ptr->stock_num - 1; i > 0; i--)
2886 o_ptr = &st_ptr->stock[i];
2888 /* Skip empty items */
2889 if (!o_ptr->k_idx) continue;
2891 /* Scan the items above that item */
2892 for (j = 0; j < i; j++)
2896 j_ptr = &st_ptr->stock[j];
2898 /* Skip empty items */
2899 if (!j_ptr->k_idx) continue;
2902 * Get maximum number of the stack if these
2903 * are similar, get zero otherwise.
2905 max_num = object_similar_part(j_ptr, o_ptr);
2907 /* Can we (partialy) drop "o_ptr" onto "j_ptr"? */
2908 if (max_num && j_ptr->number < max_num)
2910 if (o_ptr->number + j_ptr->number <= max_num)
2912 /* Add together the item counts */
2913 object_absorb(j_ptr, o_ptr);
2915 /* One object is gone */
2916 st_ptr->stock_num--;
2918 /* Slide everything down */
2919 for (k = i; k < st_ptr->stock_num; k++)
2921 /* Structure copy */
2922 st_ptr->stock[k] = st_ptr->stock[k + 1];
2925 /* Erase the "final" slot */
2926 object_wipe(&st_ptr->stock[k]);
2930 ITEM_NUMBER old_num = o_ptr->number;
2931 ITEM_NUMBER remain = j_ptr->number + o_ptr->number - max_num;
2933 /* Add together the item counts */
2934 object_absorb(j_ptr, o_ptr);
2936 o_ptr->number = remain;
2938 /* Hack -- if rods are stacking, add the pvals (maximum timeouts) and current timeouts together. -LM- */
2939 if (o_ptr->tval == TV_ROD)
2941 o_ptr->pval = o_ptr->pval * remain / old_num;
2942 o_ptr->timeout = o_ptr->timeout * remain / old_num;
2945 /* Hack -- if wands are stacking, combine the charges. -LM- */
2946 else if (o_ptr->tval == TV_WAND)
2948 o_ptr->pval = o_ptr->pval * remain / old_num;
2963 /* Re-order the items in the home (forwards) */
2964 for (i = 0; i < st_ptr->stock_num; i++)
2966 o_ptr = &st_ptr->stock[i];
2968 /* Skip empty slots */
2969 if (!o_ptr->k_idx) continue;
2971 /* Get the "value" of the item */
2972 o_value = object_value(o_ptr);
2974 /* Scan every occupied slot */
2975 for (j = 0; j < st_ptr->stock_num; j++)
2977 if (object_sort_comp(o_ptr, o_value, &st_ptr->stock[j])) break;
2980 /* Never move down */
2981 if (j >= i) continue;
2987 /* Save a copy of the moving item */
2988 object_copy(j_ptr, &st_ptr->stock[i]);
2990 /* Slide the objects */
2991 for (k = i; k > j; k--)
2993 /* Slide the item */
2994 object_copy(&st_ptr->stock[k], &st_ptr->stock[k - 1]);
2997 /* Insert the moving item */
2998 object_copy(&st_ptr->stock[j], j_ptr);
3001 st_ptr = old_st_ptr;
3002 if (store_num != STORE_HOME)
3004 stack_force_notes = old_stack_force_notes;
3005 stack_force_costs = old_stack_force_costs;
3013 * @brief 我が家にオブジェクトを加える /
3014 * Add the item "o_ptr" to the p_ptr->inventory_list of the "Home"
3015 * @param o_ptr 加えたいオブジェクトの構造体参照ポインタ
3019 * In all cases, return the slot (or -1) where the object was placed
3020 * Note that this is a hacked up version of "inven_carry()".
3021 * Also note that it may not correctly "adapt" to "knowledge" bacoming
3022 * known, the player may have to pick stuff up and drop it again.
3025 static int home_carry(object_type *o_ptr)
3031 bool old_stack_force_notes = stack_force_notes;
3032 bool old_stack_force_costs = stack_force_costs;
3034 if (cur_store_num != STORE_HOME)
3036 stack_force_notes = FALSE;
3037 stack_force_costs = FALSE;
3040 /* Check each existing item (try to combine) */
3041 for (slot = 0; slot < st_ptr->stock_num; slot++)
3043 /* Get the existing item */
3044 j_ptr = &st_ptr->stock[slot];
3046 /* The home acts just like the player */
3047 if (object_similar(j_ptr, o_ptr))
3049 /* Save the new number of items */
3050 object_absorb(j_ptr, o_ptr);
3052 if (cur_store_num != STORE_HOME)
3054 stack_force_notes = old_stack_force_notes;
3055 stack_force_costs = old_stack_force_costs;
3063 if (cur_store_num != STORE_HOME)
3065 stack_force_notes = old_stack_force_notes;
3066 stack_force_costs = old_stack_force_costs;
3071 * 隠し機能: オプション powerup_home が設定されていると
3075 if ((cur_store_num != STORE_HOME) || (powerup_home == TRUE)) {
3076 if (st_ptr->stock_num >= st_ptr->stock_size) {
3081 if (st_ptr->stock_num >= ((st_ptr->stock_size) / 10)) {
3087 /* Determine the "value" of the item */
3088 value = object_value(o_ptr);
3090 /* Check existing slots to see if we must "slide" */
3091 for (slot = 0; slot < st_ptr->stock_num; slot++)
3093 if (object_sort_comp(o_ptr, value, &st_ptr->stock[slot])) break;
3096 /* Slide the others up */
3097 for (i = st_ptr->stock_num; i > slot; i--)
3099 st_ptr->stock[i] = st_ptr->stock[i-1];
3102 /* More stuff now */
3103 st_ptr->stock_num++;
3105 /* Insert the new item */
3106 st_ptr->stock[slot] = *o_ptr;
3108 chg_virtue(V_SACRIFICE, -1);
3110 (void)combine_and_reorder_home(cur_store_num);
3112 /* Return the location */
3118 * @brief 店舗にオブジェクトを加える /
3119 * Add the item "o_ptr" to a real stores p_ptr->inventory_list.
3120 * @param o_ptr 加えたいオブジェクトの構造体参照ポインタ
3124 * In all cases, return the slot (or -1) where the object was placed
3125 * Note that this is a hacked up version of "inven_carry()".
3126 * Also note that it may not correctly "adapt" to "knowledge" bacoming
3127 * known, the player may have to pick stuff up and drop it again.
3130 static int store_carry(object_type *o_ptr)
3133 PRICE value, j_value;
3137 /* Evaluate the object */
3138 value = object_value(o_ptr);
3140 /* Cursed/Worthless items "disappear" when sold */
3141 if (value <= 0) return (-1);
3143 /* All store items are fully *identified* */
3144 o_ptr->ident |= IDENT_MENTAL;
3146 /* Erase the inscription */
3147 o_ptr->inscription = 0;
3149 /* Erase the "feeling" */
3150 o_ptr->feeling = FEEL_NONE;
3152 /* Check each existing item (try to combine) */
3153 for (slot = 0; slot < st_ptr->stock_num; slot++)
3155 /* Get the existing item */
3156 j_ptr = &st_ptr->stock[slot];
3158 /* Can the existing items be incremented? */
3159 if (store_object_similar(j_ptr, o_ptr))
3161 /* Hack -- extra items disappear */
3162 store_object_absorb(j_ptr, o_ptr);
3170 if (st_ptr->stock_num >= st_ptr->stock_size) return (-1);
3173 /* Check existing slots to see if we must "slide" */
3174 for (slot = 0; slot < st_ptr->stock_num; slot++)
3177 j_ptr = &st_ptr->stock[slot];
3179 /* Objects sort by decreasing type */
3180 if (o_ptr->tval > j_ptr->tval) break;
3181 if (o_ptr->tval < j_ptr->tval) continue;
3183 /* Objects sort by increasing sval */
3184 if (o_ptr->sval < j_ptr->sval) break;
3185 if (o_ptr->sval > j_ptr->sval) continue;
3188 * Hack: otherwise identical rods sort by
3189 * increasing recharge time --dsb
3191 if (o_ptr->tval == TV_ROD)
3193 if (o_ptr->pval < j_ptr->pval) break;
3194 if (o_ptr->pval > j_ptr->pval) continue;
3197 /* Evaluate that slot */
3198 j_value = object_value(j_ptr);
3200 /* Objects sort by decreasing value */
3201 if (value > j_value) break;
3202 if (value < j_value) continue;
3205 /* Slide the others up */
3206 for (i = st_ptr->stock_num; i > slot; i--)
3208 st_ptr->stock[i] = st_ptr->stock[i-1];
3211 /* More stuff now */
3212 st_ptr->stock_num++;
3214 /* Insert the new item */
3215 st_ptr->stock[slot] = *o_ptr;
3217 /* Return the location */
3223 * @brief 店舗のオブジェクト数を増やす /
3224 * Add the item "o_ptr" to a real stores p_ptr->inventory_list.
3225 * @param item 増やしたいアイテムのID
3230 * Increase, by a given amount, the number of a certain item
3231 * in a certain store. This can result in zero items.
3233 * @todo numは本来ITEM_NUMBER型にしたい。
3235 static void store_item_increase(INVENTORY_IDX item, int num)
3240 o_ptr = &st_ptr->stock[item];
3242 /* Verify the number */
3243 cnt = o_ptr->number + num;
3244 if (cnt > 255) cnt = 255;
3245 else if (cnt < 0) cnt = 0;
3246 num = cnt - o_ptr->number;
3248 /* Save the new number */
3249 o_ptr->number += (ITEM_NUMBER)num;
3254 * @brief 店舗のオブジェクト数を削除する /
3255 * Remove a slot if it is empty
3256 * @param item 削除したいアイテムのID
3259 static void store_item_optimize(INVENTORY_IDX item)
3264 o_ptr = &st_ptr->stock[item];
3267 if (!o_ptr->k_idx) return;
3269 /* Must have no items */
3270 if (o_ptr->number) return;
3273 st_ptr->stock_num--;
3275 /* Slide everyone */
3276 for (j = item; j < st_ptr->stock_num; j++)
3278 st_ptr->stock[j] = st_ptr->stock[j + 1];
3281 /* Nuke the final slot */
3282 object_wipe(&st_ptr->stock[j]);
3286 * @brief ブラックマーケット用の無価値品の排除判定 /
3287 * This function will keep 'crap' out of the black market.
3288 * @param o_ptr 判定したいオブジェクトの構造体参照ポインタ
3289 * @return ブラックマーケットにとって無価値な品ならばTRUEを返す
3292 * Crap is defined as any item that is "available" elsewhere
3293 * Based on a suggestion by "Lee Vogt" <lvogt@cig.mcel.mot.com>
3296 static bool black_market_crap(object_type *o_ptr)
3300 /* Ego items are never crap */
3301 if (object_is_ego(o_ptr)) return (FALSE);
3303 /* Good items are never crap */
3304 if (o_ptr->to_a > 0) return (FALSE);
3305 if (o_ptr->to_h > 0) return (FALSE);
3306 if (o_ptr->to_d > 0) return (FALSE);
3308 /* Check all stores */
3309 for (i = 0; i < MAX_STORES; i++)
3311 if (i == STORE_HOME) continue;
3312 if (i == STORE_MUSEUM) continue;
3314 /* Check every item in the store */
3315 for (j = 0; j < town_info[p_ptr->town_num].store[i].stock_num; j++)
3317 object_type *j_ptr = &town_info[p_ptr->town_num].store[i].stock[j];
3319 /* Duplicate item "type", assume crappy */
3320 if (o_ptr->k_idx == j_ptr->k_idx) return (TRUE);
3330 * @brief 店舗の品揃え変化のためにアイテムを削除する /
3331 * Attempt to delete (some of) a random item from the store
3335 * Hack -- we attempt to "maintain" piles of items when possible.
3338 static void store_delete(void)
3343 /* Pick a random slot */
3344 what = (INVENTORY_IDX)randint0(st_ptr->stock_num);
3346 /* Determine how many items are here */
3347 num = st_ptr->stock[what].number;
3349 /* Hack -- sometimes, only destroy half the items */
3350 if (randint0(100) < 50) num = (num + 1) / 2;
3352 /* Hack -- sometimes, only destroy a single item */
3353 if (randint0(100) < 50) num = 1;
3355 /* Hack -- decrement the maximum timeouts and total charges of rods and wands. -LM- */
3356 if ((st_ptr->stock[what].tval == TV_ROD) || (st_ptr->stock[what].tval == TV_WAND))
3358 st_ptr->stock[what].pval -= num * st_ptr->stock[what].pval / st_ptr->stock[what].number;
3361 /* Actually destroy (part of) the item */
3362 store_item_increase(what, -num);
3363 store_item_optimize(what);
3368 * @brief 店舗の品揃え変化のためにアイテムを追加する /
3369 * Creates a random item and gives it to a store
3373 * This algorithm needs to be rethought. A lot.
3374 * Currently, "normal" stores use a pre-built array.
3375 * Note -- the "level" given to "obj_get_num()" is a "favored"
3376 * level, that is, there is a much higher chance of getting
3377 * items with a level approaching that of the given level...
3378 * Should we check for "permission" to have the given item?
3381 static void store_create(void)
3390 /* Paranoia -- no room left */
3391 if (st_ptr->stock_num >= st_ptr->stock_size) return;
3393 /* Hack -- consider up to four items */
3394 for (tries = 0; tries < 4; tries++)
3397 if (cur_store_num == STORE_BLACK)
3399 /* Pick a level for object/magic */
3400 level = 25 + randint0(25);
3402 /* Random item (usually of given level) */
3403 i = get_obj_num(level, 0x00000000);
3405 /* Handle failure */
3412 /* Hack -- Pick an item to sell */
3413 i = st_ptr->table[randint0(st_ptr->table_num)];
3415 /* Hack -- fake level for apply_magic() */
3416 level = rand_range(1, STORE_OBJ_LEVEL);
3421 /* Create a new object of the chosen kind */
3422 object_prep(q_ptr, i);
3424 /* Apply some "low-level" magic (no artifacts) */
3425 apply_magic(q_ptr, level, AM_NO_FIXED_ART);
3427 /* Require valid object */
3428 if (!store_will_buy(q_ptr)) continue;
3430 /* Hack -- Charge lite's */
3431 if (q_ptr->tval == TV_LITE)
3433 if (q_ptr->sval == SV_LITE_TORCH) q_ptr->xtra4 = FUEL_TORCH / 2;
3434 if (q_ptr->sval == SV_LITE_LANTERN) q_ptr->xtra4 = FUEL_LAMP / 2;
3438 /* The item is "known" */
3439 object_known(q_ptr);
3441 /* Mark it storebought */
3442 q_ptr->ident |= IDENT_STORE;
3444 /* Mega-Hack -- no chests in stores */
3445 if (q_ptr->tval == TV_CHEST) continue;
3447 /* Prune the black market */
3448 if (cur_store_num == STORE_BLACK)
3450 /* Hack -- No "crappy" items */
3451 if (black_market_crap(q_ptr)) continue;
3453 /* Hack -- No "cheap" items */
3454 if (object_value(q_ptr) < 10) continue;
3456 /* No "worthless" items */
3457 /* if (object_value(q_ptr) <= 0) continue; */
3460 /* Prune normal stores */
3463 /* No "worthless" items */
3464 if (object_value(q_ptr) <= 0) continue;
3468 /* Mass produce and/or Apply discount */
3469 mass_produce(q_ptr);
3471 /* Attempt to carry the (known) item */
3472 (void)store_carry(q_ptr);
3474 /* Definitely done */
3481 * @brief 店舗の割引対象外にするかどうかを判定 /
3482 * Eliminate need to bargain if player has haggled well in the past
3483 * @param minprice アイテムの最低販売価格
3484 * @return 割引を禁止するならTRUEを返す。
3486 static bool noneedtobargain(PRICE minprice)
3488 PRICE good = st_ptr->good_buy;
3489 PRICE bad = st_ptr->bad_buy;
3491 /* Cheap items are "boring" */
3492 if (minprice < 10L) return (TRUE);
3494 /* Perfect haggling */
3495 if (good == MAX_SHORT) return (TRUE);
3497 /* Reward good haggles, punish bad haggles, notice price */
3498 if (good > ((3 * bad) + (5 + (minprice/50)))) return (TRUE);
3500 /* Return the flag */
3506 * @brief 店主の持つプレイヤーに対する売買の良し悪し経験を記憶する /
3507 * Update the bargain info
3508 * @param price 実際の取引価格
3509 * @param minprice 店主の提示した価格
3513 static void updatebargain(PRICE price, PRICE minprice, int num)
3515 /* Hack -- auto-haggle */
3516 if (!manual_haggle) return;
3518 /* Cheap items are "boring" */
3519 if ((minprice/num) < 10L) return;
3521 /* Count the successful haggles */
3522 if (price == minprice)
3524 /* Just count the good haggles */
3525 if (st_ptr->good_buy < MAX_SHORT)
3531 /* Count the failed haggles */
3534 /* Just count the bad haggles */
3535 if (st_ptr->bad_buy < MAX_SHORT)
3544 * @brief 店の商品リストを再表示する /
3545 * Re-displays a single store entry
3549 static void display_entry(int pos)
3555 GAME_TEXT o_name[MAX_NLEN];
3560 o_ptr = &st_ptr->stock[pos];
3562 /* Get the "offset" */
3563 i = (pos % store_bottom);
3565 /* Label it, clear the line --(-- */
3566 (void)sprintf(out_val, "%c) ", ((i > 25) ? toupper(I2A(i - 26)) : I2A(i)));
3567 prt(out_val, i+6, 0);
3570 if (show_item_graph)
3572 TERM_COLOR a = object_attr(o_ptr);
3573 SYMBOL_CODE c = object_char(o_ptr);
3575 Term_queue_bigchar(cur_col, i + 6, a, c, 0, 0);
3576 if (use_bigtile) cur_col++;
3581 /* Describe an item in the home */
3582 if ((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM))
3586 /* Leave room for weights, if necessary -DRS- */
3587 if (show_weights) maxwid -= 10;
3589 object_desc(o_name, o_ptr, 0);
3590 o_name[maxwid] = '\0';
3591 c_put_str(tval_to_attr[o_ptr->tval], o_name, i+6, cur_col);
3596 /* Only show the weight of an individual item */
3597 WEIGHT wgt = o_ptr->weight;
3599 sprintf(out_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
3600 put_str(out_val, i+6, 67);
3602 (void)sprintf(out_val, "%3d.%d lb", wgt / 10, wgt % 10);
3603 put_str(out_val, i+6, 68);
3609 /* Describe an item (fully) in a store */
3612 /* Must leave room for the "price" */
3615 /* Leave room for weights, if necessary -DRS- */
3616 if (show_weights) maxwid -= 7;
3618 /* Describe the object (fully) */
3619 object_desc(o_name, o_ptr, 0);
3620 o_name[maxwid] = '\0';
3621 c_put_str(tval_to_attr[o_ptr->tval], o_name, i+6, cur_col);
3626 /* Only show the weight of an individual item */
3627 int wgt = o_ptr->weight;
3629 sprintf(out_val, "%3d.%1d", lbtokg1(wgt) , lbtokg2(wgt) );
3630 put_str(out_val, i+6, 60);
3632 (void)sprintf(out_val, "%3d.%d", wgt / 10, wgt % 10);
3633 put_str(out_val, i+6, 61);
3638 /* Display a "fixed" cost */
3639 if (o_ptr->ident & (IDENT_FIXED))
3641 /* Extract the "minimum" price */
3642 x = price_item(o_ptr, ot_ptr->min_inflate, FALSE);
3644 /* Actually draw the price (not fixed) */
3646 (void)sprintf(out_val, "%9ld固", (long)x);
3648 (void)sprintf(out_val, "%9ld F", (long)x);
3650 put_str(out_val, i+6, 68);
3653 /* Display a "taxed" cost */
3654 else if (!manual_haggle)
3656 /* Extract the "minimum" price */
3657 x = price_item(o_ptr, ot_ptr->min_inflate, FALSE);
3659 /* Hack -- Apply Sales Tax if needed */
3660 if (!noneedtobargain(x)) x += x / 10;
3662 /* Actually draw the price (with tax) */
3663 (void)sprintf(out_val, "%9ld ", (long)x);
3664 put_str(out_val, i+6, 68);
3667 /* Display a "haggle" cost */
3670 /* Extrect the "maximum" price */
3671 x = price_item(o_ptr, ot_ptr->max_inflate, FALSE);
3673 /* Actually draw the price (not fixed) */
3674 (void)sprintf(out_val, "%9ld ", (long)x);
3675 put_str(out_val, i+6, 68);
3682 * @brief 店の商品リストを表示する /
3683 * Displays a store's p_ptr->inventory_list -RAK-
3686 * All prices are listed as "per individual object". -BEN-
3688 static void display_inventory(void)
3692 /* Display the next 12 items */
3693 for (k = 0; k < store_bottom; k++)
3695 /* Do not display "dead" items */
3696 if (store_top + k >= st_ptr->stock_num) break;
3698 /* Display that line */
3699 display_entry(store_top + k);
3702 /* Erase the extra lines and the "more" prompt */
3703 for (i = k; i < store_bottom + 1; i++) prt("", i + 6, 0);
3705 /* Assume "no current page" */
3707 put_str(" ", 5, 20);
3709 put_str(" ", 5, 20);
3713 /* Visual reminder of "more items" */
3714 if (st_ptr->stock_num > store_bottom)
3716 /* Show "more" reminder (after the last item) */
3717 prt(_("-続く-", "-more-"), k + 6, 3);
3719 /* Indicate the "current page" */
3720 /* Trailing spaces are to display (Page xx) and (Page x) */
3721 put_str(format(_("(%dページ) ", "(Page %d) "), store_top/store_bottom + 1), 5, 20);
3724 if (cur_store_num == STORE_HOME || cur_store_num == STORE_MUSEUM)
3726 k = st_ptr->stock_size;
3728 if (cur_store_num == STORE_HOME && !powerup_home) k /= 10;
3730 put_str(format("アイテム数: %4d/%4d", st_ptr->stock_num, k), 19 + xtra_stock, 27);
3732 put_str(format("Objects: %4d/%4d", st_ptr->stock_num, k), 19 + xtra_stock, 30);
3739 * @brief プレイヤーの所持金を表示する /
3740 * Displays players gold -RAK-
3744 static void store_prt_gold(void)
3748 prt(_("手持ちのお金: ", "Gold Remaining: "), 19 + xtra_stock, 53);
3749 sprintf(out_val, "%9ld", (long)p_ptr->au);
3750 prt(out_val, 19 + xtra_stock, 68);
3754 * @brief 店舗情報全体を表示するメインルーチン /
3755 * Displays store (after clearing screen) -RAK-
3759 static void display_store(void)
3765 /* The "Home" is special */
3766 if (cur_store_num == STORE_HOME)
3768 /* Put the owner name */
3769 put_str(_("我が家", "Your Home"), 3, 31);
3771 /* Label the item descriptions */
3772 put_str(_("アイテムの一覧", "Item Description"), 5, 4);
3774 /* If showing weights, show label */
3777 put_str(_(" 重さ", "Weight"), 5, 70);
3781 /* The "Home" is special */
3782 else if (cur_store_num == STORE_MUSEUM)
3784 /* Put the owner name */
3785 put_str(_("博物館", "Museum"), 3, 31);
3787 /* Label the item descriptions */
3788 put_str(_("アイテムの一覧", "Item Description"), 5, 4);
3790 /* If showing weights, show label */
3793 put_str(_(" 重さ", "Weight"), 5, 70);
3800 concptr store_name = (f_name + f_info[cur_store_feat].name);
3801 concptr owner_name = (ot_ptr->owner_name);
3802 concptr race_name = race_info[ot_ptr->owner_race].title;
3804 /* Put the owner name and race */
3805 sprintf(buf, "%s (%s)", owner_name, race_name);
3806 put_str(buf, 3, 10);
3808 /* Show the max price in the store (above prices) */
3809 sprintf(buf, "%s (%ld)", store_name, (long)(ot_ptr->max_cost));
3812 /* Label the item descriptions */
3813 put_str(_("商品の一覧", "Item Description"), 5, 5);
3816 /* If showing weights, show label */
3819 put_str(_(" 重さ", "Weight"), 5, 60);
3822 /* Label the asking price (in stores) */
3823 put_str(_(" 価格", "Price"), 5, 72);
3826 /* Display the current gold */
3829 /* Draw in the p_ptr->inventory_list */
3830 display_inventory();
3836 * @brief 店舗からアイテムを選択する /
3837 * Get the ID of a store item and return its value -RAK-
3838 * @param com_val 選択IDを返す参照ポインタ
3839 * @param pmt メッセージキャプション
3842 * @return 実際に選択したらTRUE、キャンセルしたらFALSE
3844 static int get_stock(COMMAND_CODE *com_val, concptr pmt, int i, int j)
3850 /* Get the item index */
3851 if (repeat_pull(com_val))
3853 /* Verify the item */
3854 if ((*com_val >= i) && (*com_val <= j))
3862 /* Assume failure */
3865 /* Build the prompt */
3867 hi = (j > 25) ? toupper(I2A(j - 26)) : I2A(j);
3869 (void)sprintf(out_val, "(%s:%c-%c, ESCで中断) %s",
3870 (((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM)) ? "アイテム" : "商品"),
3873 (void)sprintf(out_val, "(Items %c-%c, ESC to exit) %s",
3878 /* Ask until done */
3884 if (!get_com(out_val, &command, FALSE)) break;
3887 if (islower(command))
3889 else if (isupper(command))
3890 k = A2I(tolower(command)) + 26;
3894 /* Legal responses */
3895 if ((k >= i) && (k <= j))
3904 /* Clear the prompt */
3907 if (command == ESCAPE) return (FALSE);
3909 repeat_push(*com_val);
3917 * @brief 店主の不満度を増やし、プレイヤーを締め出す判定と処理を行う /
3918 * Increase the insult counter and get angry if too many -RAK-
3919 * @return プレイヤーを締め出す場合TRUEを返す
3921 static int increase_insults(void)
3923 /* Increase insults */
3924 st_ptr->insult_cur++;
3926 /* Become insulted */
3927 if (st_ptr->insult_cur > ot_ptr->insult_max)
3933 st_ptr->insult_cur = 0;
3934 st_ptr->good_buy = 0;
3935 st_ptr->bad_buy = 0;
3938 st_ptr->store_open = current_world_ptr->game_turn + TURNS_PER_TICK*TOWN_DAWN/8 + randint1(TURNS_PER_TICK*TOWN_DAWN/8);
3950 * @brief 店主の不満度を減らす /
3951 * Decrease insults -RAK-
3952 * @return プレイヤーを締め出す場合TRUEを返す
3954 static void decrease_insults(void)
3956 /* Decrease insults */
3957 if (st_ptr->insult_cur) st_ptr->insult_cur--;
3962 * @brief 店主の不満度が増えた場合のみのメッセージを表示する /
3963 * Have insulted while haggling -RAK-
3964 * @return プレイヤーを締め出す場合TRUEを返す
3966 static int haggle_insults(void)
3968 /* Increase insults */
3969 if (increase_insults()) return (TRUE);
3971 /* Display and flush insult */
3980 * Mega-Hack -- Enable "increments"
3982 static bool allow_inc = FALSE;
3985 * Mega-Hack -- Last "increment" during haggling
3987 static s32b last_inc = 0L;
3991 * @brief 交渉価格を確認と認証の是非を行う /
3994 * @param poffer 別途価格提示をした場合の値を返す参照ポインタ
3995 * @param price 現在の交渉価格
3996 * @param final 最終確定価格ならばTRUE
3997 * @return プレイヤーを締め出す場合TRUEを返す
3999 static int get_haggle(concptr pmt, s32b *poffer, PRICE price, int final)
4004 GAME_TEXT out_val[160];
4006 /* Clear old increment if necessary */
4007 if (!allow_inc) last_inc = 0L;
4012 sprintf(buf, _("%s [承諾] ", "%s [accept] "), pmt);
4015 /* Old (negative) increment, and not final */
4016 else if (last_inc < 0)
4018 sprintf(buf, _("%s [-$%ld] ", "%s [-%ld] "), pmt, (long)(ABS(last_inc)));
4021 /* Old (positive) increment, and not final */
4022 else if (last_inc > 0)
4024 sprintf(buf, _("%s [+$%ld] ", "%s [+%ld] "), pmt, (long)(ABS(last_inc)));
4030 sprintf(buf, "%s ", pmt);
4034 /* Ask until done */
4039 /* Display prompt */
4043 strcpy(out_val, "");
4046 * Ask the user for a response.
4047 * Don't allow to use numpad as cursor key.
4049 res = askfor_aux(out_val, 32, FALSE);
4055 if (!res) return FALSE;
4057 /* Skip leading spaces */
4058 for (p = out_val; *p == ' '; p++) /* loop */;
4060 /* Empty response */
4063 /* Accept current price */
4071 /* Use previous increment */
4072 if (allow_inc && last_inc)
4074 *poffer += last_inc;
4079 /* Normal response */
4082 /* Extract a number */
4085 /* Handle "incremental" number */
4086 if ((*p == '+' || *p == '-'))
4088 /* Allow increments */
4091 /* Use the given "increment" */
4098 /* Handle normal number */
4101 /* Use the given "number" */
4109 msg_print(_("値がおかしいです。", "Invalid response."));
4119 * @brief 店主がプレイヤーからの交渉価格を判断する /
4120 * Receive an offer (from the player)
4122 * @param poffer 店主からの交渉価格を返す参照ポインタ
4123 * @param last_offer 現在の交渉価格
4124 * @param factor 店主の価格基準倍率
4125 * @param price アイテムの実価値
4126 * @param final 最終価格確定ならばTRUE
4127 * @return プレイヤーの価格に対して不服ならばTRUEを返す /
4128 * Return TRUE if offer is NOT okay
4130 static bool receive_offer(concptr pmt, s32b *poffer,
4131 s32b last_offer, int factor,
4132 PRICE price, int final)
4134 /* Haggle till done */
4137 /* Get a haggle (or cancel) */
4138 if (!get_haggle(pmt, poffer, price, final)) return (TRUE);
4140 /* Acceptable offer */
4141 if (((*poffer) * factor) >= (last_offer * factor)) break;
4143 /* Insult, and check for kicked out */
4144 if (haggle_insults()) return (TRUE);
4146 /* Reject offer (correctly) */
4147 (*poffer) = last_offer;
4156 * @brief プレイヤーが購入する時の値切り処理メインルーチン /
4157 * Haggling routine -RAK-
4158 * @param o_ptr オブジェクトの構造体参照ポインタ
4159 * @param price 最終価格を返す参照ポインタ
4160 * @return プレイヤーの価格に対して店主が不服ならばTRUEを返す /
4161 * Return TRUE if purchase is NOT successful
4163 static bool purchase_haggle(object_type *o_ptr, s32b *price)
4165 s32b cur_ask, final_ask;
4166 s32b last_offer, offer;
4168 s32b min_per, max_per;
4169 int flag, loop_flag, noneed;
4170 int annoyed = 0, final = FALSE;
4171 bool cancel = FALSE;
4175 concptr pmt = _("提示価格", "Asking");
4177 /* Extract the starting offer and the final offer */
4178 cur_ask = price_item(o_ptr, ot_ptr->max_inflate, FALSE);
4179 final_ask = price_item(o_ptr, ot_ptr->min_inflate, FALSE);
4181 /* Determine if haggling is necessary */
4182 noneed = noneedtobargain(final_ask);
4184 /* No need to haggle */
4185 if (noneed || !manual_haggle)
4187 /* No need to haggle */
4190 /* Message summary */
4191 msg_print(_("結局この金額にまとまった。", "You eventually agree upon the price."));
4195 /* No haggle option */
4198 /* Message summary */
4199 msg_print(_("すんなりとこの金額にまとまった。", "You quickly agree upon the price."));
4202 /* Apply Sales Tax */
4203 final_ask += final_ask / 10;
4207 cur_ask = final_ask;
4209 /* Go to final offer */
4210 pmt = _("最終提示価格", "Final Offer");
4215 /* Haggle for the whole pile */
4216 cur_ask *= o_ptr->number;
4217 final_ask *= o_ptr->number;
4220 /* Haggle parameters */
4221 min_per = ot_ptr->haggle_per;
4222 max_per = min_per * 3;
4224 /* Mega-Hack -- artificial "last offer" value */
4225 last_offer = object_value(o_ptr) * o_ptr->number;
4226 last_offer = last_offer * (200 - (int)(ot_ptr->max_inflate)) / 100L;
4227 if (last_offer <= 0) last_offer = 1;
4232 /* No incremental haggling yet */
4235 /* Haggle until done */
4236 for (flag = FALSE; !flag; )
4240 while (!flag && loop_flag)
4242 (void)sprintf(out_val, "%s : %ld", pmt, (long)cur_ask);
4243 put_str(out_val, 1, 0);
4244 cancel = receive_offer(_("提示する金額? ", "What do you offer? "), &offer, last_offer, 1, cur_ask, final);
4249 else if (offer > cur_ask)
4254 else if (offer == cur_ask)
4267 x1 = 100 * (offer - last_offer) / (cur_ask - last_offer);
4270 if (haggle_insults())
4276 else if (x1 > max_per)
4279 if (x1 < max_per) x1 = max_per;
4281 x2 = rand_range(x1-2, x1+2);
4282 x3 = ((cur_ask - offer) * x2 / 100L) + 1;
4283 /* don't let the price go up */
4288 if (cur_ask < final_ask)
4291 cur_ask = final_ask;
4292 pmt = _("最終提示価格", "What do you offer? ");
4296 (void)(increase_insults());
4301 else if (offer >= cur_ask)
4312 (void)sprintf(out_val, _("前回の提示金額: $%ld", "Your last offer: %ld"), (long)last_offer);
4313 put_str(out_val, 1, 39);
4314 say_comment_2(cur_ask, annoyed);
4319 if (cancel) return (TRUE);
4321 updatebargain(*price, final_ask, o_ptr->number);
4329 * @brief プレイヤーが売却する時の値切り処理メインルーチン /
4330 * Haggling routine -RAK-
4331 * @param o_ptr オブジェクトの構造体参照ポインタ
4332 * @param price 最終価格を返す参照ポインタ
4333 * @return プレイヤーの価格に対して店主が不服ならばTRUEを返す /
4334 * Return TRUE if purchase is NOT successful
4336 static bool sell_haggle(object_type *o_ptr, s32b *price)
4338 s32b purse, cur_ask, final_ask;
4339 s32b last_offer = 0, offer = 0;
4341 s32b min_per, max_per;
4342 int flag, loop_flag, noneed;
4343 int annoyed = 0, final = FALSE;
4344 bool cancel = FALSE;
4345 concptr pmt = _("提示金額", "Offer");
4351 /* Obtain the starting offer and the final offer */
4352 cur_ask = price_item(o_ptr, ot_ptr->max_inflate, TRUE);
4353 final_ask = price_item(o_ptr, ot_ptr->min_inflate, TRUE);
4355 /* Determine if haggling is necessary */
4356 noneed = noneedtobargain(final_ask);
4358 /* Get the owner's payout limit */
4359 purse = (s32b)(ot_ptr->max_cost);
4361 /* No need to haggle */
4362 if (noneed || !manual_haggle || (final_ask >= purse))
4364 /* Apply Sales Tax (if needed) */
4365 if (!manual_haggle && !noneed)
4367 final_ask -= final_ask / 10;
4370 /* No reason to haggle */
4371 if (final_ask >= purse)
4373 msg_print(_("即座にこの金額にまとまった。", "You instantly agree upon the price."));
4376 /* Offer full purse */
4380 /* No need to haggle */
4383 msg_print(_("結局この金額にまとまった。", "You eventually agree upon the price."));
4387 /* No haggle option */
4390 /* Message summary */
4391 msg_print(_("すんなりとこの金額にまとまった。", "You quickly agree upon the price."));
4396 cur_ask = final_ask;
4400 pmt = _("最終提示金額", "Final Offer");
4403 /* Haggle for the whole pile */
4404 cur_ask *= o_ptr->number;
4405 final_ask *= o_ptr->number;
4408 /* Display commands */
4410 /* Haggling parameters */
4411 min_per = ot_ptr->haggle_per;
4412 max_per = min_per * 3;
4414 /* Mega-Hack -- artificial "last offer" value */
4415 last_offer = object_value(o_ptr) * o_ptr->number;
4416 last_offer = last_offer * ot_ptr->max_inflate / 100L;
4421 /* No incremental haggling yet */
4425 for (flag = FALSE; !flag; )
4431 (void)sprintf(out_val, "%s : %ld", pmt, (long)cur_ask);
4432 put_str(out_val, 1, 0);
4433 cancel = receive_offer(_("提示する価格? ", "What price do you ask? "),
4434 &offer, last_offer, -1, cur_ask, final);
4440 else if (offer < cur_ask)
4443 /* rejected, reset offer for incremental haggling */
4446 else if (offer == cur_ask)
4457 if (flag || !loop_flag) break;
4462 x1 = 100 * (last_offer - offer) / (last_offer - cur_ask);
4465 if (haggle_insults())
4471 else if (x1 > max_per)
4474 if (x1 < max_per) x1 = max_per;
4476 x2 = rand_range(x1-2, x1+2);
4477 x3 = ((offer - cur_ask) * x2 / 100L) + 1;
4478 /* don't let the price go down */
4482 if (cur_ask > final_ask)
4484 cur_ask = final_ask;
4486 pmt = _("最終提示金額", "Final Offer");
4493 /* 追加 $0 で買い取られてしまうのを防止 By FIRST*/
4496 (void)(increase_insults());
4499 else if (offer <= cur_ask)
4510 (void)sprintf(out_val,
4511 _("前回の提示価格 $%ld", "Your last bid %ld"), (long)last_offer);
4512 put_str(out_val, 1, 39);
4513 say_comment_3(cur_ask, annoyed);
4518 if (cancel) return (TRUE);
4520 updatebargain(*price, final_ask, o_ptr->number);
4528 * @brief 店からの購入処理のメインルーチン /
4529 * Buy an item from a store -RAK-
4532 static void store_purchase(void)
4535 COMMAND_CODE item, item_new;
4546 GAME_TEXT o_name[MAX_NLEN];
4550 if (cur_store_num == STORE_MUSEUM)
4552 msg_print(_("博物館から取り出すことはできません。", "Museum."));
4557 if (st_ptr->stock_num <= 0)
4559 if (cur_store_num == STORE_HOME)
4560 msg_print(_("我が家には何も置いてありません。", "Your home is empty."));
4562 msg_print(_("現在商品の在庫を切らしています。", "I am currently out of stock."));
4566 /* Find the number of objects on this and following pages */
4567 i = (st_ptr->stock_num - store_top);
4569 /* And then restrict it to the current page */
4570 if (i > store_bottom) i = store_bottom;
4574 /* ブラックマーケットの時は別のメッセージ */
4575 switch( cur_store_num ) {
4577 sprintf(out_val, "どのアイテムを取りますか? ");
4580 sprintf(out_val, "どれ? ");
4583 sprintf(out_val, "どの品物が欲しいんだい? ");
4587 if (cur_store_num == STORE_HOME)
4589 sprintf(out_val, "Which item do you want to take? ");
4593 sprintf(out_val, "Which item are you interested in? ");
4598 /* Get the item number to be bought */
4599 if (!get_stock(&item, out_val, 0, i - 1)) return;
4601 /* Get the actual index */
4602 item = item + store_top;
4604 /* Get the actual item */
4605 o_ptr = &st_ptr->stock[item];
4607 /* Assume the player wants just one of them */
4611 /* Get a copy of the object */
4612 object_copy(j_ptr, o_ptr);
4615 * If a rod or wand, allocate total maximum timeouts or charges
4616 * between those purchased and left on the shelf.
4618 reduce_charges(j_ptr, o_ptr->number - amt);
4620 /* Modify quantity */
4621 j_ptr->number = amt;
4623 /* Hack -- require room in pack */
4624 if (!inven_carry_okay(j_ptr))
4626 msg_print(_("そんなにアイテムを持てない。", "You cannot carry that many different items."));
4630 /* Determine the "best" price (per item) */
4631 best = price_item(j_ptr, ot_ptr->min_inflate, FALSE);
4633 /* Find out how many the player wants */
4634 if (o_ptr->number > 1)
4636 /* Hack -- note cost of "fixed" items */
4637 if ((cur_store_num != STORE_HOME) &&
4638 (o_ptr->ident & IDENT_FIXED))
4640 msg_format(_("一つにつき $%ldです。", "That costs %ld gold per item."), (long)(best));
4642 amt = get_quantity(NULL, o_ptr->number);
4643 if (amt <= 0) return;
4647 /* Get desired object */
4648 object_copy(j_ptr, o_ptr);
4651 * If a rod or wand, allocate total maximum timeouts or charges
4652 * between those purchased and left on the shelf.
4654 reduce_charges(j_ptr, o_ptr->number - amt);
4656 /* Modify quantity */
4657 j_ptr->number = amt;
4659 /* Hack -- require room in pack */
4660 if (!inven_carry_okay(j_ptr))
4662 msg_print(_("ザックにそのアイテムを入れる隙間がない。", "You cannot carry that many items."));
4666 /* Attempt to buy it */
4667 if (cur_store_num != STORE_HOME)
4669 /* Fixed price, quick buy */
4670 if (o_ptr->ident & (IDENT_FIXED))
4675 /* Go directly to the "best" deal */
4676 price = (best * j_ptr->number);
4682 /* Describe the object (fully) */
4683 object_desc(o_name, j_ptr, 0);
4684 msg_format(_("%s(%c)を購入する。", "Buying %s (%c)."), o_name, I2A(item));
4687 /* Haggle for a final price */
4688 choice = purchase_haggle(j_ptr, &price);
4690 /* Hack -- Got kicked out */
4691 if (st_ptr->store_open >= current_world_ptr->game_turn) return;
4694 /* Player wants it */
4697 /* Fix the item price (if "correctly" haggled) */
4698 if (price == (best * j_ptr->number)) o_ptr->ident |= (IDENT_FIXED);
4700 /* Player can afford it */
4701 if (p_ptr->au >= price)
4706 if (cur_store_num == STORE_BLACK) /* The black market is illegal! */
4707 chg_virtue(V_JUSTICE, -1);
4708 if((o_ptr->tval == TV_BOTTLE) && (cur_store_num != STORE_HOME))
4709 chg_virtue(V_NATURE, -1);
4717 /* Spend the money */
4720 /* Update the display */
4723 /* Hack -- buying an item makes you aware of it */
4724 object_aware(j_ptr);
4726 /* Hack -- clear the "fixed" flag from the item */
4727 j_ptr->ident &= ~(IDENT_FIXED);
4729 /* Describe the transaction */
4730 object_desc(o_name, j_ptr, 0);
4732 msg_format(_("%sを $%ldで購入しました。", "You bought %s for %ld gold."), o_name, (long)price);
4734 strcpy(record_o_name, o_name);
4735 record_turn = current_world_ptr->game_turn;
4737 if (record_buy) do_cmd_write_nikki(NIKKI_BUY, 0, o_name);
4738 object_desc(o_name, o_ptr, OD_NAME_ONLY);
4739 if(record_rand_art && o_ptr->art_name)
4740 do_cmd_write_nikki(NIKKI_ART, 0, o_name);
4742 /* Erase the inscription */
4743 j_ptr->inscription = 0;
4745 /* Erase the "feeling" */
4746 j_ptr->feeling = FEEL_NONE;
4747 j_ptr->ident &= ~(IDENT_STORE);
4748 /* Give it to the player */
4749 item_new = inven_carry(j_ptr);
4751 /* Describe the final result */
4752 object_desc(o_name, &p_ptr->inventory_list[item_new], 0);
4753 msg_format(_("%s(%c)を手に入れた。", "You have %s (%c)."), o_name, index_to_label(item_new));
4755 /* Auto-inscription */
4756 autopick_alter_item(item_new, FALSE);
4758 /* Now, reduce the original stack's pval. */
4759 if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
4761 o_ptr->pval -= j_ptr->pval;
4765 /* Note how many slots the store used to have */
4766 i = st_ptr->stock_num;
4768 /* Remove the bought items from the store */
4769 store_item_increase(item, -amt);
4770 store_item_optimize(item);
4772 /* Store is empty */
4773 if (st_ptr->stock_num == 0)
4776 if (one_in_(STORE_SHUFFLE))
4779 msg_print(_("店主は引退した。", "The shopkeeper retires."));
4781 /* Shuffle the store */
4782 store_shuffle(cur_store_num);
4785 sprintf(buf, "%s (%s)",
4786 ot_ptr->owner_name, race_info[ot_ptr->owner_race].title);
4787 put_str(buf, 3, 10);
4788 sprintf(buf, "%s (%ld)",
4789 (f_name + f_info[cur_store_feat].name), (long)(ot_ptr->max_cost));
4796 msg_print(_("店主は新たな在庫を取り出した。", "The shopkeeper brings out some new stock."));
4799 /* New p_ptr->inventory_list */
4800 for (i = 0; i < 10; i++)
4802 /* Maintain the store */
4803 store_maint(p_ptr->town_num, cur_store_num);
4808 display_inventory();
4811 /* The item is gone */
4812 else if (st_ptr->stock_num != i)
4814 /* Pick the correct screen */
4815 if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
4816 display_inventory();
4819 /* Item is still here */
4822 /* Redraw the item */
4823 display_entry(item);
4827 /* Player cannot afford it */
4830 /* Simple message (no insult) */
4831 msg_print(_("お金が足りません。", "You do not have enough gold."));
4836 /* Home is much easier */
4839 bool combined_or_reordered;
4841 /* Distribute charges of wands/rods */
4842 distribute_charges(o_ptr, j_ptr, amt);
4844 /* Give it to the player */
4845 item_new = inven_carry(j_ptr);
4847 /* Describe just the result */
4848 object_desc(o_name, &p_ptr->inventory_list[item_new], 0);
4850 msg_format(_("%s(%c)を取った。", "You have %s (%c)."), o_name, index_to_label(item_new));
4853 /* Take note if we take the last one */
4854 i = st_ptr->stock_num;
4856 /* Remove the items from the home */
4857 store_item_increase(item, -amt);
4858 store_item_optimize(item);
4860 combined_or_reordered = combine_and_reorder_home(STORE_HOME);
4862 /* Hack -- Item is still here */
4863 if (i == st_ptr->stock_num)
4865 if (combined_or_reordered) display_inventory();
4867 /* Redraw the item */
4868 else display_entry(item);
4871 /* The item is gone */
4875 if (st_ptr->stock_num == 0) store_top = 0;
4877 /* Nothing left on that screen */
4878 else if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
4879 display_inventory();
4881 chg_virtue(V_SACRIFICE, 1);
4885 /* Not kicked out */
4891 * @brief 店からの売却処理のメインルーチン /
4892 * Sell an item to the store (or home)
4895 static void store_sell(void)
4902 PRICE price, value, dummy;
4910 GAME_TEXT o_name[MAX_NLEN];
4913 /* Prepare a prompt */
4914 if (cur_store_num == STORE_HOME)
4915 q = _("どのアイテムを置きますか? ", "Drop which item? ");
4917 else if (cur_store_num == STORE_MUSEUM)
4918 q = _("どのアイテムを寄贈しますか? ", "Give which item? ");
4921 q = _("どのアイテムを売りますか? ", "Sell which item? ");
4923 /* Only allow items the store will buy */
4924 item_tester_hook = store_will_buy;
4926 /* 我が家でおかしなメッセージが出るオリジナルのバグを修正 */
4927 if (cur_store_num == STORE_HOME)
4929 s = _("置けるアイテムを持っていません。", "You don't have any item to drop.");
4931 else if (cur_store_num == STORE_MUSEUM)
4933 s = _("寄贈できるアイテムを持っていません。", "You don't have any item to give.");
4937 s = _("欲しい物がないですねえ。", "You have nothing that I want.");
4940 o_ptr = choose_object(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT));
4943 /* Hack -- Cannot remove cursed items */
4944 if ((item >= INVEN_RARM) && object_is_cursed(o_ptr))
4946 msg_print(_("ふーむ、どうやらそれは呪われているようだね。", "Hmmm, it seems to be cursed."));
4950 /* Assume one item */
4953 if (o_ptr->number > 1)
4955 amt = get_quantity(NULL, o_ptr->number);
4956 if (amt <= 0) return;
4960 /* Get a copy of the object */
4961 object_copy(q_ptr, o_ptr);
4963 /* Modify quantity */
4964 q_ptr->number = amt;
4967 * Hack -- If a rod or wand, allocate total maximum
4968 * timeouts or charges to those being sold. -LM-
4970 if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
4972 q_ptr->pval = o_ptr->pval * amt / o_ptr->number;
4975 /* Get a full description */
4976 object_desc(o_name, q_ptr, 0);
4978 /* Remove any inscription, feeling for stores */
4979 if ((cur_store_num != STORE_HOME) && (cur_store_num != STORE_MUSEUM))
4981 q_ptr->inscription = 0;
4982 q_ptr->feeling = FEEL_NONE;
4985 /* Is there room in the store (or the home?) */
4986 if (!store_check_num(q_ptr))
4988 if (cur_store_num == STORE_HOME)
4989 msg_print(_("我が家にはもう置く場所がない。", "Your home is full."));
4991 else if (cur_store_num == STORE_MUSEUM)
4992 msg_print(_("博物館はもう満杯だ。", "Museum is full."));
4995 msg_print(_("すいませんが、店にはもう置く場所がありません。", "I have not the room in my store to keep it."));
5002 if ((cur_store_num != STORE_HOME) && (cur_store_num != STORE_MUSEUM))
5004 /* Describe the transaction */
5005 msg_format(_("%s(%c)を売却する。", "Selling %s (%c)."), o_name, index_to_label(item));
5010 choice = sell_haggle(q_ptr, &price);
5013 if (st_ptr->store_open >= current_world_ptr->game_turn) return;
5025 if (cur_store_num == STORE_BLACK) /* The black market is illegal! */
5026 chg_virtue(V_JUSTICE, -1);
5028 if((o_ptr->tval == TV_BOTTLE) && (cur_store_num != STORE_HOME))
5029 chg_virtue(V_NATURE, 1);
5032 /* Get some money */
5035 /* Update the display */
5038 /* Get the "apparent" value */
5039 dummy = object_value(q_ptr) * q_ptr->number;
5041 identify_item(o_ptr);
5044 /* Get a copy of the object */
5045 object_copy(q_ptr, o_ptr);
5047 /* Modify quantity */
5048 q_ptr->number = amt;
5050 /* Make it look like to be known */
5051 q_ptr->ident |= IDENT_STORE;
5054 * Hack -- If a rod or wand, let the shopkeeper know just
5055 * how many charges he really paid for. -LM-
5057 if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
5059 q_ptr->pval = o_ptr->pval * amt / o_ptr->number;
5062 /* Get the "actual" value */
5063 value = object_value(q_ptr) * q_ptr->number;
5065 /* Get the description all over again */
5066 object_desc(o_name, q_ptr, 0);
5068 /* Describe the result (in message buffer) */
5069 msg_format(_("%sを $%ldで売却しました。", "You sold %s for %ld gold."), o_name, (long)price);
5071 if (record_sell) do_cmd_write_nikki(NIKKI_SELL, 0, o_name);
5073 if (!((o_ptr->tval == TV_FIGURINE) && (value > 0)))
5075 /* Analyze the prices (and comment verbally) unless a figurine*/
5076 purchase_analyze(price, value, dummy);
5080 * Hack -- Allocate charges between those wands or rods sold
5081 * and retained, unless all are being sold. -LM-
5083 distribute_charges(o_ptr, q_ptr, amt);
5085 /* Reset timeouts of the sold items */
5088 /* Take the item from the player, describe the result */
5089 inven_item_increase(item, -amt);
5090 inven_item_describe(item);
5092 /* If items remain, auto-inscribe before optimizing */
5093 if (o_ptr->number > 0)
5094 autopick_alter_item(item, FALSE);
5096 inven_item_optimize(item);
5099 /* The store gets that (known) item */
5100 item_pos = store_carry(q_ptr);
5102 /* Re-display if item is now in store */
5105 store_top = (item_pos / store_bottom) * store_bottom;
5106 display_inventory();
5111 /* Player is at museum */
5112 else if (cur_store_num == STORE_MUSEUM)
5114 char o2_name[MAX_NLEN];
5115 object_desc(o2_name, q_ptr, OD_NAME_ONLY);
5117 if (-1 == store_check_num(q_ptr))
5119 msg_print(_("それと同じ品物は既に博物館にあるようです。", "The same object as it is already in the Museum."));
5123 msg_print(_("博物館に寄贈したものは取り出すことができません!!", "You cannot take items which is given to the Museum back!!"));
5126 if (!get_check(format(_("本当に%sを寄贈しますか?", "Really give %s to the Museum? "), o2_name))) return;
5128 identify_item(q_ptr);
5129 q_ptr->ident |= IDENT_MENTAL;
5131 /* Distribute charges of wands/rods */
5132 distribute_charges(o_ptr, q_ptr, amt);
5133 msg_format(_("%sを置いた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
5136 /* Take it from the players p_ptr->inventory_list */
5137 inven_item_increase(item, -amt);
5138 inven_item_describe(item);
5139 inven_item_optimize(item);
5142 /* Let the home carry it */
5143 item_pos = home_carry(q_ptr);
5145 /* Update store display */
5148 store_top = (item_pos / store_bottom) * store_bottom;
5149 display_inventory();
5152 /* Player is at home */
5155 /* Distribute charges of wands/rods */
5156 distribute_charges(o_ptr, q_ptr, amt);
5157 msg_format(_("%sを置いた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
5161 /* Take it from the players p_ptr->inventory_list */
5162 inven_item_increase(item, -amt);
5163 inven_item_describe(item);
5164 inven_item_optimize(item);
5167 /* Let the home carry it */
5168 item_pos = home_carry(q_ptr);
5170 /* Update store display */
5173 store_top = (item_pos / store_bottom) * store_bottom;
5174 display_inventory();
5178 if ((choice == 0) && (item >= INVEN_RARM))
5187 * @brief 店のアイテムを調べるコマンドのメインルーチン /
5188 * Examine an item in a store -JDL-
5191 static void store_examine(void)
5196 GAME_TEXT o_name[MAX_NLEN];
5200 if (st_ptr->stock_num <= 0)
5202 if (cur_store_num == STORE_HOME)
5203 msg_print(_("我が家には何も置いてありません。", "Your home is empty."));
5204 else if (cur_store_num == STORE_MUSEUM)
5205 msg_print(_("博物館には何も置いてありません。", "Museum is empty."));
5207 msg_print(_("現在商品の在庫を切らしています。", "I am currently out of stock."));
5211 /* Find the number of objects on this and following pages */
5212 i = (st_ptr->stock_num - store_top);
5214 /* And then restrict it to the current page */
5215 if (i > store_bottom) i = store_bottom;
5218 sprintf(out_val, _("どれを調べますか?", "Which item do you want to examine? "));
5220 /* Get the item number to be examined */
5221 if (!get_stock(&item, out_val, 0, i - 1)) return;
5223 /* Get the actual index */
5224 item = item + store_top;
5226 /* Get the actual item */
5227 o_ptr = &st_ptr->stock[item];
5229 /* Require full knowledge */
5230 if (!(o_ptr->ident & IDENT_MENTAL))
5232 /* This can only happen in the home */
5233 msg_print(_("このアイテムについて特に知っていることはない。", "You have no special knowledge about that item."));
5237 object_desc(o_name, o_ptr, 0);
5238 msg_format(_("%sを調べている...", "Examining %s..."), o_name);
5240 if (!screen_object(o_ptr, SCROBJ_FORCE_DETAIL))
5241 msg_print(_("特に変わったところはないようだ。", "You see nothing special."));
5248 * @brief 博物館のアイテムを除去するコマンドのメインルーチン /
5249 * Remove an item from museum (Originally from TOband)
5252 static void museum_remove_object(void)
5257 GAME_TEXT o_name[MAX_NLEN];
5261 if (st_ptr->stock_num <= 0)
5263 msg_print(_("博物館には何も置いてありません。", "Museum is empty."));
5267 /* Find the number of objects on this and following pages */
5268 i = st_ptr->stock_num - store_top;
5270 /* And then restrict it to the current page */
5271 if (i > store_bottom) i = store_bottom;
5274 sprintf(out_val, _("どのアイテムの展示をやめさせますか?", "Which item do you want to order to remove? "));
5276 /* Get the item number to be removed */
5277 if (!get_stock(&item, out_val, 0, i - 1)) return;
5279 /* Get the actual index */
5280 item = item + store_top;
5282 /* Get the actual item */
5283 o_ptr = &st_ptr->stock[item];
5285 object_desc(o_name, o_ptr, 0);
5287 msg_print(_("展示をやめさせたアイテムは二度と見ることはできません!", "You cannot see items which is removed from the Museum!"));
5288 if (!get_check(format(_("本当に%sの展示をやめさせますか?", "Really order to remove %s from the Museum? "), o_name))) return;
5290 msg_format(_("%sの展示をやめさせた。", "You ordered to remove %s."), o_name);
5292 /* Remove the items from the home */
5293 store_item_increase(item, -o_ptr->number);
5294 store_item_optimize(item);
5296 (void)combine_and_reorder_home(STORE_MUSEUM);
5298 /* The item is gone */
5301 if (st_ptr->stock_num == 0) store_top = 0;
5303 /* Nothing left on that screen */
5304 else if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
5305 display_inventory();
5312 * Hack -- set this to leave the store
5314 static bool leave_store = FALSE;
5318 * @brief 店舗処理コマンド選択のメインルーチン /
5319 * Process a command in a store
5323 * Note that we must allow the use of a few "special" commands
5324 * in the stores which are not allowed in the dungeon, and we
5325 * must disable some commands which are allowed in the dungeon
5326 * but not in the stores, to prevent chaos.
5329 static void store_process_command(void)
5331 /* Handle repeating the last command */
5334 if (rogue_like_commands && command_cmd == 'l')
5336 command_cmd = 'x'; /* hack! */
5339 /* Parse the command */
5340 switch (command_cmd)
5350 /* 1 ページ戻るコマンド: 我が家のページ数が多いので重宝するはず By BUG */
5353 if (st_ptr->stock_num <= store_bottom) {
5354 msg_print(_("これで全部です。", "Entire p_ptr->inventory_list is shown."));
5357 store_top -= store_bottom;
5358 if ( store_top < 0 )
5359 store_top = ((st_ptr->stock_num - 1 )/store_bottom) * store_bottom;
5360 if ( (cur_store_num == STORE_HOME) && (powerup_home == FALSE) )
5361 if ( store_top >= store_bottom ) store_top = store_bottom;
5362 display_inventory();
5370 if (st_ptr->stock_num <= store_bottom)
5372 msg_print(_("これで全部です。", "Entire p_ptr->inventory_list is shown."));
5376 store_top += store_bottom;
5378 * 隠しオプション(powerup_home)がセットされていないときは
5379 * 我が家では 2 ページまでしか表示しない
5381 if ((cur_store_num == STORE_HOME) &&
5382 (powerup_home == FALSE) &&
5383 (st_ptr->stock_num >= STORE_INVEN_MAX))
5385 if (store_top >= (STORE_INVEN_MAX - 1))
5392 if (store_top >= st_ptr->stock_num) store_top = 0;
5395 display_inventory();
5407 /* Get (purchase) */
5434 /*** Inventory Commands ***/
5436 /* Wear/wield equipment */
5443 /* Take off equipment */
5450 /* Destroy an item */
5457 /* Equipment list */
5464 /* Inventory list */
5472 /*** Various commands ***/
5474 /* Identify an object */
5481 /* Hack -- toggle windows */
5484 toggle_inven_equip();
5488 /*** Use various objects ***/
5493 if ( (p_ptr->pclass == CLASS_MINDCRAFTER) ||
5494 (p_ptr->pclass == CLASS_BERSERKER) ||
5495 (p_ptr->pclass == CLASS_NINJA) ||
5496 (p_ptr->pclass == CLASS_MIRROR_MASTER)
5497 ) do_cmd_mind_browse();
5498 else if (p_ptr->pclass == CLASS_SMITH)
5500 else if (p_ptr->pclass == CLASS_MAGIC_EATER)
5501 do_cmd_magic_eater(TRUE, FALSE);
5502 else if (p_ptr->pclass == CLASS_SNIPER)
5503 do_cmd_snipe_browse();
5504 else do_cmd_browse();
5508 /* Inscribe an object */
5515 /* Uninscribe an object */
5518 do_cmd_uninscribe();
5524 /*** Help and Such ***/
5533 /* Identify symbol */
5536 do_cmd_query_symbol();
5540 /* Character description */
5543 p_ptr->town_num = old_town_num;
5544 do_cmd_change_name();
5545 p_ptr->town_num = inner_town_num;
5551 /*** System Commands ***/
5553 /* Hack -- User interface */
5560 /* Single line from a pref file */
5563 p_ptr->town_num = old_town_num;
5565 p_ptr->town_num = inner_town_num;
5569 /* Interact with macros */
5572 p_ptr->town_num = old_town_num;
5574 p_ptr->town_num = inner_town_num;
5578 /* Interact with visuals */
5581 p_ptr->town_num = old_town_num;
5583 p_ptr->town_num = inner_town_num;
5587 /* Interact with colors */
5590 p_ptr->town_num = old_town_num;
5592 p_ptr->town_num = inner_town_num;
5596 /* Interact with options */
5600 (void)combine_and_reorder_home(STORE_HOME);
5606 /*** Misc Commands ***/
5622 /* Repeat level feeling */
5629 /* Show previous message */
5632 do_cmd_message_one();
5636 /* Show previous messages */
5649 /* Check artifacts, uniques etc. */
5656 /* Load "screen dump" */
5659 do_cmd_load_screen();
5663 /* Save "screen dump" */
5666 do_cmd_save_screen();
5670 /* Hack -- Unknown command */
5673 if ((cur_store_num == STORE_MUSEUM) && (command_cmd == 'r'))
5675 museum_remove_object();
5679 msg_print(_("そのコマンドは店の中では使えません。", "That command does not work in stores."));
5688 * @brief 店舗処理全体のメインルーチン /
5689 * Enter a store, and interact with it. *
5693 * Note that we use the standard "request_command()" function
5694 * to get a command, allowing us to use "command_arg" and all
5695 * command macros and other nifty stuff, but we use the special
5696 * "shopping" argument, to force certain commands to be converted
5697 * into other commands, normally, we convert "p" (pray) and "m"
5698 * (cast magic) into "g" (get), and "s" (search) into "d" (drop).
5701 void do_cmd_store(void)
5707 bool need_redraw_store_inv; /* To redraw missiles damage and prices in store */
5710 if(p_ptr->wild_mode) return;
5711 Term_get_size(&w, &h);
5713 /* Calculate stocks per 1 page */
5714 xtra_stock = MIN(14+26, ((h > 24) ? (h - 24) : 0));
5715 store_bottom = MIN_STOCK + xtra_stock;
5717 /* Access the player grid */
5718 g_ptr = ¤t_floor_ptr->grid_array[p_ptr->y][p_ptr->x];
5720 /* Verify a store */
5721 if (!cave_have_flag_grid(g_ptr, FF_STORE))
5723 msg_print(_("ここには店がありません。", "You see no store here."));
5727 /* Extract the store code */
5728 which = f_info[g_ptr->feat].subtype;
5730 old_town_num = p_ptr->town_num;
5731 if ((which == STORE_HOME) || (which == STORE_MUSEUM)) p_ptr->town_num = 1;
5732 if (current_floor_ptr->dun_level) p_ptr->town_num = NO_TOWN;
5733 inner_town_num = p_ptr->town_num;
5735 /* Hack -- Check the "locked doors" */
5736 if ((town_info[p_ptr->town_num].store[which].store_open >= current_world_ptr->game_turn) ||
5739 msg_print(_("ドアに鍵がかかっている。", "The doors are locked."));
5740 p_ptr->town_num = old_town_num;
5744 /* Calculate the number of store maintainances since the last visit */
5745 maintain_num = (current_world_ptr->game_turn - town_info[p_ptr->town_num].store[which].last_visit) / (TURNS_PER_TICK * STORE_TICKS);
5747 /* Maintain the store max. 10 times */
5748 if (maintain_num > 10) maintain_num = 10;
5752 /* Maintain the store */
5753 for (i = 0; i < maintain_num; i++)
5754 store_maint(p_ptr->town_num, which);
5756 /* Save the visit */
5757 town_info[p_ptr->town_num].store[which].last_visit = current_world_ptr->game_turn;
5763 /* Hack -- Character is in "icky" mode */
5764 character_icky = TRUE;
5771 /* Do not expand macros */
5772 get_com_no_macros = TRUE;
5774 /* Save the store number */
5775 cur_store_num = which;
5777 /* Hack -- save the store feature */
5778 cur_store_feat = g_ptr->feat;
5780 /* Save the store and owner pointers */
5781 st_ptr = &town_info[p_ptr->town_num].store[cur_store_num];
5782 ot_ptr = &owners[cur_store_num][st_ptr->owner];
5784 /* Start at the beginning */
5787 play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_BUILD);
5792 leave_store = FALSE;
5794 /* Interact with player */
5795 while (!leave_store)
5797 /* Hack -- Clear line 1 */
5801 clear_from(20 + xtra_stock);
5803 /* Basic commands */
5804 prt(_(" ESC) 建物から出る", " ESC) Exit from Building."), 21 + xtra_stock, 0);
5806 /* Browse if necessary */
5807 if (st_ptr->stock_num > store_bottom)
5809 prt(_(" -)前ページ", " -) Previous page"), 22 + xtra_stock, 0);
5810 prt(_(" スペース) 次ページ", " SPACE) Next page"), 23 + xtra_stock, 0);
5814 if (cur_store_num == STORE_HOME)
5816 prt(_("g) アイテムを取る", "g) Get an item."), 21 + xtra_stock, 27);
5817 prt(_("d) アイテムを置く", "d) Drop an item."), 22 + xtra_stock, 27);
5818 prt(_("x) 家のアイテムを調べる", "x) eXamine an item in the home."), 23 + xtra_stock, 27);
5821 /* Museum commands */
5822 else if (cur_store_num == STORE_MUSEUM)
5824 prt(_("d) アイテムを置く", "d) Drop an item."), 21 + xtra_stock, 27);
5825 prt(_("r) アイテムの展示をやめる", "r) order to Remove an item."), 22 + xtra_stock, 27);
5826 prt(_("x) 博物館のアイテムを調べる", "x) eXamine an item in the museum."), 23 + xtra_stock, 27);
5832 prt(_("p) 商品を買う", "p) Purchase an item."), 21 + xtra_stock, 30);
5833 prt(_("s) アイテムを売る", "s) Sell an item."), 22 + xtra_stock, 30);
5834 prt(_("x) 商品を調べる", "x) eXamine an item in the shop"), 23 + xtra_stock,30);
5838 prt(_("i/e) 持ち物/装備の一覧", "i/e) Inventry/Equipment list"), 21 + xtra_stock, 56);
5840 if (rogue_like_commands)
5842 prt(_("w/T) 装備する/はずす", "w/T) Wear/Take off equipment"), 22 + xtra_stock, 56);
5846 prt(_("w/t) 装備する/はずす", "w/t) Wear/Take off equipment"), 22 + xtra_stock, 56);
5850 prt(_("コマンド:", "You may: "), 20 + xtra_stock, 0);
5852 request_command(TRUE);
5854 /* Process the command */
5855 store_process_command();
5858 * Hack -- To redraw missiles damage and prices in store
5859 * If player's charisma changes, or if player changes a bow, PU_BONUS is set
5861 need_redraw_store_inv = (p_ptr->update & PU_BONUS) ? TRUE : FALSE;
5863 /* Hack -- Character is still in "icky" mode */
5864 character_icky = TRUE;
5869 if (p_ptr->inventory_list[INVEN_PACK].k_idx)
5871 INVENTORY_IDX item = INVEN_PACK;
5873 object_type *o_ptr = &p_ptr->inventory_list[item];
5875 /* Hack -- Flee from the store */
5876 if (cur_store_num != STORE_HOME)
5878 if (cur_store_num == STORE_MUSEUM)
5879 msg_print(_("ザックからアイテムがあふれそうなので、あわてて博物館から出た...", "Your pack is so full that you flee the Museum..."));
5881 msg_print(_("ザックからアイテムがあふれそうなので、あわてて店から出た...", "Your pack is so full that you flee the store..."));
5887 /* Hack -- Flee from the home */
5888 else if (!store_check_num(o_ptr))
5890 msg_print(_("ザックからアイテムがあふれそうなので、あわてて家から出た...", "Your pack is so full that you flee your home..."));
5895 /* Hack -- Drop items into the home */
5903 GAME_TEXT o_name[MAX_NLEN];
5905 /* Give a message */
5906 msg_print(_("ザックからアイテムがあふれてしまった!", "Your pack overflows!"));
5910 object_copy(q_ptr, o_ptr);
5911 object_desc(o_name, q_ptr, 0);
5913 msg_format(_("%sが落ちた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
5915 /* Remove it from the players p_ptr->inventory_list */
5916 inven_item_increase(item, -255);
5917 inven_item_describe(item);
5918 inven_item_optimize(item);
5921 /* Let the home carry it */
5922 item_pos = home_carry(q_ptr);
5924 /* Redraw the home */
5927 store_top = (item_pos / store_bottom) * store_bottom;
5928 display_inventory();
5933 /* Hack -- Redisplay store prices if charisma changes */
5934 /* Hack -- Redraw missiles damage if player changes bow */
5935 if (need_redraw_store_inv) display_inventory();
5937 /* Hack -- get kicked out of the store */
5938 if (st_ptr->store_open >= current_world_ptr->game_turn) leave_store = TRUE;
5941 select_floor_music();
5943 p_ptr->town_num = old_town_num;
5945 take_turn(p_ptr, 100);
5947 /* Hack -- Character is no longer in "icky" mode */
5948 character_icky = FALSE;
5950 /* Hack -- Cancel automatic command */
5953 /* Hack -- Cancel "see" mode */
5954 command_see = FALSE;
5956 /* Allow expanding macros */
5957 get_com_no_macros = FALSE;
5962 /* Update everything */
5963 p_ptr->update |= (PU_VIEW | PU_LITE | PU_MON_LITE);
5964 p_ptr->update |= (PU_MONSTERS);
5966 /* Redraw entire screen */
5967 p_ptr->redraw |= (PR_BASIC | PR_EXTRA | PR_EQUIPPY);
5968 p_ptr->redraw |= (PR_MAP);
5969 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
5975 * @brief 現在の町の店主を交代させる /
5976 * Shuffle one of the stores.
5977 * @param which 店舗種類のID
5980 void store_shuffle(int which)
5986 if (which == STORE_HOME) return;
5987 if (which == STORE_MUSEUM) return;
5990 /* Save the store index */
5991 cur_store_num = which;
5993 /* Activate that store */
5994 st_ptr = &town_info[p_ptr->town_num].store[cur_store_num];
5997 /* Pick a new owner */
6000 st_ptr->owner = (byte)randint0(MAX_OWNERS);
6001 if (j == st_ptr->owner) continue;
6002 for (i = 1;i < max_towns; i++)
6004 if (i == p_ptr->town_num) continue;
6005 if (st_ptr->owner == town_info[i].store[cur_store_num].owner) break;
6007 if (i == max_towns) break;
6010 /* Activate the new owner */
6011 ot_ptr = &owners[cur_store_num][st_ptr->owner];
6014 /* Reset the owner data */
6015 st_ptr->insult_cur = 0;
6016 st_ptr->store_open = 0;
6017 st_ptr->good_buy = 0;
6018 st_ptr->bad_buy = 0;
6021 /* Hack -- discount all the items */
6022 for (i = 0; i < st_ptr->stock_num; i++)
6026 o_ptr = &st_ptr->stock[i];
6028 if (!object_is_artifact(o_ptr))
6030 /* Hack -- Sell all non-artifact old items for "half price" */
6031 o_ptr->discount = 50;
6033 /* Hack -- Items are no longer "fixed price" */
6034 o_ptr->ident &= ~(IDENT_FIXED);
6036 /* Mega-Hack -- Note that the item is "on sale" */
6037 o_ptr->inscription = quark_add(_("売出中", "on sale"));
6044 * @brief 店の品揃えを変化させる /
6045 * Maintain the p_ptr->inventory_list at the stores.
6046 * @param town_num 町のID
6047 * @param store_num 店舗種類のID
6050 void store_maint(int town_num, int store_num)
6054 cur_store_num = store_num;
6057 if (store_num == STORE_HOME) return;
6058 if (store_num == STORE_MUSEUM) return;
6060 /* Activate that store */
6061 st_ptr = &town_info[town_num].store[store_num];
6063 /* Activate the owner */
6064 ot_ptr = &owners[store_num][st_ptr->owner];
6066 /* Store keeper forgives the player */
6067 st_ptr->insult_cur = 0;
6069 /* Mega-Hack -- prune the black market */
6070 if (store_num == STORE_BLACK)
6072 /* Destroy crappy black market items */
6073 for (j = st_ptr->stock_num - 1; j >= 0; j--)
6075 object_type *o_ptr = &st_ptr->stock[j];
6077 /* Destroy crappy items */
6078 if (black_market_crap(o_ptr))
6080 /* Destroy the item */
6081 store_item_increase(j, 0 - o_ptr->number);
6082 store_item_optimize(j);
6088 /* Choose the number of slots to keep */
6089 j = st_ptr->stock_num;
6091 /* Sell a few items */
6092 j = j - randint1(STORE_TURNOVER);
6094 /* Never keep more than "STORE_MAX_KEEP" slots */
6095 if (j > STORE_MAX_KEEP) j = STORE_MAX_KEEP;
6097 /* Always "keep" at least "STORE_MIN_KEEP" items */
6098 if (j < STORE_MIN_KEEP) j = STORE_MIN_KEEP;
6100 /* Hack -- prevent "underflow" */
6103 /* Destroy objects until only "j" slots are left */
6104 while (st_ptr->stock_num > j) store_delete();
6107 /* Choose the number of slots to fill */
6108 j = st_ptr->stock_num;
6110 /* Buy some more items */
6111 j = j + randint1(STORE_TURNOVER);
6113 /* Never keep more than "STORE_MAX_KEEP" slots */
6114 if (j > STORE_MAX_KEEP) j = STORE_MAX_KEEP;
6116 /* Always "keep" at least "STORE_MIN_KEEP" items */
6117 if (j < STORE_MIN_KEEP) j = STORE_MIN_KEEP;
6119 /* Hack -- prevent "overflow" */
6120 if (j >= st_ptr->stock_size) j = st_ptr->stock_size - 1;
6122 /* Acquire some new items */
6123 while (st_ptr->stock_num < j) store_create();
6128 * @brief 店舗情報を初期化する /
6129 * Initialize the stores
6130 * @param town_num 町のID
6131 * @param store_num 店舗種類のID
6134 void store_init(int town_num, int store_num)
6137 cur_store_num = store_num;
6139 /* Activate that store */
6140 st_ptr = &town_info[town_num].store[store_num];
6148 st_ptr->owner = (byte)randint0(MAX_OWNERS);
6149 for (i = 1;i < max_towns; i++)
6151 if (i == town_num) continue;
6152 if (st_ptr->owner == town_info[i].store[store_num].owner) break;
6154 if (i == max_towns) break;
6157 /* Activate the new owner */
6158 ot_ptr = &owners[store_num][st_ptr->owner];
6161 /* Initialize the store */
6162 st_ptr->store_open = 0;
6163 st_ptr->insult_cur = 0;
6164 st_ptr->good_buy = 0;
6165 st_ptr->bad_buy = 0;
6167 /* Nothing in stock */
6168 st_ptr->stock_num = 0;
6171 * MEGA-HACK - Last visit to store is
6172 * BEFORE player birth to enable store restocking
6174 st_ptr->last_visit = -10L * TURNS_PER_TICK * STORE_TICKS;
6176 /* Clear any old items */
6177 for (k = 0; k < st_ptr->stock_size; k++)
6179 object_wipe(&st_ptr->stock[k]);
6185 * @brief アイテムを町のブラックマーケットに移動させる /
6186 * @param o_ptr 移動させたいオブジェクトの構造体参照ポインタ
6189 void move_to_black_market(object_type *o_ptr)
6192 if (!p_ptr->town_num) return;
6194 st_ptr = &town_info[p_ptr->town_num].store[STORE_BLACK];
6196 o_ptr->ident |= IDENT_STORE;
6198 (void)store_carry(o_ptr);
6200 object_wipe(o_ptr); /* Don't leave a bogus object behind... */