3 * @brief 店の処理 / Store commands
6 * Copyright (c) 1989 James E. Wilson, Robert A. Koeneke\n
7 * This software may be copied and distributed for educational, research, and\n
8 * not for profit purposes provided that this copyright and statement are\n
9 * included in all such copies.\n
10 * 2014 Deskull rearranged comment for Doxygen.
15 #include "cmd-zapwand.h"
16 #include "cmd-magiceat.h"
19 #include "cmd-spell.h"
25 * @brief 闘技場のモンスターID及び報酬アイテムテーブル /
26 * Store owners (exactly four "possible" owners per store, chosen randomly)
29 * { name, purse, max greed, min greed, haggle_per, tolerance, race, unused }
31 * Lifted extra shopkeepers from CthAngband (don't you just love open source
32 * development? ;-)). Since this gave less than 32 unique names for some
33 * shops, those have their first x names copied to reach 32.
35 * For the weapon and armour shops, several owners have a limit of 5k.
37 * I want to do 50k owners, but the purse is currently s16b. Perhaps
38 * we should just store 1/10th of the purse?
41 const owner_type owners[MAX_STORES][MAX_OWNERS] =
44 /* General store - 32 unique names */
46 Raistlin は dragonlance の powerful wizard 。
47 Rincewind the Chicken は Terry Pratchett の Discworld の登場人物 上記のパロディ?、
48 { "憶病者ラストリン", 200, 175, 108, 4, 12, RACE_HUMAN},
49 { "Raistlin the Chicken", 200, 175, 108, 4, 12, RACE_HUMAN},
53 { "フレンドリーなビルボ", 200, 170, 108, 5, 15, RACE_HOBBIT},
54 { "憶病者リンスウィンド", 200, 175, 108, 4, 12, RACE_HUMAN},
55 { "背の低いサルタン", 300, 170, 107, 5, 15, RACE_GNOME},
56 { "ハンサムなライア=エル", 300, 165, 107, 6, 18, RACE_ELF},
57 { "親切なファリルマウエン", 250, 170, 108, 5, 15, RACE_HOBBIT},
58 { "臆病者ヴォワラン", 500, 175, 108, 4, 12, RACE_HUMAN},
59 { "チビのエラシュナク", 750, 170, 107, 5, 15, RACE_BEASTMAN},
60 { "ハンサムなグラッグ", 1000, 165, 107, 6, 18, RACE_HALF_TITAN},
61 { "ケチなフォロビア", 250, 170, 108, 5, 15, RACE_HUMAN},
62 { "馬鹿のエリス", 500, 175, 108, 4, 12, RACE_HUMAN},
63 { "腹ペコのフィルバート", 750, 170, 107, 5, 15, RACE_VAMPIRE},
64 { "スナーグル・サシグア", 1000, 165, 107, 6, 18, RACE_MIND_FLAYER},
65 { "長死きエロワーズ", 250, 170, 108, 5, 15, RACE_SPECTRE},
66 { "ノロマのフンディ", 500, 175, 108, 4, 12, RACE_ZOMBIE},
67 { "グランサス", 750, 170, 107, 5, 15, RACE_SKELETON},
68 { "丁寧なロラックス", 1000, 165, 107, 6, 18, RACE_VAMPIRE},
69 { "ブッチ", 250, 170, 108, 5, 15, RACE_HALF_ORC},
70 { "美しきエルベレス", 500, 175, 108, 4, 12, RACE_HIGH_ELF},
71 { "こそこそサーレス", 750, 170, 107, 5, 15, RACE_GNOME},
72 { "ナーロック", 1000, 165, 107, 6, 18, RACE_DWARF},
73 { "チビのヘイネッカ", 250, 170, 108, 5, 15, RACE_GNOME},
74 { "きちがいロワラン", 500, 175, 108, 4, 12, RACE_HALF_GIANT},
75 { "毒息のウート", 750, 170, 107, 5, 15, RACE_DRACONIAN},
76 { "でぶっちょアラァカ", 1000, 165, 107, 6, 18, RACE_DRACONIAN},
77 { "低能なプーゴー", 250, 170, 108, 5, 15, RACE_BEASTMAN},
78 { "フェロールフィリアン", 500, 175, 108, 4, 12, RACE_ELF},
79 { "年寄りマロカ", 750, 170, 107, 5, 15, RACE_GNOME},
80 { "勇敢なサシン", 1000, 165, 107, 6, 18, RACE_HALF_GIANT},
81 { "田舎者アビエマール", 250, 170, 108, 5, 15, RACE_HUMAN},
82 { "貧乏なハーク", 500, 175, 108, 4, 12, RACE_HALF_ORC},
83 { "みじめなソアリン", 750, 170, 107, 5, 15, RACE_ZOMBIE},
84 { "質素なメルラ", 1000, 165, 107, 6, 18, RACE_ELF},
86 { "Bilbo the Friendly", 200, 170, 108, 5, 15, RACE_HOBBIT},
87 { "Rincewind the Chicken", 200, 175, 108, 4, 12, RACE_HUMAN},
88 { "Sultan the Midget", 300, 170, 107, 5, 15, RACE_GNOME},
89 { "Lyar-el the Comely", 300, 165, 107, 6, 18, RACE_ELF},
90 { "Falilmawen the Friendly", 250, 170, 108, 5, 15, RACE_HOBBIT},
91 { "Voirin the Cowardly", 500, 175, 108, 4, 12, RACE_HUMAN},
92 { "Erashnak the Midget", 750, 170, 107, 5, 15, RACE_BEASTMAN},
93 { "Grug the Comely", 1000, 165, 107, 6, 18, RACE_HALF_TITAN},
94 { "Forovir the Cheap", 250, 170, 108, 5, 15, RACE_HUMAN},
95 { "Ellis the Fool", 500, 175, 108, 4, 12, RACE_HUMAN},
96 { "Filbert the Hungry", 750, 170, 107, 5, 15, RACE_VAMPIRE},
97 { "Fthnargl Psathiggua", 1000, 165, 107, 6, 18, RACE_MIND_FLAYER},
98 { "Eloise Long-Dead", 250, 170, 108, 5, 15, RACE_SPECTRE},
99 { "Fundi the Slow", 500, 175, 108, 4, 12, RACE_ZOMBIE},
100 { "Granthus", 750, 170, 107, 5, 15, RACE_SKELETON},
101 { "Lorax the Suave", 1000, 165, 107, 6, 18, RACE_VAMPIRE},
102 { "Butch", 250, 170, 108, 5, 15, RACE_HALF_ORC},
103 { "Elbereth the Beautiful", 500, 175, 108, 4, 12, RACE_HIGH_ELF},
104 { "Sarleth the Sneaky", 750, 170, 107, 5, 15, RACE_GNOME},
105 { "Narlock", 1000, 165, 107, 6, 18, RACE_DWARF},
106 { "Haneka the Small", 250, 170, 108, 5, 15, RACE_GNOME},
107 { "Loirin the Mad", 500, 175, 108, 4, 12, RACE_HALF_GIANT},
108 { "Wuto Poisonbreath", 750, 170, 107, 5, 15, RACE_DRACONIAN},
109 { "Araaka the Rotund", 1000, 165, 107, 6, 18, RACE_DRACONIAN},
110 { "Poogor the Dumb", 250, 170, 108, 5, 15, RACE_BEASTMAN},
111 { "Felorfiliand", 500, 175, 108, 4, 12, RACE_ELF},
112 { "Maroka the Aged", 750, 170, 107, 5, 15, RACE_GNOME},
113 { "Sasin the Bold", 1000, 165, 107, 6, 18, RACE_HALF_GIANT},
114 { "Abiemar the Peasant", 250, 170, 108, 5, 15, RACE_HUMAN},
115 { "Hurk the Poor", 500, 175, 108, 4, 12, RACE_HALF_ORC},
116 { "Soalin the Wretched", 750, 170, 107, 5, 15, RACE_ZOMBIE},
117 { "Merulla the Humble", 1000, 165, 107, 6, 18, RACE_ELF},
121 /* Armoury - 28 unique names */
123 { "醜悪コン=ダー", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
124 { "頑固者ダーグ=ロウ", 10000, 190, 111, 4, 9, RACE_HUMAN},
125 { "賢者デカド", 25000, 200, 112, 4, 10, RACE_DUNADAN},
126 { "鍛冶屋のウィーランド", 30000, 200, 112, 4, 5, RACE_DWARF},
127 { "醜悪コン=ダー", 10000, 210, 115, 5, 7, RACE_HALF_ORC},
128 { "頑固者ダーグ=ロウ", 15000, 190, 111, 4, 9, RACE_HUMAN},
129 { "ハンサムなデカド", 25000, 200, 112, 4, 10, RACE_AMBERITE},
130 { "エロー・ドラゴンスケイル", 30000, 200, 112, 4, 5, RACE_ELF},
131 { "デリカトス", 10000, 210, 115, 5, 7, RACE_SPRITE},
132 { "巨大なグルース", 15000, 190, 111, 4, 9, RACE_HALF_GIANT},
133 { "アニムス", 25000, 200, 112, 4, 10, RACE_GOLEM},
134 { "マルヴァス", 30000, 200, 112, 4, 5, RACE_HALF_TITAN},
135 { "セラクシス", 10000, 210, 115, 5, 7, RACE_ZOMBIE},
136 { "デス・チル", 5000, 190, 111, 4, 9, RACE_SPECTRE},
137 { "微かなドリオス", 25000, 200, 112, 4, 10, RACE_SPECTRE},
138 { "冷たいバスリック", 30000, 200, 112, 4, 5, RACE_VAMPIRE},
139 { "冷酷ヴェンジェラ", 10000, 210, 115, 5, 7, RACE_HALF_TROLL},
140 { "強者ウィラナ", 15000, 190, 111, 4, 9, RACE_HUMAN},
141 { "ヨジョ二世", 25000, 200, 112, 4, 10, RACE_DWARF},
142 { "優しいラナラー", 30000, 200, 112, 4, 5, RACE_AMBERITE},
143 { "不浄のホルバグ", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
144 { "テレパスのエレレン", 15000, 190, 111, 4, 9, RACE_DARK_ELF},
145 { "イスドリリアス", 25000, 200, 112, 4, 10, RACE_SPRITE},
146 { "一つ目ヴェグナー", 5000, 200, 112, 4, 5, RACE_CYCLOPS},
147 { "混沌のロディッシュ", 10000, 210, 115, 5, 7, RACE_BEASTMAN},
148 { "剣豪ヘジン", 15000, 190, 111, 4, 9, RACE_NIBELUNG},
149 { "ずる屋のエルベレリス", 10000, 200, 112, 4, 10, RACE_DARK_ELF},
150 { "インプのザサス", 30000, 200, 112, 4, 5, RACE_IMP},
151 { "醜悪コン=ダー", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
152 { "頑固者ダーグ=ロウ", 10000, 190, 111, 4, 9, RACE_HUMAN},
153 { "ハンサムなデカド", 25000, 200, 112, 4, 10, RACE_AMBERITE},
154 { "鍛冶屋のウィーランド", 30000, 200, 112, 4, 5, RACE_DWARF},
156 { "Kon-Dar the Ugly", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
157 { "Darg-Low the Grim", 10000, 190, 111, 4, 9, RACE_HUMAN},
158 { "Decado the Handsome", 25000, 200, 112, 4, 10, RACE_DUNADAN},
159 { "Wieland the Smith", 30000, 200, 112, 4, 5, RACE_DWARF},
160 { "Kon-Dar the Ugly", 10000, 210, 115, 5, 7, RACE_HALF_ORC},
161 { "Darg-Low the Grim", 15000, 190, 111, 4, 9, RACE_HUMAN},
162 { "Decado the Handsome", 25000, 200, 112, 4, 10, RACE_AMBERITE},
163 { "Elo Dragonscale", 30000, 200, 112, 4, 5, RACE_ELF},
164 { "Delicatus", 10000, 210, 115, 5, 7, RACE_SPRITE},
165 { "Gruce the Huge", 15000, 190, 111, 4, 9, RACE_HALF_GIANT},
166 { "Animus", 25000, 200, 112, 4, 10, RACE_GOLEM},
167 { "Malvus", 30000, 200, 112, 4, 5, RACE_HALF_TITAN},
168 { "Selaxis", 10000, 210, 115, 5, 7, RACE_ZOMBIE},
169 { "Deathchill", 5000, 190, 111, 4, 9, RACE_SPECTRE},
170 { "Drios the Faint", 25000, 200, 112, 4, 10, RACE_SPECTRE},
171 { "Bathric the Cold", 30000, 200, 112, 4, 5, RACE_VAMPIRE},
172 { "Vengella the Cruel", 10000, 210, 115, 5, 7, RACE_HALF_TROLL},
173 { "Wyrana the Mighty", 15000, 190, 111, 4, 9, RACE_HUMAN},
174 { "Yojo II", 25000, 200, 112, 4, 10, RACE_DWARF},
175 { "Ranalar the Sweet", 30000, 200, 112, 4, 5, RACE_AMBERITE},
176 { "Horbag the Unclean", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
177 { "Elelen the Telepath", 15000, 190, 111, 4, 9, RACE_DARK_ELF},
178 { "Isedrelias", 25000, 200, 112, 4, 10, RACE_SPRITE},
179 { "Vegnar One-eye", 5000, 200, 112, 4, 5, RACE_CYCLOPS},
180 { "Rodish the Chaotic", 10000, 210, 115, 5, 7, RACE_BEASTMAN},
181 { "Hesin Swordmaster", 15000, 190, 111, 4, 9, RACE_NIBELUNG},
182 { "Elvererith the Cheat", 10000, 200, 112, 4, 10, RACE_DARK_ELF},
183 { "Zzathath the Imp", 30000, 200, 112, 4, 5, RACE_IMP},
184 { "Kon-Dar the Ugly", 5000, 210, 115, 5, 7, RACE_HALF_ORC},
185 { "Darg-Low the Grim", 10000, 190, 111, 4, 9, RACE_HUMAN},
186 { "Decado the Handsome", 25000, 200, 112, 4, 10, RACE_AMBERITE},
187 { "Wieland the Smith", 30000, 200, 112, 4, 5, RACE_DWARF},
192 /* Weapon Smith - 28 unique names */
194 { "残忍なるアーノルド", 5000, 210, 115, 6, 6, RACE_HALF_TROLL},
195 { "獣殺しのアーンダル", 10000, 185, 110, 5, 9, RACE_HALF_ELF},
196 { "獣マスターのエディー", 25000, 190, 115, 5, 7, RACE_HOBBIT},
197 { "竜殺しのオグライン", 30000, 195, 112, 4, 8, RACE_DWARF},
198 { "熟練者ドリュー", 10000, 210, 115, 6, 6, RACE_HUMAN},
199 { "龍の子オラックス", 15000, 185, 110, 5, 9, RACE_DRACONIAN},
200 { "病気持ちのアンスラックス", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
201 { "頑丈者アルコス", 30000, 195, 112, 4, 8, RACE_DWARF},
202 { "腐れ者のサリアス", 5000, 210, 115, 6, 6, RACE_ZOMBIE},
203 { "晒し骨のトゥエシク", 15000, 185, 110, 5, 9, RACE_SKELETON},
204 { "ビリオス", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
205 { "ファスガル", 30000, 195, 112, 4, 8, RACE_ZOMBIE},
206 { "パラディンのエレフリス", 10000, 210, 115, 6, 6, RACE_BARBARIAN},
207 { "キ'トリッ'ク", 15000, 185, 110, 5, 9, RACE_KLACKON},
208 { "蜘蛛の友ドゥロカス", 25000, 190, 115, 5, 7, RACE_DARK_ELF},
209 { "巨人殺しのフングス", 30000, 195, 112, 4, 8, RACE_DWARF},
210 { "デランサ", 10000, 210, 115, 6, 6, RACE_ELF},
211 { "レンジャーのソルビスタニ", 15000, 185, 110, 5, 9, RACE_HALF_ELF},
212 { "ノロマのゾリル", 25000, 190, 115, 5, 7, RACE_GOLEM},
213 { "イーオン・フラックス", 20000, 195, 112, 4, 8, RACE_HALF_ELF},
214 { "強者ナドック", 10000, 210, 115, 6, 6, RACE_HOBBIT},
215 { "弱虫エラモグ", 15000, 185, 110, 5, 9, RACE_KOBOLD},
216 { "公正なエオウィリス", 25000, 190, 115, 5, 7, RACE_VAMPIRE},
217 { "バルログ殺しのヒュイモグ", 30000, 195, 112, 4, 8, RACE_HALF_ORC},
218 { "冷酷ピーダス", 5000, 210, 115, 6, 6, RACE_HUMAN},
219 { "ヴァモグ スレイヤー", 15000, 185, 110, 5, 9, RACE_HALF_OGRE},
220 { "性悪フーシュナク", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
221 { "舞闘バレン", 30000, 195, 112, 4, 8, RACE_BARBARIAN},
222 { "残忍なるアーノルド", 5000, 210, 115, 6, 6, RACE_BARBARIAN},
223 { "獣殺しのアーンダル", 10000, 185, 110, 5, 9, RACE_HALF_ELF},
224 { "ビーストマスター・エディー", 25000, 190, 115, 5, 7, RACE_HALF_ORC},
225 { "竜殺しのオグライン", 30000, 195, 112, 4, 8, RACE_DWARF},
227 { "Arnold the Beastly", 5000, 210, 115, 6, 6, RACE_BARBARIAN},
228 { "Arndal Beast-Slayer", 10000, 185, 110, 5, 9, RACE_HALF_ELF},
229 { "Eddie Beast-Master", 25000, 190, 115, 5, 7, RACE_HALF_ORC},
230 { "Oglign Dragon-Slayer", 30000, 195, 112, 4, 8, RACE_DWARF},
231 { "Drew the Skilled", 10000, 210, 115, 6, 6, RACE_HUMAN},
232 { "Orrax Dragonson", 15000, 185, 110, 5, 9, RACE_DRACONIAN},
233 { "Anthrax Disease-Carrier", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
234 { "Arkhoth the Stout", 30000, 195, 112, 4, 8, RACE_DWARF},
235 { "Sarlyas the Rotten", 5000, 210, 115, 6, 6, RACE_ZOMBIE},
236 { "Tuethic Bare-Bones", 15000, 185, 110, 5, 9, RACE_SKELETON},
237 { "Bilious", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
238 { "Fasgul", 30000, 195, 112, 4, 8, RACE_ZOMBIE},
239 { "Ellefris the Paladin", 10000, 210, 115, 6, 6, RACE_BARBARIAN},
240 { "K'trrik'k", 15000, 185, 110, 5, 9, RACE_KLACKON},
241 { "Drocus Spiderfriend", 25000, 190, 115, 5, 7, RACE_DARK_ELF},
242 { "Fungus Giant-Slayer", 30000, 195, 112, 4, 8, RACE_DWARF},
243 { "Delantha", 10000, 210, 115, 6, 6, RACE_ELF},
244 { "Solvistani the Ranger", 15000, 185, 110, 5, 9, RACE_HALF_ELF},
245 { "Xoril the Slow", 25000, 190, 115, 5, 7, RACE_GOLEM},
246 { "Aeon Flux", 20000, 195, 112, 4, 8, RACE_HALF_ELF},
247 { "Nadoc the Strong", 10000, 210, 115, 6, 6, RACE_HOBBIT},
248 { "Eramog the Weak", 15000, 185, 110, 5, 9, RACE_KOBOLD},
249 { "Eowilith the Fair", 25000, 190, 115, 5, 7, RACE_VAMPIRE},
250 { "Huimog Balrog-Slayer", 30000, 195, 112, 4, 8, RACE_HALF_ORC},
251 { "Peadus the Cruel", 5000, 210, 115, 6, 6, RACE_HUMAN},
252 { "Vamog Slayer", 15000, 185, 110, 5, 9, RACE_HALF_OGRE},
253 { "Hooshnak the Vicious", 25000, 190, 115, 5, 7, RACE_BEASTMAN},
254 { "Balenn War-Dancer", 30000, 195, 112, 4, 8, RACE_BARBARIAN},
255 { "Arnold the Beastly", 5000, 210, 115, 6, 6, RACE_BARBARIAN},
256 { "Arndal Beast-Slayer", 10000, 185, 110, 5, 9, RACE_HALF_ELF},
257 { "Eddie Beast-Master", 25000, 190, 115, 5, 7, RACE_HALF_ORC},
258 { "Oglign Dragon-Slayer", 30000, 195, 112, 4, 8, RACE_DWARF},
262 /* Temple - 22 unique names */
264 { "質素なルードヴィヒ", 5000, 175, 109, 6, 15, RACE_HUMAN},
265 { "パラディンのガンナー", 10000, 185, 110, 5, 23, RACE_HUMAN},
266 { "選ばれしトリン", 25000, 180, 107, 6, 20, RACE_ELF},
267 { "賢明なるサラストロ", 30000, 185, 109, 5, 15, RACE_DWARF},
268 { "パーシヴァル卿", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
269 { "神聖なるアセナス", 30000, 185, 109, 5, 15, RACE_HUMAN},
270 { "マッキノン", 10000, 175, 109, 6, 15, RACE_HUMAN},
271 { "謹み婦人", 15000, 185, 110, 5, 23, RACE_HIGH_ELF},
272 { "ドルイドのハシュニック", 25000, 180, 107, 6, 20, RACE_HOBBIT},
273 { "フィナク", 30000, 185, 109, 5, 15, RACE_YEEK},
274 { "クリキック", 10000, 175, 109, 6, 15, RACE_KLACKON},
275 { "荒くれ者モリヴァル", 15000, 185, 110, 5, 23, RACE_ELF},
276 { "暗きホシャック", 25000, 180, 107, 6, 20, RACE_IMP},
277 { "賢者アタール", 30000, 185, 109, 5, 15, RACE_HUMAN},
278 { "清きイベニッド", 10000, 175, 109, 6, 15, RACE_HUMAN},
279 { "エリディシュ", 15000, 185, 110, 5, 23, RACE_HALF_TROLL},
280 { "呪術師ヴルドゥシュ", 25000, 180, 107, 6, 20, RACE_HALF_OGRE},
281 { "狂戦士ハオブ", 30000, 185, 109, 5, 15, RACE_BARBARIAN},
282 { "若きプルーグディシュ", 10000, 175, 109, 6, 15, RACE_HALF_OGRE},
283 { "きちがいラムワイズ", 15000, 185, 110, 5, 23, RACE_YEEK},
284 { "有徳者ムワート", 25000, 180, 107, 6, 20, RACE_KOBOLD},
285 { "弱虫ダードバード", 30000, 185, 109, 5, 15, RACE_SPECTRE},
286 { "質素なルードヴィヒ", 5000, 175, 109, 6, 15, RACE_HUMAN},
287 { "パラディンのガンナー", 10000, 185, 110, 5, 23, RACE_HUMAN},
288 { "選ばれしトリン", 25000, 180, 107, 6, 20, RACE_ELF},
289 { "賢明なるサラストロ", 30000, 185, 109, 5, 15, RACE_DWARF},
290 { "パーシヴァル卿", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
291 { "神聖なるアセナス", 30000, 185, 109, 5, 15, RACE_HUMAN},
292 { "マッキノン", 10000, 175, 109, 6, 15, RACE_HUMAN},
293 { "謹み婦人", 15000, 185, 110, 5, 23, RACE_HIGH_ELF},
294 { "ドルイドのハシュニック", 25000, 180, 107, 6, 20, RACE_HOBBIT},
295 { "フィナク", 30000, 185, 109, 5, 15, RACE_YEEK},
297 { "Ludwig the Humble", 5000, 175, 109, 6, 15, RACE_DWARF},
298 { "Gunnar the Paladin", 10000, 185, 110, 5, 23, RACE_HALF_TROLL},
299 { "Torin the Chosen", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
300 { "Sarastro the Wise", 30000, 185, 109, 5, 15, RACE_HUMAN},
301 { "Sir Parsival the Pure", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
302 { "Asenath the Holy", 30000, 185, 109, 5, 15, RACE_HUMAN},
303 { "McKinnon", 10000, 175, 109, 6, 15, RACE_HUMAN},
304 { "Mistress Chastity", 15000, 185, 110, 5, 23, RACE_HIGH_ELF},
305 { "Hashnik the Druid", 25000, 180, 107, 6, 20, RACE_HOBBIT},
306 { "Finak", 30000, 185, 109, 5, 15, RACE_YEEK},
307 { "Krikkik", 10000, 175, 109, 6, 15, RACE_KLACKON},
308 { "Morival the Wild", 15000, 185, 110, 5, 23, RACE_ELF},
309 { "Hoshak the Dark", 25000, 180, 107, 6, 20, RACE_IMP},
310 { "Atal the Wise", 30000, 185, 109, 5, 15, RACE_HUMAN},
311 { "Ibenidd the Chaste", 10000, 175, 109, 6, 15, RACE_HUMAN},
312 { "Eridish", 15000, 185, 110, 5, 23, RACE_HALF_TROLL},
313 { "Vrudush the Shaman", 25000, 180, 107, 6, 20, RACE_HALF_OGRE},
314 { "Haob the Berserker", 30000, 185, 109, 5, 15, RACE_BARBARIAN},
315 { "Proogdish the Youthfull", 10000, 175, 109, 6, 15, RACE_HALF_OGRE},
316 { "Lumwise the Mad", 15000, 185, 110, 5, 23, RACE_YEEK},
317 { "Muirt the Virtuous", 25000, 180, 107, 6, 20, RACE_KOBOLD},
318 { "Dardobard the Weak", 30000, 185, 109, 5, 15, RACE_SPECTRE},
319 { "Ludwig the Humble", 5000, 175, 109, 6, 15, RACE_DWARF},
320 { "Gunnar the Paladin", 10000, 185, 110, 5, 23, RACE_HALF_TROLL},
321 { "Torin the Chosen", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
322 { "Sarastro the Wise", 30000, 185, 109, 5, 15, RACE_HUMAN},
323 { "Sir Parsival the Pure", 25000, 180, 107, 6, 20, RACE_HIGH_ELF},
324 { "Asenath the Holy", 30000, 185, 109, 5, 15, RACE_HUMAN},
325 { "McKinnon", 10000, 175, 109, 6, 15, RACE_HUMAN},
326 { "Mistress Chastity", 15000, 185, 110, 5, 23, RACE_HIGH_ELF},
327 { "Hashnik the Druid", 25000, 180, 107, 6, 20, RACE_HOBBIT},
328 { "Finak", 30000, 185, 109, 5, 15, RACE_YEEK},
332 /* Alchemist - 26 unique names */
334 { "化学者マウザー", 10000, 190, 111, 5, 8, RACE_HALF_ELF},
335 { "カオスのウィズル", 10000, 190, 110, 6, 8, RACE_HOBBIT},
336 { "強欲ミダス", 15000, 200, 116, 6, 9, RACE_GNOME},
337 { "貧弱ジャ=ファー", 15000, 220, 111, 4, 9, RACE_ELF},/*FIRST*/
338 { "カカルラカカル", 15000, 200, 116, 6, 9, RACE_KLACKON},
339 { "錬金術師ジャル=エス", 15000, 220, 111, 4, 9, RACE_ELF},
340 { "用心深いファネラス", 10000, 190, 111, 5, 8, RACE_DWARF},
341 { "キチガイのルンシー", 10000, 190, 110, 6, 8, RACE_HUMAN},
342 { "グランブルワース", 15000, 200, 116, 6, 9, RACE_GNOME},
343 { "フリッター", 15000, 220, 111, 4, 9, RACE_SPRITE},
344 { "ザリルス", 10000, 190, 111, 5, 8, RACE_HUMAN},
345 { "古きエグバート", 10000, 190, 110, 6, 8, RACE_DWARF},
346 { "誇り高きヴァリンドラ", 15000, 200, 116, 6, 9, RACE_HIGH_ELF},
347 { "錬金術師タエン", 15000, 220, 111, 4, 9, RACE_HUMAN},
348 { "巧言カイド", 10000, 190, 111, 5, 8, RACE_VAMPIRE},
349 { "暗きフリア", 10000, 190, 110, 6, 8, RACE_NIBELUNG},
350 { "質素なドムリ", 15000, 200, 116, 6, 9, RACE_DWARF},
351 { "魔の子ヤァジュッカ", 15000, 220, 111, 4, 9, RACE_IMP},
352 { "薬草師ジェララルドール", 10000, 190, 111, 5, 8, RACE_HIGH_ELF},
353 { "賢者オレラルダン", 10000, 190, 110, 6, 8, RACE_BARBARIAN},
354 { "デモニシストのフゾグロ", 15000, 200, 116, 6, 9, RACE_IMP},
355 { "錬金術師ドゥリアシュ", 15000, 220, 111, 4, 9, RACE_HALF_ORC},
356 { "強者ネリア", 10000, 190, 111, 5, 8, RACE_CYCLOPS},
357 { "辛口リグナス", 10000, 190, 110, 6, 8, RACE_HALF_ORC},
358 { "ティルバ", 15000, 200, 116, 6, 9, RACE_HOBBIT},
359 { "金持ちミリルドリック", 15000, 220, 111, 4, 9, RACE_HUMAN},
361 { "科学者マウザー", 10000, 190, 111, 5, 8, RACE_HALF_ELF},
362 { "カオスのウィズル", 10000, 190, 110, 6, 8, RACE_HOBBIT},
363 { "強欲ミダス", 15000, 200, 116, 6, 9, RACE_GNOME},
364 { "錬金術師ジャ=ファー", 15000, 220, 111, 4, 9, RACE_ELF},
365 { "カカルラカカル", 15000, 200, 116, 6, 9, RACE_KLACKON},
366 { "錬金術師ジャル=エス", 15000, 220, 111, 4, 9, RACE_ELF},
368 { "Mauser the Chemist", 10000, 190, 111, 5, 8, RACE_HALF_ELF},
369 { "Wizzle the Chaotic", 10000, 190, 110, 6, 8, RACE_HOBBIT},
370 { "Midas the Greedy", 15000, 200, 116, 6, 9, RACE_GNOME},
371 { "Ja-Far the Alchemist", 15000, 220, 111, 4, 9, RACE_ELF},
372 { "Kakalrakakal", 15000, 200, 116, 6, 9, RACE_KLACKON},
373 { "Jal-Eth the Alchemist", 15000, 220, 111, 4, 9, RACE_ELF},
374 { "Fanelath the Cautious", 10000, 190, 111, 5, 8, RACE_DWARF},
375 { "Runcie the Insane", 10000, 190, 110, 6, 8, RACE_HUMAN},
376 { "Grumbleworth", 15000, 200, 116, 6, 9, RACE_GNOME},
377 { "Flitter", 15000, 220, 111, 4, 9, RACE_SPRITE},
378 { "Xarillus", 10000, 190, 111, 5, 8, RACE_HUMAN},
379 { "Egbert the Old", 10000, 190, 110, 6, 8, RACE_DWARF},
380 { "Valindra the Proud", 15000, 200, 116, 6, 9, RACE_HIGH_ELF},
381 { "Taen the Alchemist", 15000, 220, 111, 4, 9, RACE_HUMAN},
382 { "Cayd the Sweet", 10000, 190, 111, 5, 8, RACE_VAMPIRE},
383 { "Fulir the Dark", 10000, 190, 110, 6, 8, RACE_NIBELUNG},
384 { "Domli the Humble", 15000, 200, 116, 6, 9, RACE_DWARF},
385 { "Yaarjukka Demonspawn", 15000, 220, 111, 4, 9, RACE_IMP},
386 { "Gelaraldor the Herbmaster", 10000, 190, 111, 5, 8, RACE_HIGH_ELF},
387 { "Olelaldan the Wise", 10000, 190, 110, 6, 8, RACE_BARBARIAN},
388 { "Fthoglo the Demonicist", 15000, 200, 116, 6, 9, RACE_IMP},
389 { "Dridash the Alchemist", 15000, 220, 111, 4, 9, RACE_HALF_ORC},
390 { "Nelir the Strong", 10000, 190, 111, 5, 8, RACE_CYCLOPS},
391 { "Lignus the Pungent", 10000, 190, 110, 6, 8, RACE_HALF_ORC},
392 { "Tilba", 15000, 200, 116, 6, 9, RACE_HOBBIT},
393 { "Myrildric the Wealthy", 15000, 220, 111, 4, 9, RACE_HUMAN},
395 { "Mauser the Chemist", 10000, 190, 111, 5, 8, RACE_HALF_ELF},
396 { "Wizzle the Chaotic", 10000, 190, 110, 6, 8, RACE_HOBBIT},
397 { "Midas the Greedy", 15000, 200, 116, 6, 9, RACE_GNOME},
398 { "Ja-Far the Alchemist", 15000, 220, 111, 4, 9, RACE_ELF},
399 { "Kakalrakakal", 15000, 200, 116, 6, 9, RACE_KLACKON},
400 { "Jal-Eth the Alchemist", 15000, 220, 111, 4, 9, RACE_ELF},
405 /* Magic Shop - 23 unique names */
407 { "ソーサラーのロ=パン", 20000, 200, 110, 7, 8, RACE_HALF_ELF},
408 { "偉大なるブガービイ", 20000, 215, 113, 6, 10, RACE_GNOME},
409 { "イェンダーの魔法使い", 30000, 200, 110, 7, 10, RACE_HUMAN},
410 { "死霊使いリャク",30000, 175, 110, 5, 11, RACE_HIGH_ELF},
411 { "魔術師スキドゥニー", 15000, 200, 110, 7, 8, RACE_HALF_ELF},
412 { "幻術師キリア", 30000, 200, 110, 7, 10, RACE_HUMAN},
413 { "死霊術師ニッキ", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
414 { "ソロストラン", 15000, 200, 110, 7, 8, RACE_SPRITE},
415 { "烏賊口アチシェ", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
416 { "貴族のカザ", 30000, 200, 110, 7, 10, RACE_HIGH_ELF},
417 { "暗きファジル", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
418 { "偉大なるケルドーン", 15000, 200, 110, 7, 8, RACE_DWARF},
419 { "フィランスロプス", 20000, 215, 113, 6, 10, RACE_HOBBIT},
420 { "魔女のアグナー", 30000, 200, 110, 7, 10, RACE_HUMAN},
421 { "死霊術師ビュリアンス", 30000, 175, 110, 5, 11, RACE_BEASTMAN},
422 { "ハイメイジのヴイラク", 15000, 200, 110, 7, 8, RACE_BEASTMAN},
423 { "知恵者マディッシュ", 20000, 215, 113, 6, 10, RACE_BEASTMAN},
424 { "ファレブリンボール", 30000, 200, 110, 7, 10, RACE_HIGH_ELF},
425 { "陰険フェリル=ガンド", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
426 { "呪術師サレゴード", 15000, 200, 110, 7, 8, RACE_BARBARIAN},
427 { "神秘家クトゥアロス", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
428 { "幻術師イベリ", 30000, 200, 110, 7, 10, RACE_SKELETON},
429 { "死霊術師ヘトー", 30000, 175, 110, 5, 11, RACE_YEEK},
430 { "魔術師ロ=パン", 20000, 200, 110, 7, 8, RACE_HALF_ELF},
431 { "偉大なるブガービイ", 20000, 215, 113, 6, 10, RACE_GNOME},
432 { "イェンダーの魔法使い", 30000, 200, 110, 7, 10, RACE_HUMAN},
433 { "死霊術師リャク", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
434 { "魔術師スキドゥニー", 15000, 200, 110, 7, 8, RACE_HALF_ELF},
435 { "幻術師キリア", 30000, 200, 110, 7, 10, RACE_HUMAN},
436 { "死霊術師ニッキ", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
437 { "ソロストラン", 15000, 200, 110, 7, 8, RACE_SPRITE},
438 { "烏賊口アチシェ", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
440 { "Lo Pan the Sorcerer", 20000, 200, 110, 7, 8, RACE_HALF_ELF},
441 { "Buggerby the Great", 20000, 215, 113, 6, 10, RACE_GNOME},
442 { "The Wizard of Yendor", 30000, 200, 110, 7, 10, RACE_HUMAN},
443 { "Rjak the Necromancer", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
444 { "Skidney the Sorcerer", 15000, 200, 110, 7, 8, RACE_HALF_ELF},
445 { "Kyria the Illusionist", 30000, 200, 110, 7, 10, RACE_HUMAN},
446 { "Nikki the Necromancer", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
447 { "Solostoran", 15000, 200, 110, 7, 8, RACE_SPRITE},
448 { "Achshe the Tentacled", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
449 { "Kaza the Noble", 30000, 200, 110, 7, 10, RACE_HIGH_ELF},
450 { "Fazzil the Dark", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
451 { "Keldorn the Grand", 15000, 200, 110, 7, 8, RACE_DWARF},
452 { "Philanthropus", 20000, 215, 113, 6, 10, RACE_HOBBIT},
453 { "Agnar the Enchantress", 30000, 200, 110, 7, 10, RACE_HUMAN},
454 { "Buliance the Necromancer", 30000, 175, 110, 5, 11, RACE_BEASTMAN},
455 { "Vuirak the High-Mage", 15000, 200, 110, 7, 8, RACE_BEASTMAN},
456 { "Madish the Smart", 20000, 215, 113, 6, 10, RACE_BEASTMAN},
457 { "Falebrimbor", 30000, 200, 110, 7, 10, RACE_HIGH_ELF},
458 { "Felil-Gand the Subtle", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
459 { "Thalegord the Shaman", 15000, 200, 110, 7, 8, RACE_BARBARIAN},
460 { "Cthoaloth the Mystic", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
461 { "Ibeli the Illusionist", 30000, 200, 110, 7, 10, RACE_SKELETON},
462 { "Heto the Necromancer", 30000, 175, 110, 5, 11, RACE_YEEK},
463 { "Lo Pan the Sorcerer", 20000, 200, 110, 7, 8, RACE_HALF_ELF},
464 { "Buggerby the Great", 20000, 215, 113, 6, 10, RACE_GNOME},
465 { "The Wizard of Yendor", 30000, 200, 110, 7, 10, RACE_HUMAN},
466 { "Rjak the Necromancer", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
467 { "Skidney the Sorcerer", 15000, 200, 110, 7, 8, RACE_HALF_ELF},
468 { "Kyria the Illusionist", 30000, 200, 110, 7, 10, RACE_HUMAN},
469 { "Nikki the Necromancer", 30000, 175, 110, 5, 11, RACE_DARK_ELF},
470 { "Solostoran", 15000, 200, 110, 7, 8, RACE_SPRITE},
471 { "Achshe the Tentacled", 20000, 215, 113, 6, 10, RACE_MIND_FLAYER},
475 /* Black Market - 32 unique names */
477 { "ガリー=ギガズ", 20000, 250, 150, 10, 5, RACE_HALF_TROLL},
478 { "ゴブリンのヒストーア", 20000, 250, 150, 10, 5, RACE_HALF_ORC},
479 { "フェレンギ人クアーク", 30000, 250, 150, 10, 5, RACE_HUMAN},
480 { "公正なる(?)トッピ", 30000, 250, 150, 10, 5, RACE_ELF},
481 { "死人ヴァッサ", 20000, 250, 150, 10, 5, RACE_ZOMBIE},
482 { "裏切り者カイン", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
483 { "ブボニカス", 30000, 250, 150, 10, 5, RACE_BEASTMAN},
484 { "コープスライト", 30000, 250, 150, 10, 5, RACE_SPECTRE},
485 { "血に飢えしパリッシュ", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
486 { "ヴァイル", 20000, 250, 150, 10, 5, RACE_SKELETON},
487 { "信頼のプレンティス", 30000, 250, 150, 10, 5, RACE_SKELETON},
488 { "人間殺しのグリエラ", 30000, 250, 150, 10, 5, RACE_IMP},
489 { "エンジェル", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
490 { "水膨れフロツァム", 20000, 250, 150, 10, 5, RACE_ZOMBIE},
491 { "ニーヴァル", 30000, 250, 150, 10, 5, RACE_VAMPIRE},
492 { "明るいアナスタシア", 30000, 250, 150, 10, 5, RACE_SPECTRE},
493 { "死霊術師チャリティー", 20000, 250, 150, 10, 5, RACE_DARK_ELF},
494 { "ボクサーのプグナシオス", 20000, 250, 150, 10, 5, RACE_HALF_ORC},
495 { "幸運なフットソア", 30000, 250, 150, 10, 5, RACE_BEASTMAN},
496 { "光指のシドリア", 30000, 250, 150, 10, 5, RACE_HUMAN},
497 { "手品師リアソー", 20000, 250, 150, 10, 5, RACE_HOBBIT},
498 { "やりくり上手のジャナッカ", 20000, 250, 150, 10, 5, RACE_GNOME},
499 { "悪党シーナ", 30000, 250, 150, 10, 5, RACE_GNOME},
500 { "大爪アルニッキ", 30000, 250, 150, 10, 5, RACE_DRACONIAN},
501 { "貧乏チャエアンド", 20000, 250, 150, 10, 5, RACE_HUMAN},
502 { "山賊アファードーフ", 20000, 250, 150, 10, 5, RACE_BARBARIAN},
503 { "強欲ラザクスル", 30000, 250, 150, 10, 5, RACE_MIND_FLAYER},
504 { "ファラレウィン", 30000, 250, 150, 10, 5, RACE_SPRITE},
505 { "しわしわヴォスール", 20000, 250, 150, 10, 5, RACE_NIBELUNG},
506 { "ハンサムなアラオード", 20000, 250, 150, 10, 5, RACE_AMBERITE},
507 { "負け犬セラドフリド", 30000, 250, 150, 10, 5, RACE_HUMAN},
508 { "片足のエルーロ", 30000, 250, 150, 10, 5, RACE_HALF_OGRE},
510 { "Gary Gygaz", 20000, 250, 150, 10, 5, RACE_HALF_TROLL},
511 { "Histor the Goblin", 20000, 250, 150, 10, 5, RACE_HALF_ORC},
512 { "Quark the Ferengi", 30000, 250, 150, 10, 5, RACE_DWARF},
513 { "Topi the Fair(?)", 30000, 250, 150, 10, 5, RACE_HUMAN},
514 { "Vhassa the Dead", 20000, 250, 150, 10, 5, RACE_ZOMBIE},
515 { "Kyn the Treacherous", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
516 { "Bubonicus", 30000, 250, 150, 10, 5, RACE_BEASTMAN},
517 { "Corpselight", 30000, 250, 150, 10, 5, RACE_SPECTRE},
518 { "Parrish the Bloodthirsty", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
519 { "Vile", 20000, 250, 150, 10, 5, RACE_SKELETON},
520 { "Prentice the Trusted", 30000, 250, 150, 10, 5, RACE_SKELETON},
521 { "Griella Humanslayer", 30000, 250, 150, 10, 5, RACE_IMP},
522 { "Angel", 20000, 250, 150, 10, 5, RACE_VAMPIRE},
523 { "Flotsam the Bloated", 20000, 250, 150, 10, 5, RACE_ZOMBIE},
524 { "Nieval", 30000, 250, 150, 10, 5, RACE_VAMPIRE},
525 { "Anastasia the Luminous", 30000, 250, 150, 10, 5, RACE_SPECTRE},
526 { "Charity the Necromancer", 20000, 250, 150, 10, 5, RACE_DARK_ELF},
527 { "Pugnacious the Pugilist", 20000, 250, 150, 10, 5, RACE_HALF_ORC},
528 { "Footsore the Lucky", 30000, 250, 150, 10, 5, RACE_BEASTMAN},
529 { "Sidria Lighfingered", 30000, 250, 150, 10, 5, RACE_HUMAN},
530 { "Riatho the Juggler", 20000, 250, 150, 10, 5, RACE_HOBBIT},
531 { "Janaaka the Shifty", 20000, 250, 150, 10, 5, RACE_GNOME},
532 { "Cina the Rogue", 30000, 250, 150, 10, 5, RACE_GNOME},
533 { "Arunikki Greatclaw", 30000, 250, 150, 10, 5, RACE_DRACONIAN},
534 { "Chaeand the Poor", 20000, 250, 150, 10, 5, RACE_HUMAN},
535 { "Afardorf the Brigand", 20000, 250, 150, 10, 5, RACE_BARBARIAN},
536 { "Lathaxl the Greedy", 30000, 250, 150, 10, 5, RACE_MIND_FLAYER},
537 { "Falarewyn", 30000, 250, 150, 10, 5, RACE_SPRITE},
538 { "Vosur the Wrinkled", 20000, 250, 150, 10, 5, RACE_NIBELUNG},
539 { "Araord the Handsome", 20000, 250, 150, 10, 5, RACE_AMBERITE},
540 { "Theradfrid the Loser", 30000, 250, 150, 10, 5, RACE_HUMAN},
541 { "One-Legged Eroolo", 30000, 250, 150, 10, 5, RACE_HALF_OGRE},
547 { "我が家", 0, 100, 100, 0, 99, 99},
548 { "我が家", 0, 100, 100, 0, 99, 99},
549 { "我が家", 0, 100, 100, 0, 99, 99},
550 { "我が家", 0, 100, 100, 0, 99, 99},
551 { "我が家", 0, 100, 100, 0, 99, 99},
552 { "我が家", 0, 100, 100, 0, 99, 99},
553 { "我が家", 0, 100, 100, 0, 99, 99},
554 { "我が家", 0, 100, 100, 0, 99, 99},
555 { "我が家", 0, 100, 100, 0, 99, 99},
556 { "我が家", 0, 100, 100, 0, 99, 99},
557 { "我が家", 0, 100, 100, 0, 99, 99},
558 { "我が家", 0, 100, 100, 0, 99, 99},
559 { "我が家", 0, 100, 100, 0, 99, 99},
560 { "我が家", 0, 100, 100, 0, 99, 99},
561 { "我が家", 0, 100, 100, 0, 99, 99},
562 { "我が家", 0, 100, 100, 0, 99, 99},
563 { "我が家", 0, 100, 100, 0, 99, 99},
564 { "我が家", 0, 100, 100, 0, 99, 99},
565 { "我が家", 0, 100, 100, 0, 99, 99},
566 { "我が家", 0, 100, 100, 0, 99, 99},
567 { "我が家", 0, 100, 100, 0, 99, 99},
568 { "我が家", 0, 100, 100, 0, 99, 99},
569 { "我が家", 0, 100, 100, 0, 99, 99},
570 { "我が家", 0, 100, 100, 0, 99, 99},
571 { "我が家", 0, 100, 100, 0, 99, 99},
572 { "我が家", 0, 100, 100, 0, 99, 99},
573 { "我が家", 0, 100, 100, 0, 99, 99},
574 { "我が家", 0, 100, 100, 0, 99, 99},
575 { "我が家", 0, 100, 100, 0, 99, 99},
576 { "我が家", 0, 100, 100, 0, 99, 99},
577 { "我が家", 0, 100, 100, 0, 99, 99},
578 { "我が家", 0, 100, 100, 0, 99, 99},
580 { "Your home", 0, 100, 100, 0, 99, 99},
581 { "Your home", 0, 100, 100, 0, 99, 99},
582 { "Your home", 0, 100, 100, 0, 99, 99},
583 { "Your home", 0, 100, 100, 0, 99, 99},
584 { "Your home", 0, 100, 100, 0, 99, 99},
585 { "Your home", 0, 100, 100, 0, 99, 99},
586 { "Your home", 0, 100, 100, 0, 99, 99},
587 { "Your home", 0, 100, 100, 0, 99, 99},
588 { "Your home", 0, 100, 100, 0, 99, 99},
589 { "Your home", 0, 100, 100, 0, 99, 99},
590 { "Your home", 0, 100, 100, 0, 99, 99},
591 { "Your home", 0, 100, 100, 0, 99, 99},
592 { "Your home", 0, 100, 100, 0, 99, 99},
593 { "Your home", 0, 100, 100, 0, 99, 99},
594 { "Your home", 0, 100, 100, 0, 99, 99},
595 { "Your home", 0, 100, 100, 0, 99, 99},
596 { "Your home", 0, 100, 100, 0, 99, 99},
597 { "Your home", 0, 100, 100, 0, 99, 99},
598 { "Your home", 0, 100, 100, 0, 99, 99},
599 { "Your home", 0, 100, 100, 0, 99, 99},
600 { "Your home", 0, 100, 100, 0, 99, 99},
601 { "Your home", 0, 100, 100, 0, 99, 99},
602 { "Your home", 0, 100, 100, 0, 99, 99},
603 { "Your home", 0, 100, 100, 0, 99, 99},
604 { "Your home", 0, 100, 100, 0, 99, 99},
605 { "Your home", 0, 100, 100, 0, 99, 99},
606 { "Your home", 0, 100, 100, 0, 99, 99},
607 { "Your home", 0, 100, 100, 0, 99, 99},
608 { "Your home", 0, 100, 100, 0, 99, 99},
609 { "Your home", 0, 100, 100, 0, 99, 99},
610 { "Your home", 0, 100, 100, 0, 99, 99},
611 { "Your home", 0, 100, 100, 0, 99, 99},
617 /* Bookstore - 21 unique names */
619 { "強欲ドラフ", 10000, 175, 108, 4, 12, RACE_HUMAN},
620 { "賢者オドナー", 15000, 120, 105, 6, 16, RACE_HIGH_ELF},
621 { "中立のガンダー", 25000, 120, 110, 7, 19, RACE_DARK_ELF},
622 { "忍耐の人ロ=シャ", 30000, 140, 105, 6, 12, RACE_ELF},
623 { "ランドルフ・カーター", 15000, 175, 108, 4, 12, RACE_HUMAN},
624 { "隼のサライ", 15000, 175, 108, 4, 12, RACE_HUMAN},
625 { "千里眼ボドリル", 20000, 120, 105, 6, 16, RACE_HIGH_ELF},
626 { "沈黙のヴェオロイン", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
627 { "学者のヴァンシラス", 30000, 140, 105, 6, 12, RACE_MIND_FLAYER},
628 { "物書きオセイン", 15000, 175, 108, 4, 12, RACE_SKELETON},
629 { "本の虫オルヴァー", 20000, 120, 105, 6, 16, RACE_VAMPIRE},
630 { "浅井墓男", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
631 { "デスマスク", 30000, 140, 105, 6, 12, RACE_ZOMBIE},
632 { "学者のアスーヌ", 15000, 175, 108, 4, 12, RACE_MIND_FLAYER},
633 { "死人のプリランド", 20000, 120, 105, 6, 16, RACE_ZOMBIE},
634 { "鉄のロナール", 25000, 120, 110, 7, 19, RACE_GOLEM},
636 { "Dolaf the Greedy", 10000, 175, 108, 4, 12, RACE_HUMAN},
637 { "Odnar the Sage", 15000, 120, 105, 6, 16, RACE_HIGH_ELF},
638 { "Gandar the Neutral", 25000, 120, 110, 7, 19, RACE_DARK_ELF},
639 { "Ro-sha the Patient", 30000, 140, 105, 6, 12, RACE_ELF},
640 { "Randolph Carter", 15000, 175, 108, 4, 12, RACE_HUMAN},
641 { "Sarai the Swift", 15000, 175, 108, 4, 12, RACE_HUMAN},
642 { "Bodril the Seer", 20000, 120, 105, 6, 16, RACE_HIGH_ELF},
643 { "Veloin the Quiet", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
644 { "Vanthylas the Learned", 30000, 140, 105, 6, 12, RACE_MIND_FLAYER},
645 { "Ossein the Literate", 15000, 175, 108, 4, 12, RACE_SKELETON},
646 { "Olvar Bookworm", 20000, 120, 105, 6, 16, RACE_VAMPIRE},
647 { "Shallowgrave", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
648 { "Death Mask", 30000, 140, 105, 6, 12, RACE_ZOMBIE},
649 { "Asuunu the Learned", 15000, 175, 108, 4, 12, RACE_MIND_FLAYER},
650 { "Prirand the Dead", 20000, 120, 105, 6, 16, RACE_ZOMBIE},
651 { "Ronar the Iron", 25000, 120, 110, 7, 19, RACE_GOLEM},
654 { "ガリル=ガミル", 30000, 140, 105, 6, 12, RACE_ELF},
655 { "本食いローバグ", 15000, 175, 108, 4, 12, RACE_KOBOLD},
656 { "キリアリキーク", 20000, 120, 105, 6, 16, RACE_KLACKON},
657 { "静かなるリリン", 25000, 120, 110, 7, 19, RACE_DWARF},
658 { "王者イサング", 30000, 140, 105, 6, 12, RACE_HIGH_ELF},
659 { "強欲ドラフ", 10000, 175, 108, 4, 12, RACE_HUMAN},
660 { "賢者オドナー", 15000, 120, 105, 6, 16, RACE_HIGH_ELF},
661 { "中立のガンダー", 25000, 120, 110, 7, 19, RACE_DARK_ELF},
662 { "忍耐の人ロ=シャ", 30000, 140, 105, 6, 12, RACE_ELF},
663 { "ランドルフ・カーター", 15000, 175, 108, 4, 12, RACE_HUMAN},
664 { "隼サライ", 15000, 175, 108, 4, 12, RACE_HUMAN},
665 { "千里眼ボドリル", 20000, 120, 105, 6, 16, RACE_HIGH_ELF},
666 { "沈黙のヴェオロイン", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
667 { "学者のヴァンシラス", 30000, 140, 105, 6, 12, RACE_MIND_FLAYER},
668 { "物書きオセイン", 15000, 175, 108, 4, 12, RACE_SKELETON},
669 { "本の虫オルヴァー", 20000, 120, 105, 6, 16, RACE_VAMPIRE},
671 { "Galil-Gamir", 30000, 140, 105, 6, 12, RACE_ELF},
672 { "Rorbag Book-Eater", 15000, 175, 108, 4, 12, RACE_KOBOLD},
673 { "Kiriarikirk", 20000, 120, 105, 6, 16, RACE_KLACKON},
674 { "Rilin the Quiet", 25000, 120, 110, 7, 19, RACE_DWARF},
675 { "Isung the Lord", 30000, 140, 105, 6, 12, RACE_HIGH_ELF},
676 { "Dolaf the Greedy", 10000, 175, 108, 4, 12, RACE_HUMAN},
677 { "Odnar the Sage", 15000, 120, 105, 6, 16, RACE_HIGH_ELF},
678 { "Gandar the Neutral", 25000, 120, 110, 7, 19, RACE_DARK_ELF},
679 { "Ro-sha the Patient", 30000, 140, 105, 6, 12, RACE_ELF},
680 { "Randolph Carter", 15000, 175, 108, 4, 12, RACE_HUMAN},
681 { "Sarai the Swift", 15000, 175, 108, 4, 12, RACE_HUMAN},
682 { "Bodril the Seer", 20000, 120, 105, 6, 16, RACE_HIGH_ELF},
683 { "Veloin the Quiet", 25000, 120, 110, 7, 19, RACE_ZOMBIE},
684 { "Vanthylas the Learned", 30000, 140, 105, 6, 12, RACE_MIND_FLAYER},
685 { "Ossein the Literate", 15000, 175, 108, 4, 12, RACE_SKELETON},
686 { "Olvar Bookworm", 20000, 120, 105, 6, 16, RACE_VAMPIRE},
693 { "博物館", 0, 100, 100, 0, 99, 99},
694 { "博物館", 0, 100, 100, 0, 99, 99},
695 { "博物館", 0, 100, 100, 0, 99, 99},
696 { "博物館", 0, 100, 100, 0, 99, 99},
697 { "博物館", 0, 100, 100, 0, 99, 99},
698 { "博物館", 0, 100, 100, 0, 99, 99},
699 { "博物館", 0, 100, 100, 0, 99, 99},
700 { "博物館", 0, 100, 100, 0, 99, 99},
701 { "博物館", 0, 100, 100, 0, 99, 99},
702 { "博物館", 0, 100, 100, 0, 99, 99},
703 { "博物館", 0, 100, 100, 0, 99, 99},
704 { "博物館", 0, 100, 100, 0, 99, 99},
705 { "博物館", 0, 100, 100, 0, 99, 99},
706 { "博物館", 0, 100, 100, 0, 99, 99},
707 { "博物館", 0, 100, 100, 0, 99, 99},
708 { "博物館", 0, 100, 100, 0, 99, 99},
709 { "博物館", 0, 100, 100, 0, 99, 99},
710 { "博物館", 0, 100, 100, 0, 99, 99},
711 { "博物館", 0, 100, 100, 0, 99, 99},
712 { "博物館", 0, 100, 100, 0, 99, 99},
713 { "博物館", 0, 100, 100, 0, 99, 99},
714 { "博物館", 0, 100, 100, 0, 99, 99},
715 { "博物館", 0, 100, 100, 0, 99, 99},
716 { "博物館", 0, 100, 100, 0, 99, 99},
717 { "博物館", 0, 100, 100, 0, 99, 99},
718 { "博物館", 0, 100, 100, 0, 99, 99},
719 { "博物館", 0, 100, 100, 0, 99, 99},
720 { "博物館", 0, 100, 100, 0, 99, 99},
721 { "博物館", 0, 100, 100, 0, 99, 99},
722 { "博物館", 0, 100, 100, 0, 99, 99},
723 { "博物館", 0, 100, 100, 0, 99, 99},
724 { "博物館", 0, 100, 100, 0, 99, 99},
726 { "Museum", 0, 100, 100, 0, 99, 99},
727 { "Museum", 0, 100, 100, 0, 99, 99},
728 { "Museum", 0, 100, 100, 0, 99, 99},
729 { "Museum", 0, 100, 100, 0, 99, 99},
730 { "Museum", 0, 100, 100, 0, 99, 99},
731 { "Museum", 0, 100, 100, 0, 99, 99},
732 { "Museum", 0, 100, 100, 0, 99, 99},
733 { "Museum", 0, 100, 100, 0, 99, 99},
734 { "Museum", 0, 100, 100, 0, 99, 99},
735 { "Museum", 0, 100, 100, 0, 99, 99},
736 { "Museum", 0, 100, 100, 0, 99, 99},
737 { "Museum", 0, 100, 100, 0, 99, 99},
738 { "Museum", 0, 100, 100, 0, 99, 99},
739 { "Museum", 0, 100, 100, 0, 99, 99},
740 { "Museum", 0, 100, 100, 0, 99, 99},
741 { "Museum", 0, 100, 100, 0, 99, 99},
742 { "Museum", 0, 100, 100, 0, 99, 99},
743 { "Museum", 0, 100, 100, 0, 99, 99},
744 { "Museum", 0, 100, 100, 0, 99, 99},
745 { "Museum", 0, 100, 100, 0, 99, 99},
746 { "Museum", 0, 100, 100, 0, 99, 99},
747 { "Museum", 0, 100, 100, 0, 99, 99},
748 { "Museum", 0, 100, 100, 0, 99, 99},
749 { "Museum", 0, 100, 100, 0, 99, 99},
750 { "Museum", 0, 100, 100, 0, 99, 99},
751 { "Museum", 0, 100, 100, 0, 99, 99},
752 { "Museum", 0, 100, 100, 0, 99, 99},
753 { "Museum", 0, 100, 100, 0, 99, 99},
754 { "Museum", 0, 100, 100, 0, 99, 99},
755 { "Museum", 0, 100, 100, 0, 99, 99},
756 { "Museum", 0, 100, 100, 0, 99, 99},
757 { "Museum", 0, 100, 100, 0, 99, 99},
764 static int cur_store_num = 0;
765 static int store_top = 0;
766 static int store_bottom = 0;
767 static int xtra_stock = 0;
768 static store_type *st_ptr = NULL;
769 static const owner_type *ot_ptr = NULL;
770 static s16b old_town_num = 0;
771 static s16b inner_town_num = 0;
772 #define RUMOR_CHANCE 8
774 #define MAX_COMMENT_1 6
776 static concptr comment_1[MAX_COMMENT_1] =
797 /*! ブラックマーケット追加メッセージ(承諾) */
798 static concptr comment_1_B[MAX_COMMENT_1] = {
807 #define MAX_COMMENT_2A 2
809 static concptr comment_2a[MAX_COMMENT_2A] =
812 "私の忍耐力を試しているのかい? $%s が最後だ。",
813 "我慢にも限度があるぞ。 $%s が最後だ。"
815 "You try my patience. %s is final.",
816 "My patience grows thin. %s is final."
821 #define MAX_COMMENT_2B 12
823 static concptr comment_2b[MAX_COMMENT_2B] =
826 " $%s ぐらいは出さなきゃダメだよ。",
829 "何て奴だ! $%s 以下はあり得ないぞ。",
830 "それじゃ少なすぎる! $%s は欲しいところだ。",
831 "バカにしている! $%s はもらわないと。",
833 "おいおい! $%s を考えてくれないか?",
834 "1000匹のオークのノミに苦しめられるがいい! $%s だ。",
835 "お前の大切なものに災いあれ! $%s でどうだ。",
836 "モルゴスに賞味されるがいい!本当は $%s なんだろう?",
837 "お前の母親はオーガか! $%s は出すつもりなんだろ?"
839 "I can take no less than %s gold pieces.",
840 "I will accept no less than %s gold pieces.",
841 "Ha! No less than %s gold pieces.",
842 "You knave! No less than %s gold pieces.",
843 "That's a pittance! I want %s gold pieces.",
844 "That's an insult! I want %s gold pieces.",
845 "As if! How about %s gold pieces?",
846 "My arse! How about %s gold pieces?",
847 "May the fleas of 1000 orcs molest you! Try %s gold pieces.",
848 "May your most favourite parts go moldy! Try %s gold pieces.",
849 "May Morgoth find you tasty! Perhaps %s gold pieces?",
850 "Your mother was an Ogre! Perhaps %s gold pieces?"
856 /*! ブラックマーケット用追加メッセージ(売るとき) */
857 static concptr comment_2b_B[MAX_COMMENT_2B] = {
858 "いくら俺様がお人好しとはいえ $%s が限界だね。嫌なら帰りな。",
859 "金がないのかい、あんた?まずは家に帰って $%s 揃えてきな。",
860 "物の価値が分からん奴だな。これは $%s が普通なんだよ。",
861 "俺の付けた値段に文句があるのか? $%s が限界だ。",
862 "ひょっとして新手の冗談かい? $%s 持ってないなら帰りな。",
863 "うちは他の店とは違うんだよ。$%s ぐらいは出しな。",
864 "買う気がないなら帰りな。 $%s だと言っているんだ。",
865 "話にならないね。 $%s くらい持っているんだろ?",
866 "は?なんだそりゃ? $%s の間違いか、ひょっとして?",
867 "出口はあっちだよ。それとも $%s 出せるのかい、あんたに。",
868 "命知らずな奴だな。 $%s 出せば今日の所は勘弁してやるよ。",
869 "うちの店は貧乏人お断りだ。 $%s ぐらい出せないのかい?"
872 #define MAX_COMMENT_3A 2
874 static concptr comment_3a[MAX_COMMENT_3A] =
877 "私の忍耐力を試しているのかい? $%s が最後だ。",
878 "我慢にも限度があるぞ。 $%s が最後だ。"
880 "You try my patience. %s is final.",
881 "My patience grows thin. %s is final."
887 #define MAX_COMMENT_3B 12
889 static concptr comment_3b[MAX_COMMENT_3B] =
892 "本音を言うと $%s でいいんだろ?",
894 " $%s ぐらいなら出してもいいが。",
895 " $%s 以上払うなんて考えられないね。",
896 "まあ落ちついて。 $%s でどうだい?",
897 "そのガラクタなら $%s で引き取るよ。",
898 "それじゃ高すぎる! $%s がいいとこだろ。",
899 "どうせいらないんだろ! $%s でいいだろ?",
900 "だめだめ! $%s がずっとお似合いだよ。",
901 "バカにしている! $%s がせいぜいだ。",
902 " $%s なら嬉しいところだがなあ。",
903 " $%s 、それ以上はビタ一文出さないよ!"
905 "Perhaps %s gold pieces?",
906 "How about %s gold pieces?",
907 "I will pay no more than %s gold pieces.",
908 "I can afford no more than %s gold pieces.",
909 "Be reasonable. How about %s gold pieces?",
910 "I'll buy it as scrap for %s gold pieces.",
911 "That is too much! How about %s gold pieces?",
912 "That looks war surplus! Say %s gold pieces?",
913 "Never! %s is more like it.",
914 "That's an insult! %s is more like it.",
915 "%s gold pieces and be thankful for it!",
916 "%s gold pieces and not a copper more!"
922 /*! ブラックマーケット用追加メッセージ(買い取り) */
923 static concptr comment_3b_B[MAX_COMMENT_3B] = {
924 " $%s ってところだね。そのどうしようもないガラクタは。",
925 "この俺が $%s って言っているんだから、その通りにした方が身のためだぞ。",
926 "俺の優しさに甘えるのもいい加減にしておけ。 $%s だ。",
927 "その品なら $%s で売ってくれているがね、常識ある紳士はみんな。",
928 "こりゃまた、がめつい奴だな。いくら俺が温厚とはいえ $%s が限界だ。",
929 " $%s だ。別に俺はそんなガラクタ欲しくはないんだから。",
930 "俺の鑑定額が気に入らないのか? $%s 、嫌なら帰りな。",
931 " $%s で引き取ってやるよ。喜んで受け取りな、貧乏人。",
932 "物の価値が分からん奴は始末におえんな。それは $%s なんだよ。",
933 "そんなに金が欲しいのか、あんた? $%s で満足できんのか?",
934 "入る店間違えてんじゃないのか? $%s で嫌なら他をあたってくれ。",
935 "俺の言い値にケチをつける奴がいるとは! その度胸に免じて $%s だ。"
938 #define MAX_COMMENT_4A 4
940 static concptr comment_4a[MAX_COMMENT_4A] =
943 "もうたくさんだ!何度も私をわずらわせないでくれ!",
944 "うがー!一日の我慢の限度を超えている!",
945 "もういい!時間の無駄以外のなにものでもない!",
946 "もうやってられないよ!顔も見たくない!"
948 "Enough! You have abused me once too often!",
949 "Arghhh! I have had enough abuse for one day!",
950 "That does it! You shall waste my time no more!",
951 "This is getting nowhere! I'm going to Londis!"
957 /*! ブラックマーケット用追加メッセージ(怒りの頂点) */
958 static concptr comment_4a_B[MAX_COMMENT_4A] = {
959 "なめやがって!温厚な俺様でも限界があるってことを知れ!",
960 "俺をここまで怒らせて...命があるだけでもありがたいと思え!",
961 "ふざけてるのか!冷やかしなら相手を見てからにしろ!",
962 "いいかげんにしろ!今度こんなまねしたらただじゃおかねえぞ!"
965 #define MAX_COMMENT_4B 4
967 static concptr comment_4b[MAX_COMMENT_4B] =
976 "Get out of my sight!",
977 "Begone, you scoundrel!",
984 /*! ブラックマーケット用追加メッセージ(追い出し) */
985 static concptr comment_4b_B[MAX_COMMENT_4B] = {
992 #define MAX_COMMENT_5 8
994 static concptr comment_5[MAX_COMMENT_5] =
1008 "You will have to do better than that!",
1009 "Do you wish to do business or not?",
1010 "You've got to be kidding!",
1011 "You'd better be kidding!",
1012 "You try my patience.",
1013 "Hmmm, nice weather we're having."
1019 /*! ブラックマーケット用追加メッセージ(怒り) */
1020 static concptr comment_5_B[MAX_COMMENT_5] = {
1031 #define MAX_COMMENT_6 4
1033 static concptr comment_6[MAX_COMMENT_6] =
1041 "I must have heard you wrong.",
1042 "I'm sorry, I missed that.",
1043 "I'm sorry, what was that?",
1044 "Sorry, what was that again?"
1049 /*** Initialize others ***/
1052 * 店舗で販売するオブジェクトを定義する / Hack -- Objects sold in the stores -- by tval/sval pair.
1054 byte store_table[MAX_STORES][STORE_CHOICES][2] =
1059 { TV_FOOD, SV_FOOD_RATION },
1060 { TV_FOOD, SV_FOOD_RATION },
1061 { TV_FOOD, SV_FOOD_RATION },
1062 { TV_FOOD, SV_FOOD_RATION },
1064 { TV_FOOD, SV_FOOD_RATION },
1065 { TV_FOOD, SV_FOOD_BISCUIT },
1066 { TV_FOOD, SV_FOOD_JERKY },
1067 { TV_FOOD, SV_FOOD_JERKY },
1069 { TV_FOOD, SV_FOOD_PINT_OF_WINE },
1070 { TV_FOOD, SV_FOOD_PINT_OF_ALE },
1071 { TV_LITE, SV_LITE_TORCH },
1072 { TV_LITE, SV_LITE_TORCH },
1074 { TV_LITE, SV_LITE_TORCH },
1075 { TV_LITE, SV_LITE_TORCH },
1076 { TV_LITE, SV_LITE_LANTERN },
1077 { TV_LITE, SV_LITE_LANTERN },
1089 { TV_SHOT, SV_AMMO_NORMAL },
1090 { TV_ARROW, SV_AMMO_NORMAL },
1091 { TV_BOLT, SV_AMMO_NORMAL },
1092 { TV_DIGGING, SV_SHOVEL },
1094 { TV_DIGGING, SV_PICK },
1095 { TV_CLOAK, SV_CLOAK },
1096 { TV_CLOAK, SV_CLOAK },
1097 { TV_CLOAK, SV_FUR_CLOAK },
1099 { TV_FOOD, SV_FOOD_RATION },
1100 { TV_FOOD, SV_FOOD_RATION },
1101 { TV_FOOD, SV_FOOD_RATION },
1102 { TV_FOOD, SV_FOOD_RATION },
1104 { TV_POTION, SV_POTION_WATER },
1105 { TV_POTION, SV_POTION_WATER },
1106 { TV_LITE, SV_LITE_LANTERN },
1107 { TV_LITE, SV_LITE_LANTERN },
1109 { TV_FOOD, SV_FOOD_WAYBREAD },
1110 { TV_FOOD, SV_FOOD_WAYBREAD },
1114 { TV_SHOT, SV_AMMO_NORMAL },
1115 { TV_ARROW, SV_AMMO_NORMAL },
1116 { TV_BOLT, SV_AMMO_NORMAL },
1117 { TV_DIGGING, SV_SHOVEL }
1123 { TV_BOOTS, SV_PAIR_OF_SOFT_LEATHER_BOOTS },
1124 { TV_BOOTS, SV_PAIR_OF_SOFT_LEATHER_BOOTS },
1125 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
1126 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
1128 { TV_HELM, SV_HARD_LEATHER_CAP },
1129 { TV_HELM, SV_HARD_LEATHER_CAP },
1130 { TV_HELM, SV_METAL_CAP },
1131 { TV_HELM, SV_IRON_HELM },
1133 { TV_SOFT_ARMOR, SV_ROBE },
1134 { TV_SOFT_ARMOR, SV_ROBE },
1135 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
1136 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
1138 { TV_SOFT_ARMOR, SV_HARD_LEATHER_ARMOR },
1139 { TV_SOFT_ARMOR, SV_HARD_LEATHER_ARMOR },
1140 { TV_SOFT_ARMOR, SV_HARD_STUDDED_LEATHER },
1141 { TV_SOFT_ARMOR, SV_HARD_STUDDED_LEATHER },
1143 { TV_SOFT_ARMOR, SV_RHINO_HIDE_ARMOR },
1144 { TV_SOFT_ARMOR, SV_LEATHER_SCALE_MAIL },
1145 { TV_HARD_ARMOR, SV_METAL_SCALE_MAIL },
1146 { TV_HARD_ARMOR, SV_CHAIN_MAIL },
1148 { TV_HARD_ARMOR, SV_DOUBLE_RING_MAIL },
1149 { TV_HARD_ARMOR, SV_AUGMENTED_CHAIN_MAIL },
1150 { TV_HARD_ARMOR, SV_BAR_CHAIN_MAIL },
1151 { TV_HARD_ARMOR, SV_DOUBLE_CHAIN_MAIL },
1153 { TV_HARD_ARMOR, SV_METAL_BRIGANDINE_ARMOUR },
1154 { TV_HARD_ARMOR, SV_SPLINT_MAIL },
1155 { TV_GLOVES, SV_SET_OF_LEATHER_GLOVES },
1156 { TV_GLOVES, SV_SET_OF_LEATHER_GLOVES },
1158 { TV_GLOVES, SV_SET_OF_GAUNTLETS },
1159 { TV_SHIELD, SV_SMALL_LEATHER_SHIELD },
1160 { TV_SHIELD, SV_LARGE_LEATHER_SHIELD },
1161 { TV_SHIELD, SV_SMALL_METAL_SHIELD },
1163 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
1164 { TV_BOOTS, SV_PAIR_OF_HARD_LEATHER_BOOTS },
1165 { TV_HELM, SV_HARD_LEATHER_CAP },
1166 { TV_HELM, SV_HARD_LEATHER_CAP },
1168 { TV_SOFT_ARMOR, SV_ROBE },
1169 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
1170 { TV_SOFT_ARMOR, SV_SOFT_LEATHER_ARMOR },
1171 { TV_SOFT_ARMOR, SV_HARD_LEATHER_ARMOR },
1173 { TV_SOFT_ARMOR, SV_LEATHER_JACK },
1174 { TV_HARD_ARMOR, SV_METAL_SCALE_MAIL },
1175 { TV_HARD_ARMOR, SV_CHAIN_MAIL },
1176 { TV_HARD_ARMOR, SV_CHAIN_MAIL },
1178 { TV_GLOVES, SV_SET_OF_LEATHER_GLOVES },
1179 { TV_GLOVES, SV_SET_OF_GAUNTLETS },
1180 { TV_SHIELD, SV_SMALL_LEATHER_SHIELD },
1181 { TV_SHIELD, SV_SMALL_LEATHER_SHIELD }
1187 { TV_SWORD, SV_DAGGER },
1188 { TV_SWORD, SV_MAIN_GAUCHE },
1189 { TV_SWORD, SV_RAPIER },
1190 { TV_SWORD, SV_SMALL_SWORD },
1192 { TV_SWORD, SV_SHORT_SWORD },
1193 { TV_SWORD, SV_SABRE },
1194 { TV_SWORD, SV_CUTLASS },
1195 { TV_SWORD, SV_TULWAR },
1197 { TV_SWORD, SV_BROAD_SWORD },
1198 { TV_SWORD, SV_LONG_SWORD },
1199 { TV_SWORD, SV_SCIMITAR },
1200 { TV_SWORD, SV_KATANA },
1202 { TV_SWORD, SV_BASTARD_SWORD },
1203 { TV_POLEARM, SV_SPEAR },
1204 { TV_POLEARM, SV_AWL_PIKE },
1205 { TV_POLEARM, SV_TRIDENT },
1207 { TV_POLEARM, SV_PIKE },
1208 { TV_POLEARM, SV_BEAKED_AXE },
1209 { TV_POLEARM, SV_BROAD_AXE },
1210 { TV_POLEARM, SV_LANCE },
1212 { TV_POLEARM, SV_BATTLE_AXE },
1213 { TV_POLEARM, SV_HATCHET },
1214 { TV_BOW, SV_SLING },
1215 { TV_BOW, SV_SHORT_BOW },
1217 { TV_BOW, SV_LIGHT_XBOW },
1218 { TV_SHOT, SV_AMMO_NORMAL },
1219 { TV_SHOT, SV_AMMO_NORMAL },
1220 { TV_ARROW, SV_AMMO_NORMAL },
1222 { TV_ARROW, SV_AMMO_NORMAL },
1223 { TV_BOLT, SV_AMMO_NORMAL },
1224 { TV_BOLT, SV_AMMO_NORMAL },
1225 { TV_BOW, SV_LIGHT_XBOW },
1227 { TV_ARROW, SV_AMMO_NORMAL },
1228 { TV_BOLT, SV_AMMO_NORMAL },
1229 { TV_BOW, SV_SHORT_BOW },
1230 { TV_BOW, SV_LIGHT_XBOW },
1232 { TV_SWORD, SV_DAGGER },
1233 { TV_SWORD, SV_TANTO },
1234 { TV_SWORD, SV_RAPIER },
1235 { TV_SWORD, SV_SMALL_SWORD },
1237 { TV_SWORD, SV_SHORT_SWORD },
1238 { TV_SWORD, SV_LONG_SWORD },
1239 { TV_SWORD, SV_SCIMITAR },
1240 { TV_SWORD, SV_BROAD_SWORD },
1242 { TV_HISSATSU_BOOK, 0 },
1243 { TV_HISSATSU_BOOK, 0 },
1244 { TV_HISSATSU_BOOK, 1 },
1245 { TV_HISSATSU_BOOK, 1 },
1251 { TV_HAFTED, SV_NUNCHAKU },
1252 { TV_HAFTED, SV_QUARTERSTAFF },
1253 { TV_HAFTED, SV_MACE },
1254 { TV_HAFTED, SV_BO_STAFF },
1256 { TV_HAFTED, SV_WAR_HAMMER },
1257 { TV_HAFTED, SV_WAR_HAMMER },
1258 { TV_HAFTED, SV_MORNING_STAR },
1259 { TV_HAFTED, SV_FLAIL },
1261 { TV_HAFTED, SV_LEAD_FILLED_MACE },
1262 { TV_SCROLL, SV_SCROLL_REMOVE_CURSE },
1263 { TV_SCROLL, SV_SCROLL_BLESSING },
1264 { TV_SCROLL, SV_SCROLL_HOLY_CHANT },
1266 { TV_POTION, SV_POTION_HEROISM },
1267 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1268 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1269 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1271 { TV_POTION, SV_POTION_CURE_LIGHT },
1272 { TV_POTION, SV_POTION_CURE_SERIOUS },
1273 { TV_POTION, SV_POTION_CURE_SERIOUS },
1274 { TV_POTION, SV_POTION_CURE_CRITICAL },
1276 { TV_POTION, SV_POTION_CURE_CRITICAL },
1277 { TV_POTION, SV_POTION_RESTORE_EXP },
1278 { TV_POTION, SV_POTION_RESTORE_EXP },
1279 { TV_POTION, SV_POTION_RESTORE_EXP },
1281 { TV_LIFE_BOOK, 0 },
1282 { TV_LIFE_BOOK, 0 },
1283 { TV_LIFE_BOOK, 1 },
1284 { TV_LIFE_BOOK, 1 },
1286 { TV_CRUSADE_BOOK, 0 },
1287 { TV_CRUSADE_BOOK, 0 },
1288 { TV_CRUSADE_BOOK, 1 },
1289 { TV_CRUSADE_BOOK, 1 },
1291 { TV_HAFTED, SV_WHIP },
1292 { TV_HAFTED, SV_MACE },
1293 { TV_HAFTED, SV_BALL_AND_CHAIN },
1294 { TV_HAFTED, SV_WAR_HAMMER },
1296 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1297 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1298 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1299 { TV_POTION, SV_POTION_CURE_CRITICAL },
1301 { TV_POTION, SV_POTION_CURE_CRITICAL },
1302 { TV_POTION, SV_POTION_RESTORE_EXP },
1305 { TV_STATUE, SV_ANY },
1307 { TV_SCROLL, SV_SCROLL_REMOVE_CURSE },
1308 { TV_SCROLL, SV_SCROLL_REMOVE_CURSE },
1309 { TV_SCROLL, SV_SCROLL_STAR_REMOVE_CURSE },
1310 { TV_SCROLL, SV_SCROLL_STAR_REMOVE_CURSE }
1316 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_HIT },
1317 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_DAM },
1318 { TV_SCROLL, SV_SCROLL_ENCHANT_ARMOR },
1319 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1321 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1322 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1323 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1324 { TV_SCROLL, SV_SCROLL_LIGHT },
1326 { TV_SCROLL, SV_SCROLL_PHASE_DOOR },
1327 { TV_SCROLL, SV_SCROLL_PHASE_DOOR },
1328 { TV_SCROLL, SV_SCROLL_TELEPORT },
1329 { TV_SCROLL, SV_SCROLL_MONSTER_CONFUSION },
1331 { TV_SCROLL, SV_SCROLL_MAPPING },
1332 { TV_SCROLL, SV_SCROLL_DETECT_GOLD },
1333 { TV_SCROLL, SV_SCROLL_DETECT_ITEM },
1334 { TV_SCROLL, SV_SCROLL_DETECT_TRAP },
1336 { TV_SCROLL, SV_SCROLL_DETECT_INVIS },
1337 { TV_SCROLL, SV_SCROLL_RECHARGING },
1338 { TV_SCROLL, SV_SCROLL_TELEPORT },
1339 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1341 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1342 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1343 { TV_SCROLL, SV_SCROLL_WORD_OF_RECALL },
1344 { TV_SCROLL, SV_SCROLL_TELEPORT },
1346 { TV_SCROLL, SV_SCROLL_TELEPORT },
1347 { TV_POTION, SV_POTION_RES_STR },
1348 { TV_POTION, SV_POTION_RES_INT },
1349 { TV_POTION, SV_POTION_RES_WIS },
1351 { TV_POTION, SV_POTION_RES_DEX },
1352 { TV_POTION, SV_POTION_RES_CON },
1353 { TV_POTION, SV_POTION_RES_CHR },
1354 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1356 { TV_SCROLL, SV_SCROLL_IDENTIFY },
1357 { TV_SCROLL, SV_SCROLL_STAR_IDENTIFY }, /* Yep, occasionally! */
1358 { TV_SCROLL, SV_SCROLL_STAR_IDENTIFY },
1359 { TV_SCROLL, SV_SCROLL_LIGHT },
1361 { TV_POTION, SV_POTION_RES_STR },
1362 { TV_POTION, SV_POTION_RES_INT },
1363 { TV_POTION, SV_POTION_RES_WIS },
1364 { TV_POTION, SV_POTION_RES_DEX },
1366 { TV_POTION, SV_POTION_RES_CON },
1367 { TV_POTION, SV_POTION_RES_CHR },
1368 { TV_SCROLL, SV_SCROLL_ENCHANT_ARMOR },
1369 { TV_SCROLL, SV_SCROLL_ENCHANT_ARMOR },
1371 { TV_SCROLL, SV_SCROLL_RECHARGING },
1372 { TV_SCROLL, SV_SCROLL_PHASE_DOOR },
1373 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_HIT },
1374 { TV_SCROLL, SV_SCROLL_ENCHANT_WEAPON_TO_DAM },
1379 /* Magic-User store */
1381 { TV_RING, SV_RING_PROTECTION },
1382 { TV_RING, SV_RING_LEVITATION_FALL },
1383 { TV_RING, SV_RING_PROTECTION },
1384 { TV_RING, SV_RING_RESIST_FIRE },
1386 { TV_RING, SV_RING_RESIST_COLD },
1387 { TV_AMULET, SV_AMULET_CHARISMA },
1388 { TV_RING, SV_RING_WARNING },
1389 { TV_AMULET, SV_AMULET_RESIST_ACID },
1391 { TV_AMULET, SV_AMULET_SEARCHING },
1392 { TV_WAND, SV_WAND_SLOW_MONSTER },
1393 { TV_WAND, SV_WAND_CONFUSE_MONSTER },
1394 { TV_WAND, SV_WAND_SLEEP_MONSTER },
1396 { TV_WAND, SV_WAND_MAGIC_MISSILE },
1397 { TV_WAND, SV_WAND_STINKING_CLOUD },
1398 { TV_WAND, SV_WAND_WONDER },
1399 { TV_WAND, SV_WAND_DISARMING },
1401 { TV_STAFF, SV_STAFF_LITE },
1402 { TV_STAFF, SV_STAFF_MAPPING },
1403 { TV_STAFF, SV_STAFF_DETECT_TRAP },
1404 { TV_STAFF, SV_STAFF_DETECT_DOOR },
1406 { TV_STAFF, SV_STAFF_DETECT_GOLD },
1407 { TV_STAFF, SV_STAFF_DETECT_ITEM },
1408 { TV_STAFF, SV_STAFF_DETECT_INVIS },
1409 { TV_STAFF, SV_STAFF_DETECT_EVIL },
1411 { TV_STAFF, SV_STAFF_TELEPORTATION },
1412 { TV_STAFF, SV_STAFF_TELEPORTATION },
1413 { TV_STAFF, SV_STAFF_TELEPORTATION },
1414 { TV_STAFF, SV_STAFF_TELEPORTATION },
1416 { TV_STAFF, SV_STAFF_IDENTIFY },
1417 { TV_STAFF, SV_STAFF_IDENTIFY },
1418 { TV_STAFF, SV_STAFF_IDENTIFY },
1420 { TV_STAFF, SV_STAFF_IDENTIFY },
1421 { TV_STAFF, SV_STAFF_REMOVE_CURSE },
1422 { TV_STAFF, SV_STAFF_CURE_LIGHT },
1423 { TV_STAFF, SV_STAFF_PROBING },
1427 { TV_SORCERY_BOOK, 0 },
1428 { TV_SORCERY_BOOK, 0 },
1429 { TV_SORCERY_BOOK, 1 },
1430 { TV_SORCERY_BOOK, 1 },
1432 { TV_ARCANE_BOOK, 0 },
1433 { TV_ARCANE_BOOK, 0 },
1434 { TV_ARCANE_BOOK, 1 },
1435 { TV_ARCANE_BOOK, 1 },
1437 { TV_ARCANE_BOOK, 2 },
1438 { TV_ARCANE_BOOK, 2 },
1439 { TV_ARCANE_BOOK, 3 },
1440 { TV_ARCANE_BOOK, 3 },
1445 /* Black Market (unused) */
1518 { TV_SORCERY_BOOK, 0 },
1519 { TV_SORCERY_BOOK, 0 },
1520 { TV_SORCERY_BOOK, 1 },
1521 { TV_SORCERY_BOOK, 1 },
1523 { TV_NATURE_BOOK, 0 },
1524 { TV_NATURE_BOOK, 0 },
1525 { TV_NATURE_BOOK, 1 },
1526 { TV_NATURE_BOOK, 1 },
1528 { TV_CHAOS_BOOK, 0 },
1529 { TV_CHAOS_BOOK, 0 },
1530 { TV_CHAOS_BOOK, 1 },
1531 { TV_CHAOS_BOOK, 1 },
1533 { TV_DEATH_BOOK, 0 },
1534 { TV_DEATH_BOOK, 0 },
1535 { TV_DEATH_BOOK, 1 },
1536 { TV_DEATH_BOOK, 1 },
1538 { TV_TRUMP_BOOK, 0 }, /* +16 */
1539 { TV_TRUMP_BOOK, 0 },
1540 { TV_TRUMP_BOOK, 1 },
1541 { TV_TRUMP_BOOK, 1 },
1543 { TV_ARCANE_BOOK, 0 },
1544 { TV_ARCANE_BOOK, 1 },
1545 { TV_ARCANE_BOOK, 2 },
1546 { TV_ARCANE_BOOK, 3 },
1548 { TV_CRAFT_BOOK, 0 },
1549 { TV_CRAFT_BOOK, 0 },
1550 { TV_CRAFT_BOOK, 1 },
1551 { TV_CRAFT_BOOK, 1 },
1553 { TV_DAEMON_BOOK, 0 },
1554 { TV_DAEMON_BOOK, 0 },
1555 { TV_DAEMON_BOOK, 1 },
1556 { TV_DAEMON_BOOK, 1 },
1558 { TV_MUSIC_BOOK, 0 },
1559 { TV_MUSIC_BOOK, 0 },
1560 { TV_MUSIC_BOOK, 1 },
1561 { TV_MUSIC_BOOK, 1 },
1570 /* Museum (unused) */
1609 * @brief 取引成功時の店主のメッセージ処理 /
1610 * Successful haggle.
1613 static void say_comment_1(void)
1616 /* ブラックマーケットのときは別のメッセージを出す */
1617 if ( cur_store_num == STORE_BLACK ) {
1618 msg_print(comment_1_B[randint0(MAX_COMMENT_1)]);
1621 msg_print(comment_1[randint0(MAX_COMMENT_1)]);
1624 msg_print(comment_1[randint0(MAX_COMMENT_1)]);
1628 if (one_in_(RUMOR_CHANCE))
1631 msg_print("店主は耳うちした:");
1633 msg_print("The shopkeeper whispers something into your ear:");
1635 display_rumor(TRUE);
1641 * @brief プレイヤーがアイテムを買う時の価格代案メッセージ処理 /
1642 * Continue haggling (player is buying)
1643 * @param value 店主の提示価格
1644 * @param annoyed 店主のいらつき度
1647 static void say_comment_2(PRICE value, int annoyed)
1651 /* Prepare a string to insert */
1652 sprintf(tmp_val, "%ld", (long)value);
1657 /* Formatted message */
1658 msg_format(comment_2a[randint0(MAX_COMMENT_2A)], tmp_val);
1664 /* Formatted message */
1666 /* ブラックマーケットの時は別のメッセージを出す */
1667 if ( cur_store_num == STORE_BLACK ){
1668 msg_format(comment_2b_B[randint0(MAX_COMMENT_2B)], tmp_val);
1671 msg_format(comment_2b[randint0(MAX_COMMENT_2B)], tmp_val);
1674 msg_format(comment_2b[randint0(MAX_COMMENT_2B)], tmp_val);
1682 * @brief プレイヤーがアイテムを売る時の価格代案メッセージ処理 /
1683 * Continue haggling (player is selling)
1684 * @param value 店主の提示価格
1685 * @param annoyed 店主のいらつき度
1688 static void say_comment_3(PRICE value, int annoyed)
1692 /* Prepare a string to insert */
1693 sprintf(tmp_val, "%ld", (long)value);
1698 /* Formatted message */
1699 msg_format(comment_3a[randint0(MAX_COMMENT_3A)], tmp_val);
1705 /* Formatted message */
1707 /* ブラックマーケットの時は別のメッセージを出す */
1708 if ( cur_store_num == STORE_BLACK ){
1709 msg_format(comment_3b_B[randint0(MAX_COMMENT_3B)], tmp_val);
1712 msg_format(comment_3b[randint0(MAX_COMMENT_3B)], tmp_val);
1715 msg_format(comment_3b[randint0(MAX_COMMENT_3B)], tmp_val);
1723 * @brief 店主がプレイヤーを追い出す時のメッセージ処理 /
1724 * Kick 'da bum out. -RAK-
1727 static void say_comment_4(void)
1730 /* ブラックマーケットの時は別のメッセージを出す */
1731 if ( cur_store_num == STORE_BLACK ){
1732 msg_print(comment_4a_B[randint0(MAX_COMMENT_4A)]);
1733 msg_print(comment_4b_B[randint0(MAX_COMMENT_4B)]);
1736 msg_print(comment_4a[randint0(MAX_COMMENT_4A)]);
1737 msg_print(comment_4b[randint0(MAX_COMMENT_4B)]);
1740 msg_print(comment_4a[randint0(MAX_COMMENT_4A)]);
1741 msg_print(comment_4b[randint0(MAX_COMMENT_4B)]);
1748 * @brief 店主がプレイヤーに取り合わない時のメッセージ処理 /
1749 * You are insulting me
1752 static void say_comment_5(void)
1755 /* ブラックマーケットの時は別のメッセージを出す */
1756 if ( cur_store_num == STORE_BLACK ){
1757 msg_print(comment_5_B[randint0(MAX_COMMENT_5)]);
1760 msg_print(comment_5[randint0(MAX_COMMENT_5)]);
1763 msg_print(comment_5[randint0(MAX_COMMENT_5)]);
1770 * @brief 店主がプレイヤーの提示を理解できなかった時のメッセージ処理 /
1771 * That makes no sense.
1774 static void say_comment_6(void)
1776 msg_print(comment_6[randint0(MAX_COMMENT_6)]);
1780 #define MAX_COMMENT_7A 4
1782 static concptr comment_7a[MAX_COMMENT_7A] =
1787 "誰かがむせび泣く声が聞こえる...。",
1792 "You hear someone sobbing...",
1793 "The shopkeeper howls in agony!"
1798 #define MAX_COMMENT_7B 4
1800 static concptr comment_7b[MAX_COMMENT_7B] =
1810 "The shopkeeper curses at you.",
1811 "The shopkeeper glares at you."
1816 #define MAX_COMMENT_7C 4
1818 static concptr comment_7c[MAX_COMMENT_7C] =
1827 "You've made my day!",
1828 "The shopkeeper giggles.",
1829 "The shopkeeper laughs loudly."
1834 #define MAX_COMMENT_7D 4
1836 static concptr comment_7d[MAX_COMMENT_7D] =
1840 "こんなおいしい思いをしたら、真面目に働けなくなるなぁ。",
1845 "I think I'll retire!",
1846 "The shopkeeper jumps for joy.",
1847 "The shopkeeper smiles gleefully."
1854 * @brief 店主が交渉を終えた際の反応を返す処理 /
1855 * Let a shop-keeper React to a purchase
1856 * @param price アイテムの取引額
1857 * @param value アイテムの実際価値
1858 * @param guess 店主が当初予想していた価値
1861 * We paid "price", it was worth "value", and we thought it was worth "guess"
1863 static void purchase_analyze(PRICE price, PRICE value, PRICE guess)
1865 /* Item was worthless, but we bought it */
1866 if ((value <= 0) && (price > value))
1868 msg_print(comment_7a[randint0(MAX_COMMENT_7A)]);
1869 chg_virtue(V_HONOUR, -1);
1870 chg_virtue(V_JUSTICE, -1);
1871 sound(SOUND_STORE1);
1874 /* Item was cheaper than we thought, and we paid more than necessary */
1875 else if ((value < guess) && (price > value))
1877 msg_print(comment_7b[randint0(MAX_COMMENT_7B)]);
1878 chg_virtue(V_JUSTICE, -1);
1879 if (one_in_(4)) chg_virtue(V_HONOUR, -1);
1880 sound(SOUND_STORE2);
1883 /* Item was a good bargain, and we got away with it */
1884 else if ((value > guess) && (value < (4 * guess)) && (price < value))
1886 msg_print(comment_7c[randint0(MAX_COMMENT_7C)]);
1887 if (one_in_(4)) chg_virtue(V_HONOUR, -1);
1888 else if (one_in_(4)) chg_virtue(V_HONOUR, 1);
1889 sound(SOUND_STORE3);
1892 /* Item was a great bargain, and we got away with it */
1893 else if ((value > guess) && (price < value))
1895 msg_print(comment_7d[randint0(MAX_COMMENT_7D)]);
1896 if (one_in_(2)) chg_virtue(V_HONOUR, -1);
1897 if (one_in_(4)) chg_virtue(V_HONOUR, 1);
1898 if (10 * price < value) chg_virtue(V_SACRIFICE, 1);
1899 sound(SOUND_STORE4);
1906 * We store the current "store feat" here so everyone can access it
1908 static int cur_store_feat;
1912 * Buying and selling adjustments for race combinations.
1913 * Entry[owner][player] gives the basic "cost inflation".
1915 static byte rgold_adj[MAX_RACES][MAX_RACES] =
1917 /*Hum, HfE, Elf, Hal, Gno, Dwa, HfO, HfT, Dun, HiE, Barbarian,
1918 HfOg, HGn, HTn, Cyc, Yek, Klc, Kbd, Nbl, DkE, Drc, Mind Flayer,
1919 Imp, Glm, Skl, Zombie, Vampire, Spectre, Fairy, Beastman, Ent,
1920 Angel, Demon, Kutar */
1923 { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
1924 124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
1925 115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
1926 100, 120, 110, 105 },
1929 { 110, 100, 100, 105, 110, 120, 125, 130, 110, 100, 110,
1930 120, 115, 108, 115, 110, 110, 120, 120, 115, 115, 110,
1931 120, 110, 110, 110, 120, 110, 100, 125, 100, 95, 140,
1932 110, 115, 110, 110 },
1935 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
1936 120, 120, 105, 120, 110, 105, 125, 125, 110, 115, 108,
1937 120, 115, 110, 110, 120, 110, 100, 125, 100, 95, 140,
1938 110, 110, 105, 110 },
1941 { 115, 110, 105, 95, 105, 110, 115, 130, 115, 105, 115,
1942 125, 120, 120, 125, 115, 110, 120, 120, 120, 115, 115,
1943 120, 110, 120, 120, 130, 110, 110, 130, 110, 95, 140,
1944 115, 120, 105, 115 },
1947 { 115, 115, 110, 105, 95, 110, 115, 130, 115, 110, 115,
1948 120, 125, 110, 120, 110, 105, 120, 110, 110, 105, 110,
1949 120, 101, 110, 110, 120, 120, 115, 130, 115, 95, 140,
1950 115, 110, 110, 115 },
1953 { 115, 120, 120, 110, 110, 95, 125, 135, 115, 120, 115,
1954 125, 140, 130, 130, 120, 115, 115, 115, 135, 125, 120,
1955 120, 105, 115, 115, 115, 115, 120, 130, 120, 95, 140,
1956 115, 110, 115, 115 },
1959 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
1960 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
1961 115, 125, 120, 120, 115, 120, 125, 115, 125, 95, 140,
1962 115, 110, 115, 115 },
1965 { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
1966 110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
1967 110, 115, 112, 112, 115, 112, 120, 110, 120, 95, 140,
1968 110, 110, 115, 110 },
1971 { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
1972 120, 120, 105, 120, 115, 105, 115, 120, 110, 105, 105,
1973 120, 105, 120, 120, 125, 120, 105, 135, 105, 95, 140,
1974 100, 110, 110, 100 },
1977 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
1978 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
1979 125, 115, 120, 120, 125, 120, 100, 125, 100, 95, 140,
1980 110, 110, 105, 110 },
1982 /* Human / Barbarian (copied from human) */
1983 { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
1984 124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
1985 115, 105, 125, 125, 130, 125, 115, 120, 115, 95, 140,
1986 100, 120, 110, 100 },
1988 /* Half-Ogre: theoretical, copied from half-troll */
1989 { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
1990 110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
1991 110, 115, 112, 112, 115, 112, 120, 110, 120, 95, 140,
1992 110, 110, 115, 110 },
1994 /* Half-Giant: theoretical, copied from half-troll */
1995 { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
1996 110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
1997 110, 115, 112, 112, 115, 112, 130, 120, 130, 95, 140,
1998 110, 110, 115, 110 },
2000 /* Half-Titan: theoretical, copied from High_Elf */
2001 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2002 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2003 125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2004 110, 110, 115, 110 },
2006 /* Cyclops: theoretical, copied from half-troll */
2007 { 110, 115, 115, 110, 110, 130, 110, 110, 110, 115, 110,
2008 110, 115, 120, 110, 120, 120, 110, 110, 110, 115, 110,
2009 110, 115, 112, 112, 115, 112, 130, 130, 130, 95, 140,
2010 110, 110, 115, 110 },
2012 /* Yeek: theoretical, copied from Half-Orc */
2013 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2014 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2015 115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2016 115, 110, 115, 115 },
2018 /* Klackon: theoretical, copied from Gnome */
2019 { 115, 115, 110, 105, 95, 110, 115, 130, 115, 110, 115,
2020 120, 125, 110, 120, 110, 105, 120, 110, 110, 105, 110,
2021 120, 101, 110, 110, 120, 120, 130, 130, 130, 95, 140,
2022 115, 110, 115, 115 },
2024 /* Kobold: theoretical, copied from Half-Orc */
2025 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2026 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2027 115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2028 115, 110, 115, 115 },
2030 /* Nibelung: theoretical, copied from Dwarf */
2031 { 115, 120, 120, 110, 110, 95, 125, 135, 115, 120, 115,
2032 125, 140, 130, 130, 120, 115, 115, 115, 135, 125, 120,
2033 120, 105, 115, 115, 120, 120, 130, 130, 130, 95, 140,
2034 115, 135, 115, 115 },
2037 { 110, 110, 110, 115, 120, 130, 115, 115, 120, 110, 115,
2038 115, 115, 116, 115, 120, 120, 115, 115, 101, 110, 110,
2039 110, 110, 112, 122, 110, 110, 110, 115, 110, 120, 120,
2040 110, 101, 115, 110 },
2042 /* Draconian: theoretical, copied from High_Elf */
2043 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2044 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2045 125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2046 110, 110, 115, 110 },
2048 /* Mind Flayer: theoretical, copied from High_Elf */
2049 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2050 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2051 125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2052 110, 110, 115, 110 },
2054 /* Imp: theoretical, copied from High_Elf */
2055 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2056 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2057 125, 115, 120, 120, 120, 120, 130, 130, 130, 120, 120,
2058 110, 110, 115, 110 },
2060 /* Golem: theoretical, copied from High_Elf */
2061 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2062 125, 125, 101, 120, 115, 110, 115, 125, 110, 110, 110,
2063 125, 115, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2064 110, 110, 115, 110 },
2066 /* Skeleton: theoretical, copied from half-orc */
2067 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2068 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2069 115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
2070 115, 110, 125, 115 },
2072 /* Zombie: Theoretical, copied from half-orc */
2073 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2074 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2075 115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
2076 115, 110, 125, 115 },
2078 /* Vampire: Theoretical, copied from half-orc */
2079 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2080 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2081 115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
2082 115, 110, 125, 115 },
2084 /* Spectre: Theoretical, copied from half-orc */
2085 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2086 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2087 115, 125, 120, 120, 120, 120, 130, 130, 130, 120, 120,
2088 115, 110, 125, 115 },
2090 /* Sprite: Theoretical, copied from half-orc */
2091 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2092 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2093 115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2094 115, 110, 105, 115 },
2096 /* Beastman: Theoretical, copied from half-orc */
2097 { 115, 120, 125, 115, 115, 130, 110, 115, 115, 125, 115,
2098 110, 110, 120, 110, 120, 125, 115, 115, 110, 120, 110,
2099 115, 125, 120, 120, 120, 120, 130, 130, 130, 95, 140,
2100 115, 110, 115, 115 },
2103 { 110, 105, 100, 105, 110, 120, 125, 130, 110, 100, 110,
2104 120, 120, 105, 120, 110, 105, 125, 125, 110, 115, 108,
2105 120, 115, 110, 110, 120, 110, 100, 125, 100, 95, 140,
2106 110, 110, 105, 110 },
2109 { 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
2110 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 95,
2111 95, 95, 95, 95, 95, 95, 95, 95, 95, 95, 160,
2115 { 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
2116 140, 140, 140, 140, 140, 140, 140, 140, 140, 140, 140,
2117 140, 140, 140, 140, 140, 140, 140, 140, 140, 160, 120,
2118 140, 140, 140, 140 },
2121 { 100, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
2122 124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
2123 115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
2124 100, 120, 110, 100 },
2127 { 110, 110, 110, 115, 120, 130, 115, 115, 120, 110, 115,
2128 115, 115, 116, 115, 120, 120, 115, 115, 101, 110, 110,
2129 110, 110, 112, 122, 110, 110, 110, 115, 110, 120, 120,
2130 110, 101, 115, 110 },
2133 { 110, 110, 105, 105, 110, 115, 115, 115, 110, 105, 110,
2134 115, 115, 115, 115, 115, 115, 115, 115, 115, 115, 115,
2135 115, 115, 125, 125, 125, 125, 105, 115, 105, 95, 140,
2136 110, 115, 100, 110 },
2139 { 105, 105, 105, 110, 113, 115, 120, 125, 100, 105, 100,
2140 124, 120, 110, 125, 115, 120, 120, 120, 120, 115, 120,
2141 115, 105, 125, 125, 125, 125, 105, 120, 105, 95, 140,
2142 100, 120, 110, 100 },
2148 * @brief 店舗価格を決定する /
2149 * Determine the price of an item (qty one) in a store.
2150 * @param o_ptr 店舗に並べるオブジェクト構造体の参照ポインタ
2151 * @param greed 店主の強欲度
2152 * @param flip TRUEならば店主にとっての買取価格、FALSEなら売出価格を計算
2156 * This function takes into account the player's charisma, and the
2157 * shop-keepers friendliness, and the shop-keeper's base greed, but
2158 * never lets a shop-keeper lose money in a transaction.
2159 * The "greed" value should exceed 100 when the player is "buying" the
2160 * item, and should be less than 100 when the player is "selling" it.
2161 * Hack -- the black market always charges twice as much as it should.
2162 * Charisma adjustment runs from 80 to 130
2163 * Racial adjustment runs from 95 to 130
2164 * Since greed/charisma/racial adjustments are centered at 100, we need
2165 * to adjust (by 200) to extract a usable multiplier. Note that the
2166 * "greed" value is always something (?).
2169 static s32b price_item(object_type *o_ptr, int greed, bool flip)
2176 /* Get the value of one of the items */
2177 price = object_value(o_ptr);
2179 /* Worthless items */
2180 if (price <= 0) return (0L);
2183 /* Compute the racial factor */
2184 factor = rgold_adj[ot_ptr->owner_race][p_ptr->prace];
2186 /* Add in the charisma factor */
2187 factor += adj_chr_gold[p_ptr->stat_ind[A_CHR]];
2190 /* Shop is buying */
2193 /* Adjust for greed */
2194 adjust = 100 + (300 - (greed + factor));
2196 /* Never get "silly" */
2197 if (adjust > 100) adjust = 100;
2199 /* Mega-Hack -- Black market sucks */
2200 if (cur_store_num == STORE_BLACK)
2203 /* Compute the final price (with rounding) */
2204 /* Hack -- prevent underflow */
2205 price = (price * adjust + 50L) / 100L;
2208 /* Shop is selling */
2211 /* Adjust for greed */
2212 adjust = 100 + ((greed + factor) - 300);
2214 /* Never get "silly" */
2215 if (adjust < 100) adjust = 100;
2217 /* Mega-Hack -- Black market sucks */
2218 if (cur_store_num == STORE_BLACK)
2221 /* Compute the final price (with rounding) */
2222 /* Hack -- prevent overflow */
2223 price = (s32b)(((u32b)price * (u32b)adjust + 50UL) / 100UL);
2226 /* Note -- Never become "free" */
2227 if (price <= 0L) return (1L);
2229 /* Return the price */
2235 * @brief 安価な消耗品の販売数を増やし、低確率で割引にする /
2236 * Certain "cheap" objects should be created in "piles"
2237 * @param o_ptr 店舗に並べるオブジェクト構造体の参照ポインタ
2241 * Some objects can be sold at a "discount" (in small piles)
2244 static void mass_produce(object_type *o_ptr)
2247 DISCOUNT_RATE discount = 0;
2249 s32b cost = object_value(o_ptr);
2252 /* Analyze the type */
2253 switch (o_ptr->tval)
2255 /* Food, Flasks, and Lites */
2260 if (cost <= 5L) size += damroll(3, 5);
2261 if (cost <= 20L) size += damroll(3, 5);
2262 if (cost <= 50L) size += damroll(2, 2);
2269 if (cost <= 60L) size += damroll(3, 5);
2270 if (cost <= 240L) size += damroll(1, 5);
2271 if (o_ptr->sval == SV_SCROLL_STAR_IDENTIFY) size += damroll(3, 5);
2272 if (o_ptr->sval == SV_SCROLL_STAR_REMOVE_CURSE) size += damroll(1, 4);
2277 case TV_SORCERY_BOOK:
2278 case TV_NATURE_BOOK:
2282 case TV_ARCANE_BOOK:
2284 case TV_DAEMON_BOOK:
2285 case TV_CRUSADE_BOOK:
2287 case TV_HISSATSU_BOOK:
2290 if (cost <= 50L) size += damroll(2, 3);
2291 if (cost <= 500L) size += damroll(1, 3);
2309 if (object_is_artifact(o_ptr)) break;
2310 if (object_is_ego(o_ptr)) break;
2311 if (cost <= 10L) size += damroll(3, 5);
2312 if (cost <= 100L) size += damroll(3, 5);
2321 if (cost <= 5L) size += damroll(5, 5);
2322 if (cost <= 50L) size += damroll(5, 5);
2323 if (cost <= 500L) size += damroll(5, 5);
2329 if (cost <= 100L) size += damroll(2, 2);
2330 if (cost <= 1000L) size += damroll(2, 2);
2343 * Because many rods (and a few wands and staffs) are useful mainly
2344 * in quantity, the Black Market will occasionally have a bunch of
2351 if ((cur_store_num == STORE_BLACK) && one_in_(3))
2353 if (cost < 1601L) size += damroll(1, 5);
2354 else if (cost < 3201L) size += damroll(1, 3);
2361 /* Pick a discount */
2366 else if (one_in_(25))
2370 else if (one_in_(150))
2374 else if (one_in_(300))
2378 else if (one_in_(500))
2383 if (o_ptr->art_name)
2388 /* Save the discount */
2389 o_ptr->discount = discount;
2391 /* Save the total pile size */
2392 o_ptr->number = size - (size * discount / 100);
2394 /* Ensure that mass-produced rods and wands get the correct pvals. */
2395 if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
2397 o_ptr->pval *= (PARAMETER_VALUE)o_ptr->number;
2404 * @brief 店舗に並べた品を同一品であるかどうか判定する /
2405 * Determine if a store item can "absorb" another item
2406 * @param o_ptr 判定するオブジェクト構造体の参照ポインタ1
2407 * @param j_ptr 判定するオブジェクト構造体の参照ポインタ2
2408 * @return 同一扱いできるならTRUEを返す
2411 * See "object_similar()" for the same function for the "player"
2414 static bool store_object_similar(object_type *o_ptr, object_type *j_ptr)
2418 /* Hack -- Identical items cannot be stacked */
2419 if (o_ptr == j_ptr) return (0);
2421 /* Different objects cannot be stacked */
2422 if (o_ptr->k_idx != j_ptr->k_idx) return (0);
2424 /* Different charges (etc) cannot be stacked, unless wands or rods. */
2425 if ((o_ptr->pval != j_ptr->pval) && (o_ptr->tval != TV_WAND) && (o_ptr->tval != TV_ROD)) return (0);
2427 /* Require many identical values */
2428 if (o_ptr->to_h != j_ptr->to_h) return (0);
2429 if (o_ptr->to_d != j_ptr->to_d) return (0);
2430 if (o_ptr->to_a != j_ptr->to_a) return (0);
2432 /* Require identical "ego-item" names */
2433 if (o_ptr->name2 != j_ptr->name2) return (0);
2435 /* Artifacts don't stack! */
2436 if (object_is_artifact(o_ptr) || object_is_artifact(j_ptr)) return (0);
2438 /* Hack -- Identical art_flags! */
2439 for (i = 0; i < TR_FLAG_SIZE; i++)
2440 if (o_ptr->art_flags[i] != j_ptr->art_flags[i]) return (0);
2442 /* Hack -- Never stack "powerful" items */
2443 if (o_ptr->xtra1 || j_ptr->xtra1) return (0);
2445 /* Hack -- Never stack recharging items */
2446 if (o_ptr->timeout || j_ptr->timeout) return (0);
2448 /* Require many identical values */
2449 if (o_ptr->ac != j_ptr->ac) return (0);
2450 if (o_ptr->dd != j_ptr->dd) return (0);
2451 if (o_ptr->ds != j_ptr->ds) return (0);
2453 /* Hack -- Never stack chests */
2454 if (o_ptr->tval == TV_CHEST) return (0);
2455 if (o_ptr->tval == TV_STATUE) return (0);
2456 if (o_ptr->tval == TV_CAPTURE) return (0);
2458 /* Require matching discounts */
2459 if (o_ptr->discount != j_ptr->discount) return (0);
2461 /* They match, so they must be similar */
2467 * @brief 店舗に並べた品を重ね合わせできるかどうか判定する /
2468 * Allow a store item to absorb another item
2469 * @param o_ptr 判定するオブジェクト構造体の参照ポインタ1
2470 * @param j_ptr 判定するオブジェクト構造体の参照ポインタ2
2471 * @return 重ね合わせできるならTRUEを返す
2474 * See "object_similar()" for the same function for the "player"
2477 static void store_object_absorb(object_type *o_ptr, object_type *j_ptr)
2479 int max_num = (o_ptr->tval == TV_ROD) ?
2480 MIN(99, MAX_SHORT / k_info[o_ptr->k_idx].pval) : 99;
2481 int total = o_ptr->number + j_ptr->number;
2482 int diff = (total > max_num) ? total - max_num : 0;
2484 /* Combine quantity, lose excess items */
2485 o_ptr->number = (total > max_num) ? max_num : total;
2487 /* Hack -- if rods are stacking, add the pvals (maximum timeouts) together. -LM- */
2488 if (o_ptr->tval == TV_ROD)
2490 o_ptr->pval += j_ptr->pval * (j_ptr->number - diff) / j_ptr->number;
2493 /* Hack -- if wands are stacking, combine the charges. -LM- */
2494 if (o_ptr->tval == TV_WAND)
2496 o_ptr->pval += j_ptr->pval * (j_ptr->number - diff) / j_ptr->number;
2502 * @brief 店舗に品を置くスペースがあるかどうかの判定を返す /
2503 * Check to see if the shop will be carrying too many objects -RAK-
2504 * @param o_ptr 店舗に置きたいオブジェクト構造体の参照ポインタ
2505 * @return 置き場がないなら0、重ね合わせできるアイテムがあるなら-1、スペースがあるなら1を返す。
2508 * Note that the shop, just like a player, will not accept things
2509 * it cannot hold. Before, one could "nuke" potions this way.
2510 * Return value is now int:
2512 * -1 : Can be combined to existing slot.
2513 * 1 : Cannot be combined but there are empty spaces.
2516 static int store_check_num(object_type *o_ptr)
2521 /* The "home" acts like the player */
2522 if ((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM))
2524 bool old_stack_force_notes = stack_force_notes;
2525 bool old_stack_force_costs = stack_force_costs;
2527 if (cur_store_num != STORE_HOME)
2529 stack_force_notes = FALSE;
2530 stack_force_costs = FALSE;
2533 /* Check all the items */
2534 for (i = 0; i < st_ptr->stock_num; i++)
2536 /* Get the existing item */
2537 j_ptr = &st_ptr->stock[i];
2539 /* Can the new object be combined with the old one? */
2540 if (object_similar(j_ptr, o_ptr))
2542 if (cur_store_num != STORE_HOME)
2544 stack_force_notes = old_stack_force_notes;
2545 stack_force_costs = old_stack_force_costs;
2552 if (cur_store_num != STORE_HOME)
2554 stack_force_notes = old_stack_force_notes;
2555 stack_force_costs = old_stack_force_costs;
2559 /* Normal stores do special stuff */
2562 /* Check all the items */
2563 for (i = 0; i < st_ptr->stock_num; i++)
2565 /* Get the existing item */
2566 j_ptr = &st_ptr->stock[i];
2568 /* Can the new object be combined with the old one? */
2569 if (store_object_similar(j_ptr, o_ptr)) return -1;
2573 /* Free space is always usable */
2575 * オプション powerup_home が設定されていると
2578 if ((cur_store_num == STORE_HOME) && ( powerup_home == FALSE )) {
2579 if (st_ptr->stock_num < ((st_ptr->stock_size) / 10)) {
2584 if (st_ptr->stock_num < st_ptr->stock_size) {
2589 /* But there was no room at the inn... */
2594 * @brief オブジェクトが祝福されているかの判定を返す /
2595 * @param o_ptr 判定したいオブジェクト構造体の参照ポインタ
2596 * @return アイテムが祝福されたアイテムならばTRUEを返す
2598 static bool is_blessed(object_type *o_ptr)
2600 BIT_FLAGS flgs[TR_FLAG_SIZE];
2601 object_flags(o_ptr, flgs);
2602 if (have_flag(flgs, TR_BLESSED)) return (TRUE);
2603 else return (FALSE);
2609 * @brief オブジェクトが所定の店舗で引き取れるかどうかを返す /
2610 * Determine if the current store will purchase the given item
2611 * @param o_ptr 判定したいオブジェクト構造体の参照ポインタ
2612 * @return アイテムが買い取れるならばTRUEを返す
2614 * Note that a shop-keeper must refuse to buy "worthless" items
2616 static bool store_will_buy(object_type *o_ptr)
2618 /* Hack -- The Home is simple */
2619 if ((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM)) return (TRUE);
2621 /* Switch on the store */
2622 switch (cur_store_num)
2627 /* Analyze the type */
2628 switch (o_ptr->tval)
2631 if (o_ptr->sval != SV_POTION_WATER) return FALSE;
2643 case TV_BOTTLE: /* 'Green', recycling Angband */
2658 /* Analyze the type */
2659 switch (o_ptr->tval)
2680 /* Analyze the type */
2681 switch (o_ptr->tval)
2690 case TV_HISSATSU_BOOK:
2694 if(o_ptr->sval == SV_WIZSTAFF) return (FALSE);
2706 /* Analyze the type */
2707 switch (o_ptr->tval)
2710 case TV_CRUSADE_BOOK:
2720 monster_race *r_ptr = &r_info[o_ptr->pval];
2723 if (!(r_ptr->flags3 & RF3_EVIL))
2726 if (r_ptr->flags3 & RF3_GOOD) break;
2728 /* Accept animals */
2729 if (r_ptr->flags3 & RF3_ANIMAL) break;
2732 if (my_strchr("?!", r_ptr->d_char)) break;
2738 if (is_blessed(o_ptr)) break;
2747 case STORE_ALCHEMIST:
2749 /* Analyze the type */
2750 switch (o_ptr->tval)
2764 /* Analyze the type */
2765 switch (o_ptr->tval)
2767 case TV_SORCERY_BOOK:
2768 case TV_NATURE_BOOK:
2772 case TV_ARCANE_BOOK:
2774 case TV_DAEMON_BOOK:
2788 if(o_ptr->sval == SV_WIZSTAFF) break;
2789 else return (FALSE);
2796 /* Bookstore Shop */
2799 /* Analyze the type */
2800 switch (o_ptr->tval)
2802 case TV_SORCERY_BOOK:
2803 case TV_NATURE_BOOK:
2808 case TV_ARCANE_BOOK:
2810 case TV_DAEMON_BOOK:
2811 case TV_CRUSADE_BOOK:
2822 /* Ignore "worthless" items */
2823 if (object_value(o_ptr) <= 0) return (FALSE);
2831 * @brief 現在の町の指定された店舗のアイテムを整理する /
2832 * Combine and reorder items in store.
2833 * @param store_num 店舗ID
2834 * @return 実際に整理が行われたならばTRUEを返す。
2836 bool combine_and_reorder_home(int store_num)
2840 object_type forge, *o_ptr, *j_ptr;
2841 bool flag = FALSE, combined;
2842 store_type *old_st_ptr = st_ptr;
2843 bool old_stack_force_notes = stack_force_notes;
2844 bool old_stack_force_costs = stack_force_costs;
2846 st_ptr = &town[1].store[store_num];
2847 if (store_num != STORE_HOME)
2849 stack_force_notes = FALSE;
2850 stack_force_costs = FALSE;
2857 /* Combine the items in the home (backwards) */
2858 for (i = st_ptr->stock_num - 1; i > 0; i--)
2860 o_ptr = &st_ptr->stock[i];
2862 /* Skip empty items */
2863 if (!o_ptr->k_idx) continue;
2865 /* Scan the items above that item */
2866 for (j = 0; j < i; j++)
2870 j_ptr = &st_ptr->stock[j];
2872 /* Skip empty items */
2873 if (!j_ptr->k_idx) continue;
2876 * Get maximum number of the stack if these
2877 * are similar, get zero otherwise.
2879 max_num = object_similar_part(j_ptr, o_ptr);
2881 /* Can we (partialy) drop "o_ptr" onto "j_ptr"? */
2882 if (max_num && j_ptr->number < max_num)
2884 if (o_ptr->number + j_ptr->number <= max_num)
2886 /* Add together the item counts */
2887 object_absorb(j_ptr, o_ptr);
2889 /* One object is gone */
2890 st_ptr->stock_num--;
2892 /* Slide everything down */
2893 for (k = i; k < st_ptr->stock_num; k++)
2895 /* Structure copy */
2896 st_ptr->stock[k] = st_ptr->stock[k + 1];
2899 /* Erase the "final" slot */
2900 object_wipe(&st_ptr->stock[k]);
2904 ITEM_NUMBER old_num = o_ptr->number;
2905 ITEM_NUMBER remain = j_ptr->number + o_ptr->number - max_num;
2907 /* Add together the item counts */
2908 object_absorb(j_ptr, o_ptr);
2910 o_ptr->number = remain;
2912 /* Hack -- if rods are stacking, add the pvals (maximum timeouts) and current timeouts together. -LM- */
2913 if (o_ptr->tval == TV_ROD)
2915 o_ptr->pval = o_ptr->pval * remain / old_num;
2916 o_ptr->timeout = o_ptr->timeout * remain / old_num;
2919 /* Hack -- if wands are stacking, combine the charges. -LM- */
2920 else if (o_ptr->tval == TV_WAND)
2922 o_ptr->pval = o_ptr->pval * remain / old_num;
2937 /* Re-order the items in the home (forwards) */
2938 for (i = 0; i < st_ptr->stock_num; i++)
2940 o_ptr = &st_ptr->stock[i];
2942 /* Skip empty slots */
2943 if (!o_ptr->k_idx) continue;
2945 /* Get the "value" of the item */
2946 o_value = object_value(o_ptr);
2948 /* Scan every occupied slot */
2949 for (j = 0; j < st_ptr->stock_num; j++)
2951 if (object_sort_comp(o_ptr, o_value, &st_ptr->stock[j])) break;
2954 /* Never move down */
2955 if (j >= i) continue;
2961 /* Save a copy of the moving item */
2962 object_copy(j_ptr, &st_ptr->stock[i]);
2964 /* Slide the objects */
2965 for (k = i; k > j; k--)
2967 /* Slide the item */
2968 object_copy(&st_ptr->stock[k], &st_ptr->stock[k - 1]);
2971 /* Insert the moving item */
2972 object_copy(&st_ptr->stock[j], j_ptr);
2975 st_ptr = old_st_ptr;
2976 if (store_num != STORE_HOME)
2978 stack_force_notes = old_stack_force_notes;
2979 stack_force_costs = old_stack_force_costs;
2987 * @brief 我が家にオブジェクトを加える /
2988 * Add the item "o_ptr" to the inventory of the "Home"
2989 * @param o_ptr 加えたいオブジェクトの構造体参照ポインタ
2993 * In all cases, return the slot (or -1) where the object was placed
2994 * Note that this is a hacked up version of "inven_carry()".
2995 * Also note that it may not correctly "adapt" to "knowledge" bacoming
2996 * known, the player may have to pick stuff up and drop it again.
2999 static int home_carry(object_type *o_ptr)
3005 bool old_stack_force_notes = stack_force_notes;
3006 bool old_stack_force_costs = stack_force_costs;
3008 if (cur_store_num != STORE_HOME)
3010 stack_force_notes = FALSE;
3011 stack_force_costs = FALSE;
3014 /* Check each existing item (try to combine) */
3015 for (slot = 0; slot < st_ptr->stock_num; slot++)
3017 /* Get the existing item */
3018 j_ptr = &st_ptr->stock[slot];
3020 /* The home acts just like the player */
3021 if (object_similar(j_ptr, o_ptr))
3023 /* Save the new number of items */
3024 object_absorb(j_ptr, o_ptr);
3026 if (cur_store_num != STORE_HOME)
3028 stack_force_notes = old_stack_force_notes;
3029 stack_force_costs = old_stack_force_costs;
3037 if (cur_store_num != STORE_HOME)
3039 stack_force_notes = old_stack_force_notes;
3040 stack_force_costs = old_stack_force_costs;
3045 * 隠し機能: オプション powerup_home が設定されていると
3049 if ((cur_store_num != STORE_HOME) || (powerup_home == TRUE)) {
3050 if (st_ptr->stock_num >= st_ptr->stock_size) {
3055 if (st_ptr->stock_num >= ((st_ptr->stock_size) / 10)) {
3061 /* Determine the "value" of the item */
3062 value = object_value(o_ptr);
3064 /* Check existing slots to see if we must "slide" */
3065 for (slot = 0; slot < st_ptr->stock_num; slot++)
3067 if (object_sort_comp(o_ptr, value, &st_ptr->stock[slot])) break;
3070 /* Slide the others up */
3071 for (i = st_ptr->stock_num; i > slot; i--)
3073 st_ptr->stock[i] = st_ptr->stock[i-1];
3076 /* More stuff now */
3077 st_ptr->stock_num++;
3079 /* Insert the new item */
3080 st_ptr->stock[slot] = *o_ptr;
3082 chg_virtue(V_SACRIFICE, -1);
3084 (void)combine_and_reorder_home(cur_store_num);
3086 /* Return the location */
3092 * @brief 店舗にオブジェクトを加える /
3093 * Add the item "o_ptr" to a real stores inventory.
3094 * @param o_ptr 加えたいオブジェクトの構造体参照ポインタ
3098 * In all cases, return the slot (or -1) where the object was placed
3099 * Note that this is a hacked up version of "inven_carry()".
3100 * Also note that it may not correctly "adapt" to "knowledge" bacoming
3101 * known, the player may have to pick stuff up and drop it again.
3104 static int store_carry(object_type *o_ptr)
3107 s32b value, j_value;
3111 /* Evaluate the object */
3112 value = object_value(o_ptr);
3114 /* Cursed/Worthless items "disappear" when sold */
3115 if (value <= 0) return (-1);
3117 /* All store items are fully *identified* */
3118 o_ptr->ident |= IDENT_MENTAL;
3120 /* Erase the inscription */
3121 o_ptr->inscription = 0;
3123 /* Erase the "feeling" */
3124 o_ptr->feeling = FEEL_NONE;
3126 /* Check each existing item (try to combine) */
3127 for (slot = 0; slot < st_ptr->stock_num; slot++)
3129 /* Get the existing item */
3130 j_ptr = &st_ptr->stock[slot];
3132 /* Can the existing items be incremented? */
3133 if (store_object_similar(j_ptr, o_ptr))
3135 /* Hack -- extra items disappear */
3136 store_object_absorb(j_ptr, o_ptr);
3144 if (st_ptr->stock_num >= st_ptr->stock_size) return (-1);
3147 /* Check existing slots to see if we must "slide" */
3148 for (slot = 0; slot < st_ptr->stock_num; slot++)
3151 j_ptr = &st_ptr->stock[slot];
3153 /* Objects sort by decreasing type */
3154 if (o_ptr->tval > j_ptr->tval) break;
3155 if (o_ptr->tval < j_ptr->tval) continue;
3157 /* Objects sort by increasing sval */
3158 if (o_ptr->sval < j_ptr->sval) break;
3159 if (o_ptr->sval > j_ptr->sval) continue;
3162 * Hack: otherwise identical rods sort by
3163 * increasing recharge time --dsb
3165 if (o_ptr->tval == TV_ROD)
3167 if (o_ptr->pval < j_ptr->pval) break;
3168 if (o_ptr->pval > j_ptr->pval) continue;
3171 /* Evaluate that slot */
3172 j_value = object_value(j_ptr);
3174 /* Objects sort by decreasing value */
3175 if (value > j_value) break;
3176 if (value < j_value) continue;
3179 /* Slide the others up */
3180 for (i = st_ptr->stock_num; i > slot; i--)
3182 st_ptr->stock[i] = st_ptr->stock[i-1];
3185 /* More stuff now */
3186 st_ptr->stock_num++;
3188 /* Insert the new item */
3189 st_ptr->stock[slot] = *o_ptr;
3191 /* Return the location */
3197 * @brief 店舗のオブジェクト数を増やす /
3198 * Add the item "o_ptr" to a real stores inventory.
3199 * @param item 増やしたいアイテムのID
3204 * Increase, by a given amount, the number of a certain item
3205 * in a certain store. This can result in zero items.
3207 * @todo numは本来ITEM_NUMBER型にしたい。
3209 static void store_item_increase(INVENTORY_IDX item, int num)
3214 o_ptr = &st_ptr->stock[item];
3216 /* Verify the number */
3217 cnt = o_ptr->number + num;
3218 if (cnt > 255) cnt = 255;
3219 else if (cnt < 0) cnt = 0;
3220 num = cnt - o_ptr->number;
3222 /* Save the new number */
3223 o_ptr->number += (ITEM_NUMBER)num;
3228 * @brief 店舗のオブジェクト数を削除する /
3229 * Remove a slot if it is empty
3230 * @param item 削除したいアイテムのID
3233 static void store_item_optimize(INVENTORY_IDX item)
3238 o_ptr = &st_ptr->stock[item];
3241 if (!o_ptr->k_idx) return;
3243 /* Must have no items */
3244 if (o_ptr->number) return;
3247 st_ptr->stock_num--;
3249 /* Slide everyone */
3250 for (j = item; j < st_ptr->stock_num; j++)
3252 st_ptr->stock[j] = st_ptr->stock[j + 1];
3255 /* Nuke the final slot */
3256 object_wipe(&st_ptr->stock[j]);
3260 * @brief ブラックマーケット用の無価値品の排除判定 /
3261 * This function will keep 'crap' out of the black market.
3262 * @param o_ptr 判定したいオブジェクトの構造体参照ポインタ
3263 * @return ブラックマーケットにとって無価値な品ならばTRUEを返す
3266 * Crap is defined as any item that is "available" elsewhere
3267 * Based on a suggestion by "Lee Vogt" <lvogt@cig.mcel.mot.com>
3270 static bool black_market_crap(object_type *o_ptr)
3274 /* Ego items are never crap */
3275 if (object_is_ego(o_ptr)) return (FALSE);
3277 /* Good items are never crap */
3278 if (o_ptr->to_a > 0) return (FALSE);
3279 if (o_ptr->to_h > 0) return (FALSE);
3280 if (o_ptr->to_d > 0) return (FALSE);
3282 /* Check all stores */
3283 for (i = 0; i < MAX_STORES; i++)
3285 if (i == STORE_HOME) continue;
3286 if (i == STORE_MUSEUM) continue;
3288 /* Check every item in the store */
3289 for (j = 0; j < town[p_ptr->town_num].store[i].stock_num; j++)
3291 object_type *j_ptr = &town[p_ptr->town_num].store[i].stock[j];
3293 /* Duplicate item "type", assume crappy */
3294 if (o_ptr->k_idx == j_ptr->k_idx) return (TRUE);
3304 * @brief 店舗の品揃え変化のためにアイテムを削除する /
3305 * Attempt to delete (some of) a random item from the store
3309 * Hack -- we attempt to "maintain" piles of items when possible.
3312 static void store_delete(void)
3317 /* Pick a random slot */
3318 what = (INVENTORY_IDX)randint0(st_ptr->stock_num);
3320 /* Determine how many items are here */
3321 num = st_ptr->stock[what].number;
3323 /* Hack -- sometimes, only destroy half the items */
3324 if (randint0(100) < 50) num = (num + 1) / 2;
3326 /* Hack -- sometimes, only destroy a single item */
3327 if (randint0(100) < 50) num = 1;
3329 /* Hack -- decrement the maximum timeouts and total charges of rods and wands. -LM- */
3330 if ((st_ptr->stock[what].tval == TV_ROD) || (st_ptr->stock[what].tval == TV_WAND))
3332 st_ptr->stock[what].pval -= num * st_ptr->stock[what].pval / st_ptr->stock[what].number;
3335 /* Actually destroy (part of) the item */
3336 store_item_increase(what, -num);
3337 store_item_optimize(what);
3342 * @brief 店舗の品揃え変化のためにアイテムを追加する /
3343 * Creates a random item and gives it to a store
3347 * This algorithm needs to be rethought. A lot.
3348 * Currently, "normal" stores use a pre-built array.
3349 * Note -- the "level" given to "obj_get_num()" is a "favored"
3350 * level, that is, there is a much higher chance of getting
3351 * items with a level approaching that of the given level...
3352 * Should we check for "permission" to have the given item?
3355 static void store_create(void)
3365 /* Paranoia -- no room left */
3366 if (st_ptr->stock_num >= st_ptr->stock_size) return;
3369 /* Hack -- consider up to four items */
3370 for (tries = 0; tries < 4; tries++)
3373 if (cur_store_num == STORE_BLACK)
3375 /* Pick a level for object/magic */
3376 level = 25 + randint0(25);
3378 /* Random item (usually of given level) */
3379 i = get_obj_num(level);
3381 /* Handle failure */
3388 /* Hack -- Pick an item to sell */
3389 i = st_ptr->table[randint0(st_ptr->table_num)];
3391 /* Hack -- fake level for apply_magic() */
3392 level = rand_range(1, STORE_OBJ_LEVEL);
3397 /* Create a new object of the chosen kind */
3398 object_prep(q_ptr, i);
3400 /* Apply some "low-level" magic (no artifacts) */
3401 apply_magic(q_ptr, level, AM_NO_FIXED_ART);
3403 /* Require valid object */
3404 if (!store_will_buy(q_ptr)) continue;
3406 /* Hack -- Charge lite's */
3407 if (q_ptr->tval == TV_LITE)
3409 if (q_ptr->sval == SV_LITE_TORCH) q_ptr->xtra4 = FUEL_TORCH / 2;
3410 if (q_ptr->sval == SV_LITE_LANTERN) q_ptr->xtra4 = FUEL_LAMP / 2;
3414 /* The item is "known" */
3415 object_known(q_ptr);
3417 /* Mark it storebought */
3418 q_ptr->ident |= IDENT_STORE;
3420 /* Mega-Hack -- no chests in stores */
3421 if (q_ptr->tval == TV_CHEST) continue;
3423 /* Prune the black market */
3424 if (cur_store_num == STORE_BLACK)
3426 /* Hack -- No "crappy" items */
3427 if (black_market_crap(q_ptr)) continue;
3429 /* Hack -- No "cheap" items */
3430 if (object_value(q_ptr) < 10) continue;
3432 /* No "worthless" items */
3433 /* if (object_value(q_ptr) <= 0) continue; */
3436 /* Prune normal stores */
3439 /* No "worthless" items */
3440 if (object_value(q_ptr) <= 0) continue;
3444 /* Mass produce and/or Apply discount */
3445 mass_produce(q_ptr);
3447 /* Attempt to carry the (known) item */
3448 (void)store_carry(q_ptr);
3450 /* Definitely done */
3457 * @brief 店舗の割引対象外にするかどうかを判定 /
3458 * Eliminate need to bargain if player has haggled well in the past
3459 * @param minprice アイテムの最低販売価格
3460 * @return 割引を禁止するならTRUEを返す。
3462 static bool noneedtobargain(PRICE minprice)
3464 s32b good = st_ptr->good_buy;
3465 s32b bad = st_ptr->bad_buy;
3467 /* Cheap items are "boring" */
3468 if (minprice < 10L) return (TRUE);
3470 /* Perfect haggling */
3471 if (good == MAX_SHORT) return (TRUE);
3473 /* Reward good haggles, punish bad haggles, notice price */
3474 if (good > ((3 * bad) + (5 + (minprice/50)))) return (TRUE);
3476 /* Return the flag */
3482 * @brief 店主の持つプレイヤーに対する売買の良し悪し経験を記憶する /
3483 * Update the bargain info
3484 * @param price 実際の取引価格
3485 * @param minprice 店主の提示した価格
3489 static void updatebargain(PRICE price, PRICE minprice, int num)
3491 /* Hack -- auto-haggle */
3492 if (!manual_haggle) return;
3494 /* Cheap items are "boring" */
3495 if ((minprice/num) < 10L) return;
3497 /* Count the successful haggles */
3498 if (price == minprice)
3500 /* Just count the good haggles */
3501 if (st_ptr->good_buy < MAX_SHORT)
3507 /* Count the failed haggles */
3510 /* Just count the bad haggles */
3511 if (st_ptr->bad_buy < MAX_SHORT)
3520 * @brief 店の商品リストを再表示する /
3521 * Re-displays a single store entry
3525 static void display_entry(int pos)
3531 GAME_TEXT o_name[MAX_NLEN];
3536 o_ptr = &st_ptr->stock[pos];
3538 /* Get the "offset" */
3539 i = (pos % store_bottom);
3541 /* Label it, clear the line --(-- */
3542 (void)sprintf(out_val, "%c) ", ((i > 25) ? toupper(I2A(i - 26)) : I2A(i)));
3543 prt(out_val, i+6, 0);
3546 if (show_item_graph)
3548 TERM_COLOR a = object_attr(o_ptr);
3549 SYMBOL_CODE c = object_char(o_ptr);
3551 Term_queue_bigchar(cur_col, i + 6, a, c, 0, 0);
3552 if (use_bigtile) cur_col++;
3557 /* Describe an item in the home */
3558 if ((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM))
3562 /* Leave room for weights, if necessary -DRS- */
3563 if (show_weights) maxwid -= 10;
3565 object_desc(o_name, o_ptr, 0);
3566 o_name[maxwid] = '\0';
3567 c_put_str(tval_to_attr[o_ptr->tval], o_name, i+6, cur_col);
3572 /* Only show the weight of an individual item */
3573 WEIGHT wgt = o_ptr->weight;
3575 sprintf(out_val, "%3d.%1d kg", lbtokg1(wgt) , lbtokg2(wgt));
3576 put_str(out_val, i+6, 67);
3578 (void)sprintf(out_val, "%3d.%d lb", wgt / 10, wgt % 10);
3579 put_str(out_val, i+6, 68);
3585 /* Describe an item (fully) in a store */
3588 /* Must leave room for the "price" */
3591 /* Leave room for weights, if necessary -DRS- */
3592 if (show_weights) maxwid -= 7;
3594 /* Describe the object (fully) */
3595 object_desc(o_name, o_ptr, 0);
3596 o_name[maxwid] = '\0';
3597 c_put_str(tval_to_attr[o_ptr->tval], o_name, i+6, cur_col);
3602 /* Only show the weight of an individual item */
3603 int wgt = o_ptr->weight;
3605 sprintf(out_val, "%3d.%1d", lbtokg1(wgt) , lbtokg2(wgt) );
3606 put_str(out_val, i+6, 60);
3608 (void)sprintf(out_val, "%3d.%d", wgt / 10, wgt % 10);
3609 put_str(out_val, i+6, 61);
3614 /* Display a "fixed" cost */
3615 if (o_ptr->ident & (IDENT_FIXED))
3617 /* Extract the "minimum" price */
3618 x = price_item(o_ptr, ot_ptr->min_inflate, FALSE);
3620 /* Actually draw the price (not fixed) */
3622 (void)sprintf(out_val, "%9ld固", (long)x);
3624 (void)sprintf(out_val, "%9ld F", (long)x);
3627 put_str(out_val, i+6, 68);
3630 /* Display a "taxed" cost */
3631 else if (!manual_haggle)
3633 /* Extract the "minimum" price */
3634 x = price_item(o_ptr, ot_ptr->min_inflate, FALSE);
3636 /* Hack -- Apply Sales Tax if needed */
3637 if (!noneedtobargain(x)) x += x / 10;
3639 /* Actually draw the price (with tax) */
3640 (void)sprintf(out_val, "%9ld ", (long)x);
3641 put_str(out_val, i+6, 68);
3644 /* Display a "haggle" cost */
3647 /* Extrect the "maximum" price */
3648 x = price_item(o_ptr, ot_ptr->max_inflate, FALSE);
3650 /* Actually draw the price (not fixed) */
3651 (void)sprintf(out_val, "%9ld ", (long)x);
3652 put_str(out_val, i+6, 68);
3659 * @brief 店の商品リストを表示する /
3660 * Displays a store's inventory -RAK-
3663 * All prices are listed as "per individual object". -BEN-
3665 static void display_inventory(void)
3669 /* Display the next 12 items */
3670 for (k = 0; k < store_bottom; k++)
3672 /* Do not display "dead" items */
3673 if (store_top + k >= st_ptr->stock_num) break;
3675 /* Display that line */
3676 display_entry(store_top + k);
3679 /* Erase the extra lines and the "more" prompt */
3680 for (i = k; i < store_bottom + 1; i++) prt("", i + 6, 0);
3682 /* Assume "no current page" */
3684 put_str(" ", 5, 20);
3686 put_str(" ", 5, 20);
3690 /* Visual reminder of "more items" */
3691 if (st_ptr->stock_num > store_bottom)
3693 /* Show "more" reminder (after the last item) */
3695 prt("-続く-", k + 6, 3);
3697 prt("-more-", k + 6, 3);
3701 /* Indicate the "current page" */
3702 /* Trailing spaces are to display (Page xx) and (Page x) */
3704 put_str(format("(%dページ) ", store_top/store_bottom + 1), 5, 20);
3706 put_str(format("(Page %d) ", store_top/store_bottom + 1), 5, 20);
3711 if (cur_store_num == STORE_HOME || cur_store_num == STORE_MUSEUM)
3713 k = st_ptr->stock_size;
3715 if (cur_store_num == STORE_HOME && !powerup_home) k /= 10;
3717 put_str(format("アイテム数: %4d/%4d", st_ptr->stock_num, k), 19 + xtra_stock, 27);
3719 put_str(format("Objects: %4d/%4d", st_ptr->stock_num, k), 19 + xtra_stock, 30);
3726 * @brief プレイヤーの所持金を表示する /
3727 * Displays players gold -RAK-
3731 static void store_prt_gold(void)
3736 prt("手持ちのお金: ", 19 + xtra_stock, 53);
3738 prt("Gold Remaining: ", 19 + xtra_stock, 53);
3742 sprintf(out_val, "%9ld", (long)p_ptr->au);
3743 prt(out_val, 19 + xtra_stock, 68);
3747 * @brief 店舗情報全体を表示するメインルーチン /
3748 * Displays store (after clearing screen) -RAK-
3752 static void display_store(void)
3758 /* The "Home" is special */
3759 if (cur_store_num == STORE_HOME)
3761 /* Put the owner name */
3762 put_str(_("我が家", "Your Home"), 3, 31);
3764 /* Label the item descriptions */
3765 put_str(_("アイテムの一覧", "Item Description"), 5, 4);
3767 /* If showing weights, show label */
3770 put_str(_(" 重さ", "Weight"), 5, 70);
3774 /* The "Home" is special */
3775 else if (cur_store_num == STORE_MUSEUM)
3777 /* Put the owner name */
3778 put_str(_("博物館", "Museum"), 3, 31);
3780 /* Label the item descriptions */
3781 put_str(_("アイテムの一覧", "Item Description"), 5, 4);
3783 /* If showing weights, show label */
3786 put_str(_(" 重さ", "Weight"), 5, 70);
3793 concptr store_name = (f_name + f_info[cur_store_feat].name);
3794 concptr owner_name = (ot_ptr->owner_name);
3795 concptr race_name = race_info[ot_ptr->owner_race].title;
3797 /* Put the owner name and race */
3798 sprintf(buf, "%s (%s)", owner_name, race_name);
3799 put_str(buf, 3, 10);
3801 /* Show the max price in the store (above prices) */
3802 sprintf(buf, "%s (%ld)", store_name, (long)(ot_ptr->max_cost));
3805 /* Label the item descriptions */
3806 put_str(_("商品の一覧", "Item Description"), 5, 5);
3809 /* If showing weights, show label */
3812 put_str(_(" 重さ", "Weight"), 5, 60);
3815 /* Label the asking price (in stores) */
3816 put_str(_(" 価格", "Price"), 5, 72);
3819 /* Display the current gold */
3822 /* Draw in the inventory */
3823 display_inventory();
3829 * @brief 店舗からアイテムを選択する /
3830 * Get the ID of a store item and return its value -RAK-
3831 * @param com_val 選択IDを返す参照ポインタ
3832 * @param pmt メッセージキャプション
3835 * @return 実際に選択したらTRUE、キャンセルしたらFALSE
3837 static int get_stock(COMMAND_CODE *com_val, concptr pmt, int i, int j)
3843 /* Get the item index */
3844 if (repeat_pull(com_val))
3846 /* Verify the item */
3847 if ((*com_val >= i) && (*com_val <= j))
3857 /* Assume failure */
3860 /* Build the prompt */
3862 hi = (j > 25) ? toupper(I2A(j - 26)) : I2A(j);
3864 (void)sprintf(out_val, "(%s:%c-%c, ESCで中断) %s",
3865 (((cur_store_num == STORE_HOME) || (cur_store_num == STORE_MUSEUM)) ? "アイテム" : "商品"),
3868 (void)sprintf(out_val, "(Items %c-%c, ESC to exit) %s",
3873 /* Ask until done */
3879 if (!get_com(out_val, &command, FALSE)) break;
3882 if (islower(command))
3884 else if (isupper(command))
3885 k = A2I(tolower(command)) + 26;
3889 /* Legal responses */
3890 if ((k >= i) && (k <= j))
3899 /* Clear the prompt */
3902 if (command == ESCAPE) return (FALSE);
3904 repeat_push(*com_val);
3912 * @brief 店主の不満度を増やし、プレイヤーを締め出す判定と処理を行う /
3913 * Increase the insult counter and get angry if too many -RAK-
3914 * @return プレイヤーを締め出す場合TRUEを返す
3916 static int increase_insults(void)
3918 /* Increase insults */
3919 st_ptr->insult_cur++;
3921 /* Become insulted */
3922 if (st_ptr->insult_cur > ot_ptr->insult_max)
3928 st_ptr->insult_cur = 0;
3929 st_ptr->good_buy = 0;
3930 st_ptr->bad_buy = 0;
3933 st_ptr->store_open = turn + TURNS_PER_TICK*TOWN_DAWN/8 + randint1(TURNS_PER_TICK*TOWN_DAWN/8);
3945 * @brief 店主の不満度を減らす /
3946 * Decrease insults -RAK-
3947 * @return プレイヤーを締め出す場合TRUEを返す
3949 static void decrease_insults(void)
3951 /* Decrease insults */
3952 if (st_ptr->insult_cur) st_ptr->insult_cur--;
3957 * @brief 店主の不満度が増えた場合のみのメッセージを表示する /
3958 * Have insulted while haggling -RAK-
3959 * @return プレイヤーを締め出す場合TRUEを返す
3961 static int haggle_insults(void)
3963 /* Increase insults */
3964 if (increase_insults()) return (TRUE);
3966 /* Display and flush insult */
3975 * Mega-Hack -- Enable "increments"
3977 static bool allow_inc = FALSE;
3980 * Mega-Hack -- Last "increment" during haggling
3982 static s32b last_inc = 0L;
3986 * @brief 交渉価格を確認と認証の是非を行う /
3989 * @param poffer 別途価格提示をした場合の値を返す参照ポインタ
3990 * @param price 現在の交渉価格
3991 * @param final 最終確定価格ならばTRUE
3992 * @return プレイヤーを締め出す場合TRUEを返す
3994 static int get_haggle(concptr pmt, s32b *poffer, PRICE price, int final)
4004 /* Clear old increment if necessary */
4005 if (!allow_inc) last_inc = 0L;
4012 sprintf(buf, "%s [承諾] ", pmt);
4014 sprintf(buf, "%s [accept] ", pmt);
4019 /* Old (negative) increment, and not final */
4020 else if (last_inc < 0)
4023 sprintf(buf, "%s [-$%ld] ", pmt, (long)(ABS(last_inc)));
4025 sprintf(buf, "%s [-%ld] ", pmt, (long)(ABS(last_inc)));
4030 /* Old (positive) increment, and not final */
4031 else if (last_inc > 0)
4034 sprintf(buf, "%s [+$%ld] ", pmt, (long)(ABS(last_inc)));
4036 sprintf(buf, "%s [+%ld] ", pmt, (long)(ABS(last_inc)));
4044 sprintf(buf, "%s ", pmt);
4052 /* Ask until done */
4057 /* Display prompt */
4061 strcpy(out_val, "");
4064 * Ask the user for a response.
4065 * Don't allow to use numpad as cursor key.
4067 res = askfor_aux(out_val, 32, FALSE);
4073 if (!res) return FALSE;
4075 /* Skip leading spaces */
4076 for (p = out_val; *p == ' '; p++) /* loop */;
4078 /* Empty response */
4081 /* Accept current price */
4089 /* Use previous increment */
4090 if (allow_inc && last_inc)
4092 *poffer += last_inc;
4097 /* Normal response */
4100 /* Extract a number */
4103 /* Handle "incremental" number */
4104 if ((*p == '+' || *p == '-'))
4106 /* Allow increments */
4109 /* Use the given "increment" */
4116 /* Handle normal number */
4119 /* Use the given "number" */
4128 msg_print("値がおかしいです。");
4130 msg_print("Invalid response.");
4142 * @brief 店主がプレイヤーからの交渉価格を判断する /
4143 * Receive an offer (from the player)
4145 * @param poffer 店主からの交渉価格を返す参照ポインタ
4146 * @param last_offer 現在の交渉価格
4147 * @param factor 店主の価格基準倍率
4148 * @param price アイテムの実価値
4149 * @param final 最終価格確定ならばTRUE
4150 * @return プレイヤーの価格に対して不服ならばTRUEを返す /
4151 * Return TRUE if offer is NOT okay
4153 static bool receive_offer(concptr pmt, s32b *poffer,
4154 s32b last_offer, int factor,
4155 PRICE price, int final)
4157 /* Haggle till done */
4160 /* Get a haggle (or cancel) */
4161 if (!get_haggle(pmt, poffer, price, final)) return (TRUE);
4163 /* Acceptable offer */
4164 if (((*poffer) * factor) >= (last_offer * factor)) break;
4166 /* Insult, and check for kicked out */
4167 if (haggle_insults()) return (TRUE);
4169 /* Reject offer (correctly) */
4170 (*poffer) = last_offer;
4179 * @brief プレイヤーが購入する時の値切り処理メインルーチン /
4180 * Haggling routine -RAK-
4181 * @param o_ptr オブジェクトの構造体参照ポインタ
4182 * @param price 最終価格を返す参照ポインタ
4183 * @return プレイヤーの価格に対して店主が不服ならばTRUEを返す /
4184 * Return TRUE if purchase is NOT successful
4186 static bool purchase_haggle(object_type *o_ptr, s32b *price)
4188 s32b cur_ask, final_ask;
4189 s32b last_offer, offer;
4191 s32b min_per, max_per;
4192 int flag, loop_flag, noneed;
4193 int annoyed = 0, final = FALSE;
4195 bool cancel = FALSE;
4198 concptr pmt = "提示価格";
4200 concptr pmt = "Asking";
4210 /* Extract the starting offer and the final offer */
4211 cur_ask = price_item(o_ptr, ot_ptr->max_inflate, FALSE);
4212 final_ask = price_item(o_ptr, ot_ptr->min_inflate, FALSE);
4214 /* Determine if haggling is necessary */
4215 noneed = noneedtobargain(final_ask);
4217 /* No need to haggle */
4218 if (noneed || !manual_haggle)
4220 /* No need to haggle */
4223 /* Message summary */
4225 msg_print("結局この金額にまとまった。");
4227 msg_print("You eventually agree upon the price.");
4233 /* No haggle option */
4236 /* Message summary */
4238 msg_print("すんなりとこの金額にまとまった。");
4240 msg_print("You quickly agree upon the price.");
4245 /* Apply Sales Tax */
4246 final_ask += final_ask / 10;
4250 cur_ask = final_ask;
4252 /* Go to final offer */
4256 pmt = "Final Offer";
4263 /* Haggle for the whole pile */
4264 cur_ask *= o_ptr->number;
4265 final_ask *= o_ptr->number;
4268 /* Haggle parameters */
4269 min_per = ot_ptr->haggle_per;
4270 max_per = min_per * 3;
4272 /* Mega-Hack -- artificial "last offer" value */
4273 last_offer = object_value(o_ptr) * o_ptr->number;
4274 last_offer = last_offer * (200 - (int)(ot_ptr->max_inflate)) / 100L;
4275 if (last_offer <= 0) last_offer = 1;
4280 /* No incremental haggling yet */
4283 /* Haggle until done */
4284 for (flag = FALSE; !flag; )
4288 while (!flag && loop_flag)
4290 (void)sprintf(out_val, "%s : %ld", pmt, (long)cur_ask);
4291 put_str(out_val, 1, 0);
4293 cancel = receive_offer("提示する金額? ",
4295 cancel = receive_offer("What do you offer? ",
4298 &offer, last_offer, 1, cur_ask, final);
4304 else if (offer > cur_ask)
4309 else if (offer == cur_ask)
4322 x1 = 100 * (offer - last_offer) / (cur_ask - last_offer);
4325 if (haggle_insults())
4331 else if (x1 > max_per)
4334 if (x1 < max_per) x1 = max_per;
4336 x2 = rand_range(x1-2, x1+2);
4337 x3 = ((cur_ask - offer) * x2 / 100L) + 1;
4338 /* don't let the price go up */
4343 if (cur_ask < final_ask)
4346 cur_ask = final_ask;
4350 pmt = "Final Offer";
4356 (void)(increase_insults());
4361 else if (offer >= cur_ask)
4373 (void)sprintf(out_val, "前回の提示金額: $%ld",
4375 (void)sprintf(out_val, "Your last offer: %ld",
4379 put_str(out_val, 1, 39);
4380 say_comment_2(cur_ask, annoyed);
4385 if (cancel) return (TRUE);
4387 updatebargain(*price, final_ask, o_ptr->number);
4395 * @brief プレイヤーが売却する時の値切り処理メインルーチン /
4396 * Haggling routine -RAK-
4397 * @param o_ptr オブジェクトの構造体参照ポインタ
4398 * @param price 最終価格を返す参照ポインタ
4399 * @return プレイヤーの価格に対して店主が不服ならばTRUEを返す /
4400 * Return TRUE if purchase is NOT successful
4402 static bool sell_haggle(object_type *o_ptr, s32b *price)
4404 s32b purse, cur_ask, final_ask;
4405 s32b last_offer = 0, offer = 0;
4407 s32b min_per, max_per;
4408 int flag, loop_flag, noneed;
4409 int annoyed = 0, final = FALSE;
4410 bool cancel = FALSE;
4412 concptr pmt = "提示金額";
4414 concptr pmt = "Offer";
4423 /* Obtain the starting offer and the final offer */
4424 cur_ask = price_item(o_ptr, ot_ptr->max_inflate, TRUE);
4425 final_ask = price_item(o_ptr, ot_ptr->min_inflate, TRUE);
4427 /* Determine if haggling is necessary */
4428 noneed = noneedtobargain(final_ask);
4430 /* Get the owner's payout limit */
4431 purse = (s32b)(ot_ptr->max_cost);
4433 /* No need to haggle */
4434 if (noneed || !manual_haggle || (final_ask >= purse))
4436 /* Apply Sales Tax (if needed) */
4437 if (!manual_haggle && !noneed)
4439 final_ask -= final_ask / 10;
4442 /* No reason to haggle */
4443 if (final_ask >= purse)
4446 msg_print("即座にこの金額にまとまった。");
4448 msg_print("You instantly agree upon the price.");
4453 /* Offer full purse */
4457 /* No need to haggle */
4461 msg_print("結局この金額にまとまった。");
4463 msg_print("You eventually agree upon the price.");
4469 /* No haggle option */
4472 /* Message summary */
4474 msg_print("すんなりとこの金額にまとまった。");
4476 msg_print("You quickly agree upon the price.");
4483 cur_ask = final_ask;
4490 pmt = "Final Offer";
4495 /* Haggle for the whole pile */
4496 cur_ask *= o_ptr->number;
4497 final_ask *= o_ptr->number;
4500 /* Display commands */
4502 /* Haggling parameters */
4503 min_per = ot_ptr->haggle_per;
4504 max_per = min_per * 3;
4506 /* Mega-Hack -- artificial "last offer" value */
4507 last_offer = object_value(o_ptr) * o_ptr->number;
4508 last_offer = last_offer * ot_ptr->max_inflate / 100L;
4513 /* No incremental haggling yet */
4517 for (flag = FALSE; !flag; )
4523 (void)sprintf(out_val, "%s : %ld", pmt, (long)cur_ask);
4524 put_str(out_val, 1, 0);
4526 cancel = receive_offer("提示する価格? ",
4528 cancel = receive_offer("What price do you ask? ",
4531 &offer, last_offer, -1, cur_ask, final);
4537 else if (offer < cur_ask)
4540 /* rejected, reset offer for incremental haggling */
4543 else if (offer == cur_ask)
4554 if (flag || !loop_flag) break;
4559 x1 = 100 * (last_offer - offer) / (last_offer - cur_ask);
4562 if (haggle_insults())
4568 else if (x1 > max_per)
4571 if (x1 < max_per) x1 = max_per;
4573 x2 = rand_range(x1-2, x1+2);
4574 x3 = ((offer - cur_ask) * x2 / 100L) + 1;
4575 /* don't let the price go down */
4579 if (cur_ask > final_ask)
4581 cur_ask = final_ask;
4586 pmt = "Final Offer";
4594 /* 追加 $0 で買い取られてしまうのを防止 By FIRST*/
4597 (void)(increase_insults());
4600 else if (offer <= cur_ask)
4611 (void)sprintf(out_val,
4613 "前回の提示価格 $%ld", (long)last_offer);
4615 "Your last bid %ld", (long)last_offer);
4618 put_str(out_val, 1, 39);
4619 say_comment_3(cur_ask, annoyed);
4624 if (cancel) return (TRUE);
4626 updatebargain(*price, final_ask, o_ptr->number);
4634 * @brief 店からの購入処理のメインルーチン /
4635 * Buy an item from a store -RAK-
4638 static void store_purchase(void)
4641 COMMAND_CODE item, item_new;
4652 GAME_TEXT o_name[MAX_NLEN];
4656 if (cur_store_num == STORE_MUSEUM)
4659 msg_print("博物館から取り出すことはできません。");
4661 msg_print("Museum.");
4667 if (st_ptr->stock_num <= 0)
4669 if (cur_store_num == STORE_HOME)
4671 msg_print("我が家には何も置いてありません。");
4673 msg_print("Your home is empty.");
4678 msg_print("現在商品の在庫を切らしています。");
4680 msg_print("I am currently out of stock.");
4687 /* Find the number of objects on this and following pages */
4688 i = (st_ptr->stock_num - store_top);
4690 /* And then restrict it to the current page */
4691 if (i > store_bottom) i = store_bottom;
4695 /* ブラックマーケットの時は別のメッセージ */
4696 switch( cur_store_num ) {
4698 sprintf(out_val, "どのアイテムを取りますか? ");
4701 sprintf(out_val, "どれ? ");
4704 sprintf(out_val, "どの品物が欲しいんだい? ");
4708 if (cur_store_num == STORE_HOME)
4710 sprintf(out_val, "Which item do you want to take? ");
4714 sprintf(out_val, "Which item are you interested in? ");
4719 /* Get the item number to be bought */
4720 if (!get_stock(&item, out_val, 0, i - 1)) return;
4722 /* Get the actual index */
4723 item = item + store_top;
4725 /* Get the actual item */
4726 o_ptr = &st_ptr->stock[item];
4728 /* Assume the player wants just one of them */
4732 /* Get a copy of the object */
4733 object_copy(j_ptr, o_ptr);
4736 * If a rod or wand, allocate total maximum timeouts or charges
4737 * between those purchased and left on the shelf.
4739 reduce_charges(j_ptr, o_ptr->number - amt);
4741 /* Modify quantity */
4742 j_ptr->number = amt;
4744 /* Hack -- require room in pack */
4745 if (!inven_carry_okay(j_ptr))
4747 msg_print(_("そんなにアイテムを持てない。", "You cannot carry that many different items."));
4751 /* Determine the "best" price (per item) */
4752 best = price_item(j_ptr, ot_ptr->min_inflate, FALSE);
4754 /* Find out how many the player wants */
4755 if (o_ptr->number > 1)
4757 /* Hack -- note cost of "fixed" items */
4758 if ((cur_store_num != STORE_HOME) &&
4759 (o_ptr->ident & IDENT_FIXED))
4761 msg_format(_("一つにつき $%ldです。", "That costs %ld gold per item."), (long)(best));
4764 /* Get a quantity */
4765 amt = get_quantity(NULL, o_ptr->number);
4767 /* Allow user abort */
4768 if (amt <= 0) return;
4772 /* Get desired object */
4773 object_copy(j_ptr, o_ptr);
4776 * If a rod or wand, allocate total maximum timeouts or charges
4777 * between those purchased and left on the shelf.
4779 reduce_charges(j_ptr, o_ptr->number - amt);
4781 /* Modify quantity */
4782 j_ptr->number = amt;
4784 /* Hack -- require room in pack */
4785 if (!inven_carry_okay(j_ptr))
4787 msg_print(_("ザックにそのアイテムを入れる隙間がない。", "You cannot carry that many items."));
4791 /* Attempt to buy it */
4792 if (cur_store_num != STORE_HOME)
4794 /* Fixed price, quick buy */
4795 if (o_ptr->ident & (IDENT_FIXED))
4800 /* Go directly to the "best" deal */
4801 price = (best * j_ptr->number);
4807 /* Describe the object (fully) */
4808 object_desc(o_name, j_ptr, 0);
4809 msg_format(_("%s(%c)を購入する。", "Buying %s (%c)."), o_name, I2A(item));
4812 /* Haggle for a final price */
4813 choice = purchase_haggle(j_ptr, &price);
4815 /* Hack -- Got kicked out */
4816 if (st_ptr->store_open >= turn) return;
4819 /* Player wants it */
4822 /* Fix the item price (if "correctly" haggled) */
4823 if (price == (best * j_ptr->number)) o_ptr->ident |= (IDENT_FIXED);
4825 /* Player can afford it */
4826 if (p_ptr->au >= price)
4831 if (cur_store_num == STORE_BLACK) /* The black market is illegal! */
4832 chg_virtue(V_JUSTICE, -1);
4833 if((o_ptr->tval == TV_BOTTLE) && (cur_store_num != STORE_HOME))
4834 chg_virtue(V_NATURE, -1);
4842 /* Spend the money */
4845 /* Update the display */
4848 /* Hack -- buying an item makes you aware of it */
4849 object_aware(j_ptr);
4851 /* Hack -- clear the "fixed" flag from the item */
4852 j_ptr->ident &= ~(IDENT_FIXED);
4854 /* Describe the transaction */
4855 object_desc(o_name, j_ptr, 0);
4857 msg_format(_("%sを $%ldで購入しました。", "You bought %s for %ld gold."), o_name, (long)price);
4859 strcpy(record_o_name, o_name);
4862 if (record_buy) do_cmd_write_nikki(NIKKI_BUY, 0, o_name);
4863 object_desc(o_name, o_ptr, OD_NAME_ONLY);
4864 if(record_rand_art && o_ptr->art_name)
4865 do_cmd_write_nikki(NIKKI_ART, 0, o_name);
4867 /* Erase the inscription */
4868 j_ptr->inscription = 0;
4870 /* Erase the "feeling" */
4871 j_ptr->feeling = FEEL_NONE;
4872 j_ptr->ident &= ~(IDENT_STORE);
4873 /* Give it to the player */
4874 item_new = inven_carry(j_ptr);
4876 /* Describe the final result */
4877 object_desc(o_name, &inventory[item_new], 0);
4878 msg_format(_("%s(%c)を手に入れた。", "You have %s (%c)."), o_name, index_to_label(item_new));
4880 /* Auto-inscription */
4881 autopick_alter_item(item_new, FALSE);
4883 /* Now, reduce the original stack's pval. */
4884 if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
4886 o_ptr->pval -= j_ptr->pval;
4890 /* Note how many slots the store used to have */
4891 i = st_ptr->stock_num;
4893 /* Remove the bought items from the store */
4894 store_item_increase(item, -amt);
4895 store_item_optimize(item);
4897 /* Store is empty */
4898 if (st_ptr->stock_num == 0)
4901 if (one_in_(STORE_SHUFFLE))
4904 msg_print(_("店主は引退した。", "The shopkeeper retires."));
4906 /* Shuffle the store */
4907 store_shuffle(cur_store_num);
4910 sprintf(buf, "%s (%s)",
4911 ot_ptr->owner_name, race_info[ot_ptr->owner_race].title);
4912 put_str(buf, 3, 10);
4913 sprintf(buf, "%s (%ld)",
4914 (f_name + f_info[cur_store_feat].name), (long)(ot_ptr->max_cost));
4921 msg_print(_("店主は新たな在庫を取り出した。", "The shopkeeper brings out some new stock."));
4925 for (i = 0; i < 10; i++)
4927 /* Maintain the store */
4928 store_maint(p_ptr->town_num, cur_store_num);
4933 display_inventory();
4936 /* The item is gone */
4937 else if (st_ptr->stock_num != i)
4939 /* Pick the correct screen */
4940 if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
4941 display_inventory();
4944 /* Item is still here */
4947 /* Redraw the item */
4948 display_entry(item);
4952 /* Player cannot afford it */
4955 /* Simple message (no insult) */
4956 msg_print(_("お金が足りません。", "You do not have enough gold."));
4961 /* Home is much easier */
4964 bool combined_or_reordered;
4966 /* Distribute charges of wands/rods */
4967 distribute_charges(o_ptr, j_ptr, amt);
4969 /* Give it to the player */
4970 item_new = inven_carry(j_ptr);
4972 /* Describe just the result */
4973 object_desc(o_name, &inventory[item_new], 0);
4975 msg_format(_("%s(%c)を取った。", "You have %s (%c)."), o_name, index_to_label(item_new));
4978 /* Take note if we take the last one */
4979 i = st_ptr->stock_num;
4981 /* Remove the items from the home */
4982 store_item_increase(item, -amt);
4983 store_item_optimize(item);
4985 combined_or_reordered = combine_and_reorder_home(STORE_HOME);
4987 /* Hack -- Item is still here */
4988 if (i == st_ptr->stock_num)
4990 if (combined_or_reordered) display_inventory();
4992 /* Redraw the item */
4993 else display_entry(item);
4996 /* The item is gone */
5000 if (st_ptr->stock_num == 0) store_top = 0;
5002 /* Nothing left on that screen */
5003 else if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
5004 display_inventory();
5006 chg_virtue(V_SACRIFICE, 1);
5010 /* Not kicked out */
5016 * @brief 店からの売却処理のメインルーチン /
5017 * Sell an item to the store (or home)
5020 static void store_sell(void)
5027 PRICE price, value, dummy;
5036 GAME_TEXT o_name[MAX_NLEN];
5039 /* Prepare a prompt */
5040 if (cur_store_num == STORE_HOME)
5041 q = _("どのアイテムを置きますか? ", "Drop which item? ");
5043 else if (cur_store_num == STORE_MUSEUM)
5044 q = _("どのアイテムを寄贈しますか? ", "Give which item? ");
5047 q = _("どのアイテムを売りますか? ", "Sell which item? ");
5049 /* Only allow items the store will buy */
5050 item_tester_hook = store_will_buy;
5052 /* 我が家でおかしなメッセージが出るオリジナルのバグを修正 */
5053 if (cur_store_num == STORE_HOME)
5055 s = _("置けるアイテムを持っていません。", "You don't have any item to drop.");
5057 else if (cur_store_num == STORE_MUSEUM)
5059 s = _("寄贈できるアイテムを持っていません。", "You don't have any item to give.");
5063 s = _("欲しい物がないですねえ。", "You have nothing that I want.");
5066 o_ptr = choose_object(&item, q, s, (USE_EQUIP | USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT));
5069 /* Hack -- Cannot remove cursed items */
5070 if ((item >= INVEN_RARM) && object_is_cursed(o_ptr))
5072 msg_print(_("ふーむ、どうやらそれは呪われているようだね。", "Hmmm, it seems to be cursed."));
5076 /* Assume one item */
5079 /* Find out how many the player wants (letter means "all") */
5080 if (o_ptr->number > 1)
5082 /* Get a quantity */
5083 amt = get_quantity(NULL, o_ptr->number);
5085 /* Allow user abort */
5086 if (amt <= 0) return;
5090 /* Get a copy of the object */
5091 object_copy(q_ptr, o_ptr);
5093 /* Modify quantity */
5094 q_ptr->number = amt;
5097 * Hack -- If a rod or wand, allocate total maximum
5098 * timeouts or charges to those being sold. -LM-
5100 if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
5102 q_ptr->pval = o_ptr->pval * amt / o_ptr->number;
5105 /* Get a full description */
5106 object_desc(o_name, q_ptr, 0);
5108 /* Remove any inscription, feeling for stores */
5109 if ((cur_store_num != STORE_HOME) && (cur_store_num != STORE_MUSEUM))
5111 q_ptr->inscription = 0;
5112 q_ptr->feeling = FEEL_NONE;
5115 /* Is there room in the store (or the home?) */
5116 if (!store_check_num(q_ptr))
5118 if (cur_store_num == STORE_HOME)
5119 msg_print(_("我が家にはもう置く場所がない。", "Your home is full."));
5121 else if (cur_store_num == STORE_MUSEUM)
5122 msg_print(_("博物館はもう満杯だ。", "Museum is full."));
5125 msg_print(_("すいませんが、店にはもう置く場所がありません。", "I have not the room in my store to keep it."));
5132 if ((cur_store_num != STORE_HOME) && (cur_store_num != STORE_MUSEUM))
5134 /* Describe the transaction */
5135 msg_format(_("%s(%c)を売却する。", "Selling %s (%c)."), o_name, index_to_label(item));
5140 choice = sell_haggle(q_ptr, &price);
5143 if (st_ptr->store_open >= turn) return;
5155 if (cur_store_num == STORE_BLACK) /* The black market is illegal! */
5156 chg_virtue(V_JUSTICE, -1);
5158 if((o_ptr->tval == TV_BOTTLE) && (cur_store_num != STORE_HOME))
5159 chg_virtue(V_NATURE, 1);
5162 /* Get some money */
5165 /* Update the display */
5168 /* Get the "apparent" value */
5169 dummy = object_value(q_ptr) * q_ptr->number;
5171 identify_item(o_ptr);
5174 /* Get a copy of the object */
5175 object_copy(q_ptr, o_ptr);
5177 /* Modify quantity */
5178 q_ptr->number = amt;
5180 /* Make it look like to be known */
5181 q_ptr->ident |= IDENT_STORE;
5184 * Hack -- If a rod or wand, let the shopkeeper know just
5185 * how many charges he really paid for. -LM-
5187 if ((o_ptr->tval == TV_ROD) || (o_ptr->tval == TV_WAND))
5189 q_ptr->pval = o_ptr->pval * amt / o_ptr->number;
5192 /* Get the "actual" value */
5193 value = object_value(q_ptr) * q_ptr->number;
5195 /* Get the description all over again */
5196 object_desc(o_name, q_ptr, 0);
5198 /* Describe the result (in message buffer) */
5199 msg_format(_("%sを $%ldで売却しました。", "You sold %s for %ld gold."), o_name, (long)price);
5201 if (record_sell) do_cmd_write_nikki(NIKKI_SELL, 0, o_name);
5203 if (!((o_ptr->tval == TV_FIGURINE) && (value > 0)))
5205 /* Analyze the prices (and comment verbally) unless a figurine*/
5206 purchase_analyze(price, value, dummy);
5210 * Hack -- Allocate charges between those wands or rods sold
5211 * and retained, unless all are being sold. -LM-
5213 distribute_charges(o_ptr, q_ptr, amt);
5215 /* Reset timeouts of the sold items */
5218 /* Take the item from the player, describe the result */
5219 inven_item_increase(item, -amt);
5220 inven_item_describe(item);
5222 /* If items remain, auto-inscribe before optimizing */
5223 if (o_ptr->number > 0)
5224 autopick_alter_item(item, FALSE);
5226 inven_item_optimize(item);
5229 /* The store gets that (known) item */
5230 item_pos = store_carry(q_ptr);
5232 /* Re-display if item is now in store */
5235 store_top = (item_pos / store_bottom) * store_bottom;
5236 display_inventory();
5241 /* Player is at museum */
5242 else if (cur_store_num == STORE_MUSEUM)
5244 char o2_name[MAX_NLEN];
5245 object_desc(o2_name, q_ptr, OD_NAME_ONLY);
5247 if (-1 == store_check_num(q_ptr))
5249 msg_print(_("それと同じ品物は既に博物館にあるようです。", "The same object as it is already in the Museum."));
5253 msg_print(_("博物館に寄贈したものは取り出すことができません!!", "You cannot take items which is given to the Museum back!!"));
5256 if (!get_check(format(_("本当に%sを寄贈しますか?", "Really give %s to the Museum? "), o2_name))) return;
5258 identify_item(q_ptr);
5259 q_ptr->ident |= IDENT_MENTAL;
5261 /* Distribute charges of wands/rods */
5262 distribute_charges(o_ptr, q_ptr, amt);
5263 msg_format(_("%sを置いた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
5266 /* Take it from the players inventory */
5267 inven_item_increase(item, -amt);
5268 inven_item_describe(item);
5269 inven_item_optimize(item);
5272 /* Let the home carry it */
5273 item_pos = home_carry(q_ptr);
5275 /* Update store display */
5278 store_top = (item_pos / store_bottom) * store_bottom;
5279 display_inventory();
5282 /* Player is at home */
5285 /* Distribute charges of wands/rods */
5286 distribute_charges(o_ptr, q_ptr, amt);
5287 msg_format(_("%sを置いた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
5291 /* Take it from the players inventory */
5292 inven_item_increase(item, -amt);
5293 inven_item_describe(item);
5294 inven_item_optimize(item);
5297 /* Let the home carry it */
5298 item_pos = home_carry(q_ptr);
5300 /* Update store display */
5303 store_top = (item_pos / store_bottom) * store_bottom;
5304 display_inventory();
5308 if ((choice == 0) && (item >= INVEN_RARM))
5317 * @brief 店のアイテムを調べるコマンドのメインルーチン /
5318 * Examine an item in a store -JDL-
5321 static void store_examine(void)
5326 GAME_TEXT o_name[MAX_NLEN];
5330 if (st_ptr->stock_num <= 0)
5332 if (cur_store_num == STORE_HOME)
5333 msg_print(_("我が家には何も置いてありません。", "Your home is empty."));
5334 else if (cur_store_num == STORE_MUSEUM)
5335 msg_print(_("博物館には何も置いてありません。", "Museum is empty."));
5337 msg_print(_("現在商品の在庫を切らしています。", "I am currently out of stock."));
5341 /* Find the number of objects on this and following pages */
5342 i = (st_ptr->stock_num - store_top);
5344 /* And then restrict it to the current page */
5345 if (i > store_bottom) i = store_bottom;
5348 sprintf(out_val, _("どれを調べますか?", "Which item do you want to examine? "));
5350 /* Get the item number to be examined */
5351 if (!get_stock(&item, out_val, 0, i - 1)) return;
5353 /* Get the actual index */
5354 item = item + store_top;
5356 /* Get the actual item */
5357 o_ptr = &st_ptr->stock[item];
5359 /* Require full knowledge */
5360 if (!(o_ptr->ident & IDENT_MENTAL))
5362 /* This can only happen in the home */
5363 msg_print(_("このアイテムについて特に知っていることはない。", "You have no special knowledge about that item."));
5367 object_desc(o_name, o_ptr, 0);
5368 msg_format(_("%sを調べている...", "Examining %s..."), o_name);
5370 if (!screen_object(o_ptr, SCROBJ_FORCE_DETAIL))
5371 msg_print(_("特に変わったところはないようだ。", "You see nothing special."));
5378 * @brief 博物館のアイテムを除去するコマンドのメインルーチン /
5379 * Remove an item from museum (Originally from TOband)
5382 static void museum_remove_object(void)
5387 GAME_TEXT o_name[MAX_NLEN];
5391 if (st_ptr->stock_num <= 0)
5393 msg_print(_("博物館には何も置いてありません。", "Museum is empty."));
5397 /* Find the number of objects on this and following pages */
5398 i = st_ptr->stock_num - store_top;
5400 /* And then restrict it to the current page */
5401 if (i > store_bottom) i = store_bottom;
5404 sprintf(out_val, _("どのアイテムの展示をやめさせますか?", "Which item do you want to order to remove? "));
5406 /* Get the item number to be removed */
5407 if (!get_stock(&item, out_val, 0, i - 1)) return;
5409 /* Get the actual index */
5410 item = item + store_top;
5412 /* Get the actual item */
5413 o_ptr = &st_ptr->stock[item];
5415 object_desc(o_name, o_ptr, 0);
5417 msg_print(_("展示をやめさせたアイテムは二度と見ることはできません!", "You cannot see items which is removed from the Museum!"));
5418 if (!get_check(format(_("本当に%sの展示をやめさせますか?", "Really order to remove %s from the Museum? "), o_name))) return;
5420 msg_format(_("%sの展示をやめさせた。", "You ordered to remove %s."), o_name);
5422 /* Remove the items from the home */
5423 store_item_increase(item, -o_ptr->number);
5424 store_item_optimize(item);
5426 (void)combine_and_reorder_home(STORE_MUSEUM);
5428 /* The item is gone */
5431 if (st_ptr->stock_num == 0) store_top = 0;
5433 /* Nothing left on that screen */
5434 else if (store_top >= st_ptr->stock_num) store_top -= store_bottom;
5435 display_inventory();
5442 * Hack -- set this to leave the store
5444 static bool leave_store = FALSE;
5448 * @brief 店舗処理コマンド選択のメインルーチン /
5449 * Process a command in a store
5453 * Note that we must allow the use of a few "special" commands
5454 * in the stores which are not allowed in the dungeon, and we
5455 * must disable some commands which are allowed in the dungeon
5456 * but not in the stores, to prevent chaos.
5459 static void store_process_command(void)
5461 /* Handle repeating the last command */
5464 if (rogue_like_commands && command_cmd == 'l')
5466 command_cmd = 'x'; /* hack! */
5469 /* Parse the command */
5470 switch (command_cmd)
5480 /* 1 ページ戻るコマンド: 我が家のページ数が多いので重宝するはず By BUG */
5483 if (st_ptr->stock_num <= store_bottom) {
5484 msg_print(_("これで全部です。", "Entire inventory is shown."));
5487 store_top -= store_bottom;
5488 if ( store_top < 0 )
5489 store_top = ((st_ptr->stock_num - 1 )/store_bottom) * store_bottom;
5490 if ( (cur_store_num == STORE_HOME) && (powerup_home == FALSE) )
5491 if ( store_top >= store_bottom ) store_top = store_bottom;
5492 display_inventory();
5500 if (st_ptr->stock_num <= store_bottom)
5502 msg_print(_("これで全部です。", "Entire inventory is shown."));
5506 store_top += store_bottom;
5508 * 隠しオプション(powerup_home)がセットされていないときは
5509 * 我が家では 2 ページまでしか表示しない
5511 if ((cur_store_num == STORE_HOME) &&
5512 (powerup_home == FALSE) &&
5513 (st_ptr->stock_num >= STORE_INVEN_MAX))
5515 if (store_top >= (STORE_INVEN_MAX - 1))
5522 if (store_top >= st_ptr->stock_num) store_top = 0;
5525 display_inventory();
5537 /* Get (purchase) */
5564 /*** Inventory Commands ***/
5566 /* Wear/wield equipment */
5573 /* Take off equipment */
5580 /* Destroy an item */
5587 /* Equipment list */
5594 /* Inventory list */
5602 /*** Various commands ***/
5604 /* Identify an object */
5611 /* Hack -- toggle windows */
5614 toggle_inven_equip();
5618 /*** Use various objects ***/
5623 if ( (p_ptr->pclass == CLASS_MINDCRAFTER) ||
5624 (p_ptr->pclass == CLASS_BERSERKER) ||
5625 (p_ptr->pclass == CLASS_NINJA) ||
5626 (p_ptr->pclass == CLASS_MIRROR_MASTER)
5627 ) do_cmd_mind_browse();
5628 else if (p_ptr->pclass == CLASS_SMITH)
5630 else if (p_ptr->pclass == CLASS_MAGIC_EATER)
5631 do_cmd_magic_eater(TRUE, FALSE);
5632 else if (p_ptr->pclass == CLASS_SNIPER)
5633 do_cmd_snipe_browse();
5634 else do_cmd_browse();
5638 /* Inscribe an object */
5645 /* Uninscribe an object */
5648 do_cmd_uninscribe();
5654 /*** Help and Such ***/
5663 /* Identify symbol */
5666 do_cmd_query_symbol();
5670 /* Character description */
5673 p_ptr->town_num = old_town_num;
5674 do_cmd_change_name();
5675 p_ptr->town_num = inner_town_num;
5681 /*** System Commands ***/
5683 /* Hack -- User interface */
5690 /* Single line from a pref file */
5693 p_ptr->town_num = old_town_num;
5695 p_ptr->town_num = inner_town_num;
5699 /* Interact with macros */
5702 p_ptr->town_num = old_town_num;
5704 p_ptr->town_num = inner_town_num;
5708 /* Interact with visuals */
5711 p_ptr->town_num = old_town_num;
5713 p_ptr->town_num = inner_town_num;
5717 /* Interact with colors */
5720 p_ptr->town_num = old_town_num;
5722 p_ptr->town_num = inner_town_num;
5726 /* Interact with options */
5730 (void)combine_and_reorder_home(STORE_HOME);
5736 /*** Misc Commands ***/
5752 /* Repeat level feeling */
5759 /* Show previous message */
5762 do_cmd_message_one();
5766 /* Show previous messages */
5779 /* Check artifacts, uniques etc. */
5786 /* Load "screen dump" */
5789 do_cmd_load_screen();
5793 /* Save "screen dump" */
5796 do_cmd_save_screen();
5800 /* Hack -- Unknown command */
5803 if ((cur_store_num == STORE_MUSEUM) && (command_cmd == 'r'))
5805 museum_remove_object();
5809 msg_print(_("そのコマンドは店の中では使えません。", "That command does not work in stores."));
5818 * @brief 店舗処理全体のメインルーチン /
5819 * Enter a store, and interact with it. *
5823 * Note that we use the standard "request_command()" function
5824 * to get a command, allowing us to use "command_arg" and all
5825 * command macros and other nifty stuff, but we use the special
5826 * "shopping" argument, to force certain commands to be converted
5827 * into other commands, normally, we convert "p" (pray) and "m"
5828 * (cast magic) into "g" (get), and "s" (search) into "d" (drop).
5831 void do_cmd_store(void)
5837 bool need_redraw_store_inv; /* To redraw missiles damage and prices in store */
5840 if(p_ptr->wild_mode) return;
5841 Term_get_size(&w, &h);
5843 /* Calculate stocks per 1 page */
5844 xtra_stock = MIN(14+26, ((h > 24) ? (h - 24) : 0));
5845 store_bottom = MIN_STOCK + xtra_stock;
5847 /* Access the player grid */
5848 c_ptr = &cave[p_ptr->y][p_ptr->x];
5850 /* Verify a store */
5851 if (!cave_have_flag_grid(c_ptr, FF_STORE))
5853 msg_print(_("ここには店がありません。", "You see no store here."));
5857 /* Extract the store code */
5858 which = f_info[c_ptr->feat].subtype;
5860 old_town_num = p_ptr->town_num;
5861 if ((which == STORE_HOME) || (which == STORE_MUSEUM)) p_ptr->town_num = 1;
5862 if (dun_level) p_ptr->town_num = NO_TOWN;
5863 inner_town_num = p_ptr->town_num;
5865 /* Hack -- Check the "locked doors" */
5866 if ((town[p_ptr->town_num].store[which].store_open >= turn) ||
5869 msg_print(_("ドアに鍵がかかっている。", "The doors are locked."));
5870 p_ptr->town_num = old_town_num;
5874 /* Calculate the number of store maintainances since the last visit */
5875 maintain_num = (turn - town[p_ptr->town_num].store[which].last_visit) / (TURNS_PER_TICK * STORE_TICKS);
5877 /* Maintain the store max. 10 times */
5878 if (maintain_num > 10) maintain_num = 10;
5882 /* Maintain the store */
5883 for (i = 0; i < maintain_num; i++)
5884 store_maint(p_ptr->town_num, which);
5886 /* Save the visit */
5887 town[p_ptr->town_num].store[which].last_visit = turn;
5893 /* Hack -- Character is in "icky" mode */
5894 character_icky = TRUE;
5901 /* Do not expand macros */
5902 get_com_no_macros = TRUE;
5904 /* Save the store number */
5905 cur_store_num = which;
5907 /* Hack -- save the store feature */
5908 cur_store_feat = c_ptr->feat;
5910 /* Save the store and owner pointers */
5911 st_ptr = &town[p_ptr->town_num].store[cur_store_num];
5912 ot_ptr = &owners[cur_store_num][st_ptr->owner];
5914 /* Start at the beginning */
5917 play_music(TERM_XTRA_MUSIC_BASIC, MUSIC_BASIC_BUILD);
5922 leave_store = FALSE;
5924 /* Interact with player */
5925 while (!leave_store)
5927 /* Hack -- Clear line 1 */
5931 clear_from(20 + xtra_stock);
5933 /* Basic commands */
5934 prt(_(" ESC) 建物から出る", " ESC) Exit from Building."), 21 + xtra_stock, 0);
5936 /* Browse if necessary */
5937 if (st_ptr->stock_num > store_bottom)
5939 prt(_(" -)前ページ", " -) Previous page"), 22 + xtra_stock, 0);
5940 prt(_(" スペース) 次ページ", " SPACE) Next page"), 23 + xtra_stock, 0);
5944 if (cur_store_num == STORE_HOME)
5946 prt(_("g) アイテムを取る", "g) Get an item."), 21 + xtra_stock, 27);
5947 prt(_("d) アイテムを置く", "d) Drop an item."), 22 + xtra_stock, 27);
5948 prt(_("x) 家のアイテムを調べる", "x) eXamine an item in the home."), 23 + xtra_stock, 27);
5951 /* Museum commands */
5952 else if (cur_store_num == STORE_MUSEUM)
5954 prt(_("d) アイテムを置く", "d) Drop an item."), 21 + xtra_stock, 27);
5955 prt(_("r) アイテムの展示をやめる", "r) order to Remove an item."), 22 + xtra_stock, 27);
5956 prt(_("x) 博物館のアイテムを調べる", "x) eXamine an item in the museum."), 23 + xtra_stock, 27);
5962 prt(_("p) 商品を買う", "p) Purchase an item."), 21 + xtra_stock, 30);
5963 prt(_("s) アイテムを売る", "s) Sell an item."), 22 + xtra_stock, 30);
5964 prt(_("x) 商品を調べる", "x) eXamine an item in the shop"), 23 + xtra_stock,30);
5968 prt(_("i/e) 持ち物/装備の一覧", "i/e) Inventry/Equipment list"), 21 + xtra_stock, 56);
5970 if (rogue_like_commands)
5972 prt(_("w/T) 装備する/はずす", "w/T) Wear/Take off equipment"), 22 + xtra_stock, 56);
5976 prt(_("w/t) 装備する/はずす", "w/t) Wear/Take off equipment"), 22 + xtra_stock, 56);
5980 prt(_("コマンド:", "You may: "), 20 + xtra_stock, 0);
5982 request_command(TRUE);
5984 /* Process the command */
5985 store_process_command();
5988 * Hack -- To redraw missiles damage and prices in store
5989 * If player's charisma changes, or if player changes a bow, PU_BONUS is set
5991 need_redraw_store_inv = (p_ptr->update & PU_BONUS) ? TRUE : FALSE;
5993 /* Hack -- Character is still in "icky" mode */
5994 character_icky = TRUE;
5999 if (inventory[INVEN_PACK].k_idx)
6001 INVENTORY_IDX item = INVEN_PACK;
6003 object_type *o_ptr = &inventory[item];
6005 /* Hack -- Flee from the store */
6006 if (cur_store_num != STORE_HOME)
6008 if (cur_store_num == STORE_MUSEUM)
6009 msg_print(_("ザックからアイテムがあふれそうなので、あわてて博物館から出た...", "Your pack is so full that you flee the Museum..."));
6011 msg_print(_("ザックからアイテムがあふれそうなので、あわてて店から出た...", "Your pack is so full that you flee the store..."));
6017 /* Hack -- Flee from the home */
6018 else if (!store_check_num(o_ptr))
6020 msg_print(_("ザックからアイテムがあふれそうなので、あわてて家から出た...", "Your pack is so full that you flee your home..."));
6025 /* Hack -- Drop items into the home */
6033 GAME_TEXT o_name[MAX_NLEN];
6035 /* Give a message */
6036 msg_print(_("ザックからアイテムがあふれてしまった!", "Your pack overflows!"));
6040 object_copy(q_ptr, o_ptr);
6041 object_desc(o_name, q_ptr, 0);
6043 msg_format(_("%sが落ちた。(%c)", "You drop %s (%c)."), o_name, index_to_label(item));
6045 /* Remove it from the players inventory */
6046 inven_item_increase(item, -255);
6047 inven_item_describe(item);
6048 inven_item_optimize(item);
6051 /* Let the home carry it */
6052 item_pos = home_carry(q_ptr);
6054 /* Redraw the home */
6057 store_top = (item_pos / store_bottom) * store_bottom;
6058 display_inventory();
6063 /* Hack -- Redisplay store prices if charisma changes */
6064 /* Hack -- Redraw missiles damage if player changes bow */
6065 if (need_redraw_store_inv) display_inventory();
6067 /* Hack -- get kicked out of the store */
6068 if (st_ptr->store_open >= turn) leave_store = TRUE;
6071 select_floor_music();
6073 p_ptr->town_num = old_town_num;
6076 p_ptr->energy_use = 100;
6079 /* Hack -- Character is no longer in "icky" mode */
6080 character_icky = FALSE;
6083 /* Hack -- Cancel automatic command */
6086 /* Hack -- Cancel "see" mode */
6087 command_see = FALSE;
6089 /* Allow expanding macros */
6090 get_com_no_macros = FALSE;
6095 /* Update everything */
6096 p_ptr->update |= (PU_VIEW | PU_LITE | PU_MON_LITE);
6097 p_ptr->update |= (PU_MONSTERS);
6099 /* Redraw entire screen */
6100 p_ptr->redraw |= (PR_BASIC | PR_EXTRA | PR_EQUIPPY);
6101 p_ptr->redraw |= (PR_MAP);
6102 p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
6108 * @brief 現在の町の店主を交代させる /
6109 * Shuffle one of the stores.
6110 * @param which 店舗種類のID
6113 void store_shuffle(int which)
6119 if (which == STORE_HOME) return;
6120 if (which == STORE_MUSEUM) return;
6123 /* Save the store index */
6124 cur_store_num = which;
6126 /* Activate that store */
6127 st_ptr = &town[p_ptr->town_num].store[cur_store_num];
6130 /* Pick a new owner */
6133 st_ptr->owner = (byte)randint0(MAX_OWNERS);
6134 if (j == st_ptr->owner) continue;
6135 for (i = 1;i < max_towns; i++)
6137 if (i == p_ptr->town_num) continue;
6138 if (st_ptr->owner == town[i].store[cur_store_num].owner) break;
6140 if (i == max_towns) break;
6143 /* Activate the new owner */
6144 ot_ptr = &owners[cur_store_num][st_ptr->owner];
6147 /* Reset the owner data */
6148 st_ptr->insult_cur = 0;
6149 st_ptr->store_open = 0;
6150 st_ptr->good_buy = 0;
6151 st_ptr->bad_buy = 0;
6154 /* Hack -- discount all the items */
6155 for (i = 0; i < st_ptr->stock_num; i++)
6159 o_ptr = &st_ptr->stock[i];
6161 if (!object_is_artifact(o_ptr))
6163 /* Hack -- Sell all non-artifact old items for "half price" */
6164 o_ptr->discount = 50;
6166 /* Hack -- Items are no longer "fixed price" */
6167 o_ptr->ident &= ~(IDENT_FIXED);
6169 /* Mega-Hack -- Note that the item is "on sale" */
6170 o_ptr->inscription = quark_add(_("売出中", "on sale"));
6177 * @brief 店の品揃えを変化させる /
6178 * Maintain the inventory at the stores.
6179 * @param town_num 町のID
6180 * @param store_num 店舗種類のID
6183 void store_maint(int town_num, int store_num)
6187 cur_store_num = store_num;
6190 if (store_num == STORE_HOME) return;
6191 if (store_num == STORE_MUSEUM) return;
6193 /* Activate that store */
6194 st_ptr = &town[town_num].store[store_num];
6196 /* Activate the owner */
6197 ot_ptr = &owners[store_num][st_ptr->owner];
6199 /* Store keeper forgives the player */
6200 st_ptr->insult_cur = 0;
6202 /* Mega-Hack -- prune the black market */
6203 if (store_num == STORE_BLACK)
6205 /* Destroy crappy black market items */
6206 for (j = st_ptr->stock_num - 1; j >= 0; j--)
6208 object_type *o_ptr = &st_ptr->stock[j];
6210 /* Destroy crappy items */
6211 if (black_market_crap(o_ptr))
6213 /* Destroy the item */
6214 store_item_increase(j, 0 - o_ptr->number);
6215 store_item_optimize(j);
6221 /* Choose the number of slots to keep */
6222 j = st_ptr->stock_num;
6224 /* Sell a few items */
6225 j = j - randint1(STORE_TURNOVER);
6227 /* Never keep more than "STORE_MAX_KEEP" slots */
6228 if (j > STORE_MAX_KEEP) j = STORE_MAX_KEEP;
6230 /* Always "keep" at least "STORE_MIN_KEEP" items */
6231 if (j < STORE_MIN_KEEP) j = STORE_MIN_KEEP;
6233 /* Hack -- prevent "underflow" */
6236 /* Destroy objects until only "j" slots are left */
6237 while (st_ptr->stock_num > j) store_delete();
6240 /* Choose the number of slots to fill */
6241 j = st_ptr->stock_num;
6243 /* Buy some more items */
6244 j = j + randint1(STORE_TURNOVER);
6246 /* Never keep more than "STORE_MAX_KEEP" slots */
6247 if (j > STORE_MAX_KEEP) j = STORE_MAX_KEEP;
6249 /* Always "keep" at least "STORE_MIN_KEEP" items */
6250 if (j < STORE_MIN_KEEP) j = STORE_MIN_KEEP;
6252 /* Hack -- prevent "overflow" */
6253 if (j >= st_ptr->stock_size) j = st_ptr->stock_size - 1;
6255 /* Acquire some new items */
6256 while (st_ptr->stock_num < j) store_create();
6261 * @brief 店舗情報を初期化する /
6262 * Initialize the stores
6263 * @param town_num 町のID
6264 * @param store_num 店舗種類のID
6267 void store_init(int town_num, int store_num)
6270 cur_store_num = store_num;
6272 /* Activate that store */
6273 st_ptr = &town[town_num].store[store_num];
6281 st_ptr->owner = (byte)randint0(MAX_OWNERS);
6282 for (i = 1;i < max_towns; i++)
6284 if (i == town_num) continue;
6285 if (st_ptr->owner == town[i].store[store_num].owner) break;
6287 if (i == max_towns) break;
6290 /* Activate the new owner */
6291 ot_ptr = &owners[store_num][st_ptr->owner];
6294 /* Initialize the store */
6295 st_ptr->store_open = 0;
6296 st_ptr->insult_cur = 0;
6297 st_ptr->good_buy = 0;
6298 st_ptr->bad_buy = 0;
6300 /* Nothing in stock */
6301 st_ptr->stock_num = 0;
6304 * MEGA-HACK - Last visit to store is
6305 * BEFORE player birth to enable store restocking
6307 st_ptr->last_visit = -10L * TURNS_PER_TICK * STORE_TICKS;
6309 /* Clear any old items */
6310 for (k = 0; k < st_ptr->stock_size; k++)
6312 object_wipe(&st_ptr->stock[k]);
6318 * @brief アイテムを町のブラックマーケットに移動させる /
6319 * @param o_ptr 移動させたいオブジェクトの構造体参照ポインタ
6322 void move_to_black_market(object_type *o_ptr)
6325 if (!p_ptr->town_num) return;
6327 st_ptr = &town[p_ptr->town_num].store[STORE_BLACK];
6329 o_ptr->ident |= IDENT_STORE;
6331 (void)store_carry(o_ptr);
6333 object_wipe(o_ptr); /* Don't leave a bogus object behind... */