GRA RPG  DM & KK
Projekt na PO3
Monster Class Reference

Class Monster Inherits a champion. More...

#include <Monster.h>

Inheritance diagram for Monster:
Champion

Public Member Functions

 Monster (const std::string n, unsigned int l, int he, int st, int de, int ma, int def, int lu)
 Constructor Monster cause a champion constructor. More...
 
 Monster (Champion *const champ)
 Constructor Monster copying constructor. More...
 
virtual int attack () override
 Virtual function attack. More...
 
virtual int block () override
 Virtual function block. More...
 
virtual Monsterclone () const
 Virtual function clone to clone object. More...
 
- Public Member Functions inherited from 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. 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...
 

Additional Inherited Members

- Protected Attributes inherited from Champion
const unsigned int id_champion
 
const std::string name
 
unsigned int level
 
unsigned int experience
 
double money
 
int health
 
int strength
 
int dexterity
 
int magic
 
int defence
 
int luck
 

Detailed Description

Class Monster Inherits a champion.

Constructor & Destructor Documentation

◆ Monster() [1/2]

Monster::Monster ( const std::string  n,
unsigned int  l,
int  he,
int  st,
int  de,
int  ma,
int  def,
int  lu 
)
inline

Constructor Monster cause a champion constructor.

Parameters
n- Name champion
l- Level champion
he- Health champion
st- Strength champion
de- Dexerity Champion
ma- Magic champion
def- Defence champion
lu- Lucky champion

◆ Monster() [2/2]

Monster::Monster ( Champion *const  champ)
inline

Constructor Monster copying constructor.

Parameters
champ- Pointer object const champ

Member Function Documentation

◆ attack()

int Monster::attack ( )
overridevirtual

Virtual function attack.

Returns
value attack

Reimplemented from Champion.

◆ block()

int Monster::block ( )
overridevirtual

Virtual function block.

Returns
value block


Reimplemented from Champion.

◆ clone()

virtual Monster* Monster::clone ( ) const
inlinevirtual

Virtual function clone to clone object.

Returns
Pointer object Archer


Implements Champion.