OSDN Git Service

#37287 #37353 (2.2.0.89) 型の置換を継続中。 / Ongoing type replacement.
[hengband/hengband.git] / src / mspells3.c
index d48a77e..a2bc371 100644 (file)
@@ -205,9 +205,9 @@ static int get_learned_power(SPELL_IDX *sn)
        int             num = 0;
        int             y = 1;
        int             x = 18;
-       int             minfail = 0;
-       int             plev = p_ptr->lev;
-       int             chance = 0;
+       PERCENTAGE minfail = 0;
+       PLAYER_LEVEL plev = p_ptr->lev;
+       PERCENTAGE chance = 0;
        int             ask = TRUE, mode = 0;
        int             spellnum[MAX_MONSPELLS];
        char            ch;
@@ -216,7 +216,7 @@ static int get_learned_power(SPELL_IDX *sn)
        char            comment[80];
        s32b            f4 = 0, f5 = 0, f6 = 0;
        cptr            p = _("魔法", "magic");
-
+       COMMAND_CODE code;
        monster_power   spell;
        bool            flag, redraw;
        int menu_line = (use_menu ? 1 : 0);
@@ -233,11 +233,13 @@ static int get_learned_power(SPELL_IDX *sn)
 #ifdef ALLOW_REPEAT /* TNB */
 
        /* Get the spell, if available */
-       if (repeat_pull(sn))
+       
+       if (repeat_pull(&code))
        {
                /* Success */
                return (TRUE);
        }
+       *sn = (SPELL_IDX)code;
 
 #endif /* ALLOW_REPEAT -- TNB */
 
@@ -587,7 +589,7 @@ static int get_learned_power(SPELL_IDX *sn)
 
 #ifdef ALLOW_REPEAT /* TNB */
 
-       repeat_push(*sn);
+       repeat_push((COMMAND_CODE)spellnum[i]);
 
 #endif /* ALLOW_REPEAT -- TNB */
 
@@ -605,13 +607,13 @@ static int get_learned_power(SPELL_IDX *sn)
  */
 static bool cast_learned_spell(int spell, bool success)
 {
-       int             dir;
-       int             plev = pseudo_plev();
-       int     summon_lev = p_ptr->lev * 2 / 3 + randint1(p_ptr->lev/2);
-       int             damage = 0;
-       bool   pet = success;
-       bool   no_trump = FALSE;
-       u32b p_mode, u_mode = 0L, g_mode;
+       DIRECTION dir;
+       PLAYER_LEVEL plev = pseudo_plev();
+       PLAYER_LEVEL summon_lev = p_ptr->lev * 2 / 3 + randint1(p_ptr->lev/2);
+       HIT_POINT damage = 0;
+       bool pet = success;
+       bool no_trump = FALSE;
+       BIT_FLAGS p_mode, u_mode = 0L, g_mode;
 
        if (pet)
        {
@@ -1464,12 +1466,12 @@ static bool cast_learned_spell(int spell, bool success)
 bool do_cmd_cast_learned(void)
 {
        SPELL_IDX n = 0;
-       int             chance;
-       int             minfail = 0;
-       int             plev = p_ptr->lev;
-       monster_power   spell;
-       bool            cast;
-       int             need_mana;
+       PERCENTAGE chance;
+       PERCENTAGE minfail = 0;
+       PLAYER_LEVEL plev = p_ptr->lev;
+       monster_power spell;
+       bool cast;
+       MANA_POINT need_mana;
 
 
        /* not if confused */