OSDN Git Service

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