|
@@ -134,6 +134,7 @@ public:
|
|
|
isAbstract = false;
|
|
|
value = 0;
|
|
|
aid = -1;
|
|
|
+ objid = -1;
|
|
|
resID = -1;
|
|
|
tile = int3(-1, -1, -1);
|
|
|
town = nullptr;
|
|
@@ -300,7 +301,7 @@ public:
|
|
|
VisitHero(int hid) : CGoal (Goals::VISIT_HERO){objid = hid; priority = 4;};
|
|
|
TGoalVec getAllPossibleSubgoals() override {return TGoalVec();};
|
|
|
TSubgoal whatToDoToAchieve() override;
|
|
|
- //bool operator== (VisitHero &g) {return g.objid == objid;}
|
|
|
+ bool operator== (VisitHero &g) { return g.goalType == goalType && g.objid == objid; }
|
|
|
bool fulfillsMe (TSubgoal goal) override;
|
|
|
std::string completeMessage() const override;
|
|
|
};
|
|
@@ -322,7 +323,7 @@ public:
|
|
|
VisitTile(int3 Tile) : CGoal (Goals::VISIT_TILE) {tile = Tile; priority = 5;};
|
|
|
TGoalVec getAllPossibleSubgoals() override;
|
|
|
TSubgoal whatToDoToAchieve() override;
|
|
|
- //bool operator== (VisitTile &g) {return g.tile == tile;}
|
|
|
+ bool operator== (VisitTile &g) { return g.goalType == goalType && g.tile == tile; }
|
|
|
std::string completeMessage() const override;
|
|
|
};
|
|
|
class ClearWayTo : public CGoal<ClearWayTo>
|
|
@@ -334,7 +335,7 @@ public:
|
|
|
ClearWayTo(int3 Tile, HeroPtr h) : CGoal (Goals::CLEAR_WAY_TO) {tile = Tile; hero = h; priority = 5;};
|
|
|
TGoalVec getAllPossibleSubgoals() override;
|
|
|
TSubgoal whatToDoToAchieve() override;
|
|
|
- bool operator== (ClearWayTo &g) {return g.tile == tile;}
|
|
|
+ bool operator== (ClearWayTo &g) { return g.goalType == goalType && g.tile == tile; }
|
|
|
};
|
|
|
class DigAtTile : public CGoal<DigAtTile>
|
|
|
//elementar with hero on tile
|
|
@@ -345,7 +346,7 @@ public:
|
|
|
DigAtTile(int3 Tile) : CGoal (Goals::DIG_AT_TILE) {tile = Tile; priority = 20;};
|
|
|
TGoalVec getAllPossibleSubgoals() override {return TGoalVec();};
|
|
|
TSubgoal whatToDoToAchieve() override;
|
|
|
- bool operator== (DigAtTile &g) {return g.tile == tile;}
|
|
|
+ bool operator== (DigAtTile &g) { g.goalType == goalType && g.tile == tile; }
|
|
|
};
|
|
|
|
|
|
class CIssueCommand : public CGoal<CIssueCommand>
|