3 * @brief プレイヤーの発動コマンド実装
10 #include "cmd-activate.h"
11 #include "cmd-basic.h"
13 #include "object-hook.h"
18 #include "spells-summon.h"
19 #include "spells-status.h"
20 #include "spells-object.h"
21 #include "spells-floor.h"
22 #include "realm-hex.h"
23 #include "player-status.h"
24 #include "monster-status.h"
28 * @brief アイテムの発動効果テーブル /
29 * Define flags, levels, values of activations
31 const activation_type activation_info[] =
33 { "SUNLIGHT", ACT_SUNLIGHT, 10, 250, {10, 0},
34 _("太陽光線", "beam of sunlight") },
35 { "BO_MISS_1", ACT_BO_MISS_1, 10, 250, {2, 0},
36 _("マジック・ミサイル(2d6)", "magic missile (2d6)") },
37 { "BA_POIS_1", ACT_BA_POIS_1, 10, 300, {4, 0},
38 _("悪臭雲(12)", "stinking cloud (12)") },
39 { "BO_ELEC_1", ACT_BO_ELEC_1, 20, 250, {5, 0},
40 _("サンダー・ボルト(4d8)", "lightning bolt (4d8)") },
41 { "BO_ACID_1", ACT_BO_ACID_1, 20, 250, {6, 0},
42 _("アシッド・ボルト(5d8)", "acid bolt (5d8)") },
43 { "BO_COLD_1", ACT_BO_COLD_1, 20, 250, {7, 0},
44 _("アイス・ボルト(6d8)", "frost bolt (6d8)") },
45 { "BO_FIRE_1", ACT_BO_FIRE_1, 20, 250, {8, 0},
46 _("ファイア・ボルト(9d8)", "fire bolt (9d8)") },
47 { "BA_COLD_1", ACT_BA_COLD_1, 30, 750, {6, 0},
48 _("アイス・ボール(48)", "ball of cold (48)") },
49 { "BA_COLD_2", ACT_BA_COLD_2, 40, 1000, {12, 0},
50 _("アイス・ボール(100)", "ball of cold (100)") },
51 { "BA_COLD_3", ACT_BA_COLD_3, 70, 2500, {50, 0},
52 _("巨大アイス・ボール(400)", "ball of cold (400)") },
53 { "BA_FIRE_1", ACT_BA_FIRE_1, 30, 1000, {9, 0},
54 _("ファイア・ボール(72)", "ball of fire (72)") },
55 { "BA_FIRE_2", ACT_BA_FIRE_2, 40, 1500, {15, 0},
56 _("巨大ファイア・ボール(120)", "large fire ball (120)") },
57 { "BA_FIRE_3", ACT_BA_FIRE_3, 60, 1750, {40, 0},
58 _("巨大ファイア・ボール(300)", "fire ball (300)") },
59 { "BA_FIRE_4", ACT_BA_FIRE_4, 40, 1000, {12, 0},
60 _("ファイア・ボール(100)", "fire ball (100)") },
61 { "BA_ELEC_2", ACT_BA_ELEC_2, 40, 1000, {12, 0},
62 _("サンダー・ボール(100)", "ball of lightning (100)") },
63 { "BA_ELEC_3", ACT_BA_ELEC_3, 70, 2500, {70, 0},
64 _("巨大サンダー・ボール(500)", "ball of lightning (500)") },
65 { "BA_ACID_1", ACT_BA_ACID_1, 30, 1000, {12, 0},
66 _("アシッド・ボール(100)", "ball of acid (100)") },
67 { "BA_NUKE_1", ACT_BA_NUKE_1, 50, 1000, {12, 0},
68 _("放射能球(100)", "ball of nuke (100)") },
69 { "HYPODYNAMIA_1", ACT_HYPODYNAMIA_1, 30, 500, {12, 0},
70 _("窒息攻撃(100)", "a strangling attack (100)") },
71 { "HYPODYNAMIA_2", ACT_HYPODYNAMIA_2, 40, 750, {15, 0},
72 _("衰弱の矢(120)", "hypodynamic bolt (120)") },
73 { "DRAIN_1", ACT_DRAIN_1, 40, 1000, {20, 0},
74 _("吸収の矢(3*50)", "drain bolt (3*50)") },
75 { "BO_MISS_2", ACT_BO_MISS_2, 40, 1000, {20, 0},
76 _("矢(150)", "arrows (150)") },
77 { "WHIRLWIND", ACT_WHIRLWIND, 50, 7500, {25, 0},
78 _("カマイタチ", "whirlwind attack") },
79 { "DRAIN_2", ACT_DRAIN_2, 50, 2500, {40, 0},
80 _("吸収の矢(3*100)", "drain bolt (3*100)") },
81 { "CALL_CHAOS", ACT_CALL_CHAOS, 70, 5000, {35, 0},
82 _("混沌召来", "call chaos") },
83 { "ROCKET", ACT_ROCKET, 70, 5000, {20, 0},
84 _("ロケット(120+レベル)", "launch rocket (120+level)") },
85 { "DISP_EVIL", ACT_DISP_EVIL, 50, 4000, {50, 0},
86 _("邪悪退散(x5)", "dispel evil (x5)") },
87 { "BA_MISS_3", ACT_BA_MISS_3, 50, 1500, {50, 0},
88 _("エレメントのブレス(300)", "elemental breath (300)") },
89 { "DISP_GOOD", ACT_DISP_GOOD, 50, 3500, {50, 0},
90 _("善良退散(x5)", "dispel good (x5)") },
91 { "BO_MANA", ACT_BO_MANA, 40, 1500, {20, 0},
92 _("魔法の矢(150)", "a magical arrow (150)") },
93 { "BA_WATER", ACT_BA_WATER, 50, 2000, {25, 0},
94 _("ウォーター・ボール(200)", "water ball (200)") },
95 { "BA_STAR", ACT_BA_STAR, 50, 2200, {25, 0},
96 _("巨大スター・ボール(200)", "large star ball (200)") },
97 { "BA_DARK", ACT_BA_DARK, 50, 2200, {30, 0},
98 _("暗黒の嵐(250)", "darkness storm (250)") },
99 { "BA_MANA", ACT_BA_MANA, 70, 2500, {30, 0},
100 _("魔力の嵐(250)", "a mana storm (250)") },
101 { "PESTICIDE", ACT_PESTICIDE, 10, 500, {10, 0},
102 _("害虫の駆除", "dispel small life") },
103 { "BLINDING_LIGHT", ACT_BLINDING_LIGHT, 30, 5000, {40, 0},
104 _("眩しい光", "blinding light") },
105 { "BIZARRE", ACT_BIZARRE, 90, 10000, {50, 0},
106 _("信じ難いこと", "bizarre things") },
107 { "CAST_BA_STAR", ACT_CAST_BA_STAR, 70, 7500, {100, 0},
108 _("スター・ボール・ダスト(150)", "cast star balls (150)") },
109 { "BLADETURNER", ACT_BLADETURNER, 80, 20000, {80, 0},
110 _("エレメントのブレス(300), 士気高揚、祝福、耐性", "breathe elements (300), hero, bless, and resistance") },
111 { "BR_FIRE", ACT_BR_FIRE, 50, 5000, {-1, 0},
112 _("火炎のブレス (200)", "fire breath (200)") },
113 { "BR_COLD", ACT_BR_COLD, 50, 5000, {-1, 0},
114 _("冷気のブレス (200)", "cold breath (200)") },
115 { "BR_DRAGON", ACT_BR_DRAGON, 70, 10000, { 30, 0 },
116 "" /* built by item_activation_dragon_breath() */ },
118 { "CONFUSE", ACT_CONFUSE, 10, 500, {10, 0},
119 _("パニック・モンスター", "confuse monster") },
120 { "SLEEP", ACT_SLEEP, 10, 750, {15, 0},
121 _("周囲のモンスターを眠らせる", "sleep nearby monsters") },
122 { "QUAKE", ACT_QUAKE, 30, 600, {20, 0},
123 _("地震", "earthquake") },
124 { "TERROR", ACT_TERROR, 20, 2500, {-1, 0},
126 { "TELE_AWAY", ACT_TELE_AWAY, 20, 2000, {15, 0},
127 _("テレポート・アウェイ", "teleport away") },
128 { "BANISH_EVIL", ACT_BANISH_EVIL, 40, 2000, {250, 0},
129 _("邪悪消滅", "banish evil") },
130 { "GENOCIDE", ACT_GENOCIDE, 50, 10000, {500, 0},
131 _("抹殺", "genocide") },
132 { "MASS_GENO", ACT_MASS_GENO, 50, 10000, {1000, 0},
133 _("周辺抹殺", "mass genocide") },
134 { "SCARE_AREA", ACT_SCARE_AREA, 20, 2500, {20, 0},
135 _("モンスター恐慌", "frighten monsters") },
136 { "AGGRAVATE", ACT_AGGRAVATE, 0, 100, {0, 0},
137 _("モンスターを怒らせる", "aggravete monsters") },
139 { "CHARM_ANIMAL", ACT_CHARM_ANIMAL, 40, 7500, {200, 0},
140 _("動物魅了", "charm animal") },
141 { "CHARM_UNDEAD", ACT_CHARM_UNDEAD, 40, 10000, {333, 0},
142 _("アンデッド従属", "enslave undead") },
143 { "CHARM_OTHER", ACT_CHARM_OTHER, 40, 10000, {400, 0},
144 _("モンスター魅了", "charm monster") },
145 { "CHARM_ANIMALS", ACT_CHARM_ANIMALS, 40, 12500, {500, 0},
146 _("動物友和", "animal friendship") },
147 { "CHARM_OTHERS", ACT_CHARM_OTHERS, 40, 17500, {750, 0},
148 _("周辺魅了", "mass charm") },
149 { "SUMMON_ANIMAL", ACT_SUMMON_ANIMAL, 50, 10000, {200, 300},
150 _("動物召喚", "summon animal") },
151 { "SUMMON_PHANTOM", ACT_SUMMON_PHANTOM, 50, 12000, {200, 200},
152 _("幻霊召喚", "summon phantasmal servant") },
153 { "SUMMON_ELEMENTAL", ACT_SUMMON_ELEMENTAL, 50, 15000, {750, 0},
154 _("エレメンタル召喚", "summon elemental") },
155 { "SUMMON_DEMON", ACT_SUMMON_DEMON, 50, 20000, {666, 0},
156 _("悪魔召喚", "summon demon") },
157 { "SUMMON_UNDEAD", ACT_SUMMON_UNDEAD, 50, 20000, {666, 0},
158 _("アンデッド召喚", "summon undead") },
159 { "SUMMON_HOUND", ACT_SUMMON_HOUND, 50, 15000, {300, 0},
160 _("ハウンド召喚", "summon hound") },
161 { "SUMMON_DAWN", ACT_SUMMON_DAWN, 50, 15000, {500, 0},
162 _("暁の師団召喚", "summon the Legion of the Dawn") },
163 { "SUMMON_OCTOPUS", ACT_SUMMON_OCTOPUS, 50, 15000, {300, 0},
164 _("蛸の大群召喚", "summon octopus") },
166 { "CHOIR_SINGS", ACT_CHOIR_SINGS, 60, 20000, {300, 0},
167 _("回復(777)、癒し、士気高揚", "heal 777 hit points, curing and HEROism") },
168 { "CURE_LW", ACT_CURE_LW, 10, 500, {10, 0},
169 _("恐怖除去/体力回復(30)", "remove fear and heal 30 hp") },
170 { "CURE_MW", ACT_CURE_MW, 20, 750, {3, 3},
171 _("傷回復(4d8)", "heal 4d8 and wounds") },
172 { "CURE_POISON", ACT_CURE_POISON, 10, 1000, {5, 0},
173 _("恐怖除去/毒消し", "remove fear and cure poison") },
174 { "REST_LIFE", ACT_REST_EXP, 40, 7500, {450, 0},
175 _("経験値復活", "restore experience") },
176 { "REST_ALL", ACT_REST_ALL, 30, 15000, {750, 0},
177 _("全ステータスと経験値復活", "restore stats and experience") },
178 { "CURE_700", ACT_CURE_700, 40, 10000, {250, 0},
179 _("体力回復(700)", "heal 700 hit points") },
180 { "CURE_1000", ACT_CURE_1000, 50, 15000, {888, 0},
181 _("体力回復(1000)", "heal 1000 hit points") },
182 { "CURING", ACT_CURING, 30, 5000, {100, 0},
184 { "CURE_MANA_FULL", ACT_CURE_MANA_FULL, 60, 20000, {777, 0},
185 _("魔力復活", "restore mana") },
187 { "ESP", ACT_ESP, 30, 1500, {100, 0},
188 _("テレパシー(期間 25+d30)", "telepathy (dur 25+d30)") },
189 { "BERSERK", ACT_BERSERK, 10, 800, {75, 0},
190 _("狂戦士化(25+d25ターン)", "berserk (25+d25 turns)") },
191 { "PROT_EVIL", ACT_PROT_EVIL, 30, 5000, {100, 0},
192 _("対邪悪結界(期間 3*レベル+d25)", "protect evil (dur level*3 + d25)") },
193 { "RESIST_ALL", ACT_RESIST_ALL, 30, 5000, {111, 0},
194 _("全耐性(期間 20+d20)", "resist elements (dur 20+d20)") },
195 { "SPEED", ACT_SPEED, 40, 15000, {250, 0},
196 _("加速(期間 20+d20)", "speed (dur 20+d20)") },
197 { "XTRA_SPEED", ACT_XTRA_SPEED, 40, 25000, {200, 200},
198 _("加速(期間 75+d75)", "speed (dur 75+d75)") },
199 { "WRAITH", ACT_WRAITH, 90, 25000, {1000, 0},
200 _("幽体化(期間 (レベル/2)+d(レベル/2))", "wraith form (dur level/2 + d(level/2))") },
201 { "INVULN", ACT_INVULN, 90, 25000, {1000, 0},
202 _("無敵化(期間 8+d8)", "invulnerability (dur 8+d8)") },
203 { "HERO", ACT_HERO, 10, 500, {30, 30},
204 _("士気高揚", "heroism") },
205 { "HERO_SPEED", ACT_HERO_SPEED, 30, 20000, {100, 200},
206 _("士気高揚, スピード(期間 50+d50ターン)", "hero and +10 to speed (50)") },
207 { "RESIST_ACID", ACT_RESIST_ACID, 20, 2000, {40, 40},
208 _("酸への耐性(期間 20+d20)", "resist acid (dur 20+d20)") },
209 { "RESIST_FIRE", ACT_RESIST_FIRE, 20, 2000, {40, 40},
210 _("火炎への耐性(期間 20+d20)", "resist fire (dur 20+d20)") },
211 { "RESIST_COLD", ACT_RESIST_COLD, 20, 2000, {40, 40},
212 _("冷気への耐性(期間 20+d20)", "resist cold (dur 20+d20)") },
213 { "RESIST_ELEC", ACT_RESIST_ELEC, 20, 2000, {40, 40},
214 _("電撃への耐性(期間 20+d20)", "resist elec (dur 20+d20)") },
215 { "RESIST_POIS", ACT_RESIST_POIS, 20, 2000, {40, 40},
216 _("毒への耐性(期間 20+d20)", "resist poison (dur 20+d20)") },
218 { "LIGHT", ACT_LIGHT, 10, 150, {10, 10},
219 _("イルミネーション", "light area (dam 2d15)") },
220 { "MAP_LIGHT", ACT_MAP_LIGHT, 30, 500, {50, 50},
221 _("魔法の地図と光", "light (dam 2d15) & map area") },
222 { "DETECT_ALL", ACT_DETECT_ALL, 30, 1000, {55, 55},
223 _("全感知", "detection") },
224 { "DETECT_XTRA", ACT_DETECT_XTRA, 50, 12500, {100, 0},
225 _("全感知、探索、*鑑定*", "detection, probing and identify true") },
226 { "ID_FULL", ACT_ID_FULL, 50, 10000, {75, 0},
227 _("*鑑定*", "identify true") },
228 { "ID_PLAIN", ACT_ID_PLAIN, 20, 1250, {10, 0},
229 _("鑑定", "identify spell") },
230 { "RUNE_EXPLO", ACT_RUNE_EXPLO, 40, 4000, {200, 0},
231 _("爆発のルーン", "explosive rune") },
232 { "RUNE_PROT", ACT_RUNE_PROT, 60, 10000, {400, 0},
233 _("守りのルーン", "rune of protection") },
234 { "SATIATE", ACT_SATIATE, 10, 2000, {200, 0},
235 _("空腹充足", "satisfy hunger") },
236 { "DEST_DOOR", ACT_DEST_DOOR, 10, 100, {10, 0},
237 _("ドア破壊", "destroy doors") },
238 { "STONE_MUD", ACT_STONE_MUD, 20, 1000, {3, 0},
239 _("岩石溶解", "stone to mud") },
240 { "RECHARGE", ACT_RECHARGE, 30, 1000, {70, 0},
241 _("魔力充填", "recharging") },
242 { "ALCHEMY", ACT_ALCHEMY, 50, 10000, {500, 0},
243 _("錬金術", "alchemy") },
244 { "DIM_DOOR", ACT_DIM_DOOR, 50, 10000, {100, 0},
245 _("次元の扉", "dimension door") },
246 { "TELEPORT", ACT_TELEPORT, 10, 2000, {25, 0},
247 _("テレポート", "teleport") },
248 { "RECALL", ACT_RECALL, 30, 7500, {200, 0},
249 _("帰還の詔", "word of recall") },
250 { "JUDGE", ACT_JUDGE, 90, 50000, {20, 20},
251 _("体力と引き替えに千里眼と帰還", "a telekinesis (500 lb)") },
252 { "TELEKINESIS", ACT_TELEKINESIS, 20, 5500, {25, 25},
253 _("物体を引き寄せる(重量25kgまで)", "clairvoyance and recall, draining you") },
254 { "DETECT_UNIQUE", ACT_DETECT_UNIQUE, 40, 10000, {200, 0},
255 _("この階にいるユニークモンスターを表示", "list of the uniques on the level") },
256 { "ESCAPE", ACT_ESCAPE, 10, 3000, {35, 0},
257 _("逃走", "a getaway") },
258 { "DISP_CURSE_XTRA", ACT_DISP_CURSE_XTRA, 40, 30000, {0, 0},
259 _("*解呪*と調査", "dispel curse and probing") },
260 { "BRAND_FIRE_BOLTS", ACT_BRAND_FIRE_BOLTS, 40, 20000, {999, 0},
261 _("刃先のファイア・ボルト", "fire branding of bolts") },
262 { "RECHARGE_XTRA", ACT_RECHARGE_XTRA, 70, 30000, {200, 0},
263 _("魔力充填", "recharge item") },
264 { "LORE", ACT_LORE, 10, 30000, {0, 0},
265 _("危険を伴う鑑定", "perilous identify") },
266 { "SHIKOFUMI", ACT_SHIKOFUMI, 10, 10000, {100, 100},
267 _("四股踏み", "shiko") },
268 { "PHASE_DOOR", ACT_PHASE_DOOR, 10, 1500, {10, 0},
269 _("ショート・テレポート", "blink") },
270 { "DETECT_ALL_MONS", ACT_DETECT_ALL_MONS, 30, 3000, {150, 0},
271 _("全モンスター感知", "detect all monsters") },
272 { "ULTIMATE_RESIST", ACT_ULTIMATE_RESIST, 90, 20000, {777, 0},
273 _("士気高揚、祝福、究極の耐性", "hero, bless, and ultimate resistance") },
275 { "CAST_OFF", ACT_CAST_OFF, 30, 15000, {100, 0},
276 _("脱衣と小宇宙燃焼", "cast it off and cosmic heroism") },
277 { "FISHING", ACT_FISHING, 0, 100, {0, 0},
278 _("釣りをする", "fishing") },
279 { "INROU", ACT_INROU, 40, 15000, {150, 150},
280 _("例のアレ", "reveal your identity") },
281 { "MURAMASA", ACT_MURAMASA, 0, 0, {-1, 0},
282 _("腕力の上昇", "increase STR") },
283 { "BLOODY_MOON", ACT_BLOODY_MOON, 0, 0, {3333, 0},
284 _("属性変更", "change zokusei") },
285 { "CRIMSON", ACT_CRIMSON, 0, 50000, {15, 0},
286 _("ファイア!", "fire!") },
288 { "STRAIN_HASTE", ACT_STRAIN_HASTE, 10, 1000, {120, 100},
289 _("体力と引き換えに加速", "haste with strain") },
290 { "GRAND_CROSS", ACT_GRAND_CROSS, 30, 15000, {250, 200},
291 _("グランド・クロス", "grand cross") },
292 { "TELEPORT_LEVEL", ACT_TELEPORT_LEVEL, 10, 1500, {100, 200},
293 _("テレポート・レベル", "teleort level") },
294 { "ARTS_FALLING_STAR", ACT_FALLING_STAR, 20, 5500, {30, 50},
295 _("魔剣・流れ星", "blade arts 'falling star'") },
296 { NULL, 0, 0, 0, {0, 0},
301 * @brief 装備を発動するコマンドのサブルーチン /
302 * Activate a wielded object. Wielded objects never stack.
303 * And even if they did, activatable objects never stack.
304 * @param item 発動するオブジェクトの所持品ID
308 * Currently, only (some) artifacts, and Dragon Scale Mail, can be activated.
309 * But one could, for example, easily make an activatable "Ring of Plasma".
310 * Note that it always takes a current_world_ptr->game_turn to activate an artifact, even if
311 * the user hits "escape" at the "direction" prompt.
314 void do_cmd_activate_aux(INVENTORY_IDX item)
323 /* Get the item (in the pack) */
326 o_ptr = &inventory[item];
329 /* Get the item (on the floor) */
332 o_ptr = ¤t_floor_ptr->o_list[0 - item];
335 take_turn(p_ptr, 100);
337 /* Extract the item level */
338 lev = k_info[o_ptr->k_idx].level;
340 /* Hack -- use artifact level instead */
341 if (object_is_fixed_artifact(o_ptr)) lev = a_info[o_ptr->name1].level;
342 else if (object_is_random_artifact(o_ptr))
344 const activation_type* const act_ptr = find_activation_info(o_ptr);
346 lev = act_ptr->level;
349 else if (((o_ptr->tval == TV_RING) || (o_ptr->tval == TV_AMULET)) && o_ptr->name2) lev = e_info[o_ptr->name2].level;
351 /* Base chance of success */
352 chance = p_ptr->skill_dev;
354 /* Confusion hurts skill */
355 if (p_ptr->confused) chance = chance / 2;
358 if (chance > fail) fail -= (chance - fail)*2;
359 else chance -= (fail - chance)*2;
360 if (fail < USE_DEVICE) fail = USE_DEVICE;
361 if (chance < USE_DEVICE) chance = USE_DEVICE;
363 if(cmd_limit_time_walk(p_ptr)) return;
365 if (p_ptr->pclass == CLASS_BERSERKER) success = FALSE;
366 else if (chance > fail)
368 if (randint0(chance*2) < fail) success = FALSE;
373 if (randint0(fail*2) < chance) success = TRUE;
374 else success = FALSE;
380 if (flush_failure) flush();
381 msg_print(_("うまく始動させることができなかった。", "You failed to activate it properly."));
386 /* Check the recharge */
389 msg_print(_("それは微かに音を立て、輝き、消えた...", "It whines, glows and fades..."));
393 /* Some lights need enough fuel for activation */
394 if (!o_ptr->xtra4 && (o_ptr->tval == TV_FLASK) &&
395 ((o_ptr->sval == SV_LITE_TORCH) || (o_ptr->sval == SV_LITE_LANTERN)))
397 msg_print(_("燃料がない。", "It has no fuel."));
402 /* Activate the artifact */
403 msg_print(_("始動させた...", "You activate it..."));
407 /* Activate object */
408 if (activation_index(o_ptr))
410 (void)activate_artifact(o_ptr);
412 p_ptr->window |= (PW_INVEN | PW_EQUIP);
419 else if (o_ptr->tval == TV_WHISTLE)
421 if (music_singing_any()) stop_singing(p_ptr);
422 if (hex_spelling_any()) stop_hex_spell_all();
425 MONSTER_IDX pet_ctr, i;
430 /* Allocate the "who" array */
431 C_MAKE(who, current_floor_ptr->max_m_idx, MONSTER_IDX);
433 /* Process the monsters (backwards) */
434 for (pet_ctr = m_max - 1; pet_ctr >= 1; pet_ctr--)
436 if (is_pet(¤t_floor_ptr->m_list[pet_ctr]) && (p_ptr->riding != pet_ctr))
437 who[max_pet++] = pet_ctr;
440 ang_sort(who, &dummy_why, max_pet, ang_sort_comp_pet, ang_sort_swap_hook);
442 /* Process the monsters (backwards) */
443 for (i = 0; i < max_pet; i++)
446 teleport_monster_to(pet_ctr, p_ptr->y, p_ptr->x, 100, TELEPORT_PASSIVE);
449 /* Free the "who" array */
450 C_KILL(who, current_floor_ptr->max_m_idx, IDX);
452 o_ptr->timeout = 100 + randint1(100);
455 else if (o_ptr->tval == TV_CAPTURE)
459 bool old_target_pet = target_pet;
461 if (!get_aim_dir(&dir))
463 target_pet = old_target_pet;
466 target_pet = old_target_pet;
468 if(fire_ball(GF_CAPTURE, dir, 0, 0))
470 o_ptr->pval = (PARAMETER_VALUE)cap_mon;
471 o_ptr->xtra3 = (XTRA8)cap_mspeed;
472 o_ptr->xtra4 = (XTRA16)cap_hp;
473 o_ptr->xtra5 = (XTRA16)cap_maxhp;
480 if (o_ptr->inscription)
481 strcpy(buf, quark_str(o_ptr->inscription));
483 for (s = buf;*s && (*s != '#'); s++)
486 if (iskanji(*s)) s++;
496 t = quark_str(cap_nickname);
509 o_ptr->inscription = quark_add(buf);
516 if (!get_direction(&dir, FALSE, FALSE)) return;
517 if (monster_can_enter(p_ptr->y + ddy[dir], p_ptr->x + ddx[dir], &r_info[o_ptr->pval], 0))
519 if (place_monster_aux(0, p_ptr->y + ddy[dir], p_ptr->x + ddx[dir], o_ptr->pval, (PM_FORCE_PET | PM_NO_KAGE)))
521 if (o_ptr->xtra3) current_floor_ptr->m_list[hack_m_idx_ii].mspeed = o_ptr->xtra3;
522 if (o_ptr->xtra5) current_floor_ptr->m_list[hack_m_idx_ii].max_maxhp = o_ptr->xtra5;
523 if (o_ptr->xtra4) current_floor_ptr->m_list[hack_m_idx_ii].hp = o_ptr->xtra4;
524 current_floor_ptr->m_list[hack_m_idx_ii].maxhp = current_floor_ptr->m_list[hack_m_idx_ii].max_maxhp;
525 if (o_ptr->inscription)
533 t = quark_str(o_ptr->inscription);
534 for (t = quark_str(o_ptr->inscription);*t && (*t != '#'); t++)
537 if (iskanji(*t)) t++;
562 if (quote && *(s-1) =='\'')
566 current_floor_ptr->m_list[hack_m_idx_ii].nickname = quark_add(buf);
567 t = quark_str(o_ptr->inscription);
569 while(*t && (*t != '#'))
576 o_ptr->inscription = quark_add(buf);
587 msg_print(_("おっと、解放に失敗した。", "Oops. You failed to release your pet."));
594 msg_print(_("おっと、このアイテムは始動できない。", "Oops. That object cannot be activated."));
598 * @brief 装備を発動するコマンドのメインルーチン /
601 void do_cmd_activate(void)
606 if (p_ptr->wild_mode) return;
607 if (cmd_limit_arena(p_ptr)) return;
609 if (p_ptr->special_defense & (KATA_MUSOU | KATA_KOUKIJIN))
611 set_action(ACTION_NONE);
614 item_tester_hook = item_tester_hook_activate;
616 q = _("どのアイテムを始動させますか? ", "Activate which item? ");
617 s = _("始動できるアイテムを装備していない。", "You have nothing to activate.");
619 if (!choose_object(&item, q, s, (USE_EQUIP | IGNORE_BOTHHAND_SLOT))) return;
621 /* Activate the item */
622 do_cmd_activate_aux(item);
626 * @brief 発動によるブレスの属性をアイテムの耐性から選択し、実行を処理する。/ Dragon breath activation
627 * @details 対象となる耐性は dragonbreath_info テーブルを参照のこと。
628 * @param o_ptr 対象のオブジェクト構造体ポインタ
629 * @return 発動実行の是非を返す。
631 static bool activate_dragon_breath(object_type *o_ptr)
633 BIT_FLAGS flgs[TR_FLAG_SIZE]; /* for resistance flags */
639 if (!get_aim_dir(&dir)) return FALSE;
641 object_flags(o_ptr, flgs);
643 for (i = 0; dragonbreath_info[i].flag != 0; i++)
645 if (have_flag(flgs, dragonbreath_info[i].flag))
647 type[n] = dragonbreath_info[i].type;
648 name[n] = dragonbreath_info[i].name;
652 if (n == 0) return FALSE;
655 if (music_singing_any()) stop_singing(p_ptr);
656 if (hex_spelling_any()) stop_hex_spell_all();
659 msg_format(_("あなたは%sのブレスを吐いた。", "You breathe %s."), name[t]);
660 fire_breath(type[t], dir, 250, 4);
666 * @brief アイテムの発動効果を処理する。
667 * @param o_ptr 対象のオブジェクト構造体ポインタ
668 * @return 発動実行の是非を返す。
670 bool activate_artifact(object_type *o_ptr)
672 PLAYER_LEVEL plev = p_ptr->lev;
675 concptr name = k_name + k_info[o_ptr->k_idx].name;
676 const activation_type* const act_ptr = find_activation_info(o_ptr);
678 /* Maybe forgot adding information to activation_info table ? */
679 msg_print("Activation information is not found.");
683 /* Activate for attack */
684 switch (act_ptr->index)
688 if (!get_aim_dir(&dir)) return FALSE;
689 msg_print(_("太陽光線が放たれた。", "A line of sunlight appears."));
690 (void)lite_line(dir, damroll(6, 8));
696 msg_print(_("それは眩しいくらいに明るく輝いている...", "It glows extremely brightly..."));
697 if (!get_aim_dir(&dir)) return FALSE;
698 fire_bolt(GF_MISSILE, dir, damroll(2, 6));
704 msg_print(_("それは濃緑色に脈動している...", "It throbs deep green..."));
705 if (!get_aim_dir(&dir)) return FALSE;
706 fire_ball(GF_POIS, dir, 12, 3);
712 msg_print(_("それは火花に覆われた...", "It is covered in sparks..."));
713 if (!get_aim_dir(&dir)) return FALSE;
714 fire_bolt(GF_ELEC, dir, damroll(4, 8));
720 msg_print(_("それは酸に覆われた...", "It is covered in acid..."));
721 if (!get_aim_dir(&dir)) return FALSE;
722 fire_bolt(GF_ACID, dir, damroll(5, 8));
728 msg_print(_("それは霜に覆われた...", "It is covered in frost..."));
729 if (!get_aim_dir(&dir)) return FALSE;
730 fire_bolt(GF_COLD, dir, damroll(6, 8));
736 msg_print(_("それは炎に覆われた...", "It is covered in fire..."));
737 if (!get_aim_dir(&dir)) return FALSE;
738 fire_bolt(GF_FIRE, dir, damroll(9, 8));
744 msg_print(_("それは霜に覆われた...", "It is covered in frost..."));
745 if (!get_aim_dir(&dir)) return FALSE;
746 fire_ball(GF_COLD, dir, 48, 2);
752 msg_print(_("それは青く激しく輝いた...", "It glows an intense blue..."));
753 if (!get_aim_dir(&dir)) return FALSE;
754 fire_ball(GF_COLD, dir, 100, 2);
760 msg_print(_("明るく白色に輝いている...", "It glows bright white..."));
761 if (!get_aim_dir(&dir)) return FALSE;
762 fire_ball(GF_COLD, dir, 400, 3);
768 msg_print(_("それは赤く激しく輝いた...", "It glows an intense red..."));
769 if (!get_aim_dir(&dir)) return FALSE;
770 fire_ball(GF_FIRE, dir, 72, 2);
776 msg_format(_("%sから炎が吹き出した...", "The %s rages in fire..."), name);
777 if (!get_aim_dir(&dir)) return FALSE;
778 fire_ball(GF_FIRE, dir, 120, 3);
784 msg_print(_("深赤色に輝いている...", "It glows deep red..."));
785 if (!get_aim_dir(&dir)) return FALSE;
786 fire_ball(GF_FIRE, dir, 300, 3);
792 msg_print(_("それは赤く激しく輝いた...", "It glows an intense red..."));
793 if (!get_aim_dir(&dir)) return FALSE;
794 fire_ball(GF_FIRE, dir, 100, 2);
800 msg_print(_("電気がパチパチ音を立てた...", "It crackles with electricity..."));
801 if (!get_aim_dir(&dir)) return FALSE;
802 fire_ball(GF_ELEC, dir, 100, 3);
808 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
809 if (!get_aim_dir(&dir)) return FALSE;
810 fire_ball(GF_ELEC, dir, 500, 3);
816 msg_print(_("それは黒く激しく輝いた...", "It glows an intense black..."));
817 if (!get_aim_dir(&dir)) return FALSE;
818 fire_ball(GF_ACID, dir, 100, 2);
824 msg_print(_("それは緑に激しく輝いた...", "It glows an intense green..."));
825 if (!get_aim_dir(&dir)) return FALSE;
826 fire_ball(GF_NUKE, dir, 100, 2);
830 case ACT_HYPODYNAMIA_1:
832 msg_format(_("あなたは%sに敵を締め殺すよう命じた。", "You order the %s to strangle your opponent."), name);
833 if (!get_aim_dir(&dir)) return FALSE;
834 if (hypodynamic_bolt(dir, 100))
838 case ACT_HYPODYNAMIA_2:
840 msg_print(_("黒く輝いている...", "It glows black..."));
841 if (!get_aim_dir(&dir)) return FALSE;
842 hypodynamic_bolt(dir, 120);
848 if (!get_aim_dir(&dir)) return FALSE;
849 for (dummy = 0; dummy < 3; dummy++)
851 if (hypodynamic_bolt(dir, 50))
859 msg_print(_("魔法のトゲが現れた...", "It grows magical spikes..."));
860 if (!get_aim_dir(&dir)) return FALSE;
861 fire_bolt(GF_ARROW, dir, 150);
873 if (!get_aim_dir(&dir)) return FALSE;
874 for (dummy = 0; dummy < 3; dummy++)
876 if (hypodynamic_bolt(dir, 100))
885 msg_print(_("様々な色の火花を発している...", "It glows in scintillating colours..."));
892 if (!get_aim_dir(&dir)) return FALSE;
893 msg_print(_("ロケットを発射した!", "You launch a rocket!"));
894 fire_ball(GF_ROCKET, dir, 250 + plev * 3, 2);
900 msg_print(_("神聖な雰囲気が充満した...", "It floods the area with goodness..."));
901 dispel_evil(p_ptr->lev * 5);
907 if (!get_aim_dir(&dir)) return FALSE;
908 msg_print(_("あなたはエレメントのブレスを吐いた。", "You breathe the elements."));
909 fire_breath(GF_MISSILE, dir, 300, 4);
915 msg_print(_("邪悪な雰囲気が充満した...", "It floods the area with evil..."));
916 dispel_good(p_ptr->lev * 5);
922 msg_format(_("%sに魔法のトゲが現れた...", "The %s grows magical spikes..."), name);
923 if (!get_aim_dir(&dir)) return FALSE;
924 fire_bolt(GF_ARROW, dir, 150);
930 msg_format(_("%sが深い青色に鼓動している...", "The %s throbs deep blue..."), name);
931 if (!get_aim_dir(&dir)) return FALSE;
932 fire_ball(GF_WATER, dir, 200, 3);
938 msg_format(_("%sが深い闇に覆われた...", "The %s is coverd in pitch-darkness..."), name);
939 if (!get_aim_dir(&dir)) return FALSE;
940 fire_ball(GF_DARK, dir, 250, 4);
946 msg_format(_("%sが青白く光った...", "The %s glows pale..."), name);
947 if (!get_aim_dir(&dir)) return FALSE;
948 fire_ball(GF_MANA, dir, 250, 4);
954 msg_print(_("あなたは害虫を一掃した。", "You exterminate small life."));
955 (void)dispel_monsters(4);
959 case ACT_BLINDING_LIGHT:
961 msg_format(_("%sが眩しい光で輝いた...", "The %s gleams with blinding light..."), name);
962 fire_ball(GF_LITE, 0, 300, 6);
963 confuse_monsters(3 * p_ptr->lev / 2);
969 msg_format(_("%sは漆黒に輝いた...", "The %s glows intensely black..."), name);
970 if (!get_aim_dir(&dir)) return FALSE;
975 case ACT_CAST_BA_STAR:
977 HIT_POINT num = damroll(5, 3);
978 POSITION y = 0, x = 0;
980 msg_format(_("%sが稲妻で覆われた...", "The %s is surrounded by lightning..."), name);
981 for (k = 0; k < num; k++)
987 scatter(&y, &x, p_ptr->y, p_ptr->x, 4, 0);
988 if (!cave_have_flag_bold(y, x, FF_PROJECT)) continue;
989 if (!player_bold(y, x)) break;
992 project(0, 3, y, x, 150, GF_ELEC,
993 (PROJECT_THRU | PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
999 case ACT_BLADETURNER:
1001 if (!get_aim_dir(&dir)) return FALSE;
1002 msg_print(_("あなたはエレメントのブレスを吐いた。", "You breathe the elements."));
1003 fire_breath(GF_MISSILE, dir, 300, 4);
1004 msg_print(_("鎧が様々な色に輝いた...", "Your armor glows many colours..."));
1005 (void)set_afraid(0);
1006 (void)set_hero(randint1(50) + 50, FALSE);
1007 (void)hp_player(10);
1008 (void)set_blessed(randint1(50) + 50, FALSE);
1009 (void)set_oppose_acid(randint1(50) + 50, FALSE);
1010 (void)set_oppose_elec(randint1(50) + 50, FALSE);
1011 (void)set_oppose_fire(randint1(50) + 50, FALSE);
1012 (void)set_oppose_cold(randint1(50) + 50, FALSE);
1013 (void)set_oppose_pois(randint1(50) + 50, FALSE);
1019 if (!get_aim_dir(&dir)) return FALSE;
1020 fire_breath(GF_FIRE, dir, 200, 2);
1021 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
1023 (void)set_oppose_fire(randint1(20) + 20, FALSE);
1030 if (!get_aim_dir(&dir)) return FALSE;
1031 fire_breath(GF_COLD, dir, 200, 2);
1032 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
1034 (void)set_oppose_cold(randint1(20) + 20, FALSE);
1041 if (!activate_dragon_breath(o_ptr)) return FALSE;
1045 /* Activate for other offensive action */
1048 msg_print(_("様々な色の火花を発している...", "It glows in scintillating colours..."));
1049 if (!get_aim_dir(&dir)) return FALSE;
1050 confuse_monster(dir, 20);
1056 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
1057 sleep_monsters_touch();
1063 earthquake(p_ptr->y, p_ptr->x, 5);
1069 turn_monsters(40 + p_ptr->lev);
1075 if (!get_aim_dir(&dir)) return FALSE;
1076 (void)fire_beam(GF_AWAY_ALL, dir, plev);
1080 case ACT_BANISH_EVIL:
1082 if (banish_evil(100))
1084 msg_print(_("アーティファクトの力が邪悪を打ち払った!", "The power of the artifact banishes evil!"));
1091 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
1092 (void)symbol_genocide(200, TRUE);
1098 msg_print(_("ひどく鋭い音が流れ出た...", "It lets out a long, shrill note..."));
1099 (void)mass_genocide(200, TRUE);
1103 case ACT_SCARE_AREA:
1105 if (music_singing_any()) stop_singing(p_ptr);
1106 if (hex_spelling_any()) stop_hex_spell_all();
1107 msg_print(_("あなたは力強い突風を吹き鳴らした。周囲の敵が震え上っている!",
1108 "You wind a mighty blast; your enemies tremble!"));
1109 (void)turn_monsters((3 * p_ptr->lev / 2) + 10);
1115 if (o_ptr->name1 == ART_HYOUSIGI)
1117 msg_print(_("拍子木を打った。", "You beat Your wooden clappers."));
1121 msg_format(_("%sは不快な物音を立てた。", "The %s sounds an unpleasant noise."), name);
1123 aggravate_monsters(0);
1127 /* Activate for summoning / charming */
1129 case ACT_CHARM_ANIMAL:
1131 if (!get_aim_dir(&dir)) return FALSE;
1132 (void)charm_animal(dir, plev);
1136 case ACT_CHARM_UNDEAD:
1138 if (!get_aim_dir(&dir)) return FALSE;
1139 (void)control_one_undead(dir, plev);
1143 case ACT_CHARM_OTHER:
1145 if (!get_aim_dir(&dir)) return FALSE;
1146 (void)charm_monster(dir, plev * 2);
1150 case ACT_CHARM_ANIMALS:
1152 (void)charm_animals(plev * 2);
1156 case ACT_CHARM_OTHERS:
1158 charm_monsters(plev * 2);
1162 case ACT_SUMMON_ANIMAL:
1164 (void)summon_specific(-1, p_ptr->y, p_ptr->x, plev, SUMMON_ANIMAL_RANGER, (PM_ALLOW_GROUP | PM_FORCE_PET), '\0');
1168 case ACT_SUMMON_PHANTOM:
1170 msg_print(_("幻霊を召喚した。", "You summon a phantasmal servant."));
1171 (void)summon_specific(-1, p_ptr->y, p_ptr->x, current_floor_ptr->dun_level, SUMMON_PHANTOM, (PM_ALLOW_GROUP | PM_FORCE_PET), '\0');
1175 case ACT_SUMMON_ELEMENTAL:
1176 if (!cast_summon_elemental(p_ptr, (plev * 3) / 2)) return FALSE;
1179 case ACT_SUMMON_DEMON:
1181 cast_summon_demon((plev * 3) / 2);
1185 case ACT_SUMMON_UNDEAD:
1186 if (!cast_summon_undead(p_ptr, (plev * 3) / 2)) return FALSE;
1189 case ACT_SUMMON_HOUND:
1190 if (!cast_summon_hound(p_ptr, (plev * 3) / 2)) return FALSE;
1193 case ACT_SUMMON_DAWN:
1195 msg_print(_("暁の師団を召喚した。", "You summon the Legion of the Dawn."));
1196 (void)summon_specific(-1, p_ptr->y, p_ptr->x, current_floor_ptr->dun_level, SUMMON_DAWN, (PM_ALLOW_GROUP | PM_FORCE_PET), '\0');
1200 case ACT_SUMMON_OCTOPUS:
1201 if(!cast_summon_octopus(p_ptr)) return FALSE;
1204 /* Activate for healing */
1206 case ACT_CHOIR_SINGS:
1208 msg_print(_("天国の歌が聞こえる...", "A heavenly choir sings..."));
1209 (void)cure_critical_wounds(777);
1210 (void)set_hero(randint1(25) + 25, FALSE);
1216 (void)set_afraid(0);
1217 (void)hp_player(30);
1223 msg_print(_("深紫色の光を発している...", "It radiates deep purple..."));
1224 (void)cure_serious_wounds(4, 8);
1228 case ACT_CURE_POISON:
1230 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
1231 (void)set_afraid(0);
1232 (void)set_poisoned(0);
1238 msg_print(_("深紅に輝いている...", "It glows a deep red..."));
1245 msg_print(_("濃緑色に輝いている...", "It glows a deep green..."));
1246 (void)restore_all_status();
1247 (void)restore_level();
1253 msg_print(_("深青色に輝いている...", "It glows deep blue..."));
1254 msg_print(_("体内に暖かい鼓動が感じられる...", "You feel a warm tingling inside..."));
1255 (void)cure_critical_wounds(700);
1261 msg_print(_("白く明るく輝いている...", "It glows a bright white..."));
1262 msg_print(_("ひじょうに気分がよい...", "You feel much better..."));
1263 (void)cure_critical_wounds(1000);
1269 msg_format(_("%sの優しさに癒される...", "the %s cures you affectionately ..."), name);
1274 case ACT_CURE_MANA_FULL:
1276 msg_format(_("%sが青白く光った...", "The %s glows pale..."), name);
1281 /* Activate for timed effect */
1285 (void)set_tim_esp(randint1(30) + 25, FALSE);
1291 (void)berserk(randint1(25) + 25);
1297 msg_format(_("%sから鋭い音が流れ出た...", "The %s lets out a shrill wail..."), name);
1299 (void)set_protevil(randint1(25) + k, FALSE);
1303 case ACT_RESIST_ALL:
1305 msg_print(_("様々な色に輝いている...", "It glows many colours..."));
1306 (void)set_oppose_acid(randint1(40) + 40, FALSE);
1307 (void)set_oppose_elec(randint1(40) + 40, FALSE);
1308 (void)set_oppose_fire(randint1(40) + 40, FALSE);
1309 (void)set_oppose_cold(randint1(40) + 40, FALSE);
1310 (void)set_oppose_pois(randint1(40) + 40, FALSE);
1316 msg_print(_("明るく緑色に輝いている...", "It glows bright green..."));
1317 (void)set_fast(randint1(20) + 20, FALSE);
1321 case ACT_XTRA_SPEED:
1323 msg_print(_("明るく輝いている...", "It glows brightly..."));
1324 (void)set_fast(randint1(75) + 75, FALSE);
1330 set_wraith_form(randint1(plev / 2) + (plev / 2), FALSE);
1336 (void)set_invuln(randint1(8) + 8, FALSE);
1346 case ACT_HERO_SPEED:
1348 (void)set_fast(randint1(50) + 50, FALSE);
1353 case ACT_RESIST_ACID:
1355 msg_format(_("%sが黒く輝いた...", "The %s grows black."), name);
1356 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ACID))
1358 if (!get_aim_dir(&dir)) return FALSE;
1359 fire_ball(GF_ACID, dir, 100, 2);
1361 (void)set_oppose_acid(randint1(20) + 20, FALSE);
1365 case ACT_RESIST_FIRE:
1367 msg_format(_("%sが赤く輝いた...", "The %s grows red."), name);
1368 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES))
1370 if (!get_aim_dir(&dir)) return FALSE;
1371 fire_ball(GF_FIRE, dir, 100, 2);
1373 (void)set_oppose_fire(randint1(20) + 20, FALSE);
1377 case ACT_RESIST_COLD:
1379 msg_format(_("%sが白く輝いた...", "The %s grows white."), name);
1380 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE))
1382 if (!get_aim_dir(&dir)) return FALSE;
1383 fire_ball(GF_COLD, dir, 100, 2);
1385 (void)set_oppose_cold(randint1(20) + 20, FALSE);
1389 case ACT_RESIST_ELEC:
1391 msg_format(_("%sが青く輝いた...", "The %s grows blue."), name);
1392 if ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ELEC))
1394 if (!get_aim_dir(&dir)) return FALSE;
1395 fire_ball(GF_ELEC, dir, 100, 2);
1397 (void)set_oppose_elec(randint1(20) + 20, FALSE);
1401 case ACT_RESIST_POIS:
1403 msg_format(_("%sが緑に輝いた...", "The %s grows green."), name);
1404 (void)set_oppose_pois(randint1(20) + 20, FALSE);
1408 /* Activate for general purpose effect (detection etc.) */
1412 msg_format(_("%sから澄んだ光があふれ出た...", "The %s wells with clear light..."), name);
1413 lite_area(damroll(2, 15), 3);
1419 msg_print(_("眩しく輝いた...", "It shines brightly..."));
1420 map_area(DETECT_RAD_MAP);
1421 lite_area(damroll(2, 15), 3);
1425 case ACT_DETECT_ALL:
1427 msg_print(_("白く明るく輝いている...", "It glows bright white..."));
1428 msg_print(_("心にイメージが浮かんできた...", "An image forms in your mind..."));
1429 detect_all(DETECT_RAD_DEFAULT);
1433 case ACT_DETECT_XTRA:
1435 msg_print(_("明るく輝いている...", "It glows brightly..."));
1436 detect_all(DETECT_RAD_DEFAULT);
1438 identify_fully(FALSE);
1444 msg_print(_("黄色く輝いている...", "It glows yellow..."));
1445 identify_fully(FALSE);
1451 if (!ident_spell(FALSE)) return FALSE;
1455 case ACT_RUNE_EXPLO:
1457 msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
1464 msg_print(_("ブルーに明るく輝いている...", "It glows light blue..."));
1471 (void)set_food(PY_FOOD_MAX - 1);
1477 msg_print(_("明るい赤色に輝いている...", "It glows bright red..."));
1478 destroy_doors_touch();
1484 msg_print(_("鼓動している...", "It pulsates..."));
1485 if (!get_aim_dir(&dir)) return FALSE;
1486 wall_to_mud(dir, 20 + randint1(30));
1498 msg_print(_("明るい黄色に輝いている...", "It glows bright yellow..."));
1505 msg_print(_("次元の扉が開いた。目的地を選んで下さい。", "You open a dimensional gate. Choose a destination."));
1506 if (!dimension_door()) return FALSE;
1513 msg_print(_("周りの空間が歪んでいる...", "It twists space around you..."));
1514 teleport_player(100, 0L);
1520 msg_print(_("やわらかな白色に輝いている...", "It glows soft white..."));
1521 if (!recall_player(p_ptr, randint0(21) + 15)) return FALSE;
1527 msg_format(_("%sは赤く明るく光った!", "The %s flashes bright red!"), name);
1528 chg_virtue(V_KNOWLEDGE, 1);
1529 chg_virtue(V_ENLIGHTEN, 1);
1532 msg_format(_("%sはあなたの体力を奪った...", "The %s drains your vitality..."), name);
1533 take_hit(DAMAGE_LOSELIFE, damroll(3, 8), _("審判の宝石", "the Jewel of Judgement"), -1);
1535 (void)detect_traps(DETECT_RAD_DEFAULT, TRUE);
1536 (void)detect_doors(DETECT_RAD_DEFAULT);
1537 (void)detect_stairs(DETECT_RAD_DEFAULT);
1539 if (get_check(_("帰還の力を使いますか?", "Activate recall? ")))
1541 (void)recall_player(p_ptr, randint0(21) + 15);
1547 case ACT_TELEKINESIS:
1549 if (!get_aim_dir(&dir)) return FALSE;
1550 msg_format(_("%sを伸ばした。", "You stretched your %s."), name);
1551 fetch(dir, 500, TRUE);
1555 case ACT_DETECT_UNIQUE:
1558 monster_type *m_ptr;
1559 monster_race *r_ptr;
1560 msg_print(_("奇妙な場所が頭の中に浮かんだ...", "Some strange places show up in your mind. And you see ..."));
1561 /* Process the monsters (backwards) */
1562 for (i = m_max - 1; i >= 1; i--)
1564 /* Access the monster */
1565 m_ptr = ¤t_floor_ptr->m_list[i];
1567 /* Ignore "dead" monsters */
1568 if (!monster_is_valid(m_ptr)) continue;
1570 r_ptr = &r_info[m_ptr->r_idx];
1572 if (r_ptr->flags1 & RF1_UNIQUE)
1574 msg_format(_("%s. ", "%s. "), r_name + r_ptr->name);
1582 switch (randint1(13))
1584 case 1: case 2: case 3: case 4: case 5:
1585 teleport_player(10, 0L);
1587 case 6: case 7: case 8: case 9: case 10:
1588 teleport_player(222, 0L);
1591 (void)stair_creation();
1594 if (get_check(_("この階を去りますか?", "Leave this level? ")))
1596 if (autosave_l) do_cmd_save_game(TRUE);
1597 p_ptr->leaving = TRUE;
1603 case ACT_DISP_CURSE_XTRA:
1605 msg_format(_("%sが真実を照らし出す...", "The %s exhibits the truth..."), name);
1606 (void)remove_all_curse();
1611 case ACT_BRAND_FIRE_BOLTS:
1613 msg_format(_("%sが深紅に輝いた...", "Your %s glows deep red..."), name);
1614 (void)brand_bolts();
1618 case ACT_RECHARGE_XTRA:
1620 msg_format(_("%sが白く輝いた...", "The %s gleams with blinding light..."), name);
1621 if (!recharge(1000)) return FALSE;
1626 msg_print(_("石が隠された秘密を写し出した...", "The stone reveals hidden mysteries..."));
1627 if(!perilous_secrets(p_ptr)) return FALSE;
1632 msg_print(_("力強く四股を踏んだ。", "You stamp. (as if you are in a ring.)"));
1633 (void)set_afraid(0);
1634 (void)set_hero(randint1(20) + 20, FALSE);
1635 dispel_evil(p_ptr->lev * 3);
1639 case ACT_PHASE_DOOR:
1641 teleport_player(10, 0L);
1645 case ACT_DETECT_ALL_MONS:
1647 (void)detect_monsters_invis(255);
1648 (void)detect_monsters_normal(255);
1652 case ACT_ULTIMATE_RESIST:
1654 TIME_EFFECT v = randint1(25) + 25;
1655 (void)set_afraid(0);
1656 (void)set_hero(v, FALSE);
1657 (void)hp_player(10);
1658 (void)set_blessed(v, FALSE);
1659 (void)set_oppose_acid(v, FALSE);
1660 (void)set_oppose_elec(v, FALSE);
1661 (void)set_oppose_fire(v, FALSE);
1662 (void)set_oppose_cold(v, FALSE);
1663 (void)set_oppose_pois(v, FALSE);
1664 (void)set_ultimate_res(v, FALSE);
1669 cosmic_cast_off(p_ptr, o_ptr);
1672 case ACT_FALLING_STAR:
1674 msg_print(_("あなたは妖刀に魅入られた…", "You are enchanted by cursed blade..."));
1675 msg_print(_("「狂ほしく 血のごとき 月はのぼれり 秘めおきし 魔剣 いずこぞや」", "'Behold the blade arts.'"));
1680 case ACT_GRAND_CROSS:
1682 msg_print(_("「闇に還れ!」", "You say, 'Return to darkness!'"));
1683 project(0, 8, p_ptr->y, p_ptr->x, (randint1(100) + 200) * 2, GF_HOLY_FIRE, PROJECT_KILL | PROJECT_ITEM | PROJECT_GRID, -1);
1687 case ACT_TELEPORT_LEVEL:
1689 if (!get_check(_("本当に他の階にテレポートしますか?", "Are you sure? (Teleport Level)"))) return FALSE;
1694 case ACT_STRAIN_HASTE:
1697 msg_format(_("%sはあなたの体力を奪った...", "The %s drains your vitality..."), name);
1698 take_hit(DAMAGE_LOSELIFE, damroll(3, 8), _("加速した疲労", "the strain of haste"), -1);
1699 t = 25 + randint1(25);
1700 (void)set_fast(p_ptr->fast + t, FALSE);
1705 if(!fishing(p_ptr)) return FALSE;
1714 /* Only for Muramasa */
1715 if (o_ptr->name1 != ART_MURAMASA) return FALSE;
1716 if (get_check(_("本当に使いますか?", "Are you sure?!")))
1718 msg_print(_("村正が震えた...", "The Muramasa pulsates..."));
1722 msg_print(_("村正は壊れた!", "The Muramasa is destroyed!"));
1723 curse_weapon_object(TRUE, o_ptr);
1729 case ACT_BLOODY_MOON:
1731 /* Only for Bloody Moon */
1732 if (o_ptr->name1 != ART_BLOOD) return FALSE;
1733 msg_print(_("鎌が明るく輝いた...", "Your scythe glows brightly!"));
1734 get_bloody_moon_flags(o_ptr);
1735 if (p_ptr->prace == RACE_ANDROID) calc_android_exp();
1736 p_ptr->update |= (PU_BONUS | PU_HP);
1741 if (o_ptr->name1 != ART_CRIMSON) return FALSE;
1742 msg_print(_("せっかくだから『クリムゾン』をぶっぱなすぜ!", "I'll fire CRIMSON! SEKKAKUDAKARA!"));
1743 if(!fire_crimson()) return FALSE;
1748 msg_format(_("Unknown activation effect: %d.", "Unknown activation effect: %d."), act_ptr->index);
1753 /* Set activation timeout */
1754 if (act_ptr->timeout.constant >= 0) {
1755 o_ptr->timeout = (s16b)act_ptr->timeout.constant;
1756 if (act_ptr->timeout.dice > 0) {
1757 o_ptr->timeout += randint1(act_ptr->timeout.dice);
1761 /* Activations that have special timeout */
1762 switch (act_ptr->index) {
1764 o_ptr->timeout = ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_FLAMES)) ? 200 : 250;
1767 o_ptr->timeout = ((o_ptr->tval == TV_RING) && (o_ptr->sval == SV_RING_ICE)) ? 200 : 250;
1770 o_ptr->timeout = 3 * (p_ptr->lev + 10);
1776 msg_format("Special timeout is not implemented: %d.", act_ptr->index);