OSDN Git Service

[fix] #40282 コンフリクト解決残しを修正. / Resolve conflicts left behind.
[hengband/hengband.git] / src / realm-hex.c
index dd3303c..45a0607 100644 (file)
@@ -5,23 +5,38 @@
  * @author
  * 2014 Deskull rearranged comment for Doxygen.\n
  * @details
- * p_ptr-magic_num1\n
+ * magic_num1\n
  * 0: Flag bits of spelling spells\n
  * 1: Flag bits of despelled spells\n
  * 2: Revange damage\n
- * p_ptr->magic_num2\n
+ * magic_num2\n
  * 0: Number of spelling spells\n
  * 1: Type of revenge\n
  * 2: Turn count for revenge\n
  */
 
 #include "angband.h"
+#include "util.h"
+
+#include "floor.h"
 #include "cmd-spell.h"
 #include "cmd-quaff.h"
+#include "object-flavor.h"
 #include "object-hook.h"
 #include "object-curse.h"
-#include "projection.h"
 #include "spells-status.h"
+#include "spells.h"
+#include "player-status.h"
+#include "player-effects.h"
+#include "player-skill.h"
+#include "player-inventory.h"
+#include "realm-hex.h"
+#include "grid.h"
+#include "monsterrace.h"
+#include "targeting.h"
+#include "realm-song.h"
+#include "view-mainwindow.h"
+#include "world.h"
 
 #define MAX_KEEP 4 /*!<呪術の最大詠唱数 */
 
  * @brief プレイヤーが詠唱中の全呪術を停止する
  * @return なし
  */
-bool stop_hex_spell_all(void)
+bool stop_hex_spell_all(player_type *caster_ptr)
 {
        SPELL_IDX i;
 
        for (i = 0; i < 32; i++)
        {
-               if (hex_spelling(i)) do_spell(REALM_HEX, i, SPELL_STOP);
+               if (hex_spelling(caster_ptr, i)) exe_spell(caster_ptr, REALM_HEX, i, SPELL_STOP);
        }
 
-       CASTING_HEX_FLAGS(p_ptr) = 0;
-       CASTING_HEX_NUM(p_ptr) = 0;
+       CASTING_HEX_FLAGS(caster_ptr) = 0;
+       CASTING_HEX_NUM(caster_ptr) = 0;
 
-       if (p_ptr->action == ACTION_SPELL) set_action(ACTION_NONE);
+       if (caster_ptr->action == ACTION_SPELL) set_action(caster_ptr, ACTION_NONE);
 
-       p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
-       p_ptr->redraw |= (PR_EXTRA | PR_HP | PR_MANA);
+       caster_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
+       caster_ptr->redraw |= (PR_EXTRA | PR_HP | PR_MANA);
 
        return TRUE;
 }
@@ -53,7 +68,7 @@ bool stop_hex_spell_all(void)
  * @brief プレイヤーが詠唱中の呪術から一つを選んで停止する
  * @return なし
  */
-bool stop_hex_spell(void)
+bool stop_hex_spell(player_type *caster_ptr)
 {
        int spell;
        char choice = 0;
@@ -63,21 +78,21 @@ bool stop_hex_spell(void)
        TERM_LEN x = 20;
        int sp[MAX_KEEP];
 
-       if (!hex_spelling_any())
+       if (!hex_spelling_any(caster_ptr))
        {
                msg_print(_("呪文を詠唱していません。", "You are casting no spell."));
                return FALSE;
        }
 
        /* Stop all spells */
-       else if ((CASTING_HEX_NUM(p_ptr) == 1) || (p_ptr->lev < 35))
+       else if ((CASTING_HEX_NUM(caster_ptr) == 1) || (caster_ptr->lev < 35))
        {
-               return stop_hex_spell_all();
+               return stop_hex_spell_all(caster_ptr);
        }
        else
        {
                strnfmt(out_val, 78, _("どの呪文の詠唱を中断しますか?(呪文 %c-%c, 'l'全て, ESC)", "Which spell do you stop casting? (Spell %c-%c, 'l' to all, ESC)"),
-                       I2A(0), I2A(CASTING_HEX_NUM(p_ptr) - 1));
+                       I2A(0), I2A(CASTING_HEX_NUM(caster_ptr) - 1));
 
                screen_save();
 
@@ -88,10 +103,10 @@ bool stop_hex_spell(void)
                        prt(_("     名前", "     Name"), y, x + 5);
                        for (spell = 0; spell < 32; spell++)
                        {
-                               if (hex_spelling(spell))
+                               if (hex_spelling(caster_ptr, spell))
                                {
                                        Term_erase(x, y + n + 1, 255);
-                                       put_str(format("%c)  %s", I2A(n), do_spell(REALM_HEX, spell, SPELL_NAME)), y + n + 1, x + 2);
+                                       put_str(format("%c)  %s", I2A(n), exe_spell(caster_ptr, REALM_HEX, spell, SPELL_NAME)), y + n + 1, x + 2);
                                        sp[n++] = spell;
                                }
                        }
@@ -102,9 +117,9 @@ bool stop_hex_spell(void)
                        if (choice == 'l')      /* All */
                        {
                                screen_load();
-                               return stop_hex_spell_all();
+                               return stop_hex_spell_all(caster_ptr);
                        }
-                       if ((choice < I2A(0)) || (choice > I2A(CASTING_HEX_NUM(p_ptr) - 1))) continue;
+                       if ((choice < I2A(0)) || (choice > I2A(CASTING_HEX_NUM(caster_ptr) - 1))) continue;
                        flag = TRUE;
                }
        }
@@ -115,13 +130,13 @@ bool stop_hex_spell(void)
        {
                int n = sp[A2I(choice)];
 
-               do_spell(REALM_HEX, n, SPELL_STOP);
-               CASTING_HEX_FLAGS(p_ptr) &= ~(1L << n);
-               CASTING_HEX_NUM(p_ptr)--;
+               exe_spell(caster_ptr, REALM_HEX, n, SPELL_STOP);
+               CASTING_HEX_FLAGS(caster_ptr) &= ~(1L << n);
+               CASTING_HEX_NUM(caster_ptr)--;
        }
 
-       p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
-       p_ptr->redraw |= (PR_EXTRA | PR_HP | PR_MANA);
+       caster_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
+       caster_ptr->redraw |= (PR_EXTRA | PR_HP | PR_MANA);
 
        return flag;
 }
@@ -132,7 +147,7 @@ bool stop_hex_spell(void)
  * Upkeeping hex spells Called from dungeon.c
  * @return なし
  */
-void check_hex(void)
+void check_hex(player_type *caster_ptr)
 {
        int spell;
        MANA_POINT need_mana;
@@ -140,62 +155,62 @@ void check_hex(void)
        bool res = FALSE;
 
        /* Spells spelled by player */
-       if (p_ptr->realm1 != REALM_HEX) return;
-       if (!CASTING_HEX_FLAGS(p_ptr) && !p_ptr->magic_num1[1]) return;
+       if (caster_ptr->realm1 != REALM_HEX) return;
+       if (!CASTING_HEX_FLAGS(caster_ptr) && !caster_ptr->magic_num1[1]) return;
 
-       if (p_ptr->magic_num1[1])
+       if (caster_ptr->magic_num1[1])
        {
-               p_ptr->magic_num1[0] = p_ptr->magic_num1[1];
-               p_ptr->magic_num1[1] = 0;
+               caster_ptr->magic_num1[0] = caster_ptr->magic_num1[1];
+               caster_ptr->magic_num1[1] = 0;
                res = TRUE;
        }
 
        /* Stop all spells when anti-magic ability is given */
-       if (p_ptr->anti_magic)
+       if (caster_ptr->anti_magic)
        {
-               stop_hex_spell_all();
+               stop_hex_spell_all(caster_ptr);
                return;
        }
 
        need_mana = 0;
        for (spell = 0; spell < 32; spell++)
        {
-               if (hex_spelling(spell))
+               if (hex_spelling(caster_ptr, spell))
                {
                        const magic_type *s_ptr;
                        s_ptr = &technic_info[REALM_HEX - MIN_TECHNIC][spell];
-                       need_mana += mod_need_mana(s_ptr->smana, spell, REALM_HEX);
+                       need_mana += mod_need_mana(caster_ptr, s_ptr->smana, spell, REALM_HEX);
                }
        }
 
        /* Culcurates final mana cost */
        need_mana_frac = 0;
        s64b_div(&need_mana, &need_mana_frac, 0, 3); /* Divide by 3 */
-       need_mana += (CASTING_HEX_NUM(p_ptr) - 1);
+       need_mana += (CASTING_HEX_NUM(caster_ptr) - 1);
 
        /* Not enough mana */
-       if (s64b_cmp(p_ptr->csp, p_ptr->csp_frac, need_mana, need_mana_frac) < 0)
+       if (s64b_cmp(caster_ptr->csp, caster_ptr->csp_frac, need_mana, need_mana_frac) < 0)
        {
-               stop_hex_spell_all();
+               stop_hex_spell_all(caster_ptr);
                return;
        }
 
        /* Enough mana */
        else
        {
-               s64b_sub(&(p_ptr->csp), &(p_ptr->csp_frac), need_mana, need_mana_frac);
+               s64b_sub(&(caster_ptr->csp), &(caster_ptr->csp_frac), need_mana, need_mana_frac);
 
-               p_ptr->redraw |= PR_MANA;
+               caster_ptr->redraw |= PR_MANA;
                if (res)
                {
-                       msg_print(_("詠唱を再開した。", "You restart spelling."));
+                       msg_print(_("詠唱を再開した。", "You restart casting."));
 
-                       p_ptr->action = ACTION_SPELL;
+                       caster_ptr->action = ACTION_SPELL;
 
-                       p_ptr->update |= (PU_BONUS | PU_HP);
-                       p_ptr->redraw |= (PR_MAP | PR_STATUS | PR_STATE);
-                       p_ptr->update |= (PU_MONSTERS);
-                       p_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
+                       caster_ptr->update |= (PU_BONUS | PU_HP);
+                       caster_ptr->redraw |= (PR_MAP | PR_STATUS | PR_STATE);
+                       caster_ptr->update |= (PU_MONSTERS);
+                       caster_ptr->window |= (PW_OVERHEAD | PW_DUNGEON);
                }
        }
 
@@ -204,26 +219,26 @@ void check_hex(void)
        {
                const magic_type *s_ptr;
 
-               if (!hex_spelling(spell)) continue;
+               if (!hex_spelling(caster_ptr, spell)) continue;
 
                s_ptr = &technic_info[REALM_HEX - MIN_TECHNIC][spell];
 
-               if (p_ptr->spell_exp[spell] < SPELL_EXP_BEGINNER)
-                       p_ptr->spell_exp[spell] += 5;
-               else if(p_ptr->spell_exp[spell] < SPELL_EXP_SKILLED)
-               { if (one_in_(2) && (current_floor_ptr->dun_level > 4) && ((current_floor_ptr->dun_level + 10) > p_ptr->lev)) p_ptr->spell_exp[spell] += 1; }
-               else if(p_ptr->spell_exp[spell] < SPELL_EXP_EXPERT)
-               { if (one_in_(5) && ((current_floor_ptr->dun_level + 5) > p_ptr->lev) && ((current_floor_ptr->dun_level + 5) > s_ptr->slevel)) p_ptr->spell_exp[spell] += 1; }
-               else if(p_ptr->spell_exp[spell] < SPELL_EXP_MASTER)
-               { if (one_in_(5) && ((current_floor_ptr->dun_level + 5) > p_ptr->lev) && (current_floor_ptr->dun_level > s_ptr->slevel)) p_ptr->spell_exp[spell] += 1; }
+               if (caster_ptr->spell_exp[spell] < SPELL_EXP_BEGINNER)
+                       caster_ptr->spell_exp[spell] += 5;
+               else if(caster_ptr->spell_exp[spell] < SPELL_EXP_SKILLED)
+               { if (one_in_(2) && (caster_ptr->current_floor_ptr->dun_level > 4) && ((caster_ptr->current_floor_ptr->dun_level + 10) > caster_ptr->lev)) caster_ptr->spell_exp[spell] += 1; }
+               else if(caster_ptr->spell_exp[spell] < SPELL_EXP_EXPERT)
+               { if (one_in_(5) && ((caster_ptr->current_floor_ptr->dun_level + 5) > caster_ptr->lev) && ((caster_ptr->current_floor_ptr->dun_level + 5) > s_ptr->slevel)) caster_ptr->spell_exp[spell] += 1; }
+               else if(caster_ptr->spell_exp[spell] < SPELL_EXP_MASTER)
+               { if (one_in_(5) && ((caster_ptr->current_floor_ptr->dun_level + 5) > caster_ptr->lev) && (caster_ptr->current_floor_ptr->dun_level > s_ptr->slevel)) caster_ptr->spell_exp[spell] += 1; }
        }
 
        /* Do any effects of continual spells */
        for (spell = 0; spell < 32; spell++)
        {
-               if (hex_spelling(spell))
+               if (hex_spelling(caster_ptr, spell))
                {
-                       do_spell(REALM_HEX, spell, SPELL_CONT);
+                       exe_spell(caster_ptr, REALM_HEX, spell, SPELL_CONT);
                }
        }
 }
@@ -232,12 +247,12 @@ void check_hex(void)
  * @brief プレイヤーの呪術詠唱枠がすでに最大かどうかを返す
  * @return すでに全枠を利用しているならTRUEを返す
  */
-bool hex_spell_fully(void)
+bool hex_spell_fully(player_type *caster_ptr)
 {
        int k_max = 0;
-       k_max = (p_ptr->lev / 15) + 1;
+       k_max = (caster_ptr->lev / 15) + 1;
        k_max = MIN(k_max, MAX_KEEP);
-       if (CASTING_HEX_NUM(p_ptr) < k_max) return FALSE;
+       if (CASTING_HEX_NUM(caster_ptr) < k_max) return FALSE;
        return TRUE;
 }
 
@@ -245,15 +260,15 @@ bool hex_spell_fully(void)
  * @brief 一定ゲームターン毎に復讐処理の残り期間の判定を行う
  * @return なし
  */
-void revenge_spell(void)
+void revenge_spell(player_type *caster_ptr)
 {
-       if (p_ptr->realm1 != REALM_HEX) return;
-       if (HEX_REVENGE_TURN(p_ptr) <= 0) return;
+       if (caster_ptr->realm1 != REALM_HEX) return;
+       if (HEX_REVENGE_TURN(caster_ptr) <= 0) return;
 
-       switch(HEX_REVENGE_TYPE(p_ptr))
+       switch(HEX_REVENGE_TYPE(caster_ptr))
        {
-               case 1: do_spell(REALM_HEX, HEX_PATIENCE, SPELL_CONT); break;
-               case 2: do_spell(REALM_HEX, HEX_REVENGE, SPELL_CONT); break;
+               case 1: exe_spell(caster_ptr, REALM_HEX, HEX_PATIENCE, SPELL_CONT); break;
+               case 2: exe_spell(caster_ptr, REALM_HEX, HEX_REVENGE, SPELL_CONT); break;
        }
 }
 
@@ -262,12 +277,12 @@ void revenge_spell(void)
  * @param dam 蓄積されるダメージ量
  * @return なし
  */
-void revenge_store(HIT_POINT dam)
+void revenge_store(player_type *caster_ptr, HIT_POINT dam)
 {
-       if (p_ptr->realm1 != REALM_HEX) return;
-       if (HEX_REVENGE_TURN(p_ptr) <= 0) return;
+       if (caster_ptr->realm1 != REALM_HEX) return;
+       if (HEX_REVENGE_TURN(caster_ptr) <= 0) return;
 
-       HEX_REVENGE_POWER(p_ptr) += dam;
+       HEX_REVENGE_POWER(caster_ptr) += dam;
 }
 
 /*!
@@ -275,13 +290,13 @@ void revenge_store(HIT_POINT dam)
  * @param m_idx 判定の対象となるモンスターID
  * @return 反テレポートの効果が適用されるならTRUEを返す
  */
-bool teleport_barrier(MONSTER_IDX m_idx)
+bool teleport_barrier(player_type *caster_ptr, MONSTER_IDX m_idx)
 {
-       monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
+       monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[m_idx];
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
-       if (!hex_spelling(HEX_ANTI_TELE)) return FALSE;
-       if ((p_ptr->lev * 3 / 2) < randint1(r_ptr->level)) return FALSE;
+       if (!hex_spelling(caster_ptr, HEX_ANTI_TELE)) return FALSE;
+       if ((caster_ptr->lev * 3 / 2) < randint1(r_ptr->level)) return FALSE;
 
        return TRUE;
 }
@@ -291,13 +306,13 @@ bool teleport_barrier(MONSTER_IDX m_idx)
  * @param m_idx 判定の対象となるモンスターID
  * @return 反魔法の効果が適用されるならTRUEを返す
  */
-bool magic_barrier(MONSTER_IDX m_idx)
+bool magic_barrier(player_type *target_ptr, MONSTER_IDX m_idx)
 {
-       monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
+       monster_type *m_ptr = &target_ptr->current_floor_ptr->m_list[m_idx];
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
-       if (!hex_spelling(HEX_ANTI_MAGIC)) return FALSE;
-       if ((p_ptr->lev * 3 / 2) < randint1(r_ptr->level)) return FALSE;
+       if (!hex_spelling(target_ptr, HEX_ANTI_MAGIC)) return FALSE;
+       if ((target_ptr->lev * 3 / 2) < randint1(r_ptr->level)) return FALSE;
 
        return TRUE;
 }
@@ -307,13 +322,13 @@ bool magic_barrier(MONSTER_IDX m_idx)
  * @param m_idx 判定の対象となるモンスターID
  * @return 反増殖の効果が適用されるならTRUEを返す
  */
-bool multiply_barrier(MONSTER_IDX m_idx)
+bool multiply_barrier(player_type *caster_ptr, MONSTER_IDX m_idx)
 {
-       monster_type *m_ptr = &current_floor_ptr->m_list[m_idx];
+       monster_type *m_ptr = &caster_ptr->current_floor_ptr->m_list[m_idx];
        monster_race *r_ptr = &r_info[m_ptr->r_idx];
 
-       if (!hex_spelling(HEX_ANTI_MULTI)) return FALSE;
-       if ((p_ptr->lev * 3 / 2) < randint1(r_ptr->level)) return FALSE;
+       if (!hex_spelling(caster_ptr, HEX_ANTI_MULTI)) return FALSE;
+       if ((caster_ptr->lev * 3 / 2) < randint1(r_ptr->level)) return FALSE;
 
        return TRUE;
 }
@@ -324,7 +339,7 @@ bool multiply_barrier(MONSTER_IDX m_idx)
 * @param mode 処理内容 (SPELL_NAME / SPELL_DESC / SPELL_INFO / SPELL_CAST / SPELL_CONT / SPELL_STOP)
 * @return SPELL_NAME / SPELL_DESC / SPELL_INFO 時には文字列ポインタを返す。SPELL_CAST / SPELL_CONT / SPELL_STOP 時はNULL文字列を返す。
 */
-concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
+concptr do_hex_spell(player_type *caster_ptr, SPELL_IDX spell, BIT_FLAGS mode)
 {
        bool name = (mode == SPELL_NAME) ? TRUE : FALSE;
        bool desc = (mode == SPELL_DESC) ? TRUE : FALSE;
@@ -335,7 +350,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        bool add = TRUE;
 
-       PLAYER_LEVEL plev = p_ptr->lev;
+       PLAYER_LEVEL plev = caster_ptr->lev;
        HIT_POINT power;
 
        switch (spell)
@@ -346,14 +361,14 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("祝福により攻撃精度と防御力が上がる。", "Attempts to increase +to_hit of a weapon and AC");
                if (cast)
                {
-                       if (!p_ptr->blessed)
+                       if (!caster_ptr->blessed)
                        {
                                msg_print(_("高潔な気分になった!", "You feel righteous!"));
                        }
                }
                if (stop)
                {
-                       if (!p_ptr->blessed)
+                       if (!caster_ptr->blessed)
                        {
                                msg_print(_("高潔な気分が消え失せた。", "The prayer has expired."));
                        }
@@ -362,13 +377,13 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 1:
                if (name) return _("軽傷の治癒", "Cure light wounds");
-               if (desc) return _("HPや傷を少し回復させる。", "Heals cut and HP a little.");
+               if (desc) return _("HPや傷を少し回復させる。", "Heals cuts and HP a little.");
                if (info) return info_heal(1, 10, 0);
                if (cast)
                {
-                       msg_print(_("気分が良くなってくる。", "You feel better and better."));
+                       msg_print(_("気分が良くなってくる。", "You feel a little better."));
                }
-               if (cast || cont) (void)cure_light_wounds(1, 10);
+               if (cast || cont) (void)cure_light_wounds(caster_ptr, 1, 10);
                break;
 
        case 2:
@@ -376,22 +391,22 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("炎のオーラを身にまとい、回復速度が速くなる。", "Gives fire aura and regeneration.");
                if (cast)
                {
-                       msg_print(_("体が炎のオーラで覆われた。", "You have enveloped by fiery aura!"));
+                       msg_print(_("体が炎のオーラで覆われた。", "You are enveloped by a fiery aura!"));
                }
                if (stop)
                {
-                       msg_print(_("炎のオーラが消え去った。", "Fiery aura disappeared."));
+                       msg_print(_("炎のオーラが消え去った。", "The fiery aura disappeared."));
                }
                break;
 
        case 3:
                if (name) return _("悪臭霧", "Stinking mist");
-               if (desc) return _("視界内のモンスターに微弱量の毒のダメージを与える。", "Deals few damages of poison to all monsters in your sight.");
+               if (desc) return _("視界内のモンスターに微弱量の毒のダメージを与える。", "Deals a little poison damage to all monsters in your sight.");
                power = plev / 2 + 5;
                if (info) return info_damage(1, power, 0);
                if (cast || cont)
                {
-                       project_all_los(GF_POIS, randint1(power));
+                       project_all_los(caster_ptr, GF_POIS, randint1(power));
                }
                break;
 
@@ -400,7 +415,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("術者の腕力を上昇させる。", "Attempts to increase your strength.");
                if (cast)
                {
-                       msg_print(_("何だか力が湧いて来る。", "You feel you get stronger."));
+                       msg_print(_("何だか力が湧いて来る。", "You feel stronger."));
                }
                break;
 
@@ -417,12 +432,12 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                        item_tester_hook = item_tester_hook_weapon_except_bow;
                        q = _("どれを呪いますか?", "Which weapon do you curse?");
-                       s = _("武器を装備していない。", "You wield no weapons.");
+                       s = _("武器を装備していない。", "You're not wielding a weapon.");
 
-                       o_ptr = choose_object(&item, q, s, (USE_EQUIP));
+                       o_ptr = choose_object(caster_ptr, &item, q, s, (USE_EQUIP), 0);
                        if (!o_ptr) return FALSE;
 
-                       object_desc(o_name, o_ptr, OD_NAME_ONLY);
+                       object_desc(caster_ptr, o_name, o_ptr, OD_NAME_ONLY);
                        object_flags(o_ptr, f);
 
                        if (!get_check(format(_("本当に %s を呪いますか?", "Do you curse %s, really?"), o_name))) return FALSE;
@@ -477,7 +492,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                                o_ptr->curse_flags |= get_curse(curse_rank, o_ptr);
                        }
 
-                       p_ptr->update |= (PU_BONUS);
+                       caster_ptr->update |= (PU_BONUS);
                        add = FALSE;
                }
                break;
@@ -488,93 +503,93 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (info) return info_range(MAX_SIGHT);
                if (cast)
                {
-                       msg_print(_("邪悪な生物の存在を感じ取ろうとした。", "You attend to the presence of evil creatures."));
+                       msg_print(_("邪悪な生物の存在を感じ取ろうとした。", "You sense the presence of evil creatures."));
                }
                break;
 
        case 7:
                if (name) return _("我慢", "Patience");
                if (desc) return _("数ターン攻撃を耐えた後、受けたダメージを地獄の業火として周囲に放出する。",
-                       "Bursts hell fire strongly after patients any damage while few turns.");
-               power = MIN(200, (HEX_REVENGE_POWER(p_ptr) * 2));
+               "Bursts hell fire strongly after enduring damage for a few turns.");
+               power = MIN(200, (HEX_REVENGE_POWER(caster_ptr) * 2));
                if (info) return info_damage(0, 0, power);
                if (cast)
                {
-                       int a = 3 - (p_ptr->pspeed - 100) / 10;
+                       int a = 3 - (caster_ptr->pspeed - 100) / 10;
                        MAGIC_NUM2 r = 3 + randint1(3) + MAX(0, MIN(3, a));
 
-                       if (HEX_REVENGE_TURN(p_ptr) > 0)
+                       if (HEX_REVENGE_TURN(caster_ptr) > 0)
                        {
-                               msg_print(_("すでに我慢をしている。", "You are already patienting."));
+                               msg_print(_("すでに我慢をしている。", "You are already biding your time for vengeance."));
                                return NULL;
                        }
 
-                       HEX_REVENGE_TYPE(p_ptr) = 1;
-                       HEX_REVENGE_TURN(p_ptr) = r;
-                       HEX_REVENGE_POWER(p_ptr) = 0;
-                       msg_print(_("じっと耐えることにした。", "You decide to patient all damages."));
+                       HEX_REVENGE_TYPE(caster_ptr) = 1;
+                       HEX_REVENGE_TURN(caster_ptr) = r;
+                       HEX_REVENGE_POWER(caster_ptr) = 0;
+                       msg_print(_("じっと耐えることにした。", "You decide to endure damage for future retribution."));
                        add = FALSE;
                }
                if (cont)
                {
                        POSITION rad = 2 + (power / 50);
 
-                       HEX_REVENGE_TURN(p_ptr)--;
+                       HEX_REVENGE_TURN(caster_ptr)--;
 
-                       if ((HEX_REVENGE_TURN(p_ptr) <= 0) || (power >= 200))
+                       if ((HEX_REVENGE_TURN(caster_ptr) <= 0) || (power >= 200))
                        {
-                               msg_print(_("我慢が解かれた!", "Time for end of patioence!"));
+                               msg_print(_("我慢が解かれた!", "My patience is at an end!"));
                                if (power)
                                {
-                                       project(0, rad, p_ptr->y, p_ptr->x, power, GF_HELL_FIRE,
+                                       project(caster_ptr, 0, rad, caster_ptr->y, caster_ptr->x, power, GF_HELL_FIRE,
                                                (PROJECT_STOP | PROJECT_GRID | PROJECT_ITEM | PROJECT_KILL), -1);
                                }
-                               if (p_ptr->wizard)
+                               if (current_world_ptr->wizard)
                                {
-                                       msg_format(_("%d点のダメージを返した。", "You return %d damages."), power);
+                                       msg_format(_("%d点のダメージを返した。", "You return %d damage."), power);
                                }
 
                                /* Reset */
-                               HEX_REVENGE_TYPE(p_ptr) = 0;
-                               HEX_REVENGE_TURN(p_ptr) = 0;
-                               HEX_REVENGE_POWER(p_ptr) = 0;
+                               HEX_REVENGE_TYPE(caster_ptr) = 0;
+                               HEX_REVENGE_TURN(caster_ptr) = 0;
+                               HEX_REVENGE_POWER(caster_ptr) = 0;
                        }
                }
                break;
 
                /*** 2nd book (8-15) ***/
        case 8:
-               if (name) return _("氷の鎧", "Ice armor");
-               if (desc) return _("氷のオーラを身にまとい、防御力が上昇する。", "Gives fire aura and bonus to AC.");
+               if (name) return _("氷の鎧", "Armor of ice");
+               if (desc) return _("氷のオーラを身にまとい、防御力が上昇する。", "Surrounds you with an icy aura and gives a bonus to AC.");
                if (cast)
                {
-                       msg_print(_("体が氷の鎧で覆われた。", "You have enveloped by ice armor!"));
+                       msg_print(_("体が氷の鎧で覆われた。", "You are enveloped by icy armor!"));
                }
                if (stop)
                {
-                       msg_print(_("氷の鎧が消え去った。", "Ice armor disappeared."));
+                       msg_print(_("氷の鎧が消え去った。", "The icy armor disappeared."));
                }
                break;
 
        case 9:
                if (name) return _("重傷の治癒", "Cure serious wounds");
-               if (desc) return _("体力や傷を多少回復させる。", "Heals cut and HP more.");
+               if (desc) return _("体力や傷を多少回復させる。", "Heals cuts and HP.");
                if (info) return info_heal(2, 10, 0);
                if (cast)
                {
-                       msg_print(_("気分が良くなってくる。", "You feel better and better."));
+                       msg_print(_("気分が良くなってくる。", "You feel better."));
                }
-               if (cast || cont) (void)cure_serious_wounds(2, 10);
+               if (cast || cont) (void)cure_serious_wounds(caster_ptr, 2, 10);
                break;
 
        case 10:
-               if (name) return _("薬品吸入", "Inhail potion");
-               if (desc) return _("呪文詠唱を中止することなく、薬の効果を得ることができる。", "Quaffs a potion without canceling of casting a spell.");
+               if (name) return _("薬品吸入", "Inhale potion");
+               if (desc) return _("呪文詠唱を中止することなく、薬の効果を得ることができる。", "Quaffs a potion without canceling spell casting.");
                if (cast)
                {
-                       CASTING_HEX_FLAGS(p_ptr) |= (1L << HEX_INHAIL);
-                       do_cmd_quaff_potion();
-                       CASTING_HEX_FLAGS(p_ptr) &= ~(1L << HEX_INHAIL);
+                       CASTING_HEX_FLAGS(caster_ptr) |= (1L << HEX_INHAIL);
+                       do_cmd_quaff_potion(caster_ptr);
+                       CASTING_HEX_FLAGS(caster_ptr) &= ~(1L << HEX_INHAIL);
                        add = FALSE;
                }
                break;
@@ -582,25 +597,25 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 11:
                if (name) return _("衰弱の霧", "Hypodynamic mist");
                if (desc) return _("視界内のモンスターに微弱量の衰弱属性のダメージを与える。",
-                       "Deals few damages of hypodynamia to all monsters in your sight.");
+                       "Deals a little life-draining damage to all monsters in your sight.");
                power = (plev / 2) + 5;
                if (info) return info_damage(1, power, 0);
                if (cast || cont)
                {
-                       project_all_los(GF_HYPODYNAMIA, randint1(power));
+                       project_all_los(caster_ptr, GF_HYPODYNAMIA, randint1(power));
                }
                break;
 
        case 12:
                if (name) return _("魔剣化", "Swords to runeswords");
                if (desc) return _("武器の攻撃力を上げる。切れ味を得、呪いに応じて与えるダメージが上昇し、善良なモンスターに対するダメージが2倍になる。",
-                       "Gives vorpal ability to your weapon. Increases damages by your weapon acccording to curse of your weapon.");
+                       "Gives vorpal ability to your weapon. Increases damage from your weapon acccording to curse of your weapon.");
                if (cast)
                {
 #ifdef JP
                        msg_print("あなたの武器が黒く輝いた。");
 #else
-                       if (!empty_hands(FALSE))
+                       if (!empty_hands(caster_ptr, FALSE))
                                msg_print("Your weapons glow bright black.");
                        else
                                msg_print("Your weapon glows bright black.");
@@ -611,7 +626,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
 #ifdef JP
                        msg_print("武器の輝きが消え去った。");
 #else
-                       msg_format("Brightness of weapon%s disappeared.", (empty_hands(FALSE)) ? "" : "s");
+                       msg_format("Your weapon%s.", (empty_hands(caster_ptr, FALSE)) ? " no longer glows" : "s no longer glow");
 #endif
                }
                break;
@@ -625,7 +640,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                }
                if (stop)
                {
-                       msg_print(_("手の輝きがなくなった。", "Brightness on your hands disappeard."));
+                       msg_print(_("手の輝きがなくなった。", "Your hands no longer glow."));
                }
                break;
 
@@ -635,7 +650,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        "Attempts to increases your strength, dexterity and constitusion.");
                if (cast)
                {
-                       msg_print(_("身体が強くなった気がした。", "You feel your body is developed more now."));
+                       msg_print(_("身体が強くなった気がした。", "You feel your body is more developed now."));
                }
                break;
 
@@ -656,23 +671,23 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("電気のオーラを身にまとい、動きが速くなる。", "Gives lightning aura and a bonus to speed.");
                if (cast)
                {
-                       msg_print(_("体が稲妻のオーラで覆われた。", "You have enveloped by electrical aura!"));
+                       msg_print(_("体が稲妻のオーラで覆われた。", "You are enveloped by an electrical aura!"));
                }
                if (stop)
                {
-                       msg_print(_("稲妻のオーラが消え去った。", "Electrical aura disappeared."));
+                       msg_print(_("稲妻のオーラが消え去った。", "The electrical aura disappeared."));
                }
                break;
 
        case 17:
                if (name) return _("致命傷の治癒", "Cure critical wounds");
-               if (desc) return _("体力や傷を回復させる。", "Heals cut and HP greatry.");
+               if (desc) return _("体力や傷を回復させる。", "Heals cuts and HP greatly.");
                if (info) return info_heal(4, 10, 0);
                if (cast)
                {
-                       msg_print(_("気分が良くなってくる。", "You feel better and better."));
+                       msg_print(_("気分が良くなってくる。", "You feel much better."));
                }
-               if (cast || cont) (void)cure_critical_wounds(damroll(4, 10));
+               if (cast || cont) (void)cure_critical_wounds(caster_ptr, damroll(4, 10));
                break;
 
        case 18:
@@ -682,7 +697,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (info) return info_power(power);
                if (cast)
                {
-                       if (!recharge(power)) return NULL;
+                       if (!recharge(caster_ptr, power)) return NULL;
                        add = FALSE;
                }
                break;
@@ -692,11 +707,11 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("死体を蘇らせてペットにする。", "Raises corpses and skeletons from dead.");
                if (cast)
                {
-                       msg_print(_("死者への呼びかけを始めた。", "You start to call deads.!"));
+                       msg_print(_("死者への呼びかけを始めた。", "You start to call the dead.!"));
                }
                if (cast || cont)
                {
-                       animate_dead(0, p_ptr->y, p_ptr->x);
+                       animate_dead(caster_ptr, 0, caster_ptr->y, caster_ptr->x);
                }
                break;
 
@@ -713,13 +728,13 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                        item_tester_hook = object_is_armour;
                        q = _("どれを呪いますか?", "Which piece of armour do you curse?");
-                       s = _("防具を装備していない。", "You wield no piece of armours.");
+                       s = _("防具を装備していない。", "You're not wearing any armor.");
 
-                       o_ptr = choose_object(&item, q, s, (USE_EQUIP));
+                       o_ptr = choose_object(caster_ptr, &item, q, s, (USE_EQUIP), 0);
                        if (!o_ptr) return FALSE;
 
-                       o_ptr = &inventory[item];
-                       object_desc(o_name, o_ptr, OD_NAME_ONLY);
+                       o_ptr = &caster_ptr->inventory_list[item];
+                       object_desc(caster_ptr, o_name, o_ptr, OD_NAME_ONLY);
                        object_flags(o_ptr, f);
 
                        if (!get_check(format(_("本当に %s を呪いますか?", "Do you curse %s, really?"), o_name))) return FALSE;
@@ -775,7 +790,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                                o_ptr->curse_flags |= get_curse(curse_rank, o_ptr);
                        }
 
-                       p_ptr->update |= (PU_BONUS);
+                       caster_ptr->update |= (PU_BONUS);
                        add = FALSE;
                }
                break;
@@ -785,11 +800,11 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("影のオーラを身にまとい、敵に影のダメージを与える。", "Gives aura of shadow.");
                if (cast)
                {
-                       object_type *o_ptr = &inventory[INVEN_OUTER];
+                       object_type *o_ptr = &caster_ptr->inventory_list[INVEN_OUTER];
 
                        if (!o_ptr->k_idx)
                        {
-                               msg_print(_("クロークを身につけていない!", "You don't ware any cloak."));
+                               msg_print(_("クロークを身につけていない!", "You are not wearing a cloak."));
                                return NULL;
                        }
                        else if (!object_is_cursed(o_ptr))
@@ -799,35 +814,35 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        }
                        else
                        {
-                               msg_print(_("影のオーラを身にまとった。", "You have enveloped by shadow aura!"));
+                               msg_print(_("影のオーラを身にまとった。", "You are enveloped by a shadowy aura!"));
                        }
                }
                if (cont)
                {
-                       object_type *o_ptr = &inventory[INVEN_OUTER];
+                       object_type *o_ptr = &caster_ptr->inventory_list[INVEN_OUTER];
 
                        if ((!o_ptr->k_idx) || (!object_is_cursed(o_ptr)))
                        {
-                               do_spell(REALM_HEX, spell, SPELL_STOP);
-                               CASTING_HEX_FLAGS(p_ptr) &= ~(1L << spell);
-                               CASTING_HEX_NUM(p_ptr)--;
-                               if (!SINGING_SONG_ID(p_ptr)) set_action(ACTION_NONE);
+                               exe_spell(caster_ptr, REALM_HEX, spell, SPELL_STOP);
+                               CASTING_HEX_FLAGS(caster_ptr) &= ~(1L << spell);
+                               CASTING_HEX_NUM(caster_ptr)--;
+                               if (!SINGING_SONG_ID(caster_ptr)) set_action(caster_ptr, ACTION_NONE);
                        }
                }
                if (stop)
                {
-                       msg_print(_("影のオーラが消え去った。", "Shadow aura disappeared."));
+                       msg_print(_("影のオーラが消え去った。", "The shadowy aura disappeared."));
                }
                break;
 
        case 22:
-               if (name) return _("苦痛を魔力に", "Pains to mana");
-               if (desc) return _("視界内のモンスターに精神ダメージ与え、魔力を吸い取る。", "Deals psychic damages to all monsters in sight, and drains some mana.");
+               if (name) return _("苦痛を魔力に", "Pain to mana");
+               if (desc) return _("視界内のモンスターに精神ダメージ与え、魔力を吸い取る。", "Deals psychic damage to all monsters in sight and drains some mana.");
                power = plev * 3 / 2;
                if (info) return info_damage(1, power, 0);
                if (cast || cont)
                {
-                       project_all_los(GF_PSI_DRAIN, randint1(power));
+                       project_all_los(caster_ptr, GF_PSI_DRAIN, randint1(power));
                }
                break;
 
@@ -836,7 +851,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (desc) return _("打撃や魔法で受けたダメージを、攻撃元のモンスターにも与える。", "Returns same damage which you got to the monster which damaged you.");
                if (cast)
                {
-                       msg_print(_("復讐したい欲望にかられた。", "You wish strongly you want to revenge anything."));
+                       msg_print(_("復讐したい欲望にかられた。", "You feel very vengeful."));
                }
                break;
 
@@ -860,34 +875,34 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (cast || cont)
                {
                        bool flag = FALSE;
-                       int d = (p_ptr->max_exp - p_ptr->exp);
-                       int r = (p_ptr->exp / 20);
+                       int d = (caster_ptr->max_exp - caster_ptr->exp);
+                       int r = (caster_ptr->exp / 20);
                        int i;
 
                        if (d > 0)
                        {
                                if (d < r)
-                                       p_ptr->exp = p_ptr->max_exp;
+                                       caster_ptr->exp = caster_ptr->max_exp;
                                else
-                                       p_ptr->exp += r;
+                                       caster_ptr->exp += r;
 
                                /* Check the experience */
-                               check_experience();
+                               check_experience(caster_ptr);
 
                                flag = TRUE;
                        }
                        for (i = A_STR; i < A_MAX; i++)
                        {
-                               if (p_ptr->stat_cur[i] < p_ptr->stat_max[i])
+                               if (caster_ptr->stat_cur[i] < caster_ptr->stat_max[i])
                                {
-                                       if (p_ptr->stat_cur[i] < 18)
-                                               p_ptr->stat_cur[i]++;
+                                       if (caster_ptr->stat_cur[i] < 18)
+                                               caster_ptr->stat_cur[i]++;
                                        else
-                                               p_ptr->stat_cur[i] += 10;
+                                               caster_ptr->stat_cur[i] += 10;
 
-                                       if (p_ptr->stat_cur[i] > p_ptr->stat_max[i])
-                                               p_ptr->stat_cur[i] = p_ptr->stat_max[i];
-                                       p_ptr->update |= (PU_BONUS);
+                                       if (caster_ptr->stat_cur[i] > caster_ptr->stat_max[i])
+                                               caster_ptr->stat_cur[i] = caster_ptr->stat_max[i];
+                                       caster_ptr->update |= (PU_BONUS);
 
                                        flag = TRUE;
                                }
@@ -895,13 +910,13 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (!flag)
                        {
-                               msg_format(_("%sの呪文の詠唱をやめた。", "Finish casting '%^s'."), do_spell(REALM_HEX, HEX_RESTORE, SPELL_NAME));
-                               CASTING_HEX_FLAGS(p_ptr) &= ~(1L << HEX_RESTORE);
-                               if (cont) CASTING_HEX_NUM(p_ptr)--;
-                               if (CASTING_HEX_NUM(p_ptr)) p_ptr->action = ACTION_NONE;
+                               msg_format(_("%sの呪文の詠唱をやめた。", "Finish casting '%^s'."), exe_spell(caster_ptr, REALM_HEX, HEX_RESTORE, SPELL_NAME));
+                               CASTING_HEX_FLAGS(caster_ptr) &= ~(1L << HEX_RESTORE);
+                               if (cont) CASTING_HEX_NUM(caster_ptr)--;
+                               if (CASTING_HEX_NUM(caster_ptr)) caster_ptr->action = ACTION_NONE;
 
-                               p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
-                               p_ptr->redraw |= (PR_EXTRA);
+                               caster_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
+                               caster_ptr->redraw |= (PR_EXTRA);
 
                                return "";
                        }
@@ -922,14 +937,14 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        q = _("どの装備品から吸収しますか?", "Which cursed equipment do you drain mana from?");
                        s = _("呪われたアイテムを装備していない。", "You have no cursed equipment.");
 
-                       o_ptr = choose_object(&item, q, s, (USE_EQUIP));
+                       o_ptr = choose_object(caster_ptr, &item, q, s, (USE_EQUIP), 0);
                        if (!o_ptr) return FALSE;
 
                        object_flags(o_ptr, f);
 
-                       p_ptr->csp += (p_ptr->lev / 5) + randint1(p_ptr->lev / 5);
-                       if (have_flag(f, TR_TY_CURSE) || (o_ptr->curse_flags & TRC_TY_CURSE)) p_ptr->csp += randint1(5);
-                       if (p_ptr->csp > p_ptr->msp) p_ptr->csp = p_ptr->msp;
+                       caster_ptr->csp += (caster_ptr->lev / 5) + randint1(caster_ptr->lev / 5);
+                       if (have_flag(f, TR_TY_CURSE) || (o_ptr->curse_flags & TRC_TY_CURSE)) caster_ptr->csp += randint1(5);
+                       if (caster_ptr->csp > caster_ptr->msp) caster_ptr->csp = caster_ptr->msp;
 
                        if (o_ptr->curse_flags & TRC_PERMA_CURSE)
                        {
@@ -939,13 +954,13 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                        {
                                if (one_in_(7))
                                {
-                                       msg_print(_("呪いを全て吸い取った。", "Heavy curse vanished away."));
+                                       msg_print(_("呪いを全て吸い取った。", "A heavy curse vanished."));
                                        o_ptr->curse_flags = 0L;
                                }
                        }
                        else if ((o_ptr->curse_flags & (TRC_CURSED)) && one_in_(3))
                        {
-                               msg_print(_("呪いを全て吸い取った。", "Curse vanished away."));
+                               msg_print(_("呪いを全て吸い取った。", "A curse vanished."));
                                o_ptr->curse_flags = 0L;
                        }
 
@@ -961,7 +976,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
 #ifdef JP
                        msg_print("あなたの武器が血を欲している。");
 #else
-                       if (!empty_hands(FALSE))
+                       if (!empty_hands(caster_ptr, FALSE))
                                msg_print("Your weapons want more blood now.");
                        else
                                msg_print("Your weapon wants more blood now.");
@@ -972,7 +987,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
 #ifdef JP
                        msg_print("武器の渇望が消え去った。");
 #else
-                       msg_format("Thirsty of weapon%s disappeared.", (empty_hands(FALSE)) ? "" : "s");
+                       msg_format("Your weapon%s less thirsty now.", (empty_hands(caster_ptr, FALSE)) ? " is" : "s are");
 #endif
                }
                break;
@@ -984,7 +999,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                if (info) return info_power(power);
                if (cast || cont)
                {
-                       stun_monsters(power);
+                       stun_monsters(caster_ptr, power);
                }
                break;
 
@@ -999,7 +1014,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                        for (i = 0; i < 3; i++)
                        {
-                               if (!tgt_pt(&x, &y)) return FALSE;
+                               if (!tgt_pt(caster_ptr, &x, &y)) return FALSE;
 
                                flag = FALSE;
 
@@ -1008,11 +1023,11 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
                                        int dy = y + ddy_ddd[dir];
                                        int dx = x + ddx_ddd[dir];
                                        if (dir == 5) continue;
-                                       if (current_floor_ptr->grid_array[dy][dx].m_idx) flag = TRUE;
+                                       if (caster_ptr->current_floor_ptr->grid_array[dy][dx].m_idx) flag = TRUE;
                                }
 
-                               if (!cave_empty_bold(y, x) || (current_floor_ptr->grid_array[y][x].info & CAVE_ICKY) ||
-                                       (distance(y, x, p_ptr->y, p_ptr->x) > plev + 2))
+                               if (!is_cave_empty_bold(caster_ptr, y, x) || (caster_ptr->current_floor_ptr->grid_array[y][x].info & CAVE_ICKY) ||
+                                       (distance(y, x, caster_ptr->y, caster_ptr->x) > plev + 2))
                                {
                                        msg_print(_("そこには移動できない。", "Can not teleport to there."));
                                        continue;
@@ -1022,12 +1037,12 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                        if (flag && randint0(plev * plev / 2))
                        {
-                               teleport_player_to(y, x, 0L);
+                               teleport_player_to(caster_ptr, y, x, 0L);
                        }
                        else
                        {
                                msg_print(_("おっと!", "Oops!"));
-                               teleport_player(30, 0L);
+                               teleport_player(caster_ptr, 30, 0L);
                        }
 
                        add = FALSE;
@@ -1036,7 +1051,7 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
        case 30:
                if (name) return _("反魔法結界", "Anti magic barrier");
-               if (desc) return _("視界内のモンスターの魔法を阻害するバリアを張る。", "Obstructs all magic spell of monsters in your sight.");
+               if (desc) return _("視界内のモンスターの魔法を阻害するバリアを張る。", "Obstructs all magic spells of monsters in your sight.");
                power = plev * 3 / 2;
                if (info) return info_power(power);
                if (cast)
@@ -1048,31 +1063,31 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
        case 31:
                if (name) return _("復讐の宣告", "Revenge sentence");
                if (desc) return _("数ターン後にそれまで受けたダメージに応じた威力の地獄の劫火の弾を放つ。",
-                       "Fires  a ball of hell fire to try revenging after few turns.");
-               power = HEX_REVENGE_POWER(p_ptr);
+                       "Fires a ball of hell fire to try avenging damage from a few turns.");
+               power = HEX_REVENGE_POWER(caster_ptr);
                if (info) return info_damage(0, 0, power);
                if (cast)
                {
                        MAGIC_NUM2 r;
-                       int a = 3 - (p_ptr->pspeed - 100) / 10;
+                       int a = 3 - (caster_ptr->pspeed - 100) / 10;
                        r = 1 + randint1(2) + MAX(0, MIN(3, a));
 
-                       if (HEX_REVENGE_TURN(p_ptr) > 0)
+                       if (HEX_REVENGE_TURN(caster_ptr) > 0)
                        {
-                               msg_print(_("すでに復讐は宣告済みだ。", "You already pronounced your revenge."));
+                               msg_print(_("すでに復讐は宣告済みだ。", "You've already declared your revenge."));
                                return NULL;
                        }
 
-                       HEX_REVENGE_TYPE(p_ptr) = 2;
-                       HEX_REVENGE_TURN(p_ptr) = r;
-                       msg_format(_("あなたは復讐を宣告した。あと %d ターン。", "You pronounce your revenge. %d turns left."), r);
+                       HEX_REVENGE_TYPE(caster_ptr) = 2;
+                       HEX_REVENGE_TURN(caster_ptr) = r;
+                       msg_format(_("あなたは復讐を宣告した。あと %d ターン。", "You declare your revenge. %d turns left."), r);
                        add = FALSE;
                }
                if (cont)
                {
-                       HEX_REVENGE_TURN(p_ptr)--;
+                       HEX_REVENGE_TURN(caster_ptr)--;
 
-                       if (HEX_REVENGE_TURN(p_ptr) <= 0)
+                       if (HEX_REVENGE_TURN(caster_ptr) <= 0)
                        {
                                DIRECTION dir;
 
@@ -1082,21 +1097,21 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
 
                                        do
                                        {
-                                               msg_print(_("復讐の時だ!", "Time to revenge!"));
-                                       } while (!get_aim_dir(&dir));
+                                               msg_print(_("復讐の時だ!", "Time for revenge!"));
+                                       } while (!get_aim_dir(caster_ptr, &dir));
 
-                                       fire_ball(GF_HELL_FIRE, dir, power, 1);
+                                       fire_ball(caster_ptr, GF_HELL_FIRE, dir, power, 1);
 
-                                       if (p_ptr->wizard)
+                                       if (current_world_ptr->wizard)
                                        {
-                                               msg_format(_("%d点のダメージを返した。", "You return %d damages."), power);
+                                               msg_format(_("%d点のダメージを返した。", "You return %d damage."), power);
                                        }
                                }
                                else
                                {
-                                       msg_print(_("復讐する気が失せた。", "You are not a mood to revenge."));
+                                       msg_print(_("復讐する気が失せた。", "You are not in the mood for revenge."));
                                }
-                               HEX_REVENGE_POWER(p_ptr) = 0;
+                               HEX_REVENGE_POWER(caster_ptr) = 0;
                        }
                }
                break;
@@ -1106,17 +1121,22 @@ concptr do_hex_spell(SPELL_IDX spell, BIT_FLAGS mode)
        if ((cast) && (add))
        {
                /* add spell */
-               CASTING_HEX_FLAGS(p_ptr) |= 1L << (spell);
-               CASTING_HEX_NUM(p_ptr)++;
+               CASTING_HEX_FLAGS(caster_ptr) |= 1L << (spell);
+               CASTING_HEX_NUM(caster_ptr)++;
 
-               if (p_ptr->action != ACTION_SPELL) set_action(ACTION_SPELL);
+               if (caster_ptr->action != ACTION_SPELL) set_action(caster_ptr, ACTION_SPELL);
        }
 
        if (!info)
        {
-               p_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
-               p_ptr->redraw |= (PR_EXTRA | PR_HP | PR_MANA);
+               caster_ptr->update |= (PU_BONUS | PU_HP | PU_MANA | PU_SPELLS);
+               caster_ptr->redraw |= (PR_EXTRA | PR_HP | PR_MANA);
        }
 
        return "";
 }
+
+bool hex_spelling(player_type *caster_ptr, int hex)
+{
+       return (caster_ptr->realm1 == REALM_HEX) && (caster_ptr->magic_num1[0] & (1L << (hex)));
+}