(void)set_oppose_acid(p_ptr, 0, TRUE);
(void)set_oppose_elec(p_ptr, 0, TRUE);
(void)set_oppose_fire(p_ptr, 0, TRUE);
- (void)set_oppose_cold(0, TRUE);
+ (void)set_oppose_cold(p_ptr, 0, TRUE);
(void)set_oppose_pois(0, TRUE);
(void)set_ultimate_res(0, TRUE);
(void)set_mimic(p_ptr, 0, 0, TRUE);
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_oppose_cold(TIME_EFFECT v, bool do_dec)
+bool set_oppose_cold(player_type *creature_ptr, TIME_EFFECT v, bool do_dec)
{
bool notice = FALSE;
v = (v > 10000) ? 10000 : (v < 0) ? 0 : v;
- if (p_ptr->is_dead) return FALSE;
+ if (creature_ptr->is_dead) return FALSE;
/* Open */
if (v)
{
- if (p_ptr->oppose_cold && !do_dec)
+ if (creature_ptr->oppose_cold && !do_dec)
{
- if (p_ptr->oppose_cold > v) return FALSE;
+ if (creature_ptr->oppose_cold > v) return FALSE;
}
else if (!IS_OPPOSE_COLD())
{
/* Shut */
else
{
- if (p_ptr->oppose_cold && !music_singing(MUSIC_RESIST) && !(p_ptr->special_defense & KATA_MUSOU))
+ if (creature_ptr->oppose_cold && !music_singing(MUSIC_RESIST) && !(creature_ptr->special_defense & KATA_MUSOU))
{
msg_print(_("冷気への耐性が薄れた気がする。", "You feel less resistant to cold."));
notice = TRUE;
}
/* Use the value */
- p_ptr->oppose_cold = v;
+ creature_ptr->oppose_cold = v;
/* Nothing to notice */
if (!notice) return (FALSE);
- p_ptr->redraw |= (PR_STATUS);
+ creature_ptr->redraw |= (PR_STATUS);
if (disturb_state) disturb(FALSE, FALSE);
handle_stuff();