Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Osoba
- {
- protected:
- string Stan;
- int Zycie;
- string typ;
- int AtakFizBase;
- int BlokBase;
- int AktualneZycie;
- public:
- Osoba(){ Stan ="Żywy"; }
- Osoba(int zycie){Zycie=zycie; AktualneZycie=zycie; }
- virtual ~Osoba(){}
- }
- class Czlowiek:public Osoba
- {
- protected:
- int Mana;
- int AtackMagBase;
- public:
- Czlowiek ()
- {
- //tu wywołaj konstruktor z klasy Osoba z parametrem zycie ()
- }
- Czlowiek(int mana, int AMB){
- //tu wywołaj konstruktor z klasy Osoba z parametrem zycie ()
- Mana=mana; AtackMagBase = AMB;
- }
- int get_mana() const {return this->Mana;}
- int get_AtackMagBase() const {return this->AtackMagBase;}
- void set_mana(int value, char sign) const {
- if (sign == "-")
- this->Mana -= value;
- else
- this->Mana += value;
- virtual int AtakMagi (){}; //??? po co to w sumie ?
- };
- class Mag:public Czlowiek
- {
- public:
- Mag ()
- {
- //tu wywołaj konstruktor człowieka z parametrami mana i atakcośtamcośtam
- };
- virtual int AtakMagi ()
- {
- if(get_mana()>9)
- set_mana(10,'-');
- return get_AtackMagBase();
- };
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement