-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPlayerItems.h
More file actions
63 lines (45 loc) · 952 Bytes
/
PlayerItems.h
File metadata and controls
63 lines (45 loc) · 952 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
//
// Created by kolonist on 18.03.2023.
//
#ifndef CONSOLE_ROGUELIKE_CPP_PLAYERITEMS_H
#define CONSOLE_ROGUELIKE_CPP_PLAYERITEMS_H
#include "Utility.h"
class PlayerItem
{
private:
string Name;
int Price;
public:
PlayerItem(string Name, int Price);
string GetName();
int GetPrice();
};
class Armor: public PlayerItem
{
private:
int ArmorPoints;
public:
Armor(string Name, int ArmorPoints,int ArmorPrice);
int GetArmorPoints();
void SetArmorPoints(int ArmorPoints);
};
class Weapon: public PlayerItem
{
private:
int WeaponDamage;
public:
Weapon(string Name, int WeaponDamage,int WeaponPrice);
int GetWeaponDamage();
void SetWeaponDamage(int WeaponDamage);
};
class Potion: public PlayerItem
{
private:
int Health{30};
int Stamina{40};
public:
Potion(string Name,int PotionPrice);
int GetHealth();
int GetStamina();
};
#endif //CONSOLE_ROGUELIKE_CPP_PLAYERITEMS_H