OSDN Git Service

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