OSDN Git Service

3d7a372f71196f9c84be0dd51e0462714a4a2e72
[hengband/hengband.git] / src / cmd-activate.c
1 /*!
2 * @file cmd-activate.c
3 * @brief プレイヤーの発動コマンド実装
4 * @date 2018/09/07
5 * @details
6 * cmd6.cより分離。
7 */
8
9 #include "angband.h"
10 #include "cmd-activate.h"
11 #include "floor.h"
12 #include "object-hook.h"
13 #include "sort.h"
14 #include "artifact.h"
15 #include "avatar.h"
16 #include "spells.h"
17 #include "spells-summon.h"
18 #include "spells-status.h"
19 #include "spells-object.h"
20 #include "spells-floor.h"
21 #include "realm-hex.h"
22 #include "player-status.h"
23 #include "monster-status.h"
24
25 /*!
26  * @brief アイテムの発動効果テーブル /
27  * Define flags, levels, values of activations
28  */
29 const activation_type activation_info[] =
30 {
31         { "SUNLIGHT", ACT_SUNLIGHT, 10, 250, {10, 0},
32           _("太陽光線", "beam of sunlight") },
33         { "BO_MISS_1", ACT_BO_MISS_1, 10, 250, {2, 0},
34           _("マジック・ミサイル(2d6)", "magic missile (2d6)") },
35         { "BA_POIS_1", ACT_BA_POIS_1, 10, 300, {4, 0},
36           _("悪臭雲(12)", "stinking cloud (12)") },
37         { "BO_ELEC_1", ACT_BO_ELEC_1, 20, 250, {5, 0},
38           _("サンダー・ボルト(4d8)", "lightning bolt (4d8)") },
39         { "BO_ACID_1", ACT_BO_ACID_1, 20, 250, {6, 0},
40           _("アシッド・ボルト(5d8)", "acid bolt (5d8)") },
41         { "BO_COLD_1", ACT_BO_COLD_1, 20, 250, {7, 0},
42           _("アイス・ボルト(6d8)", "frost bolt (6d8)") },
43         { "BO_FIRE_1", ACT_BO_FIRE_1, 20, 250, {8, 0},
44           _("ファイア・ボルト(9d8)", "fire bolt (9d8)") },
45         { "BA_COLD_1", ACT_BA_COLD_1, 30, 750, {6, 0},
46           _("アイス・ボール(48)", "ball of cold (48)") },
47         { "BA_COLD_2", ACT_BA_COLD_2, 40, 1000, {12, 0},
48           _("アイス・ボール(100)", "ball of cold (100)") },
49         { "BA_COLD_3", ACT_BA_COLD_3, 70, 2500, {50, 0},
50           _("巨大アイス・ボール(400)", "ball of cold (400)") },
51         { "BA_FIRE_1", ACT_BA_FIRE_1, 30, 1000, {9, 0},
52           _("ファイア・ボール(72)", "ball of fire (72)") },
53         { "BA_FIRE_2", ACT_BA_FIRE_2, 40, 1500, {15, 0},
54           _("巨大ファイア・ボール(120)", "large fire ball (120)") },
55         { "BA_FIRE_3", ACT_BA_FIRE_3, 60, 1750, {40, 0},
56           _("巨大ファイア・ボール(300)", "fire ball (300)") },
57         { "BA_FIRE_4", ACT_BA_FIRE_4, 40, 1000, {12, 0},
58           _("ファイア・ボール(100)", "fire ball (100)") },
59         { "BA_ELEC_2", ACT_BA_ELEC_2, 40, 1000, {12, 0},
60           _("サンダー・ボール(100)", "ball of lightning (100)") },
61         { "BA_ELEC_3", ACT_BA_ELEC_3, 70, 2500, {70, 0},
62           _("巨大サンダー・ボール(500)", "ball of lightning (500)") },
63         { "BA_ACID_1", ACT_BA_ACID_1, 30, 1000, {12, 0},
64           _("アシッド・ボール(100)", "ball of acid (100)") },
65         { "BA_NUKE_1", ACT_BA_NUKE_1, 50, 1000, {12, 0},
66           _("放射能球(100)", "ball of nuke (100)") },
67         { "HYPODYNAMIA_1", ACT_HYPODYNAMIA_1, 30, 500, {12, 0},
68           _("窒息攻撃(100)", "a strangling attack (100)") },
69         { "HYPODYNAMIA_2", ACT_HYPODYNAMIA_2, 40, 750, {15, 0},
70           _("衰弱の矢(120)", "hypodynamic bolt (120)") },
71         { "DRAIN_1", ACT_DRAIN_1, 40, 1000, {20, 0},
72           _("吸収の矢(3*50)", "drain bolt (3*50)") },
73         { "BO_MISS_2", ACT_BO_MISS_2, 40, 1000, {20, 0},
74           _("矢(150)", "arrows (150)") },
75         { "WHIRLWIND", ACT_WHIRLWIND, 50, 7500, {25, 0},
76           _("カマイタチ", "whirlwind attack") },
77         { "DRAIN_2", ACT_DRAIN_2, 50, 2500, {40, 0},
78           _("吸収の矢(3*100)", "drain bolt (3*100)") },
79         { "CALL_CHAOS", ACT_CALL_CHAOS, 70, 5000, {35, 0},
80           _("混沌召来", "call chaos") },
81         { "ROCKET", ACT_ROCKET, 70, 5000, {20, 0},
82           _("ロケット(120+レベル)", "launch rocket (120+level)") },
83         { "DISP_EVIL", ACT_DISP_EVIL, 50, 4000, {50, 0},
84           _("邪悪退散(x5)", "dispel evil (x5)") },
85         { "BA_MISS_3", ACT_BA_MISS_3, 50, 1500, {50, 0},
86           _("エレメントのブレス(300)", "elemental breath (300)") },
87         { "DISP_GOOD", ACT_DISP_GOOD, 50, 3500, {50, 0},
88           _("善良退散(x5)", "dispel good (x5)") },
89         { "BO_MANA", ACT_BO_MANA, 40, 1500, {20, 0},
90           _("魔法の矢(150)", "a magical arrow (150)") },
91         { "BA_WATER", ACT_BA_WATER, 50, 2000, {25, 0},
92           _("ウォーター・ボール(200)", "water ball (200)") },
93         { "BA_STAR", ACT_BA_STAR, 50, 2200, {25, 0},
94           _("巨大スター・ボール(200)", "large star ball (200)") },
95         { "BA_DARK", ACT_BA_DARK, 50, 2200, {30, 0},
96           _("暗黒の嵐(250)", "darkness storm (250)") },
97         { "BA_MANA", ACT_BA_MANA, 70, 2500, {30, 0},
98           _("魔力の嵐(250)", "a mana storm (250)") },
99         { "PESTICIDE", ACT_PESTICIDE, 10, 500, {10, 0},
100           _("害虫の駆除", "dispel small life") },
101         { "BLINDING_LIGHT", ACT_BLINDING_LIGHT, 30, 5000, {40, 0},
102           _("眩しい光", "blinding light") },
103         { "BIZARRE", ACT_BIZARRE, 90, 10000, {50, 0},
104           _("信じ難いこと", "bizarre things") },
105         { "CAST_BA_STAR", ACT_CAST_BA_STAR, 70, 7500, {100, 0},
106           _("スター・ボール・ダスト(150)", "cast star balls (150)") },
107         { "BLADETURNER", ACT_BLADETURNER, 80, 20000, {80, 0},
108           _("エレメントのブレス(300), 士気高揚、祝福、耐性", "breathe elements (300), hero, bless, and resistance") },
109         { "BR_FIRE", ACT_BR_FIRE, 50, 5000, {-1, 0},
110           _("火炎のブレス (200)", "fire breath (200)") },
111         { "BR_COLD", ACT_BR_COLD, 50, 5000, {-1, 0},
112           _("冷気のブレス (200)", "cold breath (200)") },
113         { "BR_DRAGON", ACT_BR_DRAGON, 70, 10000, { 30, 0 },
114           "" /* built by item_activation_dragon_breath() */ },
115
116         { "CONFUSE", ACT_CONFUSE, 10, 500, {10, 0},
117           _("パニック・モンスター", "confuse monster") },
118         { "SLEEP", ACT_SLEEP, 10, 750, {15, 0},
119           _("周囲のモンスターを眠らせる", "sleep nearby monsters") },
120         { "QUAKE", ACT_QUAKE, 30, 600, {20, 0},
121           _("地震", "earthquake") },
122         { "TERROR", ACT_TERROR, 20, 2500, {-1, 0},
123           _("恐慌", "terror") },
124         { "TELE_AWAY", ACT_TELE_AWAY, 20, 2000, {15, 0},
125           _("テレポート・アウェイ", "teleport away") },
126         { "BANISH_EVIL", ACT_BANISH_EVIL, 40, 2000, {250, 0},
127           _("邪悪消滅", "banish evil") },
128         { "GENOCIDE", ACT_GENOCIDE, 50, 10000, {500, 0},
129           _("抹殺", "genocide") },
130         { "MASS_GENO", ACT_MASS_GENO, 50, 10000, {1000, 0},
131           _("周辺抹殺", "mass genocide") },
132         { "SCARE_AREA", ACT_SCARE_AREA, 20, 2500, {20, 0},
133           _("モンスター恐慌", "frighten monsters") },
134         { "AGGRAVATE", ACT_AGGRAVATE, 0, 100, {0, 0},
135           _("モンスターを怒らせる", "aggravete monsters") },
136
137         { "CHARM_ANIMAL", ACT_CHARM_ANIMAL, 40, 7500, {200, 0},
138           _("動物魅了", "charm animal") },
139         { "CHARM_UNDEAD", ACT_CHARM_UNDEAD, 40, 10000, {333, 0},
140           _("アンデッド従属", "enslave undead") },
141         { "CHARM_OTHER", ACT_CHARM_OTHER, 40, 10000, {400, 0},
142           _("モンスター魅了", "charm monster") },
143         { "CHARM_ANIMALS", ACT_CHARM_ANIMALS, 40, 12500, {500, 0},
144           _("動物友和", "animal friendship") },
145         { "CHARM_OTHERS", ACT_CHARM_OTHERS, 40, 17500, {750, 0},
146           _("周辺魅了", "mass charm") },
147         { "SUMMON_ANIMAL", ACT_SUMMON_ANIMAL, 50, 10000, {200, 300},
148           _("動物召喚", "summon animal") },
149         { "SUMMON_PHANTOM", ACT_SUMMON_PHANTOM, 50, 12000, {200, 200},
150           _("幻霊召喚", "summon phantasmal servant") },
151         { "SUMMON_ELEMENTAL", ACT_SUMMON_ELEMENTAL, 50, 15000, {750, 0},
152           _("エレメンタル召喚", "summon elemental") },
153         { "SUMMON_DEMON", ACT_SUMMON_DEMON, 50, 20000, {666, 0},
154           _("悪魔召喚", "summon demon") },
155         { "SUMMON_UNDEAD", ACT_SUMMON_UNDEAD, 50, 20000, {666, 0},
156           _("アンデッド召喚", "summon undead") },
157         { "SUMMON_HOUND", ACT_SUMMON_HOUND, 50, 15000, {300, 0},
158           _("ハウンド召喚", "summon hound") },
159         { "SUMMON_DAWN", ACT_SUMMON_DAWN, 50, 15000, {500, 0},
160           _("暁の師団召喚", "summon the Legion of the Dawn") },
161         { "SUMMON_OCTOPUS", ACT_SUMMON_OCTOPUS, 50, 15000, {300, 0},
162           _("蛸の大群召喚", "summon octopus") },
163
164         { "CHOIR_SINGS", ACT_CHOIR_SINGS, 60, 20000, {300, 0},
165           _("回復(777)、癒し、士気高揚", "heal 777 hit points, curing and HEROism") },
166         { "CURE_LW", ACT_CURE_LW, 10, 500, {10, 0},
167           _("恐怖除去/体力回復(30)", "remove fear and heal 30 hp") },
168         { "CURE_MW", ACT_CURE_MW, 20, 750, {3, 3},
169           _("傷回復(4d8)", "heal 4d8 and wounds") },
170         { "CURE_POISON", ACT_CURE_POISON, 10, 1000, {5, 0},
171           _("恐怖除去/毒消し", "remove fear and cure poison") },
172         { "REST_LIFE", ACT_REST_EXP, 40, 7500, {450, 0},
173           _("経験値復活", "restore experience") },
174         { "REST_ALL", ACT_REST_ALL, 30, 15000, {750, 0},
175           _("全ステータスと経験値復活", "restore stats and experience") },
176         { "CURE_700", ACT_CURE_700, 40, 10000, {250, 0},
177           _("体力回復(700)", "heal 700 hit points") },
178         { "CURE_1000", ACT_CURE_1000, 50, 15000, {888, 0},
179           _("体力回復(1000)", "heal 1000 hit points") },
180         { "CURING", ACT_CURING, 30, 5000, {100, 0},
181           _("癒し", "curing") },
182         { "CURE_MANA_FULL", ACT_CURE_MANA_FULL, 60, 20000, {777, 0},
183           _("魔力復活", "restore mana") },
184
185         { "ESP", ACT_ESP, 30, 1500, {100, 0},
186           _("テレパシー(期間 25+d30)", "telepathy (dur 25+d30)") },
187         { "BERSERK", ACT_BERSERK, 10, 800, {75, 0},
188           _("狂戦士化(25+d25ターン)", "berserk (25+d25 turns)") },
189         { "PROT_EVIL", ACT_PROT_EVIL, 30, 5000, {100, 0},
190           _("対邪悪結界(期間 3*レベル+d25)", "protect evil (dur level*3 + d25)") },
191         { "RESIST_ALL", ACT_RESIST_ALL, 30, 5000, {111, 0},
192           _("全耐性(期間 20+d20)", "resist elements (dur 20+d20)") },
193         { "SPEED", ACT_SPEED, 40, 15000, {250, 0},
194           _("加速(期間 20+d20)", "speed (dur 20+d20)") },
195         { "XTRA_SPEED", ACT_XTRA_SPEED, 40, 25000, {200, 200},
196           _("加速(期間 75+d75)", "speed (dur 75+d75)") },
197         { "WRAITH", ACT_WRAITH, 90, 25000, {1000, 0},
198           _("幽体化(期間 (レベル/2)+d(レベル/2))", "wraith form (dur level/2 + d(level/2))") },
199         { "INVULN", ACT_INVULN, 90, 25000, {1000, 0},
200           _("無敵化(期間 8+d8)", "invulnerability (dur 8+d8)") },
201         { "HERO", ACT_HERO, 10, 500, {30, 30},
202           _("士気高揚", "heroism") },
203         { "HERO_SPEED", ACT_HERO_SPEED, 30, 20000, {100, 200},
204           _("士気高揚, スピード(期間 50+d50ターン)", "hero and +10 to speed (50)") },
205         { "RESIST_ACID", ACT_RESIST_ACID, 20, 2000, {40, 40},
206           _("酸への耐性(期間 20+d20)", "resist acid (dur 20+d20)") },
207         { "RESIST_FIRE", ACT_RESIST_FIRE, 20, 2000, {40, 40},
208           _("火炎への耐性(期間 20+d20)", "resist fire (dur 20+d20)") },
209         { "RESIST_COLD", ACT_RESIST_COLD, 20, 2000, {40, 40},
210           _("冷気への耐性(期間 20+d20)", "resist cold (dur 20+d20)") },
211         { "RESIST_ELEC", ACT_RESIST_ELEC, 20, 2000, {40, 40},
212           _("電撃への耐性(期間 20+d20)", "resist elec (dur 20+d20)") },
213         { "RESIST_POIS", ACT_RESIST_POIS, 20, 2000, {40, 40},
214           _("毒への耐性(期間 20+d20)", "resist poison (dur 20+d20)") },
215
216         { "LIGHT", ACT_LIGHT, 10, 150, {10, 10},
217           _("イルミネーション", "light area (dam 2d15)") },
218         { "MAP_LIGHT", ACT_MAP_LIGHT, 30, 500, {50, 50},
219           _("魔法の地図と光", "light (dam 2d15) & map area") },
220         { "DETECT_ALL", ACT_DETECT_ALL, 30, 1000, {55, 55},
221           _("全感知", "detection") },
222         { "DETECT_XTRA", ACT_DETECT_XTRA, 50, 12500, {100, 0},
223           _("全感知、探索、*鑑定*", "detection, probing and identify true") },
224         { "ID_FULL", ACT_ID_FULL, 50, 10000, {75, 0},
225           _("*鑑定*", "identify true") },
226         { "ID_PLAIN", ACT_ID_PLAIN, 20, 1250, {10, 0},
227           _("鑑定", "identify spell") },
228         { "RUNE_EXPLO", ACT_RUNE_EXPLO, 40, 4000, {200, 0},
229           _("爆発のルーン", "explosive rune") },
230         { "RUNE_PROT", ACT_RUNE_PROT, 60, 10000, {400, 0},
231           _("守りのルーン", "rune of protection") },
232         { "SATIATE", ACT_SATIATE, 10, 2000, {200, 0},
233           _("空腹充足", "satisfy hunger") },
234         { "DEST_DOOR", ACT_DEST_DOOR, 10, 100, {10, 0},
235           _("ドア破壊", "destroy doors") },
236         { "STONE_MUD", ACT_STONE_MUD, 20, 1000, {3, 0},
237           _("岩石溶解", "stone to mud") },
238         { "RECHARGE", ACT_RECHARGE, 30, 1000, {70, 0},
239           _("魔力充填", "recharging") },
240         { "ALCHEMY", ACT_ALCHEMY, 50, 10000, {500, 0},
241           _("錬金術", "alchemy") },
242         { "DIM_DOOR", ACT_DIM_DOOR, 50, 10000, {100, 0},
243           _("次元の扉", "dimension door") },
244         { "TELEPORT", ACT_TELEPORT, 10, 2000, {25, 0},
245           _("テレポート", "teleport") },
246         { "RECALL", ACT_RECALL, 30, 7500, {200, 0},
247           _("帰還の詔", "word of recall") },
248         { "JUDGE", ACT_JUDGE, 90, 50000, {20, 20},
249           _("体力と引き替えに千里眼と帰還", "a telekinesis (500 lb)") },
250         { "TELEKINESIS", ACT_TELEKINESIS, 20, 5500, {25, 25},
251           _("物体を引き寄せる(重量25kgまで)", "clairvoyance and recall, draining you") },
252         { "DETECT_UNIQUE", ACT_DETECT_UNIQUE, 40, 10000, {200, 0},
253           _("この階にいるユニークモンスターを表示", "list of the uniques on the level") },
254         { "ESCAPE", ACT_ESCAPE, 10, 3000, {35, 0},
255           _("逃走", "a getaway") },
256         { "DISP_CURSE_XTRA", ACT_DISP_CURSE_XTRA, 40, 30000, {0, 0},
257           _("*解呪*と調査", "dispel curse and probing") },
258         { "BRAND_FIRE_BOLTS", ACT_BRAND_FIRE_BOLTS, 40, 20000, {999, 0},
259           _("刃先のファイア・ボルト", "fire branding of bolts") },
260         { "RECHARGE_XTRA", ACT_RECHARGE_XTRA, 70, 30000, {200, 0},
261           _("魔力充填", "recharge item") },
262         { "LORE", ACT_LORE, 10, 30000, {0, 0},
263           _("危険を伴う鑑定", "perilous identify") },
264         { "SHIKOFUMI", ACT_SHIKOFUMI, 10, 10000, {100, 100},
265           _("四股踏み", "shiko") },
266         { "PHASE_DOOR", ACT_PHASE_DOOR, 10, 1500, {10, 0},
267           _("ショート・テレポート", "blink") },
268         { "DETECT_ALL_MONS", ACT_DETECT_ALL_MONS, 30, 3000, {150, 0},
269           _("全モンスター感知", "detect all monsters") },
270         { "ULTIMATE_RESIST", ACT_ULTIMATE_RESIST, 90, 20000, {777, 0},
271           _("士気高揚、祝福、究極の耐性", "hero, bless, and ultimate resistance") },
272
273         { "CAST_OFF", ACT_CAST_OFF, 30, 15000, {100, 0},
274           _("脱衣と小宇宙燃焼", "cast it off and cosmic heroism") },
275         { "FISHING", ACT_FISHING, 0, 100, {0, 0},
276           _("釣りをする", "fishing") },
277         { "INROU", ACT_INROU, 40, 15000, {150, 150},
278           _("例のアレ", "reveal your identity") },
279         { "MURAMASA", ACT_MURAMASA, 0, 0, {-1, 0},
280           _("腕力の上昇", "increase STR") },
281         { "BLOODY_MOON", ACT_BLOODY_MOON, 0, 0, {3333, 0},
282           _("属性変更", "change zokusei") },
283         { "CRIMSON", ACT_CRIMSON, 0, 50000, {15, 0},
284           _("ファイア!", "fire!") },
285
286         { "STRAIN_HASTE", ACT_STRAIN_HASTE, 10, 1000, {120, 100},
287           _("体力と引き換えに加速", "haste with strain") },
288         { "GRAND_CROSS", ACT_GRAND_CROSS, 30, 15000, {250, 200},
289           _("グランド・クロス", "grand cross") },
290         { "TELEPORT_LEVEL", ACT_TELEPORT_LEVEL, 10, 1500, {100, 200},
291           _("テレポート・レベル", "teleort level") },
292         { "ARTS_FALLING_STAR", ACT_FALLING_STAR, 20, 5500, {30, 50},
293           _("魔剣・流れ星", "blade arts 'falling star'") },
294         { NULL, 0, 0, 0, {0, 0},
295           "" }
296 };
297
298 /*!
299  * @brief 装備を発動するコマンドのサブルーチン /
300  * Activate a wielded object.  Wielded objects never stack.
301  * And even if they did, activatable objects never stack.
302  * @param item 発動するオブジェクトの所持品ID
303  * @return なし
304  * @details
305  * <pre>
306  * Currently, only (some) artifacts, and Dragon Scale Mail, can be activated.
307  * But one could, for example, easily make an activatable "Ring of Plasma".
308  * Note that it always takes a current_world_ptr->game_turn to activate an artifact, even if
309  * the user hits "escape" at the "direction" prompt.
310  * </pre>
311  */
312 void do_cmd_activate_aux(INVENTORY_IDX item)
313 {
314         DIRECTION dir;
315         DEPTH lev;
316         int chance, fail;
317         object_type *o_ptr;
318         bool success;
319
320
321         /* Get the item (in the pack) */
322         if (item >= 0)
323         {
324                 o_ptr = &inventory[item];
325         }
326
327         /* Get the item (on the floor) */
328         else
329         {
330                 o_ptr = &current_floor_ptr->o_list[0 - item];
331         }
332
333         take_turn(p_ptr, 100);
334
335         /* Extract the item level */
336         lev = k_info[o_ptr->k_idx].level;
337
338         /* Hack -- use artifact level instead */
339         if (object_is_fixed_artifact(o_ptr)) lev = a_info[o_ptr->name1].level;
340         else if (object_is_random_artifact(o_ptr))
341         {
342                 const activation_type* const act_ptr = find_activation_info(o_ptr);
343                 if (act_ptr) {
344                         lev = act_ptr->level;
345                 }
346         }
347         else if (((o_ptr->tval == TV_RING) || (o_ptr->tval == TV_AMULET)) && o_ptr->name2) lev = e_info[o_ptr->name2].level;
348
349         /* Base chance of success */
350         chance = p_ptr->skill_dev;
351
352         /* Confusion hurts skill */
353         if (p_ptr->confused) chance = chance / 2;
354
355         fail = lev+5;
356         if (chance > fail) fail -= (chance - fail)*2;
357         else chance -= (fail - chance)*2;
358         if (fail < USE_DEVICE) fail = USE_DEVICE;
359         if (chance < USE_DEVICE) chance = USE_DEVICE;
360
361         if(cmd_limit_time_walk(p_ptr)) return;
362
363         if (p_ptr->pclass == CLASS_BERSERKER) success = FALSE;
364         else if (chance > fail)
365         {
366                 if (randint0(chance*2) < fail) success = FALSE;
367                 else success = TRUE;
368         }
369         else
370         {
371                 if (randint0(fail*2) < chance) success = TRUE;
372                 else success = FALSE;
373         }
374
375         /* Roll for usage */
376         if (!success)
377         {
378                 if (flush_failure) flush();
379                 msg_print(_("うまく始動させることができなかった。", "You failed to activate it properly."));
380                 sound(SOUND_FAIL);
381                 return;
382         }
383
384         /* Check the recharge */
385         if (o_ptr->timeout)
386         {
387                 msg_print(_("それは微かに音を立て、輝き、消えた...", "It whines, glows and fades..."));
388                 return;
389         }
390
391         /* Some lights need enough fuel for activation */
392         if (!o_ptr->xtra4 && (o_ptr->tval == TV_FLASK) &&
393                 ((o_ptr->sval == SV_LITE_TORCH) || (o_ptr->sval == SV_LITE_LANTERN)))
394         {
395                 msg_print(_("燃料がない。", "It has no fuel."));
396                 free_turn(p_ptr);
397                 return;
398         }
399
400         /* Activate the artifact */
401         msg_print(_("始動させた...", "You activate it..."));
402
403         sound(SOUND_ZAP);
404
405         /* Activate object */
406         if (activation_index(o_ptr))
407         {
408                 (void)activate_artifact(o_ptr);
409
410                 p_ptr->window |= (PW_INVEN | PW_EQUIP);
411
412                 /* Success */
413                 return;
414         }
415
416         /* Special items */
417         else if (o_ptr->tval == TV_WHISTLE)
418         {
419                 if (music_singing_any()) stop_singing(p_ptr);
420                 if (hex_spelling_any()) stop_hex_spell_all();
421
422                 {
423                         MONSTER_IDX pet_ctr, i;
424                         MONSTER_IDX *who;
425                         int max_pet = 0;
426                         u16b dummy_why;
427
428                         /* Allocate the "who" array */
429                         C_MAKE(who, current_floor_ptr->max_m_idx, MONSTER_IDX);
430
431                         /* Process the monsters (backwards) */
432                         for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
433                         {
434                                 if (is_pet(&current_floor_ptr->m_list[pet_ctr]) && (p_ptr->riding != pet_ctr))
435                                   who[max_pet++] = pet_ctr;
436                         }
437
438                         ang_sort(who, &dummy_why, max_pet, ang_sort_comp_pet, ang_sort_swap_hook);
439
440                         /* Process the monsters (backwards) */
441                         for (i = 0; i < max_pet; i++)
442                         {
443                                 pet_ctr = who[i];
444                                 teleport_monster_to(pet_ctr, p_ptr->y, p_ptr->x, 100, TELEPORT_PASSIVE);
445                         }
446
447                         /* Free the "who" array */
448                         C_KILL(who, current_floor_ptr->max_m_idx, IDX);
449                 }
450                 o_ptr->timeout = 100 + randint1(100);
451                 return;
452         }
453         else if (o_ptr->tval == TV_CAPTURE)
454         {
455                 if(!o_ptr->pval)
456                 {
457                         bool old_target_pet = target_pet;
458                         target_pet = TRUE;
459                         if (!get_aim_dir(&dir))
460                         {
461                                 target_pet = old_target_pet;
462                                 return;
463                         }
464                         target_pet = old_target_pet;
465
466                         if(fire_ball(GF_CAPTURE, dir, 0, 0))
467                         {
468                                 o_ptr->pval = (PARAMETER_VALUE)cap_mon;
469                                 o_ptr->xtra3 = (XTRA8)cap_mspeed;
470                                 o_ptr->xtra4 = (XTRA16)cap_hp;
471                                 o_ptr->xtra5 = (XTRA16)cap_maxhp;
472                                 if (cap_nickname)
473                                 {
474                                         concptr t;
475                                         char *s;
476                                         char buf[80] = "";
477
478                                         if (o_ptr->inscription)
479                                                 strcpy(buf, quark_str(o_ptr->inscription));
480                                         s = buf;
481                                         for (s = buf;*s && (*s != '#'); s++)
482                                         {
483 #ifdef JP
484                                                 if (iskanji(*s)) s++;
485 #endif
486                                         }
487                                         *s = '#';
488                                         s++;
489 #ifdef JP
490  /*nothing*/
491 #else
492                                         *s++ = '\'';
493 #endif
494                                         t = quark_str(cap_nickname);
495                                         while (*t)
496                                         {
497                                                 *s = *t;
498                                                 s++;
499                                                 t++;
500                                         }
501 #ifdef JP
502  /*nothing*/
503 #else
504                                         *s++ = '\'';
505 #endif
506                                         *s = '\0';
507                                         o_ptr->inscription = quark_add(buf);
508                                 }
509                         }
510                 }
511                 else
512                 {
513                         success = FALSE;
514                         if (!get_direction(&dir, FALSE, FALSE)) return;
515                         if (monster_can_enter(p_ptr->y + ddy[dir], p_ptr->x + ddx[dir], &r_info[o_ptr->pval], 0))
516                         {
517                                 if (place_monster_aux(0, p_ptr->y + ddy[dir], p_ptr->x + ddx[dir], o_ptr->pval, (PM_FORCE_PET | PM_NO_KAGE)))
518                                 {
519                                         if (o_ptr->xtra3) current_floor_ptr->m_list[hack_m_idx_ii].mspeed = o_ptr->xtra3;
520                                         if (o_ptr->xtra5) current_floor_ptr->m_list[hack_m_idx_ii].max_maxhp = o_ptr->xtra5;
521                                         if (o_ptr->xtra4) current_floor_ptr->m_list[hack_m_idx_ii].hp = o_ptr->xtra4;
522                                         current_floor_ptr->m_list[hack_m_idx_ii].maxhp = current_floor_ptr->m_list[hack_m_idx_ii].max_maxhp;
523                                         if (o_ptr->inscription)
524                                         {
525                                                 char buf[80];
526                                                 concptr t;
527 #ifndef JP
528                                                 bool quote = FALSE;
529 #endif
530
531                                                 t = quark_str(o_ptr->inscription);
532                                                 for (t = quark_str(o_ptr->inscription);*t && (*t != '#'); t++)
533                                                 {
534 #ifdef JP
535                                                         if (iskanji(*t)) t++;
536 #endif
537                                                 }
538                                                 if (*t)
539                                                 {
540                                                         char *s = buf;
541                                                         t++;
542 #ifdef JP
543                                                         /* nothing */
544 #else
545                                                         if (*t =='\'')
546                                                         {
547                                                                 t++;
548                                                                 quote = TRUE;
549                                                         }
550 #endif
551                                                         while(*t)
552                                                         {
553                                                                 *s = *t;
554                                                                 t++;
555                                                                 s++;
556                                                         }
557 #ifdef JP
558                                                         /* nothing */
559 #else
560                                                         if (quote && *(s-1) =='\'')
561                                                                 s--;
562 #endif
563                                                         *s = '\0';
564                                                         current_floor_ptr->m_list[hack_m_idx_ii].nickname = quark_add(buf);
565                                                         t = quark_str(o_ptr->inscription);
566                                                         s = buf;
567                                                         while(*t && (*t != '#'))
568                                                         {
569                                                                 *s = *t;
570                                                                 t++;
571                                                                 s++;
572                                                         }
573                                                         *s = '\0';
574                                                         o_ptr->inscription = quark_add(buf);
575                                                 }
576                                         }
577                                         o_ptr->pval = 0;
578                                         o_ptr->xtra3 = 0;
579                                         o_ptr->xtra4 = 0;
580                                         o_ptr->xtra5 = 0;
581                                         success = TRUE;
582                                 }
583                         }
584                         if (!success)
585                                 msg_print(_("おっと、解放に失敗した。", "Oops.  You failed to release your pet."));
586                 }
587                 calc_android_exp();
588                 return;
589         }
590
591         /* Mistake */
592         msg_print(_("おっと、このアイテムは始動できない。", "Oops.  That object cannot be activated."));
593 }
594
595 /*!
596  * @brief 装備を発動するコマンドのメインルーチン /
597  * @return なし
598  */
599 void do_cmd_activate(void)
600 {
601         OBJECT_IDX item;
602         concptr q, s;
603
604         if (p_ptr->wild_mode) return;
605         if (cmd_limit_arena(p_ptr)) return;
606
607         if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
608         {
609                 set_action(ACTION_NONE);
610         }
611
612         item_tester_hook = item_tester_hook_activate;
613
614         q = _("どのアイテムを始動させますか? ", "Activate which item? ");
615         s = _("始動できるアイテムを装備していない。", "You have nothing to activate.");
616
617         if (!choose_object(&item, q, s, (USE_EQUIP | IGNORE_BOTHHAND_SLOT))) return;
618
619         /* Activate the item */
620         do_cmd_activate_aux(item);
621 }
622
623 /*!
624 * @brief 発動によるブレスの属性をアイテムの耐性から選択し、実行を処理する。/ Dragon breath activation
625 * @details 対象となる耐性は dragonbreath_info テーブルを参照のこと。
626 * @param o_ptr 対象のオブジェクト構造体ポインタ
627 * @return 発動実行の是非を返す。
628 */
629 static bool activate_dragon_breath(object_type *o_ptr)
630 {
631         BIT_FLAGS flgs[TR_FLAG_SIZE]; /* for resistance flags */
632         int type[20];
633         concptr name[20];
634         int i, t, n = 0;
635         DIRECTION dir;
636
637         if (!get_aim_dir(&dir)) return FALSE;
638
639         object_flags(o_ptr, flgs);
640
641         for (i = 0; dragonbreath_info[i].flag != 0; i++)
642         {
643                 if (have_flag(flgs, dragonbreath_info[i].flag))
644                 {
645                         type[n] = dragonbreath_info[i].type;
646                         name[n] = dragonbreath_info[i].name;
647                         n++;
648                 }
649         }
650         if (n == 0) return FALSE;
651
652         /* Stop speaking */
653         if (music_singing_any()) stop_singing(p_ptr);
654         if (hex_spelling_any()) stop_hex_spell_all();
655
656         t = randint0(n);
657         msg_format(_("あなたは%sのブレスを吐いた。", "You breathe %s."), name[t]);
658         fire_breath(type[t], dir, 250, 4);
659
660         return TRUE;
661 }
662
663 /*!
664  * @brief アイテムの発動効果を処理する。
665  * @param o_ptr 対象のオブジェクト構造体ポインタ
666  * @return 発動実行の是非を返す。
667  */
668 bool activate_artifact(object_type *o_ptr)
669 {
670         PLAYER_LEVEL plev = p_ptr->lev;
671         int k, dummy = 0;
672         DIRECTION dir;
673         concptr name = k_name + k_info[o_ptr->k_idx].name;
674         const activation_type* const act_ptr = find_activation_info(o_ptr);
675         if (!act_ptr) {
676                 /* Maybe forgot adding information to activation_info table ? */
677                 msg_print("Activation information is not found.");
678                 return FALSE;
679         }
680
681         /* Activate for attack */
682         switch (act_ptr->index)
683         {
684         case ACT_SUNLIGHT:
685         {
686                 if (!get_aim_dir(&dir)) return FALSE;
687                 msg_print(_("太陽光線が放たれた。", "A line of sunlight appears."));
688                 (void)lite_line(dir, damroll(6, 8));
689                 break;
690         }
691
692         case ACT_BO_MISS_1:
693         {
694                 msg_print(_("それは眩しいくらいに明るく輝いている...", "It glows extremely brightly..."));
695                 if (!get_aim_dir(&dir)) return FALSE;
696                 fire_bolt(GF_MISSILE, dir, damroll(2, 6));
697                 break;
698         }
699
700         case ACT_BA_POIS_1:
701         {
702                 msg_print(_("それは濃緑色に脈動している...", "It throbs deep green..."));
703                 if (!get_aim_dir(&dir)) return FALSE;
704                 fire_ball(GF_POIS, dir, 12, 3);
705                 break;
706         }
707
708         case ACT_BO_ELEC_1:
709         {
710                 msg_print(_("それは火花に覆われた...", "It is covered in sparks..."));
711                 if (!get_aim_dir(&dir)) return FALSE;
712                 fire_bolt(GF_ELEC, dir, damroll(4, 8));
713                 break;
714         }
715
716         case ACT_BO_ACID_1:
717         {
718                 msg_print(_("それは酸に覆われた...", "It is covered in acid..."));
719                 if (!get_aim_dir(&dir)) return FALSE;
720                 fire_bolt(GF_ACID, dir, damroll(5, 8));
721                 break;
722         }
723
724         case ACT_BO_COLD_1:
725         {
726                 msg_print(_("それは霜に覆われた...", "It is covered in frost..."));
727                 if (!get_aim_dir(&dir)) return FALSE;
728                 fire_bolt(GF_COLD, dir, damroll(6, 8));
729                 break;
730         }
731
732         case ACT_BO_FIRE_1:
733         {
734                 msg_print(_("それは炎に覆われた...", "It is covered in fire..."));
735                 if (!get_aim_dir(&dir)) return FALSE;
736                 fire_bolt(GF_FIRE, dir, damroll(9, 8));
737                 break;
738         }
739
740         case ACT_BA_COLD_1:
741         {
742                 msg_print(_("それは霜に覆われた...", "It is covered in frost..."));
743                 if (!get_aim_dir(&dir)) return FALSE;
744                 fire_ball(GF_COLD, dir, 48, 2);
745                 break;
746         }
747
748         case ACT_BA_COLD_2:
749         {
750                 msg_print(_("それは青く激しく輝いた...", "It glows an intense blue..."));
751                 if (!get_aim_dir(&dir)) return FALSE;
752                 fire_ball(GF_COLD, dir, 100, 2);
753                 break;
754         }
755
756         case ACT_BA_COLD_3:
757         {
758                 msg_print(_("明るく白色に輝いている...", "It glows bright white..."));
759                 if (!get_aim_dir(&dir)) return FALSE;
760                 fire_ball(GF_COLD, dir, 400, 3);
761                 break;
762         }
763
764         case ACT_BA_FIRE_1:
765         {
766                 msg_print(_("それは赤く激しく輝いた...", "It glows an intense red..."));
767                 if (!get_aim_dir(&dir)) return FALSE;
768                 fire_ball(GF_FIRE, dir, 72, 2);
769                 break;
770         }
771
772         case ACT_BA_FIRE_2:
773         {
774                 msg_format(_("%sから炎が吹き出した...", "The %s rages in fire..."), name);
775                 if (!get_aim_dir(&dir)) return FALSE;
776                 fire_ball(GF_FIRE, dir, 120, 3);
777                 break;
778         }
779
780         case ACT_BA_FIRE_3:
781         {
782                 msg_print(_("深赤色に輝いている...", "It glows deep red..."));
783                 if (!get_aim_dir(&dir)) return FALSE;
784                 fire_ball(GF_FIRE, dir, 300, 3);
785                 break;
786         }
787
788         case ACT_BA_FIRE_4:
789         {
790                 msg_print(_("それは赤く激しく輝いた...", "It glows an intense red..."));
791                 if (!get_aim_dir(&dir)) return FALSE;
792                 fire_ball(GF_FIRE, dir, 100, 2);
793                 break;
794         }
795
796         case ACT_BA_ELEC_2:
797         {
798                 msg_print(_("電気がパチパチ音を立てた...", "It crackles with electricity..."));
799                 if (!get_aim_dir(&dir)) return FALSE;
800                 fire_ball(GF_ELEC, dir, 100, 3);
801                 break;
802         }
803
804         case ACT_BA_ELEC_3:
805         {
806                 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
807                 if (!get_aim_dir(&dir)) return FALSE;
808                 fire_ball(GF_ELEC, dir, 500, 3);
809                 break;
810         }
811
812         case ACT_BA_ACID_1:
813         {
814                 msg_print(_("それは黒く激しく輝いた...", "It glows an intense black..."));
815                 if (!get_aim_dir(&dir)) return FALSE;
816                 fire_ball(GF_ACID, dir, 100, 2);
817                 break;
818         }
819
820         case ACT_BA_NUKE_1:
821         {
822                 msg_print(_("それは緑に激しく輝いた...", "It glows an intense green..."));
823                 if (!get_aim_dir(&dir)) return FALSE;
824                 fire_ball(GF_NUKE, dir, 100, 2);
825                 break;
826         }
827
828         case ACT_HYPODYNAMIA_1:
829         {
830                 msg_format(_("あなたは%sに敵を締め殺すよう命じた。", "You order the %s to strangle your opponent."), name);
831                 if (!get_aim_dir(&dir)) return FALSE;
832                 if (hypodynamic_bolt(dir, 100))
833                         break;
834         }
835
836         case ACT_HYPODYNAMIA_2:
837         {
838                 msg_print(_("黒く輝いている...", "It glows black..."));
839                 if (!get_aim_dir(&dir)) return FALSE;
840                 hypodynamic_bolt(dir, 120);
841                 break;
842         }
843
844         case ACT_DRAIN_1:
845         {
846                 if (!get_aim_dir(&dir)) return FALSE;
847                 for (dummy = 0; dummy < 3; dummy++)
848                 {
849                         if (hypodynamic_bolt(dir, 50))
850                                 hp_player(50);
851                 }
852                 break;
853         }
854
855         case ACT_BO_MISS_2:
856         {
857                 msg_print(_("魔法のトゲが現れた...", "It grows magical spikes..."));
858                 if (!get_aim_dir(&dir)) return FALSE;
859                 fire_bolt(GF_ARROW, dir, 150);
860                 break;
861         }
862
863         case ACT_WHIRLWIND:
864         {
865                 massacre();
866                 break;
867         }
868
869         case ACT_DRAIN_2:
870         {
871                 if (!get_aim_dir(&dir)) return FALSE;
872                 for (dummy = 0; dummy < 3; dummy++)
873                 {
874                         if (hypodynamic_bolt(dir, 100))
875                                 hp_player(100);
876                 }
877                 break;
878         }
879
880
881         case ACT_CALL_CHAOS:
882         {
883                 msg_print(_("様々な色の火花を発している...", "It glows in scintillating colours..."));
884                 call_chaos();
885                 break;
886         }
887
888         case ACT_ROCKET:
889         {
890                 if (!get_aim_dir(&dir)) return FALSE;
891                 msg_print(_("ロケットを発射した!", "You launch a rocket!"));
892                 fire_ball(GF_ROCKET, dir, 250 + plev * 3, 2);
893                 break;
894         }
895
896         case ACT_DISP_EVIL:
897         {
898                 msg_print(_("神聖な雰囲気が充満した...", "It floods the area with goodness..."));
899                 dispel_evil(p_ptr->lev * 5);
900                 break;
901         }
902
903         case ACT_BA_MISS_3:
904         {
905                 if (!get_aim_dir(&dir)) return FALSE;
906                 msg_print(_("あなたはエレメントのブレスを吐いた。", "You breathe the elements."));
907                 fire_breath(GF_MISSILE, dir, 300, 4);
908                 break;
909         }
910
911         case ACT_DISP_GOOD:
912         {
913                 msg_print(_("邪悪な雰囲気が充満した...", "It floods the area with evil..."));
914                 dispel_good(p_ptr->lev * 5);
915                 break;
916         }
917
918         case ACT_BO_MANA:
919         {
920                 msg_format(_("%sに魔法のトゲが現れた...", "The %s grows magical spikes..."), name);
921                 if (!get_aim_dir(&dir)) return FALSE;
922                 fire_bolt(GF_ARROW, dir, 150);
923                 break;
924         }
925
926         case ACT_BA_WATER:
927         {
928                 msg_format(_("%sが深い青色に鼓動している...", "The %s throbs deep blue..."), name);
929                 if (!get_aim_dir(&dir)) return FALSE;
930                 fire_ball(GF_WATER, dir, 200, 3);
931                 break;
932         }
933
934         case ACT_BA_DARK:
935         {
936                 msg_format(_("%sが深い闇に覆われた...", "The %s is coverd in pitch-darkness..."), name);
937                 if (!get_aim_dir(&dir)) return FALSE;
938                 fire_ball(GF_DARK, dir, 250, 4);
939                 break;
940         }
941
942         case ACT_BA_MANA:
943         {
944                 msg_format(_("%sが青白く光った...", "The %s glows pale..."), name);
945                 if (!get_aim_dir(&dir)) return FALSE;
946                 fire_ball(GF_MANA, dir, 250, 4);
947                 break;
948         }
949
950         case ACT_PESTICIDE:
951         {
952                 msg_print(_("あなたは害虫を一掃した。", "You exterminate small life."));
953                 (void)dispel_monsters(4);
954                 break;
955         }
956
957         case ACT_BLINDING_LIGHT:
958         {
959                 msg_format(_("%sが眩しい光で輝いた...", "The %s gleams with blinding light..."), name);
960                 fire_ball(GF_LITE, 0, 300, 6);
961                 confuse_monsters(3 * p_ptr->lev / 2);
962                 break;
963         }
964
965         case ACT_BIZARRE:
966         {
967                 msg_format(_("%sは漆黒に輝いた...", "The %s glows intensely black..."), name);
968                 if (!get_aim_dir(&dir)) return FALSE;
969                 ring_of_power(dir);
970                 break;
971         }
972
973         case ACT_CAST_BA_STAR:
974         {
975                 HIT_POINT num = damroll(5, 3);
976                 POSITION y = 0, x = 0;
977                 int attempts;
978                 msg_format(_("%sが稲妻で覆われた...", "The %s is surrounded by lightning..."), name);
979                 for (k = 0; k < num; k++)
980                 {
981                         attempts = 1000;
982
983                         while (attempts--)
984                         {
985                                 scatter(&y, &x, p_ptr->y, p_ptr->x, 4, 0);
986                                 if (!cave_have_flag_bold(y, x, FF_PROJECT)) continue;
987                                 if (!player_bold(y, x)) break;
988                         }
989
990                         project(0, 3, y, x, 150, GF_ELEC,
991                                 (PROJECT_THRU | PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
992                 }
993
994                 break;
995         }
996
997         case ACT_BLADETURNER:
998         {
999                 if (!get_aim_dir(&dir)) return FALSE;
1000                 msg_print(_("あなたはエレメントのブレスを吐いた。", "You breathe the elements."));
1001                 fire_breath(GF_MISSILE, dir, 300, 4);
1002                 msg_print(_("鎧が様々な色に輝いた...", "Your armor glows many colours..."));
1003                 (void)set_afraid(0);
1004                 (void)set_hero(randint1(50) + 50, FALSE);
1005                 (void)hp_player(10);
1006                 (void)set_blessed(randint1(50) + 50, FALSE);
1007                 (void)set_oppose_acid(randint1(50) + 50, FALSE);
1008                 (void)set_oppose_elec(randint1(50) + 50, FALSE);
1009                 (void)set_oppose_fire(randint1(50) + 50, FALSE);
1010                 (void)set_oppose_cold(randint1(50) + 50, FALSE);
1011                 (void)set_oppose_pois(randint1(50) + 50, FALSE);
1012                 break;
1013         }
1014
1015         case ACT_BR_FIRE:
1016         {
1017                 if (!get_aim_dir(&dir)) return FALSE;
1018                 fire_breath(GF_FIRE, dir, 200, 2);
1019                 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
1020                 {
1021                         (void)set_oppose_fire(randint1(20) + 20, FALSE);
1022                 }
1023                 break;
1024         }
1025
1026         case ACT_BR_COLD:
1027         {
1028                 if (!get_aim_dir(&dir)) return FALSE;
1029                 fire_breath(GF_COLD, dir, 200, 2);
1030                 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
1031                 {
1032                         (void)set_oppose_cold(randint1(20) + 20, FALSE);
1033                 }
1034                 break;
1035         }
1036
1037         case ACT_BR_DRAGON:
1038         {
1039                 if (!activate_dragon_breath(o_ptr)) return FALSE;
1040                 break;
1041         }
1042
1043         /* Activate for other offensive action */
1044         case ACT_CONFUSE:
1045         {
1046                 msg_print(_("様々な色の火花を発している...", "It glows in scintillating colours..."));
1047                 if (!get_aim_dir(&dir)) return FALSE;
1048                 confuse_monster(dir, 20);
1049                 break;
1050         }
1051
1052         case ACT_SLEEP:
1053         {
1054                 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
1055                 sleep_monsters_touch();
1056                 break;
1057         }
1058
1059         case ACT_QUAKE:
1060         {
1061                 earthquake(p_ptr->y, p_ptr->x, 5);
1062                 break;
1063         }
1064
1065         case ACT_TERROR:
1066         {
1067                 turn_monsters(40 + p_ptr->lev);
1068                 break;
1069         }
1070
1071         case ACT_TELE_AWAY:
1072         {
1073                 if (!get_aim_dir(&dir)) return FALSE;
1074                 (void)fire_beam(GF_AWAY_ALL, dir, plev);
1075                 break;
1076         }
1077
1078         case ACT_BANISH_EVIL:
1079         {
1080                 if (banish_evil(100))
1081                 {
1082                         msg_print(_("アーティファクトの力が邪悪を打ち払った!", "The power of the artifact banishes evil!"));
1083                 }
1084                 break;
1085         }
1086
1087         case ACT_GENOCIDE:
1088         {
1089                 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
1090                 (void)symbol_genocide(200, TRUE);
1091                 break;
1092         }
1093
1094         case ACT_MASS_GENO:
1095         {
1096                 msg_print(_("ひどく鋭い音が流れ出た...", "It lets out a long, shrill note..."));
1097                 (void)mass_genocide(200, TRUE);
1098                 break;
1099         }
1100
1101         case ACT_SCARE_AREA:
1102         {
1103                 if (music_singing_any()) stop_singing(p_ptr);
1104                 if (hex_spelling_any()) stop_hex_spell_all();
1105                 msg_print(_("あなたは力強い突風を吹き鳴らした。周囲の敵が震え上っている!",
1106                         "You wind a mighty blast; your enemies tremble!"));
1107                 (void)turn_monsters((3 * p_ptr->lev / 2) + 10);
1108                 break;
1109         }
1110
1111         case ACT_AGGRAVATE:
1112         {
1113                 if (o_ptr->name1 == ART_HYOUSIGI)
1114                 {
1115                         msg_print(_("拍子木を打った。", "You beat Your wooden clappers."));
1116                 }
1117                 else
1118                 {
1119                         msg_format(_("%sは不快な物音を立てた。", "The %s sounds an unpleasant noise."), name);
1120                 }
1121                 aggravate_monsters(0);
1122                 break;
1123         }
1124
1125         /* Activate for summoning / charming */
1126
1127         case ACT_CHARM_ANIMAL:
1128         {
1129                 if (!get_aim_dir(&dir)) return FALSE;
1130                 (void)charm_animal(dir, plev);
1131                 break;
1132         }
1133
1134         case ACT_CHARM_UNDEAD:
1135         {
1136                 if (!get_aim_dir(&dir)) return FALSE;
1137                 (void)control_one_undead(dir, plev);
1138                 break;
1139         }
1140
1141         case ACT_CHARM_OTHER:
1142         {
1143                 if (!get_aim_dir(&dir)) return FALSE;
1144                 (void)charm_monster(dir, plev * 2);
1145                 break;
1146         }
1147
1148         case ACT_CHARM_ANIMALS:
1149         {
1150                 (void)charm_animals(plev * 2);
1151                 break;
1152         }
1153
1154         case ACT_CHARM_OTHERS:
1155         {
1156                 charm_monsters(plev * 2);
1157                 break;
1158         }
1159
1160         case ACT_SUMMON_ANIMAL:
1161         {
1162                 (void)summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET), '\0');
1163                 break;
1164         }
1165
1166         case ACT_SUMMON_PHANTOM:
1167         {
1168                 msg_print(_("幻霊を召喚した。", "You summon a phantasmal servant."));
1169                 (void)summon_specific(-1, p_ptr->y, p_ptr->x, current_floor_ptr->dun_level, SUMMON_PHANTOM, (PM_ALLOW_GROUP | PM_FORCE_PET), '\0');
1170                 break;
1171         }
1172
1173         case ACT_SUMMON_ELEMENTAL:
1174                 if (!cast_summon_elemental(p_ptr, (plev * 3) / 2)) return FALSE;
1175                 break;
1176
1177         case ACT_SUMMON_DEMON:
1178         {
1179                 cast_summon_demon((plev * 3) / 2);
1180                 break;
1181         }
1182
1183         case ACT_SUMMON_UNDEAD:
1184                 if (!cast_summon_undead(p_ptr, (plev * 3) / 2)) return FALSE;
1185                 break;
1186
1187         case ACT_SUMMON_HOUND:
1188                 if (!cast_summon_hound(p_ptr, (plev * 3) / 2)) return FALSE;
1189                 break;
1190
1191         case ACT_SUMMON_DAWN:
1192         {
1193                 msg_print(_("暁の師団を召喚した。", "You summon the Legion of the Dawn."));
1194                 (void)summon_specific(-1, p_ptr->y, p_ptr->x, current_floor_ptr->dun_level, SUMMON_DAWN, (PM_ALLOW_GROUP | PM_FORCE_PET), '\0');
1195                 break;
1196         }
1197
1198         case ACT_SUMMON_OCTOPUS:
1199                 if(!cast_summon_octopus(p_ptr)) return FALSE;
1200                 break;
1201
1202         /* Activate for healing */
1203
1204         case ACT_CHOIR_SINGS:
1205         {
1206                 msg_print(_("天国の歌が聞こえる...", "A heavenly choir sings..."));
1207                 (void)cure_critical_wounds(777);
1208                 (void)set_hero(randint1(25) + 25, FALSE);
1209                 break;
1210         }
1211
1212         case ACT_CURE_LW:
1213         {
1214                 (void)set_afraid(0);
1215                 (void)hp_player(30);
1216                 break;
1217         }
1218
1219         case ACT_CURE_MW:
1220         {
1221                 msg_print(_("深紫色の光を発している...", "It radiates deep purple..."));
1222                 (void)cure_serious_wounds(4, 8);
1223                 break;
1224         }
1225
1226         case ACT_CURE_POISON:
1227         {
1228                 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
1229                 (void)set_afraid(0);
1230                 (void)set_poisoned(0);
1231                 break;
1232         }
1233
1234         case ACT_REST_EXP:
1235         {
1236                 msg_print(_("深紅に輝いている...", "It glows a deep red..."));
1237                 restore_level();
1238                 break;
1239         }
1240
1241         case ACT_REST_ALL:
1242         {
1243                 msg_print(_("濃緑色に輝いている...", "It glows a deep green..."));
1244                 (void)restore_all_status();
1245                 (void)restore_level();
1246                 break;
1247         }
1248
1249         case ACT_CURE_700:
1250         {
1251                 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
1252                 msg_print(_("体内に暖かい鼓動が感じられる...", "You feel a warm tingling inside..."));
1253                 (void)cure_critical_wounds(700);
1254                 break;
1255         }
1256
1257         case ACT_CURE_1000:
1258         {
1259                 msg_print(_("白く明るく輝いている...", "It glows a bright white..."));
1260                 msg_print(_("ひじょうに気分がよい...", "You feel much better..."));
1261                 (void)cure_critical_wounds(1000);
1262                 break;
1263         }
1264
1265         case ACT_CURING:
1266         {
1267                 msg_format(_("%sの優しさに癒される...", "the %s cures you affectionately ..."), name);
1268                 true_healing(0);
1269                 break;
1270         }
1271
1272         case ACT_CURE_MANA_FULL:
1273         {
1274                 msg_format(_("%sが青白く光った...", "The %s glows pale..."), name);
1275                 restore_mana(TRUE);
1276                 break;
1277         }
1278
1279         /* Activate for timed effect */
1280
1281         case ACT_ESP:
1282         {
1283                 (void)set_tim_esp(randint1(30) + 25, FALSE);
1284                 break;
1285         }
1286
1287         case ACT_BERSERK:
1288         {
1289                 (void)berserk(randint1(25) + 25);
1290                 break;
1291         }
1292
1293         case ACT_PROT_EVIL:
1294         {
1295                 msg_format(_("%sから鋭い音が流れ出た...", "The %s lets out a shrill wail..."), name);
1296                 k = 3 * p_ptr->lev;
1297                 (void)set_protevil(randint1(25) + k, FALSE);
1298                 break;
1299         }
1300
1301         case ACT_RESIST_ALL:
1302         {
1303                 msg_print(_("様々な色に輝いている...", "It glows many colours..."));
1304                 (void)set_oppose_acid(randint1(40) + 40, FALSE);
1305                 (void)set_oppose_elec(randint1(40) + 40, FALSE);
1306                 (void)set_oppose_fire(randint1(40) + 40, FALSE);
1307                 (void)set_oppose_cold(randint1(40) + 40, FALSE);
1308                 (void)set_oppose_pois(randint1(40) + 40, FALSE);
1309                 break;
1310         }
1311
1312         case ACT_SPEED:
1313         {
1314                 msg_print(_("明るく緑色に輝いている...", "It glows bright green..."));
1315                 (void)set_fast(randint1(20) + 20, FALSE);
1316                 break;
1317         }
1318
1319         case ACT_XTRA_SPEED:
1320         {
1321                 msg_print(_("明るく輝いている...", "It glows brightly..."));
1322                 (void)set_fast(randint1(75) + 75, FALSE);
1323                 break;
1324         }
1325
1326         case ACT_WRAITH:
1327         {
1328                 set_wraith_form(randint1(plev / 2) + (plev / 2), FALSE);
1329                 break;
1330         }
1331
1332         case ACT_INVULN:
1333         {
1334                 (void)set_invuln(randint1(8) + 8, FALSE);
1335                 break;
1336         }
1337
1338         case ACT_HERO:
1339         {
1340                 (void)heroism(25);
1341                 break;
1342         }
1343
1344         case ACT_HERO_SPEED:
1345         {
1346                 (void)set_fast(randint1(50) + 50, FALSE);
1347                 (void)heroism(50);
1348                 break;
1349         }
1350
1351         case ACT_RESIST_ACID:
1352         {
1353                 msg_format(_("%sが黒く輝いた...", "The %s grows black."), name);
1354                 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ACID))
1355                 {
1356                         if (!get_aim_dir(&dir)) return FALSE;
1357                         fire_ball(GF_ACID, dir, 100, 2);
1358                 }
1359                 (void)set_oppose_acid(randint1(20) + 20, FALSE);
1360                 break;
1361         }
1362
1363         case ACT_RESIST_FIRE:
1364         {
1365                 msg_format(_("%sが赤く輝いた...", "The %s grows red."), name);
1366                 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
1367                 {
1368                         if (!get_aim_dir(&dir)) return FALSE;
1369                         fire_ball(GF_FIRE, dir, 100, 2);
1370                 }
1371                 (void)set_oppose_fire(randint1(20) + 20, FALSE);
1372                 break;
1373         }
1374
1375         case ACT_RESIST_COLD:
1376         {
1377                 msg_format(_("%sが白く輝いた...", "The %s grows white."), name);
1378                 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
1379                 {
1380                         if (!get_aim_dir(&dir)) return FALSE;
1381                         fire_ball(GF_COLD, dir, 100, 2);
1382                 }
1383                 (void)set_oppose_cold(randint1(20) + 20, FALSE);
1384                 break;
1385         }
1386
1387         case ACT_RESIST_ELEC:
1388         {
1389                 msg_format(_("%sが青く輝いた...", "The %s grows blue."), name);
1390                 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ELEC))
1391                 {
1392                         if (!get_aim_dir(&dir)) return FALSE;
1393                         fire_ball(GF_ELEC, dir, 100, 2);
1394                 }
1395                 (void)set_oppose_elec(randint1(20) + 20, FALSE);
1396                 break;
1397         }
1398
1399         case ACT_RESIST_POIS:
1400         {
1401                 msg_format(_("%sが緑に輝いた...", "The %s grows green."), name);
1402                 (void)set_oppose_pois(randint1(20) + 20, FALSE);
1403                 break;
1404         }
1405
1406         /* Activate for general purpose effect (detection etc.) */
1407
1408         case ACT_LIGHT:
1409         {
1410                 msg_format(_("%sから澄んだ光があふれ出た...", "The %s wells with clear light..."), name);
1411                 lite_area(damroll(2, 15), 3);
1412                 break;
1413         }
1414
1415         case ACT_MAP_LIGHT:
1416         {
1417                 msg_print(_("眩しく輝いた...", "It shines brightly..."));
1418                 map_area(DETECT_RAD_MAP);
1419                 lite_area(damroll(2, 15), 3);
1420                 break;
1421         }
1422
1423         case ACT_DETECT_ALL:
1424         {
1425                 msg_print(_("白く明るく輝いている...", "It glows bright white..."));
1426                 msg_print(_("心にイメージが浮かんできた...", "An image forms in your mind..."));
1427                 detect_all(DETECT_RAD_DEFAULT);
1428                 break;
1429         }
1430
1431         case ACT_DETECT_XTRA:
1432         {
1433                 msg_print(_("明るく輝いている...", "It glows brightly..."));
1434                 detect_all(DETECT_RAD_DEFAULT);
1435                 probing();
1436                 identify_fully(FALSE);
1437                 break;
1438         }
1439
1440         case ACT_ID_FULL:
1441         {
1442                 msg_print(_("黄色く輝いている...", "It glows yellow..."));
1443                 identify_fully(FALSE);
1444                 break;
1445         }
1446
1447         case ACT_ID_PLAIN:
1448         {
1449                 if (!ident_spell(FALSE)) return FALSE;
1450                 break;
1451         }
1452
1453         case ACT_RUNE_EXPLO:
1454         {
1455                 msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
1456                 explosive_rune();
1457                 break;
1458         }
1459
1460         case ACT_RUNE_PROT:
1461         {
1462                 msg_print(_("ブルーに明るく輝いている...", "It glows light blue..."));
1463                 warding_glyph();
1464                 break;
1465         }
1466
1467         case ACT_SATIATE:
1468         {
1469                 (void)set_food(PY_FOOD_MAX - 1);
1470                 break;
1471         }
1472
1473         case ACT_DEST_DOOR:
1474         {
1475                 msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
1476                 destroy_doors_touch();
1477                 break;
1478         }
1479
1480         case ACT_STONE_MUD:
1481         {
1482                 msg_print(_("鼓動している...", "It pulsates..."));
1483                 if (!get_aim_dir(&dir)) return FALSE;
1484                 wall_to_mud(dir, 20 + randint1(30));
1485                 break;
1486         }
1487
1488         case ACT_RECHARGE:
1489         {
1490                 recharge(130);
1491                 break;
1492         }
1493
1494         case ACT_ALCHEMY:
1495         {
1496                 msg_print(_("明るい黄色に輝いている...", "It glows bright yellow..."));
1497                 (void)alchemy();
1498                 break;
1499         }
1500
1501         case ACT_DIM_DOOR:
1502         {
1503                 msg_print(_("次元の扉が開いた。目的地を選んで下さい。", "You open a dimensional gate. Choose a destination."));
1504                 if (!dimension_door()) return FALSE;
1505                 break;
1506         }
1507
1508
1509         case ACT_TELEPORT:
1510         {
1511                 msg_print(_("周りの空間が歪んでいる...", "It twists space around you..."));
1512                 teleport_player(100, 0L);
1513                 break;
1514         }
1515
1516         case ACT_RECALL:
1517         {
1518                 msg_print(_("やわらかな白色に輝いている...", "It glows soft white..."));
1519                 if (!recall_player(p_ptr, randint0(21) + 15)) return FALSE;
1520                 break;
1521         }
1522
1523         case ACT_JUDGE:
1524         {
1525                 msg_format(_("%sは赤く明るく光った!", "The %s flashes bright red!"), name);
1526                 chg_virtue(V_KNOWLEDGE, 1);
1527                 chg_virtue(V_ENLIGHTEN, 1);
1528                 wiz_lite(FALSE);
1529
1530                 msg_format(_("%sはあなたの体力を奪った...", "The %s drains your vitality..."), name);
1531                 take_hit(DAMAGE_LOSELIFE, damroll(3, 8), _("審判の宝石", "the Jewel of Judgement"), -1);
1532
1533                 (void)detect_traps(DETECT_RAD_DEFAULT, TRUE);
1534                 (void)detect_doors(DETECT_RAD_DEFAULT);
1535                 (void)detect_stairs(DETECT_RAD_DEFAULT);
1536
1537                 if (get_check(_("帰還の力を使いますか?", "Activate recall? ")))
1538                 {
1539                         (void)recall_player(p_ptr, randint0(21) + 15);
1540                 }
1541
1542                 break;
1543         }
1544
1545         case ACT_TELEKINESIS:
1546         {
1547                 if (!get_aim_dir(&dir)) return FALSE;
1548                 msg_format(_("%sを伸ばした。", "You stretched your %s."), name);
1549                 fetch(dir, 500, TRUE);
1550                 break;
1551         }
1552
1553         case ACT_DETECT_UNIQUE:
1554         {
1555                 int i;
1556                 monster_type *m_ptr;
1557                 monster_race *r_ptr;
1558                 msg_print(_("奇妙な場所が頭の中に浮かんだ...", "Some strange places show up in your mind. And you see ..."));
1559                 /* Process the monsters (backwards) */
1560                 for (i = m_max - 1; i >= 1; i--)
1561                 {
1562                         /* Access the monster */
1563                         m_ptr = &current_floor_ptr->m_list[i];
1564
1565                         /* Ignore "dead" monsters */
1566                         if (!monster_is_valid(m_ptr)) continue;
1567
1568                         r_ptr = &r_info[m_ptr->r_idx];
1569
1570                         if (r_ptr->flags1 & RF1_UNIQUE)
1571                         {
1572                                 msg_format(_("%s. ", "%s. "), r_name + r_ptr->name);
1573                         }
1574                 }
1575                 break;
1576         }
1577
1578         case ACT_ESCAPE:
1579         {
1580                 switch (randint1(13))
1581                 {
1582                 case 1: case 2: case 3: case 4: case 5:
1583                         teleport_player(10, 0L);
1584                         break;
1585                 case 6: case 7: case 8: case 9: case 10:
1586                         teleport_player(222, 0L);
1587                         break;
1588                 case 11: case 12:
1589                         (void)stair_creation();
1590                         break;
1591                 default:
1592                         if (get_check(_("この階を去りますか?", "Leave this level? ")))
1593                         {
1594                                 if (autosave_l) do_cmd_save_game(TRUE);
1595                                 p_ptr->leaving = TRUE;
1596                         }
1597                 }
1598                 break;
1599         }
1600
1601         case ACT_DISP_CURSE_XTRA:
1602         {
1603                 msg_format(_("%sが真実を照らし出す...", "The %s exhibits the truth..."), name);
1604                 (void)remove_all_curse();
1605                 (void)probing();
1606                 break;
1607         }
1608
1609         case ACT_BRAND_FIRE_BOLTS:
1610         {
1611                 msg_format(_("%sが深紅に輝いた...", "Your %s glows deep red..."), name);
1612                 (void)brand_bolts();
1613                 break;
1614         }
1615
1616         case ACT_RECHARGE_XTRA:
1617         {
1618                 msg_format(_("%sが白く輝いた...", "The %s gleams with blinding light..."), name);
1619                 if (!recharge(1000)) return FALSE;
1620                 break;
1621         }
1622
1623         case ACT_LORE:
1624                 msg_print(_("石が隠された秘密を写し出した...", "The stone reveals hidden mysteries..."));
1625                 if(!perilous_secrets(p_ptr)) return FALSE;
1626                 break;
1627
1628         case ACT_SHIKOFUMI:
1629         {
1630                 msg_print(_("力強く四股を踏んだ。", "You stamp. (as if you are in a ring.)"));
1631                 (void)set_afraid(0);
1632                 (void)set_hero(randint1(20) + 20, FALSE);
1633                 dispel_evil(p_ptr->lev * 3);
1634                 break;
1635         }
1636
1637         case ACT_PHASE_DOOR:
1638         {
1639                 teleport_player(10, 0L);
1640                 break;
1641         }
1642
1643         case ACT_DETECT_ALL_MONS:
1644         {
1645                 (void)detect_monsters_invis(255);
1646                 (void)detect_monsters_normal(255);
1647                 break;
1648         }
1649
1650         case ACT_ULTIMATE_RESIST:
1651         {
1652                 TIME_EFFECT v = randint1(25) + 25;
1653                 (void)set_afraid(0);
1654                 (void)set_hero(v, FALSE);
1655                 (void)hp_player(10);
1656                 (void)set_blessed(v, FALSE);
1657                 (void)set_oppose_acid(v, FALSE);
1658                 (void)set_oppose_elec(v, FALSE);
1659                 (void)set_oppose_fire(v, FALSE);
1660                 (void)set_oppose_cold(v, FALSE);
1661                 (void)set_oppose_pois(v, FALSE);
1662                 (void)set_ultimate_res(v, FALSE);
1663                 break;
1664         }
1665
1666         case ACT_CAST_OFF:
1667                 cosmic_cast_off(p_ptr, o_ptr);
1668                 break;
1669
1670         case ACT_FALLING_STAR:
1671         {
1672                 msg_print(_("あなたは妖刀に魅入られた…", "You are enchanted by cursed blade..."));
1673                 msg_print(_("「狂ほしく 血のごとき 月はのぼれり 秘めおきし 魔剣 いずこぞや」", "'Behold the blade arts.'"));
1674                 massacre();
1675                 break;
1676         }
1677
1678         case ACT_GRAND_CROSS:
1679         {
1680                 msg_print(_("「闇に還れ!」", "You say, 'Return to darkness!'"));
1681                 project(0, 8, p_ptr->y, p_ptr->x, (randint1(100) + 200) * 2, GF_HOLY_FIRE, PROJECT_KILL | PROJECT_ITEM | PROJECT_GRID, -1);
1682                 break;
1683         }
1684
1685         case ACT_TELEPORT_LEVEL:
1686         {
1687                 if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return FALSE;
1688                 teleport_level(0);
1689                 break;
1690         }
1691
1692         case ACT_STRAIN_HASTE:
1693         {
1694                 int t;
1695                 msg_format(_("%sはあなたの体力を奪った...", "The %s drains your vitality..."), name);
1696                 take_hit(DAMAGE_LOSELIFE, damroll(3, 8), _("加速した疲労", "the strain of haste"), -1);
1697                 t = 25 + randint1(25);
1698                 (void)set_fast(p_ptr->fast + t, FALSE);
1699                 break;
1700         }
1701
1702         case ACT_FISHING:
1703                 if(!fishing(p_ptr)) return FALSE;
1704                 break;
1705
1706         case ACT_INROU:
1707                 mitokohmon();
1708                 break;
1709
1710         case ACT_MURAMASA:
1711         {
1712                 /* Only for Muramasa */
1713                 if (o_ptr->name1 != ART_MURAMASA) return FALSE;
1714                 if (get_check(_("本当に使いますか?", "Are you sure?!")))
1715                 {
1716                         msg_print(_("村正が震えた...", "The Muramasa pulsates..."));
1717                         do_inc_stat(A_STR);
1718                         if (one_in_(2))
1719                         {
1720                                 msg_print(_("村正は壊れた!", "The Muramasa is destroyed!"));
1721                                 curse_weapon_object(TRUE, o_ptr);
1722                         }
1723                 }
1724                 break;
1725         }
1726
1727         case ACT_BLOODY_MOON:
1728         {
1729                 /* Only for Bloody Moon */
1730                 if (o_ptr->name1 != ART_BLOOD) return FALSE;
1731                 msg_print(_("鎌が明るく輝いた...", "Your scythe glows brightly!"));
1732                 get_bloody_moon_flags(o_ptr);
1733                 if (p_ptr->prace == RACE_ANDROID) calc_android_exp();
1734                 p_ptr->update |= (PU_BONUS | PU_HP);
1735                 break;
1736         }
1737
1738         case ACT_CRIMSON:
1739                 if (o_ptr->name1 != ART_CRIMSON) return FALSE;
1740                 msg_print(_("せっかくだから『クリムゾン』をぶっぱなすぜ!", "I'll fire CRIMSON! SEKKAKUDAKARA!"));
1741                 if(!fire_crimson()) return FALSE;
1742                 break;
1743
1744         default:
1745         {
1746                 msg_format(_("Unknown activation effect: %d.", "Unknown activation effect: %d."), act_ptr->index);
1747                 return FALSE;
1748         }
1749         }
1750
1751         /* Set activation timeout */
1752         if (act_ptr->timeout.constant >= 0) {
1753                 o_ptr->timeout = (s16b)act_ptr->timeout.constant;
1754                 if (act_ptr->timeout.dice > 0) {
1755                         o_ptr->timeout += randint1(act_ptr->timeout.dice);
1756                 }
1757         }
1758         else {
1759                 /* Activations that have special timeout */
1760                 switch (act_ptr->index) {
1761                 case ACT_BR_FIRE:
1762                         o_ptr->timeout = ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES)) ? 200 : 250;
1763                         break;
1764                 case ACT_BR_COLD:
1765                         o_ptr->timeout = ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE)) ? 200 : 250;
1766                         break;
1767                 case ACT_TERROR:
1768                         o_ptr->timeout = 3 * (p_ptr->lev + 10);
1769                         break;
1770                 case ACT_MURAMASA:
1771                         /* Nothing to do */
1772                         break;
1773                 default:
1774                         msg_format("Special timeout is not implemented: %d.", act_ptr->index);
1775                         return FALSE;
1776                 }
1777         }
1778
1779         return TRUE;
1780 }
1781