-#include "core/player-processor.h"
+#include "core/player-processor.h"
#include "action/run-execution.h"
#include "action/travel-execution.h"
#include "core/disturbance.h"
#include "floor/floor-util.h"
#include "floor/geometry.h"
#include "floor/wild.h"
+#include "game-option/cheat-options.h"
#include "game-option/disturbance-options.h"
#include "game-option/map-screen-options.h"
-#include "game-option/cheat-options.h"
#include "grid/grid.h"
#include "inventory/pack-overflow.h"
#include "io/cursor.h"
get_mon_num_prep(player_ptr, monster_is_fishing_target, nullptr);
r_idx = get_mon_num(player_ptr, 0,
is_in_dungeon(player_ptr) ? player_ptr->current_floor_ptr->dun_level
- : wilderness[player_ptr->wilderness_y][player_ptr->wilderness_x].level,
+ : wilderness[player_ptr->wilderness_y][player_ptr->wilderness_x].level,
0);
msg_print(nullptr);
if (r_idx && one_in_(2)) {
if (!monster_is_valid(m_ptr))
continue;
- m_ptr->mflag2.set({MonsterConstantFlagType::MARK, MonsterConstantFlagType::SHOW});
+ m_ptr->mflag2.set({ MonsterConstantFlagType::MARK, MonsterConstantFlagType::SHOW });
update_monster(player_ptr, m_idx, false);
}
- WorldTurnProcessor(player_ptr).print_time();
+ WorldTurnProcessor(player_ptr).print_time();
} else if (!(load && player_ptr->energy_need <= 0)) {
player_ptr->energy_need -= SPEED_TO_ENERGY(player_ptr->pspeed);
}
auto effects = player_ptr->effects();
auto is_stunned = effects->stun()->is_stunned();
auto is_cut = effects->cut()->is_cut();
- if ((player_ptr->chp == player_ptr->mhp) && (player_ptr->csp >= player_ptr->msp) && !player_ptr->blind && !player_ptr->confused
- && !player_ptr->poisoned && !player_ptr->afraid && !is_stunned && !is_cut && !player_ptr->slow
- && !player_ptr->paralyzed && !player_ptr->hallucinated && !player_ptr->word_recall && !player_ptr->alter_reality) {
+ if ((player_ptr->chp == player_ptr->mhp) && (player_ptr->csp >= player_ptr->msp) && !player_ptr->blind && !player_ptr->confused && !player_ptr->poisoned && !player_ptr->afraid && !is_stunned && !is_cut && !player_ptr->slow && !player_ptr->paralyzed && !player_ptr->hallucinated && !player_ptr->word_recall && !player_ptr->alter_reality) {
set_action(player_ptr, ACTION_NONE);
}
}
if (player_ptr->pclass == PlayerClassType::IMITATOR) {
auto mane_data = PlayerClass(player_ptr).get_specific_data<mane_data_type>();
- if (static_cast<int>(mane_data->mane_list.size()) > (player_ptr->lev > 44 ? 3 : player_ptr->lev > 29 ? 2 : 1)) {
+ if (static_cast<int>(mane_data->mane_list.size()) > (player_ptr->lev > 44 ? 3 : player_ptr->lev > 29 ? 2
+ : 1)) {
mane_data->mane_list.pop_front();
}
#define DUNGEON_FEAT_PROB_NUM 3
-#define DUNGEON_ANGBAND 1
-#define DUNGEON_GALGALS 2
-#define DUNGEON_ORC 3
-#define DUNGEON_MAZE 4
-#define DUNGEON_DRAGON 5
-#define DUNGEON_GRAVE 6
-#define DUNGEON_WOOD 7
-#define DUNGEON_VOLCANO 8
-#define DUNGEON_HELL 9
-#define DUNGEON_HEAVEN 10
-#define DUNGEON_OCEAN 11
-#define DUNGEON_CASTLE 12
-#define DUNGEON_CTH 13
+#define DUNGEON_ANGBAND 1
+#define DUNGEON_GALGALS 2
+#define DUNGEON_ORC 3
+#define DUNGEON_MAZE 4
+#define DUNGEON_DRAGON 5
+#define DUNGEON_GRAVE 6
+#define DUNGEON_WOOD 7
+#define DUNGEON_VOLCANO 8
+#define DUNGEON_HELL 9
+#define DUNGEON_HEAVEN 10
+#define DUNGEON_OCEAN 11
+#define DUNGEON_CASTLE 12
+#define DUNGEON_CTH 13
#define DUNGEON_MOUNTAIN 14
-#define DUNGEON_GOLD 15
+#define DUNGEON_GOLD 15
#define DUNGEON_NO_MAGIC 16
#define DUNGEON_NO_MELEE 17
#define DUNGEON_CHAMELEON 18
std::string name; /* Name */
std::string text; /* Description */
- POSITION dy{};
- POSITION dx{};
+ POSITION dy{};
+ POSITION dx{};
- feat_prob floor[DUNGEON_FEAT_PROB_NUM]{}; /* Floor probability */
- feat_prob fill[DUNGEON_FEAT_PROB_NUM]{}; /* Cave wall probability */
- FEAT_IDX outer_wall{}; /* Outer wall tile */
- FEAT_IDX inner_wall{}; /* Inner wall tile */
- FEAT_IDX stream1{}; /* stream tile */
- FEAT_IDX stream2{}; /* stream tile */
+ feat_prob floor[DUNGEON_FEAT_PROB_NUM]{}; /* Floor probability */
+ feat_prob fill[DUNGEON_FEAT_PROB_NUM]{}; /* Cave wall probability */
+ FEAT_IDX outer_wall{}; /* Outer wall tile */
+ FEAT_IDX inner_wall{}; /* Inner wall tile */
+ FEAT_IDX stream1{}; /* stream tile */
+ FEAT_IDX stream2{}; /* stream tile */
- DEPTH mindepth{}; /* Minimal depth */
- DEPTH maxdepth{}; /* Maximal depth */
- PLAYER_LEVEL min_plev{}; /* Minimal plev needed to enter -- it's an anti-cheating mesure */
- BIT_FLAGS16 pit{};
- BIT_FLAGS16 nest{};
- BIT_FLAGS8 mode{}; /* Mode of combinaison of the monster flags */
+ DEPTH mindepth{}; /* Minimal depth */
+ DEPTH maxdepth{}; /* Maximal depth */
+ PLAYER_LEVEL min_plev{}; /* Minimal plev needed to enter -- it's an anti-cheating mesure */
+ BIT_FLAGS16 pit{};
+ BIT_FLAGS16 nest{};
+ BIT_FLAGS8 mode{}; /* Mode of combinaison of the monster flags */
- int min_m_alloc_level{}; /* Minimal number of monsters per level */
- int max_m_alloc_chance{}; /* There is a 1/max_m_alloc_chance chance per round of creating a new monster */
+ int min_m_alloc_level{}; /* Minimal number of monsters per level */
+ int max_m_alloc_chance{}; /* There is a 1/max_m_alloc_chance chance per round of creating a new monster */
- EnumClassFlagGroup<DungeonFeatureType> flags{}; /* Dungeon Flags */
+ EnumClassFlagGroup<DungeonFeatureType> flags{}; /* Dungeon Flags */
- BIT_FLAGS mflags1{}; /* The monster flags that are allowed */
- BIT_FLAGS mflags2{};
- BIT_FLAGS mflags3{};
- BIT_FLAGS mflags7{};
- BIT_FLAGS mflags8{};
- BIT_FLAGS mflags9{};
- BIT_FLAGS mflagsr{};
+ BIT_FLAGS mflags1{}; /* The monster flags that are allowed */
+ BIT_FLAGS mflags2{};
+ BIT_FLAGS mflags3{};
+ BIT_FLAGS mflags7{};
+ BIT_FLAGS mflags8{};
+ BIT_FLAGS mflags9{};
+ BIT_FLAGS mflagsr{};
EnumClassFlagGroup<MonsterAbilityType> mon_ability_flags;
EnumClassFlagGroup<MonsterBehaviorType> mon_behavior_flags;
EnumClassFlagGroup<MonsterVisualType> mon_visual_flags;
- char r_char[5]{}; /* Monster race allowed */
- KIND_OBJECT_IDX final_object{}; /* The object you'll find at the bottom */
- ARTIFACT_IDX final_artifact{}; /* The artifact you'll find at the bottom */
- MONRACE_IDX final_guardian{}; /* The artifact's guardian. If an artifact is specified, then it's NEEDED */
+ char r_char[5]{}; /* Monster race allowed */
+ KIND_OBJECT_IDX final_object{}; /* The object you'll find at the bottom */
+ ARTIFACT_IDX final_artifact{}; /* The artifact you'll find at the bottom */
+ MONRACE_IDX final_guardian{}; /* The artifact's guardian. If an artifact is specified, then it's NEEDED */
- PROB special_div{}; /* % of monsters affected by the flags/races allowed, to add some variety */
- int tunnel_percent{};
- int obj_great{};
- int obj_good{};
+ PROB special_div{}; /* % of monsters affected by the flags/races allowed, to add some variety */
+ int tunnel_percent{};
+ int obj_great{};
+ int obj_good{};
};
extern std::vector<DEPTH> max_dlv;
*/
static bool grab_one_basic_monster_flag(dungeon_type *d_ptr, std::string_view what)
{
- if (info_grab_one_flag(d_ptr->mflags1, r_info_flags1, what))
+ if (info_grab_one_flag(d_ptr->mflags1, r_info_flags1, what)) {
return true;
+ }
- if (info_grab_one_flag(d_ptr->mflags2, r_info_flags2, what))
+ if (info_grab_one_flag(d_ptr->mflags2, r_info_flags2, what)) {
return true;
+ }
- if (info_grab_one_flag(d_ptr->mflags3, r_info_flags3, what))
+ if (info_grab_one_flag(d_ptr->mflags3, r_info_flags3, what)) {
return true;
+ }
- if (info_grab_one_flag(d_ptr->mflags7, r_info_flags7, what))
+ if (info_grab_one_flag(d_ptr->mflags7, r_info_flags7, what)) {
return true;
+ }
- if (info_grab_one_flag(d_ptr->mflags8, r_info_flags8, what))
+ if (info_grab_one_flag(d_ptr->mflags8, r_info_flags8, what)) {
return true;
+ }
- if (info_grab_one_flag(d_ptr->mflags9, r_info_flags9, what))
+ if (info_grab_one_flag(d_ptr->mflags9, r_info_flags9, what)) {
return true;
+ }
- if (info_grab_one_flag(d_ptr->mflagsr, r_info_flagsr, what))
+ if (info_grab_one_flag(d_ptr->mflagsr, r_info_flagsr, what)) {
return true;
+ }
- if (EnumClassFlagGroup<MonsterBehaviorType>::grab_one_flag(d_ptr->mon_behavior_flags, r_info_behavior_flags, what))
+ if (EnumClassFlagGroup<MonsterBehaviorType>::grab_one_flag(d_ptr->mon_behavior_flags, r_info_behavior_flags, what)) {
return true;
+ }
- if (EnumClassFlagGroup<MonsterVisualType>::grab_one_flag(d_ptr->mon_visual_flags, r_info_visual_flags, what))
+ if (EnumClassFlagGroup<MonsterVisualType>::grab_one_flag(d_ptr->mon_visual_flags, r_info_visual_flags, what)) {
return true;
+ }
msg_format(_("未知のモンスター・フラグ '%s'。", "Unknown monster flag '%s'."), what.data());
return false;
*/
static bool grab_one_basic_flag(monster_race *r_ptr, std::string_view what)
{
- if (info_grab_one_flag(r_ptr->flags1, r_info_flags1, what))
+ if (info_grab_one_flag(r_ptr->flags1, r_info_flags1, what)) {
return true;
+ }
- if (info_grab_one_flag(r_ptr->flags2, r_info_flags2, what))
+ if (info_grab_one_flag(r_ptr->flags2, r_info_flags2, what)) {
return true;
+ }
- if (info_grab_one_flag(r_ptr->flags3, r_info_flags3, what))
+ if (info_grab_one_flag(r_ptr->flags3, r_info_flags3, what)) {
return true;
+ }
- if (info_grab_one_flag(r_ptr->flags7, r_info_flags7, what))
+ if (info_grab_one_flag(r_ptr->flags7, r_info_flags7, what)) {
return true;
+ }
- if (info_grab_one_flag(r_ptr->flags8, r_info_flags8, what))
+ if (info_grab_one_flag(r_ptr->flags8, r_info_flags8, what)) {
return true;
+ }
- if (info_grab_one_flag(r_ptr->flags9, r_info_flags9, what))
+ if (info_grab_one_flag(r_ptr->flags9, r_info_flags9, what)) {
return true;
+ }
- if (info_grab_one_flag(r_ptr->flagsr, r_info_flagsr, what))
+ if (info_grab_one_flag(r_ptr->flagsr, r_info_flagsr, what)) {
return true;
+ }
if (EnumClassFlagGroup<MonsterAuraType>::grab_one_flag(r_ptr->aura_flags, r_info_aura_flags, what)) {
return true;
-#include "view/display-map.h"
+#include "view/display-map.h"
#include "autopick/autopick-finder.h"
#include "autopick/autopick-methods-table.h"
#include "autopick/autopick-util.h"
c = f_ptr->x_char[F_LIT_DARK];
}
} else if (darkened_grid(player_ptr, g_ptr) && !player_ptr->blind) {
- if (f_ptr->flags.has_all_of({FloorFeatureType::LOS, FloorFeatureType::PROJECT})) {
+ if (f_ptr->flags.has_all_of({ FloorFeatureType::LOS, FloorFeatureType::PROJECT })) {
feat = (view_unsafe_grids && (g_ptr->info & CAVE_UNSAFE)) ? feat_undetected : feat_none;
f_ptr = &f_info[feat];
a = f_ptr->x_attr[F_LIT_STANDARD];