case SV_STAFF_CURING:
{
ident = true_healing(0);
- if (set_shero(0, TRUE)) ident = TRUE;
+ if (set_shero(p_ptr, 0, TRUE)) ident = TRUE;
break;
}
{
if (do_res_stat(p_ptr, A_INT)) ident = TRUE;
ident |= restore_mana(FALSE);
- if (set_shero(0, TRUE)) ident = TRUE;
+ if (set_shero(p_ptr, 0, TRUE)) ident = TRUE;
break;
}
case SV_ROD_CURING:
{
if (true_healing(0)) ident = TRUE;
- if (set_shero(0, TRUE)) ident = TRUE;
+ if (set_shero(p_ptr, 0, TRUE)) ident = TRUE;
break;
}
/* Super Heroism */
if (p_ptr->shero)
{
- (void)set_shero(p_ptr->shero - 1, TRUE);
+ (void)set_shero(p_ptr, p_ptr->shero - 1, TRUE);
}
/* Blessed */
disturb(FALSE, TRUE);
msg_print(_("ウガァァア!", "RAAAAGHH!"));
msg_print(_("激怒の発作に襲われた!", "You feel a fit of rage coming over you!"));
- (void)set_shero(10 + randint1(p_ptr->lev), FALSE);
+ (void)set_shero(p_ptr, 10 + randint1(p_ptr->lev), FALSE);
(void)set_afraid(p_ptr, 0);
}
(void)set_blessed(p_ptr, 0, TRUE);
(void)set_tsuyoshi(0, TRUE);
(void)set_hero(p_ptr, 0, TRUE);
- (void)set_shero(0, TRUE);
+ (void)set_shero(p_ptr, 0, TRUE);
(void)set_protevil(0, TRUE);
(void)set_invuln(0, TRUE);
(void)set_wraith_form(0, TRUE);
* @param do_dec FALSEの場合現在の継続時間より長い値のみ上書きする
* @return ステータスに影響を及ぼす変化があった場合TRUEを返す。
*/
-bool set_shero(TIME_EFFECT v, bool do_dec)
+bool set_shero(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;
- if (p_ptr->pclass == CLASS_BERSERKER) v = 1;
+ if (creature_ptr->pclass == CLASS_BERSERKER) v = 1;
/* Open */
if (v)
{
- if (p_ptr->shero && !do_dec)
+ if (creature_ptr->shero && !do_dec)
{
- if (p_ptr->shero > v) return FALSE;
+ if (creature_ptr->shero > v) return FALSE;
}
- else if (!p_ptr->shero)
+ else if (!creature_ptr->shero)
{
msg_print(_("殺戮マシーンになった気がする!", "You feel like a killing machine!"));
notice = TRUE;
/* Shut */
else
{
- if (p_ptr->shero)
+ if (creature_ptr->shero)
{
msg_print(_("野蛮な気持ちが消え失せた。", "You feel less Berserk."));
notice = TRUE;
}
/* Use the value */
- p_ptr->shero = v;
- p_ptr->redraw |= (PR_STATUS);
+ creature_ptr->shero = 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);
/* Recalculate hitpoints */
- p_ptr->update |= (PU_HP);
+ creature_ptr->update |= (PU_HP);
handle_stuff();
return (TRUE);
}
extern bool set_magicdef(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
extern bool set_blessed(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
extern bool set_hero(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
-extern bool set_shero(TIME_EFFECT v, bool do_dec);
+extern bool set_shero(player_type *creature_ptr, TIME_EFFECT v, bool do_dec);
extern bool set_protevil(TIME_EFFECT v, bool do_dec);
extern bool set_invuln(TIME_EFFECT v, bool do_dec);
extern bool set_tim_invis(TIME_EFFECT v, bool do_dec);
(void)set_stun(0);
(void)set_cut(0);
(void)restore_all_status();
- (void)set_shero(0, TRUE);
+ (void)set_shero(p_ptr, 0, TRUE);
handle_stuff();
hp_player(p_ptr, 5000);
{
bool_hack ident = FALSE;
if (set_afraid(p_ptr, 0)) ident = TRUE;
- if (set_shero(p_ptr->shero + randint1(base) + base, FALSE)) ident = TRUE;
+ if (set_shero(p_ptr, p_ptr->shero + randint1(base) + base, FALSE)) ident = TRUE;
if (hp_player(p_ptr, 30)) ident = TRUE;
return ident;
}
if (hp_player(p_ptr, damroll(dice, sides))) ident = TRUE;
if (set_blind(p_ptr, 0)) ident = TRUE;
if (set_cut(p_ptr->cut - 10)) ident = TRUE;
- if (set_shero(0, TRUE)) ident = TRUE;
+ if (set_shero(p_ptr, 0, TRUE)) ident = TRUE;
return ident;
}
if (set_blind(p_ptr, 0)) ident = TRUE;
if (set_confused(p_ptr, 0)) ident = TRUE;
if (set_cut((p_ptr->cut / 2) - 50)) ident = TRUE;
- if (set_shero(0, TRUE)) ident = TRUE;
+ if (set_shero(p_ptr, 0, TRUE)) ident = TRUE;
return ident;
}
if (set_poisoned(p_ptr, 0)) ident = TRUE;
if (set_stun(0)) ident = TRUE;
if (set_cut(0)) ident = TRUE;
- if (set_shero(0, TRUE)) ident = TRUE;
+ if (set_shero(p_ptr, 0, TRUE)) ident = TRUE;
return ident;
}
(void)set_hero(p_ptr, creature_ptr->hero + 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);
+ (void)set_shero(p_ptr, creature_ptr->shero + t, FALSE);
if (creature_ptr->pclass == CLASS_FORCETRAINER)
{
P_PTR_KI = creature_ptr->lev * 5 + 190;