-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCharacter.h
More file actions
105 lines (79 loc) · 2.65 KB
/
Character.h
File metadata and controls
105 lines (79 loc) · 2.65 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
#ifndef CONSOLE_ROGUELIKE_CPP_CHARACTER_H
#define CONSOLE_ROGUELIKE_CPP_CHARACTER_H
#include "Utility.h"
#include "LevelDesign.h"
#include "PlayerItems.h"
class Character {
private:
int Health{100};
int Damage{1};
int Armor{1};
string Name{"NonClassified"};
public:
int GetHealth();
void SetHealth(int Health);
int GetDamage();
void SetDamage(int Damage);
int GetArmor();
void SetArmor(int Armor);
void SetName(string Name);
string GetName();
};
class Player : public Character {
protected:
int MaxStamina{100}; int Stamina{100};
int Gold{0};
int StaminaPotions{1};
int HealthPotions{1};
public:
Player(string ClassName);
Player();
int GetStaminaPotions();
int GetHealthPotions();
void SetStaminaPotions(int Value);
void SetHealthPotions(int Value);
int GetStamina();
void SetStamina(int Stamina);
int GetGold();
void SetGold(int Gold);
};
class PlayerController : public Player {
private:
string PlayerSymbol{"@"};
//lvl 1 - 28 14
//lvl 2-3 5 2
public:
vector<InvSlot> Inventory; //Utility.h
vector<Weapon> WeaponSlots;
vector<class Armor> ArmorSlots;
vector<Potion> PotionSlots;
void TakeItem(Player & Player, class Armor & Item);
void TakeItem(Player & Player, Weapon & Item);
void TakeItem(Player & Player, Potion & Item);
void InteractWith(Player & Player, GameLevel & Level, int x, int y, int flag);
string GetPlayerSymbol();
void MovementInit(Player & Player, GameLevel & Level);
int WallCheck(GameLevel & Level, int x, int y);
void CheckForEnemiesAround(GameLevel & Level, Player & Player, int x, int y);
void Capybara(Player & Player);
void OpenShop(Player & Player);
int x{28}; int y{14}; //current position
};
/*=============================================================== Enemy ===============================================================
===================================================================================================================================== */
class Enemy : public Character {
public:
Enemy(int EnemyType); //0 - DefaultEnemy, 1 - Boss
Enemy();
};
class EnemyAI : public PlayerController {
private:
string EnemySymbol{"&"};
public:
EnemyAI();
string GetEnemySymbol();
void AutoMovement(GameLevel & Level, int x, int y);
};
/*=====================================================================================================================================
===================================================================================================================================== */
#endif //CONSOLE_ROGUELIKE_CPP_CHARACTER_H