OSDN Git Service

Merge pull request #1192 from hengband/feature/3.0.0Alpha26
[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 "system/angband.h"
6 #include "system/system-variables.h"
7
8 /*!
9  * @brief カオス効果種別
10  */
11 enum chaotic_effect {
12     CE_NONE = 0,
13     CE_VAMPIRIC = 1,
14     CE_QUAKE = 2,
15     CE_CONFUSION = 3,
16     CE_TELE_AWAY = 4,
17     CE_POLYMORPH = 5,
18 };
19
20 /*!
21  * @brief 魔術効果種別
22  */
23 enum class MagicalBrandEffect { NONE = 0, EXTRA = 1, STUN = 2, SCARE = 3, DISPELL = 4, PROBE = 5, MAX };
24
25 /*!
26  * @brief プレイヤーの打撃に関する情報
27  */
28 typedef struct grid_type grid_type;
29 typedef struct monster_race monster_race;
30 typedef struct monster_type monster_type;
31 typedef struct player_attack_type {
32     s16b hand{}; //!< 武器の持ち手
33     grid_type *g_ptr; //!< ターゲットのいる地形情報
34     MONSTER_IDX m_idx{}; //!< モンスターID
35     monster_type *m_ptr{}; //!< モンスター情報(参照ポインタ)
36     GAME_TEXT m_name[MAX_NLEN]{}; //!< モンスター名
37     MONRACE_IDX r_idx{}; //!< モンスター種族ID
38     monster_race *r_ptr{}; //!< モンスター種族情報(参照ポインタ)
39     bool backstab{}; //!< 眠っている敵を不意打ちしたか
40     bool surprise_attack{}; //!< 気づいていない敵に闇討ちしたか(忍者)
41     bool stab_fleeing{}; //!< 逃げている敵の背後を襲ったか
42     combat_options mode{}; //!< 剣術種別
43     bool monk_attack{}; //!< 素手/マーシャルアーツかどうか
44     const martial_arts *ma_ptr{}; //!< マーシャルアーツ種別
45     HIT_POINT attack_damage{}; //!< 累積ダメージ
46     int num_blow{}; //!< 打撃回数
47     BIT_FLAGS flags[TR_FLAG_SIZE]{}; //!< 武器フラグ
48     chaotic_effect chaos_effect{}; //!< カオス効果
49     MagicalBrandEffect magical_effect{}; //!< 魔術効果
50     bool *fear{}; //!< 恐怖したかどうか
51     bool *mdeath{}; //!< 死んだかどうか
52     bool can_drain{}; //!< 吸血できるかどうか
53     int drain_result{}; //!< 吸血した累積量
54     int drain_left{}; //!< 吸血できる残量(最大MAX_VAMPIRIC_DRAIN)
55     bool weak{}; //!< 打撃効果でモンスターが弱くなったかどうか
56 } player_attack_type;