-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathEquipable.h
57 lines (44 loc) · 1.17 KB
/
Equipable.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#pragma once
#include "Item.h"
enum EquipType
{
Weapon,
Armor,
Accessory
};
using namespace std;
class Equipable : public Item
{
public:
Equipable(std::string _name, std::string _description, int _hpBoost, int _atkBoost, int _defBoost, int _spdBoost, EquipType _type)
{
name = _name;
description = " (";
if (_hpBoost != 0) description += GREEN " " + to_string(_hpBoost) + RESET;
if (_atkBoost != 0) description += RED " " + to_string(_atkBoost) + RESET;
if (_defBoost != 0) description += CYAN " " + to_string(_defBoost) + RESET;
if (_spdBoost != 0) description += YELLOW " " + to_string(_spdBoost) + RESET;
description += " ) ";
description += _description;
hpBoost = _hpBoost;
atkBoost = _atkBoost;
defBoost = _defBoost;
spdBoost = _spdBoost;
type = _type;
}
Equipable(const Equipable &original)
{
this->name = original.name;
this->description = original.description;
this->hpBoost = original.hpBoost;
this->atkBoost = original.atkBoost;
this->defBoost = original.defBoost;
this->spdBoost = original.spdBoost;
this->type = original.type;
}
int hpBoost = 0;
int atkBoost = 0;
int defBoost = 0;
int spdBoost = 0;
EquipType type;
};