1 #include "mspell/mspell-data.h"
2 #include "effect/attribute-types.h"
3 #include "monster/monster-update.h"
4 #include "mspell/mspell-util.h"
5 #include "system/player-type-definition.h"
7 MSpellData::MSpellData()
15 MSpellData::MSpellData(const MSpellMessageData &msg)
23 MSpellData::MSpellData(const MSpellMessageData &msg, const AttributeType &type)
31 MSpellData::MSpellData(const MSpellMessageData &msg, const AttributeType &type, const MSpellDrsData &drs)
39 MSpellMessageData::MSpellMessageData()
40 : output([](PlayerType *, MONSTER_IDX, MONSTER_IDX, int) { return false; })
44 MSpellMessageData::MSpellMessageData(const mspell_cast_msg_blind &msg_string)
45 : output([msg_string](auto player_ptr, auto m_idx, auto t_idx, int target_type) {
46 return monspell_message(player_ptr, m_idx, t_idx, msg_string, target_type);
51 MSpellMessageData::MSpellMessageData(const std::string_view &blind, const std::string_view &to_player, const std::string_view &to_monster)
52 : output([blind, to_player, to_monster](auto player_ptr, auto m_idx, auto t_idx, int target_type) {
53 return monspell_message(player_ptr, m_idx, t_idx, { blind.data(), to_player.data(), to_monster.data() }, target_type);
58 MSpellDrsData::MSpellDrsData()
59 : execute([](PlayerType *, MONSTER_IDX) {})
63 MSpellDrsData::MSpellDrsData(std::initializer_list<drs_type> drs)
64 : execute([drs](auto player_ptr, auto m_idx) {
66 update_smart_learn(player_ptr, m_idx, d);
72 MSpellDrsData::MSpellDrsData(const drs_type &drs)
73 : execute([drs](auto player_ptr, auto m_idx) { update_smart_learn(player_ptr, m_idx, drs); })