mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-06 09:09:40 +02:00
vcmi: unify movement
1. Now there is only one bonus: MOVEMENT, with 2 subtypes: 0 is sea, 1 is land For movement value on land depends on creature speed we use a new ARMY_MOVEMENT updater with global bonus. If we does not like such dependency, we can just remove this updater from json. 2. All specialities and secondary skills for movement moved to new system AFAIK
This commit is contained in:
@@ -49,6 +49,7 @@ class DLL_LINKAGE CGHeroInstance : public CArmedInstance, public IBoatGenerator,
|
||||
|
||||
private:
|
||||
std::set<SpellID> spells; //known spells (spell IDs)
|
||||
mutable int armyMovementVal;
|
||||
|
||||
public:
|
||||
|
||||
@@ -210,6 +211,9 @@ public:
|
||||
int maxMovePoints(bool onLand) const;
|
||||
//cached version is much faster, TurnInfo construction is costly
|
||||
int maxMovePointsCached(bool onLand, const TurnInfo * ti) const;
|
||||
//update army movement bonus
|
||||
void updateArmyMovementBonus(bool onLand, const TurnInfo * ti) const;
|
||||
int getArmyMovementBonus() const;
|
||||
|
||||
int movementPointsAfterEmbark(int MPsBefore, int basicCost, bool disembark = false, const TurnInfo * ti = nullptr) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user