2 * @brief
\94
\93®
\8f\88\97\9d\82»
\82Ì
\91¼ (
\94ì
\91å
\89»
\82µ
\82ª
\82¿
\82È
\82Ì
\82Å
\93K
\8bX
\82Ü
\82Æ
\82Ü
\82è
\82ð
\95Ê
\83t
\83@
\83C
\83\8b\82Ö
\95ª
\8a\84\82·
\82é
\82±
\82Æ)
7 #include "object-activation/activation-others.h"
8 #include "art-definition/art-weapon-types.h"
9 #include "cmd-io/cmd-save.h"
10 #include "core/asking-player.h"
11 #include "core/hp-mp-processor.h"
12 #include "effect/effect-characteristics.h"
13 #include "game-option/special-options.h"
14 #include "monster-race/monster-race.h"
15 #include "monster-race/race-flags1.h"
16 #include "monster/monster-status.h"
17 #include "player/avatar.h"
18 #include "player-attack/player-attack.h"
19 #include "player/player-damage.h"
20 #include "spell/spell-types.h"
21 #include "spell-kind/earthquake.h"
22 #include "spell-kind/magic-item-recharger.h"
23 #include "spell-kind/spells-beam.h"
24 #include "spell-kind/spells-curse-removal.h"
25 #include "spell-kind/spells-detection.h"
26 #include "spell-kind/spells-fetcher.h"
27 #include "spell-kind/spells-floor.h"
28 #include "spell-kind/spells-grid.h"
29 #include "spell-kind/spells-launcher.h"
30 #include "spell-kind/spells-lite.h"
31 #include "spell-kind/spells-neighbor.h"
32 #include "spell-kind/spells-perception.h"
33 #include "spell-kind/spells-random.h"
34 #include "spell-kind/spells-sight.h"
35 #include "spell-kind/spells-teleport.h"
36 #include "spell-kind/spells-world.h"
37 #include "spell-realm/spells-hex.h"
38 #include "spell/process-effect.h"
39 #include "spell/spells-status.h"
40 #include "status/bad-status-setter.h"
41 #include "status/buff-setter.h"
42 #include "system/floor-type-definition.h"
43 #include "system/object-type-definition.h"
44 #include "target/target-getter.h"
45 #include "view/display-messages.h"
47 bool activate_sunlight(player_type *user_ptr)
50 if (!get_aim_dir(user_ptr, &dir))
53 msg_print(_("
\91¾
\97z
\8cõ
\90ü
\82ª
\95ú
\82½
\82ê
\82½
\81B", "A line of sunlight appears."));
54 (void)lite_line(user_ptr, dir, damroll(6, 8));
58 bool activate_confusion(player_type *user_ptr)
61 msg_print(_("
\97l
\81X
\82È
\90F
\82Ì
\89Î
\89Ô
\82ð
\94
\82µ
\82Ä
\82¢
\82é...", "It glows in scintillating colours..."));
62 if (!get_aim_dir(user_ptr, &dir))
65 confuse_monster(user_ptr, dir, 20);
69 bool activate_banish_evil(player_type *user_ptr)
71 if (banish_evil(user_ptr, 100))
72 msg_print(_("
\83A
\81[
\83e
\83B
\83t
\83@
\83N
\83g
\82Ì
\97Í
\82ª
\8e×
\88«
\82ð
\91Å
\82¿
\95¥
\82Á
\82½
\81I", "The power of the artifact banishes evil!"));
77 bool activate_scare(player_type *user_ptr)
79 if (music_singing_any(user_ptr))
80 stop_singing(user_ptr);
82 if (hex_spelling_any(user_ptr))
83 stop_hex_spell_all(user_ptr);
85 msg_print(_("
\82 \82È
\82½
\82Í
\97Í
\8b
\82¢
\93Ë
\95\97\82ð
\90\81\82«
\96Â
\82ç
\82µ
\82½
\81B
\8eü
\88Í
\82Ì
\93G
\82ª
\90k
\82¦
\8fã
\82Á
\82Ä
\82¢
\82é!", "You wind a mighty blast; your enemies tremble!"));
86 (void)turn_monsters(user_ptr, (3 * user_ptr->lev / 2) + 10);
90 bool activate_aggravation(player_type *user_ptr, object_type *o_ptr, concptr name)
92 if (o_ptr->name1 == ART_HYOUSIGI)
93 msg_print(_("
\94\8f\8eq
\96Ø
\82ð
\91Å
\82Á
\82½
\81B", "You beat your wooden clappers."));
95 msg_format(_("%s
\82Í
\95s
\89õ
\82È
\95¨
\89¹
\82ð
\97§
\82Ä
\82½
\81B", "The %s sounds an unpleasant noise."), name);
97 aggravate_monsters(user_ptr, 0);
101 bool activate_stone_mud(player_type *user_ptr)
104 msg_print(_("
\8cÛ
\93®
\82µ
\82Ä
\82¢
\82é...", "It pulsates..."));
105 if (!get_aim_dir(user_ptr, &dir))
108 wall_to_mud(user_ptr, dir, 20 + randint1(30));
112 bool activate_judgement(player_type *user_ptr, concptr name)
114 msg_format(_("%s
\82Í
\90Ô
\82
\96¾
\82é
\82
\8cõ
\82Á
\82½
\81I", "The %s flashes bright red!"), name);
115 chg_virtue(user_ptr, V_KNOWLEDGE, 1);
116 chg_virtue(user_ptr, V_ENLIGHTEN, 1);
117 wiz_lite(user_ptr, FALSE);
119 msg_format(_("%s
\82Í
\82 \82È
\82½
\82Ì
\91Ì
\97Í
\82ð
\92D
\82Á
\82½...", "The %s drains your vitality..."), name);
120 take_hit(user_ptr, DAMAGE_LOSELIFE, damroll(3, 8), _("
\90R
\94»
\82Ì
\95ó
\90Î", "the Jewel of Judgement"), -1);
122 (void)detect_traps(user_ptr, DETECT_RAD_DEFAULT, TRUE);
123 (void)detect_doors(user_ptr, DETECT_RAD_DEFAULT);
124 (void)detect_stairs(user_ptr, DETECT_RAD_DEFAULT);
126 if (get_check(_("
\8bA
\8aÒ
\82Ì
\97Í
\82ð
\8eg
\82¢
\82Ü
\82·
\82©
\81H", "Activate recall? ")))
127 (void)recall_player(user_ptr, randint0(21) + 15);
132 bool activate_telekinesis(player_type *user_ptr, concptr name)
135 if (!get_aim_dir(user_ptr, &dir))
138 msg_format(_("%s
\82ð
\90L
\82Î
\82µ
\82½
\81B", "You stretched your %s."), name);
139 fetch_item(user_ptr, dir, 500, TRUE);
143 bool activate_unique_detection(player_type *user_ptr)
147 msg_print(_("
\8aï
\96
\82È
\8fê
\8f\8a\82ª
\93ª
\82Ì
\92\86\82É
\95\82\82©
\82ñ
\82¾
\81D
\81D
\81D", "Some strange places show up in your mind. And you see ..."));
148 for (int i = user_ptr->current_floor_ptr->m_max - 1; i >= 1; i--) {
149 m_ptr = &user_ptr->current_floor_ptr->m_list[i];
150 if (!monster_is_valid(m_ptr))
153 r_ptr = &r_info[m_ptr->r_idx];
154 if (r_ptr->flags1 & RF1_UNIQUE)
155 msg_format(_("%s
\81D ", "%s. "), r_name + r_ptr->name);
161 bool activate_dispel_curse(player_type *user_ptr, concptr name)
163 msg_format(_("%s
\82ª
\90^
\8eÀ
\82ð
\8fÆ
\82ç
\82µ
\8fo
\82·...", "The %s exhibits the truth..."), name);
164 (void)remove_all_curse(user_ptr);
165 (void)probing(user_ptr);
169 bool activate_cure_lw(player_type *user_ptr)
171 (void)set_afraid(user_ptr, 0);
172 (void)hp_player(user_ptr, 30);
176 bool activate_grand_cross(player_type *user_ptr)
178 msg_print(_("
\81u
\88Å
\82É
\8aÒ
\82ê
\81I
\81v", "You say, 'Return to darkness!'"));
179 (void)project(user_ptr, 0, 8, user_ptr->y, user_ptr->x, (randint1(100) + 200) * 2, GF_HOLY_FIRE, PROJECT_KILL | PROJECT_ITEM | PROJECT_GRID, -1);
183 bool activate_call_chaos(player_type *user_ptr)
185 msg_print(_("
\97l
\81X
\82È
\90F
\82Ì
\89Î
\89Ô
\82ð
\94
\82µ
\82Ä
\82¢
\82é...", "It glows in scintillating colours..."));
186 call_chaos(user_ptr);
190 bool activate_dispel_evil(player_type *user_ptr)
192 msg_print(_("
\90_
\90¹
\82È
\95µ
\88Í
\8bC
\82ª
\8f[
\96\9e\82µ
\82½...", "It floods the area with goodness..."));
193 dispel_evil(user_ptr, user_ptr->lev * 5);
197 bool activate_dispel_good(player_type *user_ptr)
199 msg_print(_("
\8e×
\88«
\82È
\95µ
\88Í
\8bC
\82ª
\8f[
\96\9e\82µ
\82½...", "It floods the area with evil..."));
200 dispel_good(user_ptr, user_ptr->lev * 5);
204 bool activate_all_monsters_detection(player_type *user_ptr)
206 (void)detect_monsters_invis(user_ptr, 255);
207 (void)detect_monsters_normal(user_ptr, 255);
211 bool activate_all_detection(player_type *user_ptr)
213 msg_print(_("
\94\92\82
\96¾
\82é
\82
\8bP
\82¢
\82Ä
\82¢
\82é...", "It glows bright white..."));
214 msg_print(_("
\90S
\82É
\83C
\83\81\81[
\83W
\82ª
\95\82\82©
\82ñ
\82Å
\82«
\82½...", "An image forms in your mind..."));
215 detect_all(user_ptr, DETECT_RAD_DEFAULT);
219 bool activate_extra_detection(player_type *user_ptr)
221 msg_print(_("
\96¾
\82é
\82
\8bP
\82¢
\82Ä
\82¢
\82é...", "It glows brightly..."));
222 detect_all(user_ptr, DETECT_RAD_DEFAULT);
224 identify_fully(user_ptr, FALSE, 0);
228 bool activate_fully_identification(player_type *user_ptr)
230 msg_print(_("
\89©
\90F
\82
\8bP
\82¢
\82Ä
\82¢
\82é...", "It glows yellow..."));
231 identify_fully(user_ptr, FALSE, 0);
236 * @brief switch_activation()
\82©
\82ç
\8cÂ
\81X
\82Ì
\83X
\83y
\83\8b\82Ö
\82Ì
\88Ë
\91¶
\90«
\82ð
\82È
\82
\82·
\82½
\82ß
\82Ì
\83V
\83\93\83^
\83b
\83N
\83X
\83V
\83\85\83K
\81[
237 * @param user_ptr
\83v
\83\8c\81[
\83\84\81[
\82Ö
\82Ì
\8eQ
\8fÆ
\83|
\83C
\83\93\83^
238 * @return
\94
\93®
\82É
\90¬
\8c÷
\82µ
\82½
\82çTRUE
240 bool activate_identification(player_type *user_ptr) { return ident_spell(user_ptr, FALSE, 0); }
242 bool activate_pesticide(player_type *user_ptr)
244 msg_print(_("
\82 \82È
\82½
\82Í
\8aQ
\92\8e\82ð
\88ê
\91|
\82µ
\82½
\81B", "You exterminate small life."));
245 (void)dispel_monsters(user_ptr, 4);
250 * @brief switch_activation()
\82©
\82ç
\8cÂ
\81X
\82Ì
\83X
\83y
\83\8b\82Ö
\82Ì
\88Ë
\91¶
\90«
\82ð
\82È
\82
\82·
\82½
\82ß
\82Ì
\83V
\83\93\83^
\83b
\83N
\83X
\83V
\83\85\83K
\81[
251 * @param user_ptr
\83v
\83\8c\81[
\83\84\81[
\82Ö
\82Ì
\8eQ
\8fÆ
\83|
\83C
\83\93\83^
252 * @return
\94
\93®
\82É
\90¬
\8c÷
\82µ
\82½
\82çTRUE
254 bool activate_whirlwind(player_type *user_ptr)
260 bool activate_blinding_light(player_type *user_ptr, concptr name)
262 msg_format(_("%s
\82ªá¿
\82µ
\82¢
\8cõ
\82Å
\8bP
\82¢
\82½...", "The %s gleams with blinding light..."), name);
263 (void)fire_ball(user_ptr, GF_LITE, 0, 300, 6);
264 confuse_monsters(user_ptr, 3 * user_ptr->lev / 2);
268 bool activate_sleep(player_type *user_ptr)
270 msg_print(_("
\90[
\90Â
\90F
\82É
\8bP
\82¢
\82Ä
\82¢
\82é...", "It glows deep blue..."));
271 sleep_monsters_touch(user_ptr);
275 bool activate_door_destroy(player_type *user_ptr)
277 msg_print(_("
\96¾
\82é
\82¢
\90Ô
\90F
\82É
\8bP
\82¢
\82Ä
\82¢
\82é...", "It glows bright red..."));
278 destroy_doors_touch(user_ptr);
282 bool activate_earthquake(player_type *user_ptr)
284 earthquake(user_ptr, user_ptr->y, user_ptr->x, 5, 0);
288 bool activate_recharge(player_type *user_ptr)
290 recharge(user_ptr, 130);
294 bool activate_recharge_extra(player_type *user_ptr, concptr name)
296 msg_format(_("%s
\82ª
\94\92\82
\8bP
\82¢
\82½
\81D
\81D
\81D", "The %s gleams with blinding light..."), name);
297 return recharge(user_ptr, 1000);
300 bool activate_shikofumi(player_type *user_ptr)
302 msg_print(_("
\97Í
\8b
\82
\8el
\8cÒ
\82ð
\93¥
\82ñ
\82¾
\81B", "You stamp. (as if you are in a ring.)"));
303 (void)set_afraid(user_ptr, 0);
304 (void)set_hero(user_ptr, randint1(20) + 20, FALSE);
305 (void)dispel_evil(user_ptr, user_ptr->lev * 3);
309 bool activate_terror(player_type *user_ptr)
311 turn_monsters(user_ptr, 40 + user_ptr->lev);