-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathNPC.cpp
More file actions
58 lines (51 loc) · 977 Bytes
/
Copy pathNPC.cpp
File metadata and controls
58 lines (51 loc) · 977 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
#include "NPC.h"
NPC::NPC(){
setName("Carlos");
setHealth(10);
setDamage(1);
setProtection(1);
setHealthC(10);
}
NPC::NPC(std::string name, int health, int damage, int protection, int _healthc){
setName(name);
setHealth(health);
setDamage(damage);
setProtection(protection);
setHealthC(_healthc);
}
void NPC::setName(std::string _name){
name = _name;
}
void NPC::setDamage(int attack){
damage = attack;
}
void NPC::setHealth(int _health){
health = _health;
}
void NPC::setProtection(int _protec){
protection = _protec;
}
std::string NPC::getName(){
return name;
}
int NPC::getDamage(){
return damage;
}
int NPC::getHealth(){
return health;
}
int NPC::getProtection(){
return protection;
}
Item* NPC::getReward(){
return reward;
}
void NPC::setReward(Item* _reward){
reward = _reward;
}
void NPC::setHealthC(int healthc){
HealthC = healthc;
}
int NPC::getHealthC(){
return HealthC;
}