OSDN Git Service

Merge pull request #741 from habu1010/feature/vectorize-info-array
[hengbandforosx/hengbandosx.git] / src / dungeon / dungeon.h
1 #pragma once
2
3 #include "system/angband.h"
4
5 #include "grid/feature.h"
6 #include "monster-race/race-ability-flags.h"
7 #include "util/flag-group.h"
8
9 #include <string>
10 #include <vector>
11
12 #define DUNGEON_FEAT_PROB_NUM 3
13
14 #define DUNGEON_ANGBAND  1
15 #define DUNGEON_GALGALS  2
16 #define DUNGEON_ORC      3
17 #define DUNGEON_MAZE     4
18 #define DUNGEON_DRAGON   5
19 #define DUNGEON_GRAVE    6
20 #define DUNGEON_WOOD     7
21 #define DUNGEON_VOLCANO  8
22 #define DUNGEON_HELL     9
23 #define DUNGEON_HEAVEN   10
24 #define DUNGEON_OCEAN    11
25 #define DUNGEON_CASTLE   12
26 #define DUNGEON_CTH      13
27 #define DUNGEON_MOUNTAIN 14
28 #define DUNGEON_GOLD     15
29 #define DUNGEON_NO_MAGIC 16
30 #define DUNGEON_NO_MELEE 17
31 #define DUNGEON_CHAMELEON 18
32 #define DUNGEON_DARKNESS 19
33
34 /* A structure for the != dungeon types */
35 typedef struct dungeon_type dungeon_type;
36 struct dungeon_type {
37
38         std::string name; /* Name */
39     std::string text; /* Description */
40
41         POSITION dy{};
42         POSITION dx{};
43
44         feat_prob floor[DUNGEON_FEAT_PROB_NUM]{}; /* Floor probability */
45         feat_prob fill[DUNGEON_FEAT_PROB_NUM]{};  /* Cave wall probability */
46         FEAT_IDX outer_wall{};                        /* Outer wall tile */
47         FEAT_IDX inner_wall{};                        /* Inner wall tile */
48         FEAT_IDX stream1{};                           /* stream tile */
49         FEAT_IDX stream2{};                           /* stream tile */
50
51         DEPTH mindepth{};         /* Minimal depth */
52         DEPTH maxdepth{};         /* Maximal depth */
53         PLAYER_LEVEL min_plev{};         /* Minimal plev needed to enter -- it's an anti-cheating mesure */
54         BIT_FLAGS16 pit{};
55         BIT_FLAGS16 nest{};
56         BIT_FLAGS8 mode{}; /* Mode of combinaison of the monster flags */
57
58         int min_m_alloc_level{};        /* Minimal number of monsters per level */
59         int max_m_alloc_chance{};       /* There is a 1/max_m_alloc_chance chance per round of creating a new monster */
60
61         BIT_FLAGS flags1{};             /* Flags 1 */
62
63         BIT_FLAGS mflags1{};            /* The monster flags that are allowed */
64         BIT_FLAGS mflags2{};
65         BIT_FLAGS mflags3{};
66         BIT_FLAGS mflags7{};
67         BIT_FLAGS mflags8{};
68         BIT_FLAGS mflags9{};
69         BIT_FLAGS mflagsr{};
70
71         FlagGroup<RF_ABILITY> m_ability_flags;
72
73         char r_char[5]{};               /* Monster race allowed */
74         KIND_OBJECT_IDX final_object{}; /* The object you'll find at the bottom */
75         ARTIFACT_IDX final_artifact{};  /* The artifact you'll find at the bottom */
76         MONRACE_IDX final_guardian{};   /* The artifact's guardian. If an artifact is specified, then it's NEEDED */
77
78         PROB special_div{};     /* % of monsters affected by the flags/races allowed, to add some variety */
79         int tunnel_percent{};
80         int obj_great{};
81         int obj_good{};
82 };
83
84 extern DEPTH *max_dlv;
85 extern std::vector<dungeon_type> d_info;
86
87 extern DUNGEON_IDX choose_dungeon(concptr note, POSITION y, POSITION x);