OSDN Git Service

Merge branch 'master' into For2.2.2-Refactoring
[hengband/hengband.git] / src / bldg.h
1 #pragma once
2
3 #include "realm.h"
4 #include "player-race.h"
5 #include "player-class.h"
6
7 #define MAX_BLDG 32 /*!< 施設の種類最大数 / Number of buildings */
8 #define MAX_ARENA_MONS 41 /*<! 闘技場のイベント件数 -KMW- */
9
10 #define BUILDING_NON_MEMBER 0 /*!< 不明(現在未使用) */
11 #define BUILDING_MEMBER     1 /*!< 不明(現在未使用) */
12 #define BUILDING_OWNER      2 /*!< 施設の種族/職業条件が一致している状態値 */
13
14 /*
15  * Arena constants
16  */
17 #define ARENA_DEFEATED_OLD_VER (-(MAX_SHORT)) /*<! 旧バージョンの闘技場敗北定義 */
18
19 #define MAX_KUBI 20
20
21 /*
22  * A structure to describe a building.
23  * From Kamband
24  */
25 typedef struct building_type building_type;
26
27 struct building_type
28 {
29         GAME_TEXT name[20];                  /* proprietor name */
30         GAME_TEXT owner_name[20];            /* proprietor name */
31         GAME_TEXT owner_race[20];            /* proprietor race */
32
33         GAME_TEXT act_names[8][30];          /* action names */
34         PRICE member_costs[8];           /* Costs for class members of building */
35         PRICE other_costs[8];               /* Costs for nonguild members */
36         char letters[8];                /* action letters */
37         BACT_IDX actions[8];                /* action codes */
38         BACT_RESTRICT_IDX action_restr[8];           /* action restrictions */
39
40         CLASS_IDX member_class[MAX_CLASS];   /* which classes are part of guild */
41         RACE_IDX member_race[MAX_RACES];    /* which classes are part of guild */
42         REALM_IDX member_realm[MAX_MAGIC + 1]; /* which realms are part of guild */
43 };
44
45 extern building_type building[MAX_BLDG];
46 extern bool reinit_wilderness;
47 extern MONRACE_IDX today_mon;
48
49 /*
50  * Buildings actions
51  */
52 #define BACT_NOTHING                 0
53 #define BACT_RESEARCH_ITEM           1
54 #define BACT_TOWN_HISTORY            2
55 #define BACT_RACE_LEGENDS            3
56 #define BACT_GREET_KING              4
57 #define BACT_KING_LEGENDS            5
58 #define BACT_QUEST                   6
59 #define BACT_XXX_UNUSED              7
60 #define BACT_POSTER                  8
61 #define BACT_ARENA_RULES             9
62 #define BACT_ARENA                  10
63 #define BACT_ARENA_LEGENDS          11
64 #define BACT_IN_BETWEEN             12
65 #define BACT_GAMBLE_RULES           13
66 #define BACT_CRAPS                  14
67 #define BACT_SPIN_WHEEL             15
68 #define BACT_DICE_SLOTS             16
69 #define BACT_REST                   17
70 #define BACT_FOOD                   18
71 #define BACT_RUMORS                 19
72 #define BACT_RESEARCH_MONSTER       20
73 #define BACT_COMPARE_WEAPONS        21
74 #define BACT_LEGENDS                22
75 #define BACT_ENCHANT_WEAPON         23
76 #define BACT_ENCHANT_ARMOR          24
77 #define BACT_RECHARGE               25
78 #define BACT_IDENTS                 26
79 #define BACT_LEARN                  27
80 #define BACT_HEALING                28
81 #define BACT_RESTORE                29
82 #define BACT_ENCHANT_ARROWS         30
83 #define BACT_ENCHANT_BOW            31
84 #define BACT_GREET                  32
85 #define BACT_RECALL                 33
86 #define BACT_TELEPORT_LEVEL         34
87 #define BACT_LOSE_MUTATION          35
88 #define BACT_BATTLE                 36
89 #define BACT_TSUCHINOKO             37
90 #define BACT_TARGET                 38
91 #define BACT_KUBI                   39
92 #define BACT_KANKIN                 40
93 #define BACT_HEIKOUKA               41
94 #define BACT_TELE_TOWN              42
95 #define BACT_POKER                  43
96 #define BACT_IDENT_ONE              44
97 #define BACT_RECHARGE_ALL           45
98 #define BACT_EVAL_AC                    46
99 #define BACT_BROKEN_WEAPON          47
100 #define MAX_BACT                    48
101
102  /*!
103   * @struct arena_type
104   * @brief 闘技場のモンスターエントリー構造体 / A structure type for arena entry
105   */
106 typedef struct
107 {
108         MONRACE_IDX r_idx; /*!< 闘技場のモンスター種族ID(0ならば表彰式) / Monster (0 means victory prizing) */
109         OBJECT_TYPE_VALUE tval;  /*!< モンスター打倒後に得られるアイテムの大カテゴリID / tval of prize (0 means no prize) */
110         OBJECT_SUBTYPE_VALUE sval;  /*!< モンスター打倒後に得られるアイテムの小カテゴリID / sval of prize */
111 } arena_type;
112
113 extern MONRACE_IDX battle_mon[4];
114 extern u32b mon_odds[4];
115 extern int battle_odds;
116 extern PRICE kakekin;
117 extern int sel_monster;
118
119 extern const arena_type arena_info[MAX_ARENA_MONS + 2];
120 extern void update_gambling_monsters(void);
121 extern void do_cmd_bldg(void);
122
123 extern void clear_bldg(int min_row, int max_row);
124 extern void determine_today_mon(bool conv_old);
125 extern void determine_bounty_uniques(void);