OSDN Git Service

[Refactor] #37353 spells.hにスペルに関する共通定義を追加。。 / Add common definition to spells.h.
[hengband/hengband.git] / src / snipe.c
index 1d24e38..3900818 100644 (file)
@@ -7,6 +7,7 @@
  */
 
 #include "angband.h"
+#include "player-status.h"
 
 #define MAX_SNIPE_POWERS 16
 
@@ -18,11 +19,11 @@ struct snipe_power
 {
        int     min_lev;
        int     mana_cost;
-       cptr name;
+       concptr name;
 };
 
 /*! スナイパー技能の解説メッセージ */
-static cptr const snipe_tips[MAX_SNIPE_POWERS] =
+static concptr const snipe_tips[MAX_SNIPE_POWERS] =
 {
 #ifdef JP
        "精神を集中する。射撃の威力、精度が上がり、高度な射撃術が使用できるようになる。",
@@ -219,7 +220,7 @@ static int get_snipe_power(COMMAND_CODE *sn, bool only_browse)
        int             ask;
        char            choice;
        char            out_val[160];
-       cptr            p = _("射撃術", "power");
+       concptr            p = _("射撃術", "power");
        snipe_power     spell;
        bool            flag, redraw;
 
@@ -505,7 +506,7 @@ static bool cast_sniper_spell(int spell)
        {
        case 0: /* Concentration */
                if (!snipe_concentrate()) return (FALSE);
-               p_ptr->energy_use = 100;
+               take_turn(p_ptr, 100);;
                return (TRUE);
        case 1: snipe_type = SP_LITE; break;
        case 2: snipe_type = SP_AWAY; break;
@@ -542,13 +543,7 @@ void do_cmd_snipe(void)
        COMMAND_CODE n = 0;
        bool            cast;
 
-
-       /* not if confused */
-       if (p_ptr->confused)
-       {
-               msg_print(_("混乱していて集中できない!", "You are too confused!"));
-               return;
-       }
+       if (cmd_limit_confused(p_ptr)) return;
 
        /* not if hullucinated */
        if (p_ptr->image)