-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayerItems.cpp
More file actions
57 lines (41 loc) · 1.01 KB
/
PlayerItems.cpp
File metadata and controls
57 lines (41 loc) · 1.01 KB
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
//
// Created by kolonist on 18.03.2023.
//
#include "PlayerItems.h"
#include "Utility.h"
PlayerItem::PlayerItem(string Name, int Price) {
this->Name = Name;
this->Price = Price;
}
string PlayerItem::GetName() {
return Name;
}
int PlayerItem::GetPrice() {
return Price;
}
Armor::Armor(string Name, int ArmorPoints, int ArmorPrice) : PlayerItem(Name, ArmorPrice) {
this->ArmorPoints = ArmorPoints;
}
int Armor::GetArmorPoints() {
return ArmorPoints;
}
void Armor::SetArmorPoints(int ArmorPoints) {
this->ArmorPoints = ArmorPoints;
}
Weapon::Weapon(string Name, int WeaponDamage, int WeaponPrice) : PlayerItem(Name, WeaponPrice) {
this->WeaponDamage = WeaponDamage;
}
int Weapon::GetWeaponDamage() {
return WeaponDamage;
}
void Weapon::SetWeaponDamage(int WeaponDamage) {
this->WeaponDamage = WeaponDamage;
}
int Potion::GetHealth() {
return Health;
}
int Potion::GetStamina() {
return Stamina;
}
Potion::Potion(string Name,int PotionPrice) : PlayerItem(Name, PotionPrice) {
}