}
}
-void have_pass_wall(player_type *creature_ptr)
+bool have_pass_wall(player_type *creature_ptr)
{
- creature_ptr->pass_wall = FALSE;
+ bool pow = FALSE;
- if (creature_ptr->wraith_form) {
- creature_ptr->pass_wall = TRUE;
- }
-
- if (creature_ptr->tim_pass_wall) {
- creature_ptr->pass_wall = TRUE;
- }
-
- if (!creature_ptr->mimic_form && creature_ptr->prace == RACE_SPECTRE) {
- creature_ptr->pass_wall = TRUE;
+ if (creature_ptr->wraith_form || creature_ptr->tim_pass_wall || (!creature_ptr->mimic_form && creature_ptr->prace == RACE_SPECTRE)) {
+ pow = TRUE;
}
if (creature_ptr->riding) {
monster_type *riding_m_ptr = &creature_ptr->current_floor_ptr->m_list[creature_ptr->riding];
monster_race *riding_r_ptr = &r_info[riding_m_ptr->r_idx];
if (!(riding_r_ptr->flags2 & RF2_PASS_WALL))
- creature_ptr->pass_wall = FALSE;
+ pow = FALSE;
}
+
+ return pow;
}
void have_xtra_might(player_type *creature_ptr)
#include "player/player-status.h"
-void have_pass_wall(player_type *creature_ptr);
+bool have_pass_wall(player_type *creature_ptr);
void have_kill_wall(player_type *creature_ptr);
void have_xtra_might(player_type *creature_ptr);
void have_esp_evil(player_type *creature_ptr);
have_two_handed_weapons(creature_ptr);
calc_weapon_weight_limit(creature_ptr);
- have_pass_wall(creature_ptr);
+ creature_ptr->pass_wall = have_pass_wall(creature_ptr);
have_kill_wall(creature_ptr);
have_xtra_might(creature_ptr);
have_esp_evil(creature_ptr);