OSDN Git Service

Merge pull request #41491 (taotao/hengband/fix-impure_calc_num_blow into develop).
[hengband/hengband.git] / src / system / monster-race-definition.h
1 #pragma once
2
3 #include "monster-attack/monster-attack-effect.h"
4 #include "monster-attack/monster-attack-types.h"
5 #include "system/angband.h"
6
7 /*
8  * Monster blow structure
9  *
10  *      - Method (RBM_*)
11  *      - Effect (RBE_*)
12  *      - Damage Dice
13  *      - Damage Sides
14  */
15 typedef struct monster_blow {
16     rbm_type method;
17     rbe_type effect;
18     DICE_NUMBER d_dice;
19     DICE_SID d_side;
20 } monster_blow;
21
22 /*
23  * Monster "race" information, including racial memories
24  *
25  * Note that "d_attr" and "d_char" are used for MORE than "visual" stuff.
26  *
27  * Note that "x_attr" and "x_char" are used ONLY for "visual" stuff.
28  *
29  * Note that "cur_num" (and "max_num") represent the number of monsters
30  * of the given race currently on (and allowed on) the current level.
31  * This information yields the "dead" flag for Unique monsters.
32  *
33  * Note that "max_num" is reset when a new player is created.
34  * Note that "cur_num" is reset when a new level is created.
35  *
36  * Note that several of these fields, related to "recall", can be
37  * scrapped if space becomes an issue, resulting in less "complete"
38  * monster recall (no knowledge of spells, etc).  All of the "recall"
39  * fields have a special prefix to aid in searching for them.
40  */
41
42 typedef struct monster_race {
43     STR_OFFSET name; /*!< 名前データのオフセット(日本語) /  Name offset(Japanese) */
44 #ifdef JP
45     STR_OFFSET E_name; /*!< 名前データのオフセット(英語) /  Name offset(English) */
46 #endif
47     STR_OFFSET text; /*!< 思い出テキストのオフセット / Lore text offset */
48     DICE_NUMBER hdice; /*!< HPのダイス数 / Creatures hit dice count */
49     DICE_SID hside; /*!< HPのダイス面数 / Creatures hit dice sides */
50     ARMOUR_CLASS ac; /*!< アーマークラス / Armour Class */
51     SLEEP_DEGREE sleep; /*!< 睡眠値 / Inactive counter (base) */
52     POSITION aaf; /*!< 感知範囲(1-100スクエア) / Area affect radius (1-100) */
53     SPEED speed; /*!< 加速(110で+0) / Speed (normally 110) */
54     EXP mexp; /*!< 殺害時基本経験値 / Exp value for kill */
55     BIT_FLAGS16 extra; /*!< 未使用 /  Unused (for now) */
56     RARITY freq_spell; /*!< 魔法&特殊能力仕様頻度(1/n) /  Spell frequency */
57     BIT_FLAGS flags1; /* Flags 1 (general) */
58     BIT_FLAGS flags2; /* Flags 2 (abilities) */
59     BIT_FLAGS flags3; /* Flags 3 (race/resist) */
60     BIT_FLAGS flags4; /* Flags 4 (inate/breath) */
61     BIT_FLAGS flags7; /* Flags 7 (movement related abilities) */
62     BIT_FLAGS flags8; /* Flags 8 (wilderness info) */
63     BIT_FLAGS flags9; /* Flags 9 (drops info) */
64     BIT_FLAGS flagsr; /* Flags R (resistances info) */
65     BIT_FLAGS a_ability_flags1; /* Activate Ability Flags 5 (normal spells) */
66     BIT_FLAGS a_ability_flags2; /* Activate Ability Flags 6 (special spells) */
67     BIT_FLAGS a_ability_flags3; /* Activate Ability Flags 7 (implementing) */
68     BIT_FLAGS a_ability_flags4; /* Activate Ability Flags 8 (implementing) */
69     monster_blow blow[4]; /* Up to four blows per round */
70     MONRACE_IDX reinforce_id[6];
71     DICE_NUMBER reinforce_dd[6];
72     DICE_SID reinforce_ds[6];
73     ARTIFACT_IDX artifact_id[4]; /* 特定アーティファクトドロップID */
74     RARITY artifact_rarity[4]; /* 特定アーティファクトレア度 */
75     PERCENTAGE artifact_percent[4]; /* 特定アーティファクトドロップ率 */
76     PERCENTAGE arena_ratio; /* モンスター闘技場の掛け金倍率修正値(%基準 / 0=100%) / The adjustment ratio for gambling monster */
77     MONRACE_IDX next_r_idx;
78     EXP next_exp;
79     DEPTH level; /* Level of creature */
80     RARITY rarity; /* Rarity of creature */
81     TERM_COLOR d_attr; /* Default monster attribute */
82     SYMBOL_CODE d_char; /* Default monster character */
83     TERM_COLOR x_attr; /* Desired monster attribute */
84     SYMBOL_CODE x_char; /* Desired monster character */
85     MONSTER_NUMBER max_num; /* Maximum population allowed per level */
86     MONSTER_NUMBER cur_num; /* Monster population on current level */
87     FLOOR_IDX floor_id; /* Location of unique monster */
88     MONSTER_NUMBER r_sights; /* Count sightings of this monster */
89     MONSTER_NUMBER r_deaths; /* Count deaths from this monster */
90     MONSTER_NUMBER r_pkills; /* Count visible monsters killed in this life */
91     MONSTER_NUMBER r_akills; /* Count all monsters killed in this life */
92     MONSTER_NUMBER r_tkills; /* Count monsters killed in all lives */
93     byte r_wake; /* Number of times woken up (?) */
94     byte r_ignore; /* Number of times ignored (?) */
95 #define MR1_EVOLUTION 0x01
96     byte r_xtra1; /* Something */
97     byte r_xtra2; /* Something (unused) */
98     ITEM_NUMBER r_drop_gold; /*!< これまでに撃破時に落とした財宝の数 / Max number of gold dropped at once */
99     ITEM_NUMBER r_drop_item; /*!< これまでに撃破時に落としたアイテムの数 / Max number of item dropped at once */
100     byte r_cast_spell; /* Max number of other spells seen */
101     byte r_blows[4]; /* Number of times each blow type was seen */
102     u32b r_flags1; /* Observed racial flags */
103     u32b r_flags2; /* Observed racial flags */
104     u32b r_flags3; /* Observed racial flags */
105     u32b r_flags4; /* Observed racial flags */
106     u32b r_flags5; /* Observed racial flags */
107     u32b r_flags6; /* Observed racial flags */
108     u32b r_flagsr; /* Observed racial resistance flags */
109 } monster_race;