-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathHavenHero.cpp
More file actions
63 lines (48 loc) · 1000 Bytes
/
HavenHero.cpp
File metadata and controls
63 lines (48 loc) · 1000 Bytes
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
57
58
59
60
61
62
63
#include "HavenHero.h"
HavenHero::HavenHero(const std::string tag, const unsigned x, const unsigned y, bool isStatic, const char symbol
, unsigned movesOnTurn, std::string name) : Hero(tag, x, y, isStatic, symbol, movesOnTurn)
{
m_Name = name;
}
void HavenHero::LevelUp()
{
}
void HavenHero::Die()
{
}
void HavenHero::Attack(Creature& enemy)
{
}
void HavenHero::Defend(Creature & enemy)
{
}
void HavenHero::PassTurn()
{
}
void HavenHero::MoveOnBattlefield(const int x, const int y)
{
if (m_LeftMoves == 0)
return;
m_Position.X = x;
m_Position.Y = y;
}
GameObject * HavenHero::GetObjectInstance() const
{
return new HavenHero(*this);
}
Creature * HavenHero::GetCreatureInstance() const
{
return new HavenHero(*this);
}
Hero* HavenHero::GetInstance() const
{
return new HavenHero(*this);
}
void HavenHero::MoveOnTurn(int x, int y) // set Player.X and Player.Y to respectively x and y
{
if (m_LeftMoves == 0)
return;
m_LeftMoves--;
m_Position.X = x;
m_Position.Y = y;
}