OSDN Git Service

[Refactor] #37353 鏡使いのレイシャル「静水」を mirror_concentration() に分離。 / Separate Mirror master...
[hengband/hengband.git] / src / mind.c
index 3d115a6..6aa219b 100644 (file)
 
 #include "angband.h"
 #include "melee.h"
+#include "projection.h"
+#include "spells-summon.h"
+#include "avatar.h"
+#include "player-status.h"
+#include "spells-status.h"
 
 /*! 特殊技能の一覧テーブル */
 mind_power const mind_powers[5] =
@@ -288,7 +293,7 @@ mind_power const mind_powers[5] =
 };
 
 /*! 特殊能力の解説文字列 */
-static cptr const mind_tips[5][MAX_MIND_POWERS] =
+static concptr const mind_tips[5][MAX_MIND_POWERS] =
 {
 #ifdef JP
 {
@@ -536,13 +541,13 @@ static cptr const mind_tips[5][MAX_MIND_POWERS] =
 void mindcraft_info(char *p, int use_mind, int power)
 {
 #ifdef JP
-       cptr s_dam = "損傷:";
-       cptr s_dur = "期間:";
-       cptr s_range = "範囲:";
+       concptr s_dam = "損傷:";
+       concptr s_dur = "期間:";
+       concptr s_range = "範囲:";
 #else
-       cptr s_dam = "dam ";
-       cptr s_dur = "dur ";
-       cptr s_range = "range ";
+       concptr s_dam = "dam ";
+       concptr s_dur = "dur ";
+       concptr s_range = "range ";
 #endif
        PLAYER_LEVEL plev = p_ptr->lev;
 
@@ -687,7 +692,7 @@ static bool_hack get_mind_power(SPELL_IDX *sn, bool only_browse)
        char            choice;
        char            out_val[160];
        char            comment[80];
-       cptr            p;
+       concptr            p;
        COMMAND_CODE code;
        mind_type       spell;
        const mind_power      *mind_ptr;
@@ -851,8 +856,8 @@ static bool_hack get_mind_power(SPELL_IDX *sn, bool only_browse)
                                put_str(format(_("Lv   %s   失率 効果", "Lv   %s   Fail Info"),
                                        ((use_mind == MIND_BERSERKER) || (use_mind == MIND_NINJUTSU)) ? "HP" : "MP"), y, x + 35);
 
-                               has_weapon[0] = buki_motteruka(INVEN_RARM);
-                               has_weapon[1] = buki_motteruka(INVEN_LARM);
+                               has_weapon[0] = has_melee_weapon(INVEN_RARM);
+                               has_weapon[1] = has_melee_weapon(INVEN_LARM);
 
                                /* Dump the spells */
                                for (i = 0; i < MAX_MIND_POWERS; i++)
@@ -1441,7 +1446,7 @@ static bool cast_mirror_spell(int spell)
 
                /* mirror of recall */
        case 17:
-               return word_of_recall();
+               return recall_player(p_ptr, randint0(21) + 15);
                /* multi-shadow */
        case 18:
                set_multishadow(6 + randint1(6), FALSE);
@@ -1689,13 +1694,8 @@ static bool cast_ninja_spell(int spell)
                /* Wake the monster up */
                (void)set_monster_csleep(m_idx, 0);
 
-               /* Update the monster (new location) */
                update_monster(m_idx, TRUE);
-
-               /* Redraw the old grid */
                lite_spot(target_row, target_col);
-
-               /* Redraw the new grid */
                lite_spot(ty, tx);
 
                if (r_info[m_ptr->r_idx].flags7 & (RF7_LITE_MASK | RF7_DARK_MASK))
@@ -1786,7 +1786,7 @@ void do_cmd_mind(void)
        mind_type       spell;
        bool            cast;
        int             use_mind, mana_cost;
-       cptr            p;
+       concptr            p;
        bool            on_mirror = FALSE;
 
        /* not if confused */
@@ -1830,9 +1830,9 @@ void do_cmd_mind(void)
        {
                if (heavy_armor()) chance += 20;
                if (p_ptr->icky_wield[0]) chance += 20;
-               else if (buki_motteruka(INVEN_RARM)) chance += 10;
+               else if (has_melee_weapon(INVEN_RARM)) chance += 10;
                if (p_ptr->icky_wield[1]) chance += 20;
-               else if (buki_motteruka(INVEN_LARM)) chance += 10;
+               else if (has_melee_weapon(INVEN_LARM)) chance += 10;
                if (n == 5)
                {
                        int j;