-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathenchantment.h
33 lines (28 loc) · 911 Bytes
/
enchantment.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef enchantment_h
#define enchantment_h
#include "decorator.h"
#include <memory>
#include <string>
class Attackable;
class Minion;
class Enchantment : public Decorator {
int atk_boost; // 0 if no stat boost
int def_boost;
public:
Enchantment(std::string name, int cost, std::shared_ptr<Effect> ability,
int atk_boost = 0, int def_boost = 0);
void attach(std::shared_ptr<Attackable> component);
void play(Player &whoplayed) override;
void attack(std::shared_ptr<Attackable> target) override;
void attack(Player &other) override;
void receiveattack(int i) override;
void modifyaction() override;
bool exhausted() override;
bool isDead() override;
void reset_action() override;
std::shared_ptr<Minion> get_minion() override;
void reset_state(bool dead = false) override;
void modify(std::shared_ptr<Minion> m) override;
std::shared_ptr<Attackable> get_component() override;
};
#endif