for (dummy = 0; dummy < 3; dummy++)
{
if (hypodynamic_bolt(dir, 50))
- hp_player(50);
+ hp_player(p_ptr, 50);
}
break;
}
for (dummy = 0; dummy < 3; dummy++)
{
if (hypodynamic_bolt(dir, 100))
- hp_player(100);
+ hp_player(p_ptr, 100);
}
break;
}
msg_print(_("鎧が様々な色に輝いた...", "Your armor glows many colours..."));
(void)set_afraid(0);
(void)set_hero(randint1(50) + 50, FALSE);
- (void)hp_player(10);
+ (void)hp_player(p_ptr, 10);
(void)set_blessed(randint1(50) + 50, FALSE);
(void)set_oppose_acid(randint1(50) + 50, FALSE);
(void)set_oppose_elec(randint1(50) + 50, FALSE);
case ACT_CURE_LW:
{
(void)set_afraid(0);
- (void)hp_player(30);
+ (void)hp_player(p_ptr, 30);
break;
}
TIME_EFFECT v = randint1(25) + 25;
(void)set_afraid(0);
(void)set_hero(v, FALSE);
- (void)hp_player(10);
+ (void)hp_player(p_ptr, 10);
(void)set_blessed(v, FALSE);
(void)set_oppose_acid(v, FALSE);
(void)set_oppose_elec(v, FALSE);
{
msg_print(_("これはひじょうに美味だ。", "That tastes good."));
(void)set_poisoned(0);
- (void)hp_player(damroll(4, 8));
+ (void)hp_player(p_ptr, damroll(4, 8));
ident = TRUE;
break;
}
}
case MS_HEAL:
msg_print(_("自分の傷に念を集中した。", "You concentrate on your wounds!"));
- (void)hp_player(plev*6);
+ (void)hp_player(p_ptr, plev*6);
(void)set_stun(0);
(void)set_cut(0);
break;
/* Absorb light from the current possition */
if ((current_floor_ptr->grid_array[p_ptr->y][p_ptr->x].info & (CAVE_GLOW | CAVE_MNDK)) == CAVE_GLOW)
{
- hp_player(10);
+ hp_player(p_ptr, 10);
}
o_ptr = &p_ptr->inventory_list[INVEN_LITE];
if (!object_is_fixed_artifact(o_ptr) && (o_ptr->xtra4 > 0))
{
/* Heal the player a bit */
- hp_player(o_ptr->xtra4 / 20);
+ hp_player(p_ptr, o_ptr->xtra4 / 20);
/* Decrease life-span of lite */
o_ptr->xtra4 /= 2;
HIT_POINT healing = p_ptr->csp;
if (healing > wounds) healing = wounds;
- hp_player(healing);
+ hp_player(p_ptr, healing);
p_ptr->csp -= healing;
p_ptr->redraw |= (PR_HP | PR_MANA);
}
drain_heal = (drain_heal * p_ptr->mutant_regenerate_mod) / 100;
- hp_player(drain_heal);
+ hp_player(p_ptr, drain_heal);
/* We get to keep some of it! */
}
}
*/
if (!IS_FAST() || !IS_HERO())
{
- hp_player(plev);
+ hp_player(p_ptr, plev);
}
t = 10 + randint1((plev * 3) / 2);
}
case MS_HEAL:
msg_print(_("自分の傷に念を集中した。", "You concentrate on your wounds!"));
- (void)hp_player(plev*4);
+ (void)hp_player(p_ptr, plev*4);
(void)set_stun(0);
(void)set_cut(0);
break;
/*
* Increase players hit points, notice effects
*/
-bool hp_player(int num)
+bool hp_player(player_type *creature_ptr, int num)
{
int vir;
vir = virtue_number(V_VITALITY);
if(vir)
{
- num = num * (p_ptr->virtues[vir - 1] + 1250) / 1250;
+ num = num * (creature_ptr->virtues[vir - 1] + 1250) / 1250;
}
/* Healing needed */
- if (p_ptr->chp < p_ptr->mhp)
+ if (creature_ptr->chp < creature_ptr->mhp)
{
- if ((num > 0) && (p_ptr->chp < (p_ptr->mhp/3)))
+ if ((num > 0) && (creature_ptr->chp < (creature_ptr->mhp/3)))
chg_virtue(V_TEMPERANCE, 1);
/* Gain hitpoints */
- p_ptr->chp += num;
+ creature_ptr->chp += num;
/* Enforce maximum */
- if (p_ptr->chp >= p_ptr->mhp)
+ if (creature_ptr->chp >= creature_ptr->mhp)
{
- p_ptr->chp = p_ptr->mhp;
- p_ptr->chp_frac = 0;
+ creature_ptr->chp = creature_ptr->mhp;
+ creature_ptr->chp_frac = 0;
}
- p_ptr->redraw |= (PR_HP);
+ creature_ptr->redraw |= (PR_HP);
- p_ptr->window |= (PW_PLAYER);
+ creature_ptr->window |= (PW_PLAYER);
/* Heal 0-4 */
if (num < 5)
if (!(wounds || hit_p || Nasty_effect)) return;
msg_print(_("傷がより軽いものに変化した。", "Your wounds are polymorphed into less serious ones."));
- hp_player(change);
+ hp_player(p_ptr, change);
if (Nasty_effect)
{
msg_print(_("新たな傷ができた!", "A new wound was created!"));
extern bool inc_stat(player_type *creature_ptr, int stat);
extern bool dec_stat(player_type *creature_ptr, int stat, int amount, int permanent);
extern bool res_stat(player_type *creature_ptr, int stat);
-extern bool hp_player(int num);
+extern bool hp_player(player_type *creature_ptr, int num);
extern bool do_dec_stat(player_type *creature_ptr, int stat);
extern bool do_res_stat(player_type *creature_ptr, int stat);
extern bool do_inc_stat(int stat);
if (cast)
{
dispel_evil(randint1(dam_sides));
- hp_player(heal);
+ hp_player(p_ptr, heal);
set_afraid(0);
set_poisoned(0);
set_stun(0);
confuse_monsters(power);
turn_monsters(power);
stasis_monsters(power);
- hp_player(heal);
+ hp_player(p_ptr, heal);
}
}
break;
chg_virtue(V_SACRIFICE, -1);
chg_virtue(V_VITALITY, -1);
- hp_player(dam);
+ hp_player(p_ptr, dam);
/*
* Gain nutritional sustenance:
for (i = 0; i < 3; i++)
{
if (hypodynamic_bolt(dir, dam))
- hp_player(dam);
+ hp_player(p_ptr, dam);
}
}
}
if (cast)
{
- hp_player(damroll(dice, sides));
+ hp_player(p_ptr, damroll(dice, sides));
set_cut(0);
set_poisoned(0);
}
if (cont)
{
- hp_player(damroll(dice, sides));
+ hp_player(p_ptr, damroll(dice, sides));
}
}
{
msg_print(_("激しい戦いの歌を歌った...", "You start singing a song of intense fighting..."));
- (void)hp_player(10);
+ (void)hp_player(p_ptr, 10);
(void)set_afraid(0);
/* Recalculate hitpoints */
if (cast)
{
msg_print(_("英雄の歌を口ずさんだ...", "You chant a powerful, heroic call to arms..."));
- (void)hp_player(10);
+ (void)hp_player(p_ptr, 10);
(void)set_afraid(0);
/* Recalculate hitpoints */
if (cont)
{
- hp_player(damroll(dice, sides));
+ hp_player(p_ptr, damroll(dice, sides));
set_stun(0);
set_cut(0);
}
(void)restore_all_status();
(void)set_shero(0, TRUE);
handle_stuff();
- hp_player(5000);
+ hp_player(p_ptr, 5000);
return TRUE;
}
bool_hack ident = FALSE;
if (set_afraid(0)) ident = TRUE;
if (set_hero(p_ptr->hero + randint1(base) + base, FALSE)) ident = TRUE;
- if (hp_player(10)) ident = TRUE;
+ if (hp_player(p_ptr, 10)) ident = TRUE;
return ident;
}
bool_hack ident = FALSE;
if (set_afraid(0)) ident = TRUE;
if (set_shero(p_ptr->shero + randint1(base) + base, FALSE)) ident = TRUE;
- if (hp_player(30)) ident = TRUE;
+ if (hp_player(p_ptr, 30)) ident = TRUE;
return ident;
}
bool_hack cure_light_wounds(DICE_NUMBER dice, DICE_SID sides)
{
bool_hack ident = FALSE;
- if (hp_player(damroll(dice, sides))) ident = TRUE;
+ if (hp_player(p_ptr, damroll(dice, sides))) ident = TRUE;
if (set_blind(0)) ident = TRUE;
if (set_cut(p_ptr->cut - 10)) ident = TRUE;
if (set_shero(0, TRUE)) ident = TRUE;
bool_hack cure_serious_wounds(DICE_NUMBER dice, DICE_SID sides)
{
bool_hack ident = FALSE;
- if (hp_player(damroll(dice, sides))) ident = TRUE;
+ if (hp_player(p_ptr, damroll(dice, sides))) ident = TRUE;
if (set_blind(0)) ident = TRUE;
if (set_confused(0)) ident = TRUE;
if (set_cut((p_ptr->cut / 2) - 50)) ident = TRUE;
bool_hack cure_critical_wounds(HIT_POINT pow)
{
bool_hack ident = FALSE;
- if (hp_player(pow)) ident = TRUE;
+ if (hp_player(p_ptr, pow)) ident = TRUE;
if (set_blind(0)) ident = TRUE;
if (set_confused(0)) ident = TRUE;
if (set_poisoned(0)) ident = TRUE;
bool_hack true_healing(HIT_POINT pow)
{
bool_hack ident = FALSE;
- if (hp_player(pow)) ident = TRUE;
+ if (hp_player(p_ptr, pow)) ident = TRUE;
if (set_blind(0)) ident = TRUE;
if (set_confused(0)) ident = TRUE;
if (set_poisoned(0)) ident = TRUE;
else
{
msg_format(_("%sから精神エネルギーを吸いとった。", "You draw psychic energy from %s."), m_name);
- (void)hp_player(dam);
+ (void)hp_player(p_ptr, dam);
}
}
else
if (PRACE_IS_(p_ptr, RACE_SPECTRE) && !CHECK_MULTISHADOW())
{
msg_print(_("気分がよくなった。", "You feel invigorated!"));
- hp_player(dam / 4);
+ hp_player(p_ptr, dam / 4);
learn_spell(monspell);
}
else
{
if (fuzzy) msg_print(_("何らかの攻撃によって気分がよくなった。", "You are hit by something invigorating!"));
- (void)hp_player(dam);
+ (void)hp_player(p_ptr, dam);
dam = 0;
break;
}
if (set_protevil((magic ? 0 : creature_ptr->protevil) + randint1(25) + k, FALSE)) ident = TRUE;
if (set_poisoned(0)) ident = TRUE;
if (set_afraid(0)) ident = TRUE;
- if (hp_player(50)) ident = TRUE;
+ if (hp_player(p_ptr, 50)) ident = TRUE;
if (set_stun(0)) ident = TRUE;
if (set_cut(0)) ident = TRUE;
return ident;
dispel_monsters(150);
slow_monsters(plev);
sleep_monsters(plev);
- hp_player(300);
+ hp_player(p_ptr, 300);
}
}
dispel_monsters(150);
slow_monsters(plev);
sleep_monsters(plev);
- hp_player(300);
+ hp_player(p_ptr, 300);
}
if (die < 31)
{
if (p_ptr->food < PY_FOOD_FULL)
/* No heal if we are "full" */
- (void)hp_player(dummy);
+ (void)hp_player(p_ptr, dummy);
else
msg_print(_("あなたは空腹ではありません。", "You were not hungry."));
if (creature_ptr->csp >= creature_ptr->lev / 5)
{
creature_ptr->csp -= creature_ptr->lev / 5;
- hp_player(creature_ptr->lev);
+ hp_player(p_ptr, creature_ptr->lev);
}
else
{