2 #include "object-hook.h"
3 #include "player-status.h"
8 * エッセンス情報の構造体 / A structure for smithing
11 int add; /* TR flag number or special essence id */
12 concptr add_name; /* Name of this ability */
13 ESSENCE_IDX type; /* Menu number */
14 int essence; /* Index for carrying essences */
15 int value; /* Needed value to add this ability */
20 * エッセンス情報テーブル Smithing type data for Weapon smith
23 static essence_type essence_info[] =
25 {TR_STR, "腕力", 4, TR_STR, 20},
26 {TR_INT, "知能", 4, TR_INT, 20},
27 {TR_WIS, "賢さ", 4, TR_WIS, 20},
28 {TR_DEX, "器用さ", 4, TR_DEX, 20},
29 {TR_CON, "耐久力", 4, TR_CON, 20},
30 {TR_CHR, "魅力", 4, TR_CHR, 20},
31 {TR_MAGIC_MASTERY, "魔力支配", 4, TR_MAGIC_MASTERY, 20},
32 {TR_STEALTH, "隠密", 4, TR_STEALTH, 40},
33 {TR_SEARCH, "探索", 4, TR_SEARCH, 15},
34 {TR_INFRA, "赤外線視力", 4, TR_INFRA, 15},
35 {TR_TUNNEL, "採掘", 4, TR_TUNNEL, 15},
36 {TR_SPEED, "スピード", 4, TR_SPEED, 12},
37 {TR_BLOWS, "追加攻撃", 1, TR_BLOWS, 20},
38 {TR_CHAOTIC, "カオス攻撃", 1, TR_CHAOTIC, 15},
39 {TR_VAMPIRIC, "吸血攻撃", 1, TR_VAMPIRIC, 60},
40 {TR_IMPACT, "地震発動", 7, TR_IMPACT, 15},
41 {TR_BRAND_POIS, "毒殺", 1, TR_BRAND_POIS, 20},
42 {TR_BRAND_ACID, "溶解", 1, TR_BRAND_ACID, 20},
43 {TR_BRAND_ELEC, "電撃", 1, TR_BRAND_ELEC, 20},
44 {TR_BRAND_FIRE, "焼棄", 1, TR_BRAND_FIRE, 20},
45 {TR_BRAND_COLD, "凍結", 1, TR_BRAND_COLD, 20},
46 {TR_SUST_STR, "腕力維持", 3, TR_SUST_STR, 15},
47 {TR_SUST_INT, "知能維持", 3, TR_SUST_STR, 15},
48 {TR_SUST_WIS, "賢さ維持", 3, TR_SUST_STR, 15},
49 {TR_SUST_DEX, "器用さ維持", 3, TR_SUST_STR, 15},
50 {TR_SUST_CON, "耐久力維持", 3, TR_SUST_STR, 15},
51 {TR_SUST_CHR, "魅力維持", 3, TR_SUST_STR, 15},
52 {TR_IM_ACID, "酸免疫", 2, TR_IM_ACID, 20},
53 {TR_IM_ELEC, "電撃免疫", 2, TR_IM_ACID, 20},
54 {TR_IM_FIRE, "火炎免疫", 2, TR_IM_ACID, 20},
55 {TR_IM_COLD, "冷気免疫", 2, TR_IM_ACID, 20},
56 {TR_REFLECT, "反射", 2, TR_REFLECT, 20},
57 {TR_FREE_ACT, "麻痺知らず", 3, TR_FREE_ACT, 20},
58 {TR_HOLD_EXP, "経験値維持", 3, TR_HOLD_EXP, 20},
59 {TR_RES_ACID, "耐酸", 2, TR_RES_ACID, 15},
60 {TR_RES_ELEC, "耐電撃", 2, TR_RES_ELEC, 15},
61 {TR_RES_FIRE, "耐火炎", 2, TR_RES_FIRE, 15},
62 {TR_RES_COLD, "耐冷気", 2, TR_RES_COLD, 15},
63 {TR_RES_POIS, "耐毒", 2, TR_RES_POIS, 25},
64 {TR_RES_FEAR, "耐恐怖", 2, TR_RES_FEAR, 20},
65 {TR_RES_LITE, "耐閃光", 2, TR_RES_LITE, 20},
66 {TR_RES_DARK, "耐暗黒", 2, TR_RES_DARK, 20},
67 {TR_RES_BLIND, "耐盲目", 2, TR_RES_BLIND, 20},
68 {TR_RES_CONF, "耐混乱", 2, TR_RES_CONF, 20},
69 {TR_RES_SOUND, "耐轟音", 2, TR_RES_SOUND, 20},
70 {TR_RES_SHARDS, "耐破片", 2, TR_RES_SHARDS, 20},
71 {TR_RES_NETHER, "耐地獄", 2, TR_RES_NETHER, 20},
72 {TR_RES_NEXUS, "耐因果混乱", 2, TR_RES_NEXUS, 20},
73 {TR_RES_CHAOS, "耐カオス", 2, TR_RES_CHAOS, 20},
74 {TR_RES_DISEN, "耐劣化", 2, TR_RES_DISEN, 20},
75 {TR_SH_FIRE, "", 0, -2, 0},
76 {TR_SH_ELEC, "", 0, -2, 0},
77 {TR_SH_COLD, "", 0, -2, 0},
78 {TR_NO_MAGIC, "反魔法", 3, TR_NO_MAGIC, 15},
79 {TR_WARNING, "警告", 3, TR_WARNING, 20},
80 {TR_LEVITATION, "浮遊", 3, TR_LEVITATION, 20},
81 {TR_LITE_1, "永久光源", 3, TR_LITE_1, 15},
82 {TR_LITE_2, "", 0, -2, 0},
83 {TR_LITE_3, "", 0, -2, 0},
84 {TR_SEE_INVIS, "可視透明", 3, TR_SEE_INVIS, 20},
85 {TR_TELEPATHY, "テレパシー", 6, TR_TELEPATHY, 15},
86 {TR_SLOW_DIGEST, "遅消化", 3, TR_SLOW_DIGEST, 15},
87 {TR_REGEN, "急速回復", 3, TR_REGEN, 20},
88 {TR_TELEPORT, "テレポート", 3, TR_TELEPORT, 25},
90 {TR_SLAY_EVIL, "邪悪倍打", 5, TR_SLAY_EVIL, 100},
91 {TR_KILL_EVIL, "邪悪倍倍打", 0, TR_SLAY_EVIL, 60},
92 {TR_SLAY_ANIMAL, "動物倍打", 5, TR_SLAY_ANIMAL, 20},
93 {TR_KILL_ANIMAL, "動物倍倍打", 5, TR_SLAY_ANIMAL, 60},
94 {TR_SLAY_UNDEAD, "不死倍打", 5, TR_SLAY_UNDEAD, 20},
95 {TR_KILL_UNDEAD, "不死倍倍打", 5, TR_SLAY_UNDEAD, 60},
96 {TR_SLAY_DEMON, "悪魔倍打", 5, TR_SLAY_DEMON, 20},
97 {TR_KILL_DEMON, "悪魔倍倍打", 5, TR_SLAY_DEMON, 60},
98 {TR_SLAY_ORC, "オーク倍打", 5, TR_SLAY_ORC, 15},
99 {TR_KILL_ORC, "オーク倍倍打", 5, TR_SLAY_ORC, 60},
100 {TR_SLAY_TROLL, "トロル倍打", 5, TR_SLAY_TROLL, 15},
101 {TR_KILL_TROLL, "トロル倍倍打", 5, TR_SLAY_TROLL, 60},
102 {TR_SLAY_GIANT, "巨人倍打", 5, TR_SLAY_GIANT, 20},
103 {TR_KILL_GIANT, "巨人倍倍打", 5, TR_SLAY_GIANT, 60},
104 {TR_SLAY_DRAGON, "竜倍打", 5, TR_SLAY_DRAGON, 20},
105 {TR_KILL_DRAGON, "竜倍倍打", 5, TR_SLAY_DRAGON, 60},
106 {TR_SLAY_HUMAN, "人間倍打", 5, TR_SLAY_HUMAN, 20},
107 {TR_KILL_HUMAN, "人間倍倍打", 5, TR_SLAY_HUMAN, 60},
109 {TR_ESP_ANIMAL, "動物ESP", 6, TR_SLAY_ANIMAL, 40},
110 {TR_ESP_UNDEAD, "不死ESP", 6, TR_SLAY_UNDEAD, 40},
111 {TR_ESP_DEMON, "悪魔ESP", 6, TR_SLAY_DEMON, 40},
112 {TR_ESP_ORC, "オークESP", 6, TR_SLAY_ORC, 40},
113 {TR_ESP_TROLL, "トロルESP", 6, TR_SLAY_TROLL, 40},
114 {TR_ESP_GIANT, "巨人ESP", 6, TR_SLAY_GIANT, 40},
115 {TR_ESP_DRAGON, "竜ESP", 6, TR_SLAY_DRAGON, 40},
116 {TR_ESP_HUMAN, "人間ESP", 6, TR_SLAY_HUMAN, 40},
118 {ESSENCE_ATTACK, "攻撃", 10, TR_ES_ATTACK, 30},
119 {ESSENCE_AC, "防御", 10, TR_ES_AC, 15},
120 {ESSENCE_TMP_RES_ACID, "酸耐性発動", 7, TR_RES_ACID, 50},
121 {ESSENCE_TMP_RES_ELEC, "電撃耐性発動", 7, TR_RES_ELEC, 50},
122 {ESSENCE_TMP_RES_FIRE, "火炎耐性発動", 7, TR_RES_FIRE, 50},
123 {ESSENCE_TMP_RES_COLD, "冷気耐性発動", 7, TR_RES_COLD, 50},
124 {ESSENCE_SH_FIRE, "火炎オーラ", 7, -1, 50},
125 {ESSENCE_SH_ELEC, "電撃オーラ", 7, -1, 50},
126 {ESSENCE_SH_COLD, "冷気オーラ", 7, -1, 50},
127 {ESSENCE_RESISTANCE, "全耐性", 2, -1, 150},
128 {ESSENCE_SUSTAIN, "装備保持", 10, -1, 10},
129 {ESSENCE_SLAY_GLOVE, "殺戮の小手", 1, TR_ES_ATTACK, 200},
134 static essence_type essence_info[] =
136 {TR_STR, "strength", 4, TR_STR, 20},
137 {TR_INT, "intelligence", 4, TR_INT, 20},
138 {TR_WIS, "wisdom", 4, TR_WIS, 20},
139 {TR_DEX, "dexterity", 4, TR_DEX, 20},
140 {TR_CON, "constitution", 4, TR_CON, 20},
141 {TR_CHR, "charisma", 4, TR_CHR, 20},
142 {TR_MAGIC_MASTERY, "magic mastery", 4, TR_MAGIC_MASTERY, 20},
143 {TR_STEALTH, "stealth", 4, TR_STEALTH, 40},
144 {TR_SEARCH, "serching", 4, TR_SEARCH, 15},
145 {TR_INFRA, "infravision", 4, TR_INFRA, 15},
146 {TR_TUNNEL, "digging", 4, TR_TUNNEL, 15},
147 {TR_SPEED, "speed", 4, TR_SPEED, 12},
148 {TR_BLOWS, "extra attack", 1, TR_BLOWS, 20},
149 {TR_CHAOTIC, "chaos brand", 1, TR_CHAOTIC, 15},
150 {TR_VAMPIRIC, "vampiric brand", 1, TR_VAMPIRIC, 60},
151 {TR_IMPACT, "quake activation", 7, TR_IMPACT, 15},
152 {TR_BRAND_POIS, "poison brand", 1, TR_BRAND_POIS, 20},
153 {TR_BRAND_ACID, "acid brand", 1, TR_BRAND_ACID, 20},
154 {TR_BRAND_ELEC, "electric brand", 1, TR_BRAND_ELEC, 20},
155 {TR_BRAND_FIRE, "fire brand", 1, TR_BRAND_FIRE, 20},
156 {TR_BRAND_COLD, "cold brand", 1, TR_BRAND_COLD, 20},
157 {TR_SUST_STR, "sustain strength", 3, TR_SUST_STR, 15},
158 {TR_SUST_INT, "sustain intelligence", 3, TR_SUST_STR, 15},
159 {TR_SUST_WIS, "sustain wisdom", 3, TR_SUST_STR, 15},
160 {TR_SUST_DEX, "sustain dexterity", 3, TR_SUST_STR, 15},
161 {TR_SUST_CON, "sustain constitution", 3, TR_SUST_STR, 15},
162 {TR_SUST_CHR, "sustain charisma", 3, TR_SUST_STR, 15},
163 {TR_IM_ACID, "acid immunity", 2, TR_IM_ACID, 20},
164 {TR_IM_ELEC, "electric immunity", 2, TR_IM_ACID, 20},
165 {TR_IM_FIRE, "fire immunity", 2, TR_IM_ACID, 20},
166 {TR_IM_COLD, "cold immunity", 2, TR_IM_ACID, 20},
167 {TR_REFLECT, "reflection", 2, TR_REFLECT, 20},
168 {TR_FREE_ACT, "free action", 3, TR_FREE_ACT, 20},
169 {TR_HOLD_EXP, "hold experience", 3, TR_HOLD_EXP, 20},
170 {TR_RES_ACID, "resistance to acid", 2, TR_RES_ACID, 15},
171 {TR_RES_ELEC, "resistance to electric", 2, TR_RES_ELEC, 15},
172 {TR_RES_FIRE, "resistance to fire", 2, TR_RES_FIRE, 15},
173 {TR_RES_COLD, "resistance to cold", 2, TR_RES_COLD, 15},
174 {TR_RES_POIS, "resistance to poison", 2, TR_RES_POIS, 25},
175 {TR_RES_FEAR, "resistance to fear", 2, TR_RES_FEAR, 20},
176 {TR_RES_LITE, "resistance to light", 2, TR_RES_LITE, 20},
177 {TR_RES_DARK, "resistance to dark", 2, TR_RES_DARK, 20},
178 {TR_RES_BLIND, "resistance to blind", 2, TR_RES_BLIND, 20},
179 {TR_RES_CONF, "resistance to confusion", 2, TR_RES_CONF, 20},
180 {TR_RES_SOUND, "resistance to sound", 2, TR_RES_SOUND, 20},
181 {TR_RES_SHARDS, "resistance to shard", 2, TR_RES_SHARDS, 20},
182 {TR_RES_NETHER, "resistance to nether", 2, TR_RES_NETHER, 20},
183 {TR_RES_NEXUS, "resistance to nexus", 2, TR_RES_NEXUS, 20},
184 {TR_RES_CHAOS, "resistance to chaos", 2, TR_RES_CHAOS, 20},
185 {TR_RES_DISEN, "resistance to disenchantment", 2, TR_RES_DISEN, 20},
186 {TR_SH_FIRE, "", 0, -2, 0},
187 {TR_SH_ELEC, "", 0, -2, 0},
188 {TR_SH_COLD, "", 0, -2, 0},
189 {TR_NO_MAGIC, "anti magic", 3, TR_NO_MAGIC, 15},
190 {TR_WARNING, "warning", 3, TR_WARNING, 20},
191 {TR_LEVITATION, "levitation", 3, TR_LEVITATION, 20},
192 {TR_LITE_1, "permanent light", 3, TR_LITE_1, 15},
193 {TR_LITE_2, "", 0, -2, 0},
194 {TR_LITE_3, "", 0, -2, 0},
195 {TR_SEE_INVIS, "see invisible", 3, TR_SEE_INVIS, 20},
196 {TR_TELEPATHY, "telepathy", 6, TR_TELEPATHY, 15},
197 {TR_SLOW_DIGEST, "slow digestion", 3, TR_SLOW_DIGEST, 15},
198 {TR_REGEN, "regeneration", 3, TR_REGEN, 20},
199 {TR_TELEPORT, "teleport", 3, TR_TELEPORT, 25},
201 {TR_SLAY_EVIL, "slay evil", 5, TR_SLAY_EVIL, 100},
202 {TR_SLAY_ANIMAL, "slay animal", 5, TR_SLAY_ANIMAL, 20},
203 {TR_KILL_ANIMAL, "kill animal", 5, TR_SLAY_ANIMAL, 60},
204 {TR_KILL_EVIL, "kill evil", 0, TR_SLAY_EVIL, 60},
205 {TR_SLAY_UNDEAD, "slay undead", 5, TR_SLAY_UNDEAD, 20},
206 {TR_KILL_UNDEAD, "kill undead", 5, TR_SLAY_UNDEAD, 60},
207 {TR_SLAY_DEMON, "slay demon", 5, TR_SLAY_DEMON, 20},
208 {TR_KILL_DEMON, "kill demon", 5, TR_SLAY_DEMON, 60},
209 {TR_SLAY_ORC, "slay orc", 5, TR_SLAY_ORC, 15},
210 {TR_KILL_ORC, "kill orc", 5, TR_SLAY_ORC, 60},
211 {TR_SLAY_TROLL, "slay troll", 5, TR_SLAY_TROLL, 15},
212 {TR_KILL_TROLL, "kill troll", 5, TR_SLAY_TROLL, 60},
213 {TR_SLAY_GIANT, "slay giant", 5, TR_SLAY_GIANT, 20},
214 {TR_KILL_GIANT, "kill giant", 5, TR_SLAY_GIANT, 60},
215 {TR_SLAY_DRAGON, "slay dragon", 5, TR_SLAY_DRAGON, 20},
216 {TR_KILL_DRAGON, "kill dragon", 5, TR_SLAY_DRAGON, 60},
217 {TR_SLAY_HUMAN, "slay human", 5, TR_SLAY_HUMAN, 20},
218 {TR_KILL_HUMAN, "kill human", 5, TR_SLAY_HUMAN, 60},
220 {TR_ESP_ANIMAL, "sense animal", 6, TR_SLAY_ANIMAL, 40},
221 {TR_ESP_UNDEAD, "sense undead", 6, TR_SLAY_UNDEAD, 40},
222 {TR_ESP_DEMON, "sense demon", 6, TR_SLAY_DEMON, 40},
223 {TR_ESP_ORC, "sense orc", 6, TR_SLAY_ORC, 40},
224 {TR_ESP_TROLL, "sense troll", 6, TR_SLAY_TROLL, 40},
225 {TR_ESP_GIANT, "sense giant", 6, TR_SLAY_GIANT, 40},
226 {TR_ESP_DRAGON, "sense dragon", 6, TR_SLAY_DRAGON, 40},
227 {TR_ESP_HUMAN, "sense human", 6, TR_SLAY_HUMAN, 40},
229 {ESSENCE_ATTACK, "weapon enchant", 10, TR_ES_ATTACK, 30},
230 {ESSENCE_AC, "armor enchant", 10, TR_ES_AC, 15},
231 {ESSENCE_TMP_RES_ACID, "resist acid activation", 7, TR_RES_ACID, 50},
232 {ESSENCE_TMP_RES_ELEC, "resist electricity activation", 7, TR_RES_ELEC, 50},
233 {ESSENCE_TMP_RES_FIRE, "resist fire activation", 7, TR_RES_FIRE, 50},
234 {ESSENCE_TMP_RES_COLD, "resist cold activation", 7, TR_RES_COLD, 50},
235 {ESSENCE_SH_FIRE, "fiery sheath", 7, -1, 50},
236 {ESSENCE_SH_ELEC, "electric sheath", 7, -1, 50},
237 {ESSENCE_SH_COLD, "sheath of coldness", 7, -1, 50},
238 {ESSENCE_RESISTANCE, "resistance", 2, -1, 150},
239 {ESSENCE_SUSTAIN, "elements proof", 10, -1, 10},
240 {ESSENCE_SLAY_GLOVE, "gauntlets of slaying", 1, TR_ES_ATTACK, 200},
248 * エッセンス名テーブル / Essense names for Weapon smith
251 concptr essence_name[] =
354 concptr essence_name[] =
456 static concptr const kaji_tips[5] =
459 "現在持っているエッセンスの一覧を表示する。",
460 "アイテムからエッセンスを取り出す。エッセンスを取られたアイテムは全く魔法がかかっていない初期状態に戻る。",
461 "既にエッセンスが付加されたアイテムからエッセンスのみ消し去る。エッセンスは手に入らない。",
462 "アイテムにエッセンスを付加する。既にエッセンスが付加されたアイテムやアーティファクトには付加できない。",
463 "武器や防具を強化したり、攻撃で傷つかないようにしたりする。エッセンスが付加されたアイテムやアーティファクトに対しても使用できる。",
465 "Display essences you have.",
466 "Extract essences from an item. The item become non magical.",
467 "Remove added essences from an equipment which was improved before. The removed essence will be ruined.",
468 "Add essences to an item. The improved items or artifacts cannot be reimprove.",
469 "Enchant an equipment or make an equiment element-proofed. The improved items and artifacts can be enchanted too.",
475 * @brief 所持しているエッセンス一覧を表示する
478 static void display_essence(void)
483 for (i = 1; i < 22; i++)
487 prt(_("エッセンス 個数 エッセンス 個数 エッセンス 個数",
488 "Essence Num Essence Num Essence Num "), 1, 8);
489 for (i = 0; essence_name[i]; i++)
491 if (!essence_name[i][0]) continue;
492 prt(format("%-11s %5d", essence_name[i], p_ptr->magic_num1[i]), 2 + num % 21, 8 + num / 21 * 22);
495 prt(_("現在所持しているエッセンス", "List of all essences you have."), 0, 0);
505 static void drain_essence(void)
507 int drain_value[sizeof(p_ptr->magic_num1) / sizeof(s32b)];
511 bool observe = FALSE;
512 int old_ds, old_dd, old_to_h, old_to_d, old_ac, old_to_a, old_pval, old_name2;
513 TIME_EFFECT old_timeout;
514 BIT_FLAGS old_flgs[TR_FLAG_SIZE], new_flgs[TR_FLAG_SIZE];
520 OBJECT_IDX next_o_idx;
523 for (i = 0; i < sizeof(drain_value) / sizeof(int); i++)
526 item_tester_hook = object_is_weapon_armour_ammo;
528 q = _("どのアイテムから抽出しますか?", "Extract from which item? ");
529 s = _("抽出できるアイテムがありません。", "You have nothing you can extract from.");
531 o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT));
534 if (object_is_known(o_ptr) && !object_is_nameless(o_ptr))
536 GAME_TEXT o_name[MAX_NLEN];
537 object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
538 if (!get_check(format(_("本当に%sから抽出してよろしいですか?", "Really extract from %s? "), o_name))) return;
541 take_turn(p_ptr, 100);
543 object_flags(o_ptr, old_flgs);
544 if (have_flag(old_flgs, TR_KILL_DRAGON)) add_flag(old_flgs, TR_SLAY_DRAGON);
545 if (have_flag(old_flgs, TR_KILL_ANIMAL)) add_flag(old_flgs, TR_SLAY_ANIMAL);
546 if (have_flag(old_flgs, TR_KILL_EVIL)) add_flag(old_flgs, TR_SLAY_EVIL);
547 if (have_flag(old_flgs, TR_KILL_UNDEAD)) add_flag(old_flgs, TR_SLAY_UNDEAD);
548 if (have_flag(old_flgs, TR_KILL_DEMON)) add_flag(old_flgs, TR_SLAY_DEMON);
549 if (have_flag(old_flgs, TR_KILL_ORC)) add_flag(old_flgs, TR_SLAY_ORC);
550 if (have_flag(old_flgs, TR_KILL_TROLL)) add_flag(old_flgs, TR_SLAY_TROLL);
551 if (have_flag(old_flgs, TR_KILL_GIANT)) add_flag(old_flgs, TR_SLAY_GIANT);
552 if (have_flag(old_flgs, TR_KILL_HUMAN)) add_flag(old_flgs, TR_SLAY_HUMAN);
554 old_to_a = o_ptr->to_a;
556 old_to_h = o_ptr->to_h;
557 old_to_d = o_ptr->to_d;
560 old_pval = o_ptr->pval;
561 old_name2 = o_ptr->name2;
562 old_timeout = o_ptr->timeout;
563 if (o_ptr->curse_flags & (TRC_CURSED | TRC_HEAVY_CURSE | TRC_PERMA_CURSE)) dec--;
564 if (have_flag(old_flgs, TR_ADD_L_CURSE)) dec--;
565 if (have_flag(old_flgs, TR_ADD_H_CURSE)) dec--;
566 if (have_flag(old_flgs, TR_AGGRAVATE)) dec--;
567 if (have_flag(old_flgs, TR_NO_TELE)) dec--;
568 if (have_flag(old_flgs, TR_DRAIN_EXP)) dec--;
569 if (have_flag(old_flgs, TR_DRAIN_HP)) dec--;
570 if (have_flag(old_flgs, TR_DRAIN_MANA)) dec--;
571 if (have_flag(old_flgs, TR_CALL_ANIMAL)) dec--;
572 if (have_flag(old_flgs, TR_CALL_DEMON)) dec--;
573 if (have_flag(old_flgs, TR_CALL_DRAGON)) dec--;
574 if (have_flag(old_flgs, TR_CALL_UNDEAD)) dec--;
575 if (have_flag(old_flgs, TR_COWARDICE)) dec--;
576 if (have_flag(old_flgs, TR_LOW_MELEE)) dec--;
577 if (have_flag(old_flgs, TR_LOW_AC)) dec--;
578 if (have_flag(old_flgs, TR_LOW_MAGIC)) dec--;
579 if (have_flag(old_flgs, TR_FAST_DIGEST)) dec--;
580 if (have_flag(old_flgs, TR_SLOW_REGEN)) dec--;
581 if (have_flag(old_flgs, TR_TY_CURSE)) dec--;
585 next_o_idx = o_ptr->next_o_idx;
586 marked = o_ptr->marked;
587 weight = o_ptr->weight;
588 number = o_ptr->number;
590 object_prep(o_ptr, o_ptr->k_idx);
594 o_ptr->next_o_idx = next_o_idx;
595 o_ptr->marked = marked;
596 o_ptr->number = number;
597 if (o_ptr->tval == TV_DRAG_ARMOR) o_ptr->timeout = old_timeout;
598 if (item >= 0) p_ptr->total_weight += (o_ptr->weight*o_ptr->number - weight * number);
599 o_ptr->ident |= (IDENT_MENTAL);
603 object_flags(o_ptr, new_flgs);
605 for (i = 0; essence_info[i].add_name; i++)
607 essence_type *es_ptr = &essence_info[i];
608 PARAMETER_VALUE pval = 0;
610 if (es_ptr->add < TR_FLAG_MAX && is_pval_flag(es_ptr->add) && old_pval)
611 pval = (have_flag(new_flgs, es_ptr->add)) ? old_pval - o_ptr->pval : old_pval;
613 if (es_ptr->add < TR_FLAG_MAX &&
614 (!have_flag(new_flgs, es_ptr->add) || pval) &&
615 have_flag(old_flgs, es_ptr->add))
619 drain_value[es_ptr->essence] += 10 * pval;
621 else if (es_ptr->essence != -2)
623 drain_value[es_ptr->essence] += 10;
625 else if (es_ptr->add == TR_SH_FIRE)
627 drain_value[TR_BRAND_FIRE] += 10;
628 drain_value[TR_RES_FIRE] += 10;
630 else if (es_ptr->add == TR_SH_ELEC)
632 drain_value[TR_BRAND_ELEC] += 10;
633 drain_value[TR_RES_ELEC] += 10;
635 else if (es_ptr->add == TR_SH_COLD)
637 drain_value[TR_BRAND_COLD] += 10;
638 drain_value[TR_RES_COLD] += 10;
640 else if (es_ptr->add == TR_LITE_2)
642 drain_value[TR_LITE_1] += 20;
644 else if (es_ptr->add == TR_LITE_3)
646 drain_value[TR_LITE_1] += 30;
651 if ((have_flag(old_flgs, TR_FORCE_WEAPON)) && !(have_flag(new_flgs, TR_FORCE_WEAPON)))
653 drain_value[TR_INT] += 5;
654 drain_value[TR_WIS] += 5;
656 if ((have_flag(old_flgs, TR_VORPAL)) && !(have_flag(new_flgs, TR_VORPAL)))
658 drain_value[TR_BRAND_POIS] += 5;
659 drain_value[TR_BRAND_ACID] += 5;
660 drain_value[TR_BRAND_ELEC] += 5;
661 drain_value[TR_BRAND_FIRE] += 5;
662 drain_value[TR_BRAND_COLD] += 5;
664 if ((have_flag(old_flgs, TR_DEC_MANA)) && !(have_flag(new_flgs, TR_DEC_MANA)))
666 drain_value[TR_INT] += 10;
668 if ((have_flag(old_flgs, TR_XTRA_MIGHT)) && !(have_flag(new_flgs, TR_XTRA_MIGHT)))
670 drain_value[TR_STR] += 10;
672 if ((have_flag(old_flgs, TR_XTRA_SHOTS)) && !(have_flag(new_flgs, TR_XTRA_SHOTS)))
674 drain_value[TR_DEX] += 10;
676 if (old_name2 == EGO_2WEAPON)
678 drain_value[TR_DEX] += 20;
680 if (object_is_weapon_ammo(o_ptr))
682 if (old_ds > o_ptr->ds) drain_value[TR_ES_ATTACK] += (old_ds - o_ptr->ds) * 10;
684 if (old_dd > o_ptr->dd) drain_value[TR_ES_ATTACK] += (old_dd - o_ptr->dd) * 10;
686 if (old_to_h > o_ptr->to_h) drain_value[TR_ES_ATTACK] += (old_to_h - o_ptr->to_h) * 10;
687 if (old_to_d > o_ptr->to_d) drain_value[TR_ES_ATTACK] += (old_to_d - o_ptr->to_d) * 10;
688 if (old_ac > o_ptr->ac) drain_value[TR_ES_AC] += (old_ac - o_ptr->ac) * 10;
689 if (old_to_a > o_ptr->to_a) drain_value[TR_ES_AC] += (old_to_a - o_ptr->to_a) * 10;
691 for (i = 0; i < sizeof(drain_value) / sizeof(int); i++)
693 drain_value[i] *= number;
694 drain_value[i] = drain_value[i] * dec / 4;
695 drain_value[i] = MAX(drain_value[i], 0);
696 if ((o_ptr->tval >= TV_SHOT) && (o_ptr->tval <= TV_BOLT)) drain_value[i] /= 10;
704 msg_print(_("エッセンスは抽出できませんでした。", "You were not able to extract any essence."));
708 msg_print(_("抽出したエッセンス:", "Extracted essences:"));
710 for (i = 0; essence_name[i]; i++)
712 if (!essence_name[i][0]) continue;
713 if (!drain_value[i]) continue;
715 p_ptr->magic_num1[i] += drain_value[i];
716 p_ptr->magic_num1[i] = MIN(20000, p_ptr->magic_num1[i]);
718 msg_format("%s...%d%s", essence_name[i], drain_value[i], _("。", ". "));
722 /* Apply autodestroy/inscription to the drained item */
723 autopick_alter_item(item, TRUE);
724 p_ptr->update |= (PU_COMBINE | PU_REORDER);
725 p_ptr->window |= (PW_INVEN);
729 * @brief 付加するエッセンスの大別を選択する
730 * @return 選んだエッセンスの大別ID
732 static COMMAND_CODE choose_essence(void)
734 COMMAND_CODE mode = 0;
736 COMMAND_CODE menu_line = (use_menu ? 1 : 0);
739 concptr menu_name[] = {
749 concptr menu_name[] = {
759 const COMMAND_CODE mode_max = 7;
761 if (repeat_pull(&mode) && 1 <= mode && mode <= mode_max)
771 for (i = 0; i < mode_max; i++)
773 prt(format(" %s %s", (menu_line == 1 + i) ? "》" : " ", menu_name[i]), 2 + i, 14);
774 prt("どの種類のエッセンス付加を行いますか?", 0, 0);
776 prt(format(" %s %s", (menu_line == 1 + i) ? "> " : " ", menu_name[i]), 2 + i, 14);
777 prt("Choose from menu.", 0, 0);
796 menu_line += mode_max - 1;
805 if (menu_line > mode_max) menu_line -= mode_max;
816 for (i = 0; i < mode_max; i++)
817 prt(format(" %c) %s", 'a' + i, menu_name[i]), 2 + i, 14);
819 if (!get_com(_("何を付加しますか:", "Command :"), &choice, TRUE))
825 if (isupper(choice)) choice = (char)tolower(choice);
827 if ('a' <= choice && choice <= 'a' + (char)mode_max - 1)
828 mode = (int)choice - 'a' + 1;
838 * @brief エッセンスを実際に付加する
839 * @param mode エッセンスの大別ID
842 static void add_essence(ESSENCE_IDX mode)
854 GAME_TEXT o_name[MAX_NLEN];
856 essence_type *es_ptr;
857 bool able[22] = { 0 };
859 int menu_line = (use_menu ? 1 : 0);
861 for (i = 0; essence_info[i].add_name; i++)
863 es_ptr = &essence_info[i];
865 if (es_ptr->type != mode) continue;
869 if (!repeat_pull(&i) || i < 0 || i >= max_num)
872 /* Nothing chosen yet */
879 (void)strnfmt(out_val, 78, _("('*'で一覧, ESCで中断) どの能力を付加しますか?", "(*=List, ESC=exit) Add which ability? "));
880 if (use_menu) screen_save();
882 choice = (always_show_list || use_menu) ? ESCAPE : 1;
885 if (choice == ESCAPE) choice = ' ';
886 else if (!get_com(out_val, &choice, FALSE))break;
888 if (use_menu && choice != ' ')
902 menu_line += (max_num - 1);
939 if (menu_line > max_num) menu_line -= max_num;
942 if ((choice == ' ') || (choice == '*') || (choice == '?') || (use_menu && ask))
945 if (!redraw || use_menu)
949 char dummy[80], dummy2[80];
954 if (!use_menu) screen_save();
956 for (y = 1; y < 24; y++)
959 /* Print header(s) */
961 prt(format(" %-43s %6s/%s", "能力(必要エッセンス)", "必要数", "所持数"), 1, x);
964 prt(format(" %-43s %6s/%s", "Ability (needed essence)", "Needs", "Possess"), 1, x);
967 for (ctr = 0; ctr < max_num; ctr++)
969 es_ptr = &essence_info[num[ctr]];
973 if (ctr == (menu_line - 1))
974 strcpy(dummy, _("》 ", "> "));
975 else strcpy(dummy, " ");
978 /* letter/number for power selection */
981 sprintf(dummy, "%c) ", I2A(ctr));
984 strcat(dummy, es_ptr->add_name);
989 if (es_ptr->essence != -1)
991 strcat(dummy, format("(%s)", essence_name[es_ptr->essence]));
992 if (p_ptr->magic_num1[es_ptr->essence] < es_ptr->value) able[ctr] = FALSE;
998 case ESSENCE_SH_FIRE:
999 strcat(dummy, _("(焼棄+耐火炎)", "(brand fire + res.fire)"));
1000 if (p_ptr->magic_num1[TR_BRAND_FIRE] < es_ptr->value) able[ctr] = FALSE;
1001 if (p_ptr->magic_num1[TR_RES_FIRE] < es_ptr->value) able[ctr] = FALSE;
1003 case ESSENCE_SH_ELEC:
1004 strcat(dummy, _("(電撃+耐電撃)", "(brand elec. + res. elec.)"));
1005 if (p_ptr->magic_num1[TR_BRAND_ELEC] < es_ptr->value) able[ctr] = FALSE;
1006 if (p_ptr->magic_num1[TR_RES_ELEC] < es_ptr->value) able[ctr] = FALSE;
1008 case ESSENCE_SH_COLD:
1009 strcat(dummy, _("(凍結+耐冷気)", "(brand cold + res. cold)"));
1010 if (p_ptr->magic_num1[TR_BRAND_COLD] < es_ptr->value) able[ctr] = FALSE;
1011 if (p_ptr->magic_num1[TR_RES_COLD] < es_ptr->value) able[ctr] = FALSE;
1013 case ESSENCE_RESISTANCE:
1014 strcat(dummy, _("(耐火炎+耐冷気+耐電撃+耐酸)", "(r.fire+r.cold+r.elec+r.acid)"));
1015 if (p_ptr->magic_num1[TR_RES_FIRE] < es_ptr->value) able[ctr] = FALSE;
1016 if (p_ptr->magic_num1[TR_RES_COLD] < es_ptr->value) able[ctr] = FALSE;
1017 if (p_ptr->magic_num1[TR_RES_ELEC] < es_ptr->value) able[ctr] = FALSE;
1018 if (p_ptr->magic_num1[TR_RES_ACID] < es_ptr->value) able[ctr] = FALSE;
1020 case ESSENCE_SUSTAIN:
1021 strcat(dummy, _("(耐火炎+耐冷気+耐電撃+耐酸)", "(r.fire+r.cold+r.elec+r.acid)"));
1022 if (p_ptr->magic_num1[TR_RES_FIRE] < es_ptr->value) able[ctr] = FALSE;
1023 if (p_ptr->magic_num1[TR_RES_COLD] < es_ptr->value) able[ctr] = FALSE;
1024 if (p_ptr->magic_num1[TR_RES_ELEC] < es_ptr->value) able[ctr] = FALSE;
1025 if (p_ptr->magic_num1[TR_RES_ACID] < es_ptr->value) able[ctr] = FALSE;
1030 if (!able[ctr]) col = TERM_RED;
1032 if (es_ptr->essence != -1)
1034 sprintf(dummy2, "%-49s %3d/%d", dummy, es_ptr->value, (int)p_ptr->magic_num1[es_ptr->essence]);
1038 sprintf(dummy2, "%-49s %3d/(\?\?)", dummy, es_ptr->value);
1041 c_prt(col, dummy2, ctr + 2, x);
1060 ask = (isupper(choice));
1063 if (ask) choice = (char)tolower(choice);
1065 /* Extract request */
1066 i = (islower(choice) ? A2I(choice) : -1);
1069 /* Totally Illegal */
1070 if ((i < 0) || (i >= max_num) || !able[i])
1082 (void)strnfmt(tmp_val, 78, _("%sを付加しますか? ", "Add the abilitiy of %s? "), essence_info[num[i]].add_name);
1084 /* Belay that order */
1085 if (!get_check(tmp_val)) continue;
1091 if (redraw) screen_load();
1097 es_ptr = &essence_info[num[i]];
1099 if (es_ptr->add == ESSENCE_SLAY_GLOVE)
1100 item_tester_tval = TV_GLOVES;
1101 else if (mode == 1 || mode == 5)
1102 item_tester_hook = item_tester_hook_melee_ammo;
1103 else if (es_ptr->add == ESSENCE_ATTACK)
1104 item_tester_hook = object_allow_enchant_weapon;
1105 else if (es_ptr->add == ESSENCE_AC)
1106 item_tester_hook = object_is_armour;
1108 item_tester_hook = object_is_weapon_armour_ammo;
1110 q = _("どのアイテムを改良しますか?", "Improve which item? ");
1111 s = _("改良できるアイテムがありません。", "You have nothing to improve.");
1113 o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR | IGNORE_BOTHHAND_SLOT));
1116 if ((mode != 10) && (object_is_artifact(o_ptr) || object_is_smith(o_ptr)))
1118 msg_print(_("そのアイテムはこれ以上改良できない。", "This item is no more able to be improved."));
1122 object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
1124 use_essence = es_ptr->value;
1125 if ((o_ptr->tval >= TV_SHOT) && (o_ptr->tval <= TV_BOLT)) use_essence = (use_essence + 9) / 10;
1126 if (o_ptr->number > 1)
1128 use_essence *= o_ptr->number;
1129 msg_format(_("%d個あるのでエッセンスは%d必要です。", "It will take %d essences."), o_ptr->number, use_essence);
1132 if (es_ptr->essence != -1)
1134 if (p_ptr->magic_num1[es_ptr->essence] < use_essence)
1136 msg_print(_("エッセンスが足りない。", "You don't have enough essences."));
1139 if (is_pval_flag(es_ptr->add))
1141 if (o_ptr->pval < 0)
1143 msg_print(_("このアイテムの能力修正を強化することはできない。", "You cannot increase magic number of this item."));
1146 else if (es_ptr->add == TR_BLOWS)
1148 if (o_ptr->pval > 1)
1150 if (!get_check(_("修正値は1になります。よろしいですか?", "The magic number of this weapon will become 1. Are you sure? "))) return;
1154 msg_format(_("エッセンスを%d個使用します。", "It will take %d essences."), use_essence);
1156 else if (o_ptr->pval > 0)
1158 use_essence *= o_ptr->pval;
1159 msg_format(_("エッセンスを%d個使用します。", "It will take %d essences."), use_essence);
1165 PARAMETER_VALUE pval;
1166 PARAMETER_VALUE limit = MIN(5, p_ptr->magic_num1[es_ptr->essence] / es_ptr->value);
1168 sprintf(tmp, _("いくつ付加しますか? (1-%d): ", "Enchant how many? (1-%d): "), limit);
1169 strcpy(tmp_val, "1");
1171 if (!get_string(tmp, tmp_val, 1)) return;
1172 pval = (PARAMETER_VALUE)atoi(tmp_val);
1173 if (pval > limit) pval = limit;
1174 else if (pval < 1) pval = 1;
1175 o_ptr->pval += pval;
1176 use_essence *= pval;
1177 msg_format(_("エッセンスを%d個使用します。", "It will take %d essences."), use_essence);
1180 if (p_ptr->magic_num1[es_ptr->essence] < use_essence)
1182 msg_print(_("エッセンスが足りない。", "You don't have enough essences."));
1186 else if (es_ptr->add == ESSENCE_SLAY_GLOVE)
1193 strcpy(tmp_val, "1");
1194 if (!get_string(format(_("いくつ付加しますか? (1-%d):", "Enchant how many? (1-%d):"), p_ptr->lev / 7 + 3), tmp_val, 2)) return;
1195 val = atoi(tmp_val);
1196 if (val > p_ptr->lev / 7 + 3) val = p_ptr->lev / 7 + 3;
1197 else if (val < 1) val = 1;
1199 msg_format(_("エッセンスを%d個使用します。", "It will take %d essences."), use_essence);
1200 if (p_ptr->magic_num1[es_ptr->essence] < use_essence)
1202 msg_print(_("エッセンスが足りない。", "You don't have enough essences."));
1205 get_to_h = ((val + 1) / 2 + randint0(val / 2 + 1));
1206 get_to_d = ((val + 1) / 2 + randint0(val / 2 + 1));
1207 o_ptr->xtra4 = (get_to_h << 8) + get_to_d;
1208 o_ptr->to_h += get_to_h;
1209 o_ptr->to_d += get_to_d;
1211 p_ptr->magic_num1[es_ptr->essence] -= use_essence;
1212 if (es_ptr->add == ESSENCE_ATTACK)
1214 if ((o_ptr->to_h >= p_ptr->lev / 5 + 5) && (o_ptr->to_d >= p_ptr->lev / 5 + 5))
1216 msg_print(_("改良に失敗した。", "You failed to enchant."));
1217 take_turn(p_ptr, 100);
1222 if (o_ptr->to_h < p_ptr->lev / 5 + 5) o_ptr->to_h++;
1223 if (o_ptr->to_d < p_ptr->lev / 5 + 5) o_ptr->to_d++;
1226 else if (es_ptr->add == ESSENCE_AC)
1228 if (o_ptr->to_a >= p_ptr->lev / 5 + 5)
1230 msg_print(_("改良に失敗した。", "You failed to enchant."));
1231 take_turn(p_ptr, 100);
1236 if (o_ptr->to_a < p_ptr->lev / 5 + 5) o_ptr->to_a++;
1241 o_ptr->xtra3 = es_ptr->add + 1;
1246 bool success = TRUE;
1248 switch (es_ptr->add)
1250 case ESSENCE_SH_FIRE:
1251 if ((p_ptr->magic_num1[TR_BRAND_FIRE] < use_essence) || (p_ptr->magic_num1[TR_RES_FIRE] < use_essence))
1256 p_ptr->magic_num1[TR_BRAND_FIRE] -= use_essence;
1257 p_ptr->magic_num1[TR_RES_FIRE] -= use_essence;
1259 case ESSENCE_SH_ELEC:
1260 if ((p_ptr->magic_num1[TR_BRAND_ELEC] < use_essence) || (p_ptr->magic_num1[TR_RES_ELEC] < use_essence))
1265 p_ptr->magic_num1[TR_BRAND_ELEC] -= use_essence;
1266 p_ptr->magic_num1[TR_RES_ELEC] -= use_essence;
1268 case ESSENCE_SH_COLD:
1269 if ((p_ptr->magic_num1[TR_BRAND_COLD] < use_essence) || (p_ptr->magic_num1[TR_RES_COLD] < use_essence))
1274 p_ptr->magic_num1[TR_BRAND_COLD] -= use_essence;
1275 p_ptr->magic_num1[TR_RES_COLD] -= use_essence;
1277 case ESSENCE_RESISTANCE:
1278 case ESSENCE_SUSTAIN:
1279 if ((p_ptr->magic_num1[TR_RES_ACID] < use_essence) || (p_ptr->magic_num1[TR_RES_ELEC] < use_essence) || (p_ptr->magic_num1[TR_RES_FIRE] < use_essence) || (p_ptr->magic_num1[TR_RES_COLD] < use_essence))
1284 p_ptr->magic_num1[TR_RES_ACID] -= use_essence;
1285 p_ptr->magic_num1[TR_RES_ELEC] -= use_essence;
1286 p_ptr->magic_num1[TR_RES_FIRE] -= use_essence;
1287 p_ptr->magic_num1[TR_RES_COLD] -= use_essence;
1292 msg_print(_("エッセンスが足りない。", "You don't have enough essences."));
1295 if (es_ptr->add == ESSENCE_SUSTAIN)
1297 add_flag(o_ptr->art_flags, TR_IGNORE_ACID);
1298 add_flag(o_ptr->art_flags, TR_IGNORE_ELEC);
1299 add_flag(o_ptr->art_flags, TR_IGNORE_FIRE);
1300 add_flag(o_ptr->art_flags, TR_IGNORE_COLD);
1304 o_ptr->xtra3 = es_ptr->add + 1;
1308 take_turn(p_ptr, 100);
1311 msg_format(_("%sに%sの能力を付加しました。", "You have added ability of %s to %s."), o_name, es_ptr->add_name);
1313 msg_format(_("%sに%sの能力を付加しました。", "You have added ability of %s to %s."), es_ptr->add_name, o_name);
1315 p_ptr->update |= (PU_COMBINE | PU_REORDER);
1316 p_ptr->window |= (PW_INVEN);
1323 static void erase_essence(void)
1328 GAME_TEXT o_name[MAX_NLEN];
1329 BIT_FLAGS flgs[TR_FLAG_SIZE];
1331 item_tester_hook = object_is_smith;
1333 q = _("どのアイテムのエッセンスを消去しますか?", "Remove from which item? ");
1334 s = _("エッセンスを付加したアイテムがありません。", "You have nothing to remove essence.");
1336 o_ptr = choose_object(&item, q, s, (USE_INVEN | USE_FLOOR));
1339 object_desc(o_name, o_ptr, (OD_OMIT_PREFIX | OD_NAME_ONLY));
1340 if (!get_check(format(_("よろしいですか? [%s]", "Are you sure? [%s]"), o_name))) return;
1342 take_turn(p_ptr, 100);
1344 if (o_ptr->xtra3 == 1 + ESSENCE_SLAY_GLOVE)
1346 o_ptr->to_h -= (o_ptr->xtra4 >> 8);
1347 o_ptr->to_d -= (o_ptr->xtra4 & 0x000f);
1349 if (o_ptr->to_h < 0) o_ptr->to_h = 0;
1350 if (o_ptr->to_d < 0) o_ptr->to_d = 0;
1353 object_flags(o_ptr, flgs);
1354 if (!(have_pval_flags(flgs))) o_ptr->pval = 0;
1355 msg_print(_("エッセンスを取り去った。", "You removed all essence you have added."));
1356 p_ptr->update |= (PU_COMBINE | PU_REORDER);
1357 p_ptr->window |= (PW_INVEN);
1361 * @brief 鍛冶コマンドのメインルーチン
1362 * @param only_browse TRUEならばエッセンス一覧の表示のみを行う
1365 void do_cmd_kaji(bool only_browse)
1367 COMMAND_CODE mode = 0;
1370 COMMAND_CODE menu_line = (use_menu ? 1 : 0);
1374 if (cmd_limit_confused(p_ptr)) return;
1377 msg_print(_("目が見えなくて作業できない!", "You are blind!"));
1382 msg_print(_("うまく見えなくて作業できない!", "You are hallucinating!"));
1387 if (!(repeat_pull(&mode) && 1 <= mode && mode <= 5))
1389 if (only_browse) screen_save();
1391 if (!only_browse) screen_save();
1397 prt(format(" %s エッセンス一覧", (menu_line == 1) ? "》" : " "), 2, 14);
1398 prt(format(" %s エッセンス抽出", (menu_line == 2) ? "》" : " "), 3, 14);
1399 prt(format(" %s エッセンス消去", (menu_line == 3) ? "》" : " "), 4, 14);
1400 prt(format(" %s エッセンス付加", (menu_line == 4) ? "》" : " "), 5, 14);
1401 prt(format(" %s 武器/防具強化", (menu_line == 5) ? "》" : " "), 6, 14);
1402 prt(format("どの種類の技術を%sますか?", only_browse ? "調べ" : "使い"), 0, 0);
1404 prt(format(" %s List essences", (menu_line == 1) ? "> " : " "), 2, 14);
1405 prt(format(" %s Extract essence", (menu_line == 2) ? "> " : " "), 3, 14);
1406 prt(format(" %s Remove essence", (menu_line == 3) ? "> " : " "), 4, 14);
1407 prt(format(" %s Add essence", (menu_line == 4) ? "> " : " "), 5, 14);
1408 prt(format(" %s Enchant weapon/armor", (menu_line == 5) ? "> " : " "), 6, 14);
1409 prt(format("Choose command from menu."), 0, 0);
1436 if (menu_line > 5) menu_line -= 5;
1444 prt(_(" a) エッセンス一覧", " a) List essences"), 2, 14);
1445 prt(_(" b) エッセンス抽出", " b) Extract essence"), 3, 14);
1446 prt(_(" c) エッセンス消去", " c) Remove essence"), 4, 14);
1447 prt(_(" d) エッセンス付加", " d) Add essence"), 5, 14);
1448 prt(_(" e) 武器/防具強化", " e) Enchant weapon/armor"), 6, 14);
1450 if (!get_com(format("どの能力を%sますか:", only_browse ? "調べ" : "使い"), &choice, TRUE))
1452 if (!get_com("Command :", &choice, TRUE))
1489 /* Clear lines, position cursor (really should use strlen here) */
1490 Term_erase(14, 21, 255);
1491 Term_erase(14, 20, 255);
1492 Term_erase(14, 19, 255);
1493 Term_erase(14, 18, 255);
1494 Term_erase(14, 17, 255);
1495 Term_erase(14, 16, 255);
1497 roff_to_buf(kaji_tips[mode - 1], 62, temp, sizeof(temp));
1498 for (j = 0, line = 17; temp[j]; j += (1 + strlen(&temp[j])))
1500 prt(&temp[j], line, 15);
1505 if (!only_browse) screen_load();
1506 } while (only_browse);
1511 case 1: display_essence(); break;
1512 case 2: drain_essence(); break;
1513 case 3: erase_essence(); break;
1515 mode = choose_essence();
1520 case 5: add_essence(10); break;