return TRUE;
}
-bool_hack heroism(int base)
+bool_hack heroism(player_type *creature_ptr, int base)
{
bool_hack ident = FALSE;
- if (set_afraid(p_ptr, 0)) ident = TRUE;
- if (set_hero(p_ptr, p_ptr->hero + randint1(base) + base, FALSE)) ident = TRUE;
- if (hp_player(p_ptr, 10)) ident = TRUE;
+ if (set_afraid(creature_ptr, 0)) ident = TRUE;
+ if (set_hero(creature_ptr, creature_ptr->hero + randint1(base) + base, FALSE)) ident = TRUE;
+ if (hp_player(creature_ptr, 10)) ident = TRUE;
return ident;
}
-bool_hack berserk(int base)
+bool_hack berserk(player_type *creature_ptr, int base)
{
bool_hack ident = FALSE;
- if (set_afraid(p_ptr, 0)) ident = TRUE;
- if (set_shero(p_ptr, p_ptr->shero + randint1(base) + base, FALSE)) ident = TRUE;
- if (hp_player(p_ptr, 30)) ident = TRUE;
+ if (set_afraid(creature_ptr, 0)) ident = TRUE;
+ if (set_shero(creature_ptr, creature_ptr->shero + randint1(base) + base, FALSE)) ident = TRUE;
+ if (hp_player(creature_ptr, 30)) ident = TRUE;
return ident;
}
-bool_hack cure_light_wounds(DICE_NUMBER dice, DICE_SID sides)
+bool_hack cure_light_wounds(player_type *creature_ptr, DICE_NUMBER dice, DICE_SID sides)
{
bool_hack ident = FALSE;
- if (hp_player(p_ptr, damroll(dice, sides))) ident = TRUE;
- if (set_blind(p_ptr, 0)) ident = TRUE;
- if (set_cut(p_ptr,p_ptr->cut - 10)) ident = TRUE;
- if (set_shero(p_ptr, 0, TRUE)) ident = TRUE;
+ if (hp_player(creature_ptr, damroll(dice, sides))) ident = TRUE;
+ if (set_blind(creature_ptr, 0)) ident = TRUE;
+ if (set_cut(creature_ptr,creature_ptr->cut - 10)) ident = TRUE;
+ if (set_shero(creature_ptr, 0, TRUE)) ident = TRUE;
return ident;
}
-bool_hack cure_serious_wounds(DICE_NUMBER dice, DICE_SID sides)
+bool_hack cure_serious_wounds(player_type *creature_ptr, DICE_NUMBER dice, DICE_SID sides)
{
bool_hack ident = FALSE;
- if (hp_player(p_ptr, damroll(dice, sides))) ident = TRUE;
- if (set_blind(p_ptr, 0)) ident = TRUE;
- if (set_confused(p_ptr, 0)) ident = TRUE;
- if (set_cut(p_ptr,(p_ptr->cut / 2) - 50)) ident = TRUE;
- if (set_shero(p_ptr, 0, TRUE)) ident = TRUE;
+ if (hp_player(creature_ptr, damroll(dice, sides))) ident = TRUE;
+ if (set_blind(creature_ptr, 0)) ident = TRUE;
+ if (set_confused(creature_ptr, 0)) ident = TRUE;
+ if (set_cut(creature_ptr,(creature_ptr->cut / 2) - 50)) ident = TRUE;
+ if (set_shero(creature_ptr, 0, TRUE)) ident = TRUE;
return ident;
}
-bool_hack cure_critical_wounds(HIT_POINT pow)
+bool_hack cure_critical_wounds(player_type *creature_ptr, HIT_POINT pow)
{
bool_hack ident = FALSE;
- if (hp_player(p_ptr, pow)) ident = TRUE;
- if (set_blind(p_ptr, 0)) ident = TRUE;
- if (set_confused(p_ptr, 0)) ident = TRUE;
- if (set_poisoned(p_ptr, 0)) ident = TRUE;
- if (set_stun(p_ptr, 0)) ident = TRUE;
- if (set_cut(p_ptr,0)) ident = TRUE;
- if (set_shero(p_ptr, 0, TRUE)) ident = TRUE;
+ if (hp_player(creature_ptr, pow)) ident = TRUE;
+ if (set_blind(creature_ptr, 0)) ident = TRUE;
+ if (set_confused(creature_ptr, 0)) ident = TRUE;
+ if (set_poisoned(creature_ptr, 0)) ident = TRUE;
+ if (set_stun(creature_ptr, 0)) ident = TRUE;
+ if (set_cut(creature_ptr,0)) ident = TRUE;
+ if (set_shero(creature_ptr, 0, TRUE)) ident = TRUE;
return ident;
}
}
msg_print(_("体がねじれ始めた...", "Your body starts to scramble..."));
- status_shuffle();
+ status_shuffle(p_ptr);
break;
}
}
* @brief プレイヤーのステータスシャッフル処理
* @return なし
*/
-void status_shuffle(void)
+void status_shuffle(player_type *creature_ptr)
{
BASE_STATUS max1, cur1, max2, cur2;
int ii, jj, i;
ii = randint0(A_MAX);
for (jj = ii; jj == ii; jj = randint0(A_MAX)) /* loop */;
- max1 = p_ptr->stat_max[ii];
- cur1 = p_ptr->stat_cur[ii];
- max2 = p_ptr->stat_max[jj];
- cur2 = p_ptr->stat_cur[jj];
+ max1 = creature_ptr->stat_max[ii];
+ cur1 = creature_ptr->stat_cur[ii];
+ max2 = creature_ptr->stat_max[jj];
+ cur2 = creature_ptr->stat_cur[jj];
- p_ptr->stat_max[ii] = max2;
- p_ptr->stat_cur[ii] = cur2;
- p_ptr->stat_max[jj] = max1;
- p_ptr->stat_cur[jj] = cur1;
+ creature_ptr->stat_max[ii] = max2;
+ creature_ptr->stat_cur[ii] = cur2;
+ creature_ptr->stat_max[jj] = max1;
+ creature_ptr->stat_cur[jj] = cur1;
for (i = 0; i < A_MAX; i++)
{
- if (p_ptr->stat_max[i] > p_ptr->stat_max_max[i]) p_ptr->stat_max[i] = p_ptr->stat_max_max[i];
- if (p_ptr->stat_cur[i] > p_ptr->stat_max_max[i]) p_ptr->stat_cur[i] = p_ptr->stat_max_max[i];
+ if (creature_ptr->stat_max[i] > creature_ptr->stat_max_max[i]) creature_ptr->stat_max[i] = creature_ptr->stat_max_max[i];
+ if (creature_ptr->stat_cur[i] > creature_ptr->stat_max_max[i]) creature_ptr->stat_cur[i] = creature_ptr->stat_max_max[i];
}
- p_ptr->update |= (PU_BONUS);
+ creature_ptr->update |= (PU_BONUS);
}