OSDN Git Service

[Refactor] #38997 set_oppose_elec() に player_type * 引数を追加.
[hengband/hengband.git] / src / cmd-quaff.c
index d3d449f..6724e2d 100644 (file)
@@ -128,7 +128,7 @@ void exe_quaff_potion(INVENTORY_IDX item)
                        break;
 
                case SV_POTION_SLOWNESS:
-                       if (set_slow(randint1(25) + 15, FALSE)) ident = TRUE;
+                       if (set_slow(p_ptr, randint1(25) + 15, FALSE)) ident = TRUE;
                        break;
 
                case SV_POTION_SALT_WATER:
@@ -146,7 +146,7 @@ void exe_quaff_potion(INVENTORY_IDX item)
                        }
 
                        (void)set_poisoned(p_ptr, 0);
-                       (void)set_paralyzed(p_ptr->paralyzed + 4);
+                       (void)set_paralyzed(p_ptr, p_ptr->paralyzed + 4);
                        ident = TRUE;
                        break;
 
@@ -186,7 +186,7 @@ void exe_quaff_potion(INVENTORY_IDX item)
                                        /* Have some nightmares */
                                        sanity_blast(NULL, FALSE);
                                }
-                               if (set_paralyzed(p_ptr->paralyzed + randint0(4) + 4))
+                               if (set_paralyzed(p_ptr, p_ptr->paralyzed + randint0(4) + 4))
                                {
                                        ident = TRUE;
                                }
@@ -254,14 +254,14 @@ void exe_quaff_potion(INVENTORY_IDX item)
                        break;
 
                case SV_POTION_INFRAVISION:
-                       if (set_tim_infra(p_ptr->tim_infra + 100 + randint1(100), FALSE))
+                       if (set_tim_infra(p_ptr, p_ptr->tim_infra + 100 + randint1(100), FALSE))
                        {
                                ident = TRUE;
                        }
                        break;
 
                case SV_POTION_DETECT_INVIS:
-                       if (set_tim_invis(p_ptr->tim_invis + 12 + randint1(12), FALSE))
+                       if (set_tim_invis(p_ptr, p_ptr->tim_invis + 12 + randint1(12), FALSE))
                        {
                                ident = TRUE;
                        }
@@ -276,17 +276,17 @@ void exe_quaff_potion(INVENTORY_IDX item)
                        break;
 
                case SV_POTION_BOLDNESS:
-                       if (set_afraid(0)) ident = TRUE;
+                       if (set_afraid(p_ptr, 0)) ident = TRUE;
                        break;
 
                case SV_POTION_SPEED:
                        if (!p_ptr->fast)
                        {
-                               if (set_fast(randint1(25) + 15, FALSE)) ident = TRUE;
+                               if (set_fast(p_ptr, randint1(25) + 15, FALSE)) ident = TRUE;
                        }
                        else
                        {
-                               (void)set_fast(p_ptr->fast + 5, FALSE);
+                               (void)set_fast(p_ptr, p_ptr->fast + 5, FALSE);
                        }
                        break;
 
@@ -449,8 +449,8 @@ void exe_quaff_potion(INVENTORY_IDX item)
                        break;
 
                case SV_POTION_RESISTANCE:
-                       (void)set_oppose_acid(p_ptr->oppose_acid + randint1(20) + 20, FALSE);
-                       (void)set_oppose_elec(p_ptr->oppose_elec + randint1(20) + 20, FALSE);
+                       (void)set_oppose_acid(p_ptr, p_ptr->oppose_acid + randint1(20) + 20, FALSE);
+                       (void)set_oppose_elec(p_ptr, p_ptr->oppose_elec + randint1(20) + 20, FALSE);
                        (void)set_oppose_fire(p_ptr->oppose_fire + randint1(20) + 20, FALSE);
                        (void)set_oppose_cold(p_ptr->oppose_cold + randint1(20) + 20, FALSE);
                        (void)set_oppose_pois(p_ptr->oppose_pois + randint1(20) + 20, FALSE);
@@ -462,7 +462,7 @@ void exe_quaff_potion(INVENTORY_IDX item)
                        break;
 
                case SV_POTION_INVULNERABILITY:
-                       (void)set_invuln(p_ptr->invuln + randint1(4) + 4, FALSE);
+                       (void)set_invuln(p_ptr, p_ptr->invuln + randint1(4) + 4, FALSE);
                        ident = TRUE;
                        break;
 
@@ -475,8 +475,8 @@ void exe_quaff_potion(INVENTORY_IDX item)
                        break;
 
                case SV_POTION_NEO_TSUYOSHI:
-                       (void)set_image(0);
-                       (void)set_tsuyoshi(p_ptr->tsuyoshi + randint1(100) + 100, FALSE);
+                       (void)set_image(p_ptr, 0);
+                       (void)set_tsuyoshi(p_ptr, p_ptr->tsuyoshi + randint1(100) + 100, FALSE);
                        ident = TRUE;
                        break;
 
@@ -484,10 +484,10 @@ void exe_quaff_potion(INVENTORY_IDX item)
                        msg_print(_("「オクレ兄さん!」", "Brother OKURE!"));
                        msg_print(NULL);
                        p_ptr->tsuyoshi = 1;
-                       (void)set_tsuyoshi(0, TRUE);
+                       (void)set_tsuyoshi(p_ptr, 0, TRUE);
                        if (!p_ptr->resist_chaos)
                        {
-                               (void)set_image(50 + randint1(50));
+                               (void)set_image(p_ptr, 50 + randint1(50));
                        }
                        ident = TRUE;
                        break;