Class Champion use to create character.
More...
#include <Champion.h>
|
| | 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...
|
| |
| virtual int | attack () |
| | Virtual function attack. More...
|
| |
| virtual int | block () |
| | Virtual function block. More...
|
| |
| int | heal () |
| | Function return Helath the value to heal the hero. More...
|
| |
| void | setHealth (int hp) |
| | Function set Health. More...
|
| |
| virtual Champion * | clone () const =0 |
| | Virtual method clone copy pointer. 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 Champion use to create character.
◆ Champion()
| Champion::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.
- Parameters
-
| write | - The inscription that will be shown on the button |
- Parameters
-
| id | - Id champion in database |
- Parameters
-
- Parameters
-
- Parameters
-
- Parameters
-
- Parameters
-
- Parameters
-
- Parameters
-
- Parameters
-
- Parameters
-
- Parameters
-
◆ addDefence()
| void Champion::addDefence |
( |
int |
def | ) |
|
|
inline |
Function add Health.
- Parameters
-
| hp | - Value to addition to health |
◆ addDexterity()
| void Champion::addDexterity |
( |
int |
dex | ) |
|
|
inline |
Function add Dexterity.
- Parameters
-
| hp | - Value to addition to Dexterity/param> |
◆ addExperience()
| void Champion::addExperience |
( |
int |
exp | ) |
|
Function add Experience.
- Parameters
-
| hp | - Value to addition to experience |
◆ addHealth()
| void Champion::addHealth |
( |
int |
hp | ) |
|
|
inline |
Function add Health.
- Parameters
-
| hp | - Value to addition to health |
◆ addLuck()
| void Champion::addLuck |
( |
int |
luc | ) |
|
|
inline |
Function add Lucky.
- Parameters
-
| hp | - Value to addition to lucky |
◆ addMagic()
| void Champion::addMagic |
( |
int |
mag | ) |
|
|
inline |
Function add Magic.
- Parameters
-
| hp | - Value to addition to magic |
◆ addMoney()
| void Champion::addMoney |
( |
int |
mon | ) |
|
|
inline |
Function add Money.
- Parameters
-
| hp | - Value to addition to Money |
◆ addStrength()
| void Champion::addStrength |
( |
int |
stren | ) |
|
|
inline |
Function add Strength.
- Parameters
-
| hp | - Value to addition to strength |
◆ attack()
| virtual int Champion::attack |
( |
| ) |
|
|
inlinevirtual |
◆ block()
| virtual int Champion::block |
( |
| ) |
|
|
inlinevirtual |
◆ clone()
| virtual Champion* Champion::clone |
( |
| ) |
const |
|
pure virtual |
◆ getDefence()
| int Champion::getDefence |
( |
| ) |
|
|
inline |
Get Defence.
- Returns
- Experience
◆ getDexterity()
| int Champion::getDexterity |
( |
| ) |
|
|
inline |
Get Dexterity.
- Returns
- Dexterity
◆ getExperince()
| int Champion::getExperince |
( |
| ) |
|
|
inline |
Get Experience.
- Returns
- Experience
◆ getHealth()
| int Champion::getHealth |
( |
| ) |
const |
|
inline |
Function get Health champion.
◆ getId()
Get Id.
- Returns
- Id champion
◆ getLevel()
| int Champion::getLevel |
( |
| ) |
|
|
inline |
◆ getLuck()
| int Champion::getLuck |
( |
| ) |
|
|
inline |
◆ getMagic()
| int Champion::getMagic |
( |
| ) |
|
|
inline |
◆ getMoney()
| int Champion::getMoney |
( |
| ) |
|
|
inline |
◆ getName()
| std::string Champion::getName |
( |
| ) |
|
|
inline |
Function get Name champion.
◆ getStrength()
| int Champion::getStrength |
( |
| ) |
|
|
inline |
Get Strength.
- Returns
- Strength
◆ heal()
Function return Helath the value to heal the hero.
◆ setHealth()
| void Champion::setHealth |
( |
int |
hp | ) |
|
|
inline |
Function set Health.
- Parameters
-
◆ takeMoney()
| void Champion::takeMoney |
( |
double |
mon | ) |
|
Function add Money.
- Parameters
-
| hp | - Value to addition to money |
◆ operator<<
| std::ostream& operator<< |
( |
std::ostream & |
out, |
|
|
const Champion & |
p |
|
) |
| |
|
friend |
Showing a value represent champion.
◆ defence
◆ dexterity
◆ experience
| unsigned int Champion::experience |
|
protected |
◆ health
◆ id_champion
| const unsigned int Champion::id_champion |
|
protected |
◆ level
| unsigned int Champion::level |
|
protected |
◆ luck
◆ magic
◆ money
◆ name
| const std::string Champion::name |
|
protected |
◆ strength