OSDN Git Service

[Refactor] #38997 set_stun(), set_oppose_pois() に player_type * 引数を追加.
[hengband/hengband.git] / src / mind.c
index 2cf4056..9000d6d 100644 (file)
@@ -1107,11 +1107,11 @@ static bool cast_mindcrafter_spell(int spell)
        case 6:
                /* Character Armour */
                set_shield(p_ptr, (TIME_EFFECT)plev, FALSE);
-               if (plev > 14) set_oppose_acid((TIME_EFFECT)plev, FALSE);
-               if (plev > 19) set_oppose_fire((TIME_EFFECT)plev, FALSE);
-               if (plev > 24) set_oppose_cold((TIME_EFFECT)plev, FALSE);
-               if (plev > 29) set_oppose_elec((TIME_EFFECT)plev, FALSE);
-               if (plev > 34) set_oppose_pois((TIME_EFFECT)plev, FALSE);
+               if (plev > 14) set_oppose_acid(p_ptr, (TIME_EFFECT)plev, FALSE);
+               if (plev > 19) set_oppose_fire(p_ptr, (TIME_EFFECT)plev, FALSE);
+               if (plev > 24) set_oppose_cold(p_ptr, (TIME_EFFECT)plev, FALSE);
+               if (plev > 29) set_oppose_elec(p_ptr, (TIME_EFFECT)plev, FALSE);
+               if (plev > 34) set_oppose_pois(p_ptr, (TIME_EFFECT)plev, FALSE);
                break;
        case 7:
                /* Psychometry */
@@ -1208,7 +1208,7 @@ static bool cast_force_spell(int spell)
                (void)lite_area(damroll(2, (plev / 2)), (plev / 10) + 1);
                break;
        case 2:
-               set_tim_levitation(randint1(30) + 30 + boost / 5, FALSE);
+               set_tim_levitation(p_ptr, randint1(30) + 30 + boost / 5, FALSE);
                break;
        case 3:
                project_length = plev / 8 + 3;
@@ -1217,7 +1217,7 @@ static bool cast_force_spell(int spell)
                fire_beam(GF_MISSILE, dir, damroll(5 + ((plev - 1) / 5) + boost / 10, 5));
                break;
        case 4:
-               set_resist_magic(randint1(20) + 20 + boost / 5, FALSE);
+               set_resist_magic(p_ptr, randint1(20) + 20 + boost / 5, FALSE);
                break;
        case 5:
                msg_print(_("気を練った。", "You improved the Force."));
@@ -1232,7 +1232,7 @@ static bool cast_force_spell(int spell)
                else return TRUE;
                break;
        case 6:
-               set_tim_sh_touki(randint1(plev / 2) + 15 + boost / 7, FALSE);
+               set_tim_sh_touki(p_ptr, randint1(plev / 2) + 15 + boost / 7, FALSE);
                break;
        case 7:
                return shock_power();
@@ -1280,7 +1280,7 @@ static bool cast_force_spell(int spell)
                fire_beam(GF_MANA, dir, damroll(10 + (plev / 2) + boost * 3 / 10, 15));
                break;
        case 13:
-               set_lightspeed(randint1(16) + 16 + boost / 20, FALSE);
+               set_lightspeed(p_ptr, randint1(16) + 16 + boost / 20, FALSE);
                break;
        default:
                msg_print(_("なに?", "Zap?"));
@@ -1368,7 +1368,7 @@ static bool cast_mirror_spell(int spell)
                break;
                /* robe of dust */
        case 6:
-               set_dustrobe(20 + randint1(20), FALSE);
+               set_dustrobe(p_ptr, 20 + randint1(20), FALSE);
                break;
                /* banishing mirror */
        case 7:
@@ -1404,8 +1404,8 @@ static bool cast_mirror_spell(int spell)
        case 12:
                t = 20 + randint1(20);
                set_shield(p_ptr, t, FALSE);
-               if (plev > 31)set_tim_reflect(t, FALSE);
-               if (plev > 39)set_resist_magic(t, FALSE);
+               if (plev > 31)set_tim_reflect(p_ptr, t, FALSE);
+               if (plev > 39)set_resist_magic(p_ptr, t, FALSE);
                break;
                /* super ray */
        case 13:
@@ -1440,7 +1440,7 @@ static bool cast_mirror_spell(int spell)
                return recall_player(p_ptr, randint0(21) + 15);
                /* multi-shadow */
        case 18:
-               set_multishadow(6 + randint1(6), FALSE);
+               set_multishadow(p_ptr, 6 + randint1(6), FALSE);
                break;
                /* binding field */
        case 19:
@@ -1448,7 +1448,7 @@ static bool cast_mirror_spell(int spell)
                break;
                /* mirror of Ruffnor */
        case 20:
-               (void)set_invuln(randint1(4) + 4, FALSE);
+               (void)set_invuln(p_ptr, randint1(4) + 4, FALSE);
                break;
        default:
                msg_print(_("なに?", "Zap?"));
@@ -1601,12 +1601,12 @@ static bool cast_ninja_spell(int spell)
        case 7:
                return ident_spell(FALSE);
        case 8:
-               set_tim_levitation(randint1(20) + 20, FALSE);
+               set_tim_levitation(p_ptr, randint1(20) + 20, FALSE);
                break;
        case 9:
                fire_ball(GF_FIRE, 0, 50+plev, plev/10+2);
                teleport_player(30, 0L);
-               set_oppose_fire((TIME_EFFECT)plev, FALSE);
+               set_oppose_fire(p_ptr, (TIME_EFFECT)plev, FALSE);
                break;
        case 10:
                return rush_attack(NULL);
@@ -1718,8 +1718,8 @@ static bool cast_ninja_spell(int spell)
                explosive_rune();
                break;
        case 16:
-               (void)set_kabenuke(randint1(plev/2) + plev/2, FALSE);
-               set_oppose_acid((TIME_EFFECT)plev, FALSE);
+               (void)set_kabenuke(p_ptr, randint1(plev/2) + plev/2, FALSE);
+               set_oppose_acid(p_ptr, (TIME_EFFECT)plev, FALSE);
                break;
        case 17:
                fire_ball(GF_POIS, 0, 75+plev*2/3, plev/5+2);
@@ -1749,7 +1749,7 @@ static bool cast_ninja_spell(int spell)
                break;
        }
        case 19:
-               set_multishadow(6+randint1(6), FALSE);
+               set_multishadow(p_ptr, 6+randint1(6), FALSE);
                break;
        default:
                msg_print(_("なに?", "Zap?"));