OSDN Git Service

Merge pull request #3569 from sikabane-works/release/3.0.0.88-alpha
[hengbandforosx/hengbandosx.git] / src / player-info / class-info.h
1 #pragma once
2
3 /* 人畜無害なenumヘッダを先に読み込む */
4 #include "system/angband.h"
5
6 #include "object/tval-types.h"
7 #include "player-info/class-types.h"
8 #include "realm/realm-types.h"
9 #include "spell/technic-info-table.h"
10
11 #include <string>
12 #include <vector>
13
14 /** ClassMagicDefinitions.txtでMPの無い職業に設定される */
15 #define SPELL_FIRST_NO_SPELL 99
16
17 /*
18  * Information about the player's "magic"
19  *
20  * Note that a player with a "spell_book" of "zero" is illiterate.
21  */
22
23 struct player_magic {
24     ItemKindType spell_book{}; /* Tval of spell books (if any) */
25     BIT_FLAGS8 spell_xtra{}; /* Something for later */
26
27     int spell_stat{}; /* Stat for spells (if any)  */
28     int spell_type{}; /* Spell type (mage/priest) */
29
30     int spell_first{}; /* Level of first spell */
31     int spell_weight{}; /* Weight that hurts spells */
32
33     magic_type info[MAX_MAGIC][32]{}; /* The available spells */
34 };
35
36 extern std::vector<player_magic> class_magics_info;
37 extern const player_magic *mp_ptr;
38
39 struct player_class_info {
40     concptr title; /* Type of class */
41
42 #ifdef JP
43     concptr E_title; /* 英語職業 */
44 #endif
45     int16_t c_adj[6]; /* Class stat modifier */
46
47     int16_t c_dis; /* class disarming */
48     int16_t c_dev; /* class magic devices */
49     int16_t c_sav; /* class saving throws */
50     int16_t c_stl; /* class stealth */
51     int16_t c_srh; /* class searching ability */
52     int16_t c_fos; /* class searching frequency */
53     int16_t c_thn; /* class to hit (normal) */
54     int16_t c_thb; /* class to hit (bows) */
55
56     int16_t x_dis; /* extra disarming */
57     int16_t x_dev; /* extra magic devices */
58     int16_t x_sav; /* extra saving throws */
59     int16_t x_stl; /* extra stealth */
60     int16_t x_srh; /* extra searching ability */
61     int16_t x_fos; /* extra searching frequency */
62     int16_t x_thn; /* extra to hit (normal) */
63     int16_t x_thb; /* extra to hit (bows) */
64
65     int16_t c_mhp; /* Class hit-dice adjustment */
66     int16_t c_exp; /* Class experience factor */
67
68     byte pet_upkeep_div; /* Pet upkeep divider */
69
70     int num;
71     int wgt;
72     int mul;
73 };
74
75 extern const player_class_info *cp_ptr;
76 extern const std::vector<player_class_info> class_info;
77 extern const std::vector<std::vector<std::string_view>> player_titles;