OSDN Git Service

[Refactor] #2645 display_object_list() を整形した
[hengbandforosx/hengbandosx.git] / src / player-attack / player-attack-util.h
1 #pragma once
2
3 #include "combat/combat-options-type.h"
4 #include "combat/martial-arts-table.h"
5 #include "effect/attribute-types.h"
6 #include "object-enchant/tr-flags.h"
7 #include "system/angband.h"
8 #include "system/system-variables.h"
9
10 /*!
11  * @brief カオス効果種別
12  */
13 enum chaotic_effect {
14     CE_NONE = 0,
15     CE_VAMPIRIC = 1,
16     CE_QUAKE = 2,
17     CE_CONFUSION = 3,
18     CE_TELE_AWAY = 4,
19     CE_POLYMORPH = 5,
20 };
21
22 /*!
23  * @brief 魔術効果種別
24  */
25 enum class MagicalBrandEffectType { NONE = 0,
26     EXTRA = 1,
27     STUN = 2,
28     SCARE = 3,
29     DISPELL = 4,
30     PROBE = 5,
31     MAX };
32
33 /*!
34  * @brief プレイヤーの打撃に関する情報
35  */
36 struct grid_type;
37 ;
38 struct monster_race;
39 struct monster_type;
40 struct player_attack_type {
41     int16_t hand{}; //!< 武器の持ち手
42     grid_type *g_ptr; //!< ターゲットのいる地形情報
43     MONSTER_IDX m_idx{}; //!< モンスターID
44     monster_type *m_ptr{}; //!< モンスター情報(参照ポインタ)
45     GAME_TEXT m_name[MAX_NLEN]{}; //!< モンスター名
46     MonsterRaceId r_idx{}; //!< モンスター種族ID
47     monster_race *r_ptr{}; //!< モンスター種族情報(参照ポインタ)
48     bool backstab{}; //!< 眠っている敵を不意打ちしたか
49     bool surprise_attack{}; //!< 気づいていない敵に闇討ちしたか(忍者)
50     bool stab_fleeing{}; //!< 逃げている敵の背後を襲ったか
51     combat_options mode{}; //!< 剣術種別
52     bool monk_attack{}; //!< 素手/マーシャルアーツかどうか
53     const martial_arts *ma_ptr{}; //!< マーシャルアーツ種別
54     int attack_damage{}; //!< 累積ダメージ
55     int num_blow{}; //!< 打撃回数
56     TrFlags flags{}; //!< 武器フラグ
57     chaotic_effect chaos_effect{}; //!< カオス効果
58     MagicalBrandEffectType magical_effect{}; //!< 魔術効果
59     bool *fear{}; //!< 恐怖したかどうか
60     bool *mdeath{}; //!< 死んだかどうか
61     bool can_drain{}; //!< 吸血できるかどうか
62     int drain_result{}; //!< 吸血した累積量
63     int drain_left{}; //!< 吸血できる残量(最大MAX_VAMPIRIC_DRAIN)
64     bool weak{}; //!< 打撃効果でモンスターが弱くなったかどうか
65     AttributeFlags attribute_flags{}; //!< 与えたダメージの種類
66 };