|
@@ -40,7 +40,7 @@ public:
|
|
|
};
|
|
|
|
|
|
|
|
|
-class DLL_LINKAGE CGHeroInstance : public CArmedInstance, public IBoatGenerator, public CArtifactSet, public spells::Caster
|
|
|
+class DLL_LINKAGE CGHeroInstance : public CArmedInstance, public IBoatGenerator, public CArtifactSet, public spells::Caster, public WithBonuses, public WithNativeTerrain
|
|
|
{
|
|
|
// We serialize heroes into JSON for crossover
|
|
|
friend class CCampaignState;
|
|
@@ -156,7 +156,9 @@ public:
|
|
|
bool needsLastStack()const override;
|
|
|
|
|
|
ui32 getTileCost(const TerrainTile & dest, const TerrainTile & from, const TurnInfo * ti) const; //move cost - applying pathfinding skill, road and terrain modifiers. NOT includes diagonal move penalty, last move levelling
|
|
|
- TerrainId getNativeTerrain() const;
|
|
|
+ //WithNativeTerrain
|
|
|
+ FactionID getFaction() const override;
|
|
|
+ TerrainId getNativeTerrain() const override;
|
|
|
int getLowestCreatureSpeed() const;
|
|
|
si32 manaRegain() const; //how many points of mana can hero regain "naturally" in one day
|
|
|
si32 getManaNewTurn() const; //calculate how much mana this hero is going to have the next day
|
|
@@ -246,6 +248,9 @@ public:
|
|
|
std::string nodeName() const override;
|
|
|
si32 manaLimit() const override;
|
|
|
|
|
|
+ ///WithBonuses
|
|
|
+ const IBonusBearer* getBonusBearer() const override;
|
|
|
+
|
|
|
CBonusSystemNode * whereShouldBeAttachedOnSiege(const bool isBattleOutsideTown) const;
|
|
|
CBonusSystemNode * whereShouldBeAttachedOnSiege(CGameState * gs);
|
|
|
|