static void calc_disarming(player_type *creature_ptr);
static void calc_device_ability(player_type *creature_ptr);
static void calc_saving_throw(player_type *creature_ptr);
+static void calc_search(player_type *creature_ptr);
creature_ptr->stat_add[i] = 0;
creature_ptr->see_infra = 0;
- creature_ptr->skill_srh = 0;
creature_ptr->skill_fos = 0;
creature_ptr->skill_thn = 0;
creature_ptr->skill_thb = 0;
clear_creature_bonuses(creature_ptr);
calc_race_status(creature_ptr);
- creature_ptr->skill_srh = cp_ptr->c_srh + ap_ptr->a_srh;
creature_ptr->skill_fos = cp_ptr->c_fos + ap_ptr->a_fos;
creature_ptr->skill_thn = cp_ptr->c_thn + ap_ptr->a_thn;
creature_ptr->skill_thb = cp_ptr->c_thb + ap_ptr->a_thb;
if (creature_ptr->muta3 & MUT3_XTRA_EYES)
{
creature_ptr->skill_fos += 15;
- creature_ptr->skill_srh += 15;
}
if (creature_ptr->muta3 & MUT3_INFRAVIS)
creature_ptr->ryoute = FALSE;
creature_ptr->skill_dig += adj_str_dig[creature_ptr->stat_ind[A_STR]];
- creature_ptr->skill_srh += (cp_ptr->x_srh * creature_ptr->lev / 10);
creature_ptr->skill_fos += (cp_ptr->x_fos * creature_ptr->lev / 10);
creature_ptr->skill_thn += ((cp_ptr->x_thn * creature_ptr->lev / 10) + (ap_ptr->a_thn * creature_ptr->lev / 50));
creature_ptr->skill_thb += ((cp_ptr->x_thb * creature_ptr->lev / 10) + (ap_ptr->a_thb * creature_ptr->lev / 50));
calc_disarming(creature_ptr);
calc_device_ability(creature_ptr);
calc_saving_throw(creature_ptr);
+ calc_search(creature_ptr);
if (current_world_ptr->character_xtra) return;
tmp_rp_ptr = &mimic_info[creature_ptr->mimic_form];
else
tmp_rp_ptr = &race_info[creature_ptr->prace];
+ const player_class *c_ptr = &class_info[creature_ptr->pclass];
+ const player_personality *a_ptr = &personality_info[creature_ptr->pseikaku];
- creature_ptr->skill_dev = tmp_rp_ptr->r_dev + cp_ptr->c_dev + ap_ptr->a_dev;
+ creature_ptr->skill_dev = tmp_rp_ptr->r_dev + c_ptr->c_dev + a_ptr->a_dev;
for (int i = INVEN_RARM; i < INVEN_TOTAL; i++) {
object_type *o_ptr;
tmp_rp_ptr = &mimic_info[creature_ptr->mimic_form];
else
tmp_rp_ptr = &race_info[creature_ptr->prace];
+ const player_class *c_ptr = &class_info[creature_ptr->pclass];
+ const player_personality *a_ptr = &personality_info[creature_ptr->pseikaku];
- creature_ptr->skill_sav = tmp_rp_ptr->r_sav + cp_ptr->c_sav + ap_ptr->a_sav;
+ creature_ptr->skill_sav = tmp_rp_ptr->r_sav + c_ptr->c_sav + a_ptr->a_sav;
if (creature_ptr->shero) creature_ptr->skill_sav -= 30;
if (creature_ptr->muta3 & MUT3_MAGIC_RES) creature_ptr->skill_sav += (15 + (creature_ptr->lev / 5));
creature_ptr->skill_sav += adj_wis_sav[creature_ptr->stat_ind[A_WIS]];
creature_ptr->skill_sav /= 2;
}
+static void calc_search(player_type *creature_ptr)
+{
+ const player_race *tmp_rp_ptr;
+
+ if (creature_ptr->mimic_form)
+ tmp_rp_ptr = &mimic_info[creature_ptr->mimic_form];
+ else
+ tmp_rp_ptr = &race_info[creature_ptr->prace];
+ const player_class *c_ptr = &class_info[creature_ptr->pclass];
+ const player_personality *a_ptr = &personality_info[creature_ptr->pseikaku];
+
+ creature_ptr->skill_srh = tmp_rp_ptr->r_srh + c_ptr->c_srh + a_ptr->a_srh;
+
+ for (int i = INVEN_RARM; i < INVEN_TOTAL; i++) {
+ object_type *o_ptr;
+ BIT_FLAGS flgs[TR_FLAG_SIZE];
+ o_ptr = &creature_ptr->inventory_list[i];
+ if (!o_ptr->k_idx)
+ continue;
+ object_flags(o_ptr, flgs);
+ if (have_flag(flgs, TR_SEARCH))
+ creature_ptr->skill_srh += (o_ptr->pval * 5);
+ }
+
+ if (creature_ptr->muta3 & MUT3_XTRA_EYES) {
+ creature_ptr->skill_srh += 15;
+ }
+ creature_ptr->skill_srh += (cp_ptr->x_srh * creature_ptr->lev / 10);
+
+ if (creature_ptr->shero) {
+ creature_ptr->skill_srh -= 15;
+ }
+
+}
+
/*!
* @brief プレイヤーの所持重量制限を計算する /
* Computes current weight limit.