OSDN Git Service

[Refactor] #3766 item_activation_dragon_breath() をItemEntity のオブジェクトメソッドへ移した
[hengbandforosx/hengbandosx.git] / src / system / dungeon-info.h
1 #pragma once
2
3 #include "dungeon/dungeon-flag-types.h"
4 #include "monster-race/race-ability-flags.h"
5 #include "monster-race/race-behavior-flags.h"
6 #include "monster-race/race-brightness-flags.h"
7 #include "monster-race/race-drop-flags.h"
8 #include "monster-race/race-feature-flags.h"
9 #include "monster-race/race-flags-resistance.h"
10 #include "monster-race/race-kind-flags.h"
11 #include "monster-race/race-population-flags.h"
12 #include "monster-race/race-resistance-mask.h"
13 #include "monster-race/race-speak-flags.h"
14 #include "monster-race/race-visual-flags.h"
15 #include "monster-race/race-wilderness-flags.h"
16 #include "system/angband.h"
17 #include "util/flag-group.h"
18 #include <array>
19 #include <string>
20 #include <vector>
21
22 constexpr auto DUNGEON_FEAT_PROB_NUM = 3;
23
24 /*! @todo 後でenum classとして再定義する */
25 #define DUNGEON_ANGBAND 1
26 #define DUNGEON_GALGALS 2
27 #define DUNGEON_ORC 3
28 #define DUNGEON_MAZE 4
29 #define DUNGEON_DRAGON 5
30 #define DUNGEON_GRAVE 6
31 #define DUNGEON_WOOD 7
32 #define DUNGEON_VOLCANO 8
33 #define DUNGEON_HELL 9
34 #define DUNGEON_HEAVEN 10
35 #define DUNGEON_OCEAN 11
36 #define DUNGEON_CASTLE 12
37 #define DUNGEON_CTH 13
38 #define DUNGEON_MOUNTAIN 14
39 #define DUNGEON_GOLD 15
40 #define DUNGEON_NO_MAGIC 16
41 #define DUNGEON_NO_MELEE 17
42 #define DUNGEON_CHAMELEON 18
43 #define DUNGEON_DARKNESS 19
44 #define DUNGEON_MAX 19
45
46 enum class FixedArtifactId : short;
47 enum class MonsterRaceId : int16_t;
48
49 struct feat_prob {
50     FEAT_IDX feat{}; /* Feature tile */
51     PERCENTAGE percent{}; /* Chance of type */
52 };
53
54 /* A structure for the != dungeon types */
55 struct dungeon_type {
56     DUNGEON_IDX idx{};
57
58     std::string name; /* Name */
59     std::string text; /* Description */
60
61     POSITION dy{};
62     POSITION dx{};
63
64     std::array<feat_prob, DUNGEON_FEAT_PROB_NUM> floor{}; /* Floor probability */
65     std::array<feat_prob, DUNGEON_FEAT_PROB_NUM> fill{}; /* Cave wall probability */
66     FEAT_IDX outer_wall{}; /* Outer wall tile */
67     FEAT_IDX inner_wall{}; /* Inner wall tile */
68     FEAT_IDX stream1{}; /* stream tile */
69     FEAT_IDX stream2{}; /* stream tile */
70
71     DEPTH mindepth{}; /* Minimal depth */
72     DEPTH maxdepth{}; /* Maximal depth */
73     PLAYER_LEVEL min_plev{}; /* Minimal plev needed to enter -- it's an anti-cheating mesure */
74     BIT_FLAGS16 pit{};
75     BIT_FLAGS16 nest{};
76     BIT_FLAGS8 mode{}; /* Mode of combinaison of the monster flags */
77
78     int min_m_alloc_level{}; /* Minimal number of monsters per level */
79     int max_m_alloc_chance{}; /* There is a 1/max_m_alloc_chance chance per round of creating a new monster */
80
81     EnumClassFlagGroup<DungeonFeatureType> flags{}; /* Dungeon Flags */
82
83     BIT_FLAGS mflags1{}; /* The monster flags that are allowed */
84     BIT_FLAGS mflags2{};
85     BIT_FLAGS mflags3{};
86     BIT_FLAGS mflags7{};
87     BIT_FLAGS mflags8{};
88
89     EnumClassFlagGroup<MonsterAbilityType> mon_ability_flags;
90     EnumClassFlagGroup<MonsterBehaviorType> mon_behavior_flags;
91     EnumClassFlagGroup<MonsterVisualType> mon_visual_flags;
92     EnumClassFlagGroup<MonsterKindType> mon_kind_flags;
93     EnumClassFlagGroup<MonsterResistanceType> mon_resistance_flags;
94     EnumClassFlagGroup<MonsterDropType> mon_drop_flags;
95     EnumClassFlagGroup<MonsterWildernessType> mon_wilderness_flags;
96     EnumClassFlagGroup<MonsterFeatureType> mon_feature_flags;
97     EnumClassFlagGroup<MonsterPopulationType> mon_population_flags;
98     EnumClassFlagGroup<MonsterSpeakType> mon_speak_flags;
99     EnumClassFlagGroup<MonsterBrightnessType> mon_brightness_flags;
100
101     std::vector<char> r_chars; /* Monster symbols allowed */
102     short final_object{}; /* The object you'll find at the bottom */
103     FixedArtifactId final_artifact{}; /* The artifact you'll find at the bottom */
104     MonsterRaceId final_guardian{}; /* The artifact's guardian. If an artifact is specified, then it's NEEDED */
105
106     PROB special_div{}; /* % of monsters affected by the flags/races allowed, to add some variety */
107     int tunnel_percent{};
108     int obj_great{};
109     int obj_good{};
110
111     bool has_river_flag() const;
112 };
113
114 extern std::vector<DEPTH> max_dlv;
115 extern std::vector<dungeon_type> dungeons_info;