OSDN Git Service

[Refactor] #37353 MAGIC_* を player-status.h に移動。
[hengband/hengband.git] / src / player-class.h
1 #pragma once
2 #include "spells.h"
3 #include "realm.h"
4
5 /*
6  * 職業ごとの選択可能な魔法領域現在の所 bitrh.cとtables.cでのみ使用。
7  * Possible realms that can be chosen currently used only by birth.c and tables.c
8  */
9 #define CH_NONE         0x00
10 #define CH_LIFE         0x01
11 #define CH_SORCERY      0x02
12 #define CH_NATURE       0x04
13 #define CH_CHAOS        0x08
14 #define CH_DEATH        0x10
15 #define CH_TRUMP        0x20
16 #define CH_ARCANE       0x40
17 #define CH_ENCHANT      0x80
18 #define CH_DAEMON       0x100
19 #define CH_CRUSADE      0x200
20
21 #define CH_MUSIC        0x08000 /* This is 16th bit */
22 #define CH_HISSATSU     0x10000
23 #define CH_HEX          0x20000
24
25 #define IS_WIZARD_CLASS() \
26         (p_ptr->pclass == CLASS_MAGE || p_ptr->pclass == CLASS_HIGH_MAGE || p_ptr->pclass == CLASS_SORCERER || p_ptr->pclass == CLASS_MAGIC_EATER || p_ptr->pclass == CLASS_BLUE_MAGE)
27
28
29 /*
30  * Information about the player's "magic"
31  *
32  * Note that a player with a "spell_book" of "zero" is illiterate.
33  */
34
35 typedef struct player_magic player_magic;
36
37 struct player_magic
38 {
39         OBJECT_TYPE_VALUE spell_book; /* Tval of spell books (if any) */
40         int spell_xtra;         /* Something for later */
41
42         int spell_stat;         /* Stat for spells (if any)  */
43         int spell_type;         /* Spell type (mage/priest) */
44
45         int spell_first;                /* Level of first spell */
46         int spell_weight;               /* Weight that hurts spells */
47
48         magic_type info[MAX_MAGIC][32];    /* The available spells */
49 };
50
51 extern player_magic *m_info;
52 extern const player_magic *mp_ptr;
53
54 /*
55  * Player class info
56  */
57
58 typedef struct player_class player_class;
59
60 struct player_class
61 {
62         concptr title;                  /* Type of class */
63
64 #ifdef JP
65         concptr E_title;                /* 英語職業 */
66 #endif
67         s16b c_adj[6];          /* Class stat modifier */
68
69         s16b c_dis;                     /* class disarming */
70         s16b c_dev;                     /* class magic devices */
71         s16b c_sav;                     /* class saving throws */
72         s16b c_stl;                     /* class stealth */
73         s16b c_srh;                     /* class searching ability */
74         s16b c_fos;                     /* class searching frequency */
75         s16b c_thn;                     /* class to hit (normal) */
76         s16b c_thb;                     /* class to hit (bows) */
77
78         s16b x_dis;                     /* extra disarming */
79         s16b x_dev;                     /* extra magic devices */
80         s16b x_sav;                     /* extra saving throws */
81         s16b x_stl;                     /* extra stealth */
82         s16b x_srh;                     /* extra searching ability */
83         s16b x_fos;                     /* extra searching frequency */
84         s16b x_thn;                     /* extra to hit (normal) */
85         s16b x_thb;                     /* extra to hit (bows) */
86
87         s16b c_mhp;                     /* Class hit-dice adjustment */
88         s16b c_exp;                     /* Class experience factor */
89
90         byte pet_upkeep_div; /* Pet upkeep divider */
91 };
92
93 extern const player_class *cp_ptr;
94 extern const player_class class_info[MAX_CLASS];
95
96 extern const s32b realm_choices1[];
97 extern const s32b realm_choices2[];
98 extern const concptr player_title[MAX_CLASS][PY_MAX_LEVEL / 5];