28 lines
648 B
C++
28 lines
648 B
C++
#pragma once
|
|
#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;
|
|
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;
|
|
}; |