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/player-damage.h"
19 #include "spell/spell-types.h"
20 #include "spell-kind/spells-beam.h"
21 #include "spell-kind/spells-curse-removal.h"
22 #include "spell-kind/spells-detection.h"
23 #include "spell-kind/spells-fetcher.h"
24 #include "spell-kind/spells-floor.h"
25 #include "spell-kind/spells-grid.h"
26 #include "spell-kind/spells-launcher.h"
27 #include "spell-kind/spells-lite.h"
28 #include "spell-kind/spells-perception.h"
29 #include "spell-kind/spells-random.h"
30 #include "spell-kind/spells-sight.h"
31 #include "spell-kind/spells-teleport.h"
32 #include "spell-kind/spells-world.h"
33 #include "spell-realm/spells-hex.h"
34 #include "spell/process-effect.h"
35 #include "spell/spells-status.h"
36 #include "status/bad-status-setter.h"
37 #include "status/buff-setter.h"
38 #include "system/floor-type-definition.h"
39 #include "system/object-type-definition.h"
40 #include "target/target-getter.h"
41 #include "view/display-messages.h"
43 bool activate_sunlight(player_type *user_ptr)
46 if (!get_aim_dir(user_ptr, &dir))
49 msg_print(_("
\91¾
\97z
\8cõ
\90ü
\82ª
\95ú
\82½
\82ê
\82½
\81B", "A line of sunlight appears."));
50 (void)lite_line(user_ptr, dir, damroll(6, 8));
54 bool activate_confusion(player_type *user_ptr)
57 msg_print(_("
\97l
\81X
\82È
\90F
\82Ì
\89Î
\89Ô
\82ð
\94
\82µ
\82Ä
\82¢
\82é...", "It glows in scintillating colours..."));
58 if (!get_aim_dir(user_ptr, &dir))
61 confuse_monster(user_ptr, dir, 20);
65 bool activate_banish_evil(player_type *user_ptr)
67 if (banish_evil(user_ptr, 100))
68 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!"));
73 bool activate_scare(player_type *user_ptr)
75 if (music_singing_any(user_ptr))
76 stop_singing(user_ptr);
78 if (hex_spelling_any(user_ptr))
79 stop_hex_spell_all(user_ptr);
81 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!"));
82 (void)turn_monsters(user_ptr, (3 * user_ptr->lev / 2) + 10);
86 bool activate_aggravation(player_type *user_ptr, object_type *o_ptr, concptr name)
88 if (o_ptr->name1 == ART_HYOUSIGI)
89 msg_print(_("
\94\8f\8eq
\96Ø
\82ð
\91Å
\82Á
\82½
\81B", "You beat your wooden clappers."));
91 msg_format(_("%s
\82Í
\95s
\89õ
\82È
\95¨
\89¹
\82ð
\97§
\82Ä
\82½
\81B", "The %s sounds an unpleasant noise."), name);
93 aggravate_monsters(user_ptr, 0);
97 bool activate_stone_mud(player_type *user_ptr)
100 msg_print(_("
\8cÛ
\93®
\82µ
\82Ä
\82¢
\82é...", "It pulsates..."));
101 if (!get_aim_dir(user_ptr, &dir))
104 wall_to_mud(user_ptr, dir, 20 + randint1(30));
108 bool activate_judgement(player_type *user_ptr, concptr name)
110 msg_format(_("%s
\82Í
\90Ô
\82
\96¾
\82é
\82
\8cõ
\82Á
\82½
\81I", "The %s flashes bright red!"), name);
111 chg_virtue(user_ptr, V_KNOWLEDGE, 1);
112 chg_virtue(user_ptr, V_ENLIGHTEN, 1);
113 wiz_lite(user_ptr, FALSE);
115 msg_format(_("%s
\82Í
\82 \82È
\82½
\82Ì
\91Ì
\97Í
\82ð
\92D
\82Á
\82½...", "The %s drains your vitality..."), name);
116 take_hit(user_ptr, DAMAGE_LOSELIFE, damroll(3, 8), _("
\90R
\94»
\82Ì
\95ó
\90Î", "the Jewel of Judgement"), -1);
118 (void)detect_traps(user_ptr, DETECT_RAD_DEFAULT, TRUE);
119 (void)detect_doors(user_ptr, DETECT_RAD_DEFAULT);
120 (void)detect_stairs(user_ptr, DETECT_RAD_DEFAULT);
122 if (get_check(_("
\8bA
\8aÒ
\82Ì
\97Í
\82ð
\8eg
\82¢
\82Ü
\82·
\82©
\81H", "Activate recall? ")))
123 (void)recall_player(user_ptr, randint0(21) + 15);
128 bool activate_telekinesis(player_type *user_ptr, concptr name)
131 if (!get_aim_dir(user_ptr, &dir))
134 msg_format(_("%s
\82ð
\90L
\82Î
\82µ
\82½
\81B", "You stretched your %s."), name);
135 fetch_item(user_ptr, dir, 500, TRUE);
139 bool activate_unique_detection(player_type *user_ptr)
143 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 ..."));
144 for (int i = user_ptr->current_floor_ptr->m_max - 1; i >= 1; i--) {
145 m_ptr = &user_ptr->current_floor_ptr->m_list[i];
146 if (!monster_is_valid(m_ptr))
149 r_ptr = &r_info[m_ptr->r_idx];
150 if (r_ptr->flags1 & RF1_UNIQUE)
151 msg_format(_("%s
\81D ", "%s. "), r_name + r_ptr->name);
157 bool activate_dispel_curse(player_type *user_ptr, concptr name)
159 msg_format(_("%s
\82ª
\90^
\8eÀ
\82ð
\8fÆ
\82ç
\82µ
\8fo
\82·...", "The %s exhibits the truth..."), name);
160 (void)remove_all_curse(user_ptr);
161 (void)probing(user_ptr);
165 bool activate_cure_lw(player_type *user_ptr)
167 (void)set_afraid(user_ptr, 0);
168 (void)hp_player(user_ptr, 30);
172 bool activate_grand_cross(player_type *user_ptr)
174 msg_print(_("
\81u
\88Å
\82É
\8aÒ
\82ê
\81I
\81v", "You say, 'Return to darkness!'"));
175 (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);
179 bool activate_call_chaos(player_type *user_ptr)
181 msg_print(_("
\97l
\81X
\82È
\90F
\82Ì
\89Î
\89Ô
\82ð
\94
\82µ
\82Ä
\82¢
\82é...", "It glows in scintillating colours..."));
182 call_chaos(user_ptr);
186 bool activate_dispel_evil(player_type *user_ptr)
188 msg_print(_("
\90_
\90¹
\82È
\95µ
\88Í
\8bC
\82ª
\8f[
\96\9e\82µ
\82½...", "It floods the area with goodness..."));
189 dispel_evil(user_ptr, user_ptr->lev * 5);
193 bool activate_dispel_good(player_type *user_ptr)
195 msg_print(_("
\8e×
\88«
\82È
\95µ
\88Í
\8bC
\82ª
\8f[
\96\9e\82µ
\82½...", "It floods the area with evil..."));
196 dispel_good(user_ptr, user_ptr->lev * 5);
200 bool activate_all_monsters_detection(player_type *user_ptr)
202 (void)detect_monsters_invis(user_ptr, 255);
203 (void)detect_monsters_normal(user_ptr, 255);
207 bool activate_all_detection(player_type *user_ptr)
209 msg_print(_("
\94\92\82
\96¾
\82é
\82
\8bP
\82¢
\82Ä
\82¢
\82é...", "It glows bright white..."));
210 msg_print(_("
\90S
\82É
\83C
\83\81\81[
\83W
\82ª
\95\82\82©
\82ñ
\82Å
\82«
\82½...", "An image forms in your mind..."));
211 detect_all(user_ptr, DETECT_RAD_DEFAULT);
215 bool activate_extra_detection(player_type *user_ptr)
217 msg_print(_("
\96¾
\82é
\82
\8bP
\82¢
\82Ä
\82¢
\82é...", "It glows brightly..."));
218 detect_all(user_ptr, DETECT_RAD_DEFAULT);
220 identify_fully(user_ptr, FALSE, 0);
224 bool activate_fully_identification(player_type *user_ptr)
226 msg_print(_("
\89©
\90F
\82
\8bP
\82¢
\82Ä
\82¢
\82é...", "It glows yellow..."));
227 identify_fully(user_ptr, FALSE, 0);
232 * @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[
233 * @param user_ptr
\83v
\83\8c\81[
\83\84\81[
\82Ö
\82Ì
\8eQ
\8fÆ
\83|
\83C
\83\93\83^
234 * @return
\94
\93®
\82É
\90¬
\8c÷
\82µ
\82½
\82çTRUE
236 bool activate_identification(player_type *user_ptr) { return ident_spell(user_ptr, FALSE, 0); }
238 bool activate_pesticide(player_type *user_ptr)
240 msg_print(_("
\82 \82È
\82½
\82Í
\8aQ
\92\8e\82ð
\88ê
\91|
\82µ
\82½
\81B", "You exterminate small life."));
241 (void)dispel_monsters(user_ptr, 4);