OSDN Git Service

Merge pull request #3532 from sikabane-works/release/3.0.0.87-alpha
[hengbandforosx/hengbandosx.git] / src / monster / monster-damage.h
1 #pragma once
2
3 #include "effect/attribute-types.h"
4 #include "monster-race/race-indice-types.h"
5 #include "system/angband.h"
6 #include "util/flag-group.h"
7 #include <string_view>
8 #include <tuple>
9 #include <vector>
10
11 enum class MonsterRaceId : int16_t;
12 class MonsterRaceInfo;
13 class MonsterEntity;
14 class PlayerType;
15 typedef std::vector<std::tuple<MonsterRaceId, MonsterRaceId, MonsterRaceId>> combined_uniques;
16 class MonsterDamageProcessor {
17 public:
18     MonsterDamageProcessor(PlayerType *player_ptr, MONSTER_IDX m_idx, int dam, bool *fear, AttributeType type);
19     MonsterDamageProcessor(PlayerType *player_ptr, MONSTER_IDX m_idx, int dam, bool *fear, AttributeFlags attribute_flags);
20     virtual ~MonsterDamageProcessor() = default;
21     bool mon_take_hit(std::string_view note);
22
23 private:
24     PlayerType *player_ptr;
25     MONSTER_IDX m_idx;
26     int dam;
27     bool *fear;
28     AttributeFlags attribute_flags{};
29     void get_exp_from_mon(MonsterEntity *m_ptr, int exp_dam);
30     bool genocide_chaos_patron();
31     bool process_dead_exp_virtue(std::string_view note, MonsterEntity *exp_mon);
32     void death_special_flag_monster();
33     void death_unique_monster(MonsterRaceId r_idx);
34     bool check_combined_unique(const MonsterRaceId r_idx, std::vector<MonsterRaceId> *combined_uniques);
35     void death_combined_uniques(const MonsterRaceId r_idx, const combined_uniques &combined_uniques);
36     void increase_kill_numbers();
37     void death_amberites(std::string_view m_name);
38     void dying_scream(std::string_view m_name);
39     void show_kill_message(std::string_view note, std::string_view m_name);
40     void show_explosion_message(std::string_view died_mes, std::string_view m_name);
41     void show_bounty_message(std::string_view m_name);
42     void set_redraw();
43     void summon_special_unique();
44     void add_monster_fear();
45 };