2 * @brief 呪術の処理実装 / Hex code
5 * 2014 Deskull rearranged comment for Doxygen.\n
8 * 0: Flag bits of spelling spells\n
9 * 1: Flag bits of despelled spells\n
12 * 0: Number of spelling spells\n
13 * 1: Type of revenge\n
14 * 2: Turn count for revenge\n
17 #include "realm/realm-hex.h"
18 #include "cmd-action/cmd-spell.h"
19 #include "cmd-item/cmd-quaff.h"
20 #include "core/asking-player.h"
21 #include "core/player-redraw-types.h"
22 #include "core/player-update-types.h"
23 #include "effect/effect-characteristics.h"
24 #include "effect/effect-processor.h"
25 #include "flavor/flavor-describer.h"
26 #include "flavor/object-flavor-types.h"
27 #include "floor/cave.h"
28 #include "floor/floor-object.h"
29 #include "grid/grid.h"
30 #include "inventory/inventory-slot-types.h"
31 #include "io/input-key-requester.h"
32 #include "monster-race/monster-race.h"
33 #include "object-enchant/object-curse.h"
34 #include "object-enchant/tr-types.h"
35 #include "object-enchant/trc-types.h"
36 #include "object-hook/hook-armor.h"
37 #include "object-hook/hook-checker.h"
38 #include "object-hook/hook-enchant.h"
39 #include "object/item-tester-hooker.h"
40 #include "object/item-use-flags.h"
41 #include "object/object-flags.h"
42 #include "player/attack-defense-types.h"
43 #include "player/player-skill.h"
44 #include "player/player-status.h"
45 #include "realm/realm-hex-numbers.h"
46 #include "spell-kind/magic-item-recharger.h"
47 #include "spell-kind/spells-launcher.h"
48 #include "spell-kind/spells-neighbor.h"
49 #include "spell-kind/spells-sight.h"
50 #include "spell-kind/spells-teleport.h"
51 #include "spell-realm/spells-hex.h"
52 #include "spell/spell-types.h"
53 #include "spell/spells-execution.h"
54 #include "spell/spells-status.h"
55 #include "spell/technic-info-table.h"
56 #include "status/action-setter.h"
57 #include "system/floor-type-definition.h"
58 #include "target/grid-selector.h"
59 #include "target/target-getter.h"
60 #include "term/screen-processor.h"
61 #include "util/bit-flags-calculator.h"
62 #include "view/display-messages.h"
63 #include "world/world.h"
66 * @brief 呪術領域の武器呪縛の対象にできる武器かどうかを返す。 / An "item_tester_hook" for offer
67 * @param o_ptr オブジェクト構造体の参照ポインタ
68 * @return 呪縛可能な武器ならばTRUEを返す
70 static bool item_tester_hook_weapon_except_bow(player_type *player_ptr, object_type *o_ptr)
75 switch (o_ptr->tval) {
88 * @brief 呪術領域魔法の各処理を行う
90 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST / SPELL_CONT / SPELL_STOP)
91 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST / SPELL_CONT / SPELL_STOP 時はNULL文字列を返す。
93 concptr do_hex_spell(player_type *caster_ptr, SPELL_IDX spell, spell_type mode)
95 bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
96 bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
97 bool info = (mode == SPELL_INFO) ? TRUE : FALSE;
98 bool cast = (mode == SPELL_CAST) ? TRUE : FALSE;
99 bool cont = (mode == SPELL_CONT) ? TRUE : FALSE;
100 bool stop = (mode == SPELL_STOP) ? TRUE : FALSE;
104 PLAYER_LEVEL plev = caster_ptr->lev;
108 /*** 1st book (0-7) ***/
111 return _("邪なる祝福", "Evily blessing");
113 return _("祝福により攻撃精度と防御力が上がる。", "Attempts to increase +to_hit of a weapon and AC");
115 if (!caster_ptr->blessed) {
116 msg_print(_("高潔な気分になった!", "You feel righteous!"));
120 if (!caster_ptr->blessed) {
121 msg_print(_("高潔な気分が消え失せた。", "The prayer has expired."));
128 return _("軽傷の治癒", "Cure light wounds");
130 return _("HPや傷を少し回復させる。", "Heals cuts and HP a little.");
132 return info_heal(1, 10, 0);
134 msg_print(_("気分が良くなってくる。", "You feel a little better."));
137 (void)cure_light_wounds(caster_ptr, 1, 10);
142 return _("悪魔のオーラ", "Demonic aura");
144 return _("炎のオーラを身にまとい、回復速度が速くなる。", "Gives fire aura and regeneration.");
146 msg_print(_("体が炎のオーラで覆われた。", "You are enveloped by a fiery aura!"));
149 msg_print(_("炎のオーラが消え去った。", "The fiery aura disappeared."));
155 return _("悪臭霧", "Stinking mist");
157 return _("視界内のモンスターに微弱量の毒のダメージを与える。", "Deals a little poison damage to all monsters in your sight.");
158 power = plev / 2 + 5;
160 return info_damage(1, power, 0);
162 project_all_los(caster_ptr, GF_POIS, randint1(power));
168 return _("腕力強化", "Extra might");
170 return _("術者の腕力を上昇させる。", "Attempts to increase your strength.");
172 msg_print(_("何だか力が湧いて来る。", "You feel stronger."));
178 return _("武器呪縛", "Curse weapon");
180 return _("装備している武器を呪う。", "Curses your weapon.");
184 GAME_TEXT o_name[MAX_NLEN];
186 u32b f[TR_FLAG_SIZE];
188 item_tester_hook = item_tester_hook_weapon_except_bow;
189 q = _("どれを呪いますか?", "Which weapon do you curse?");
190 s = _("武器を装備していない。", "You're not wielding a weapon.");
192 o_ptr = choose_object(caster_ptr, &item, q, s, (USE_EQUIP), 0);
196 describe_flavor(caster_ptr, o_name, o_ptr, OD_NAME_ONLY);
197 object_flags(caster_ptr, o_ptr, f);
199 if (!get_check(format(_("本当に %s を呪いますか?", "Do you curse %s, really?"), o_name)))
202 if (!one_in_(3) && (object_is_artifact(o_ptr) || has_flag(f, TR_BLESSED))) {
203 msg_format(_("%s は呪いを跳ね返した。", "%s resists the effect."), o_name);
205 if (o_ptr->to_d > 0) {
206 o_ptr->to_d -= randint1(3) % 2;
210 if (o_ptr->to_h > 0) {
211 o_ptr->to_h -= randint1(3) % 2;
215 if (o_ptr->to_a > 0) {
216 o_ptr->to_a -= randint1(3) % 2;
220 msg_format(_("%s は劣化してしまった。", "Your %s was disenchanted!"), o_name);
224 msg_format(_("恐怖の暗黒オーラがあなたの%sを包み込んだ!", "A terrible black aura blasts your %s!"), o_name);
225 o_ptr->curse_flags |= (TRC_CURSED);
227 if (object_is_artifact(o_ptr) || object_is_ego(o_ptr)) {
230 o_ptr->curse_flags |= (TRC_HEAVY_CURSE);
232 o_ptr->curse_flags |= (TRC_TY_CURSE);
234 o_ptr->curse_flags |= (TRC_PERMA_CURSE);
236 add_flag(o_ptr->art_flags, TR_AGGRAVATE);
237 add_flag(o_ptr->art_flags, TR_VORPAL);
238 add_flag(o_ptr->art_flags, TR_VAMPIRIC);
239 msg_print(_("血だ!血だ!血だ!", "Blood, Blood, Blood!"));
244 o_ptr->curse_flags |= get_curse(caster_ptr, curse_rank, o_ptr);
247 caster_ptr->update |= (PU_BONUS);
254 return _("邪悪感知", "Evil detection");
256 return _("周囲の邪悪なモンスターを感知する。", "Detects evil monsters.");
258 return info_range(MAX_SIGHT);
260 msg_print(_("邪悪な生物の存在を感じ取ろうとした。", "You sense the presence of evil creatures."));
266 return _("我慢", "Patience");
269 "数ターン攻撃を耐えた後、受けたダメージを地獄の業火として周囲に放出する。", "Bursts hell fire strongly after enduring damage for a few turns.");
270 power = MIN(200, (hex_revenge_power(caster_ptr) * 2));
272 return info_damage(0, 0, power);
274 int a = 3 - (caster_ptr->pspeed - 100) / 10;
275 MAGIC_NUM2 r = 3 + randint1(3) + MAX(0, MIN(3, a));
277 if (hex_revenge_turn(caster_ptr) > 0) {
278 msg_print(_("すでに我慢をしている。", "You are already biding your time for vengeance."));
282 hex_revenge_type(caster_ptr) = 1;
283 hex_revenge_turn(caster_ptr) = r;
284 hex_revenge_power(caster_ptr) = 0;
285 msg_print(_("じっと耐えることにした。", "You decide to endure damage for future retribution."));
289 POSITION rad = 2 + (power / 50);
291 hex_revenge_turn(caster_ptr)--;
293 if ((hex_revenge_turn(caster_ptr) <= 0) || (power >= 200)) {
294 msg_print(_("我慢が解かれた!", "My patience is at an end!"));
297 caster_ptr, 0, rad, caster_ptr->y, caster_ptr->x, power, GF_HELL_FIRE, (PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
299 if (current_world_ptr->wizard) {
300 msg_format(_("%d点のダメージを返した。", "You return %d damage."), power);
304 hex_revenge_type(caster_ptr) = 0;
305 hex_revenge_turn(caster_ptr) = 0;
306 hex_revenge_power(caster_ptr) = 0;
311 /*** 2nd book (8-15) ***/
314 return _("氷の鎧", "Armor of ice");
316 return _("氷のオーラを身にまとい、防御力が上昇する。", "Surrounds you with an icy aura and gives a bonus to AC.");
318 msg_print(_("体が氷の鎧で覆われた。", "You are enveloped by icy armor!"));
321 msg_print(_("氷の鎧が消え去った。", "The icy armor disappeared."));
327 return _("重傷の治癒", "Cure serious wounds");
329 return _("体力や傷を多少回復させる。", "Heals cuts and HP.");
331 return info_heal(2, 10, 0);
333 msg_print(_("気分が良くなってくる。", "You feel better."));
336 (void)cure_serious_wounds(caster_ptr, 2, 10);
341 return _("薬品吸入", "Inhale potion");
343 return _("呪文詠唱を中止することなく、薬の効果を得ることができる。", "Quaffs a potion without canceling spell casting.");
345 casting_hex_flags(caster_ptr) |= (1L << HEX_INHAIL);
346 do_cmd_quaff_potion(caster_ptr);
347 casting_hex_flags(caster_ptr) &= ~(1L << HEX_INHAIL);
354 return _("衰弱の霧", "Hypodynamic mist");
356 return _("視界内のモンスターに微弱量の衰弱属性のダメージを与える。", "Deals a little life-draining damage to all monsters in your sight.");
357 power = (plev / 2) + 5;
359 return info_damage(1, power, 0);
361 project_all_los(caster_ptr, GF_HYPODYNAMIA, randint1(power));
367 return _("魔剣化", "Swords to runeswords");
369 return _("武器の攻撃力を上げる。切れ味を得、呪いに応じて与えるダメージが上昇し、善良なモンスターに対するダメージが2倍になる。",
370 "Gives vorpal ability to your weapon. Increases damage from your weapon acccording to curse of your weapon.");
373 msg_print("あなたの武器が黒く輝いた。");
375 if (!empty_hands(caster_ptr, FALSE))
376 msg_print("Your weapons glow bright black.");
378 msg_print("Your weapon glows bright black.");
383 msg_print("武器の輝きが消え去った。");
385 msg_format("Your weapon%s.", (empty_hands(caster_ptr, FALSE)) ? " no longer glows" : "s no longer glow");
392 return _("混乱の手", "Touch of confusion");
394 return _("攻撃した際モンスターを混乱させる。", "Confuses a monster when you attack.");
396 msg_print(_("あなたの手が赤く輝き始めた。", "Your hands glow bright red."));
399 msg_print(_("手の輝きがなくなった。", "Your hands no longer glow."));
405 return _("肉体強化", "Building up");
408 "術者の腕力、器用さ、耐久力を上昇させる。攻撃回数の上限を 1 増加させる。", "Attempts to increases your strength, dexterity and constitusion.");
410 msg_print(_("身体が強くなった気がした。", "You feel your body is more developed now."));
416 return _("反テレポート結界", "Anti teleport barrier");
418 return _("視界内のモンスターのテレポートを阻害するバリアを張る。", "Obstructs all teleportations by monsters in your sight.");
419 power = plev * 3 / 2;
421 return info_power(power);
423 msg_print(_("テレポートを防ぐ呪いをかけた。", "You feel anyone can not teleport except you."));
427 /*** 3rd book (16-23) ***/
430 return _("衝撃のクローク", "Cloak of shock");
432 return _("電気のオーラを身にまとい、動きが速くなる。", "Gives lightning aura and a bonus to speed.");
434 msg_print(_("体が稲妻のオーラで覆われた。", "You are enveloped by an electrical aura!"));
437 msg_print(_("稲妻のオーラが消え去った。", "The electrical aura disappeared."));
443 return _("致命傷の治癒", "Cure critical wounds");
445 return _("体力や傷を回復させる。", "Heals cuts and HP greatly.");
447 return info_heal(4, 10, 0);
449 msg_print(_("気分が良くなってくる。", "You feel much better."));
452 (void)cure_critical_wounds(caster_ptr, damroll(4, 10));
457 return _("呪力封入", "Recharging");
459 return _("魔法の道具に魔力を再充填する。", "Recharges a magic device.");
462 return info_power(power);
464 if (!recharge(caster_ptr, power))
472 return _("死者復活", "Animate Dead");
474 return _("死体を蘇らせてペットにする。", "Raises corpses and skeletons from dead.");
476 msg_print(_("死者への呼びかけを始めた。", "You start to call the dead.!"));
479 animate_dead(caster_ptr, 0, caster_ptr->y, caster_ptr->x);
485 return _("防具呪縛", "Curse armor");
487 return _("装備している防具に呪いをかける。", "Curse a piece of armour that you wielding.");
491 GAME_TEXT o_name[MAX_NLEN];
493 u32b f[TR_FLAG_SIZE];
495 item_tester_hook = object_is_armour;
496 q = _("どれを呪いますか?", "Which piece of armour do you curse?");
497 s = _("防具を装備していない。", "You're not wearing any armor.");
499 o_ptr = choose_object(caster_ptr, &item, q, s, (USE_EQUIP), 0);
503 o_ptr = &caster_ptr->inventory_list[item];
504 describe_flavor(caster_ptr, o_name, o_ptr, OD_NAME_ONLY);
505 object_flags(caster_ptr, o_ptr, f);
507 if (!get_check(format(_("本当に %s を呪いますか?", "Do you curse %s, really?"), o_name)))
510 if (!one_in_(3) && (object_is_artifact(o_ptr) || has_flag(f, TR_BLESSED))) {
511 msg_format(_("%s は呪いを跳ね返した。", "%s resists the effect."), o_name);
513 if (o_ptr->to_d > 0) {
514 o_ptr->to_d -= randint1(3) % 2;
518 if (o_ptr->to_h > 0) {
519 o_ptr->to_h -= randint1(3) % 2;
523 if (o_ptr->to_a > 0) {
524 o_ptr->to_a -= randint1(3) % 2;
528 msg_format(_("%s は劣化してしまった。", "Your %s was disenchanted!"), o_name);
532 msg_format(_("恐怖の暗黒オーラがあなたの%sを包み込んだ!", "A terrible black aura blasts your %s!"), o_name);
533 o_ptr->curse_flags |= (TRC_CURSED);
535 if (object_is_artifact(o_ptr) || object_is_ego(o_ptr)) {
538 o_ptr->curse_flags |= (TRC_HEAVY_CURSE);
540 o_ptr->curse_flags |= (TRC_TY_CURSE);
542 o_ptr->curse_flags |= (TRC_PERMA_CURSE);
544 add_flag(o_ptr->art_flags, TR_AGGRAVATE);
545 add_flag(o_ptr->art_flags, TR_RES_POIS);
546 add_flag(o_ptr->art_flags, TR_RES_DARK);
547 add_flag(o_ptr->art_flags, TR_RES_NETHER);
548 msg_print(_("血だ!血だ!血だ!", "Blood, Blood, Blood!"));
553 o_ptr->curse_flags |= get_curse(caster_ptr, curse_rank, o_ptr);
556 caster_ptr->update |= (PU_BONUS);
563 return _("影のクローク", "Cloak of shadow");
565 return _("影のオーラを身にまとい、敵に影のダメージを与える。", "Gives aura of shadow.");
567 object_type *o_ptr = &caster_ptr->inventory_list[INVEN_OUTER];
570 msg_print(_("クロークを身につけていない!", "You are not wearing a cloak."));
572 } else if (!object_is_cursed(o_ptr)) {
573 msg_print(_("クロークは呪われていない!", "Your cloak is not cursed."));
576 msg_print(_("影のオーラを身にまとった。", "You are enveloped by a shadowy aura!"));
580 object_type *o_ptr = &caster_ptr->inventory_list[INVEN_OUTER];
582 if ((!o_ptr->k_idx) || (!object_is_cursed(o_ptr))) {
583 exe_spell(caster_ptr, REALM_HEX, spell, SPELL_STOP);
584 casting_hex_flags(caster_ptr) &= ~(1L << spell);
585 casting_hex_num(caster_ptr)--;
586 if (!SINGING_SONG_ID(caster_ptr))
587 set_action(caster_ptr, ACTION_NONE);
591 msg_print(_("影のオーラが消え去った。", "The shadowy aura disappeared."));
597 return _("苦痛を魔力に", "Pain to mana");
599 return _("視界内のモンスターに精神ダメージ与え、魔力を吸い取る。", "Deals psychic damage to all monsters in sight and drains some mana.");
600 power = plev * 3 / 2;
602 return info_damage(1, power, 0);
604 project_all_los(caster_ptr, GF_PSI_DRAIN, randint1(power));
610 return _("目には目を", "Eye for an eye");
612 return _("打撃や魔法で受けたダメージを、攻撃元のモンスターにも与える。", "Returns same damage which you got to the monster which damaged you.");
614 msg_print(_("復讐したい欲望にかられた。", "You feel very vengeful."));
618 /*** 4th book (24-31) ***/
621 return _("反増殖結界", "Anti multiply barrier");
623 return _("その階の増殖するモンスターの増殖を阻止する。", "Obstructs all multiplying by monsters in entire floor.");
625 msg_print(_("増殖を阻止する呪いをかけた。", "You feel anyone can not already multiply."));
631 return _("全復活", "Restoration");
633 return _("経験値を徐々に復活し、減少した能力値を回復させる。", "Restores experience and status.");
635 msg_print(_("体が元の活力を取り戻し始めた。", "You feel your lost status starting to return."));
639 int d = (caster_ptr->max_exp - caster_ptr->exp);
640 int r = (caster_ptr->exp / 20);
645 caster_ptr->exp = caster_ptr->max_exp;
647 caster_ptr->exp += r;
649 /* Check the experience */
650 check_experience(caster_ptr);
654 for (i = A_STR; i < A_MAX; i++) {
655 if (caster_ptr->stat_cur[i] < caster_ptr->stat_max[i]) {
656 if (caster_ptr->stat_cur[i] < 18)
657 caster_ptr->stat_cur[i]++;
659 caster_ptr->stat_cur[i] += 10;
661 if (caster_ptr->stat_cur[i] > caster_ptr->stat_max[i])
662 caster_ptr->stat_cur[i] = caster_ptr->stat_max[i];
663 caster_ptr->update |= (PU_BONUS);
670 msg_format(_("%sの呪文の詠唱をやめた。", "Finish casting '%^s'."), exe_spell(caster_ptr, REALM_HEX, HEX_RESTORE, SPELL_NAME));
671 casting_hex_flags(caster_ptr) &= ~(1L << HEX_RESTORE);
673 casting_hex_num(caster_ptr)--;
674 if (casting_hex_num(caster_ptr))
675 caster_ptr->action = ACTION_NONE;
677 caster_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
678 caster_ptr->redraw |= (PR_EXTRA);
687 return _("呪力吸収", "Drain curse power");
689 return _("呪われた武器の呪いを吸収して魔力を回復する。", "Drains curse on your weapon and heals SP a little.");
693 u32b f[TR_FLAG_SIZE];
696 item_tester_hook = item_tester_hook_cursed;
697 q = _("どの装備品から吸収しますか?", "Which cursed equipment do you drain mana from?");
698 s = _("呪われたアイテムを装備していない。", "You have no cursed equipment.");
700 o_ptr = choose_object(caster_ptr, &item, q, s, (USE_EQUIP), 0);
704 object_flags(caster_ptr, o_ptr, f);
706 caster_ptr->csp += (caster_ptr->lev / 5) + randint1(caster_ptr->lev / 5);
707 if (has_flag(f, TR_TY_CURSE) || (o_ptr->curse_flags & TRC_TY_CURSE))
708 caster_ptr->csp += randint1(5);
709 if (caster_ptr->csp > caster_ptr->msp)
710 caster_ptr->csp = caster_ptr->msp;
712 if (o_ptr->curse_flags & TRC_PERMA_CURSE) {
714 } else if (o_ptr->curse_flags & TRC_HEAVY_CURSE) {
716 msg_print(_("呪いを全て吸い取った。", "A heavy curse vanished."));
717 o_ptr->curse_flags = 0L;
719 } else if ((o_ptr->curse_flags & (TRC_CURSED)) && one_in_(3)) {
720 msg_print(_("呪いを全て吸い取った。", "A curse vanished."));
721 o_ptr->curse_flags = 0L;
730 return _("吸血の刃", "Swords to vampires");
732 return _("吸血属性で攻撃する。", "Gives vampiric ability to your weapon.");
735 msg_print("あなたの武器が血を欲している。");
737 if (!empty_hands(caster_ptr, FALSE))
738 msg_print("Your weapons want more blood now.");
740 msg_print("Your weapon wants more blood now.");
745 msg_print("武器の渇望が消え去った。");
747 msg_format("Your weapon%s less thirsty now.", (empty_hands(caster_ptr, FALSE)) ? " is" : "s are");
754 return _("朦朧の言葉", "Word of stun");
756 return _("視界内のモンスターを朦朧とさせる。", "Stuns all monsters in your sight.");
759 return info_power(power);
761 stun_monsters(caster_ptr, power);
767 return _("影移動", "Moving into shadow");
769 return _("モンスターの隣のマスに瞬間移動する。", "Teleports you close to a monster.");
775 for (i = 0; i < 3; i++) {
776 if (!tgt_pt(caster_ptr, &x, &y))
781 for (dir = 0; dir < 8; dir++) {
782 int dy = y + ddy_ddd[dir];
783 int dx = x + ddx_ddd[dir];
786 if (caster_ptr->current_floor_ptr->grid_array[dy][dx].m_idx)
790 if (!is_cave_empty_bold(caster_ptr, y, x) || (caster_ptr->current_floor_ptr->grid_array[y][x].info & CAVE_ICKY)
791 || (distance(y, x, caster_ptr->y, caster_ptr->x) > plev + 2)) {
792 msg_print(_("そこには移動できない。", "Can not teleport to there."));
798 if (flag && randint0(plev * plev / 2)) {
799 teleport_player_to(caster_ptr, y, x, TELEPORT_SPONTANEOUS);
801 msg_print(_("おっと!", "Oops!"));
802 teleport_player(caster_ptr, 30, TELEPORT_SPONTANEOUS);
811 return _("反魔法結界", "Anti magic barrier");
813 return _("視界内のモンスターの魔法を阻害するバリアを張る。", "Obstructs all magic spells of monsters in your sight.");
814 power = plev * 3 / 2;
816 return info_power(power);
818 msg_print(_("魔法を防ぐ呪いをかけた。", "You feel anyone can not cast spells except you."));
824 return _("復讐の宣告", "Revenge sentence");
827 "数ターン後にそれまで受けたダメージに応じた威力の地獄の劫火の弾を放つ。", "Fires a ball of hell fire to try avenging damage from a few turns.");
828 power = hex_revenge_power(caster_ptr);
830 return info_damage(0, 0, power);
833 int a = 3 - (caster_ptr->pspeed - 100) / 10;
834 r = 1 + randint1(2) + MAX(0, MIN(3, a));
836 if (hex_revenge_turn(caster_ptr) > 0) {
837 msg_print(_("すでに復讐は宣告済みだ。", "You've already declared your revenge."));
841 hex_revenge_type(caster_ptr) = 2;
842 hex_revenge_turn(caster_ptr) = r;
843 msg_format(_("あなたは復讐を宣告した。あと %d ターン。", "You declare your revenge. %d turns left."), r);
847 hex_revenge_turn(caster_ptr)--;
849 if (hex_revenge_turn(caster_ptr) <= 0) {
856 msg_print(_("復讐の時だ!", "Time for revenge!"));
857 } while (!get_aim_dir(caster_ptr, &dir));
859 fire_ball(caster_ptr, GF_HELL_FIRE, dir, power, 1);
861 if (current_world_ptr->wizard) {
862 msg_format(_("%d点のダメージを返した。", "You return %d damage."), power);
865 msg_print(_("復讐する気が失せた。", "You are not in the mood for revenge."));
867 hex_revenge_power(caster_ptr) = 0;
874 if ((cast) && (add)) {
876 casting_hex_flags(caster_ptr) |= 1L << (spell);
877 casting_hex_num(caster_ptr)++;
879 if (caster_ptr->action != ACTION_SPELL)
880 set_action(caster_ptr, ACTION_SPELL);
884 caster_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
885 caster_ptr->redraw |= (PR_EXTRA | PR_HP | PR_MANA);