OSDN Git Service

[Fix] #39976 floor_type * 参照で警告を発する問題を修正.ついでに構造体宣言とや不要インクルード整理. / Fix warning referen...
[hengband/hengband.git] / src / player-class.h
1 #pragma once
2 #include "spells.h"
3
4 /*
5  * 職業ごとの選択可能な魔法領域現在の所 bitrh.c でのみ使用。
6  * Possible realms that can be chosen currently used only by birth.c.
7  */
8 #define CH_NONE         0x00
9 #define CH_LIFE         0x01
10 #define CH_SORCERY      0x02
11 #define CH_NATURE       0x04
12 #define CH_CHAOS        0x08
13 #define CH_DEATH        0x10
14 #define CH_TRUMP        0x20
15 #define CH_ARCANE       0x40
16 #define CH_ENCHANT      0x80
17 #define CH_DAEMON       0x100
18 #define CH_CRUSADE      0x200
19
20 #define CH_MUSIC        0x08000 /* This is 16th bit */
21 #define CH_HISSATSU     0x10000
22 #define CH_HEX          0x20000
23
24  /*
25   * Player class constants (hard-coded by save-files, arrays, etc)
26   */
27 #define CLASS_WARRIOR            0
28 #define CLASS_MAGE               1
29 #define CLASS_PRIEST             2
30 #define CLASS_ROGUE              3
31 #define CLASS_RANGER             4
32 #define CLASS_PALADIN            5
33 #define CLASS_WARRIOR_MAGE       6
34 #define CLASS_CHAOS_WARRIOR      7
35 #define CLASS_MONK               8
36 #define CLASS_MINDCRAFTER        9
37 #define CLASS_HIGH_MAGE         10
38 #define CLASS_TOURIST           11
39 #define CLASS_IMITATOR          12
40 #define CLASS_BEASTMASTER       13
41 #define CLASS_SORCERER          14
42 #define CLASS_ARCHER            15
43 #define CLASS_MAGIC_EATER       16
44 #define CLASS_BARD              17
45 #define CLASS_RED_MAGE          18
46 #define CLASS_SAMURAI           19
47 #define CLASS_FORCETRAINER      20
48 #define CLASS_BLUE_MAGE         21
49 #define CLASS_CAVALRY           22
50 #define CLASS_BERSERKER         23
51 #define CLASS_SMITH             24
52 #define CLASS_MIRROR_MASTER     25
53 #define CLASS_NINJA             26
54 #define CLASS_SNIPER            27
55 #define MAX_CLASS       28 /*!< 職業の最大定義数 Maximum number of player "class" types (see "table.c", etc) */
56
57 #define IS_WIZARD_CLASS(C) \
58         ((C)->pclass == CLASS_MAGE || (C)->pclass == CLASS_HIGH_MAGE || (C)->pclass == CLASS_SORCERER || \
59         (C)->pclass == CLASS_MAGIC_EATER || (C)->pclass == CLASS_BLUE_MAGE)
60
61 /*
62  * Information about the player's "magic"
63  *
64  * Note that a player with a "spell_book" of "zero" is illiterate.
65  */
66
67 typedef struct player_magic player_magic;
68
69 struct player_magic
70 {
71         OBJECT_TYPE_VALUE spell_book; /* Tval of spell books (if any) */
72         int spell_xtra;         /* Something for later */
73
74         int spell_stat;         /* Stat for spells (if any)  */
75         int spell_type;         /* Spell type (mage/priest) */
76
77         int spell_first;                /* Level of first spell */
78         int spell_weight;               /* Weight that hurts spells */
79
80         magic_type info[MAX_MAGIC][32];    /* The available spells */
81 };
82
83 extern player_magic *m_info;
84 extern const player_magic *mp_ptr;
85
86 /*
87  * Player class info
88  */
89
90 typedef struct player_class player_class;
91
92 struct player_class
93 {
94         concptr title;                  /* Type of class */
95
96 #ifdef JP
97         concptr E_title;                /* 英語職業 */
98 #endif
99         s16b c_adj[6];          /* Class stat modifier */
100
101         s16b c_dis;                     /* class disarming */
102         s16b c_dev;                     /* class magic devices */
103         s16b c_sav;                     /* class saving throws */
104         s16b c_stl;                     /* class stealth */
105         s16b c_srh;                     /* class searching ability */
106         s16b c_fos;                     /* class searching frequency */
107         s16b c_thn;                     /* class to hit (normal) */
108         s16b c_thb;                     /* class to hit (bows) */
109
110         s16b x_dis;                     /* extra disarming */
111         s16b x_dev;                     /* extra magic devices */
112         s16b x_sav;                     /* extra saving throws */
113         s16b x_stl;                     /* extra stealth */
114         s16b x_srh;                     /* extra searching ability */
115         s16b x_fos;                     /* extra searching frequency */
116         s16b x_thn;                     /* extra to hit (normal) */
117         s16b x_thb;                     /* extra to hit (bows) */
118
119         s16b c_mhp;                     /* Class hit-dice adjustment */
120         s16b c_exp;                     /* Class experience factor */
121
122         byte pet_upkeep_div; /* Pet upkeep divider */
123 };
124
125 extern const player_class *cp_ptr;
126 extern const player_class class_info[MAX_CLASS];
127
128 extern const s32b realm_choices1[];
129 extern const s32b realm_choices2[];
130 extern const concptr player_title[MAX_CLASS][PY_MAX_LEVEL / 5];