-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEntity.h
More file actions
36 lines (32 loc) · 918 Bytes
/
Entity.h
File metadata and controls
36 lines (32 loc) · 918 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
#pragma once
#include <string>
#include <vector>
#include <iostream>
class Entity {
public:
Entity(std::string name, double hp, double defense, char condition, bool advantage, std::string elementalWeakness, int gold, std::vector<std::string> inventory);
std::string getName() const;
double getHp() const;
void setHp(double hp);
double getDefense() const;
void setDefense(double defense);
char getCondition() const;
void setCondition(char condition);
int getGold() const;
void setGold(int gold);
void attack(Entity& target);
void specialAttack(Entity& target);
bool usePotion();
void swapWeapon();
void takeTurn(Entity& enemy);
void printStats() const;
private:
std::string name;
double hp;
double defense;
char condition;
bool advantage;
std::string elementalWeakness;
int gold;
std::vector<std::string> inventory;
};