OSDN Git Service

[Refactor] #2243 一点を狙う魔法をbreath関数から切り離す
[hengbandforosx/hengbandosx.git] / src / mspell / mspell-util.h
1 #pragma once
2
3 #include "system/angband.h"
4
5 /* Spell Type flag */
6 #define MONSTER_TO_PLAYER 0x01
7 #define MONSTER_TO_MONSTER 0x02
8
9 /* monster spell number */
10 #define RF4_SPELL_START 32 * 3
11 #define RF5_SPELL_START 32 * 4
12 #define RF6_SPELL_START 32 * 5
13
14 struct floor_type;
15 class PlayerType;
16
17 struct mspell_cast_msg {
18     mspell_cast_msg(concptr to_player_true, concptr to_mons_true, concptr to_player_false, concptr to_mons_false);
19     mspell_cast_msg() = default;
20     concptr to_player_true; /*!< msg_flagがTRUEかつプレイヤー対象*/
21     concptr to_mons_true; /*!< msg_flagがTRUEかつモンスター対象*/
22     concptr to_player_false; /*!< msg_flagがFALSEかつプレイヤー対象*/
23     concptr to_mons_false; /*!< msg_flagがFALSEかつモンスター対象*/
24 };
25
26 struct mspell_cast_msg_blind {
27     mspell_cast_msg_blind(concptr blind, concptr to_player, concptr to_mons);
28     mspell_cast_msg_blind() = default;
29     concptr blind; /*!< 盲目時*/
30     concptr to_player; /*!< 対プレイヤーかつ非盲目時*/
31     concptr to_mons; /*!< 対モンスター*/
32 };
33
34 struct mspell_cast_msg_simple {
35     mspell_cast_msg_simple(concptr to_player, concptr to_mons);
36     mspell_cast_msg_simple() = default;
37     concptr to_player; /*!< プレイヤー対象*/
38     concptr to_mons; /*!< モンスター対象*/
39 };
40
41 bool see_monster(PlayerType *player_ptr, MONSTER_IDX m_idx);
42 bool monster_near_player(floor_type *floor_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx);
43 bool monspell_message_base(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg &msgs, bool msg_flag_aux, int target_type);
44 bool monspell_message(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_blind &msgs, int target_type);
45 void simple_monspell_message(PlayerType *player_ptr, MONSTER_IDX m_idx, MONSTER_IDX t_idx, const mspell_cast_msg_simple &msgs, int target_type);