Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma once
- class Hero
- {
- private:
- int hp, max_hp, defense, attack, cp, max_cp, speed, lvl;
- string name;
- public:
- Hero(){
- hp = 0;
- max_hp = 0;
- defense = 0;
- attack = 0;
- cp = 0;
- max_cp = 0;
- speed = 0;
- lvl = 0;
- name = "";
- };
- Hero (int hp, int defense, int attack, int cp, int speed, int lvl, string name)
- {
- this->hp = hp;
- max_hp = hp;
- this->defense = defense;
- this->attack = attack;
- this->cp = cp;
- this->speed = speed;
- this->lvl = lvl;
- this->name = name;
- }
- int get_hp() { return hp; }
- int get_defense() { return defense; }
- int get_attack() { return attack; }
- int get_cp() { return cp; }
- int get_speed() { return speed; }
- int get_lvl() { return lvl; }
- string get_name() { return name; }
- string get_info() {
- string info = name + ": " + to_string(hp) + "/" + to_string(max_hp) + "\nAttk:\t" + to_string(attack) + "\nDef:\t" + to_string(defense) + "\nSpd:\t" + to_string(speed) + "\n";
- return info;
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement