12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- //
- // Created by IgorBat on 17.03.2018.
- //
- #ifndef THE_GAME_SPELL_H
- #define THE_GAME_SPELL_H
- #pragma once
- #include <iostream>
- #include <vector>
- #include <list>
- #include "cell.h"
- #include "units/unit.h"
- //#include "AbstractFactory.h"
- #include "effects/effect.h"
- class Spell : public QObject {
- Q_OBJECT
- protected:
- std :: vector <Effect*> effects_;
- private:
- int distance_;
- bool forCell_;
- public:
- explicit Spell(QString parameters);
- virtual ~Spell() {}
- int getDistance();
- void setDistance(int value);
- bool getForCell();
- void setForCell(bool value);
- virtual bool canCastToCell(Cell* destination, Cell* from);
- virtual void CastSpell(Cell* from, Cell* where, Unit* who, Unit* whom) = 0;
- QString getSpellName() const;
- QString getSpellDescr() const;
- QImage getSpellIcon() const;
- //---------------------------------------------//
- //-----------Parameters load section-----------//
- //---------------------------------------------//
- private:
- void loadSpellTraits(QString spell_folder);
- void loadSpellDescr(QString spell_folder);
- void loadSpellIcon(QString spell_folder);
- // GUI values
- QString spell_name_;
- QString spell_descr_;
- QImage spell_icon_;
- };
- #endif //THE_GAME_SPELL_H
|