Class Archer Inherits a champion.
More...
#include <Archer.h>
|
| Archer (const unsigned id, const std::string n, unsigned int l, unsigned int e, double m, int he, int st, int de, int ma, int def, int lu) |
| Constructor Archer cause a champion constructor. More...
|
|
virtual int | attack () override |
| Virtual function attack. More...
|
|
virtual int | block () override |
| Virtual function block. More...
|
|
virtual Archer * | clone () const |
| Virtual function clone to clone object. More...
|
|
| Champion (const unsigned id, const std::string n, unsigned int l, unsigned int e, double m, int he, int st, int de, int ma, int def, int lu) |
| Constructor Champion. More...
|
|
int | heal () |
| Function return Helath the value to heal the hero. More...
|
|
void | setHealth (int hp) |
| Function set Health. More...
|
|
int | getHealth () const |
| Function get Health champion. More...
|
|
std::string | getName () |
| Function get Name champion. More...
|
|
void | addHealth (int hp) |
| Function add Health. More...
|
|
void | addStrength (int stren) |
| Function add Strength. More...
|
|
void | addDexterity (int dex) |
| Function add Dexterity. More...
|
|
void | addMagic (int mag) |
| Function add Magic. More...
|
|
void | addDefence (int def) |
| Function add Health. More...
|
|
void | addLuck (int luc) |
| Function add Lucky. More...
|
|
void | addMoney (int mon) |
| Function add Money. More...
|
|
void | addExperience (int exp) |
| Function add Experience. More...
|
|
void | takeMoney (double mon) |
| Function add Money. More...
|
|
int | getId () |
| Get Id. More...
|
|
int | getExperince () |
| Get Experience. More...
|
|
int | getLevel () |
| Get Level. More...
|
|
int | getMoney () |
| Get Money. More...
|
|
int | getStrength () |
| Get Strength. More...
|
|
int | getDexterity () |
| Get Dexterity. More...
|
|
int | getMagic () |
| Get Magic. More...
|
|
int | getDefence () |
| Get Defence. More...
|
|
int | getLuck () |
| Get Lucky. More...
|
|
Class Archer Inherits a champion.
◆ Archer()
Archer::Archer |
( |
const unsigned |
id, |
|
|
const std::string |
n, |
|
|
unsigned int |
l, |
|
|
unsigned int |
e, |
|
|
double |
m, |
|
|
int |
he, |
|
|
int |
st, |
|
|
int |
de, |
|
|
int |
ma, |
|
|
int |
def, |
|
|
int |
lu |
|
) |
| |
|
inline |
Constructor Archer cause a champion constructor.
- Parameters
-
write | - The inscription that will be shown on the button |
id | - Id champion in database |
n | - Name champion |
l | - Level champion |
e | - Experience champion |
m | - Money champion |
he | - Health champion |
st | - Strength champion |
de | - Dexerity Champion |
ma | - Magic champion |
def | - Defence champion |
lu | - Lucky champion |
◆ attack()
Virtual function attack.
- Returns
- value attack
Reimplemented from Champion.
◆ block()
Virtual function block.
- Returns
- value block
Reimplemented from Champion.
◆ clone()
virtual Archer* Archer::clone |
( |
| ) |
const |
|
inlinevirtual |
Virtual function clone to clone object.
- Returns
- Pointer object Archer
Implements Champion.