/*
* Gain a "point" in a stat
*/
-bool do_inc_stat(int stat)
+bool do_inc_stat(player_type *creature_ptr, int stat)
{
bool res;
/* Restore strength */
- res = res_stat(p_ptr, stat);
+ res = res_stat(creature_ptr, stat);
/* Attempt to increase */
- if (inc_stat(p_ptr, stat))
+ if (inc_stat(creature_ptr, stat))
{
if (stat == A_WIS)
{
/*
* Restores any drained experience
*/
-bool restore_level(void)
+bool restore_level(player_type *creature_ptr)
{
/* Restore experience */
- if (p_ptr->exp < p_ptr->max_exp)
+ if (creature_ptr->exp < creature_ptr->max_exp)
{
msg_print(_("経験値が戻ってきた気がする。", "You feel your experience returning."));
/* Restore the experience */
- p_ptr->exp = p_ptr->max_exp;
+ creature_ptr->exp = creature_ptr->max_exp;
/* Check the experience */
check_experience();
/*
* Forget everything
*/
-bool lose_all_info(void)
+bool lose_all_info(player_type *creature_ptr)
{
int i;
/* Forget info about objects */
for (i = 0; i < INVEN_TOTAL; i++)
{
- object_type *o_ptr = &p_ptr->inventory_list[i];
+ object_type *o_ptr = &creature_ptr->inventory_list[i];
if (!o_ptr->k_idx) continue;
/* Allow "protection" by the MENTAL flag */
/* Hack -- Clear the "felt" flag */
o_ptr->ident &= ~(IDENT_SENSE);
}
- p_ptr->update |= (PU_BONUS);
- p_ptr->update |= (PU_COMBINE | PU_REORDER);
+ creature_ptr->update |= (PU_BONUS);
+ creature_ptr->update |= (PU_COMBINE | PU_REORDER);
- p_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
+ creature_ptr->window |= (PW_INVEN | PW_EQUIP | PW_PLAYER);
/* Mega-Hack -- Forget the map */
wiz_dark();
}
-void calc_android_exp(void)
+void calc_android_exp(player_type *creature_ptr)
{
int i;
u32b total_exp = 0;
- if (p_ptr->is_dead) return;
+ if (creature_ptr->is_dead) return;
- if (p_ptr->prace != RACE_ANDROID) return;
+ if (creature_ptr->prace != RACE_ANDROID) return;
for (i = INVEN_RARM; i < INVEN_TOTAL; i++)
{
- object_type *o_ptr = &p_ptr->inventory_list[i];
+ object_type *o_ptr = &creature_ptr->inventory_list[i];
object_type forge;
object_type *q_ptr = &forge;
u32b value, exp;
value = object_value_real(q_ptr);
if (value <= 0) continue;
- if ((o_ptr->tval == TV_SOFT_ARMOR) && (o_ptr->sval == SV_ABUNAI_MIZUGI) && (p_ptr->pseikaku != SEIKAKU_SEXY)) value /= 32;
+ if ((o_ptr->tval == TV_SOFT_ARMOR) && (o_ptr->sval == SV_ABUNAI_MIZUGI) && (creature_ptr->pseikaku != SEIKAKU_SEXY)) value /= 32;
if (value > 5000000L) value = 5000000L;
if ((o_ptr->tval == TV_DRAG_ARMOR) || (o_ptr->tval == TV_CARD)) level /= 2;
else total_exp += exp / 16;
if (i == INVEN_BODY) total_exp += exp / 32;
}
- p_ptr->exp = p_ptr->max_exp = total_exp;
+ creature_ptr->exp = creature_ptr->max_exp = total_exp;
/* Check Experience */
check_experience();