(void)set_afraid(p_ptr, 0);
(void)set_hero(randint1(50) + 50, FALSE);
(void)hp_player(p_ptr, 10);
- (void)set_blessed(randint1(50) + 50, FALSE);
+ (void)set_blessed(p_ptr, randint1(50) + 50, FALSE);
(void)set_oppose_acid(randint1(50) + 50, FALSE);
(void)set_oppose_elec(randint1(50) + 50, FALSE);
(void)set_oppose_fire(randint1(50) + 50, FALSE);
(void)set_afraid(p_ptr, 0);
(void)set_hero(v, FALSE);
(void)hp_player(p_ptr, 10);
- (void)set_blessed(v, FALSE);
+ (void)set_blessed(p_ptr, v, FALSE);
(void)set_oppose_acid(v, FALSE);
(void)set_oppose_elec(v, FALSE);
(void)set_oppose_fire(v, FALSE);
case SV_SCROLL_BLESSING:
{
- if (set_blessed(p_ptr->blessed + randint1(12) + 6, FALSE)) ident = TRUE;
+ if (set_blessed(p_ptr, p_ptr->blessed + randint1(12) + 6, FALSE)) ident = TRUE;
break;
}
case SV_SCROLL_HOLY_CHANT:
{
- if (set_blessed(p_ptr->blessed + randint1(24) + 12, FALSE)) ident = TRUE;
+ if (set_blessed(p_ptr, p_ptr->blessed + randint1(24) + 12, FALSE)) ident = TRUE;
break;
}
case SV_SCROLL_HOLY_PRAYER:
{
- if (set_blessed(p_ptr->blessed + randint1(48) + 24, FALSE)) ident = TRUE;
+ if (set_blessed(p_ptr, p_ptr->blessed + randint1(48) + 24, FALSE)) ident = TRUE;
break;
}
/* Blessed */
if (p_ptr->blessed)
{
- (void)set_blessed(p_ptr->blessed - 1, TRUE);
+ (void)set_blessed(p_ptr, p_ptr->blessed - 1, TRUE);
}
/* Shield */
(void)set_lightspeed(0, TRUE);
(void)set_slow(p_ptr, 0, TRUE);
(void)set_shield(p_ptr, 0, TRUE);
- (void)set_blessed(0, TRUE);
+ (void)set_blessed(p_ptr, 0, TRUE);
(void)set_tsuyoshi(0, TRUE);
(void)set_hero(0, TRUE);
(void)set_shero(0, TRUE);
* @param do_dec 現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_blessed(TIME_EFFECT v, bool do_dec)
+bool set_blessed(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->blessed && !do_dec)
+ if (creature_ptr->blessed && !do_dec)
{
- if (p_ptr->blessed > v) return FALSE;
+ if (creature_ptr->blessed > v) return FALSE;
}
else if (!IS_BLESSED())
{
/* Shut */
else
{
- if (p_ptr->blessed && !music_singing(MUSIC_BLESS))
+ if (creature_ptr->blessed && !music_singing(MUSIC_BLESS))
{
msg_print(_("高潔な気分が消え失せた。", "The prayer has expired."));
notice = TRUE;
}
/* Use the value */
- p_ptr->blessed = v;
- p_ptr->redraw |= (PR_STATUS);
+ creature_ptr->blessed = v;
+ creature_ptr->redraw |= (PR_STATUS);
/* Nothing to notice */
if (!notice) return (FALSE);
if (disturb_state) disturb(FALSE, FALSE);
- p_ptr->update |= (PU_BONUS);
+ creature_ptr->update |= (PU_BONUS);
handle_stuff();
return (TRUE);
}
extern bool set_shield(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
extern bool set_tsubureru(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
extern bool set_magicdef(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
-extern bool set_blessed(TIME_EFFECT v, bool do_dec);
+extern bool set_blessed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
extern bool set_hero(TIME_EFFECT v, bool do_dec);
extern bool set_shero(TIME_EFFECT v, bool do_dec);
extern bool set_protevil(TIME_EFFECT v, bool do_dec);
summon_specific(-1, my, mx, plev, SUMMON_KNIGHTS, (PM_ALLOW_GROUP | PM_FORCE_PET | PM_HASTE));
}
set_hero(randint1(base) + base, FALSE);
- set_blessed(randint1(base) + base, FALSE);
+ set_blessed(p_ptr, randint1(base) + base, FALSE);
set_fast(p_ptr, randint1(sp_sides) + sp_base, FALSE);
set_protevil(randint1(base) + base, FALSE);
set_afraid(p_ptr, 0);
if (cast)
{
- set_blessed(randint1(base) + base, FALSE);
+ set_blessed(p_ptr, randint1(base) + base, FALSE);
}
}
break;
if (cast)
{
- set_blessed(randint1(base) + base, FALSE);
+ set_blessed(p_ptr, randint1(base) + base, FALSE);
}
}
break;
(void)set_tim_esp(creature_ptr->tim_esp + t, FALSE);
(void)set_tim_regen(creature_ptr->tim_regen + t, FALSE);
(void)set_hero(creature_ptr->hero + t, FALSE);
- (void)set_blessed(creature_ptr->blessed + t, FALSE);
+ (void)set_blessed(p_ptr, creature_ptr->blessed + t, FALSE);
(void)set_fast(p_ptr, creature_ptr->fast + t, FALSE);
(void)set_shero(creature_ptr->shero + t, FALSE);
if (creature_ptr->pclass == CLASS_FORCETRAINER)
else if (die < 42)
{
msg_print(_("《正義》だ。", "It's Justice."));
- set_blessed(p_ptr->lev, FALSE);
+ set_blessed(p_ptr, p_ptr->lev, FALSE);
}
else if (die < 47)
{