OSDN Git Service

Merge pull request #2122 from sikabane-works/release/3.0.0Alpha52
[hengbandforosx/hengbandosx.git] / src / monster-attack / monster-attack-player.h
1 #pragma once
2
3 #include "system/angband.h"
4
5 enum class RaceBlowEffectType;
6 enum class RaceBlowMethodType;
7 class PlayerType;
8 struct monster_type;
9 struct object_type;
10 class MonsterAttackPlayer {
11 public:
12     MonsterAttackPlayer(PlayerType *player_ptr, short m_idx);
13 #ifdef JP
14     int abbreviate = 0; // 2回目以降の省略表現フラグ.
15 #endif
16     short m_idx;
17     monster_type *m_ptr;
18     RaceBlowMethodType method;
19     RaceBlowEffectType effect;
20     bool do_silly_attack;
21     concptr act = nullptr;
22     int do_cut = 0;
23     int do_stun = 0;
24     bool touched = false;
25     bool explode = false;
26     DEPTH rlev = 0;
27     GAME_TEXT m_name[MAX_NLEN]{};
28     int d_dice = 0;
29     int d_side = 0;
30     object_type *o_ptr = nullptr;
31     bool obvious = false;
32     HIT_POINT damage = 0;
33     bool blinked = false;
34     GAME_TEXT o_name[MAX_NLEN]{};
35     HIT_POINT get_damage = 0;
36     GAME_TEXT ddesc[MAX_MONSTER_NAME]{};
37     ARMOUR_CLASS ac = 0;
38     bool alive = true;
39     bool fear = false;
40
41     void make_attack_normal();
42
43 private:
44     PlayerType *player_ptr;
45
46     static int stat_value(const int raw);
47     bool check_no_blow();
48     bool process_monster_blows();
49     bool check_monster_continuous_attack();
50     bool process_monster_attack_hit();
51     bool effect_protecion_from_evil();
52     void describe_silly_attacks();
53     void select_cut_stun();
54     void calc_player_cut();
55     void process_player_stun();
56     void monster_explode();
57     void process_monster_attack_evasion();
58     void describe_attack_evasion();
59     void gain_armor_exp();
60     void increase_blow_type_seen(const int ap_cnt);
61     void postprocess_monster_blows();
62 };