1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Unified CStack ammo, casts and counterattacks

* it is possible now to add casts and shoots OTF (f.e. with spell bonus)

Centralized stack 'ammo' loading from bonus system.
* introduced small proxy class for local bonus cache
(no need to use global cache if particular selector used on node only in one place)
* handle killing resurrected creatures
* use IBonusBearer::MaxHealth() where possible
* Fixed https://bugs.vcmi.eu/view.php?id=2486
* Possible fix for 0 HP after resurrection.
* Hack-fixed https://bugs.vcmi.eu/view.php?id=2584
* Unified CStack health API
* Use CHealth for CStack count and health points
* increased SERIALIZATION_VERSION
This commit is contained in:
AlexVinS
2017-07-04 14:24:46 +03:00
parent 3634af10ba
commit 4f14f22d3a
33 changed files with 1128 additions and 636 deletions

View File

@@ -38,7 +38,7 @@ namespace Unicode
/// NOTE: usage of these functions should be avoided if possible
std::string DLL_LINKAGE fromUnicode(const std::string & text);
std::string DLL_LINKAGE fromUnicode(const std::string & text, const std::string & encoding);
///delete (amount) UTF characters from right
DLL_LINKAGE void trimRight(std::string & text, const size_t amount = 1);
};
@@ -104,7 +104,7 @@ public:
std::vector<std::string> overview;//text for Kingdom Overview window
std::vector<std::string> colors; //names of player colors ("red",...)
std::vector<std::string> capColors; //names of player colors with first letter capitalized ("Red",...)
std::vector<std::string> turnDurations; //turn durations for pregame (1 Minute ... Unlimited)
std::vector<std::string> turnDurations; //turn durations for pregame (1 Minute ... Unlimited)
//towns
std::vector<std::string> tcommands, hcommands, fcommands; //texts for town screen, town hall screen and fort screen
@@ -144,6 +144,8 @@ public:
static void readToVector(std::string sourceName, std::vector<std::string> &dest);
int32_t pluralText(const int32_t textIndex, const int32_t count) const;
CGeneralTextHandler();
CGeneralTextHandler(const CGeneralTextHandler&) = delete;
CGeneralTextHandler operator=(const CGeneralTextHandler&) = delete;