/* 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 <= (((u32b)adj_str_wgt[p_ptr->stat_ind[A_STR]]*(p_ptr->pclass == CLASS_BERSERKER ? 150 : 100)) / 2)))
+ (p_ptr->levitation || p_ptr->can_swim || (p_ptr->total_weight <= weight_limit())))
{
/* Ignore */
notice = FALSE;
#ifdef JP
sprintf(out_val, "»ý¤Áʪ¡§ ¹ç·× %3d.%1d kg (¸Â³¦¤Î%ld%%) ¥³¥Þ¥ó¥É: ",
lbtokg1(p_ptr->total_weight) , lbtokg2(p_ptr->total_weight) ,
- (p_ptr->total_weight * 100) / ((adj_str_wgt[p_ptr->stat_ind[A_STR]] * (p_ptr->pclass == CLASS_BERSERKER ? 150 : 100))
-/ 2));
+ (p_ptr->total_weight * 100) / weight_limit());
#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) / ((adj_str_wgt[p_ptr->stat_ind[A_STR]] * (p_ptr->pclass == CLASS_BERSERKER ? 150 : 100)) / 2));
+ (p_ptr->total_weight * 100) / weight_limit());
#endif
#ifdef JP
sprintf(out_val, "ÁõÈ÷¡§ ¹ç·× %3d.%1d kg (¸Â³¦¤Î%ld%%) ¥³¥Þ¥ó¥É: ",
lbtokg1(p_ptr->total_weight) , lbtokg2(p_ptr->total_weight) ,
- (p_ptr->total_weight * 100) / ((adj_str_wgt[p_ptr->stat_ind[A_STR]] * (p_ptr->pclass == CLASS_BERSERKER ? 150 : 100))
-/ 2));
+ (p_ptr->total_weight * 100) / weight_limit());
#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),
- (p_ptr->total_weight * 100) / ((adj_str_wgt[p_ptr->stat_ind[A_STR]] * (p_ptr->pclass == CLASS_BERSERKER ? 150 : 100)) / 2));
+ (p_ptr->total_weight * 100) / weight_limit());
#endif
if (have_flag(f_ptr->flags, FF_WATER) && have_flag(f_ptr->flags, FF_DEEP) &&
!p_ptr->levitation && !p_ptr->can_swim)
{
- if (p_ptr->total_weight > (((u32b)adj_str_wgt[p_ptr->stat_ind[A_STR]] * (p_ptr->pclass == CLASS_BERSERKER ? 150 : 100)) / 2))
+ if (p_ptr->total_weight > weight_limit())
{
/* Take damage */
#ifdef JP
extern void extract_day_hour_min(int *day, int *hour, int *min);
extern void prt_time(void);
extern cptr map_name(void);
+extern u32b weight_limit(void);
extern bool buki_motteruka(int i);
extern void calc_bonuses(void);
extern void notice_stuff(void);
/*
* Computes current weight limit.
*/
-static int weight_limit(void)
+u32b weight_limit(void)
{
- int i;
+ u32b i;
/* Weight limit based only on strength */
- i = adj_str_wgt[p_ptr->stat_ind[A_STR]] * 100;
- if (p_ptr->pclass == CLASS_BERSERKER) i = i*3/2;
+ i = (u32b)adj_str_wgt[p_ptr->stat_ind[A_STR]] * 50; /* Constant was 100 */
+ if (p_ptr->pclass == CLASS_BERSERKER) i = i * 3 / 2;
/* Return the result */
- return (i);
+ return i;
}
/* Extract the current weight (in tenth pounds) */
j = p_ptr->total_weight;
- /* Extract the "weight limit" (in tenth pounds) */
- i = weight_limit();
-
- if (p_ptr->riding)
+ if (!p_ptr->riding)
+ {
+ /* Extract the "weight limit" (in tenth pounds) */
+ i = (int)weight_limit();
+ }
+ else
{
monster_type *riding_m_ptr = &m_list[p_ptr->riding];
monster_race *riding_r_ptr = &r_info[riding_m_ptr->r_idx];
if (p_ptr->skill_exp[GINOU_RIDING] < RIDING_EXP_SKILLED) j += (p_ptr->wt * 3 * (RIDING_EXP_SKILLED - p_ptr->skill_exp[GINOU_RIDING])) / RIDING_EXP_SKILLED;
- i = 3000 + riding_r_ptr->level * 50;
+ /* Extract the "weight limit" */
+ i = 1500 + riding_r_ptr->level * 25;
}
/* XXX XXX XXX Apply "encumbrance" from weight */
- if (j > i/2) new_speed -= ((j - (i/2)) / (i / 10));
+ if (j > i) new_speed -= ((j - i) / (i / 5));
/* Searching slows the player down */
if (p_ptr->action == ACTION_SEARCH) new_speed -= 10;