1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- #ifndef THE_GAME_SPELL_H
- #define THE_GAME_SPELL_H
- #pragma once
- #include <iostream>
- #include <vector>
- #include <list>
- #include "effect.h"
- class Unit{
- std :: list <Effect> effectsOnUnit;
- };
- class Cell{
- std :: list <Effect> effectsOnCell;
- };
- class Spell : public QObject {
- Q_OBJECT
- protected:
- std :: list <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;
- int getDistance();
- void setDistance(int Value);
- bool getForCell();
- void setForCell(bool Value);
- QString getSpellName() const;
- QString getSpellDescr() const;
- QImage getSpellIcon() const;
-
-
-
- private:
- void loadSpellTraits(QString spell_folder);
- void loadSpellDescr(QString spell_folder);
- void loadSpellIcon(QString spell_folder);
-
- QString spell_name_;
- QString spell_descr_;
- QImage spell_icon_;
- };
- #endif
|