Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Text-Based-Game/include/Hero.hpp
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
60 lines (49 sloc)
1.34 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef HERO_HPP | |
#define HERO_HPP | |
#include <iostream> | |
#include <string> | |
#include <cstdlib> | |
#include <ctime> | |
#include <tuple> | |
#include "libsqlite.hpp" // provided by Hintea, D. in 4005 CEM https://cumoodle.coventry.ac.uk/pluginfile.php/2606853/mod_resource/content/0/libsqlite.hpp | |
#include "Ability.hpp" | |
#include "Effect.hpp" | |
#include <map> | |
#include <vector> | |
#include <cmath> | |
using namespace std; | |
class Hero | |
{ | |
private: | |
int base_HP, base_SP, base_MP, base_SPD, base_DEF; | |
int current_HP, current_SP, current_MP, current_SPD, current_DEF; | |
vector<int> vector_Hero; | |
vector<int> ability_ids; | |
vector<Ability> abilities; | |
map<string, vector<tuple<float, int>>> buffs; | |
public: | |
string hero_name, hero_desc; | |
Hero(int _id); | |
vector<int> BaseHero() const; | |
vector<Ability> GetAbilities() const; | |
Ability GetAbilities(int i) const; | |
vector<string> GetNames() const; | |
vector<string> GetDescs() const; | |
vector<int> GetAvailable() const; | |
int GetHP() const; | |
int GetSP() const; | |
int GetMP() const; | |
int GetSPD() const; | |
int GetDEF() const; | |
int ReceiveDMG(Ability ability); | |
int HealHero(Ability ability); | |
void TakeSP(Ability ability); | |
void TakeMP(Ability ability); | |
void TakeSP(int amount); | |
void TakeMP(int amount); | |
void SetSPD(int speed); | |
void SetDEF(int defence); | |
void StatsChange(Ability ability); | |
friend ostream& operator<<( ostream&, const Hero&); | |
}; | |
#endif |