OSDN Git Service

83b87ed8fed4e8d9aadcae4fece534bab9933ec4
[hengbandforosx/hengbandosx.git] / src / mspell / mspell-attack / mspell-curse.h
1 #pragma once
2
3 #include "system/angband.h"
4
5 #include "effect/attribute-types.h"
6 #include "monster-race/race-ability-flags.h"
7 #include "mspell/mspell-data.h"
8 #include "mspell/mspell-util.h"
9 #include "system/player-type-definition.h"
10 #include <type_traits>
11
12 struct MonsterSpellResult;
13
14 class CurseData : public MSpellData {
15 public:
16     CurseData(const std::string_view &msg1, const std::string_view &msg2, const std::string_view &msg3, const AttributeType &typ);
17     template <typename FUNC>
18     CurseData(FUNC msg_func, AttributeType typ)
19         : MSpellData(msg_func, typ)
20     {
21         static_assert(std::is_invocable<decltype(msg_func), PlayerType *, MONSTER_IDX, MONSTER_IDX, int>::value);
22     }
23 };
24
25 class PlayerType;
26 MonsterSpellResult spell_RF5_CAUSE(PlayerType *player_ptr, MonsterAbilityType ms_type, POSITION y, POSITION x, MONSTER_IDX m_idx, MONSTER_IDX t_idx, int target_type);