#ifdef JP
sprintf(out_val, "持ち物: 合計 %3d.%1d kg (限界の%ld%%) コマンド: ",
(int)lbtokg1(p_ptr->total_weight) , (int)lbtokg2(p_ptr->total_weight) ,
- (long int)((p_ptr->total_weight * 100) / weight_limit()));
+ (long int)((p_ptr->total_weight * 100) / weight_limit(p_ptr)));
#else
sprintf(out_val, "Inventory: carrying %d.%d pounds (%ld%% of capacity). Command: ",
(int)(p_ptr->total_weight / 10), (int)(p_ptr->total_weight % 10),
- (p_ptr->total_weight * 100) / weight_limit());
+ (p_ptr->total_weight * 100) / weight_limit(p_ptr));
#endif
prt(out_val, 0, 0);
#ifdef JP
sprintf(out_val, "装備: 合計 %3d.%1d kg (限界の%ld%%) コマンド: ",
(int)lbtokg1(p_ptr->total_weight) , (int)lbtokg2(p_ptr->total_weight) ,
- (long int)((p_ptr->total_weight * 100) / weight_limit()));
+ (long int)((p_ptr->total_weight * 100) / weight_limit(p_ptr)));
#else
sprintf(out_val, "Equipment: carrying %d.%d pounds (%ld%% of capacity). Command: ",
(int)(p_ptr->total_weight / 10), (int)(p_ptr->total_weight % 10),
- (long int)((p_ptr->total_weight * 100) / weight_limit()));
+ (long int)((p_ptr->total_weight * 100) / weight_limit(p_ptr)));
#endif
prt(out_val, 0, 0);
if (have_flag(f_ptr->flags, FF_WATER) && have_flag(f_ptr->flags, FF_DEEP) &&
!p_ptr->levitation && !p_ptr->can_swim && !p_ptr->resist_water)
{
- if (p_ptr->total_weight > weight_limit())
+ if (p_ptr->total_weight > weight_limit(p_ptr))
{
msg_print(_("溺れている!", "You are drowning!"));
take_hit(p_ptr, DAMAGE_NOESCAPE, randint1(p_ptr->lev), _("溺れ", "drowning"), -1);
/* Deep water */
else if (have_flag(f_ptr->flags, FF_WATER) && have_flag(f_ptr->flags, FF_DEEP) &&
- (p_ptr->levitation || p_ptr->can_swim || (p_ptr->total_weight <= weight_limit())))
+ (p_ptr->levitation || p_ptr->can_swim || (p_ptr->total_weight <= weight_limit(p_ptr))))
{
/* Ignore */
notice = FALSE;
if (!p_ptr->riding)
{
/* Extract the "weight limit" (in tenth pounds) */
- i = (int)weight_limit();
+ i = (int)weight_limit(p_ptr);
}
else
{
* Computes current weight limit.
* @return 制限重量(ポンド)
*/
-WEIGHT weight_limit(void)
+WEIGHT weight_limit(player_type *creature_ptr)
{
WEIGHT i;
/* Weight limit based only on strength */
- i = (WEIGHT)adj_str_wgt[p_ptr->stat_ind[A_STR]] * 50; /* Constant was 100 */
- if (p_ptr->pclass == CLASS_BERSERKER) i = i * 3 / 2;
+ i = (WEIGHT)adj_str_wgt[creature_ptr->stat_ind[A_STR]] * 50; /* Constant was 100 */
+ if (creature_ptr->pclass == CLASS_BERSERKER) i = i * 3 / 2;
/* Return the result */
return i;
extern s16b calc_num_fire(object_type *o_ptr);
extern void calc_bonuses(void);
-extern WEIGHT weight_limit(void);
+extern WEIGHT weight_limit(player_type *creature_ptr);
extern bool has_melee_weapon(player_type *creature_ptr, int i);
extern bool is_heavy_shoot(object_type *o_ptr);