shadowEffect.cc Source File

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
shadowEffect.cc
Go to the documentation of this file.
1 #include "osl/effect_util/shadowEffect.h"
2 #include "osl/effect_util/additionalOrShadow.h"
3 #include "osl/effect_util/effectUtil.h"
4
5 template <int count_max>
6 int osl::effect_util::
7 ShadowEffect::count(const NumEffectState& state, Square target,
8 Player attack)
9 {
10 PieceVector direct_pieces;
11 EffectUtil::findEffect(alt(attack), state, target, direct_pieces);
12 return AdditionalOrShadow::count<count_max>
13 (direct_pieces, state, target, attack);
14 }
15
16 bool osl::effect_util::
17 ShadowEffect::hasEffect(const NumEffectState& state, Square target,
18 Player attack)
19 {
20 return count<1>(state, target, attack);
21 }
22
23 int osl::effect_util::
24 ShadowEffect::count2(const NumEffectState& state, Square target,
25 Player attack)
26 {
27 return count<2>(state, target, attack);
28 }
29
30
31 // ;;; Local Variables:
32 // ;;; mode:c++
33 // ;;; c-basic-offset:2
34 // ;;; End: