Добавлен инвентарь, в сундуках могут содержаться предметы.
This commit is contained in:
@@ -2,23 +2,27 @@
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "location.h"
|
||||
#include "inventory.h"
|
||||
#include "item.h"
|
||||
|
||||
class Player {
|
||||
public:
|
||||
std::string name = "Character Name";
|
||||
|
||||
int hp = 100;
|
||||
int maxHp = 100;
|
||||
int atk = 10;
|
||||
int gold = 0;
|
||||
|
||||
int currentLocation = 1;
|
||||
Point position;
|
||||
|
||||
int weaponId = 101;
|
||||
std::vector<int> items;
|
||||
Inventory inventory;
|
||||
int equippedWeaponId = 0;
|
||||
|
||||
Player() = default;
|
||||
Player(std::string name);
|
||||
|
||||
int getDamage(const std::vector<Item>& itemDatabase) const;
|
||||
void usePotion(int itemId, const std::vector<Item>& itemDatabase);
|
||||
void equipWeapon(int itemId, const std::vector<Item>& itemDatabase);
|
||||
void showStats() const;
|
||||
};
|
||||
Reference in New Issue
Block a user