Hengband  2.2.1
player-class.h
[詳解]
1 #pragma once
2 #include "spells.h"
3 #include "realm.h"
4 
5 /*
6  * 職業ごとの選択可能な魔法領域現在の所 bitrh.c でのみ使用。
7  * Possible realms that can be chosen currently used only by birth.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 
26 
27  /*
28  * Player class constants (hard-coded by save-files, arrays, etc)
29  */
30 #define CLASS_WARRIOR 0
31 #define CLASS_MAGE 1
32 #define CLASS_PRIEST 2
33 #define CLASS_ROGUE 3
34 #define CLASS_RANGER 4
35 #define CLASS_PALADIN 5
36 #define CLASS_WARRIOR_MAGE 6
37 #define CLASS_CHAOS_WARRIOR 7
38 #define CLASS_MONK 8
39 #define CLASS_MINDCRAFTER 9
40 #define CLASS_HIGH_MAGE 10
41 #define CLASS_TOURIST 11
42 #define CLASS_IMITATOR 12
43 #define CLASS_BEASTMASTER 13
44 #define CLASS_SORCERER 14
45 #define CLASS_ARCHER 15
46 #define CLASS_MAGIC_EATER 16
47 #define CLASS_BARD 17
48 #define CLASS_RED_MAGE 18
49 #define CLASS_SAMURAI 19
50 #define CLASS_FORCETRAINER 20
51 #define CLASS_BLUE_MAGE 21
52 #define CLASS_CAVALRY 22
53 #define CLASS_BERSERKER 23
54 #define CLASS_SMITH 24
55 #define CLASS_MIRROR_MASTER 25
56 #define CLASS_NINJA 26
57 #define CLASS_SNIPER 27
58 #define MAX_CLASS 28 /*!< 職業の最大定義数 Maximum number of player "class" types (see "table.c", etc) */
59 
60 #define IS_WIZARD_CLASS(C) \
61  ((C)->pclass == CLASS_MAGE || (C)->pclass == CLASS_HIGH_MAGE || (C)->pclass == CLASS_SORCERER || \
62  (C)->pclass == CLASS_MAGIC_EATER || (C)->pclass == CLASS_BLUE_MAGE)
63 
64 /*
65  * Information about the player's "magic"
66  *
67  * Note that a player with a "spell_book" of "zero" is illiterate.
68  */
69 
70 typedef struct player_magic player_magic;
71 
73 {
74  OBJECT_TYPE_VALUE spell_book; /* Tval of spell books (if any) */
75  int spell_xtra; /* Something for later */
76 
77  int spell_stat; /* Stat for spells (if any) */
78  int spell_type; /* Spell type (mage/priest) */
79 
80  int spell_first; /* Level of first spell */
81  int spell_weight; /* Weight that hurts spells */
82 
83  magic_type info[MAX_MAGIC][32]; /* The available spells */
84 };
85 
86 extern player_magic *m_info;
87 extern const player_magic *mp_ptr;
88 
89 /*
90  * Player class info
91  */
92 
93 typedef struct player_class player_class;
94 
96 {
97  concptr title; /* Type of class */
98 
99 #ifdef JP
100  concptr E_title; /* 英語職業 */
101 #endif
102  s16b c_adj[6]; /* Class stat modifier */
103 
104  s16b c_dis; /* class disarming */
105  s16b c_dev; /* class magic devices */
106  s16b c_sav; /* class saving throws */
107  s16b c_stl; /* class stealth */
108  s16b c_srh; /* class searching ability */
109  s16b c_fos; /* class searching frequency */
110  s16b c_thn; /* class to hit (normal) */
111  s16b c_thb; /* class to hit (bows) */
112 
113  s16b x_dis; /* extra disarming */
114  s16b x_dev; /* extra magic devices */
115  s16b x_sav; /* extra saving throws */
116  s16b x_stl; /* extra stealth */
117  s16b x_srh; /* extra searching ability */
118  s16b x_fos; /* extra searching frequency */
119  s16b x_thn; /* extra to hit (normal) */
120  s16b x_thb; /* extra to hit (bows) */
121 
122  s16b c_mhp; /* Class hit-dice adjustment */
123  s16b c_exp; /* Class experience factor */
124 
125  byte pet_upkeep_div; /* Pet upkeep divider */
126 };
127 
128 extern const player_class *cp_ptr;
129 extern const player_class class_info[MAX_CLASS];
130 
131 extern const s32b realm_choices1[];
132 extern const s32b realm_choices2[];
133 extern const concptr player_title[MAX_CLASS][PY_MAX_LEVEL / 5];
int spell_type
Definition: player-class.h:78
int spell_xtra
Definition: player-class.h:75
const char * concptr
文字列定数用ポインタ定義 / A simple pointer (to unmodifiable strings)
Definition: h-type.h:47
s16b c_dis
Definition: player-class.h:104
#define MAX_MAGIC
Definition: realm.h:17
int spell_first
Definition: player-class.h:80
s16b x_thn
Definition: player-class.h:119
#define PY_MAX_LEVEL
プレイヤーレベルの最大値 / Maximum level
Definition: player-status.h:25
const s32b realm_choices1[]
職業毎に選択可能な第一領域魔法テーブル
Definition: player-class.c:361
const player_magic * mp_ptr
Definition: player-class.c:8
#define MAX_CLASS
職業の最大定義数 Maximum number of player "class" types (see "table.c", etc)
Definition: player-class.h:58
const s32b realm_choices2[]
職業毎に選択可能な第二領域魔法テーブル
Definition: player-class.c:406
s16b c_thb
Definition: player-class.h:111
s16b c_dev
Definition: player-class.h:105
const concptr player_title[MAX_CLASS][PY_MAX_LEVEL/5]
職業とレベル毎のプレイヤー称号テーブル / Class titles for the player.
Definition: player-class.c:859
s16b c_mhp
Definition: player-class.h:122
Definition: player-class.h:95
s16b c_adj[6]
Definition: player-class.h:102
const player_class class_info[MAX_CLASS]
職業情報 / Player Classes
Definition: player-class.c:26
byte pet_upkeep_div
Definition: player-class.h:125
signed long s32b
Definition: h-type.h:107
s16b x_srh
Definition: player-class.h:117
s32b OBJECT_TYPE_VALUE
ゲーム中のアイテム主分類の型定義
Definition: h-type.h:202
s16b c_fos
Definition: player-class.h:109
s16b c_stl
Definition: player-class.h:107
int spell_stat
Definition: player-class.h:77
int spell_weight
Definition: player-class.h:81
s16b c_srh
Definition: player-class.h:108
player_magic * m_info
Definition: player-class.c:9
concptr title
Definition: player-class.h:97
s16b x_thb
Definition: player-class.h:120
Definition: spells.h:126
s16b c_thn
Definition: player-class.h:110
s16b x_dis
Definition: player-class.h:113
OBJECT_TYPE_VALUE spell_book
Definition: player-class.h:74
signed short s16b
Definition: h-type.h:98
s16b x_dev
Definition: player-class.h:114
const player_class * cp_ptr
Definition: player-class.c:12
s16b x_fos
Definition: player-class.h:118
s16b c_exp
Definition: player-class.h:123
magic_type info[MAX_MAGIC][32]
Definition: player-class.h:83
s16b c_sav
Definition: player-class.h:106
s16b x_sav
Definition: player-class.h:115
Definition: player-class.h:72
s16b x_stl
Definition: player-class.h:116