|
@@ -21,6 +21,11 @@ class Effect : public QObject {
|
|
Q_OBJECT
|
|
Q_OBJECT
|
|
|
|
|
|
public:
|
|
public:
|
|
|
|
+ enum TypeOfTrigger{
|
|
|
|
+ InCome = 1,
|
|
|
|
+ AfterAction = 2,
|
|
|
|
+ AfterEndTurn = 3
|
|
|
|
+ };
|
|
explicit Effect(QString parameters);
|
|
explicit Effect(QString parameters);
|
|
|
|
|
|
virtual ~Effect() {}
|
|
virtual ~Effect() {}
|
|
@@ -49,6 +54,7 @@ public:
|
|
virtual void OperateOnCell(Cell* cell) = 0;
|
|
virtual void OperateOnCell(Cell* cell) = 0;
|
|
virtual void OperateOnUnit(Unit* unit) = 0;
|
|
virtual void OperateOnUnit(Unit* unit) = 0;
|
|
virtual void OperateOnUnitToCell(Unit* who, Cell* where) = 0;
|
|
virtual void OperateOnUnitToCell(Unit* who, Cell* where) = 0;
|
|
|
|
+ virtual void Execute(Cell* from, Cell* where, Unit* who, Unit* whom, TypeOfTrigger Type) = 0;
|
|
protected:
|
|
protected:
|
|
int count_;
|
|
int count_;
|
|
int durability_;
|
|
int durability_;
|