OSDN Git Service

[Refactor] enum spells-typeをenum class AttributeTypeに置換
[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 "object-enchant/tr-flags.h"
6 #include "system/angband.h"
7 #include "system/system-variables.h"
8 #include "effect/attribute-types.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 MagicalBrandEffect { NONE = 0, EXTRA = 1, STUN = 2, SCARE = 3, DISPELL = 4, PROBE = 5, MAX };
26
27 /*!
28  * @brief プレイヤーの打撃に関する情報
29  */
30 struct grid_type;;
31 struct monster_race;
32 struct monster_type;
33 typedef struct player_attack_type {
34     int16_t hand{}; //!< 武器の持ち手
35     grid_type *g_ptr; //!< ターゲットのいる地形情報
36     MONSTER_IDX m_idx{}; //!< モンスターID
37     monster_type *m_ptr{}; //!< モンスター情報(参照ポインタ)
38     GAME_TEXT m_name[MAX_NLEN]{}; //!< モンスター名
39     MONRACE_IDX r_idx{}; //!< モンスター種族ID
40     monster_race *r_ptr{}; //!< モンスター種族情報(参照ポインタ)
41     bool backstab{}; //!< 眠っている敵を不意打ちしたか
42     bool surprise_attack{}; //!< 気づいていない敵に闇討ちしたか(忍者)
43     bool stab_fleeing{}; //!< 逃げている敵の背後を襲ったか
44     combat_options mode{}; //!< 剣術種別
45     bool monk_attack{}; //!< 素手/マーシャルアーツかどうか
46     const martial_arts *ma_ptr{}; //!< マーシャルアーツ種別
47     HIT_POINT attack_damage{}; //!< 累積ダメージ
48     int num_blow{}; //!< 打撃回数
49     TrFlags flags{}; //!< 武器フラグ
50     chaotic_effect chaos_effect{}; //!< カオス効果
51     MagicalBrandEffect magical_effect{}; //!< 魔術効果
52     bool *fear{}; //!< 恐怖したかどうか
53     bool *mdeath{}; //!< 死んだかどうか
54     bool can_drain{}; //!< 吸血できるかどうか
55     int drain_result{}; //!< 吸血した累積量
56     int drain_left{}; //!< 吸血できる残量(最大MAX_VAMPIRIC_DRAIN)
57     bool weak{}; //!< 打撃効果でモンスターが弱くなったかどうか
58     AttributeFlags attribute_flags{}; //!< 与えたダメージの種類 
59 } player_attack_type;