6 #include "dungeon/dungeon-flag-types.h"
7 #include "monster-race/race-ability-flags.h"
8 #include "system/angband.h"
9 #include "util/flag-group.h"
11 #define DUNGEON_FEAT_PROB_NUM 3
13 #define DUNGEON_ANGBAND 1
14 #define DUNGEON_GALGALS 2
16 #define DUNGEON_MAZE 4
17 #define DUNGEON_DRAGON 5
18 #define DUNGEON_GRAVE 6
19 #define DUNGEON_WOOD 7
20 #define DUNGEON_VOLCANO 8
21 #define DUNGEON_HELL 9
22 #define DUNGEON_HEAVEN 10
23 #define DUNGEON_OCEAN 11
24 #define DUNGEON_CASTLE 12
25 #define DUNGEON_CTH 13
26 #define DUNGEON_MOUNTAIN 14
27 #define DUNGEON_GOLD 15
28 #define DUNGEON_NO_MAGIC 16
29 #define DUNGEON_NO_MELEE 17
30 #define DUNGEON_CHAMELEON 18
31 #define DUNGEON_DARKNESS 19
32 #define DUNGEON_MAX 19
34 typedef struct feat_prob {
35 FEAT_IDX feat{}; /* Feature tile */
36 PERCENTAGE percent{}; /* Chance of type */
39 /* A structure for the != dungeon types */
40 typedef struct dungeon_type {
42 std::string name; /* Name */
43 std::string text; /* Description */
48 feat_prob floor[DUNGEON_FEAT_PROB_NUM]{}; /* Floor probability */
49 feat_prob fill[DUNGEON_FEAT_PROB_NUM]{}; /* Cave wall probability */
50 FEAT_IDX outer_wall{}; /* Outer wall tile */
51 FEAT_IDX inner_wall{}; /* Inner wall tile */
52 FEAT_IDX stream1{}; /* stream tile */
53 FEAT_IDX stream2{}; /* stream tile */
55 DEPTH mindepth{}; /* Minimal depth */
56 DEPTH maxdepth{}; /* Maximal depth */
57 PLAYER_LEVEL min_plev{}; /* Minimal plev needed to enter -- it's an anti-cheating mesure */
60 BIT_FLAGS8 mode{}; /* Mode of combinaison of the monster flags */
62 int min_m_alloc_level{}; /* Minimal number of monsters per level */
63 int max_m_alloc_chance{}; /* There is a 1/max_m_alloc_chance chance per round of creating a new monster */
65 EnumClassFlagGroup<DF> flags{}; /* Dungeon Flags */
67 BIT_FLAGS mflags1{}; /* The monster flags that are allowed */
75 EnumClassFlagGroup<RF_ABILITY> m_ability_flags;
77 char r_char[5]{}; /* Monster race allowed */
78 KIND_OBJECT_IDX final_object{}; /* The object you'll find at the bottom */
79 ARTIFACT_IDX final_artifact{}; /* The artifact you'll find at the bottom */
80 MONRACE_IDX final_guardian{}; /* The artifact's guardian. If an artifact is specified, then it's NEEDED */
82 PROB special_div{}; /* % of monsters affected by the flags/races allowed, to add some variety */
88 extern DEPTH *max_dlv;
89 extern std::vector<dungeon_type> d_info;
91 typedef struct player_type player_type;
92 DUNGEON_IDX choose_dungeon(concptr note, POSITION y, POSITION x);
93 bool is_in_dungeon(player_type *creature_ptr);