OSDN Git Service

[Refactor] #2204 HIT_POINTエイリアスをintに揃えた
[hengbandforosx/hengbandosx.git] / src / mspell / mspell-result.h
1 #pragma once
2 #include "system/angband.h"
3
4 //! モンスターが魔法を使った際の結果。
5 struct MonsterSpellResult {
6 private:
7     explicit MonsterSpellResult(const bool valid, const int dam = 0)
8         : valid(valid)
9         , dam(dam)
10     {
11     }
12
13 public:
14     bool valid; //!< 通常は true。何か変なこと(無効な魔法IDなど)が起こったら false
15     bool learnable{ false }; //!< ラーニングを試みるか
16     int dam{}; //! ダメージ量(ものまね用)
17
18     static MonsterSpellResult make_valid(int dam = 0)
19     {
20         return MonsterSpellResult(true, dam);
21     }
22
23     static MonsterSpellResult make_invalid()
24     {
25         return MonsterSpellResult(false);
26     }
27 };