if (have_flag(flgs, TR_INFRA))
creature_ptr->see_infra += o_ptr->pval;
- if (have_flag(flgs, TR_TUNNEL))
- creature_ptr->skill_dig += (o_ptr->pval * 20);
if (have_flag(flgs, TR_BLOWS)) {
if ((i == INVEN_RARM || i == INVEN_RIGHT) && !creature_ptr->ryoute)
creature_ptr->extra_blows[0] += o_ptr->pval;
static void calc_dig(player_type *creature_ptr)
{
+ object_type *o_ptr;
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
+
creature_ptr->skill_dig = 0;
if (creature_ptr->shero)
creature_ptr->skill_dig += 30;
creature_ptr->skill_dig += adj_str_dig[creature_ptr->stat_ind[A_STR]];
+ for (int i = INVEN_RARM; i < INVEN_TOTAL; i++) {
+ o_ptr = &creature_ptr->inventory_list[i];
+ if (!o_ptr->k_idx)
+ continue;
+ object_flags(o_ptr, flgs);
+ if (have_flag(flgs, TR_TUNNEL))
+ creature_ptr->skill_dig += (o_ptr->pval * 20);
+ }
+
for (int i = 0; i < 2; i++) {
- object_type *o_ptr;
o_ptr = &creature_ptr->inventory_list[INVEN_RARM + i];
if (has_melee_weapon(creature_ptr, INVEN_RARM + i) && !creature_ptr->heavy_wield[i]) {