blob: 77e674bb7ca3e6035869f3c89a8af074b217c9c1 (
plain)
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
|
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* AMateria.cpp :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: charles <charles.cabergs@gmail.com> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2020/04/14 16:26:57 by charles #+# #+# */
/* Updated: 2020/04/14 16:35:09 by charles ### ########.fr */
/* */
/* ************************************************************************** */
#include "AMateria.hpp"
AMateria::AMateria(AMateria const& other)
{
*this = other;
m_type = "";
}
void AMateria::operator=(AMateria const& other)
{
_xp = other._xp;
}
AMateria::~AMateria()
{
}
AMateria::AMateria(std::string const& type)
: m_type(type), _xp(0)
{
}
std::string const& AMateria::getType() const
{
return m_type;
}
unsigned int AMateria::getXP() const
{
return _xp;
}
void AMateria::use(ICharacter& target)
{
_xp += 10;
}
AMateria::AMateria()
{
}
|