OSDN Git Service

#37287 #37353 (2.2.0.89) FEAT_POWER 型を定義し、型の置換を継続中。 / Define FEAT_POWER, ongoing...
[hengband/hengband.git] / src / hissatsu.c
index 2a7af74..ec0316e 100644 (file)
  * when you run it. It's probably easy to fix but I haven't tried,\n
  * sorry.\n
  */
-static int get_hissatsu_power(int *sn)
+static int get_hissatsu_power(SPELL_IDX *sn)
 {
-       int             i, j = 0;
+       SPELL_IDX i;
+       int j = 0;
        int             num = 0;
        int             y = 1;
        int             x = 15;
@@ -42,7 +43,7 @@ static int get_hissatsu_power(int *sn)
        int             ask = TRUE;
        char            choice;
        char            out_val[160];
-       char sentaku[32];
+       SPELL_IDX sentaku[32];
        cptr            p = _("必殺剣", "special attack");
 
        magic_type spell;
@@ -253,7 +254,7 @@ static int get_hissatsu_power(int *sn)
                                ask = (isupper(choice));
 
                                /* Lowercase */
-                               if (ask) choice = tolower(choice);
+                               if (ask) choice = (char)tolower(choice);
 
                                /* Extract request */
                                i = (islower(choice) ? A2I(choice) : -1);
@@ -324,7 +325,7 @@ static int get_hissatsu_power(int *sn)
  */
 void do_cmd_hissatsu(void)
 {
-       int             n = 0;
+       SPELL_IDX       n = 0;
        magic_type      spell;
 
 
@@ -372,7 +373,7 @@ void do_cmd_hissatsu(void)
        if (!do_spell(REALM_HISSATSU, n, SPELL_CAST)) return;
 
        /* Take a turn */
-       energy_use = 100;
+       p_ptr->energy_use = 100;
 
        /* Use some mana */
        p_ptr->csp -= spell.smana;
@@ -479,7 +480,7 @@ void do_cmd_gain_hissatsu(void)
 
        /* Take a turn */
        else
-               energy_use = 100;
+               p_ptr->energy_use = 100;
 
        p_ptr->update |= (PU_SPELLS);
 }