Effect.hpp
Go to the documentation of this file.
1 // This code is based on Sabberstone project.
2 // Copyright (c) 2017-2019 SabberStone Team, darkfriend77 & rnilva
3 // Hearthstone++ is hearthstone simulator using C++ with reinforcement learning.
4 // Copyright (c) 2019 Chris Ohk, Youngjoong Kim, SeungHyun Jeon
5 
6 #ifndef ROSETTASTONE_EFFECT_HPP
7 #define ROSETTASTONE_EFFECT_HPP
8 
10 
11 namespace RosettaStone
12 {
13 class Character;
14 
16 enum class EffectOperator
17 {
18  ADD,
19  SUB,
20  MUL,
21  SET
22 };
23 
29 class Effect
30 {
31  public:
33  Effect() = default;
34 
39  Effect(GameTag gameTag, EffectOperator effectOperator, int value);
40 
44  void Apply(Character* character, bool isOneTurnEffect = false) const;
45 
46  private:
47  GameTag m_gameTag = GameTag::INVALID;
48  EffectOperator m_effectOperator = EffectOperator::SET;
49  int m_value = 0;
50 };
51 } // namespace RosettaStone
52 
53 #endif // ROSETTASTONE_EFFECT_HPP
Effect()=default
Default constructor.
Effect class.
Definition: Effect.hpp:29
EffectOperator
Effect operator to change card value such as attack and health.
Definition: Effect.hpp:16
void Apply(Character *character, bool isOneTurnEffect=false) const
Definition: AccountInfo.hpp:14
Abstract character class that stores hero and minion data.
Definition: Character.hpp:21