OSDN Git Service

Merge branch 'develop' into feature/Divide-Player-Status
[hengbandforosx/hengbandosx.git] / src / player / player-status-flags.h
1 #pragma once
2
3 #include "inventory/inventory-slot-types.h"
4 #include "object-enchant/tr-types.h"
5 #include "system/angband.h"
6
7 enum flag_cause : uint32_t {
8     FLAG_CAUSE_NONE = 0x0U,
9     FLAG_CAUSE_INVEN_MAIN_HAND = 0x01U << 0, /*!< アイテムスロット…利手 */
10     FLAG_CAUSE_INVEN_SUB_HAND = 0x01U << 1, /*!< アイテムスロット…逆手 */
11     FLAG_CAUSE_INVEN_BOW = 0x01U << 2, /*!< アイテムスロット…射撃 */
12     FLAG_CAUSE_INVEN_MAIN_RING = 0x01U << 3, /*!< アイテムスロット…利手指 */
13     FLAG_CAUSE_INVEN_SUB_RING = 0x01U << 4, /*!< アイテムスロット…逆手指 */
14     FLAG_CAUSE_INVEN_NECK = 0x01U << 5, /*!< アイテムスロット…首 */
15     FLAG_CAUSE_INVEN_LITE = 0x01U << 6, /*!< アイテムスロット…光源 */
16     FLAG_CAUSE_INVEN_BODY = 0x01U << 7, /*!< アイテムスロット…体 */
17     FLAG_CAUSE_INVEN_OUTER = 0x01U << 8, /*!< アイテムスロット…体の上 */
18     FLAG_CAUSE_INVEN_HEAD = 0x01U << 9, /*!< アイテムスロット…頭部 */
19     FLAG_CAUSE_INVEN_ARMS = 0x01U << 10, /*!< アイテムスロット…腕部 */
20     FLAG_CAUSE_INVEN_FEET = 0x01U << 11, /*!< アイテムスロット…脚部 */
21     FLAG_CAUSE_RACE = 0x01U << 12, /*!< 種族上の体得 */
22     FLAG_CAUSE_CLASS = 0x01U << 13, /*!< 職業上の体得 */
23     FLAG_CAUSE_PERSONALITY = 0x01U << 14, /*!< 性格上の体得 */
24     FLAG_CAUSE_MAGIC_TIME_EFFECT = 0x01U << 15, /*!< 魔法による時限効果 */
25     FLAG_CAUSE_MUTATION = 0x01U << 16, /*!< 変異による効果 */
26     FLAG_CAUSE_BATTLE_FORM = 0x01U << 17, /*!< 構えによる効果 */
27     FLAG_CAUSE_RIDING = 0x01U << 18, /*!< 乗馬による効果 */
28     FLAG_CAUSE_INVEN_PACK = 0x01U << 19, /*!< その他インベントリによる効果 重量超過等 */
29     FLAG_CAUSE_ACTION = 0x01U << 20, /*!< ACTIONによる効果 探索モード等 */
30     FLAG_CAUSE_MAX = 0x01U << 21
31 };
32
33 enum melee_type {
34     MELEE_TYPE_BAREHAND_TWO = 0,
35     MELEE_TYPE_BAREHAND_MAIN = 1,
36     MELEE_TYPE_BAREHAND_SUB = 2,
37     MELEE_TYPE_WEAPON_MAIN = 3,
38     MELEE_TYPE_WEAPON_SUB = 4,
39     MELEE_TYPE_WEAPON_TWOHAND = 5,
40     MELEE_TYPE_WEAPON_DOUBLE = 6,
41     MELEE_TYPE_SHIELD_DOUBLE = 7
42 };
43
44 enum aggravate_state {
45     AGGRAVATE_NONE = 0x00000000L,
46     AGGRAVATE_S_FAIRY = 0x00000001L,
47     AGGRAVATE_NORMAL = 0x00000002L,
48 };
49
50 typedef struct player_type player_type;
51 BIT_FLAGS convert_inventory_slot_type_to_flag_cause(inventory_slot_type inventory_slot);
52 BIT_FLAGS check_equipment_flags(player_type *creature_ptr, tr_type tr_flag);
53 BIT_FLAGS get_player_flags(player_type *creature_ptr, tr_type tr_flag);
54 bool has_pass_wall(player_type *creature_ptr);
55 bool has_kill_wall(player_type *creature_ptr);
56 BIT_FLAGS has_xtra_might(player_type *creature_ptr);
57 BIT_FLAGS has_esp_evil(player_type *creature_ptr);
58 BIT_FLAGS has_esp_animal(player_type *creature_ptr);
59 BIT_FLAGS has_esp_undead(player_type *creature_ptr);
60 BIT_FLAGS has_esp_demon(player_type *creature_ptr);
61 BIT_FLAGS has_esp_orc(player_type *creature_ptr);
62 BIT_FLAGS has_esp_troll(player_type *creature_ptr);
63 BIT_FLAGS has_esp_giant(player_type *creature_ptr);
64 BIT_FLAGS has_esp_dragon(player_type *creature_ptr);
65 BIT_FLAGS has_esp_human(player_type *creature_ptr);
66 BIT_FLAGS has_esp_good(player_type *creature_ptr);
67 BIT_FLAGS has_esp_nonliving(player_type *creature_ptr);
68 BIT_FLAGS has_esp_unique(player_type *creature_ptr);
69 BIT_FLAGS has_esp_telepathy(player_type *creature_ptr);
70 BIT_FLAGS has_bless_blade(player_type *creature_ptr);
71 BIT_FLAGS has_easy2_weapon(player_type *creature_ptr);
72 BIT_FLAGS has_down_saving(player_type *creature_ptr);
73 BIT_FLAGS has_no_ac(player_type *creature_ptr);
74 BIT_FLAGS has_invuln_arrow(player_type *creature_ptr);
75 void check_no_flowed(player_type *creature_ptr);
76 BIT_FLAGS has_mighty_throw(player_type *creature_ptr);
77 BIT_FLAGS has_dec_mana(player_type *creature_ptr);
78 BIT_FLAGS has_reflect(player_type *creature_ptr);
79 BIT_FLAGS has_see_nocto(player_type *creature_ptr);
80 BIT_FLAGS has_warning(player_type *creature_ptr);
81 BIT_FLAGS has_anti_magic(player_type *creature_ptr);
82 BIT_FLAGS has_anti_tele(player_type *creature_ptr);
83 BIT_FLAGS has_sh_fire(player_type *creature_ptr);
84 BIT_FLAGS has_sh_elec(player_type *creature_ptr);
85 BIT_FLAGS has_sh_cold(player_type *creature_ptr);
86 BIT_FLAGS has_easy_spell(player_type *creature_ptr);
87 BIT_FLAGS has_heavy_spell(player_type *creature_ptr);
88 BIT_FLAGS has_hold_exp(player_type *creature_ptr);
89 BIT_FLAGS has_see_inv(player_type *creature_ptr);
90 BIT_FLAGS has_magic_mastery(player_type *creature_ptr);
91 BIT_FLAGS has_free_act(player_type *creature_ptr);
92 BIT_FLAGS has_sustain_str(player_type *creature_ptr);
93 BIT_FLAGS has_sustain_int(player_type *creature_ptr);
94 BIT_FLAGS has_sustain_wis(player_type *creature_ptr);
95 BIT_FLAGS has_sustain_dex(player_type *creature_ptr);
96 BIT_FLAGS has_sustain_con(player_type *creature_ptr);
97 BIT_FLAGS has_sustain_chr(player_type *creature_ptr);
98 BIT_FLAGS has_levitation(player_type *creature_ptr);
99 bool has_can_swim(player_type *creature_ptr);
100 BIT_FLAGS has_slow_digest(player_type *creature_ptr);
101 BIT_FLAGS has_regenerate(player_type *creature_ptr);
102 void update_curses(player_type *creature_ptr);
103 BIT_FLAGS has_impact(player_type *creature_ptr);
104 BIT_FLAGS has_earthquake(player_type *creature_ptr);
105 void update_extra_blows(player_type *creature_ptr);
106 BIT_FLAGS has_resist_acid(player_type *creature_ptr);
107 BIT_FLAGS has_vuln_acid(player_type *creature_ptr);
108 BIT_FLAGS has_resist_elec(player_type *creature_ptr);
109 BIT_FLAGS has_vuln_elec(player_type *creature_ptr);
110 BIT_FLAGS has_resist_fire(player_type *creature_ptr);
111 BIT_FLAGS has_vuln_fire(player_type *creature_ptr);
112 BIT_FLAGS has_resist_cold(player_type *creature_ptr);
113 BIT_FLAGS has_vuln_cold(player_type *creature_ptr);
114 BIT_FLAGS has_resist_pois(player_type *creature_ptr);
115 BIT_FLAGS has_resist_conf(player_type *creature_ptr);
116 BIT_FLAGS has_resist_sound(player_type *creature_ptr);
117 BIT_FLAGS has_resist_lite(player_type *creature_ptr);
118 BIT_FLAGS has_vuln_lite(player_type *creature_ptr);
119 BIT_FLAGS has_resist_dark(player_type *creature_ptr);
120 BIT_FLAGS has_resist_chaos(player_type *creature_ptr);
121 BIT_FLAGS has_resist_disen(player_type *creature_ptr);
122 BIT_FLAGS has_resist_shard(player_type *creature_ptr);
123 BIT_FLAGS has_resist_nexus(player_type *creature_ptr);
124 BIT_FLAGS has_resist_blind(player_type *creature_ptr);
125 BIT_FLAGS has_resist_neth(player_type *creature_ptr);
126 BIT_FLAGS has_resist_time(player_type *creature_ptr);
127 BIT_FLAGS has_resist_water(player_type *creature_ptr);
128 BIT_FLAGS has_resist_curse(player_type *creature_ptr);
129 BIT_FLAGS has_resist_fear(player_type *creature_ptr);
130 BIT_FLAGS has_immune_acid(player_type *creature_ptr);
131 BIT_FLAGS has_immune_elec(player_type *creature_ptr);
132 BIT_FLAGS has_immune_fire(player_type *creature_ptr);
133 BIT_FLAGS has_immune_cold(player_type *creature_ptr);
134 BIT_FLAGS has_immune_dark(player_type *creature_ptr);
135 bool can_attack_with_main_hand(player_type *creature_ptr);
136 bool can_attack_with_sub_hand(player_type *creature_ptr);
137 bool has_two_handed_weapons(player_type *creature_ptr);
138 BIT_FLAGS has_lite(player_type *creature_ptr);
139 bool has_disable_two_handed_bonus(player_type *creature_ptr, int i);
140 bool has_not_ninja_weapon(player_type *creature_ptr, int i);
141 bool has_not_monk_weapon(player_type *creature_ptr, int i);
142 bool has_icky_wield_weapon(player_type *creature_ptr, int i);
143 bool has_riding_wield_weapon(player_type *creature_ptr, int i);
144 bool has_good_luck(player_type *creature_ptr);
145 BIT_FLAGS player_aggravate_state(player_type *creature_ptr);
146 melee_type player_melee_type(player_type *creature_ptr);
147 bool has_aggravate(player_type *creature_ptr);